|
@@ -500,6 +500,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setJqOtherCostsProportion(insFeeOrderNew.getJqOtherCostsProportion()); //交强跟单费比例
|
|
insPlyIncome.setJqOtherCostsProportion(insFeeOrderNew.getJqOtherCostsProportion()); //交强跟单费比例
|
|
|
insPlyIncome.setSyOtherCostsProportion(insFeeOrderNew.getSyOtherCostsProportion()); //商业跟单费比例
|
|
insPlyIncome.setSyOtherCostsProportion(insFeeOrderNew.getSyOtherCostsProportion()); //商业跟单费比例
|
|
|
insPlyIncome.setNoOtherCostsProportion(insFeeOrderNew.getNoOtherCostsProportion()); //非车跟单费比例
|
|
insPlyIncome.setNoOtherCostsProportion(insFeeOrderNew.getNoOtherCostsProportion()); //非车跟单费比例
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsPremium(insFeeOrderNew.getJqOtherCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsPremium(insFeeOrderNew.getSyOtherCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(insFeeOrderNew.getNoOtherCostsPremiums());
|
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
|
|
|
insPlyIncome.setSyPremium(insFeeOrderNew.getSyPremium());
|
|
insPlyIncome.setSyPremium(insFeeOrderNew.getSyPremium());
|
|
|
insPlyIncome.setNoPremium(insFeeOrderNew.getNoPremium());
|
|
insPlyIncome.setNoPremium(insFeeOrderNew.getNoPremium());
|
|
@@ -4000,4 +4003,177 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
}
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改数据
|
|
|
|
|
+ * @param insPlyIncomeVo
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ public void correctData(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
|
|
+ String licenseno = insPlyIncomeVo.getLicenseno();
|
|
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
|
|
+ params.put("licenseno", licenseno);
|
|
|
|
|
+ List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
|
|
|
+ if (insPlyIncomes.isEmpty()) {
|
|
|
|
|
+ throw new SystemException("该车牌号不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+// 如果 该数据是平台 则转为私有 如果是私有则转为 平台
|
|
|
|
|
+ InsPlyIncome insPlyIncome1 = insPlyIncomes.get(0);
|
|
|
|
|
+ if ("1".equals(insPlyIncome1.getAgreementType())) { //平台转私有
|
|
|
|
|
+ BigDecimal jqPremium = insPlyIncome1.getJqPremium(); //交强保费
|
|
|
|
|
+ BigDecimal syPremium = insPlyIncome1.getSyPremium(); //商业保费
|
|
|
|
|
+ BigDecimal noPremium = insPlyIncome1.getNoPremium(); //非车保费
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal jqSuperviseCostsProportion = insPlyIncome1.getJqSuperviseCostsProportion();//交强手续费比例
|
|
|
|
|
+ BigDecimal sySuperviseCostsProportion = insPlyIncome1.getSySuperviseCostsProportion(); //商业手续费比例
|
|
|
|
|
+ BigDecimal noSuperviseCostsProportion = insPlyIncome1.getNoSuperviseCostsProportion(); //非车手续费比例
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal jqOtherCostsProportion = insPlyIncome1.getJqOtherCostsProportion(); //交强跟单比例
|
|
|
|
|
+ BigDecimal syOtherCostsProportion = insPlyIncome1.getSyOtherCostsProportion(); // 商业跟单比例
|
|
|
|
|
+ BigDecimal noOtherCostsProportion = insPlyIncome1.getNoOtherCostsProportion(); // 非车跟单比例
|
|
|
|
|
+
|
|
|
|
|
+ if ((jqSuperviseCostsProportion.compareTo(BigDecimal.ZERO) > 0 || sySuperviseCostsProportion.compareTo(BigDecimal.ZERO) > 0) && jqPremium.compareTo(BigDecimal.ZERO)>0 || syPremium.compareTo(BigDecimal.ZERO)>0) { //私有手续费
|
|
|
|
|
+ BigDecimal commissionFeerate = this.calculateTotal(insPlyIncome1.getJqSuperviseCostsProportion(), insPlyIncome1.getSySuperviseCostsProportion(), null);
|
|
|
|
|
+ BigDecimal commissionFeevalue = this.calculateTotal(insPlyIncome1.getJqSuperviseCostsPremiums(), insPlyIncome1.getSySuperviseCostsPremiums(), null);
|
|
|
|
|
+
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
|
|
+ BeanUtils.copyProperties(insPlyIncome1, insPlyIncome);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setOtherFeerate(null);
|
|
|
|
|
+ insPlyIncome.setOtherFeevalue(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setCommissionFeerate(commissionFeerate);
|
|
|
|
|
+ insPlyIncome.setCommissionFeevalue(commissionFeevalue);
|
|
|
|
|
+ insPlyIncome.setAllFeeValue(commissionFeevalue);
|
|
|
|
|
+ insPlyIncome.setAgreementId(insPlyIncomeVo.getAgreementId());
|
|
|
|
|
+ insPlyIncome.setId(null);
|
|
|
|
|
+
|
|
|
|
|
+ baseMapper.insert(insPlyIncome);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ((jqOtherCostsProportion.compareTo(BigDecimal.ZERO) > 0 || syOtherCostsProportion.compareTo(BigDecimal.ZERO) > 0) && jqPremium.compareTo(BigDecimal.ZERO)>0 || syPremium.compareTo(BigDecimal.ZERO)>0) {
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal syOtherAmount = algorithmAmount(insPlyIncome1.getSyPremium(), insPlyIncome1.getSyOtherCostsProportion());
|
|
|
|
|
+ BigDecimal jqOtherAmount = algorithmAmount(insPlyIncome1.getJqPremium(), insPlyIncome1.getJqOtherCostsProportion());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal otherFvalue = this.calculateTotal(syOtherAmount, jqOtherAmount, null);
|
|
|
|
|
+ BigDecimal otherFeet = this.calculateTotal(insPlyIncome1.getJqOtherCostsProportion(), insPlyIncome1.getSyOtherCostsProportion(), null);
|
|
|
|
|
+
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
|
|
+ BeanUtils.copyProperties(insPlyIncome1, insPlyIncome);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsPremiums(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setCommissionFeevalue(null);
|
|
|
|
|
+ insPlyIncome.setCommissionFeerate(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsPremium(jqOtherAmount);
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsPremium(syOtherAmount);
|
|
|
|
|
+ insPlyIncome.setOtherFeevalue(otherFvalue);
|
|
|
|
|
+ insPlyIncome.setOtherFeerate(otherFeet);
|
|
|
|
|
+ insPlyIncome.setAllFeeValue(otherFvalue);
|
|
|
|
|
+ insPlyIncome.setAgreementId(insPlyIncomeVo.getAgreementId());
|
|
|
|
|
+ insPlyIncome.setIsNotDocumentary("1");
|
|
|
|
|
+ insPlyIncome.setId(null);
|
|
|
|
|
+
|
|
|
|
|
+ baseMapper.insert(insPlyIncome);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (noSuperviseCostsProportion.compareTo(BigDecimal.ZERO)>0 && noPremium.compareTo(BigDecimal.ZERO)>0) { //非车手续费
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
|
|
+ BeanUtils.copyProperties(insPlyIncome1, insPlyIncome);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsPremium(null);
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setOtherFeevalue(null);
|
|
|
|
|
+ insPlyIncome.setOtherFeerate(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setCommissionFeevalue(insPlyIncome1.getNoSuperviseCostsPremiums());
|
|
|
|
|
+ insPlyIncome.setCommissionFeerate(insPlyIncome1.getNoSuperviseCostsProportion());
|
|
|
|
|
+ insPlyIncome.setAllFeeValue(insPlyIncome1.getNoSuperviseCostsPremiums());
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setAgreementId(insPlyIncomeVo.getAgreementId());
|
|
|
|
|
+ insPlyIncome.setId(null);
|
|
|
|
|
+ insPlyIncome.setIsNotCar("1");
|
|
|
|
|
+ baseMapper.insert(insPlyIncome);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (noOtherCostsProportion .compareTo(BigDecimal.ZERO) >0 && noPremium.compareTo(BigDecimal.ZERO)>0) {
|
|
|
|
|
+
|
|
|
|
|
+ // algorithmAmount(syPremium, syOtherCostsProportion)
|
|
|
|
|
+ BigDecimal noOtherAmount = algorithmAmount(insPlyIncome1.getNoPremium(), insPlyIncome1.getNoOtherCostsProportion());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
|
|
+ BeanUtils.copyProperties(insPlyIncome1, insPlyIncome);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setJqSuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setSySuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsPremium(null);
|
|
|
|
|
+ insPlyIncome.setJqOtherCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsProportion(null);
|
|
|
|
|
+ insPlyIncome.setSyOtherCostsPremium(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsPremiums(null);
|
|
|
|
|
+ insPlyIncome.setNoSuperviseCostsProportion(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setCommissionFeerate(null);
|
|
|
|
|
+ insPlyIncome.setCommissionFeevalue(null);
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setOtherFeevalue(noOtherAmount);
|
|
|
|
|
+ insPlyIncome.setOtherFeerate(insPlyIncome1.getNoOtherCostsProportion());
|
|
|
|
|
+
|
|
|
|
|
+ insPlyIncome.setNoOtherCostsPremium(noOtherAmount);
|
|
|
|
|
+ insPlyIncome.setAgreementId(insPlyIncomeVo.getAgreementId());
|
|
|
|
|
+ insPlyIncome.setAllFeeValue(insPlyIncome1.getNoOtherCostsPremium());
|
|
|
|
|
+ insPlyIncome.setId(null);
|
|
|
|
|
+ insPlyIncome.setIsNotCar("1");
|
|
|
|
|
+ insPlyIncome.setIsNotDocumentary("1");
|
|
|
|
|
+ baseMapper.insert(insPlyIncome);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|