浏览代码

1.结算添加修改人
2.跟单明细导出被保人
3.批量修改不改比例

wuhp 2 年之前
父节点
当前提交
bf23810b25

+ 21 - 10
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -1221,12 +1221,7 @@ handlingProportion,
         //        根据协议   如果是含增值税结算   用保费 *   如果是  不含税保费
         InsPlyIncome insPlyIncome = baseMapper.getById(insPlyIncomeVo.getId());
 
-        InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
-        insPlyIncomeLog.setIncomeId(insPlyIncome.getId());
-        BeanUtils.copyProperties(insPlyIncome,insPlyIncomeLog);
-        insPlyIncomeLog.setId(null);
-        insPlyIncomeLog.setOperationStatus("2");
-        insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
+
 
         BigDecimal bigDecimal = this.getBigDecimal(insPlyIncome.getNoPremium(), insPlyIncomeVo.getNoSuperviseCostsProportion());
         insPlyIncome.setCommissionFeevalue(bigDecimal);
@@ -1237,6 +1232,13 @@ handlingProportion,
         insPlyIncome.setNoSuperviseCostsProportion(insPlyIncomeVo.getNoSuperviseCostsProportion());
         baseMapper.updateById(insPlyIncome);
 
+        InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
+        insPlyIncomeLog.setIncomeId(insPlyIncome.getId());
+        BeanUtils.copyProperties(insPlyIncome,insPlyIncomeLog);
+        insPlyIncomeLog.setId(null);
+        insPlyIncomeLog.setOperationStatus("2");
+        insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
+
         insPlyIncomeVo.setOtherFeevalue(insPlyIncomeVo.getNoSuperviseCostsPremiums());
         insPlyIncomeVo.setCrudStatus("2");
         this.saveLog(insPlyIncomeVo);
@@ -1857,7 +1859,6 @@ handlingProportion,
                         } else {
                             item.setTaskId(importResult.getId());
                             item.setSettlementTime(LocalDate.now());
-                            item.setSettlementUserId(BaseController.getUser().getName());
                             baseMapper.updateById(item);
                         }
                     }
@@ -1916,6 +1917,16 @@ handlingProportion,
             if (invoicAmount.compareTo(totalAmount) < 0) {
                 return HttpResult.error("结算金额大于开票金额");
             }
+            if(totalAmount.compareTo(invoicAmount) ==0){
+                HashMap<String, Object> incomeParams = new HashMap<>();
+                incomeParams.put("incomeIds", byTaskId);
+                List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(incomeParams);
+                for (InsPlyIncome item : insPlyIncomes) {
+                    item.setHandlingFeesStatus("1");
+                    item.setSettlementUserId(BaseController.getUser().getId());
+                    baseMapper.updateById(item);
+                }
+            }
         } else {
             if (invoicAmount.compareTo(insPlyIncomeVo.getSettlementAmount()) < 0) {
                 return HttpResult.error("结算金额大于开票金额");
@@ -1925,6 +1936,7 @@ handlingProportion,
                 List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(incomeParams);
                 for (InsPlyIncome item : insPlyIncomes) {
                     item.setHandlingFeesStatus("1");
+                    item.setSettlementUserId(BaseController.getUser().getId());
                     baseMapper.updateById(item);
                 }
             }
@@ -1954,7 +1966,6 @@ handlingProportion,
 
         BigDecimal subtract = byIdSettlementDocumentaryFeesEntity.getTotalAmount().subtract(add);
         byIdSettlementDocumentaryFeesEntity.setInvoicedNotSettledAmount(subtract);
-
         if (subtract.compareTo(BigDecimal.ZERO) == 0) {
             byIdSettlementDocumentaryFeesEntity.setCompletionStatus("2");
         } else if (subtract.compareTo(BigDecimal.ZERO) != 0) {
@@ -2566,10 +2577,10 @@ handlingProportion,
 
 
                     InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
-                    insPlyIncomeLog.setIncomeId(byBxLicenseno.getId());
-                    byBxLicenseno.setId(null);
                     BeanUtils.copyProperties(byBxLicenseno,insPlyIncomeLog);
                     insPlyIncomeLog.setOperationStatus("2");
+                    insPlyIncomeLog.setId(null);
+                    insPlyIncomeLog.setIncomeId(byBxLicenseno.getId());
                     insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
 
 

+ 1 - 1
src/main/java/com/ydtech/modules/ins/model/vo/res/BxOtherDetailsExcel.java

@@ -24,7 +24,7 @@ public class BxOtherDetailsExcel {
 
     @ApiModelProperty("被保险人")
     @ExcelProperty(value = "被保险人",index = 2)
-    private String userName;
+    private String insuredName;
 
 
     @ApiModelProperty("险种")

+ 1 - 1
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -149,7 +149,7 @@
                 a.settle_other_status  as  "settleOtherStatus",
                 a.user_id  as  "userId",
                 a.invoicing_method  as  "invoicingMethod",
-                a.settlement_image_id as "settlementUserName",
+                a.settlement_image_id as "settlementImageId",
                 a.task_id as "taskId",
                 a.create_time  as  "createTime"
     </sql>