|
|
|
@ -275,12 +275,15 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
} |
|
|
|
// 获得该行 |
|
|
|
XSSFRow row = sheet.getRow(j); |
|
|
|
if (row.getCell(18) != null && getStringCellValue(row, 18).equals("内销")) { |
|
|
|
if (row==null) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (row.getCell(13) == null || StringUtils.isBlank(getStringCellValue(row, 13))) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (row.getCell(18) != null && getStringCellValue(row, 18).equals("内销")) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (row.getCell(0) == null ) { |
|
|
|
throw new RuntimeException("第" + (j+1) + "行的Ready Date不能为空!"); |
|
|
|
} |
|
|
|
@ -500,6 +503,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
throw new RuntimeException("无效的数值格式: " + cell.getStringCellValue()); |
|
|
|
} |
|
|
|
default:return null; |
|
|
|
} |
|
|
|
default: |
|
|
|
throw new RuntimeException("不支持的单元格类型: " + cell.getCellType()); |
|
|
|
@ -934,7 +938,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
// 获得该行 |
|
|
|
XSSFRow row = sheet.getRow(j); |
|
|
|
if (row.getCell(1) != null && !inData.getCmcInvoice().equals(row.getCell(1).getStringCellValue())) { |
|
|
|
throw new RuntimeException("第" + j + "行的发票号与发货通知单的发票号不一致!"); |
|
|
|
continue; |
|
|
|
} |
|
|
|
if (row.getCell(6) == null) { |
|
|
|
throw new RuntimeException("第" + j + "行的PN不能为空!"); |
|
|
|
@ -2023,14 +2027,17 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
String plt = "CTN"; |
|
|
|
if (!palletHeaderDataList.isEmpty()) { |
|
|
|
plt = "PLT"; |
|
|
|
} else { |
|
|
|
totalPlt = totalQty; |
|
|
|
} |
|
|
|
template.addVar("total_plt", totalPlt+plt); |
|
|
|
template.addVar("total:", "total:"); |
|
|
|
template.addVar("madein", stringInput(data.getOrigin())); |
|
|
|
template.addVar("shippingNo", "shipping no"); |
|
|
|
template.addVar("sp_cmc_invoice", notifyHeader.getCmcInvoice()); |
|
|
|
template.addVar("pallet_weight_name", "pallet weight:"); |
|
|
|
template.addVar("pallet_weight", palletWeight.setScale(0, RoundingMode.HALF_UP)); |
|
|
|
// 如果palletWeight==0,不显示 |
|
|
|
template.addVar("pallet_weight_name", palletWeight.compareTo(BigDecimal.ZERO)==0?"":"pallet weight:"); |
|
|
|
template.addVar("pallet_weight", palletWeight.compareTo(BigDecimal.ZERO)==0?"":palletWeight.setScale(0, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
// 孟加拉需要的 |
|
|
|
if (data.getMaterial()!=null && data.getMaterial()) { |
|
|
|
|