From bb86d2a9f57cec92fb4632fcc44b37ced8b2d2c6 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Fri, 22 May 2026 14:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecss/service/impl/CoDelServiceImpl.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) 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 ba84d0ca..f34db763 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 @@ -714,7 +714,7 @@ public class CoDelServiceImpl implements CoDelService { // 保存修改前的托数据(用于邮件通知) List oldPalletHeaderList = null; - List deletedDeclarations = null; + List deletedDeclarations = new ArrayList<>(); if (isCustomsCleared) { log.info("托数修改:发货通知单{}状态为已报关,开始删除对应的报关单", inData.getDelNo()); @@ -738,7 +738,7 @@ public class CoDelServiceImpl implements CoDelService { // 删除找到的报关单 coDelMapper.deleteDeclarationHeader(declaration); coDelMapper.deleteDeclarationDetail(declaration); - + deletedDeclarations.add(declaration); // 将通知单状态更新为仓库已确认 notifyHeader.setNotifyStatus("仓库已确认"); coDelMapper.changeEcssDelStatus(notifyHeader); @@ -750,7 +750,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.updateCodelPalletHeaderPalletQty(inData); // 如果状态为已报关,发送邮件通知创建人 - if (isCustomsCleared && deletedDeclarations != null && !deletedDeclarations.isEmpty()) { + if (isCustomsCleared) { sendPalletQtyChangeNotificationEmail(notifyHeader, oldPalletHeaderList, deletedDeclarations, inData); } } @@ -766,7 +766,7 @@ public class CoDelServiceImpl implements CoDelService { // 保存删除前的托数据(用于邮件通知) List oldPalletHeaderList = null; - List deletedDeclarations = null; + List deletedDeclarations = new ArrayList<>(); if (isCustomsCleared) { log.info("托数删除:发货通知单{}状态为已报关,开始删除对应的报关单", inData.getDelNo()); @@ -790,7 +790,7 @@ public class CoDelServiceImpl implements CoDelService { // 删除找到的报关单 coDelMapper.deleteDeclarationHeader(declaration); coDelMapper.deleteDeclarationDetail(declaration); - + deletedDeclarations.add(declaration); // 将通知单状态更新为仓库已确认 notifyHeader.setNotifyStatus("仓库已确认"); coDelMapper.changeEcssDelStatus(notifyHeader); @@ -802,7 +802,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.deletePalletHeader(inData); // 如果状态为已报关,发送邮件通知创建人 - if (isCustomsCleared && deletedDeclarations != null && !deletedDeclarations.isEmpty()) { + if (isCustomsCleared) { sendPalletDeleteNotificationEmail(notifyHeader, oldPalletHeaderList, deletedDeclarations, inData); } } @@ -1510,7 +1510,7 @@ public class CoDelServiceImpl implements CoDelService { // 保存修改前的托数据(用于邮件通知) List oldPalletHeaderList = null; - List deletedDeclarations = null; + List deletedDeclarations = new ArrayList<>(); // 保存修改前的托数据 EcssCoDelNotifyHeaderData queryDatao = new EcssCoDelNotifyHeaderData(); queryDatao.setSite(inData.getSite()); @@ -1528,7 +1528,7 @@ public class CoDelServiceImpl implements CoDelService { // 删除找到的报关单 coDelMapper.deleteDeclarationHeader(declaration); coDelMapper.deleteDeclarationDetail(declaration); - + deletedDeclarations.add(declaration); // 将通知单状态更新为仓库已确认 notifyHeader.setNotifyStatus("仓库已确认"); coDelMapper.changeEcssDelStatus(notifyHeader); @@ -1564,7 +1564,7 @@ public class CoDelServiceImpl implements CoDelService { // 保存修改前的装箱数据(用于邮件通知) List oldBoxList = new ArrayList<>(); - List deletedDeclarations = null; + List deletedDeclarations = new ArrayList<>(); if (isCustomsCleared) { log.info("装箱数据修改:发货通知单{}状态为已报关,开始删除对应的报关单", delNo); @@ -1580,7 +1580,7 @@ public class CoDelServiceImpl implements CoDelService { // 删除找到的报关单 coDelMapper.deleteDeclarationHeader(declaration); coDelMapper.deleteDeclarationDetail(declaration); - + deletedDeclarations.add(declaration); // 将通知单状态更新为仓库已确认 notifyHeader.setNotifyStatus("仓库已确认"); coDelMapper.changeEcssDelStatus(notifyHeader); @@ -1592,7 +1592,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.updateBoxInfo(boxData); // 如果状态为已报关,发送邮件通知创建人 - if (isCustomsCleared && deletedDeclarations != null && !deletedDeclarations.isEmpty()) { + if (isCustomsCleared) { sendBoxChangeNotificationEmailWithDeclaration(notifyHeader, oldBoxList, deletedDeclarations, "修改", boxData); } } @@ -1733,7 +1733,7 @@ public class CoDelServiceImpl implements CoDelService { // 保存删除前的装箱数据(用于邮件通知) List oldBoxList = new ArrayList<>(); - List deletedDeclarations = null; + List deletedDeclarations = new ArrayList<>(); if (isCustomsCleared) { log.info("装箱数据删除:发货通知单{}状态为已报关,开始删除对应的报关单", delNo); @@ -1749,7 +1749,7 @@ public class CoDelServiceImpl implements CoDelService { // 删除找到的报关单 coDelMapper.deleteDeclarationHeader(declaration); coDelMapper.deleteDeclarationDetail(declaration); - + deletedDeclarations.add(declaration); // 将通知单状态更新为仓库已确认 notifyHeader.setNotifyStatus("仓库已确认"); coDelMapper.changeEcssDelStatus(notifyHeader); @@ -1793,7 +1793,7 @@ public class CoDelServiceImpl implements CoDelService { coDelMapper.deleteBoxInfo(boxData); // 如果状态为已报关,发送邮件通知创建人 - if (isCustomsCleared && deletedDeclarations != null && !deletedDeclarations.isEmpty()) { + if (isCustomsCleared && !deletedDeclarations.isEmpty()) { sendBoxChangeNotificationEmailWithDeclaration(notifyHeader, oldBoxList, deletedDeclarations, "删除", boxData); } }