|
|
|
@ -1522,6 +1522,7 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
|
|
|
|
// 创建对象 |
|
|
|
EcssCoDelPalletData excelData = new EcssCoDelPalletData(); |
|
|
|
excelData.setExcelRowNumber(j + 1); |
|
|
|
|
|
|
|
// 为对象赋值 |
|
|
|
excelData.setSite(inData.getSite()); |
|
|
|
@ -1532,7 +1533,7 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
excelData.setPn(getStringCellValue(row, 0)); |
|
|
|
|
|
|
|
// 读取SO(列B,索引1) |
|
|
|
//excelData.setPoNo(getStringCellValue(row, 1)); |
|
|
|
excelData.setSalesOrder(getStringCellValue(row, 1)); |
|
|
|
|
|
|
|
// 读取数量(列C,索引2) |
|
|
|
excelData.setQty(getNumericCellValueOrDefault(row, 2, "数量")); |
|
|
|
@ -1622,6 +1623,10 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
if (notifyDetail != null) { |
|
|
|
// 从发货通知单明细中获取PO |
|
|
|
palletData.setPoNo(notifyDetail.getCustomerPO()); |
|
|
|
// 判断Excel里的salesOrder和发货通知单上的salesOrder是否一致,如果不一致,抛出异常提示用户检查Excel数据 |
|
|
|
if (!palletData.getSalesOrder().equals(notifyDetail.getSalesOrder())) { |
|
|
|
throw new RuntimeException("导入失败:第" + palletData.getExcelRowNumber() + "行,Excel中的SO(" + palletData.getSalesOrder() + ")与发货通知单明细中的SO(" + notifyDetail.getSalesOrder() + ")不一致,请检查Excel数据!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|