|
|
|
@ -168,7 +168,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
task.setStatus(getStringCellValue(row, 6)); |
|
|
|
task.setFamily(getStringCellValue(row, 7)); |
|
|
|
task.setPn(getStringCellValue(row, 8)); |
|
|
|
List<PartData> parts = coDelMapper.getPartNo(site, task.getPn()); |
|
|
|
List<PartData> parts = coDelMapper.getPartNo(site, task.getPn(),currentUser.getUsername()); |
|
|
|
if (parts.isEmpty()) { |
|
|
|
throw new RuntimeException("导入失败:物料:" + task.getPn() + "不存在!"); |
|
|
|
} |
|
|
|
@ -353,6 +353,18 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
coDelMapper.confirmEcssDel(data); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateEcssDel(EcssCoDelNotifyHeaderData data) { |
|
|
|
List<EcssCoDelNotifyHeaderData> checkHeader = coDelMapper.checkEcssCoDelNotifyHeaderByDelNo(data.getSite(), data.getDelNo()); |
|
|
|
if (checkHeader.size() == 0) { |
|
|
|
throw new RuntimeException("不存在该发货通知单请刷新界面"); |
|
|
|
} |
|
|
|
if (!"仓库已确认".equals(checkHeader.get(0).getNotifyStatus())) { |
|
|
|
throw new RuntimeException("发货通知单状态不为仓库已确认,请刷新页面。"); |
|
|
|
} |
|
|
|
coDelMapper.updateEcssDel(data); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void cancerConfirmEcssDel(EcssCoDelNotifyHeaderData data) { |
|
|
|
List<EcssCoDelNotifyHeaderData> checkHeader = coDelMapper.checkEcssCoDelNotifyHeaderByDelNo(data.getSite(), data.getDelNo()); |
|
|
|
@ -567,7 +579,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
excelData.setPalletRemark(getStringCellValue(row, 2)); |
|
|
|
excelData.setPoNo(getStringCellValue(row, 3)); |
|
|
|
excelData.setPn(getStringCellValue(row, 4)); |
|
|
|
List<PartData> parts = coDelMapper.getPartNo(excelData.getSite(), excelData.getPn()); |
|
|
|
List<PartData> parts = coDelMapper.getPartNo(excelData.getSite(), excelData.getPn(),currentUser.getUsername()); |
|
|
|
if (parts.isEmpty()) { |
|
|
|
throw new RuntimeException("导入失败:物料:" + excelData.getPn() + "不存在!"); |
|
|
|
} |
|
|
|
@ -853,7 +865,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
} |
|
|
|
for (int i = 0; i < rows.size(); i++) { |
|
|
|
if (rows.get(i).getHsCode() == null) { |
|
|
|
throw new RuntimeException("存在物料未维护HSCODE!"); |
|
|
|
throw new RuntimeException("存在物料未维护HS Code!"); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, EcssDeclarationDetailData> dataMap = rows.stream() |
|
|
|
@ -1124,8 +1136,9 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
template.setPriceRight(true); |
|
|
|
|
|
|
|
EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(data.getSite(), data.getDelNo()); |
|
|
|
template.addVar("localShipper", stringInput(ecHeader.getLocalShipper())); |
|
|
|
template.addVar("localShipAddress", stringInput(ecHeader.getLocalShipAddress())); |
|
|
|
List<Map> addrs = coDelMapper.getCustomerAdd(notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipper", notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipAddress", addrs.get(0).get("cDeliverAdd")); |
|
|
|
template.addVar("ccusname", stringInput(ecHeader.getOverseasShipper())); |
|
|
|
template.addVar("cDeliverAdd", stringInput(ecHeader.getOverseasAddress())); |
|
|
|
template.addVar("cmc_invoice", notifyHeader.getCmcInvoice()); |
|
|
|
@ -1188,8 +1201,9 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
template.setRangeStyle(true); |
|
|
|
// 发货通知单 |
|
|
|
EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(data.getSite(), data.getDelNo()); |
|
|
|
template.addVar("localShipper", stringInput(ecHeader.getLocalShipper())); |
|
|
|
template.addVar("localShipAddress", stringInput(ecHeader.getLocalShipAddress())); |
|
|
|
List<Map> addrs = coDelMapper.getCustomerAdd(notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipper", notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipAddress", addrs.get(0).get("cDeliverAdd")); |
|
|
|
template.addVar("ccusname", stringInput(ecHeader.getOverseasShipper())); |
|
|
|
template.addVar("cDeliverAdd", stringInput(ecHeader.getOverseasAddress())); |
|
|
|
template.addVar("dateStr", DateUtils.format(notifyHeader.getReadyDate(), "yyyy-MM-dd")); |
|
|
|
@ -1409,8 +1423,9 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
List<Map> detailList = coDelMapper.exportDeclarationDetail(data); |
|
|
|
// 发货通知单 |
|
|
|
EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(data.getSite(), data.getDelNo()); |
|
|
|
template.addVar("localShipper", stringInput(ecHeader.getLocalShipper())); |
|
|
|
template.addVar("localShipAddress", stringInput(ecHeader.getLocalShipAddress())); |
|
|
|
List<Map> addrs = coDelMapper.getCustomerAdd(notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipper", notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipAddress", addrs.get(0).get("cDeliverAdd")); |
|
|
|
template.addVar("ccusname", stringInput(ecHeader.getOverseasShipper())); |
|
|
|
template.addVar("cDeliverAdd", stringInput(ecHeader.getOverseasAddress())); |
|
|
|
// 装箱数据 |
|
|
|
@ -1558,7 +1573,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
List<PartData> partList = coDelMapper.getPartInfo(inData.getSite(),partNo); |
|
|
|
List<EcssPackageData> packageDataList = coDelMapper.getPackage(inData.getSite(),inData.getBuNo(),partList.get(0).getPackageNo()); |
|
|
|
if (packageDataList.isEmpty()) { |
|
|
|
throw new RuntimeException("物料["+partNo+"]未维护包装箱信息!"); |
|
|
|
throw new RuntimeException("物料["+partList.get(0).getSku()+"]未维护包装箱信息!"); |
|
|
|
} |
|
|
|
PartSubPropertiesValueData propertiesWeight = partNoAndItemNoMap.get(partNo + "$ROLLWEIGHT");//每卷重量 |
|
|
|
PartSubPropertiesValueData propertiesRollQty = partNoAndItemNoMap.get(partNo + "$ROLLQTY");//每卷数量 |
|
|
|
@ -1567,7 +1582,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
PartSubPropertiesValueData propertiesEUcs = partNoAndItemNoMap.get(partNo + "$EUPALLETCENGSHU");//eu每托层数 |
|
|
|
PartSubPropertiesValueData propertiesUScs = partNoAndItemNoMap.get(partNo + "$EUPALLETCENGSHU");//us每托层数 |
|
|
|
if (propertiesWeight==null||propertiesRollQty==null||propertiesBoxRolls==null||propertiesBoxWeight==null) { |
|
|
|
throw new RuntimeException("请先维护物料["+partNo+"]基本信息!"); |
|
|
|
throw new RuntimeException("请先维护物料["+partList.get(0).getSku()+"]基本信息!"); |
|
|
|
} |
|
|
|
EcssCoDelPalletHeaderData headerData = new EcssCoDelPalletHeaderData(); |
|
|
|
BeanUtils.copyProperties(inData, headerData); |
|
|
|
|