|
|
@@ -83,10 +83,10 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
83
|
83
|
List<String> currentContractErrors = new ArrayList<>();
|
|
84
|
84
|
boolean currentContractValid = true;
|
|
85
|
85
|
|
|
86
|
|
- if (StringUtils.isEmpty(currentSono)) {
|
|
87
|
|
- errors.add("主表(Sheet1) 销售合同号不能为空!");
|
|
88
|
|
- continue;
|
|
89
|
|
- }
|
|
|
86
|
+// if (StringUtils.isEmpty(currentSono)) {
|
|
|
87
|
+// errors.add("主表(Sheet1) 销售合同号不能为空!");
|
|
|
88
|
+// continue;
|
|
|
89
|
+// }
|
|
90
|
90
|
|
|
91
|
91
|
try {
|
|
92
|
92
|
// ================= 1. 校验并收集主表数据 =================
|
|
|
@@ -99,7 +99,7 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
99
|
99
|
|
|
100
|
100
|
// 基础校验
|
|
101
|
101
|
if (StringUtils.isEmpty(entity.getSono())) {
|
|
102
|
|
- currentContractErrors.add("主表(Sheet1)合同号: " + currentSono + " :销售合同号不能为空!");
|
|
|
102
|
+// currentContractErrors.add("主表(Sheet1)合同号: " + currentSono + " :销售合同号不能为空!");
|
|
103
|
103
|
currentContractValid = false;
|
|
104
|
104
|
}
|
|
105
|
105
|
if(!StringUtils.isEmpty(entity.getSono())){
|
|
|
@@ -219,10 +219,10 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
219
|
219
|
entity.setCtName(ctName);
|
|
220
|
220
|
}
|
|
221
|
221
|
|
|
222
|
|
- if (ctNameList == null || ctNameList.isEmpty()) {
|
|
223
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":客户名称有误,未匹配到相关信息!");
|
|
224
|
|
- currentContractValid = false;
|
|
225
|
|
- }
|
|
|
222
|
+// if (ctNameList == null || ctNameList.isEmpty()) {
|
|
|
223
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":客户名称有误,未匹配到相关信息!");
|
|
|
224
|
+// currentContractValid = false;
|
|
|
225
|
+// }
|
|
226
|
226
|
|
|
227
|
227
|
// if (ctNameList != null && !ctNameList.isEmpty() && !"2".equals(ctNameList.get(0).getPlaced())) {
|
|
228
|
228
|
// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":客户名称没有审批通过!");
|
|
|
@@ -295,16 +295,16 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
295
|
295
|
}
|
|
296
|
296
|
|
|
297
|
297
|
if ("出口销售".equals(entity.getBizType()) || "转口销售".equals(entity.getBizType())) {
|
|
298
|
|
- if (entity.getEstLoadDt() == null) {
|
|
299
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售时,最迟装运日期不能为空!");
|
|
300
|
|
- currentContractValid = false;
|
|
301
|
|
- }
|
|
|
298
|
+ if (entity.getEstLoadDt() == null) {
|
|
|
299
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售时,最迟装运日期不能为空!");
|
|
|
300
|
+// currentContractValid = false;
|
|
|
301
|
+ }
|
|
302
|
302
|
}
|
|
303
|
303
|
|
|
304
|
304
|
if (entity.getServiceType().contains("代理进口") || entity.getServiceType().contains("代理内贸")) {
|
|
305
|
305
|
if (Objects.isNull(entity.getOutstandingDay())) {
|
|
306
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":业务类型为代理进口或代理内贸时,预计客商占款天数不能为空!");
|
|
307
|
|
- currentContractValid = false;
|
|
|
306
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":业务类型为代理进口或代理内贸时,预计客商占款天数不能为空!");
|
|
|
307
|
+// currentContractValid = false;
|
|
308
|
308
|
}
|
|
309
|
309
|
}
|
|
310
|
310
|
|
|
|
@@ -368,6 +368,7 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
368
|
368
|
if (StringUtils.isEmpty(entity.getIfBidding())) {
|
|
369
|
369
|
entity.setIfBidding("是");
|
|
370
|
370
|
}
|
|
|
371
|
+ entity.setIsinitDate("是");
|
|
371
|
372
|
// if(StringUtils.isEmpty(entity.getIfBatch())){
|
|
372
|
373
|
// entity.setIfBatch("否");
|
|
373
|
374
|
// }
|
|
|
@@ -398,26 +399,26 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
398
|
399
|
.collect(Collectors.toList());
|
|
399
|
400
|
|
|
400
|
401
|
if (currentSalesDtlList != null && !currentSalesDtlList.isEmpty()) {
|
|
401
|
|
-// if (StringUtils.isEmpty(currentSalesDtlList.get(0).getLPort())) {
|
|
|
402
|
+ if (StringUtils.isEmpty(currentSalesDtlList.get(0).getLPort())) {
|
|
402
|
403
|
// currentContractErrors.add("主表(Sheet2)合同号:" + currentSono + "的合同产品 装运港不能为空!");
|
|
403
|
404
|
// currentContractValid = false;
|
|
404
|
|
-// }
|
|
405
|
|
-// if (StringUtils.isEmpty(currentSalesDtlList.get(0).getDPort())) {
|
|
|
405
|
+ }
|
|
|
406
|
+ if (StringUtils.isEmpty(currentSalesDtlList.get(0).getDPort())) {
|
|
406
|
407
|
// currentContractErrors.add("主表(Sheet2)合同号:" + currentSono + "的合同产品 目的港不能为空!");
|
|
407
|
408
|
// currentContractValid = false;
|
|
408
|
|
-// }
|
|
|
409
|
+ }
|
|
409
|
410
|
entity.setLPort(currentSalesDtlList.get(0).getLPort());
|
|
410
|
411
|
entity.setDPort(currentSalesDtlList.get(0).getDPort());
|
|
411
|
412
|
}
|
|
412
|
413
|
|
|
413
|
414
|
if (StringUtils.isEmpty(entity.getLPort())) {
|
|
414
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,装运港不能为空");
|
|
415
|
|
- currentContractValid = false;
|
|
|
415
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,装运港不能为空");
|
|
|
416
|
+// currentContractValid = false;
|
|
416
|
417
|
}
|
|
417
|
418
|
List<CustCtrl> lPortList = custCtrlMapper.selectLPortByLportName(entity.getLPort());
|
|
418
|
419
|
if (lPortList == null || lPortList.isEmpty()) {
|
|
419
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":装运港有误!");
|
|
420
|
|
- currentContractValid = false;
|
|
|
420
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":装运港有误!");
|
|
|
421
|
+// currentContractValid = false;
|
|
421
|
422
|
}
|
|
422
|
423
|
if (lPortList != null && !lPortList.isEmpty() && !StringUtils.isEmpty(lPortList.get(0).getFno())) {
|
|
423
|
424
|
entity.setLpno(lPortList.get(0).getFno());
|
|
|
@@ -431,13 +432,13 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
431
|
432
|
}
|
|
432
|
433
|
|
|
433
|
434
|
if (StringUtils.isEmpty(entity.getDPort())) {
|
|
434
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,目的港不能为空");
|
|
435
|
|
- currentContractValid = false;
|
|
|
435
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,目的港不能为空");
|
|
|
436
|
+// currentContractValid = false;
|
|
436
|
437
|
}
|
|
437
|
438
|
List<CustCtrl> dPortList = custCtrlMapper.selectLPortByLportName(entity.getDPort());
|
|
438
|
439
|
if (dPortList == null || dPortList.isEmpty()) {
|
|
439
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":目的港有误!");
|
|
440
|
|
- currentContractValid = false;
|
|
|
440
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":目的港有误!");
|
|
|
441
|
+// currentContractValid = false;
|
|
441
|
442
|
}
|
|
442
|
443
|
if (dPortList != null && !dPortList.isEmpty() && !StringUtils.isEmpty(dPortList.get(0).getFno())) {
|
|
443
|
444
|
entity.setDpno(dPortList.get(0).getFno());
|
|
|
@@ -487,8 +488,8 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
487
|
488
|
}
|
|
488
|
489
|
if ("出口销售".equals(entity.getBizType()) || "转口销售".equals(entity.getBizType())) {
|
|
489
|
490
|
if (StringUtils.isEmpty(entity.getTerms())) {
|
|
490
|
|
- currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售时,价格条款不能为空");
|
|
491
|
|
- currentContractValid = false;
|
|
|
491
|
+// currentContractErrors.add("主表(Sheet1) 合同号: " + currentSono + ":合同类型为出口销售或转口销售时,价格条款不能为空");
|
|
|
492
|
+// currentContractValid = false;
|
|
492
|
493
|
}
|
|
493
|
494
|
// if (!StringUtils.isEmpty(entity.getTerms())) {
|
|
494
|
495
|
// List<DataDic> termsList = dicMapper.selectDicByTerms(entity.getTerms());
|
|
|
@@ -520,7 +521,7 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
520
|
521
|
.filter(dto -> currentSono.equals(dto.getFno()))
|
|
521
|
522
|
.collect(Collectors.toList());
|
|
522
|
523
|
if(currentSalesDtlList==null||currentSalesDtlList.isEmpty()){
|
|
523
|
|
- currentContractErrors.add(" 合同号 " + currentSono + " 的销售产品信息不能为空!");
|
|
|
524
|
+// currentContractErrors.add(" 合同号 " + currentSono + " 的销售产品信息不能为空!");
|
|
524
|
525
|
|
|
525
|
526
|
}
|
|
526
|
527
|
|
|
|
@@ -555,21 +556,21 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
555
|
556
|
}
|
|
556
|
557
|
|
|
557
|
558
|
if (Objects.isNull(entity1.getInTaxRate())) {
|
|
558
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :增值税率不能为空");
|
|
559
|
|
- currentContractValid = false;
|
|
|
559
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :增值税率不能为空");
|
|
|
560
|
+// currentContractValid = false;
|
|
560
|
561
|
}
|
|
561
|
562
|
|
|
562
|
563
|
if (StringUtils.isEmpty(entity1.getUt())) {
|
|
563
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + "单位不能为空");
|
|
564
|
|
- currentContractValid = false;
|
|
|
564
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + "单位不能为空");
|
|
|
565
|
+// currentContractValid = false;
|
|
565
|
566
|
}
|
|
566
|
567
|
|
|
567
|
568
|
// 商品信息校验
|
|
568
|
569
|
if (!StringUtils.isEmpty(itemno) && bizProductType != null) {
|
|
569
|
570
|
List<CustCtrl> itemnoList = custCtrlMapper.selectByItemno(itemno, bizProductType);
|
|
570
|
571
|
if (itemnoList == null || itemnoList.isEmpty()) {
|
|
571
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :商品编号有误!");
|
|
572
|
|
- currentContractValid = false;
|
|
|
572
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :商品编号有误!");
|
|
|
573
|
+// currentContractValid = false;
|
|
573
|
574
|
}
|
|
574
|
575
|
|
|
575
|
576
|
if (itemnoList != null && !itemnoList.isEmpty()) {
|
|
|
@@ -622,26 +623,26 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
622
|
623
|
// 产品类型特定校验
|
|
623
|
624
|
if ("铁矿石".equals(bizProductType)) {
|
|
624
|
625
|
if (Objects.isNull(entity1.getIronCont())) {
|
|
625
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石时,含铁量%不能为空!");
|
|
626
|
|
- currentContractValid = false;
|
|
|
626
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石时,含铁量%不能为空!");
|
|
|
627
|
+// currentContractValid = false;
|
|
627
|
628
|
}
|
|
628
|
629
|
}
|
|
629
|
630
|
|
|
630
|
631
|
if ("铁矿石".equals(bizProductType) || "煤炭".equals(bizProductType)) {
|
|
631
|
632
|
if (Objects.isNull(entity1.getMoisture())) {
|
|
632
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石或煤炭时,水分%不能为空!");
|
|
633
|
|
- currentContractValid = false;
|
|
|
633
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石或煤炭时,水分%不能为空!");
|
|
|
634
|
+// currentContractValid = false;
|
|
634
|
635
|
}
|
|
635
|
636
|
|
|
636
|
637
|
if (StringUtils.isEmpty(entity1.getPriceMtd())) {
|
|
637
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石或煤炭时,计价方式不能为空!");
|
|
638
|
|
- currentContractValid = false;
|
|
|
638
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为铁矿石或煤炭时,计价方式不能为空!");
|
|
|
639
|
+// currentContractValid = false;
|
|
639
|
640
|
}
|
|
640
|
641
|
|
|
641
|
642
|
List<DataDic> priceMtdList = dicMapper.selectByPriceMtd(entity1.getPriceMtd());
|
|
642
|
643
|
if (priceMtdList == null || priceMtdList.isEmpty()) {
|
|
643
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :输入的计价方式在数据字典中不存在!");
|
|
644
|
|
- currentContractValid = false;
|
|
|
644
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :输入的计价方式在数据字典中不存在!");
|
|
|
645
|
+// currentContractValid = false;
|
|
645
|
646
|
}
|
|
646
|
647
|
|
|
647
|
648
|
if (!StringUtils.isEmpty(entity1.getResourceNo())) {
|
|
|
@@ -664,15 +665,15 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
664
|
665
|
}
|
|
665
|
666
|
}
|
|
666
|
667
|
|
|
667
|
|
- if (StringUtils.isEmpty(entity1.getFtype3())) {
|
|
668
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同产品类型为钢产品时,规格描述不能为空!");
|
|
669
|
|
- currentContractValid = false;
|
|
670
|
|
- }
|
|
|
668
|
+// if (StringUtils.isEmpty(entity1.getFtype3())) {
|
|
|
669
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同产品类型为钢产品时,规格描述不能为空!");
|
|
|
670
|
+// currentContractValid = false;
|
|
|
671
|
+// }
|
|
671
|
672
|
|
|
672
|
673
|
List<CustCtrl> ftype3List = custCtrlMapper.selectByFtype3(entity1.getFtype3());
|
|
673
|
674
|
if (ftype3List == null || ftype3List.isEmpty()) {
|
|
674
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :输入的规格描述有误!");
|
|
675
|
|
- currentContractValid = false;
|
|
|
675
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :输入的规格描述有误!");
|
|
|
676
|
+// currentContractValid = false;
|
|
676
|
677
|
}
|
|
677
|
678
|
|
|
678
|
679
|
if (ftype3List != null && !ftype3List.isEmpty() && !Objects.isNull(ftype3List.get(0).getFnum4())
|
|
|
@@ -684,14 +685,14 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
684
|
685
|
}
|
|
685
|
686
|
|
|
686
|
687
|
if (StringUtils.isEmpty(entity1.getFtype4())) {
|
|
687
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为钢产品时,计重方式不能为空!");
|
|
688
|
|
- currentContractValid = false;
|
|
|
688
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + " :合同产品类型为钢产品时,计重方式不能为空!");
|
|
|
689
|
+// currentContractValid = false;
|
|
689
|
690
|
}
|
|
690
|
691
|
|
|
691
|
692
|
List<DataDic> ftype4List = dicMapper.selectByFtyped(entity1.getFtype4());
|
|
692
|
693
|
if (ftype4List == null || ftype4List.isEmpty()) {
|
|
693
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":输入的计重方式在数据字典中不存在");
|
|
694
|
|
- currentContractValid = false;
|
|
|
694
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":输入的计重方式在数据字典中不存在");
|
|
|
695
|
+// currentContractValid = false;
|
|
695
|
696
|
}
|
|
696
|
697
|
|
|
697
|
698
|
// if (Objects.isNull(entity1.getQua())) {
|
|
|
@@ -706,13 +707,13 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
706
|
707
|
}
|
|
707
|
708
|
|
|
708
|
709
|
if (Objects.isNull(entity1.getQty())) {
|
|
709
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":数量不能为空!");
|
|
710
|
|
- currentContractValid = false;
|
|
|
710
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":数量不能为空!");
|
|
|
711
|
+// currentContractValid = false;
|
|
711
|
712
|
}
|
|
712
|
713
|
|
|
713
|
714
|
if (Objects.isNull(entity1.getSoPrice())) {
|
|
714
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":销售单价不能为空!");
|
|
715
|
|
- currentContractValid = false;
|
|
|
715
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":销售单价不能为空!");
|
|
|
716
|
+// currentContractValid = false;
|
|
716
|
717
|
}
|
|
717
|
718
|
|
|
718
|
719
|
// 钢材特定校验
|
|
|
@@ -751,12 +752,12 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
751
|
752
|
// currentContractValid = false;
|
|
752
|
753
|
// }
|
|
753
|
754
|
|
|
754
|
|
- if (StringUtils.isEmpty(entity1.getPono())) {
|
|
755
|
|
- entity1.setCurcyPo(entity.getCurcy());
|
|
756
|
|
- entity1.setPoprice(entity1.getSoPrice());
|
|
757
|
|
- entity1.setRatePo(entity.getRate());
|
|
758
|
|
- entity1.setPoamt(entity1.getSoAmt());
|
|
759
|
|
- }
|
|
|
755
|
+// if (StringUtils.isEmpty(entity1.getPono())) {
|
|
|
756
|
+// entity1.setCurcyPo(entity.getCurcy());
|
|
|
757
|
+// entity1.setPoprice(entity1.getSoPrice());
|
|
|
758
|
+// entity1.setRatePo(entity.getRate());
|
|
|
759
|
+// entity1.setPoamt(entity1.getSoAmt());
|
|
|
760
|
+// }
|
|
760
|
761
|
|
|
761
|
762
|
if (StringUtils.isEmpty(entity1.getItemno())) {
|
|
762
|
763
|
entity1.setCurcyPo(entity.getCurcy());
|
|
|
@@ -802,28 +803,28 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
802
|
803
|
// 港口信息校验
|
|
803
|
804
|
if ("出口销售".equals(bizType) || "转口销售".equals(bizType) || (serviceType != null && serviceType.contains("主业"))) {
|
|
804
|
805
|
if (StringUtils.isEmpty(entity1.getLPort())) {
|
|
805
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,装运港不能为空");
|
|
806
|
|
- currentContractValid = false;
|
|
|
806
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,装运港不能为空");
|
|
|
807
|
+// currentContractValid = false;
|
|
807
|
808
|
}
|
|
808
|
809
|
|
|
809
|
810
|
List<CustCtrl> lPortList = custCtrlMapper.selectLPortByLportName(entity1.getLPort());
|
|
810
|
811
|
if (lPortList == null || lPortList.isEmpty()) {
|
|
811
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":装运港有误!");
|
|
812
|
|
- currentContractValid = false;
|
|
|
812
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":装运港有误!");
|
|
|
813
|
+// currentContractValid = false;
|
|
813
|
814
|
}
|
|
814
|
815
|
if (lPortList != null && !lPortList.isEmpty() && !StringUtils.isEmpty(lPortList.get(0).getFno())) {
|
|
815
|
816
|
entity1.setLpno(lPortList.get(0).getFno());
|
|
816
|
817
|
}
|
|
817
|
818
|
|
|
818
|
819
|
if (StringUtils.isEmpty(entity1.getDPort())) {
|
|
819
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,目的港不能为空");
|
|
820
|
|
- currentContractValid = false;
|
|
|
820
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":合同类型为出口销售或转口销售或业务类型包含主业时,目的港不能为空");
|
|
|
821
|
+// currentContractValid = false;
|
|
821
|
822
|
}
|
|
822
|
823
|
|
|
823
|
824
|
List<CustCtrl> dPortList = custCtrlMapper.selectLPortByLportName(entity1.getDPort());
|
|
824
|
825
|
if (dPortList == null || dPortList.isEmpty()) {
|
|
825
|
|
- currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":目的港有误!");
|
|
826
|
|
- currentContractValid = false;
|
|
|
826
|
+// currentContractErrors.add("产品明细(Sheet2) 合同号 " + currentSono + ":目的港有误!");
|
|
|
827
|
+// currentContractValid = false;
|
|
827
|
828
|
}
|
|
828
|
829
|
if (dPortList != null && !dPortList.isEmpty() && !StringUtils.isEmpty(dPortList.get(0).getFno())) {
|
|
829
|
830
|
entity1.setDpno(dPortList.get(0).getFno());
|
|
|
@@ -854,8 +855,8 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
854
|
855
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
855
|
856
|
|
|
856
|
857
|
if (totalRatio.compareTo(new BigDecimal("100")) != 0) {
|
|
857
|
|
- currentContractErrors.add("收款计划(Sheet3) 合同号: " + currentSono + " 的收款比例总和必须为100%,当前总和为:" + totalRatio + "%");
|
|
858
|
|
- currentContractValid = false;
|
|
|
858
|
+// currentContractErrors.add("收款计划(Sheet3) 合同号: " + currentSono + " 的收款比例总和必须为100%,当前总和为:" + totalRatio + "%");
|
|
|
859
|
+// currentContractValid = false;
|
|
859
|
860
|
}
|
|
860
|
861
|
|
|
861
|
862
|
for (int i = 0; i < currentSalesCollectList.size(); i++) {
|
|
|
@@ -873,12 +874,12 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
873
|
874
|
currentContractValid = false;
|
|
874
|
875
|
}
|
|
875
|
876
|
|
|
876
|
|
- if ("预付款-发货后".equals(entity2.getPaymentType()) || "发票后结算款".equals(entity2.getPaymentType())) {
|
|
877
|
|
- if (Objects.isNull(entity2.getPayDays())) {
|
|
878
|
|
- currentContractErrors.add("收款计划(Sheet3) 合同号 :" + currentSono +" 的款项类别为'预付款-发货后'或'发票后结算款',账期不能为空!");
|
|
879
|
|
- currentContractValid = false;
|
|
880
|
|
- }
|
|
881
|
|
- }
|
|
|
877
|
+// if ("预付款-发货后".equals(entity2.getPaymentType()) || "发票后结算款".equals(entity2.getPaymentType())) {
|
|
|
878
|
+// if (Objects.isNull(entity2.getPayDays())) {
|
|
|
879
|
+// currentContractErrors.add("收款计划(Sheet3) 合同号 :" + currentSono +" 的款项类别为'预付款-发货后'或'发票后结算款',账期不能为空!");
|
|
|
880
|
+// currentContractValid = false;
|
|
|
881
|
+// }
|
|
|
882
|
+// }
|
|
882
|
883
|
|
|
883
|
884
|
if (StringUtils.isEmpty(entity2.getPayMode())) {
|
|
884
|
885
|
currentContractErrors.add("收款计划(Sheet3) 合同号 :" + currentSono +" 的收款方式不能为空!");
|
|
|
@@ -914,13 +915,13 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
914
|
915
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
915
|
916
|
|
|
916
|
917
|
if (totalAssessQtyRate.compareTo(new BigDecimal("100")) != 0) {
|
|
917
|
|
- currentContractErrors.add("责任中心(Sheet4) 合同号 " + currentSono + " 的利润考核占比总和必须为100%,当前总和为:" + totalAssessQtyRate + "%");
|
|
918
|
|
- currentContractValid = false;
|
|
|
918
|
+// currentContractErrors.add("责任中心(Sheet4) 合同号 " + currentSono + " 的利润考核占比总和必须为100%,当前总和为:" + totalAssessQtyRate + "%");
|
|
|
919
|
+// currentContractValid = false;
|
|
919
|
920
|
}
|
|
920
|
921
|
|
|
921
|
922
|
if (totalAssessRatio.compareTo(new BigDecimal("100")) != 0) {
|
|
922
|
|
- currentContractErrors.add("责任中心(Sheet4) 合同号 " + currentSono + " 的金额考核占比总和必须为100%,当前总和为:" + totalAssessRatio + "%");
|
|
923
|
|
- currentContractValid = false;
|
|
|
923
|
+// currentContractErrors.add("责任中心(Sheet4) 合同号 " + currentSono + " 的金额考核占比总和必须为100%,当前总和为:" + totalAssessRatio + "%");
|
|
|
924
|
+// currentContractValid = false;
|
|
924
|
925
|
}
|
|
925
|
926
|
|
|
926
|
927
|
for (int i = 0; i < currentRCenterDtlList.size(); i++) {
|
|
|
@@ -1078,10 +1079,10 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
1078
|
1079
|
currentContractValid = false;
|
|
1079
|
1080
|
}
|
|
1080
|
1081
|
|
|
1081
|
|
- if (Objects.isNull(entity4.getMinDays())) {
|
|
1082
|
|
- currentContractErrors.add("服务费率(Sheet5) 合同号:" + currentSono + " 起步天数不能为空!");
|
|
1083
|
|
- currentContractValid = false;
|
|
1084
|
|
- }
|
|
|
1082
|
+// if (Objects.isNull(entity4.getMinDays())) {
|
|
|
1083
|
+// currentContractErrors.add("服务费率(Sheet5) 合同号:" + currentSono + " 起步天数不能为空!");
|
|
|
1084
|
+// currentContractValid = false;
|
|
|
1085
|
+// }
|
|
1085
|
1086
|
|
|
1086
|
1087
|
entity4.setLine(i+1);
|
|
1087
|
1088
|
|
|
|
@@ -1122,7 +1123,7 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
1122
|
1123
|
currentMainEntity.setCreateTime(new Date());
|
|
1123
|
1124
|
currentMainEntity.setFmodalid(6L);
|
|
1124
|
1125
|
currentMainEntity.setPlaced("0");
|
|
1125
|
|
- currentMainEntity.setRemark("期初2");
|
|
|
1126
|
+ currentMainEntity.setRemark("期初");
|
|
1126
|
1127
|
|
|
1127
|
1128
|
salesContractMapper.insert(currentMainEntity);
|
|
1128
|
1129
|
Long mainId = currentMainEntity.getId();
|
|
|
@@ -1215,7 +1216,7 @@ public class SalesContractServiceImpl implements SalesContractService {
|
|
1215
|
1216
|
ContractErrorLogEntity log = new ContractErrorLogEntity();
|
|
1216
|
1217
|
log.setErrorLog(String.join("\n", errors));
|
|
1217
|
1218
|
log.setCreateDate(new Date());
|
|
1218
|
|
- contractErrorLogMapper.insert(log);
|
|
|
1219
|
+// contractErrorLogMapper.insert(log);
|
|
1219
|
1220
|
} catch (Exception logException) {
|
|
1220
|
1221
|
System.err.println("保存错误日志失败: " + logException.getMessage());
|
|
1221
|
1222
|
}
|