|
|
@@ -442,6 +442,10 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
|
|
|
{
|
|
|
throw new SystemException("没有找到费用信息");
|
|
|
}
|
|
|
+ quoteVo.setJqSuperviseCostsProportion(new BigDecimal(costsNews.get(0).getJqCarCostsProportion()));
|
|
|
+ quoteVo.setSySuperviseCostsProportion(new BigDecimal(costsNews.get(0).getSyCarCostsProportion()));
|
|
|
+ quoteVo.setNoSuperviseCostsProportion(new BigDecimal(costsNews.get(0).getNoCarCostsProportion()));
|
|
|
+
|
|
|
|
|
|
InsAreaCompany insAreaCompany = new InsAreaCompany();
|
|
|
String subOrderNo = IdGenerate.nextId();
|
|
|
@@ -463,8 +467,8 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
|
|
|
insAreaCompany.setSypolicyno(quoteVo.getSypolicyno());
|
|
|
JSONArray noPolicyno = new JSONArray();
|
|
|
JSONObject noPolicy = new JSONObject();
|
|
|
- noPolicy.put("application", quoteVo.getNoPolicy());
|
|
|
- noPolicyno.add(noPolicyno);
|
|
|
+ noPolicy.put("application", quoteVo.getJypolicyno());
|
|
|
+ noPolicyno.add(noPolicy);
|
|
|
insAreaCompany.setCrossInsurance(noPolicyno);
|
|
|
|
|
|
insAreaCompany.setRiskinfo(insOrders.getRisk());
|
|
|
@@ -484,6 +488,7 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
|
|
|
insAreaCompany.setOperatorName(BaseController.getUser().getName());
|
|
|
insAreaCompany.setOperatorTime(new Date());
|
|
|
|
|
|
+ insAreaCompany.setSigningTime(quoteVo.getSignDate());
|
|
|
insAreaCompany.setCreatetime(LocalDateTime.now());
|
|
|
|
|
|
//保存子订单
|
|
|
@@ -492,12 +497,32 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
|
|
|
//保存费用比例
|
|
|
InsAreaCompanyExternalFee insAreaCompanyExternalFee = new InsAreaCompanyExternalFee();
|
|
|
insAreaCompanyExternalFee.setSubOrderNo(subOrderNo);
|
|
|
- insAreaCompanyExternalFee.setJqSuperviseCostsProportion(quoteVo.getJqSuperviseCostsProportion());
|
|
|
- insAreaCompanyExternalFee.setJqOtherCostsProportion(quoteVo.getJqOtherCostsProportion());
|
|
|
- insAreaCompanyExternalFee.setSySuperviseCostsProportion(quoteVo.getSySuperviseCostsProportion());
|
|
|
- insAreaCompanyExternalFee.setSyOtherCostsProportion(quoteVo.getSyOtherCostsProportion());
|
|
|
- insAreaCompanyExternalFee.setNoSuperviseCostsProportion(quoteVo.getNoSuperviseCostsProportion());
|
|
|
- insAreaCompanyExternalFee.setNoOtherCostsProportion(quoteVo.getNoOtherCostsProportion());
|
|
|
+ if(quoteVo.getJqSuperviseCostsProportion().compareTo(quoteVo.getJqCostsProportion()) > 0){
|
|
|
+ //总比例等于手续费比例
|
|
|
+ quoteVo.setJqSuperviseCostsProportion(quoteVo.getJqCostsProportion());
|
|
|
+ quoteVo.setJqOtherCostsProportion(new BigDecimal(0));
|
|
|
+ }else{
|
|
|
+ //总比例减去手续费比例 = 跟单比例
|
|
|
+ quoteVo.setJqOtherCostsProportion(quoteVo.getJqCostsProportion().subtract(quoteVo.getJqSuperviseCostsProportion()));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(quoteVo.getSySuperviseCostsProportion().compareTo(quoteVo.getSyCostsProportion()) >= 0){
|
|
|
+ //总比例等于手续费比例
|
|
|
+ quoteVo.setSySuperviseCostsProportion(quoteVo.getSyCostsProportion());
|
|
|
+ quoteVo.setSyOtherCostsProportion(new BigDecimal(0));
|
|
|
+ }else{
|
|
|
+ //总比例减去手续费比例 = 跟单比例
|
|
|
+ quoteVo.setSyOtherCostsProportion(quoteVo.getSyCostsProportion().subtract(quoteVo.getSySuperviseCostsProportion()));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(quoteVo.getNoSuperviseCostsProportion().compareTo(quoteVo.getNoCostsProportion()) >= 0){
|
|
|
+ //总比例等于手续费比例
|
|
|
+ quoteVo.setNoSuperviseCostsProportion(quoteVo.getNoCostsProportion());
|
|
|
+ quoteVo.setNoOtherCostsProportion(new BigDecimal(0));
|
|
|
+ }else{
|
|
|
+ //总比例减去手续费比例 = 跟单比例
|
|
|
+ quoteVo.setNoOtherCostsProportion(quoteVo.getNoCostsProportion().subtract(quoteVo.getNoSuperviseCostsProportion()));
|
|
|
+ }
|
|
|
this.insAreaCompanyExternalFeeService.save(insAreaCompanyExternalFee);
|
|
|
|
|
|
|