11816 3 месяцев назад
Родитель
Сommit
6d5310ded3

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

43
 
43
 
44
     @Select("select * from SGGMIIP.mdkcctrl where pono =#{fno} where del_flag != '1' ")
44
     @Select("select * from SGGMIIP.mdkcctrl where pono =#{fno} where del_flag != '1' ")
45
     List<Mdkcctrl> selectByPono(String fno);
45
     List<Mdkcctrl> selectByPono(String fno);
46
+
47
+    @Select("select stockno\n" +
48
+            "from warehouse\n" +
49
+            "where ifnull(del_flag, 0) <> 1\n" +
50
+            "\tand ifnull(endsign, 0) = 1\n" +
51
+            "and sotockname=#{stockname}\n" +
52
+            "limit 1")
53
+    String selectStockNoByName(String stockname);
46
 }
54
 }

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

10
 public interface PurchaseorderMapper extends BaseMapper <PurchaseOrder> {
10
 public interface PurchaseorderMapper extends BaseMapper <PurchaseOrder> {
11
 
11
 
12
 
12
 
13
-    @Select("select * from SGGMIIP.purchaseOrder WHERE pono=#{pono} ")
13
+    @Select("select * from SGGMIIP.purchaseOrder WHERE pono=#{pono} and del_flag!='1' limit 1 ")
14
     PurchaseOrder selectByPurchaseContract(String pono);
14
     PurchaseOrder selectByPurchaseContract(String pono);
15
 
15
 
16
 
16
 

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

115
                 breceiptdtl.setFisred("1");
115
                 breceiptdtl.setFisred("1");
116
                 breceiptdtl.setFisredDesc("已入账");
116
                 breceiptdtl.setFisredDesc("已入账");
117
                 breceiptdtl.setFno(inf.getFno()); // 财务号
117
                 breceiptdtl.setFno(inf.getFno()); // 财务号
118
+                breceiptdtl.setSoOrderNo(inf.getSono());
119
+                breceiptdtl.setClaimAmt(inf.getClaimedAmt());
120
+                breceiptdtl.setPlaced("2");
121
+                breceiptdtl.setRlamt(inf.getClaimedAmt());
122
+                breceiptdtl.setZzbj("0");
123
+
124
+
118
 
125
 
119
                 // 插入明细表
126
                 // 插入明细表
120
                 breceiptdtlMapper.insert(breceiptdtl);
127
                 breceiptdtlMapper.insert(breceiptdtl);

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

68
                 ctrl.setSoloId(exe1.getID());       // 对应inf_exe1.id
68
                 ctrl.setSoloId(exe1.getID());       // 对应inf_exe1.id
69
                 ctrl.setFno(exe1.getFno());          // 对应inf_exe1.fno
69
                 ctrl.setFno(exe1.getFno());          // 对应inf_exe1.fno
70
                 ctrl.setStockname(exe1.getStockname());// 对应inf_exe1.stockname
70
                 ctrl.setStockname(exe1.getStockname());// 对应inf_exe1.stockname
71
-                ctrl.setStockno(exe1.getStockcode());// 对应inf_exe1.stockcode
71
+                if (exe1.getStockcode()!=null&& !exe1.getStockcode().isEmpty()) {
72
+                    ctrl.setStockno(exe1.getStockcode());// 对应inf_exe1.stockcode
73
+                }else {
74
+                    String stockno=mdkcctrlMapper.selectStockNoByName(exe1.getStockname());
75
+                    ctrl.setStockno(stockno);
76
+                }
72
                 ctrl.setPono(exe1.getPfno());        // 对应inf_exe1.pfno(采购合同号)
77
                 ctrl.setPono(exe1.getPfno());        // 对应inf_exe1.pfno(采购合同号)
73
                 ctrl.setSono(exe1.getSfno());        // 对应inf_exe1.sfno(销售合同号)
78
                 ctrl.setSono(exe1.getSfno());        // 对应inf_exe1.sfno(销售合同号)
74
                 ctrl.setFmodalid(exe1.getFmodalid());// 对应inf_exe1.fmodalid
79
                 ctrl.setFmodalid(exe1.getFmodalid());// 对应inf_exe1.fmodalid

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

80
                 saleSettle.setCreateByName(s);
80
                 saleSettle.setCreateByName(s);
81
                 saleSettle.setCreateTime(new Date());
81
                 saleSettle.setCreateTime(new Date());
82
                 saleSettle.setUpdateTime(new Date());
82
                 saleSettle.setUpdateTime(new Date());
83
+                saleSettle.setPlaced("2");
83
 
84
 
84
                 // 我方代码
85
                 // 我方代码
85
                 saleSettle.setFours(salesOrder.getFours());
86
                 saleSettle.setFours(salesOrder.getFours());

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

786
         }else if (!Shujvzidian.fukuanfangshi.contains(dto.getPayment().trim())) {
786
         }else if (!Shujvzidian.fukuanfangshi.contains(dto.getPayment().trim())) {
787
             errorLogList.add("付款方式不在下拉框中");
787
             errorLogList.add("付款方式不在下拉框中");
788
         }
788
         }
