|
|
@@ -30,6 +30,7 @@ import com.jzg.commons.entity.finance.po.*;
|
|
|
import com.jzg.commons.entity.finance.vo.*;
|
|
|
import com.jzg.commons.entity.finance.vo.importimcome.*;
|
|
|
import com.jzg.commons.entity.orders.po.InsOrderAdjust;
|
|
|
+import com.jzg.commons.entity.orders.po.InsOrdersPolicy;
|
|
|
import com.jzg.commons.entity.po.EsmInsCompany;
|
|
|
import com.jzg.commons.entity.po.InsFeeOrders;
|
|
|
import com.jzg.commons.entity.po.PtlAgreement;
|
|
|
@@ -2637,14 +2638,73 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
errrMsg.append("该批数据的保险机构为空. ");
|
|
|
}
|
|
|
}
|
|
|
+ errrMsg.append(this.validatePolicy(datas));
|
|
|
+ errrMsg.append(this.validateProportion(datas));
|
|
|
+ return errrMsg.toString();
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 校验保单号是否一致
|
|
|
+ *
|
|
|
+ * @author lipf
|
|
|
+ * @date 2026/8/20 10:35
|
|
|
+ */
|
|
|
+ private String validatePolicy(List<ImportContentExt> datas) {
|
|
|
+ StringBuilder errrMsg = new StringBuilder();
|
|
|
+ for (ImportContentExt data : datas) {
|
|
|
+ boolean all = false;
|
|
|
+ boolean jq = false;
|
|
|
+ boolean sy = false;
|
|
|
+ boolean jy = false;
|
|
|
+ InsOrdersPolicy insOrdersPolicy = data.getInsOrdersPolicy();
|
|
|
+ if(insOrdersPolicy == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(!Objects.equals(insOrdersPolicy.getJqPolicyNo(), data.getJqPolicyNo())){
|
|
|
+ all = true;
|
|
|
+ jq = true;
|
|
|
+ }
|
|
|
+ if(!Objects.equals(insOrdersPolicy.getSyPolicyNo(), data.getSyPolicyNo())){
|
|
|
+ all = true;
|
|
|
+ sy = true;
|
|
|
+ }
|
|
|
+ if(!Objects.equals(insOrdersPolicy.getJyPolicyNo(), data.getJyPolicyNo())){
|
|
|
+ all = true;
|
|
|
+ jy = true;
|
|
|
+ }
|
|
|
+ if(all){
|
|
|
+ errrMsg.append("车牌号为[").append(data.getLicenseNo()).append("]的保单号不一致: ");
|
|
|
+ if(jq){
|
|
|
+ errrMsg.append("交强险保单号不一致. 应收数据的交强险保单号是[").append(insOrdersPolicy.getJqPolicyNo()).append("].excel维护的交强险保单号是[").append(data.getJqPolicyNo()).append("].");
|
|
|
+ }
|
|
|
+ if(sy){
|
|
|
+ errrMsg.append("商业险保单号不一致. 应收数据的商业险保单号是[").append(insOrdersPolicy.getSyPolicyNo()).append("].excel维护的商业险保单号是[").append(data.getSyPolicyNo()).append("].");
|
|
|
+ }
|
|
|
+ if(jy){
|
|
|
+ errrMsg.append("驾意险保单号不一致. 应收数据的驾意险保单号是[").append(insOrdersPolicy.getJyPolicyNo()).append("].excel维护的驾意险保单号是[").append(data.getJyPolicyNo()).append("].");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return errrMsg.toString();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 校验应收比例
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * @author lipf
|
|
|
+ * @date 2026/8/20 10:27
|
|
|
+ */
|
|
|
+ private static String validateProportion(List<ImportContentExt> datas) {
|
|
|
+ StringBuilder errrMsg = new StringBuilder();
|
|
|
for (ImportContentExt data : datas) {
|
|
|
boolean all = false;
|
|
|
boolean jq = false;
|
|
|
boolean sy = false;
|
|
|
boolean jy = false;
|
|
|
InsPlyIncome insPlyIncome = data.getInsPlyIncome();
|
|
|
+ if(insPlyIncome == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String jqadd = BigDecimalUtil.add(insPlyIncome.getJqSuperviseCostsProportion(), insPlyIncome.getJqOtherCostsProportion());
|
|
|
BigDecimal jqsubtract = BigDecimalUtil.subtract(new BigDecimal(jqadd), new BigDecimal(data.getJqInletRatio()));
|
|
|
if(BigDecimal.ZERO.compareTo(jqsubtract) != 0){
|