diff --git a/src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java b/src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java index beb2d3a7..01196e4c 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java +++ b/src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java @@ -60,4 +60,5 @@ public class EcssDeclarationHeaderData extends EcssDeclarationHeader{ private String fpremark; private String xdremark; private String declarationWeight; + private String destination; } diff --git a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java index 27776a06..5db5e021 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java @@ -2479,6 +2479,7 @@ public class CoDelServiceImpl implements CoDelService { template.addVar("localShipAddress", notifyHeader.getLocalShipAddress()); template.addVar("ccusname", stringInput(notifyHeader.getOverseasShipper())); template.addVar("cDeliverAdd", stringInput(notifyHeader.getOverseasAddress())); + template.addVar("shippingMode", stringInput(notifyHeader.getShippingMode())); // 发货通知单明细 List nodifyDetailList = coDelMapper.exportEcssCoDelNotifyDetail(data); List rows = sqlSession.selectList("ecssMapper.getEcssCoDelNotifyDetailData", notifyHeader); @@ -2655,10 +2656,10 @@ public class CoDelServiceImpl implements CoDelService { public void saveOneClickPacking(EcssCoDelPalletHeaderData inData) { // 发货通知单 EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(inData.getSite(), inData.getDelNo()); - + // 检查发货通知单状态是否为已报关 boolean isCustomsCleared = "已报关".equals(notifyHeader.getNotifyStatus()); - + // 如果状态为已报关,保存计算前的装箱数据用于对比 List oldBoxList = new ArrayList<>(); List oldPalletDetailList = new ArrayList<>(); @@ -2671,7 +2672,7 @@ public class CoDelServiceImpl implements CoDelService { queryData.setDelNo(inData.getDelNo()); oldPalletDetailList = coDelMapper.searchEcssCoDelPalletDetailData(queryData); } - + // 先删除已存在的装箱数据 clearPalletData(notifyHeader); SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); @@ -2868,7 +2869,7 @@ public class CoDelServiceImpl implements CoDelService { //notifyHeader.setModifyFlag(false); coDelMapper.updateEcssDelHeaderForModify(notifyHeader); coDelMapper.updateEcssDelDetailForModify(notifyHeader); - + // 如果状态为已报关,发送邮件通知创建人 if (isCustomsCleared) { sendPackingChangeNotificationEmail(notifyHeader, oldBoxList, oldPalletDetailList, inData); @@ -3127,19 +3128,19 @@ public class CoDelServiceImpl implements CoDelService { String site = boxData.get("site").toString(); String delNo = boxData.get("delNo").toString(); EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(site, delNo); - + // 检查发货通知单状态是否为已报关 boolean isCustomsCleared = "已报关".equals(notifyHeader.getNotifyStatus()); - + // 如果状态为已报关,保存修改前的装箱数据用于对比 List oldBoxList = new ArrayList<>(); if (isCustomsCleared) { oldBoxList = coDelMapper.selectBoxList(notifyHeader); } - + // 执行修改操作 coDelMapper.updateBoxInfo(boxData); - + // 如果状态为已报关,发送邮件通知创建人 if (isCustomsCleared) { sendBoxChangeNotificationEmail(notifyHeader, oldBoxList, "修改", boxData); @@ -3153,16 +3154,16 @@ public class CoDelServiceImpl implements CoDelService { String site = boxData.get("site").toString(); String delNo = boxData.get("delNo").toString(); EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(site, delNo); - + // 检查发货通知单状态是否为已报关 boolean isCustomsCleared = "已报关".equals(notifyHeader.getNotifyStatus()); - + // 如果状态为已报关,保存删除前的装箱数据用于对比 List oldBoxList = new ArrayList<>(); if (isCustomsCleared) { oldBoxList = coDelMapper.selectBoxList(notifyHeader); } - + // 获取该箱下的全部箱明细 EcssCoDelPalletHeaderData inData = new EcssCoDelPalletHeaderData(); inData.setSite(boxData.get("site").toString()); @@ -3197,7 +3198,7 @@ public class CoDelServiceImpl implements CoDelService { boxData.get("buNo").toString(), boxData.get("delNo").toString(), Integer.parseInt(boxData.get("item_no").toString()), null); coDelMapper.deleteBoxInfo(boxData); - + // 如果状态为已报关,发送邮件通知创建人 if (isCustomsCleared) { sendBoxChangeNotificationEmail(notifyHeader, oldBoxList, "删除", boxData); @@ -3209,10 +3210,10 @@ public class CoDelServiceImpl implements CoDelService { public void updateDetailInfo(EcssCoDelPalletData detailData) { // 获取发货通知单信息 EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(detailData.getSite(), detailData.getDelNo()); - + // 检查发货通知单状态是否为已报关 boolean isCustomsCleared = "已报关".equals(notifyHeader.getNotifyStatus()); - + // 如果状态为已报关,保存修改前的装箱数据用于对比 List oldPalletDetailList = new ArrayList<>(); if (isCustomsCleared) { @@ -3222,7 +3223,7 @@ public class CoDelServiceImpl implements CoDelService { queryData.setDelNo(detailData.getDelNo()); oldPalletDetailList = coDelMapper.searchEcssCoDelPalletDetailData(queryData); } - + Integer notifyDetailItemNo = detailData.getNotifyDetailItemNo(); BigDecimal qty = detailData.getQty(); BigDecimal oldQty = detailData.getOldQty(); @@ -3247,7 +3248,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.updateEcssCoDelNotifyDetailSurplus(notifyDetail); } } - + // 如果状态为已报关,发送邮件通知创建人 if (isCustomsCleared) { sendDetailChangeNotificationEmail(notifyHeader, oldPalletDetailList, "修改", detailData); @@ -3259,10 +3260,10 @@ public class CoDelServiceImpl implements CoDelService { public void deleteDetailInfo(EcssCoDelPalletData detailData) { // 获取发货通知单信息 EcssCoDelNotifyHeaderData notifyHeader = coDelMapper.getEcssCoDelNotifyHeader(detailData.getSite(), detailData.getDelNo()); - + // 检查发货通知单状态是否为已报关 boolean isCustomsCleared = "已报关".equals(notifyHeader.getNotifyStatus()); - + // 如果状态为已报关,保存删除前的装箱数据用于对比 List oldPalletDetailList = new ArrayList<>(); if (isCustomsCleared) { @@ -3272,7 +3273,7 @@ public class CoDelServiceImpl implements CoDelService { queryData.setDelNo(detailData.getDelNo()); oldPalletDetailList = coDelMapper.searchEcssCoDelPalletDetailData(queryData); } - + // 删除明细前,先获取被删除明细的数量和notifyDetailItemNo Integer notifyDetailItemNo = detailData.getNotifyDetailItemNo(); BigDecimal deletedQty = detailData.getQty(); @@ -3303,7 +3304,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.updateEcssCoDelNotifyDetailSurplus(notifyDetail); } } - + // 如果状态为已报关,发送邮件通知创建人 if (isCustomsCleared) { sendDetailChangeNotificationEmail(notifyHeader, oldPalletDetailList, "删除", detailData); @@ -3442,7 +3443,7 @@ public class CoDelServiceImpl implements CoDelService { /** * 发送装箱变更通知邮件 - * + * * @param notifyHeader 发货通知单头数据 * @param oldBoxList 计算前的箱子列表 * @param oldPalletDetailList 计算前的装箱明细列表 @@ -3450,13 +3451,13 @@ public class CoDelServiceImpl implements CoDelService { * @author AI Assistant * @date 2024-10-09 */ - private void sendPackingChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, - List oldBoxList, + private void sendPackingChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, + List oldBoxList, List oldPalletDetailList, EcssCoDelPalletHeaderData inData) { try { log.info("开始发送装箱变更通知邮件,发货通知单号:{}", notifyHeader.getDelNo()); - + // 获取计算后的装箱数据 List newBoxList = coDelMapper.selectBoxList(notifyHeader); EcssCoDelPalletHeaderData queryData = new EcssCoDelPalletHeaderData(); @@ -3464,37 +3465,37 @@ public class CoDelServiceImpl implements CoDelService { queryData.setBuNo(inData.getBuNo()); queryData.setDelNo(inData.getDelNo()); List newPalletDetailList = coDelMapper.searchEcssCoDelPalletDetailData(queryData); - + // 生成对比邮件内容 - String emailContent = generatePackingComparisonEmailContent(notifyHeader, oldBoxList, newBoxList, + String emailContent = generatePackingComparisonEmailContent(notifyHeader, oldBoxList, newBoxList, oldPalletDetailList, newPalletDetailList); - + // 获取发货通知单创建人邮箱 String creatorEmail = coDelMapper.queryByUserName(notifyHeader.getCreateBy()).getEmail(); if (StringUtils.isBlank(creatorEmail)) { log.warn("发货通知单创建人{}没有配置邮箱地址", notifyHeader.getCreateBy()); return; } - + // 发送邮件 - String subject = String.format("发货通知单%s【发票:%s】一键装箱数据变更通知", + String subject = String.format("发货通知单%s【发票:%s】一键装箱数据变更通知", notifyHeader.getDelNo(), notifyHeader.getCmcInvoice()); String[] mailAddress = {creatorEmail}; - + sendMailUtil(subject, emailContent, mailAddress, notifyHeader); - + log.info("装箱变更通知邮件发送成功,收件人:{}", creatorEmail); - + } catch (Exception e) { - log.error("发送装箱变更通知邮件失败,发货通知单号:{}, 错误信息:{}", + log.error("发送装箱变更通知邮件失败,发货通知单号:{}, 错误信息:{}", notifyHeader.getDelNo(), e.getMessage(), e); // 邮件发送失败不影响主流程,只记录日志 } } - + /** * 生成装箱对比邮件内容 - * + * * @param notifyHeader 发货通知单头数据 * @param oldBoxList 计算前的箱子列表 * @param newBoxList 计算后的箱子列表 @@ -3510,7 +3511,7 @@ public class CoDelServiceImpl implements CoDelService { List oldPalletDetailList, List newPalletDetailList) { StringBuilder emailContent = new StringBuilder(); - + emailContent.append(""); emailContent.append(""); emailContent.append(""); @@ -3525,7 +3526,7 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append(""); emailContent.append(""); emailContent.append(""); - + // 邮件标题 emailContent.append("

发货通知单一键装箱数据变更通知

"); emailContent.append("

发货通知单号:").append(notifyHeader.getDelNo()).append("

"); @@ -3533,31 +3534,31 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append("

客户:").append(notifyHeader.getCustomerName()).append("

"); emailContent.append("

操作时间:").append(DateUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")).append("

"); emailContent.append("

操作类型:一键装箱重新计算

"); - + // 箱子信息对比 emailContent.append("
箱子信息对比
"); emailContent.append(generateBoxListComparisonTable(oldBoxList, newBoxList)); - + // 装箱明细对比 emailContent.append("
装箱明细对比
"); emailContent.append(generatePalletDetailComparisonTable(oldPalletDetailList, newPalletDetailList)); - + emailContent.append(""); emailContent.append(""); - + return emailContent.toString(); } - + /** * 生成箱子列表对比表格 - * + * * @param oldBoxList 计算前的箱子列表 * @param newBoxList 计算后的箱子列表 * @return HTML表格内容 */ private String generateBoxListComparisonTable(List oldBoxList, List newBoxList) { StringBuilder table = new StringBuilder(); - + table.append(""); table.append(""); table.append(""); @@ -3568,35 +3569,35 @@ public class CoDelServiceImpl implements CoDelService { table.append(""); table.append(""); table.append(""); - + // 创建映射以便对比 Map oldBoxMap = new HashMap<>(); for (Map box : oldBoxList) { Integer itemNo = (Integer) box.get("item_no"); oldBoxMap.put(itemNo, box); } - + Map newBoxMap = new HashMap<>(); for (Map box : newBoxList) { Integer itemNo = (Integer) box.get("item_no"); newBoxMap.put(itemNo, box); } - + // 获取所有序号 Set allItemNos = new HashSet<>(); allItemNos.addAll(oldBoxMap.keySet()); allItemNos.addAll(newBoxMap.keySet()); - + List sortedItemNos = new ArrayList<>(allItemNos); sortedItemNos.sort(Integer::compareTo); - + for (Integer itemNo : sortedItemNos) { Map oldBox = oldBoxMap.get(itemNo); Map newBox = newBoxMap.get(itemNo); - + table.append(""); table.append(""); - + // 毛重对比 BigDecimal oldGrossWeight = oldBox != null ? (BigDecimal) oldBox.get("gross_weight") : BigDecimal.ZERO; BigDecimal newGrossWeight = newBox != null ? (BigDecimal) newBox.get("gross_weight") : BigDecimal.ZERO; @@ -3606,7 +3607,7 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + // 净重对比 BigDecimal oldNetWeight = oldBox != null ? (BigDecimal) oldBox.get("net_weight") : BigDecimal.ZERO; BigDecimal newNetWeight = newBox != null ? (BigDecimal) newBox.get("net_weight") : BigDecimal.ZERO; @@ -3616,7 +3617,7 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + // 箱数对比 BigDecimal oldBoxQty = oldBox != null ? (BigDecimal) oldBox.get("box_qty") : BigDecimal.ZERO; BigDecimal newBoxQty = newBox != null ? (BigDecimal) newBox.get("box_qty") : BigDecimal.ZERO; @@ -3626,25 +3627,25 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + table.append(""); } - + table.append("
序号箱数(计算前)箱数(计算后)
").append(itemNo).append("").append(formatDecimal(newGrossWeight)).append("").append(formatDecimal(newNetWeight)).append("").append(formatDecimal(newBoxQty)).append("
"); return table.toString(); } - + /** * 生成装箱明细对比表格 - * + * * @param oldPalletDetailList 计算前的装箱明细列表 * @param newPalletDetailList 计算后的装箱明细列表 * @return HTML表格内容 */ - private String generatePalletDetailComparisonTable(List oldPalletDetailList, + private String generatePalletDetailComparisonTable(List oldPalletDetailList, List newPalletDetailList) { StringBuilder table = new StringBuilder(); - + table.append(""); table.append(""); table.append(""); @@ -3658,25 +3659,25 @@ public class CoDelServiceImpl implements CoDelService { table.append(""); table.append(""); table.append(""); - + // 创建映射以便对比 - 使用序号+项次作为唯一标识 Map oldDetailMap = new HashMap<>(); for (EcssCoDelPalletDetailData detail : oldPalletDetailList) { String key = detail.getSeqNo() + "_" + detail.getItemNo(); oldDetailMap.put(key, detail); } - + Map newDetailMap = new HashMap<>(); for (EcssCoDelPalletDetailData detail : newPalletDetailList) { String key = detail.getSeqNo() + "_" + detail.getItemNo(); newDetailMap.put(key, detail); } - + // 获取所有键值 Set allKeys = new HashSet<>(); allKeys.addAll(oldDetailMap.keySet()); allKeys.addAll(newDetailMap.keySet()); - + List sortedKeys = new ArrayList<>(allKeys); sortedKeys.sort((a, b) -> { String[] aParts = a.split("_"); @@ -3685,24 +3686,24 @@ public class CoDelServiceImpl implements CoDelService { if (seqCompare != 0) return seqCompare; return Integer.compare(Integer.parseInt(aParts[1]), Integer.parseInt(bParts[1])); }); - + for (String key : sortedKeys) { EcssCoDelPalletDetailData oldDetail = oldDetailMap.get(key); EcssCoDelPalletDetailData newDetail = newDetailMap.get(key); - + String[] keyParts = key.split("_"); Integer seqNo = Integer.parseInt(keyParts[0]); Integer itemNo = Integer.parseInt(keyParts[1]); - + table.append(""); table.append(""); table.append(""); - + // 物料号和PN(取新数据或旧数据) EcssCoDelPalletDetailData referenceDetail = newDetail != null ? newDetail : oldDetail; table.append(""); table.append(""); - + // 数量对比 BigDecimal oldQty = oldDetail != null ? oldDetail.getQty() : BigDecimal.ZERO; BigDecimal newQty = newDetail != null ? newDetail.getQty() : BigDecimal.ZERO; @@ -3712,7 +3713,7 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + // 箱数对比 BigDecimal oldBoxQty = oldDetail != null ? oldDetail.getBoxQty() : BigDecimal.ZERO; BigDecimal newBoxQty = newDetail != null ? newDetail.getBoxQty() : BigDecimal.ZERO; @@ -3722,7 +3723,7 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + // 卷数对比 BigDecimal oldRolls = oldDetail != null ? oldDetail.getRolls() : BigDecimal.ZERO; BigDecimal newRolls = newDetail != null ? newDetail.getRolls() : BigDecimal.ZERO; @@ -3732,17 +3733,17 @@ public class CoDelServiceImpl implements CoDelService { } else { table.append(""); } - + table.append(""); } - + table.append("
序号卷数(计算前)卷数(计算后)
").append(seqNo).append("").append(itemNo).append("").append(referenceDetail.getPartNo() != null ? referenceDetail.getPartNo() : "").append("").append(referenceDetail.getPn() != null ? referenceDetail.getPn() : "").append("").append(formatDecimal(newQty)).append("").append(formatDecimal(newBoxQty)).append("").append(formatDecimal(newRolls)).append("
"); return table.toString(); } - + /** * 格式化BigDecimal数值显示 - * + * * @param value 数值 * @return 格式化后的字符串 */ @@ -3752,10 +3753,10 @@ public class CoDelServiceImpl implements CoDelService { } return value.stripTrailingZeros().toPlainString(); } - + /** * 发送箱子变更通知邮件 - * + * * @param notifyHeader 发货通知单头数据 * @param oldBoxList 操作前的箱子列表 * @param operation 操作类型(修改/删除) @@ -3763,45 +3764,45 @@ public class CoDelServiceImpl implements CoDelService { * @author AI Assistant * @date 2024-10-09 */ - private void sendBoxChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, - List oldBoxList, + private void sendBoxChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, + List oldBoxList, String operation, Map boxData) { try { log.info("开始发送箱子{}通知邮件,发货通知单号:{}", operation, notifyHeader.getDelNo()); - + // 获取操作后的装箱数据 List newBoxList = coDelMapper.selectBoxList(notifyHeader); - + // 生成对比邮件内容 String emailContent = generateBoxChangeEmailContent(notifyHeader, oldBoxList, newBoxList, operation, boxData); - + // 获取发货通知单创建人邮箱 String creatorEmail = coDelMapper.queryByUserName(notifyHeader.getCreateBy()).getEmail(); if (StringUtils.isBlank(creatorEmail)) { log.warn("发货通知单创建人{}没有配置邮箱地址", notifyHeader.getCreateBy()); return; } - + // 发送邮件 - String subject = String.format("发货通知单%s【发票:%s】箱子%s通知", + String subject = String.format("发货通知单%s【发票:%s】箱子%s通知", notifyHeader.getDelNo(), notifyHeader.getCmcInvoice(), operation); String[] mailAddress = {creatorEmail}; - + sendMailUtil(subject, emailContent, mailAddress, notifyHeader); - + log.info("箱子{}通知邮件发送成功,收件人:{}", operation, creatorEmail); - + } catch (Exception e) { - log.error("发送箱子{}通知邮件失败,发货通知单号:{}, 错误信息:{}", + log.error("发送箱子{}通知邮件失败,发货通知单号:{}, 错误信息:{}", operation, notifyHeader.getDelNo(), e.getMessage(), e); // 邮件发送失败不影响主流程,只记录日志 } } - + /** * 发送箱明细变更通知邮件 - * + * * @param notifyHeader 发货通知单头数据 * @param oldPalletDetailList 操作前的装箱明细列表 * @param operation 操作类型(修改/删除) @@ -3809,49 +3810,49 @@ public class CoDelServiceImpl implements CoDelService { * @author AI Assistant * @date 2024-10-09 */ - private void sendDetailChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, - List oldPalletDetailList, + private void sendDetailChangeNotificationEmail(EcssCoDelNotifyHeaderData notifyHeader, + List oldPalletDetailList, String operation, EcssCoDelPalletData detailData) { try { log.info("开始发送箱明细{}通知邮件,发货通知单号:{}", operation, notifyHeader.getDelNo()); - + // 获取操作后的装箱数据 EcssCoDelPalletHeaderData queryData = new EcssCoDelPalletHeaderData(); queryData.setSite(detailData.getSite()); queryData.setBuNo(detailData.getBuNo()); queryData.setDelNo(detailData.getDelNo()); List newPalletDetailList = coDelMapper.searchEcssCoDelPalletDetailData(queryData); - + // 生成对比邮件内容 String emailContent = generateDetailChangeEmailContent(notifyHeader, oldPalletDetailList, newPalletDetailList, operation, detailData); - + // 获取发货通知单创建人邮箱 String creatorEmail = coDelMapper.queryByUserName(notifyHeader.getCreateBy()).getEmail(); if (StringUtils.isBlank(creatorEmail)) { log.warn("发货通知单创建人{}没有配置邮箱地址", notifyHeader.getCreateBy()); return; } - + // 发送邮件 - String subject = String.format("发货通知单%s【发票:%s】箱明细%s通知", + String subject = String.format("发货通知单%s【发票:%s】箱明细%s通知", notifyHeader.getDelNo(), notifyHeader.getCmcInvoice(), operation); String[] mailAddress = {creatorEmail}; - + sendMailUtil(subject, emailContent, mailAddress, notifyHeader); - + log.info("箱明细{}通知邮件发送成功,收件人:{}", operation, creatorEmail); - + } catch (Exception e) { - log.error("发送箱明细{}通知邮件失败,发货通知单号:{}, 错误信息:{}", + log.error("发送箱明细{}通知邮件失败,发货通知单号:{}, 错误信息:{}", operation, notifyHeader.getDelNo(), e.getMessage(), e); // 邮件发送失败不影响主流程,只记录日志 } } - + /** * 生成箱子变更邮件内容 - * + * * @param notifyHeader 发货通知单头数据 * @param oldBoxList 操作前的箱子列表 * @param newBoxList 操作后的箱子列表 @@ -3865,7 +3866,7 @@ public class CoDelServiceImpl implements CoDelService { String operation, Map boxData) { StringBuilder emailContent = new StringBuilder(); - + emailContent.append(""); emailContent.append(""); emailContent.append(""); @@ -3881,7 +3882,7 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append(""); emailContent.append(""); emailContent.append(""); - + // 邮件标题 emailContent.append("

发货通知单箱子").append(operation).append("通知

"); emailContent.append("

发货通知单号:").append(notifyHeader.getDelNo()).append("

"); @@ -3889,20 +3890,20 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append("

客户:").append(notifyHeader.getCustomerName()).append("

"); emailContent.append("

操作时间:").append(DateUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")).append("

"); emailContent.append("

操作类型:").append(operation).append("箱子(序号:").append(boxData.get("item_no")).append(")

"); - + // 箱子信息对比 emailContent.append("
箱子信息对比
"); emailContent.append(generateBoxListComparisonTable(oldBoxList, newBoxList)); - + emailContent.append(""); emailContent.append(""); - + return emailContent.toString(); } - + /** * 生成箱明细变更邮件内容 - * + * * @param notifyHeader 发货通知单头数据 * @param oldPalletDetailList 操作前的装箱明细列表 * @param newPalletDetailList 操作后的装箱明细列表 @@ -3916,7 +3917,7 @@ public class CoDelServiceImpl implements CoDelService { String operation, EcssCoDelPalletData detailData) { StringBuilder emailContent = new StringBuilder(); - + emailContent.append(""); emailContent.append(""); emailContent.append(""); @@ -3932,7 +3933,7 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append(""); emailContent.append(""); emailContent.append(""); - + // 邮件标题 emailContent.append("

发货通知单箱明细").append(operation).append("通知

"); emailContent.append("

发货通知单号:").append(notifyHeader.getDelNo()).append("

"); @@ -3940,14 +3941,14 @@ public class CoDelServiceImpl implements CoDelService { emailContent.append("

客户:").append(notifyHeader.getCustomerName()).append("

"); emailContent.append("

操作时间:").append(DateUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")).append("

"); emailContent.append("

操作类型:").append(operation).append("箱明细(序号:").append(detailData.getSeqNo()).append(",项次:").append(detailData.getItemNo()).append(")

"); - + // 装箱明细对比 emailContent.append("
装箱明细对比
"); emailContent.append(generatePalletDetailComparisonTable(oldPalletDetailList, newPalletDetailList)); - + emailContent.append(""); emailContent.append(""); - + return emailContent.toString(); } diff --git a/src/main/resources/mapper/ecss/CoDelMapper.xml b/src/main/resources/mapper/ecss/CoDelMapper.xml index 53a26a12..5f012c3f 100644 --- a/src/main/resources/mapper/ecss/CoDelMapper.xml +++ b/src/main/resources/mapper/ecss/CoDelMapper.xml @@ -591,7 +591,8 @@ create_by,create_date,update_by,update_date a.premium,a.other_price,a.special_relationship_comfirm,a.price_influence_confirm,a.royalty_payments_confirm, a.create_by,a.create_date,a.update_by,a.update_date,a.delNo,noHeader.bu_no, a.upc,a.so,a.origin,a.pallet_weight,a.material,a.hs_code,a.packaging,a.kgs,a.shipping_mark, - a.hsCodeDesc,a.contractFlag,a.hsCodeDescType,a.goodsLabel,a.boxChange,noHeader.customer_name as customName + a.hsCodeDesc,a.contractFlag,a.hsCodeDescType,a.goodsLabel,a.boxChange,noHeader.customer_name as customName, + noHeader.destination from ecss_declaration_header a left join ecss_CoDelNotifyHeader noHeader on a.site=noHeader.site and a.delNo=noHeader.delNo diff --git a/src/main/resources/templates/declaration-all-template.xlsx b/src/main/resources/templates/declaration-all-template.xlsx index 639bd959..5a429034 100644 Binary files a/src/main/resources/templates/declaration-all-template.xlsx and b/src/main/resources/templates/declaration-all-template.xlsx differ diff --git a/src/main/resources/templates/export-goods-template.xlsx b/src/main/resources/templates/export-goods-template.xlsx index 6f553e46..dad89818 100644 Binary files a/src/main/resources/templates/export-goods-template.xlsx and b/src/main/resources/templates/export-goods-template.xlsx differ