789
-        if (dto.getCreateBy() == null || dto.getPayment().trim().isEmpty()) {
789
+        if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
790
             errorLogList.add("制单人为空");
790
             errorLogList.add("制单人为空");
791
         }
791
         }
792
 
792
 
1409
             // 拆分规则:按【|】分隔(优先),无则按【;】,最后按【,】/空格,最多拆4段
1409
             // 拆分规则:按【|】分隔(优先),无则按【;】,最后按【,】/空格,最多拆4段
1410
 
1410
 
1411
             String[] ctArr = ctInfo.split("[,|;,\\s]+", 4);
1411
             String[] ctArr = ctInfo.split("[,|;,\\s]+", 4);
1412
-            if (ctArr.length >= 1) ctName = ctArr[0];
1413
-            if (ctArr.length >= 2) ctInvoiceBankName = ctArr[1];
1414
-            if (ctArr.length >= 3) ctInvoiceBankAcct = ctArr[2];
1415
-            if (ctArr.length >= 4) ctContNm = ctArr[3];
1412
+            if (ctArr.length >= 1) ctName = ctArr[0].trim();
1413
+            if (ctArr.length >= 2) ctInvoiceBankName = ctArr[1].trim();
1414
+            if (ctArr.length >= 3) ctInvoiceBankAcct = ctArr[2].trim();
1415
+            if (ctArr.length >= 4) ctContNm = ctArr[3].trim();
1416
             // 核心字段校验:客户名称不能为空
1416
             // 核心字段校验:客户名称不能为空
1417
-            if (ctName.isEmpty()) {
1417
+            if (ctArr.length<4){
1418
+                errorLogList.add("客户信息(名称+银行+账号+合同名)格式错误");
1419
+            }else if (ctName.isEmpty()) {
1418
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1420
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1419
             }
1421
             }
1420
-            if ("无".equals(ctInvoiceBankName)||"无".equals(ctInvoiceBankAcct)) {
1422
+            if (ctName.isEmpty()) {
1423
+                errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1424
+            }else {
1425
+                Gongyingshang gongyingshang = gongyingshangMapper.selectGongyingshangByName(ctName);
1426
+                if (gongyingshang == null) {
1427
+                    errorLogList.add("供应商没有,需要先申请供应商; ");
1428
+                }
1429
+                else if ("无".equals(ctInvoiceBankName)||"无".equals(ctInvoiceBankAcct)|| "".equals(gongyingshang.getCtBankAcct())||gongyingshang.getCtBankAcct()==null) {
1421
                     errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1430
                     errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1431
+                }
1422
             }
1432
             }
1423
         }
1433
         }
1424
 
1434
 
1708
             if (ctArr.length >= 3) ctInvoiceBankAcct = ctArr[2];
1718
             if (ctArr.length >= 3) ctInvoiceBankAcct = ctArr[2];
1709
             if (ctArr.length >= 4) ctContNm = ctArr[3];
1719
             if (ctArr.length >= 4) ctContNm = ctArr[3];
1710
             // 核心字段校验:客户名称不能为空
1720
             // 核心字段校验:客户名称不能为空
1721
+            if (ctArr.length<4){
1722
+                errorLogList.add("客户信息(名称+银行+账号+合同名)格式错误");
1723
+            }else if (ctName.isEmpty()) {
1724
+                errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1725
+            }
1711
             if (ctName.isEmpty()) {
1726
             if (ctName.isEmpty()) {
1712
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1727
                 errorLogList.add("客户名称解析失败,原始值:" + ctInfo);
1728
+            }else {
1729
+                Gongyingshang gongyingshang = gongyingshangMapper.selectGongyingshangByName(ctName);
1730
+                if (gongyingshang == null) {
1731
+                    errorLogList.add("供应商没有,需要先申请供应商; ");
1732
+                }
1733
+                else if ("无".equals(ctInvoiceBankName)||"无".equals(ctInvoiceBankAcct)|| "".equals(gongyingshang.getCtBankAcct())||gongyingshang.getCtBankAcct()==null) {
1734
+                    errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1735
+                }
1713
             }
1736
             }
1714
         }
1737
         }
1715
 
1738
 
1749
         String ut = trimField(dto.getUt());
1772
         String ut = trimField(dto.getUt());
1750
         if (ut.isEmpty()) {
1773
         if (ut.isEmpty()) {
1751
             errorLogList.add("单位为空");
1774
             errorLogList.add("单位为空");
1775
+        }else if (!Shujvzidian.danwei.contains(ut)){
1776
+            errorLogList.add("单位不在下拉框中");
1752
         }
1777
         }
1753
 
1778
 
1754
         String createBy = trimField(dto.getCreateBy());
1779
         String createBy = trimField(dto.getCreateBy());

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