Przeglądaj źródła

1 修改供应商银行判断sql

11816 2 miesięcy temu
rodzic
commit
d5f663c4e1

+ 12
- 12
src/main/java/com/example/backend/pAndSExe/dto/InfJinxiangfapiaoExcelDTO.java Wyświetl plik

21
     private String taxInvType;
21
     private String taxInvType;
22
     @ExcelProperty(index = 5) // C列 - 发票号码
22
     @ExcelProperty(index = 5) // C列 - 发票号码
23
     private String taxInvNo;
23
     private String taxInvNo;
24
-    @ExcelProperty(index = 6) // D列 - 发票号
25
-    private String invNo;
26
-    @ExcelProperty(index = 7) // D列 - 物料编码,物料描述,品牌
24
+/*    @ExcelProperty(index = 6) // D列 - 发票号
25
+    private String invNo;*/
26
+    @ExcelProperty(index = 6) // D列 - 物料编码,物料描述,品牌
27
     private String itemnoSdescBrand;
27
     private String itemnoSdescBrand;
28
-    @ExcelProperty(index = 8) // E列 - 数量
28
+    @ExcelProperty(index = 7) // E列 - 数量
29
     private Double qty;
29
     private Double qty;
30
-    @ExcelProperty(index = 9)
30
+    @ExcelProperty(index = 8)
31
     private Double poPrice;
31
     private Double poPrice;
32
-    @ExcelProperty(index = 10) // F列 - 不含税单价
32
+    @ExcelProperty(index = 9) // F列 - 不含税单价
33
     private Double ntPoPrice;
33
     private Double ntPoPrice;
34
-    @ExcelProperty(index = 11) // G列 - 单位
34
+    @ExcelProperty(index = 10) // G列 - 单位
35
     private String ut;
35
     private String ut;
36
-    @ExcelProperty(index = 12)
36
+    @ExcelProperty(index = 11)
37
     private Double poamt;
37
     private Double poamt;
38
-    @ExcelProperty(index = 13) // H列 - 不含税金额
38
+    @ExcelProperty(index = 12) // H列 - 不含税金额
39
     private Double ntPoAmt;
39
     private Double ntPoAmt;
40
-    @ExcelProperty(index = 14) // I列 - 税率
40
+    @ExcelProperty(index = 13) // I列 - 税率
41
     private Double inTaxRate;
41
     private Double inTaxRate;
42
-    @ExcelProperty(index = 15) // J列 - 税额
42
+    @ExcelProperty(index = 14) // J列 - 税额
43
     private Double taxAmt;
43
     private Double taxAmt;
44
-    @ExcelProperty(index = 16) // K列 - 币别
44
+    @ExcelProperty(index = 15) // K列 - 币别
45
     private String curcypo;
45
     private String curcypo;
46
 }
46
 }

+ 1
- 0
src/main/java/com/example/backend/pAndSExe/mapper/GongyingshangMapper.java Wyświetl plik

29
             "        LEFT JOIN (\n" +
29
             "        LEFT JOIN (\n" +
30
             "        SELECT  rid , bankNm , bankAcct , ROW_NUMBER() OVER (PARTITION BY rid ORDER BY id) as row_num\n" +
30
             "        SELECT  rid , bankNm , bankAcct , ROW_NUMBER() OVER (PARTITION BY rid ORDER BY id) as row_num\n" +
31
             "        FROM SGGMIIP.custbank   WHERE NVL(del_flag, 0) != 1\n" +
31
             "        FROM SGGMIIP.custbank   WHERE NVL(del_flag, 0) != 1\n" +
32
+            "        and nvl(ctStatus,'')='已准入'\n" +
32
             "        ) b ON a.id = b.rid AND b.row_num = 1\n" +
33
             "        ) b ON a.id = b.rid AND b.row_num = 1\n" +
33
             "        left join SGGMIIP.custattn c on a.id = c.rid\n" +
34
             "        left join SGGMIIP.custattn c on a.id = c.rid\n" +
34
             "        where ifnull(a.del_flag, 0) != 1\n" +
35
             "        where ifnull(a.del_flag, 0) != 1\n" +

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

646
                     }else {
646
                     }else {
647
                         int i=0;
647
                         int i=0;
648
                         for (Gongyingshang gongyingshang : gongyingshangList) {
648
                         for (Gongyingshang gongyingshang : gongyingshangList) {
649
-                            if (gongyingshang.getCtBankAcct().equals(strings[2])&&gongyingshang.getCtBankName().equals(strings[1])) {
649
+                            if (gongyingshang.getCtBankAcct().equals(strings[2])) {
650
                                 i++;
650
                                 i++;
651
                             }
651
                             }
652
                         }
652
                         }
653
                         if (i==0) {
653
                         if (i==0) {
654
-                            errorLogList.add("银行名称/账号不存在/匹配");
654
+                            errorLogList.add("银行账号不存在/匹配/准入");
655
                         }
655
                         }
656
                     }
