Browse Source

发邮件

master
han\hanst 4 weeks ago
parent
commit
bb86d2a9f5
  1. 28
      src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java

28
src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java

@ -714,7 +714,7 @@ public class CoDelServiceImpl implements CoDelService {
// 保存修改前的托数据用于邮件通知
List<EcssCoDelPalletHeaderData> oldPalletHeaderList = null;
List<EcssDeclarationHeaderData> deletedDeclarations = null;
List<EcssDeclarationHeaderData> 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<EcssCoDelPalletHeaderData> oldPalletHeaderList = null;
List<EcssDeclarationHeaderData> deletedDeclarations = null;
List<EcssDeclarationHeaderData> 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<EcssCoDelPalletHeaderData> oldPalletHeaderList = null;
List<EcssDeclarationHeaderData> deletedDeclarations = null;
List<EcssDeclarationHeaderData> 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<Map> oldBoxList = new ArrayList<>();
List<EcssDeclarationHeaderData> deletedDeclarations = null;
List<EcssDeclarationHeaderData> 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<Map> oldBoxList = new ArrayList<>();
List<EcssDeclarationHeaderData> deletedDeclarations = null;
List<EcssDeclarationHeaderData> 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);
}
}

Loading…
Cancel
Save