Procházet zdrojové kódy

执行模块费用付款仓库 进项发票添加通用字段

11816 před 2 dny
rodič
revize
7855c68bc1

+ 13
- 0
src/main/java/com/example/backend/pAndSExe/mapper/PaystockdtlMapper.java Zobrazit soubor

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.example.backend.pAndSExe.model.Paystockdtl;
5 5
 import org.apache.ibatis.annotations.Insert;
6 6
 import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.Select;
7 8
 
8 9
 /**
9 10
  * 货款付款子表Mapper
@@ -16,4 +17,16 @@ public interface PaystockdtlMapper extends BaseMapper<Paystockdtl> {
16 17
     int insertPaystockdtl(@Param("paystockdtl") Paystockdtl paystockdtl);
17 18
 
18 19
     void insertFeePaystockdtl(@Param("paystockdtl")Paystockdtl paystockdtl);
20
+
21
+    @Select("select feeCd\n" +
22
+            "from fytypedtl\n" +
23
+            "where ifnull(del_flag, 0) != 1\n" +
24
+            "and feeNm=#{feeNm} limit 1")
25
+    String selectFeeCdByFeeNm(String feeNm);
26
+
27
+    @Select("select allocationCategory\n" +
28
+            "from fytypedtl\n" +
29
+            "where ifnull(del_flag, 0) != 1\n" +
30
+            "and feeNm=#{feeNm} limit 1")
31
+    String selectAllocationCategoryByFeeNm(String feeNm);
19 32
 }

+ 10
- 1
src/main/java/com/example/backend/pAndSExe/service/impl/FeePayServiceImpl.java Zobrazit soubor

@@ -119,9 +119,18 @@ public class FeePayServiceImpl implements FeePayService {
119 119
                 dtl.setRid(ctrlId);            // 关联主表ID(和Exe3一致)
120 120
                 dtl.setAppAmt(fee.getAppAmt());// 对应inf_feiyongfukuan.appAmt(申请金额)
121 121
                 dtl.setFeeNm(fee.getFeeNm());  // 对应inf_feiyongfukuan.feeNm(费用名称)
122
+                dtl.setPono(fee.getPono());    // 对应inf_feiyongfukuan.pono(合同编号)
123
+                dtl.setSono(fee.getSono());
124
+                dtl.setFno(fee.getFno());
125
+                dtl.setPlaced("2");
126
+                String feeCd=paystockdtlMapper.selectFeeCdByFeeNm(fee.getFeeNm());
127
+                dtl.setFeeCd(feeCd);
128
+                String allocationCategory= paystockdtlMapper.selectAllocationCategoryByFeeNm(fee.getFeeNm());
129
+                dtl.setAllocationCategory(allocationCategory);
130
+                dtl.setOtasno(fee.getOtasno());
122 131
 
123 132
                 // 插入子表(复用PaystockdtlMapper,需先更新XML补充feeNm字段)
124
-                paystockdtlMapper.insertFeePaystockdtl(dtl);
133
+                paystockdtlMapper.insert(dtl);
125 134
 
126 135
                 successCount++;
127 136
             } catch (Exception e) {

+ 29
- 1
src/main/java/com/example/backend/pAndSExe/service/impl/JinxiangInvoiceSettleServiceImpl.java Zobrazit soubor

@@ -35,6 +35,9 @@ public class JinxiangInvoiceSettleServiceImpl implements JinxiangInvoiceSettleSe
35 35
     @Autowired
36 36
     private PurchasecontractMapper purchasecontractMapper;
37 37
 
38
+    @Autowired
39
+    private POrderDtlMapper pOrderDtlMapper;
40
+
38 41
     /**
39 42
      * 批量导入进项发票中间表数据到业务表
40 43
      */
@@ -76,6 +79,7 @@ public class JinxiangInvoiceSettleServiceImpl implements JinxiangInvoiceSettleSe
76 79
                 settle.setCreateByName(s);
77 80
                 settle.setCreateTime(new Date());
78 81
                 settle.setUpdateTime(new Date());
