From 3478123c480d950775b716f5df81a844f1013358 Mon Sep 17 00:00:00 2001 From: xs Date: Thu, 19 Dec 2024 15:18:56 +0800 Subject: [PATCH] =?UTF-8?q?4.0.3=20system=EF=BC=9A=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=AE=8C=E5=96=84=20jindie=EF=BC=9Ainsert=20?= =?UTF-8?q?syspointrouter=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/file/controller/SysFileController.java | 2 ++ .../impl/KingdeeErpSyncServiceImpl.java | 5 +-- .../impl/SysPointRouterServiceImpl.java | 34 ++++++++++++++----- .../views/ems/base/exception/rule/index.vue | 24 ++++++------- .../views/mes/productplan/editProductPlan.vue | 4 +-- 5 files changed, 45 insertions(+), 24 deletions(-) diff --git a/hw-modules/hw-file/src/main/java/com/hw/file/controller/SysFileController.java b/hw-modules/hw-file/src/main/java/com/hw/file/controller/SysFileController.java index 45de984a..9d41420f 100644 --- a/hw-modules/hw-file/src/main/java/com/hw/file/controller/SysFileController.java +++ b/hw-modules/hw-file/src/main/java/com/hw/file/controller/SysFileController.java @@ -37,6 +37,8 @@ public class SysFileController SysFile sysFile = new SysFile(); sysFile.setName(FileUtils.getName(url)); sysFile.setUrl(url); + log.info("url:"+url); + log.info("name:"+sysFile.getName()); return R.ok(sysFile); } catch (Exception e) diff --git a/hw-modules/hw-jindie/src/main/java/com/hw/jindie/service/impl/KingdeeErpSyncServiceImpl.java b/hw-modules/hw-jindie/src/main/java/com/hw/jindie/service/impl/KingdeeErpSyncServiceImpl.java index 619cdd9c..ab39d9be 100644 --- a/hw-modules/hw-jindie/src/main/java/com/hw/jindie/service/impl/KingdeeErpSyncServiceImpl.java +++ b/hw-modules/hw-jindie/src/main/java/com/hw/jindie/service/impl/KingdeeErpSyncServiceImpl.java @@ -1381,8 +1381,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService { toUpdatePurchaseReceiveBillList.add(mesPurchaseReceiveBill); } else { toInsertPurchaseReceiveBillList.add(mesPurchaseReceiveBill); - notifyInfoBuilder.append(materialName).append("|").append(materialSpec).append("|").append(actlandAmount).append("|") - .append(preDeliveryDate).append("|").append(projectName) + notifyInfoBuilder.append("物料名称:").append(materialName).append("|物料规格:").append(materialSpec) + .append("|实到数量:").append(actlandAmount).append("|预计到货日期:") + .append(preDeliveryDate).append("|项目名称:").append(projectName) .append(";"); } // System.out.println("l:"+resultArray.get(i).toString().length()); diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/SysPointRouterServiceImpl.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/SysPointRouterServiceImpl.java index 6b09f101..d6e7913c 100644 --- a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/SysPointRouterServiceImpl.java +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/SysPointRouterServiceImpl.java @@ -1,6 +1,7 @@ package com.hw.system.common.service.impl; import java.rmi.ServerException; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; @@ -132,13 +133,11 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService { String emailAccountInfo = redisService.getCacheObject(CacheConstants.SYS_EAMIL_ACCOUNT_INFO); String emailAccount = ""; String emailPassword = ""; - if(StringUtils.isNotEmpty(emailAccountInfo)){ - int splitIndex = emailAccountInfo.indexOf(","); - emailAccount = emailAccountInfo.substring(0,splitIndex); - emailPassword = emailAccountInfo.substring(splitIndex+1); + if (StringUtils.isNotEmpty(emailAccountInfo)) { + int splitIndex = emailAccountInfo.indexOf(","); + emailAccount = emailAccountInfo.substring(0, splitIndex); + emailPassword = emailAccountInfo.substring(splitIndex + 1); } - System.out.println(emailAccount+"e:"+emailPassword); - SysPointRouter queryPointRouter = new SysPointRouter(); List sysPointRouterList = sysPointRouterMapper.selectEmailNotifySysPointRouterList(queryPointRouter); @@ -146,12 +145,31 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService { Map> sysPointRouterMap = sysPointRouterList.stream() .filter(spo -> spo.getProcessActivityId() != null).collect(Collectors.groupingBy(SysPointRouter::getProcessActivityId)); + String emailTitle = ""; + List emailTitleList = new ArrayList<>(); for (Long processActivityId : sysPointRouterMap.keySet()) { List sysPointRoutersByActivityList = sysPointRouterMap.get(processActivityId); List sysUsers = sysUserMapper.selectProcessActivityAuthUserList(processActivityId); String sendMsg = ""; + String colon = ":"; for (SysPointRouter sysPointRouter : sysPointRoutersByActivityList) { - sendMsg += sysPointRouter.getRemark() + ";"; + String remark = sysPointRouter.getRemark(); + int colonIndex = remark.indexOf(colon); + if (colonIndex >= 0) { + emailTitle = remark.substring(0, colonIndex); + remark = remark.replaceFirst(colon, "\n\n"); + }else{ + emailTitle = remark; + } + + emailTitle = emailTitle.length() > 30 ? emailTitle.substring(0, 30) : emailTitle; + if (!emailTitleList.contains(emailTitle)) { + emailTitleList.add(emailTitle); + } + + + remark = remark.replaceAll(";", "\n\n"); + sendMsg += remark + "\n\n"; sysPointRouter.setSentEmailFlag("1"); sysPointRouter.setUpdateTime(new Date()); // sysPointRouter.setUpdateBy(SecurityUtils.getLoginUser().getNickname()); @@ -160,7 +178,7 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService { for (SysUser sysUser : sysUsers) { if (StringUtils.isNotEmpty(sysUser.getEmail())) { - MailUtils.processSendEmail(emailAccount,emailPassword,sysUser.getEmail(), "通知", sendMsg); + MailUtils.processSendEmail(emailAccount, emailPassword, sysUser.getEmail(), emailTitleList.toString(), sendMsg); } } diff --git a/hw-ui/src/views/ems/base/exception/rule/index.vue b/hw-ui/src/views/ems/base/exception/rule/index.vue index 7fcfc35a..c7368f37 100644 --- a/hw-ui/src/views/ems/base/exception/rule/index.vue +++ b/hw-ui/src/views/ems/base/exception/rule/index.vue @@ -110,9 +110,9 @@ - - - + + + @@ -200,15 +200,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/hw-ui/src/views/mes/productplan/editProductPlan.vue b/hw-ui/src/views/mes/productplan/editProductPlan.vue index c6c2b9d5..2f6ca24b 100644 --- a/hw-ui/src/views/mes/productplan/editProductPlan.vue +++ b/hw-ui/src/views/mes/productplan/editProductPlan.vue @@ -238,7 +238,7 @@ @@ -309,7 +309,7 @@