11816 1 неделю назад
Родитель
Сommit
fba714bd0c

+ 1
- 0
src/main/java/com/example/backend/pAndSExe/service/impl/StockServiceImpl.java Просмотреть файл

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

+ 49
- 0
src/main/java/com/example/backend/pAndSExe/util/PsExeExcelUtil.java Просмотреть файл

221
         // 2. 校验其他字段
221
         // 2. 校验其他字段
222
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
222
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
223
             errorLogList.add("仓库名称为空");
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
         if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
242
         if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
226
             errorLogList.add("制单人为空");
243
             errorLogList.add("制单人为空");
227
         }
244
         }
364
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
381
         if (dto.getStockname() == null || dto.getStockname().trim().isEmpty()) {
365
             errorLogList.add("仓库名称为空");
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
         if (dto.getUt() == null || dto.getUt().trim().isEmpty()) {
401
         if (dto.getUt() == null || dto.getUt().trim().isEmpty()) {
368
             errorLogList.add("单位为空");
402
             errorLogList.add("单位为空");
369
         }
403
         }
506
         // 收款/受益人信息:非空校验
540
         // 收款/受益人信息:非空校验
507
         if (dto.getCombinedPaymentInfo() == null || dto.getCombinedPaymentInfo().trim().isEmpty()) {
541
         if (dto.getCombinedPaymentInfo() == null || dto.getCombinedPaymentInfo().trim().isEmpty()) {
508
             errorLogList.add("收款/受益人名称+银行名称+银行账号为空");
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
         if (dto.getCombinedSuppInfo() == null || dto.getCombinedSuppInfo().trim().isEmpty()) {
660
         if (dto.getCombinedSuppInfo() == null || dto.getCombinedSuppInfo().trim().isEmpty()) {
622
             errorLogList.add("收款人名称+收款人银行+银行账号为空");
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
         // 付款方式:非空校验(和Exe3一致)
670
         // 付款方式:非空校验(和Exe3一致)
626
         if (dto.getPayment() == null || dto.getPayment().trim().isEmpty()) {
671
         if (dto.getPayment() == null || dto.getPayment().trim().isEmpty()) {
1074
 
1119
 
1075
 
1120
 
1076
 
1121
 
1122
+
1077
         // 客户编号+名称:非空 + 拆分处理(按空格/逗号拆分,优先取第一个为编号,剩余为名称)
1123
         // 客户编号+名称:非空 + 拆分处理(按空格/逗号拆分,优先取第一个为编号,剩余为名称)
1078
         String ctNoCtName = trimField(dto.getCtNoCtName());
1124
         String ctNoCtName = trimField(dto.getCtNoCtName());
1079
         String ctNo = "";
1125
         String ctNo = "";
1205
             if (ctName.isEmpty()) {
1251
             if (ctName.isEmpty()) {
1206
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1252
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1207
             }
1253
             }
1254
+            if ("无".equals(ctInvoiceBankName)||"无".equals(ctInvoiceBankAcct)) {
1255
+                    errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1256
+            }
1208
         }
1257
         }
1209
 
1258
 
1210
         // -------------------- 物料信息合并列拆分(itemno/sdesc/brand) --------------------
1259
         // -------------------- 物料信息合并列拆分(itemno/sdesc/brand) --------------------

Загрузка…
Отмена
Сохранить