Browse Source

移动端客户洽谈需求

master
dimengzhe 2 years ago
parent
commit
6b81e5dfbf
  1. 56
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java
  2. 180
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvehicledemand/CrmVehicledemandService.java
  3. 0
      anrui-fin/anrui-fin-biz/src/main/resources/file/confirm.docx
  4. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/OtherPolicyVo.java

56
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java

@ -2097,18 +2097,24 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
UserRoleQuery userRoleQuery = new UserRoleQuery();
userRoleQuery.setRoleSid(candidateGroups.get(0));
List<SysUserVo> sysUserVos = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData();
StringBuilder nextNodeUserSids = new StringBuilder();
sysUserVos.removeAll(Collections.singleton(null));
String nextNodeUserSids = "";
if(sysUserVos.size()>0){
nextNodeUserSids = String.join(",",sysUserVos.stream().map(v->v.getSid()).collect(Collectors.toList()));
}
/* StringBuilder nextNodeUserSids = new StringBuilder();
if (sysUserVos.size() > 0) {
for (SysUserVo sysUserVo : sysUserVos) {
String sid = sysUserVo.getSid();
nextNodeUserSids.append(sid).append(",");
}
}
}*/
if (StringUtils.isBlank(nextNodeUserSids)) {
return rb.setMsg("下一环节暂无操作人员");
// return rb.setMsg("下一环节暂无操作人员");
nextNodeUserSids = ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId();
}
String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(","));
bv.setNextNodeUserSids(substring);
// String substring = nextNodeUserSids.substring(0, nextNodeUserSids.lastIndexOf(","));
bv.setNextNodeUserSids(nextNodeUserSids);
if (bv.getTaskId().equals(busArrearsCarryVehicleApply.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean1 = flowableFeign.handleProsess(bv);
if (!resultBean1.getSuccess()) {
@ -2116,21 +2122,33 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
}
UpdateFlowFieldVo ufVos = resultBean1.getData();
updateFlowFiled(BeanUtil.beanToMap(resultBean1.getData()));
busArrearsCarryVehicleApply = fetchBySid(bv.getBusinessSid());
if (!"Event_end".equals(ufVos.getTaskDefKey())) {
//极光推送
busArrearsCarryVehicleApply = fetchBySid(bv.getBusinessSid());
ufVos.setProcInsId(busArrearsCarryVehicleApply.getProcInstId());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVos, messageFlowVo);
ufVos.setProcInsId(busArrearsCarryVehicleApply.getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(bv.getBusinessSid());
messageFlowableQuery.setModuleName("欠款提车申请");
messageFlowableQuery.setMsgContent(busArrearsCarryVehicleApply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("欠款提车申请");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
try {
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder()
.setNameFormat("demo-pool-%d").build();
ExecutorService pool = new ThreadPoolExecutor(2, 100,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy());
BusArrearsCarryVehicleApply finalBusArrearsCarryVehicleApply1 = busArrearsCarryVehicleApply;
Future future1 = pool.submit(() -> {
//极光推送
ufVos.setProcInsId(finalBusArrearsCarryVehicleApply1.getProcInstId());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVos, messageFlowVo);
ufVos.setProcInsId(finalBusArrearsCarryVehicleApply1.getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(bv.getBusinessSid());
messageFlowableQuery.setModuleName("欠款提车申请");
messageFlowableQuery.setMsgContent(finalBusArrearsCarryVehicleApply1.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("欠款提车申请");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
});
} catch (Exception e) {
e.printStackTrace();
}
} else {
List<BusArrearsCarryVehicleDetails> carList = busArrearsCarryVehicleDetailsService.selectDetailsByApplySid(bv.getBusinessSid());
for (BusArrearsCarryVehicleDetails adCarListDto : carList) {

180
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvehicledemand/CrmVehicledemandService.java

@ -396,7 +396,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
} else {
entity.setVehicleModelOffer(null);
}
if ("1".equals(dto.getPurchaseMethod())) {
if ("1".equals(dto.getPurchaseMethod())) {//全款
if ("1".equals(dto.getFinancePlan())) {
entity.setType(null);
entity.setTypeKey(null);
@ -404,41 +404,55 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
} else {
if ("1".equals(dto.getFinTypeKey())) {//资方常规
AppCrmSolutions finNormal = dto.getFinNormal();
if (finNormal != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(finNormal, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(false);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
entity.setTypeKey("1");
entity.setType("资方常规");
}else{
boolean isShowMore = finNormal.isShowMore();
if (isShowMore) {
loanSolutionsFeign.deleteByOrderSid(sid);
}
}
} else {//金融定制
}
}
} else {//贷款
if ("1".equals(dto.getFinTypeKey())) {//资方常规
AppCrmSolutions finNormal = dto.getFinNormal();
if (finNormal != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(finNormal, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(false);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
entity.setTypeKey("1");
entity.setType("资方常规");
} else {//金融定制
}
}
} else {
if ("1".equals(dto.getFinTypeKey())) {//资方常规
AppCrmSolutions finNormal = dto.getFinNormal();
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(finNormal, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
return rb.setMsg(resultBean.getMsg());
}
entity.setTypeKey("1");
entity.setType("资方常规");
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
entity.setFinancePlan("4");//担保
entity.setFinancePlanValue("担保");//担保
} else {
entity.setFinancePlan("3");//自营非担保
entity.setFinancePlanValue("自营非担保");//自营非担保
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
entity.setFinancePlan("4");//担保
entity.setFinancePlanValue("担保");//担保
} else {
entity.setFinancePlan("3");//自营非担保
entity.setFinancePlanValue("自营非担保");//自营非担保
}
}
} else {//若存在
boolean isShowMore = finNormal.isShowMore();
if (!isShowMore) {
loanSolutionsFeign.deleteByOrderSid(sid);
}
}
} else {//金融定制
@ -620,7 +634,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
solutionsDto.setShowMore(false);
}
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
}
@ -630,32 +644,35 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
}
} else {
//新增客户的金融方案
if ("1".equals(dto.getTypeKey())) {//资方常规
CrmSolutions crmSolutions = dto.getCrmSolutions();
if (crmSolutions != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(crmSolutions, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
return rb.setMsg(resultBean.getMsg());
if(StringUtils.isNotBlank(dto.getTypeKey())){
if ("1".equals(dto.getTypeKey())) {//资方常规
CrmSolutions crmSolutions = dto.getCrmSolutions();
if (crmSolutions != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(crmSolutions, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
}
crmVehicledemand.setTypeKey("1");
crmVehicledemand.setType("资方常规");
} else {//定制金融
}
crmVehicledemand.setTypeKey("1");
crmVehicledemand.setType("资方常规");
} else {//定制金融
}
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
crmVehicledemand.setFinancePlan("4");//担保
crmVehicledemand.setFinancePlanValue("担保");//担保
} else {
crmVehicledemand.setFinancePlan("3");//自营非担保
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
crmVehicledemand.setFinancePlan("4");//担保
crmVehicledemand.setFinancePlanValue("担保");//担保
} else {
crmVehicledemand.setFinancePlan("3");//自营非担保
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
}
}
}
}
baseMapper.insert(crmVehicledemand);
@ -666,7 +683,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
}
BeanUtil.copyProperties(dto, crmVehicledemand, "sid");
crmVehicledemand.setCustomerSid(crmCustomerTemp.getSid());
if ("1".equals(dto.getPurchaseMethod())) {
if ("1".equals(dto.getPurchaseMethod())) {//全款
if ("2".equals(dto.getFinancePlan())) {//三方金融
if ("1".equals(dto.getTypeKey())) {//资方常规
CrmSolutions crmSolutions = dto.getCrmSolutions();
@ -678,7 +695,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
solutionsDto.setShowMore(false);
}
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
}
@ -690,36 +707,43 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
crmVehicledemand.setTypeKey(null);
loanSolutionsFeign.deleteByOrderSid(sid);
}
} else {
} else {//贷款
//新增客户的金融方案
if ("1".equals(dto.getTypeKey())) {//资方常规
CrmSolutions crmSolutions = dto.getCrmSolutions();
if (crmSolutions != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(crmSolutions, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if(!resultBean.getSuccess()){
return rb.setMsg(resultBean.getMsg());
if(StringUtils.isNotBlank(dto.getTypeKey())){
if ("1".equals(dto.getTypeKey())) {//资方常规
CrmSolutions crmSolutions = dto.getCrmSolutions();
if (crmSolutions != null) {
SolutionssDto solutionsDto = new SolutionssDto();
BeanUtil.copyProperties(crmSolutions, solutionsDto, "sid");
solutionsDto.setSaleOrderSid(sid);
solutionsDto.setShowMore(true);
ResultBean resultBean = loanSolutionsFeign.save2(solutionsDto);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
} else {
loanSolutionsFeign.deleteByOrderSid(sid);
}
}else{
loanSolutionsFeign.deleteByOrderSid(sid);
crmVehicledemand.setTypeKey("1");
crmVehicledemand.setType("资方常规");
} else {//定制金融
}
crmVehicledemand.setTypeKey("1");
crmVehicledemand.setType("资方常规");
} else {//定制金融
}
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
crmVehicledemand.setFinancePlan("4");//担保
crmVehicledemand.setFinancePlanValue("担保");//担保
} else {
crmVehicledemand.setFinancePlan("3");//自营非担保
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
SolutionsDetailsVo loanSolutions = loanSolutionsFeign.selectDetailss(sid).getData();
if (loanSolutions != null) {
if (StringUtils.isBlank(loanSolutions.getTypeKey())) {
crmVehicledemand.setFinancePlan("4");//担保
crmVehicledemand.setFinancePlanValue("担保");//担保
} else {
crmVehicledemand.setFinancePlan("3");//自营非担保
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
}
}
}else{
loanSolutionsFeign.deleteByOrderSid(sid);
crmVehicledemand.setTypeKey(null);
crmVehicledemand.setType(null);
}
}
baseMapper.updateById(crmVehicledemand);
}

0
anrui-fin/anrui-fin-biz/src/main/resources/file/confirm.docx

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/OtherPolicyVo.java

@ -14,7 +14,6 @@ public class OtherPolicyVo implements Vo {
private static final long serialVersionUID = 699706797731138466L;
private String sid;
private String name;
@ApiModelProperty("年利率")
private String yearRatio;
@ -22,4 +21,8 @@ public class OtherPolicyVo implements Vo {
private String period;
@ApiModelProperty("期数key")
private String periodKey;
@ApiModelProperty("最高融资额比例")
private String maxLoanRatio;
@ApiModelProperty("最高融资额")
private String maxLoanAmount;
}

Loading…
Cancel
Save