Kaynağa Gözat

修改大量

11816 1 ay önce
ebeveyn
işleme
6d5310ded3

+ 8
- 0
src/main/java/com/example/backend/pAndSExe/mapper/MdkcctrlMapper.java Dosyayı Görüntüle

@@ -43,4 +43,12 @@ public interface MdkcctrlMapper extends BaseMapper<Mdkcctrl> {
43 43
 
44 44
     @Select("select * from SGGMIIP.mdkcctrl where pono =#{fno} where del_flag != '1' ")
45 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 Dosyayı Görüntüle

@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Select;
10 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 14
     PurchaseOrder selectByPurchaseContract(String pono);
15 15
 
16 16
 

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

@@ -115,6 +115,13 @@ public class ShoukuanrenlingSettleServiceImpl implements ShoukuanrenlingSettleSe
115 115
                 breceiptdtl.setFisred("1");
116 116
                 breceiptdtl.setFisredDesc("已入账");
117 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 127
                 breceiptdtlMapper.insert(breceiptdtl);

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

@@ -68,7 +68,12 @@ public class StockServiceImpl implements StockService {
68 68
                 ctrl.setSoloId(exe1.getID());       // 对应inf_exe1.id
69 69
                 ctrl.setFno(exe1.getFno());          // 对应inf_exe1.fno
70 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 77
                 ctrl.setPono(exe1.getPfno());        // 对应inf_exe1.pfno(采购合同号)
73 78
                 ctrl.setSono(exe1.getSfno());        // 对应inf_exe1.sfno(销售合同号)
74 79
                 ctrl.setFmodalid(exe1.getFmodalid());// 对应inf_exe1.fmodalid

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

@@ -80,6 +80,7 @@ public class XiaoshoujiesuankaipiaoSettleServiceImpl implements Xiaoshoujiesuank
80 80
                 saleSettle.setCreateByName(s);
81 81
                 saleSettle.setCreateTime(new Date());
82 82
                 saleSettle.setUpdateTime(new Date());
83
+                saleSettle.setPlaced("2");
83 84
 
84 85
                 // 我方代码
85 86
                 saleSettle.setFours(salesOrder.getFours());

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

@@ -786,7 +786,7 @@ public class PsExeExcelUtil {
786 786
         }else if (!Shujvzidian.fukuanfangshi.contains(dto.getPayment().trim())) {
787 787
             errorLogList.add("付款方式不在下拉框中");
788 788
         }
789
-        if (dto.getCreateBy() == null || dto.getPayment().trim().isEmpty()) {
789
+        if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
790 790
             errorLogList.add("制单人为空");
791 791
         }
792 792
 
@@ -1409,16 +1409,26 @@ public class PsExeExcelUtil {
1409 1409
             // 拆分规则:按【|】分隔(优先),无则按【;】,最后按【,】/空格,最多拆4段
1410 1410
 
1411 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 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 1430
                     errorLogList.add("银行名称/账号为空,需要申请客商银行信息");
1431
+                }
1422 1432
             }
1423 1433
         }
1424 1434
 
@@ -1708,8 +1718,21 @@ public class PsExeExcelUtil {
1708 1718
             if (ctArr.length >= 3) ctInvoiceBankAcct = ctArr[2];
1709 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 1726
             if (ctName.isEmpty()) {
1712 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,6 +1772,8 @@ public class PsExeExcelUtil {
1749 1772
         String ut = trimField(dto.getUt());
1750 1773
         if (ut.isEmpty()) {
1751 1774
             errorLogList.add("单位为空");
1775
+        }else if (!Shujvzidian.danwei.contains(ut)){
1776
+            errorLogList.add("单位不在下拉框中");
1752 1777
         }
1753 1778
 
1754 1779
         String createBy = trimField(dto.getCreateBy());

Loading…
İptal
Kaydet