82
+                settle.setPlaced("2");
79 83
                 if (purchasecontract.getBiztype().equals("内贸采购")) {
80 84
                     settle.setFmodalid(13L);
81 85
 
@@ -182,8 +186,32 @@ public class JinxiangInvoiceSettleServiceImpl implements JinxiangInvoiceSettleSe
182 186
                 dtl.setPono(purchasecontract.getFno());
183 187
                 dtl.setPoOrderNo(purchasecontract.getFno());
184 188
 
189
+                POrderDtl pOrderDtl = pOrderDtlMapper.selectByPurchaseContractId(purchasecontract.getId());
190
+
191
+
192
+
185 193
                 if (purchasecontract.getBiztype().equals("内贸采购")) {
186
-                    List<Mdkcctrl> mdkcctrlList=mdkcctrlMapper.selectByPono(purchasecontract.getFno());
194
+                    dtl.setTaxInvNo(inf.getTaxInvNo()); // 映射中间表发票号
195
+                    dtl.setSoid(pOrderDtl.getSoid());
196
+                    dtl.setBizType(purchaseOrder.getBizType());
197
+                    dtl.setBizProductType(purchaseOrder.getBizProductType());
198
+                }else {
199
+                    dtl.setEdesc(pOrderDtl.getEdesc());
200
+                    dtl.setMoisture(pOrderDtl.getMoisture());
201
+                    dtl.setHsCode(pOrderDtl.getHsCode());
202
+                    dtl.setHsNameCn(pOrderDtl.getHsNameCn());
203
+                    dtl.setHsNameEn(pOrderDtl.getHsNameEn());
204
+                    dtl.setDutyRate(pOrderDtl.getDutyRate());
205
+                    dtl.setReTaxRate(pOrderDtl.getReTaxRate());
206
+                    dtl.setOutTaxRate(pOrderDtl.getOutTaxRate());
207
+                    dtl.setPriceMtd(pOrderDtl.getPriceMtd());
208
+                    dtl.setIronCont(pOrderDtl.getIronCont());
209
+                    dtl.setRatepo(pOrderDtl.getRatepo());
210
+                    dtl.setRateusdpo(pOrderDtl.getRateusdpo());
211
+                    dtl.setCnypoamt(pOrderDtl.getCnypoamt());
212
+                    dtl.setUsdpoamt(pOrderDtl.getUsdpoamt());
213
+                    dtl.setAcctSet(pOrderDtl.getAcctSet());
214
+                    dtl.setPoid(pOrderDtl.getPoid());
187 215
                 }
188 216
 
189 217
 

+ 1
- 0
src/main/java/com/example/backend/pAndSExe/service/impl/StockServiceImpl.java Zobrazit soubor

@@ -74,6 +74,7 @@ public class StockServiceImpl implements StockService {
74 74
                 ctrl.setFmodalid(exe1.getFmodalid());// 对应inf_exe1.fmodalid
75 75
                 ctrl.setCreateBy(exe1.getCreateBy());
76 76
                 ctrl.setQiChu("1");
77
+                ctrl.setPlaced("2");
77 78
                 String userName = mdkcctrlMapper.selectCreateByName(ctrl.getCreateBy());
78 79
                 if (userName!= null) {
79 80
                     ctrl.setCreateByName(userName);

+ 42
- 13
src/main/java/com/example/backend/pAndSExe/util/PsExeExcelUtil.java Zobrazit soubor

@@ -252,16 +252,16 @@ public class PsExeExcelUtil {
252 252
             if (s.contains("-")) {
253 253
 
254 254
                 String[] split = s.split("-");
255
-                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
255
+                /*String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
256 256
                 if(!muban.contains(split[1])){
257 257
                     errorLogList.add("仓库名称不正确,不在模板中");
258
-                }
258
+                }*/
259 259
             }else
260 260
             {
261
-                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
261
+                /*String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
262 262
                 if(!muban.contains(s)){
263 263
                     errorLogList.add("仓库名称不正确,不在模板中");
264
-                }
264
+                }*/
265 265
             }
266 266
         }
267 267
 
@@ -273,7 +273,7 @@ public class PsExeExcelUtil {
273 273
         }
274 274
 
275 275
         else if (!Shujvzidian.danwei.contains(dto.getUt().trim())){
276
-            errorLogList.add("单位不在字典中");
276
+            errorLogList.add("单位不在下拉框中");
277 277
         }
278 278
         String bizProductType=infExe1Mapper.selectBizProductTypeByPfno(dto.getPfno());
279 279
         if (bizProductType == null || bizProductType.trim().isEmpty()) {
@@ -284,6 +284,8 @@ public class PsExeExcelUtil {
284 284
             }
285 285
             if (dto.getFtype4() == null || dto.getFtype4().trim().isEmpty()) {
286 286
                 errorLogList.add("钢产品计重方式为空");
287
+            }else if (!Shujvzidian.jizhongfangshi.contains(dto.getFtype4().trim())){
288
+                errorLogList.add("钢产品计重方式不在下拉框中");
287 289
             }
288 290
             /*if (dto.getSMRNo()==null || dto.getSMRNo().trim().isEmpty()) {
289 291
                 errorLogList.add("钢产品钢厂资源号为空");
@@ -297,6 +299,8 @@ public class PsExeExcelUtil {
297 299
             }
298 300
             if (dto.getPriceMtd() == null) {
299 301
                 errorLogList.add("铁矿石计价方式为空");
302
+            }else if (!Shujvzidian.jijiafangshi.contains(dto.getPriceMtd().trim())){
303
+                errorLogList.add("铁矿石计价方式不在下拉框中");
300 304
             }
301 305
         }else if (bizProductType.equals("煤炭")){
302 306
             if (dto.getMoisture() == null) {
@@ -304,6 +308,8 @@ public class PsExeExcelUtil {
304 308
             }
305 309
             if (dto.getPriceMtd() == null) {
306 310
                 errorLogList.add("煤炭计价方式为空");
311
+            }else if (!Shujvzidian.jijiafangshi.contains(dto.getPriceMtd().trim())){
312
+                errorLogList.add("煤炭计价方式不在下拉框中");
307 313
             }
308 314
         }
309 315
         if (dto.getPoprice()==null){
@@ -443,23 +449,23 @@ public class PsExeExcelUtil {
443 449
             if (s.contains("-")) {
444 450
 
445 451
                 String[] split = s.split("-");
446
-                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
452
+                /*String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
447 453
                 if(!muban.contains(split[1])){
448 454
                     errorLogList.add("仓库名称不正确,不在模板中");
449
-                }
455
+                }*/
450 456
             }else
451 457
             {
452
-                String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
458
+                /*String muban="岚山港岚桥港日照港连云港港天津港曹妃甸港青岛港董家口港烟台港龙口港黄岛港鲅鱼圈港鲁中库济钢金属库智慧库春熙库德汇库中瑞库石禾库广盈库明晋库阳森库";
453 459
                 if(!muban.contains(s)){
454 460
                     errorLogList.add("仓库名称不正确,不在模板中");
455
-                }
461
+                }*/
456 462
             }
457 463
         }
458 464
         if (dto.getUt() == null || dto.getUt().trim().isEmpty()) {
459 465
             errorLogList.add("单位为空");
460 466
         }
461 467
         else if (!Shujvzidian.danwei.contains(dto.getUt().trim())){
462
-            errorLogList.add("单位不在字典中");
468
+            errorLogList.add("单位不在下拉框中");
463 469
         }
464 470
         if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
465 471
             errorLogList.add("制单人为空");
@@ -473,6 +479,8 @@ public class PsExeExcelUtil {
473 479
             }
474 480
             if (dto.getFtype4() == null || dto.getFtype4().trim().isEmpty()) {
475 481
                 errorLogList.add("钢产品计重方式为空");
482
+            }else if (!Shujvzidian.jizhongfangshi.contains(dto.getFtype4().trim())){
483
+                errorLogList.add("钢产品计重方式不在下拉框中");
476 484
             }
477 485
             /*if (dto.getSMRNo()==null || dto.getSMRNo().trim().isEmpty()) {
478 486
                 errorLogList.add("钢产品钢厂资源号为空");
@@ -486,6 +494,8 @@ public class PsExeExcelUtil {
486 494
             }
487 495
             if (dto.getPriceMtd() == null) {
488 496
                 errorLogList.add("铁矿石计价方式为空");
497
+            }else if (!Shujvzidian.jijiafangshi.contains(dto.getPriceMtd().trim())){
498
+                errorLogList.add("铁矿石计价方式不在下拉框中");
489 499
             }
490 500
         }else if (bizProductType.equals("煤炭")){
491 501
             if (dto.getMoisture() == null) {
@@ -493,6 +503,8 @@ public class PsExeExcelUtil {
493 503
             }
494 504
             if (dto.getPriceMtd() == null) {
495 505
                 errorLogList.add("煤炭计价方式为空");
506
+            }else if (!Shujvzidian.jijiafangshi.contains(dto.getPriceMtd().trim())){
507
+                errorLogList.add("煤炭计价方式不在下拉框中");
496 508
             }
497 509
         }
498 510
         if (dto.getSoprice()==null){
@@ -629,14 +641,19 @@ public class PsExeExcelUtil {
629 641
 
630 642
         }
631 643
 
644
+
632 645
         // 付款类型:非空校验
633 646
         if (dto.getPayType() == null || dto.getPayType().trim().isEmpty()) {
634 647
             errorLogList.add("付款类型为空");
648
+        }else if (!Shujvzidian.fukuanleixing.contains(dto.getPayType().trim())){
649
+            errorLogList.add("付款类型不在下拉框中");
635 650
         }
636 651
 
637 652
         // 付款方式:非空校验
638 653
         if (dto.getPayment() == null || dto.getPayment().trim().isEmpty()) {
639 654
             errorLogList.add("付款方式为空");
655
+        }else if (!Shujvzidian.fukuanfangshi.contains(dto.getPayment().trim())){
656
+            errorLogList.add("付款方式不在下拉框中");
640 657
         }
641 658
 
642 659
         // 申请金额:非空校验(Double类型判断null)
@@ -647,6 +664,8 @@ public class PsExeExcelUtil {
647 664
         // 币别:非空校验
648 665
         if (dto.getCurcy() == null || dto.getCurcy().trim().isEmpty()) {
649 666
             errorLogList.add("币别为空");
667
+        }else if (!Shujvzidian.bibie.contains(dto.getCurcy().trim())){
668
+            errorLogList.add("币别不在下拉框中");
650 669
         }
651 670
         if (dto.getCreateBy() == null || dto.getCreateBy().trim().isEmpty()) {
652 671
             errorLogList.add("制单人为空");
@@ -713,6 +732,8 @@ public class PsExeExcelUtil {
713 732
         // 业务类别:非空校验
714 733
         if (dto.getExpNode() == null || dto.getExpNode().trim().isEmpty()) {
715 734
             errorLogList.add("业务类别为空");
735
+        }else if (!Shujvzidian.yewuleibie.contains(dto.getExpNode().trim())) {
736
+            errorLogList.add("业务类别不在下拉框中");
716 737
         }
717 738
 
718 739
         // 合同号规则:采购/销售/其他合同号至少一个非空;采购/销售合同号非空时校验存在性
@@ -762,6 +783,8 @@ public class PsExeExcelUtil {
762 783
         // 付款方式:非空校验(和Exe3一致)
763 784
         if (dto.getPayment() == null || dto.getPayment().trim().isEmpty()) {
764 785
             errorLogList.add("付款方式为空");
786
+        }else if (!Shujvzidian.fukuanfangshi.contains(dto.getPayment().trim())) {
787
+            errorLogList.add("付款方式不在下拉框中");
765 788
         }
766 789
         if (dto.getCreateBy() == null || dto.getPayment().trim().isEmpty()) {
767 790
             errorLogList.add("制单人为空");
@@ -770,6 +793,8 @@ public class PsExeExcelUtil {
770 793
         // 费用名称:非空校验(Exe4特有字段)
771 794
         if (dto.getFeeNm() == null || dto.getFeeNm().trim().isEmpty()) {
772 795
             errorLogList.add("费用名称为空");
796
+        }else if (!Shujvzidian.feiyongmingcheng.contains(dto.getFeeNm().trim())) {
797
+            errorLogList.add("费用名称不在下拉框中");
773 798
         }
774 799
 
775 800
         // 申请金额:非空校验(Double类型,和Exe3一致)
@@ -780,6 +805,8 @@ public class PsExeExcelUtil {
780 805
         // 币别:非空校验(和Exe3一致)
781 806
         if (dto.getCurcy() == null || dto.getCurcy().trim().isEmpty()) {
782 807
             errorLogList.add("币别为空");
808
+        }else if (!Shujvzidian.bibie.contains(dto.getCurcy().trim())) {
809
+            errorLogList.add("币别不在下拉框中");
783 810
         }
784 811
 
785 812
         // 3. 构建errorLog字符串(多错误用分号分隔,和Exe3/Sheet1一致)
@@ -876,6 +903,8 @@ public class PsExeExcelUtil {
876 903
         }
877 904
         if (dto.getExpNode() == null || dto.getExpNode().trim().isEmpty()) {
878 905
             errorLogList.add("业务类别为空");
906
+        }else if (!Shujvzidian.yewuleibie.contains(dto.getExpNode().trim())) {
907
+            errorLogList.add("业务类别不在下拉框中");
879 908
         }
880 909
         if (dto.getCateName() == null || dto.getCateName().trim().isEmpty()) {
881 910
             errorLogList.add("类别名称为空");
@@ -884,7 +913,7 @@ public class PsExeExcelUtil {
884 913
             errorLogList.add("单位为空");
885 914
         }
886 915
         else if (!Shujvzidian.danwei.contains(dto.getUt().trim())){
887
-            errorLogList.add("单位不在字典中");
916
+            errorLogList.add("单位不在下拉框中");
888 917
         }
889 918
         if (dto.getFeeNm() == null || dto.getFeeNm().trim().isEmpty()) {
890 919
             errorLogList.add("费用名称为空");
@@ -1032,7 +1061,7 @@ public class PsExeExcelUtil {
1032 1061
             errorLogList.add("单位为空");
1033 1062
         }
1034 1063
         else if (!Shujvzidian.danwei.contains(dto.getUt().trim())){
1035
-            errorLogList.add("单位不在字典中");
1064
+            errorLogList.add("单位不在下拉框中");
1036 1065
         }
1037 1066
         if (dto.getCurcypo() == null || dto.getCurcypo().trim().isEmpty()) {
1038 1067
             errorLogList.add("币别为空");
@@ -1433,7 +1462,7 @@ public class PsExeExcelUtil {
1433 1462
         if (ut.isEmpty()) {
1434 1463
             errorLogList.add("单位为空");
1435 1464
         }else if (!Shujvzidian.danwei.contains(ut)){
1436
-            errorLogList.add("单位不在字典中");
1465
+            errorLogList.add("单位不在下拉框中");
1437 1466
         }
1438 1467
 
1439 1468
 

+ 1
- 1
src/main/java/com/example/backend/pAndSExe/util/Shujvzidian.java Zobrazit soubor

@@ -5,7 +5,7 @@ public class Shujvzidian {
5 5
     public static String fapiaozhonglei="增值税专用发票增值税普通发票全电增值税普通发票全电增值税专用发票其他发票全电增值税专用发票其他发票海关增值税完税证明海关关税完税证明";
6 6
     public static String jizhongfangshi="理重计算实重计算净重计算";
7 7
     public static String jijiafangshi="干吨计算湿吨计算";
8
-    public static String yewuleibie="采购类销售类";
8
+    public static String yewuleibie="采购类销售类加工类";
9 9
     public static String fukuanleixing="预付款发货前预付款发货后发票后结算";
10 10
     public static String fukuanfangshi="电汇(海外TT)手工网银(国内TT)直联网银LC新票据-电子银票新票据-电子商票新票据-电子银票背书新票据-电子商票背书抹帐通宝开具通宝背书收取通宝";
11 11
     public static String feiyongmingcheng="装卸费库厂使用费仓储费港口费超期堆存费检验费理货费货代费代理费保险费运输费加工费开证费用境外开证打包费汇兑损益银行手续费利息费用海关税费其他税费海关关税";

Loading…
Zrušit
Uložit