Przeglądaj źródła

1 收款认领添加外行费的导入和填充

wanyushuai 2 tygodni temu
rodzic
commit
fbe3d438a2

+ 2
- 0
src/main/java/com/example/backend/pAndSExe/dto/InfShoukuanrenlingExcelDTO.java Wyświetl plik

@@ -26,4 +26,6 @@ public class InfShoukuanrenlingExcelDTO {
26 26
     private String curcy;
27 27
     @ExcelProperty(index = 7)
28 28
     private String costCenter;
29
+    @ExcelProperty(index = 8)
30
+    private Double whactkFee;
29 31
 }

+ 2
- 0
src/main/java/com/example/backend/pAndSExe/model/InfShoukuanrenling.java Wyświetl plik

@@ -78,4 +78,6 @@ public class InfShoukuanrenling implements Serializable {
78 78
 
79 79
     @TableField(value ="costCenter")
80 80
     private String costCenter;
81
+    @TableField(value ="whactkFee")
82
+    private BigDecimal whactkFee;
81 83
 }

+ 1
- 0
src/main/java/com/example/backend/pAndSExe/service/impl/ShoukuanrenlingSettleServiceImpl.java Wyświetl plik

@@ -81,6 +81,7 @@ public class ShoukuanrenlingSettleServiceImpl implements ShoukuanrenlingSettleSe
81 81
                 breceiptctrl.setSoAdd(inf.getSono());
82 82
                 breceiptctrl.setRptg(salesContract.getRptg());
83 83
                 breceiptctrl.setCostCenter(inf.getCostCenter());
84
+                breceiptctrl.setWhactkFee(inf.getWhactkFee());
84 85
 
85 86
 
86 87
                 String s = mdkcctrlMapper.selectCreateByName(inf.getCreateBy());

+ 10
- 0
src/main/java/com/example/backend/pAndSExe/util/PsExeExcelUtil.java Wyświetl plik

@@ -1372,6 +1372,15 @@ public class PsExeExcelUtil {
1372 1372
         if (createBy.isEmpty()) {
1373 1373
             errorLogList.add("制单人为空");
1374 1374
         }
1375
+        // 认领金额:非空 + 正数校验
1376
+        BigDecimal whactkFee = BigDecimal.ZERO;
1377
+        if (dto.getWhactkFee() == null) {
1378
+        } else {
1379
+            whactkFee = BigDecimal.valueOf(dto.getWhactkFee()).setScale(6, BigDecimal.ROUND_HALF_UP);
1380
+            /*if (claimedAmt.compareTo(BigDecimal.ZERO) <= 0) {
1381
+                errorLogList.add("认领金额必须大于0,当前值:" + dto.getClaimedAmt());
1382
+            }*/
1383
+        }
1375 1384
 
1376 1385
         // 3. 构建错误日志
1377 1386
         String errorLog = errorLogList.isEmpty() ? "" : String.join(";", errorLogList);
@@ -1412,6 +1421,7 @@ public class PsExeExcelUtil {
1412 1421
         StringBuilder liushuihao = sb.append("BR").append(yearMonth).append(String.format(String.valueOf(id))).append("-QC");
1413 1422
         entity.setFno(liushuihao.toString());
1414 1423
         entity.setCostCenter(costCenter);
1424
+        entity.setWhactkFee(whactkFee);
1415 1425
 
1416 1426
         return entity;
1417 1427
     }

Ładowanie…
Anuluj
Zapisz