流程相关 消息修改
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 跳转链接枚举类
|
||||
*/
|
||||
public enum JumpLinkEnum {
|
||||
/**
|
||||
* type:
|
||||
* 项目库相关:
|
||||
* 101:跳转 项目库 - 项目详情
|
||||
* 102:跳转 项目库 - 法规清单
|
||||
* 103:跳转 项目库 - 任务清单
|
||||
* 104:跳转 项目库 - 未符合项
|
||||
* 105:跳转 项目库 - 认证参数收集
|
||||
*/
|
||||
INVENTORY_AFFIRM_LINK("清单确认链接","1","/ProjectDetails?id=","&type=102"),
|
||||
PREHOMO_AFFIRM_LINK("prehomo确认链接","2","/ProjectDetails?id=","&type=103"),
|
||||
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
;
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
String link;
|
||||
String type;
|
||||
|
||||
private JumpLinkEnum(String name, String value,String link,String type) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.link = link;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
+30
-2
@@ -5,6 +5,7 @@ import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.SendMsgFlagEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
@@ -17,6 +18,7 @@ import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -40,6 +42,9 @@ public class InventoryAffirmJob implements Job {
|
||||
@Autowired
|
||||
private ProjectNameInfoEOMapper projectNameInfoEOMapper;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
/**
|
||||
* 清单任务到达截止时间后,给用户发送消息
|
||||
*/
|
||||
@@ -120,8 +125,20 @@ public class InventoryAffirmJob implements Job {
|
||||
String msgContentEN = "The remaining processing time for the regulation list confirmation of"
|
||||
+ projectNameInfoEO.getProjectName()
|
||||
+ " is 3 days. Please check and handle it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -131,8 +148,19 @@ public class InventoryAffirmJob implements Job {
|
||||
String msgContentEN = "The the regulation list confirmation of "
|
||||
+ projectNameInfoEO.getProjectName()
|
||||
+ " is coming to an end today. Please check and deal with it in time";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLibraryBase.getId(),sendMessageMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-2
@@ -6,6 +6,7 @@ import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.SendMsgFlagEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
@@ -19,6 +20,7 @@ import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -44,6 +46,9 @@ public class PrehomoJob implements Job {
|
||||
@Autowired
|
||||
private IProjectTaskInventoryEOService projectTaskInventoryEOService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
@@ -126,8 +131,20 @@ public class PrehomoJob implements Job {
|
||||
String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is 3 days. Please check and handle it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -138,8 +155,20 @@ public class PrehomoJob implements Job {
|
||||
String msgContentEN = "The the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is coming to an end today. Please check and deal with it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-2
@@ -6,6 +6,7 @@ import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.SendMsgFlagEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
@@ -19,6 +20,7 @@ import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -44,6 +46,9 @@ public class VerifyComplianceJob implements Job {
|
||||
@Autowired
|
||||
private IProjectTaskInventoryEOService projectTaskInventoryEOService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
@@ -126,8 +131,20 @@ public class VerifyComplianceJob implements Job {
|
||||
String msgContentEN = "The remaining processing time for the Verify compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is 3 days. Please check and handle it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -138,8 +155,20 @@ public class VerifyComplianceJob implements Job {
|
||||
String msgContentEN = "The the Verify compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is coming to an end today. Please check and deal with it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-2
@@ -3,6 +3,7 @@ package com.jero.modules.project.job;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.SendMsgFlagEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
@@ -16,6 +17,7 @@ import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -41,6 +43,9 @@ public class designComplianceJob implements Job {
|
||||
@Autowired
|
||||
private IProjectTaskInventoryEOService projectTaskInventoryEOService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
@@ -122,8 +127,20 @@ public class designComplianceJob implements Job {
|
||||
String msgContentEN = "The remaining processing time for the design compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is 3 days. Please check and handle it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -133,8 +150,20 @@ public class designComplianceJob implements Job {
|
||||
String msgContentEN = "The the design compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " is coming to an end today. Please check and deal with it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId());
|
||||
projectLawsInventoryEOService.sendMessage(msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
Result<?> updateStatusBatch(Map<String, Object> params);
|
||||
|
||||
void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId);
|
||||
void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> params);
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
|
||||
+33
-7
@@ -167,6 +167,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
private String exportPdfTempPath;
|
||||
@Value("${jero.path.simfangFontFilePath}")
|
||||
private String simfangFontFilePath;
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@@ -983,8 +985,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation of " + projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is:" +inventoryAffirmDueDate+ ". Please check and deal with it in time.";
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType() +
|
||||
"'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,userIdList,projectLibraryId);
|
||||
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
|
||||
}
|
||||
|
||||
result = "发起清单确认";
|
||||
@@ -1051,8 +1064,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
* @param projectLibraryId
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId){
|
||||
|
||||
public void sendMessage(String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap){
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -1060,15 +1072,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = (String) sendMessageMap.get("hrefFeishu");
|
||||
//消息内容
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, "");
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), "");
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -1410,7 +1426,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " initiated the regulation list confirmation of " + projectNameInfoEO.getProjectName()
|
||||
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is:" +taskAffirmDueDate+ " Please check and deal with it in time.";
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
@@ -1428,8 +1444,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgContentEN,userIdList,id);
|
||||
sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-1
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||
import com.jero.modules.project.mapper.*;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService;
|
||||
@@ -17,6 +18,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
@@ -47,6 +49,9 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
@Autowired
|
||||
private IProjectTaskInventoryFeedbackEOService projectTaskInventoryFeedbackEOService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -268,8 +273,19 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
+ " to you. Please check and handle it in time.";
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgContentEN)){
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-2
@@ -28,6 +28,7 @@ import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -74,6 +75,10 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -323,8 +328,20 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap);
|
||||
}
|
||||
return new Result<>().success("提醒办理成功!");
|
||||
}
|
||||
@@ -593,8 +610,20 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + "Jump link" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id);
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id,sendMessageMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-3
@@ -22,6 +22,7 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@@ -52,7 +53,7 @@ public class SendMessageUtils {
|
||||
SendMessageUtils.webSocket = webSocket;
|
||||
}
|
||||
|
||||
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId) {
|
||||
public static void sendMessage(String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap) {
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -61,14 +62,19 @@ public class SendMessageUtils {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = (String) sendMessageMap.get("hrefFeishu");
|
||||
//消息内容
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, "");
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgContent, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), "");
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), msgContent, MessageTypeEnum.PUSH.getName(), hrefFeishu);
|
||||
} catch (IOException e) {
|
||||
logger.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user