Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+80
-22
@@ -42,6 +42,7 @@ import com.jero.modules.domain.entity.DomainUserRel;
|
||||
import com.jero.modules.domain.service.DomainUserRelService;
|
||||
import com.jero.modules.domain.service.impl.DomainManageServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.home.entity.HomeDocumentDynamicEO;
|
||||
import com.jero.modules.home.service.IHomeDocumentDynamicEOService;
|
||||
import com.jero.modules.log.entity.BussLogEO;
|
||||
@@ -127,6 +128,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -309,7 +311,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo =content;
|
||||
String title = content;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
|
||||
}
|
||||
@@ -1000,7 +1002,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
// 取不到数据,直接返回空结果
|
||||
return result;
|
||||
}
|
||||
|
||||
//查询所有
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null);
|
||||
|
||||
@@ -1058,6 +1059,29 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
List<Map<String, Object>> resultTemp = new ArrayList<>();
|
||||
List<OnlCgformField> fieldListTemp = fieldList.stream().filter(e -> onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
fieldListTemp.removeIf(new Predicate<OnlCgformField>() {
|
||||
@Override
|
||||
public boolean test(OnlCgformField onlCgformField) {
|
||||
return onlCgformField.getDbFieldName().equals("title_en");//
|
||||
}
|
||||
});
|
||||
List<OnlCgformField> collect = fieldListTemp.stream().filter(e -> "title".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
collect.get(0).setDbFieldTxt("标题");
|
||||
}
|
||||
}else{
|
||||
fieldListTemp.removeIf(new Predicate<OnlCgformField>() {
|
||||
@Override
|
||||
public boolean test(OnlCgformField onlCgformField) {
|
||||
return onlCgformField.getDbFieldName().equals("title");//
|
||||
}
|
||||
});
|
||||
List<OnlCgformField> collect = fieldListTemp.stream().filter(e -> "title_en".equals(e.getDbFieldName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
collect.get(0).setDbFieldEnName("Title");
|
||||
}
|
||||
}
|
||||
for (OnlCgformField onlCgformField : fieldListTemp) {
|
||||
//字段
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
@@ -1570,13 +1594,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String serialNumber = StringUtils.valueOf(map.get("serial_number"));
|
||||
//String serialNumber = StringUtils.valueOf(map.get("serial_number"));
|
||||
//编码验重
|
||||
List<BussDocumentLibraryEO> list = this.list();
|
||||
if(list.size() != 0){
|
||||
List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
if(serialNumberList.contains(serialNumber)){
|
||||
throw new JeroBootException("编号已存在不能重复添加");
|
||||
}
|
||||
}
|
||||
// List<BussDocumentLibraryEO> list = this.list();
|
||||
// if(list.size() != 0){
|
||||
// List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
// if(serialNumberList.contains(serialNumber)){
|
||||
// throw new JeroBootException("编号已存在不能重复添加");
|
||||
// }
|
||||
// }
|
||||
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String issueTime = (String) (map.get("issue_time"));
|
||||
@@ -2143,7 +2167,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
+ href +" has been updated.";
|
||||
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -3143,9 +3167,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
//您订阅的XXX已被修改
|
||||
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = "The" + technologyTerritoryNameEn + "technical field you subscribed to has been updated";
|
||||
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
|
||||
// 封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList, msgTitle, contentInfoFei, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList, msgTitle, contentInfoFei, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
}
|
||||
@@ -3165,9 +3189,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//您订阅的XXX已被修改
|
||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = serialNumber + "you subsribed to has been updated";
|
||||
String msgTitle = serialNumber + " you subsribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
}
|
||||
@@ -3248,7 +3272,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
|
||||
String msgTitle = contentInfo;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
|
||||
//飞书
|
||||
@@ -3271,8 +3295,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
|
||||
@NotNull
|
||||
public SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo,String messageType) {
|
||||
public SysAnnouncement getSysAnnouncement(List<String> userIdList,
|
||||
String title,
|
||||
String content,
|
||||
String contentInfo,
|
||||
String messageType,
|
||||
String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
@@ -4684,10 +4714,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*/
|
||||
@Override
|
||||
public String pullMessage(String departIds, String userIds, String documentIds) {
|
||||
// departIds = "c6d7cb4deeac411cb3384b1b31278596";
|
||||
// if(StringUtils.isBlank(documentIds)){
|
||||
// return "请选择文档";
|
||||
// }
|
||||
Set<String> allDepartIds = new HashSet<>();
|
||||
//查询当前部门下所有部门
|
||||
if (StringUtils.isNotEmpty(departIds)) {
|
||||
@@ -4746,9 +4772,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out.";
|
||||
String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
String title = StringUtils.join(serialNumberList, ",") + "has been pushed to you, please check";
|
||||
String title = StringUtils.join(serialNumberList, ",") + " has been pushed to you, please check";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
@@ -4763,6 +4789,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
});
|
||||
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
|
||||
// FeishuMsgVo feishuMsgVo = getFeishuMsgVo(MessageTypeEnum.PUSH.getName(),null, contentTemp, encode);
|
||||
// iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@@ -4772,6 +4800,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
return "推送成功";
|
||||
}
|
||||
|
||||
private FeishuMsgVo getFeishuMsgVo(String title, String taskType, String content,String url) {
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
feishuMsgVo.setContent(content);
|
||||
feishuMsgVo.setTaskType(taskType);
|
||||
feishuMsgVo.setUrl(url);
|
||||
return feishuMsgVo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 属性字典处理中文
|
||||
@@ -5439,6 +5476,27 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(html);
|
||||
} else {
|
||||
//验证重复的标准号
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
if (mapList.size() != 0) {
|
||||
for (Map<String, Object> map : mapList) {
|
||||
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
|
||||
}
|
||||
}
|
||||
List<BussDocumentLibraryEO> list = this.list();
|
||||
if(list.size() != 0){
|
||||
List<BussDocumentLibraryEO> serialNumberListTemp = list.stream()
|
||||
.filter(e -> serialNumberList.contains(e.getSerialNumber())).collect(Collectors.toList());
|
||||
if(serialNumberListTemp.size() != 0){
|
||||
List<String> collect = serialNumberListTemp.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException(StringUtils.join(collect,",")+" 编号已存在不能重复添加");
|
||||
}else{
|
||||
throw new JeroBootException(StringUtils.join(collect,",")+" already exists and cannot be added again");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mapList.size() != 0) {
|
||||
for (Map<String, Object> map : mapList) {
|
||||
this.addInfo(map);
|
||||
|
||||
+2
-2
@@ -1150,7 +1150,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -1164,7 +1164,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentInfo = "Please note that the "+baseName+" virtual list you subscribed to has been withdrawn.";
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been withdrawn";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
|
||||
+7
-5
@@ -11,7 +11,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -80,11 +82,11 @@ public class NcrTrackController {
|
||||
* @param request
|
||||
* @param ncrTrackVO
|
||||
*/
|
||||
@RequestMapping(value = "/exportData")
|
||||
@RequestMapping(value = "/exportData",method = RequestMethod.POST)
|
||||
@RequiresPermissions("ncrTrack:exportData")
|
||||
public void exportData(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
NcrTrackVO ncrTrackVO) {
|
||||
@RequestBody NcrTrackVO ncrTrackVO) {
|
||||
iNcrTrackService.exportData(response,request, ncrTrackVO);
|
||||
}
|
||||
|
||||
@@ -93,11 +95,11 @@ public class NcrTrackController {
|
||||
* @param request
|
||||
* @param ncrTrackVO
|
||||
*/
|
||||
@RequestMapping(value = "/exportDataInfo")
|
||||
@RequestMapping(value = "/exportDataInfo",method = RequestMethod.POST)
|
||||
@RequiresPermissions("ncrTrack:exportDataInfo")
|
||||
public void exportDataInfo(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
NcrTrackVO ncrTrackVO) {
|
||||
HttpServletRequest request,
|
||||
@RequestBody NcrTrackVO ncrTrackVO) {
|
||||
iNcrTrackService.exportData(response,request, ncrTrackVO);
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -8,6 +8,8 @@ public enum MsgTypeEnum {
|
||||
TASK_AFFIRM_ISSUE_DRE_MSG("任务确认分配dre消息","taskAffirmIssueDreMsg"),
|
||||
TASK_AFFIRM_DRE_ACCEPTED("任务确认DRE通过消息","taskAffirmDreAccepted"),
|
||||
TASK_AFFIRM_DRE_REJECTED("任务确认DRE退回消息","taskAffirmDreRejected"),
|
||||
TASK_AFFIRM_ACCEPTED_MSG("任务确认责任人通过消息","taskAffirmAcceptedMsg"),
|
||||
TASK_AFFIRM_REJECTED_MSG("任务确认责任人拒绝消息","taskAffirmRejectedMsg"),
|
||||
|
||||
DESIGN_ISSUE_DRE_MSG("设计符合性确认分配dre消息","designIssueDreMsg"),
|
||||
DESIGN_REMIND_MSG("设计符合性提醒办理","designRemindMsg"),
|
||||
@@ -19,6 +21,15 @@ public enum MsgTypeEnum {
|
||||
DESIGN_RETURN_MSG("设计符合性发起人退回","designReturnMsg"),
|
||||
PREHOMO_RETURN_MSG("prehomo发起人退回","prehomoReturnMsg"),
|
||||
VERIFY_RETURN_MSG("验证符合性发起人退回","verifyReturnMsg"),
|
||||
DESIGN_START_MSG("设计符合性发起给责任人发送消息","designStartMsg"),
|
||||
PREHOMO_START_MSG("prehomo发起给责任人发送消息","prehomoStartMsg"),
|
||||
VERIFY_START_MSG("验证符合性发起给责任人发送消息","verifyStartMsg"),
|
||||
DESIGN_CHARGE_PERSON_SUBMIT_MSG("设计符合性责任人提交给发起人发送消息","designChargePersonSubmitMsg"),
|
||||
PREHOMO_CHARGE_PERSON_SUBMIT_MSG("prehomo责任人提交给发起人发送消息","prehomoChargePersonSubmitMsg"),
|
||||
VERIFY_CHARGE_PERSON_SUBMIT_MSG("验证符合性责任人提交给发起人发送消息","verifyChargePersonSubmitMsg"),
|
||||
DESIGN_INITIATOR_ACCEPTED_MSG("设计符合性发起人通过发送消息","designInitiatorAcceptedMsg"),
|
||||
PREHOMO_INITIATOR_ACCEPTED_MSG("prehomo发起人通过发送消息","prehomoInitiatorAcceptedMsg"),
|
||||
VERIFY_INITIATOR_ACCEPTED_MSG("验证符合性发起人通过发送消息","verifyInitiatorAcceptedMsg"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -208,7 +208,7 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -170,7 +170,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -207,7 +207,7 @@ public class PrehomoJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.PRE_HOMO_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -167,7 +167,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -204,7 +204,7 @@ public class VerifyComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.VALIDATION_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
@@ -199,7 +199,7 @@ public class designComplianceJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK);
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.DESIGN_COMPLIANCE_TASK,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
Result<?> updateStatusBatch(JSONObject json);
|
||||
|
||||
void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType);
|
||||
void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> params, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType,String initiator);
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
|
||||
+3
-6
@@ -241,12 +241,10 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
||||
|
||||
|
||||
List<NcrTrackVO> trackVOListTemp = new ArrayList<>();
|
||||
String idJson = ncrTrackVO.getNcrTrackVOList();
|
||||
if(StringUtils.isNotBlank(idJson)){
|
||||
List<NcrTrackVO> ncrTrackVOList = JSONObject.parseArray(idJson, NcrTrackVO.class);
|
||||
List<NcrTrackVO> ncrTrackVOListTemp = ncrTrackVO.getNcrTrackVOList();
|
||||
//导出数据过滤(列表中选取多条进行导出的时候,用任务清单id和流程类型作为条件进行数据过滤)
|
||||
if(ObjectUtils.allNotNull(ncrTrackVOList)){
|
||||
for (NcrTrackVO trackVO : ncrTrackVOList) {
|
||||
if(ObjectUtils.allNotNull(ncrTrackVOListTemp)){
|
||||
for (NcrTrackVO trackVO : ncrTrackVOListTemp) {
|
||||
List<NcrTrackVO> collect = trackVOList.stream()
|
||||
.filter(e -> trackVO.getId().equals(e.getId()) && trackVO.getFlowType().equals(e.getFlowType()))
|
||||
.collect(Collectors.toList());
|
||||
@@ -255,7 +253,6 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(trackVOListTemp.size() != 0){
|
||||
return trackVOListTemp;
|
||||
|
||||
+196
-15
@@ -94,6 +94,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -119,6 +120,7 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService {
|
||||
|
||||
@Autowired
|
||||
@@ -1340,8 +1342,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
@@ -1377,7 +1377,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,currentUser.getUsername());
|
||||
}
|
||||
|
||||
result = "发起清单确认";
|
||||
@@ -1465,6 +1465,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||
}*/
|
||||
}
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
//只要有一个人拒绝,就改为拒绝。
|
||||
if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
|
||||
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||
@@ -1513,7 +1518,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
|
||||
}
|
||||
|
||||
@@ -1554,7 +1559,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1604,7 +1609,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//发送消息
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_NOTIFICATION);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_NOTIFICATION,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1627,7 +1632,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
* @param projectLibraryId
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String msgTitle, String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType){
|
||||
public void sendMessage(String msgTitle, String msgContent, List<String> userIdList,String projectLibraryId,Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType,String initiator){
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -1641,7 +1646,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo, messageType);
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo, messageType,initiator);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
@@ -1661,8 +1666,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType) {
|
||||
private SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType,String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
@@ -1723,8 +1729,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//法规清单的责任领域
|
||||
String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
|
||||
if(StringUtils.isNotBlank(dutyTerritory)){
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnels.stream()
|
||||
.filter(e -> dutyTerritory.contains(e.getDutyTerritory())).collect(Collectors.toList());
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = new ArrayList<>();
|
||||
for (String s : dutyTerritory.split(",")) {
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelListTemp = projectRelatedPersonnels.stream()
|
||||
.filter(e -> s.equals(e.getDutyTerritory())).collect(Collectors.toList());
|
||||
if(projectRelatedPersonnelListTemp.size() != 0){
|
||||
projectRelatedPersonnelList.addAll(projectRelatedPersonnelListTemp);
|
||||
}
|
||||
}
|
||||
// List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnels.stream()
|
||||
// .filter(e -> dutyTerritory.contains(e.getDutyTerritory())).collect(Collectors.toList());
|
||||
|
||||
List<String> lawEngineerList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getLawEngineer).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
|
||||
List<String> engineeringInterfacePersonList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
|
||||
@@ -2074,6 +2088,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
|
||||
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
@@ -2090,6 +2109,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
String taskType = "";
|
||||
String initiator = "";
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
@@ -2099,6 +2122,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
userIdList.add(dreUserId);
|
||||
@@ -2109,6 +2136,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2118,6 +2148,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2127,11 +2160,155 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has accepted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation notification to check";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has accepted the task. Please check and and handle it in time.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.REGULATION_TASK_CONFIRMATION_NOTIFICATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
initiator = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
msgContentEN = "You recieved the design compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
msgContentEN = "You recieved the Pre-Homo task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
msgContentEN = "You recieved the validation compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id
|
||||
userIdList.add(designInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the design compliance confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id
|
||||
userIdList.add(prehomoInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the Pre-Homo confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id
|
||||
userIdList.add(verifyInitiatorId);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the validation compliance confirmation " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". Please check and review it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance confirmation has been submitted. Please check and review it in a timely manner.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
msgContentEN = "The design compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". you sumitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_NOTIFICATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
msgContentEN = "The Pre-Homo confirmation information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". you sumitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_NOTIFICATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
msgContentEN = "The validation compliance information of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ "you sumitted has been approved.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been approved.");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_COMPLIANCE_NOTIFICATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setTaskType(taskType);
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(sysUser.getUsername());
|
||||
@@ -2149,7 +2326,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,initiator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6454,6 +6631,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
libraryBaseQueryWrapper.lambda().eq(ProjectLibraryBase::getId,projectLibraryId);
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseMapper.selectOne(libraryBaseQueryWrapper);
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
projectLawsInventoryEOList.forEach(projectLawsInventoryEO -> {
|
||||
|
||||
//如果清单确认状态为待确认的,进行催办
|
||||
@@ -6515,7 +6696,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,inventoryAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_LIST_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6571,7 +6752,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
sendMessage(msgTitle, msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK);
|
||||
sendMessage(msgTitle, msgContentEN,taskAffirmUserIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.REGULATION_TASK_CONFIRMATION_TASK,studioUserInfo.getUsername());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+13
-3
@@ -1,10 +1,13 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLibraryRoleRelEO;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryRoleRelEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
@@ -43,9 +46,16 @@ public class ProjectLibraryRoleRelEOServiceImpl extends ServiceImpl<ProjectLibra
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProjectLibraryRoleRelEO projectLibraryRoleRelEO) {
|
||||
Date now = new Date();
|
||||
projectLibraryRoleRelEO.setUpdateTime(now);
|
||||
saveOrUpdate(projectLibraryRoleRelEO);
|
||||
//用户在法规清单角色切换中,切换角色,只有这个项目的studio 有id,其他用户第一次默认是没有的。如果不是studio 只能给他新增一条数据 ,后续回显使用。
|
||||
if(StringUtils.isNotEmpty(projectLibraryRoleRelEO.getId())){
|
||||
Date now = new Date();
|
||||
projectLibraryRoleRelEO.setUpdateTime(now);
|
||||
this.baseMapper.updateById(projectLibraryRoleRelEO);
|
||||
}else {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
projectLibraryRoleRelEO.setUserId(currentUser.getId());
|
||||
this.baseMapper.insert(projectLibraryRoleRelEO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-6
@@ -263,9 +263,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
lawEngineerName = lawEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
lawName.append(lawEngineerName).append(" , ");
|
||||
lawName.append(lawEngineerName).append(",");
|
||||
}
|
||||
projectRelatedPersonnel.setLawEngineerName(lawName.substring(0,lawName.toString().length()-3));
|
||||
projectRelatedPersonnel.setLawEngineerName(lawName.substring(0,lawName.toString().length()-1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,9 +289,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
engineeringInterfacePersonName = engineeringInterfacePersonUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
engineeringName.append(engineeringInterfacePersonName).append(" , ");
|
||||
engineeringName.append(engineeringInterfacePersonName).append(",");
|
||||
}
|
||||
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringName.substring(0,engineeringName.toString().length()-3));
|
||||
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringName.substring(0,engineeringName.toString().length()-1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,9 +314,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
certificationEngineerName = certificationEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
certificationName.append(certificationEngineerName).append(" , ");
|
||||
certificationName.append(certificationEngineerName).append(",");
|
||||
}
|
||||
projectRelatedPersonnel.setCertificationEngineerName(certificationName.substring(0,certificationName.toString().length()-3));
|
||||
projectRelatedPersonnel.setCertificationEngineerName(certificationName.substring(0,certificationName.toString().length()-1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -372,7 +372,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -425,7 +425,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
return new Result<>().success("提醒办理成功!");
|
||||
}
|
||||
@@ -992,7 +992,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+75
-73
@@ -132,93 +132,95 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
new QueryWrapper<ProjectTaskInventoryDetailEO>().lambda().eq(ProjectTaskInventoryDetailEO::getId, projectTaskInventoryFeedbackEO.getProjectTaskInventoryId())
|
||||
);
|
||||
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
|
||||
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEO.getProjectTaskInventoryId())
|
||||
);
|
||||
if(!Objects.isNull(projectTaskInventoryDetailEO)){
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
|
||||
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEO.getProjectTaskInventoryId())
|
||||
);
|
||||
|
||||
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
|
||||
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
|
||||
);
|
||||
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
|
||||
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
|
||||
);
|
||||
|
||||
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
|
||||
);
|
||||
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
|
||||
);
|
||||
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
|
||||
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
messageTypeEnum = MessageTypeEnum.DESIGN_COMPLIANCE_TASK;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
messageTypeEnum = MessageTypeEnum.PRE_HOMO_TASK;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
messageTypeEnum = MessageTypeEnum.VALIDATION_TASK;
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +421,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum);
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -54,7 +54,14 @@ public class SendMessageUtils {
|
||||
SendMessageUtils.webSocket = webSocket;
|
||||
}
|
||||
|
||||
public static void sendMessage(String msgTitle, String msgContent, List<String> userIdList, String projectLibraryId, Map<String,Object> sendMessageMap, FeishuMsgVo feishuMsgVo, MessageTypeEnum messageType) {
|
||||
public static void sendMessage(String msgTitle,
|
||||
String msgContent,
|
||||
List<String> userIdList,
|
||||
String projectLibraryId,
|
||||
Map<String,Object> sendMessageMap,
|
||||
FeishuMsgVo feishuMsgVo,
|
||||
MessageTypeEnum messageType,
|
||||
String initiator) {
|
||||
String idTemp = projectLibraryId;
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
@@ -69,7 +76,7 @@ public class SendMessageUtils {
|
||||
String contentInfo = (String) sendMessageMap.get("contentInfo");
|
||||
|
||||
//系统消息
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo,messageType);
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContent, contentInfo,messageType,initiator);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, idTemp);
|
||||
|
||||
@@ -89,8 +96,9 @@ public class SendMessageUtils {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType) {
|
||||
private static SysAnnouncement getSysAnnouncement(List<String> userIdList, String title, String content, String contentInfo, MessageTypeEnum messageType,String initiator) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
|
||||
+2
-2
@@ -1,7 +1,6 @@
|
||||
package com.jero.modules.project.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -10,6 +9,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public class NcrTrackVO implements Serializable {
|
||||
//验证问题类型 verify_flow_task_status
|
||||
private String verifyFlowTaskStatus;
|
||||
|
||||
private String ncrTrackVOList;
|
||||
private List<NcrTrackVO> ncrTrackVOList = new ArrayList<>();
|
||||
|
||||
|
||||
//以下字段跳转适用(还有项目库id)
|
||||
|
||||
+1359
-249
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -335,7 +335,7 @@ public class LawsWarnService {
|
||||
String title = content;
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ public class TimedTaskWarn implements Job {
|
||||
private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List<String> userIdList, List<String> thirdIdList) {
|
||||
//站内消息
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.WARN.getValue());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.WARN.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user