11816 1 hafta önce
ebeveyn
işleme
fba714bd0c

+ 1
- 0
src/main/java/com/example/backend/pAndSExe/service/impl/StockServiceImpl.java Dosyayı Görüntüle

@@ -70,6 +70,7 @@ public class StockServiceImpl implements StockService {
70 70
                 ctrl.setSono(exe1.getSfno());        // 对应inf_exe1.sfno(销售合同号)
71 71
                 ctrl.setFmodalid(exe1.getFmodalid());// 对应inf_exe1.fmodalid
72 72
                 ctrl.setCreateBy(exe1.getCreateBy());
73
+                ctrl.setQiChu("1");
73 74
                 String userName = mdkcctrlMapper.selectCreateByName(ctrl.getCreateBy());
74 75
                 if (userName!= null) {
75 76
                     ctrl.setCreateByName(userName);

+ 49
- 0
src/main/java/com/example/backend/pAndSExe/util/PsExeExcelUtil.java Dosyayı Görüntüle

@@ -221,7 +221,24 @@ public class PsExeExcelUtil {
221 221
         // 2. 校验其他字段
222 222
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
223 223
             errorLogList.add("仓库名称为空");
224
+        }else {
225
+            String s = trimField(dto.getStockname());
226
+            if (s.contains("-")) {
227
+
228
+                String[] split = s.split("-");
229
+                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
230
+                if(!muban.contains(split[1])){
231
+                    errorLogList.add("仓库名称不正确,不在模板中");
232
+                }
233
+            }else
234
+            {
235
+                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
236
+                if(!muban.contains(s)){
237
+                    errorLogList.add("仓库名称不正确,不在模板中");
238
+                }
239
+            }
224 240
         }
241
+
225 242
         if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
226 243
             errorLogList.add("制单人为空");
227 244
         }
@@ -364,6 +381,23 @@ public class PsExeExcelUtil {
364 381
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
365 382
             errorLogList.add("仓库名称为空");
366 383
         }
384
+        else {
385
+            String s = trimField(dto.getStockname());
386
+            if (s.contains("-")) {
387
+
388
+                String[] split = s.split("-");
389
+                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
390
+                if(!muban.contains(split[1])){
391
+                    errorLogList.add("仓库名称不正确,不在模板中");
392
+                }
393
+            }else
394
+            {
395
+                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
396
+                if(!muban.contains(s)){
397
+                    errorLogList.add("仓库名称不正确,不在模板中");
398
+                }
399
+            }
400
+        }
367 401
         if (dto.getUt() == null || dto.getUt().trim().isEmpty()) {
368 402
             errorLogList.add("单位为空");
369 403
         }
@@ -506,6 +540,11 @@ public class PsExeExcelUtil {
506 540
         // 收款/受益人信息:非空校验
507 541
         if (dto.getCombinedPaymentInfo() == null || dto.getCombinedPaymentInfo().trim().isEmpty()) {
508 542
             errorLogList.add("收款/受益人名称+银行名称+银行账号为空");
543
+        }else {
544
+            String[] strings = splitCombinedField(dto.getCombinedPaymentInfo());
545
+            if("无".equals(strings[1])||"无".equals(strings[2])){
546
+                errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
547
+            }
509 548
         }
510 549
 
511 550
         // 付款类型:非空校验
@@ -621,6 +660,12 @@ public class PsExeExcelUtil {
621 660
         if (dto.getCombinedSuppInfo() == null || dto.getCombinedSuppInfo().trim().isEmpty()) {
622 661
             errorLogList.add("收款人名称+收款人银行+银行账号为空");
623 662
         }
663
+        else {
664
+            String[] strings = splitCombinedField(dto.getCombinedSuppInfo());
665
+            if("无".equals(strings[1])||"无".equals(strings[2])){
666
+                errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
667
+            }
668
+        }
624 669
 
625 670
         // 付款方式:非空校验(和Exe3一致)
626 671
         if (dto.getPayment() == null || dto.getPayment().trim().isEmpty()) {
@@ -1074,6 +1119,7 @@ public class PsExeExcelUtil {
1074 1119
 
1075 1120
 
1076 1121
 
1122
+
1077 1123
         // 客户编号+名称:非空 + 拆分处理(按空格/逗号拆分,优先取第一个为编号,剩余为名称)
1078 1124
         String ctNoCtName = trimField(dto.getCtNoCtName());
1079 1125
         String ctNo = "";
@@ -1205,6 +1251,9 @@ public class PsExeExcelUtil {
1205 1251
             if (ctName.isEmpty()) {
1206 1252
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1207 1253
             }
1254
+            if ("无".equals(ctInvoiceBankName)||"无".equals(ctInvoiceBankAcct)) {
1255
+                    errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1256
+            }
1208 1257
         }
1209 1258
 
1210 1259
         // -------------------- 物料信息合并列拆分(itemno/sdesc/brand) --------------------

Loading…
İptal
Kaydet