656
                     }
657
                 }
657
                 }
792
                     }else {
792
                     }else {
793
                         int i=0;
793
                         int i=0;
794
                         for (Gongyingshang gongyingshang : gongyingshangList) {
794
                         for (Gongyingshang gongyingshang : gongyingshangList) {
795
-                            if (gongyingshang.getCtBankAcct().equals(strings[2])&&gongyingshang.getCtBankName().equals(strings[1])) {
795
+                            if (gongyingshang.getCtBankAcct().equals(strings[2])) {
796
                                 i++;
796
                                 i++;
797
                             }
797
                             }
798
                         }
798
                         }
799
                         if (i==0) {
799
                         if (i==0) {
800
-                            errorLogList.add("银行名称/账号不存在/匹配");
800
+                            errorLogList.add("银行账号不存在/匹配/准入");
801
                         }
801
                         }
802
                     }
802
                     }
803
                 }
803
                 }
1067
         if (dto.getTaxInvNo() == null || dto.getTaxInvNo().isEmpty()) {
1067
         if (dto.getTaxInvNo() == null || dto.getTaxInvNo().isEmpty()) {
1068
             errorLogList.add("税票号码为空");
1068
             errorLogList.add("税票号码为空");
1069
         }
1069
         }
1070
-        if (dto.getInvNo()==null|| dto.getInvNo().isEmpty()) {
1070
+/*        if (dto.getInvNo()==null|| dto.getInvNo().isEmpty()) {
1071
             errorLogList.add("发票号码为空");
1071
             errorLogList.add("发票号码为空");
1072
-        }
1072
+        }*/
1073
 
1073
 
1074
         if (dto.getItemnoSdescBrand() != null&& !dto.getItemnoSdescBrand().isEmpty()) {
1074
         if (dto.getItemnoSdescBrand() != null&& !dto.getItemnoSdescBrand().isEmpty()) {
1075
             String[] itemFields = splitCombinedField(dto.getItemnoSdescBrand());
1075
             String[] itemFields = splitCombinedField(dto.getItemnoSdescBrand());
1136
             String createBy=infExe1Mapper.selectCreateByFromPono(dto.getPono());
1136
             String createBy=infExe1Mapper.selectCreateByFromPono(dto.getPono());
1137
             entity.setCreateBy(createBy);
1137
             entity.setCreateBy(createBy);
1138
         }
1138
         }
1139
-        entity.setInvNo(dto.getInvNo());
1139
+
1140
+        //entity.setInvNo(dto.getInvNo());
1140
 
1141
 
1141
         entity.setDataStatus(errorLog.isEmpty() ? "0" : "9"); // 0=有效,9=无效
1142
         entity.setDataStatus(errorLog.isEmpty() ? "0" : "9"); // 0=有效,9=无效
1142
         entity.setErrorLog(errorLog); // 错误日志
1143
         entity.setErrorLog(errorLog); // 错误日志
1459
                         }else {
1460
                         }else {
1460
                             int i=0;
1461
                             int i=0;
1461
                             for (Gongyingshang gongyingshang : gongyingshangList) {
1462
                             for (Gongyingshang gongyingshang : gongyingshangList) {
1462
-                                if (gongyingshang.getCtBankAcct().equals(ctInvoiceBankAcct)&&gongyingshang.getCtBankName().equals(ctInvoiceBankName)&&gongyingshang.getCtContNm().equals(ctContNm)) {
1463
+                                if (gongyingshang.getCtBankAcct().equals(ctInvoiceBankAcct)&&gongyingshang.getCtContNm().equals(ctContNm)) {
1463
                                     i++;
1464
                                     i++;
1464
                                 }
1465
                                 }
1465
                             }
1466
                             }
1466
                             if (i==0) {
1467
                             if (i==0) {
1467
-                                errorLogList.add("银行名称/账号/收票人不存在/匹配");
1468
+                                errorLogList.add("银行名称/账号/收票人不存在/匹配/准入");
1468
                             }
1469
                             }
1469
                         }
1470
                         }
1470
                     }
1471
                     }
1773
                         }else {
1774
                         }else {
1774
                             int i=0;
1775
                             int i=0;
1775
                             for (Gongyingshang gongyingshang : gongyingshangList) {
1776
                             for (Gongyingshang gongyingshang : gongyingshangList) {
1776
-                                if (gongyingshang.getCtBankAcct().equals(ctInvoiceBankAcct)&&gongyingshang.getCtBankName().equals(ctInvoiceBankName)&&gongyingshang.getCtContNm().equals(ctContNm)) {
1777
+                                if (gongyingshang.getCtBankAcct().equals(ctInvoiceBankAcct)&&gongyingshang.getCtContNm().equals(ctContNm)) {
1777
                                     i++;
1778
                                     i++;
1778
                                 }
1779
                                 }
1779
                             }
1780
                             }

Ładowanie…
Anuluj
Zapisz