Просмотр исходного кода

解决费用调整后,导出文件中应付费用不对的bug已经进入业务员账号的金额不对的问题

lipf 3 месяцев назад
Родитель
Сommit
9069306c1c

+ 2 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java

@@ -837,7 +837,8 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         }
         // 保存比例调整记录
         InsFeeOrderRecord record = new InsFeeOrderRecord(param);
-        recordService.updateById(record);
+        // modify by lipf 2026年6月23日11:08:26 解决原先没有插入数据的问题,并且调整了表结构(主键由order_no调整为id),来保证多次调整不会报错
+        recordService.save(record);
         return HttpResult.ok();
     }
 

+ 25 - 3
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeOrdersServiceImpl.java

@@ -31,6 +31,7 @@ import org.springframework.stereotype.Service;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -183,7 +184,14 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
             insFeeOrders.setJqKeepPointPremium(keepPoint);
             insFeeOrders.setJqExportPremium(export);
             insFeeOrders.setJqExportKeepPointPremium(exportKeepPoint);
-            insFeeOrders.setJqPayablePremium(commission);
+            insFeeOrders.setJqPayablePremium(export);
+
+            // add by lipf, 2026年6月23日10:42:36  更新具体某个险种的出口费用的时候,同步更新总的出口费用
+            List<BigDecimal> exportAmount = new ArrayList<>();
+            exportAmount.add(insFeeOrders.getJqExportPremium());
+            exportAmount.add(insFeeOrders.getSyExportPremium());
+            exportAmount.add(insFeeOrders.getJyExportPremium());
+            insFeeOrders.setTotalPayablePremium(BigDecimalUtil.add(exportAmount));
         } else if ("sy".equals(type)) {
             insFeeOrders.setSyCommissionPremium(commission);
             insFeeOrders.setSyReceivablePremium(inlet);
@@ -192,7 +200,14 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
             insFeeOrders.setSyKeepPointPremium(keepPoint);
             insFeeOrders.setSyExportPremium(export);
             insFeeOrders.setSyExportKeepPointPremium(exportKeepPoint);
-            insFeeOrders.setSyPayablePremium(commission);
+            insFeeOrders.setSyPayablePremium(export);
+
+            // add by lipf, 2026年6月23日10:42:36  更新具体某个险种的出口费用的时候,同步更新总的出口费用
+            List<BigDecimal> exportAmount = new ArrayList<>();
+            exportAmount.add(insFeeOrders.getJqExportPremium());
+            exportAmount.add(insFeeOrders.getSyExportPremium());
+            exportAmount.add(insFeeOrders.getJyExportPremium());
+            insFeeOrders.setTotalPayablePremium(BigDecimalUtil.add(exportAmount));
         } else if ("jy".equals(type)) {
             insFeeOrders.setJyCommissionPremium(commission);
             insFeeOrders.setJyReceivablePremium(inlet);
@@ -201,7 +216,14 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
             insFeeOrders.setJyKeepPointPremium(keepPoint);
             insFeeOrders.setJyExportPremium(export);
             insFeeOrders.setJyExportKeepPointPremium(exportKeepPoint);
-            insFeeOrders.setJyPayablePremium(commission);
+            insFeeOrders.setJyPayablePremium(export);
+
+            // add by lipf, 2026年6月23日10:42:36  更新具体某个险种的出口费用的时候,同步更新总的出口费用
+            List<BigDecimal> exportAmount = new ArrayList<>();
+            exportAmount.add(insFeeOrders.getJqExportPremium());
+            exportAmount.add(insFeeOrders.getSyExportPremium());
+            exportAmount.add(insFeeOrders.getJyExportPremium());
+            insFeeOrders.setTotalPayablePremium(BigDecimalUtil.add(exportAmount));
         }
     }