|
@ -396,7 +396,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} else { |
|
|
} else { |
|
|
entity.setVehicleModelOffer(null); |
|
|
entity.setVehicleModelOffer(null); |
|
|
} |
|
|
} |
|
|
if ("1".equals(dto.getPurchaseMethod())) { |
|
|
if ("1".equals(dto.getPurchaseMethod())) {//全款
|
|
|
if ("1".equals(dto.getFinancePlan())) { |
|
|
if ("1".equals(dto.getFinancePlan())) { |
|
|
entity.setType(null); |
|
|
entity.setType(null); |
|
|
entity.setTypeKey(null); |
|
|
entity.setTypeKey(null); |
|
@ -404,6 +404,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} else { |
|
|
} else { |
|
|
if ("1".equals(dto.getFinTypeKey())) {//资方常规
|
|
|
if ("1".equals(dto.getFinTypeKey())) {//资方常规
|
|
|
AppCrmSolutions finNormal = dto.getFinNormal(); |
|
|
AppCrmSolutions finNormal = dto.getFinNormal(); |
|
|
|
|
|
if (finNormal != null) { |
|
|
SolutionssDto solutionsDto = new SolutionssDto(); |
|
|
SolutionssDto solutionsDto = new SolutionssDto(); |
|
|
BeanUtil.copyProperties(finNormal, solutionsDto, "sid"); |
|
|
BeanUtil.copyProperties(finNormal, solutionsDto, "sid"); |
|
|
solutionsDto.setSaleOrderSid(sid); |
|
|
solutionsDto.setSaleOrderSid(sid); |
|
@ -414,13 +415,20 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} |
|
|
} |
|
|
entity.setTypeKey("1"); |
|
|
entity.setTypeKey("1"); |
|
|
entity.setType("资方常规"); |
|
|
entity.setType("资方常规"); |
|
|
|
|
|
}else{ |
|
|
|
|
|
boolean isShowMore = finNormal.isShowMore(); |
|
|
|
|
|
if (isShowMore) { |
|
|
|
|
|
loanSolutionsFeign.deleteByOrderSid(sid); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else {//金融定制
|
|
|
} else {//金融定制
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else {//贷款
|
|
|
if ("1".equals(dto.getFinTypeKey())) {//资方常规
|
|
|
if ("1".equals(dto.getFinTypeKey())) {//资方常规
|
|
|
AppCrmSolutions finNormal = dto.getFinNormal(); |
|
|
AppCrmSolutions finNormal = dto.getFinNormal(); |
|
|
|
|
|
if (finNormal != null) { |
|
|
SolutionssDto solutionsDto = new SolutionssDto(); |
|
|
SolutionssDto solutionsDto = new SolutionssDto(); |
|
|
BeanUtil.copyProperties(finNormal, solutionsDto, "sid"); |
|
|
BeanUtil.copyProperties(finNormal, solutionsDto, "sid"); |
|
|
solutionsDto.setSaleOrderSid(sid); |
|
|
solutionsDto.setSaleOrderSid(sid); |
|
@ -441,6 +449,12 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
entity.setFinancePlanValue("自营非担保");//自营非担保
|
|
|
entity.setFinancePlanValue("自营非担保");//自营非担保
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else {//若存在
|
|
|
|
|
|
boolean isShowMore = finNormal.isShowMore(); |
|
|
|
|
|
if (!isShowMore) { |
|
|
|
|
|
loanSolutionsFeign.deleteByOrderSid(sid); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else {//金融定制
|
|
|
} else {//金融定制
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -630,6 +644,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
//新增客户的金融方案
|
|
|
//新增客户的金融方案
|
|
|
|
|
|
if(StringUtils.isNotBlank(dto.getTypeKey())){ |
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
|
if (crmSolutions != null) { |
|
|
if (crmSolutions != null) { |
|
@ -657,6 +672,8 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
baseMapper.insert(crmVehicledemand); |
|
|
baseMapper.insert(crmVehicledemand); |
|
|
|
|
|
|
|
|
} else {//修改
|
|
|
} else {//修改
|
|
@ -666,7 +683,7 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
} |
|
|
} |
|
|
BeanUtil.copyProperties(dto, crmVehicledemand, "sid"); |
|
|
BeanUtil.copyProperties(dto, crmVehicledemand, "sid"); |
|
|
crmVehicledemand.setCustomerSid(crmCustomerTemp.getSid()); |
|
|
crmVehicledemand.setCustomerSid(crmCustomerTemp.getSid()); |
|
|
if ("1".equals(dto.getPurchaseMethod())) { |
|
|
if ("1".equals(dto.getPurchaseMethod())) {//全款
|
|
|
if ("2".equals(dto.getFinancePlan())) {//三方金融
|
|
|
if ("2".equals(dto.getFinancePlan())) {//三方金融
|
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
@ -690,8 +707,9 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
crmVehicledemand.setTypeKey(null); |
|
|
crmVehicledemand.setTypeKey(null); |
|
|
loanSolutionsFeign.deleteByOrderSid(sid); |
|
|
loanSolutionsFeign.deleteByOrderSid(sid); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else {//贷款
|
|
|
//新增客户的金融方案
|
|
|
//新增客户的金融方案
|
|
|
|
|
|
if(StringUtils.isNotBlank(dto.getTypeKey())){ |
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
if ("1".equals(dto.getTypeKey())) {//资方常规
|
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
|
CrmSolutions crmSolutions = dto.getCrmSolutions(); |
|
|
if (crmSolutions != null) { |
|
|
if (crmSolutions != null) { |
|
@ -720,6 +738,12 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand |
|
|
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
|
|
|
crmVehicledemand.setFinancePlanValue("自营非担保");//自营非担保
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
loanSolutionsFeign.deleteByOrderSid(sid); |
|
|
|
|
|
crmVehicledemand.setTypeKey(null); |
|
|
|
|
|
crmVehicledemand.setType(null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
baseMapper.updateById(crmVehicledemand); |
|
|
baseMapper.updateById(crmVehicledemand); |
|
|
} |
|
|
} |
|
|