|
|
@@ -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());
|