合并分支 'fix_bug_first_stage' 到 'master'

Fix bug first stage

查看合并请求 laws-nio/laws-weilai!75
This commit is contained in:
肖文钰
2022-07-11 20:09:00 +08:00
34 changed files with 357 additions and 92 deletions
@@ -45,3 +45,7 @@ ALTER TABLE `laws_weilai`.`sys_announcement`
INSERT INTO `sys_config` ( `id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name` ) INSERT INTO `sys_config` ( `id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name` )
VALUES VALUES
( '3', 'admin', '2022-07-09 18:38:23', 'admin', '2022-07-09 18:38:28', 'A01', 'http://localhost:8080', 'domianPreviewURL' ); ( '3', 'admin', '2022-07-09 18:38:23', 'admin', '2022-07-09 18:38:28', 'A01', 'http://localhost:8080', 'domianPreviewURL' );
-- 消息表添加发起人字段
ALTER TABLE `sys_announcement`
ADD COLUMN `initiator` varchar(255) NULL COMMENT '发起人' AFTER `document_id`;
@@ -17,10 +17,11 @@ public enum MessageTypeEnum {
REGULATION_TASK_CONFIRMATION_NOTIFICATION("Regulation Task Confirmation Notification", "15"), // 任务确认通知 REGULATION_TASK_CONFIRMATION_NOTIFICATION("Regulation Task Confirmation Notification", "15"), // 任务确认通知
DESIGN_COMPLIANCE_TASK("Design Compliance Task", "9"), // 设计符合性任务 DESIGN_COMPLIANCE_TASK("Design Compliance Task", "9"), // 设计符合性任务
PRE_HOMO_TASK("Pre-Homo Task", "10"), // Pre-Homo任务 PRE_HOMO_TASK("Pre-Homo Task", "10"), // Pre-Homo任务
VALIDATION_TASK("Validation Task", "11"), // 验证符合性任务 VALIDATION_TASK("Validation Compliance Task", "11"), // 验证符合性任务
DESIGN_COMPLIANCE_NOTIFICATION("Design Compliance Notification", "12"), // 设计符合性通知 DESIGN_COMPLIANCE_NOTIFICATION("Design Compliance Notification", "12"), // 设计符合性通知
PRE_HOMO_NOTIFICATION("Pre-Homo Notification", "13"), // Pre-Homo通知 PRE_HOMO_NOTIFICATION("Pre-Homo Notification", "13"), // Pre-Homo通知
VALIDATION_COMPLIANCE_NOTIFICATION("Validation Compliance Notification", "14"), // 验证符合性通知 VALIDATION_COMPLIANCE_NOTIFICATION("Validation Compliance Notification", "14"), // 验证符合性通知
SYSTEMATIC_NOTIFICATION("Systematic Notification", "15"), // 系统通知
; ;
String name; String name;
@@ -153,4 +153,8 @@ public class SysAnnouncement implements Serializable {
* 文档id * 文档id
*/ */
private java.lang.String documentId; private java.lang.String documentId;
/**
* 发起人
*/
private java.lang.String initiator;
} }
@@ -27,6 +27,7 @@
<result column="open_type" property="openType" jdbcType="VARCHAR"/> <result column="open_type" property="openType" jdbcType="VARCHAR"/>
<result column="open_page" property="openPage" jdbcType="VARCHAR"/> <result column="open_page" property="openPage" jdbcType="VARCHAR"/>
<result column="document_id" property="documentId" jdbcType="VARCHAR"/> <result column="document_id" property="documentId" jdbcType="VARCHAR"/>
<result column="initiator" property="initiator" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
@@ -17,6 +17,7 @@
<result column="open_type" property="openType" jdbcType="VARCHAR"/> <result column="open_type" property="openType" jdbcType="VARCHAR"/>
<result column="open_page" property="openPage" jdbcType="VARCHAR"/> <result column="open_page" property="openPage" jdbcType="VARCHAR"/>
<result column="document_id" property="documentId" jdbcType="VARCHAR"/> <result column="document_id" property="documentId" jdbcType="VARCHAR"/>
<result column="initiator" property="initiator" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<select id="queryByUserId" parameterType="String" resultType="String"> <select id="queryByUserId" parameterType="String" resultType="String">
@@ -41,7 +42,8 @@
sa.open_type as open_type, sa.open_type as open_type,
sa.open_page as open_page, sa.open_page as open_page,
sa.msg_abstract, sa.msg_abstract,
sa.document_id as document_id sa.document_id as document_id,
sa.initiator as initiator
from sys_announcement_send sas from sys_announcement_send sas
left join sys_announcement sa ON sas.annt_id = sa.id left join sys_announcement sa ON sas.annt_id = sa.id
where sa.del_flag = '0' where sa.del_flag = '0'
@@ -82,5 +82,9 @@ public class AnnouncementSendModel implements Serializable {
* 文档id * 文档id
*/ */
private java.lang.String documentId; private java.lang.String documentId;
/**
* 发起人
*/
private java.lang.String initiator;
} }
@@ -42,6 +42,7 @@ import com.jero.modules.domain.entity.DomainUserRel;
import com.jero.modules.domain.service.DomainUserRelService; import com.jero.modules.domain.service.DomainUserRelService;
import com.jero.modules.domain.service.impl.DomainManageServiceImpl; import com.jero.modules.domain.service.impl.DomainManageServiceImpl;
import com.jero.modules.feishu.service.IFeishuService; 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.entity.HomeDocumentDynamicEO;
import com.jero.modules.home.service.IHomeDocumentDynamicEOService; import com.jero.modules.home.service.IHomeDocumentDynamicEOService;
import com.jero.modules.log.entity.BussLogEO; import com.jero.modules.log.entity.BussLogEO;
@@ -309,7 +310,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String contentInfo =content; String contentInfo =content;
String title = 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo); sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
} }
@@ -1570,13 +1571,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String serialNumber = StringUtils.valueOf(map.get("serial_number")); String serialNumber = StringUtils.valueOf(map.get("serial_number"));
//String serialNumber = StringUtils.valueOf(map.get("serial_number")); //String serialNumber = StringUtils.valueOf(map.get("serial_number"));
//编码验重 //编码验重
List<BussDocumentLibraryEO> list = this.list(); // List<BussDocumentLibraryEO> list = this.list();
if(list.size() != 0){ // if(list.size() != 0){
List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList()); // List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
if(serialNumberList.contains(serialNumber)){ // if(serialNumberList.contains(serialNumber)){
throw new JeroBootException("编号已存在不能重复添加"); // throw new JeroBootException("编号已存在不能重复添加");
} // }
} // }
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String issueTime = (String) (map.get("issue_time")); String issueTime = (String) (map.get("issue_time"));
@@ -2143,7 +2144,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
+ href +" has been updated."; + href +" has been updated.";
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, contentInfo); sendWebsocket(idTemp, contentInfo);
//飞书 //飞书
@@ -3143,9 +3144,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", ""); sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
//您订阅的XXX已被修改 //您订阅的XXX已被修改
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString(); 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket((String) map.get("id"), contentInfo); sendWebsocket((String) map.get("id"), contentInfo);
} }
@@ -3165,9 +3166,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//您订阅的XXX已被修改 //您订阅的XXX已被修改
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check."; 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 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket((String) map.get("id"), contentInfo); sendWebsocket((String) map.get("id"), contentInfo);
} }
@@ -3248,7 +3249,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr; String contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
String msgTitle = contentInfo; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo); sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
//飞书 //飞书
@@ -3271,8 +3272,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
@NotNull @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 sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setInitiator(initiator);
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0"); sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date()); sysAnnouncement.setSendTime(new Date());
@@ -4684,10 +4691,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
*/ */
@Override @Override
public String pullMessage(String departIds, String userIds, String documentIds) { public String pullMessage(String departIds, String userIds, String documentIds) {
// departIds = "c6d7cb4deeac411cb3384b1b31278596";
// if(StringUtils.isBlank(documentIds)){
// return "请选择文档";
// }
Set<String> allDepartIds = new HashSet<>(); Set<String> allDepartIds = new HashSet<>();
//查询当前部门下所有部门 //查询当前部门下所有部门
if (StringUtils.isNotEmpty(departIds)) { if (StringUtils.isNotEmpty(departIds)) {
@@ -4746,9 +4749,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String content = sysUser.getUsername() + " pushed " + StringUtils.join(serialNumberList, ",") + " to you. Please be reminded to check it out."; 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 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo); sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
//飞书 //飞书
@@ -4763,6 +4766,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} }
}); });
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out."; 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); iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
} }
} catch (IOException e) { } catch (IOException e) {
@@ -4772,6 +4777,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
return "推送成功"; 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 +5453,27 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
FileUnZip.deleteDir(saveDirectory); FileUnZip.deleteDir(saveDirectory);
throw new JeroBootException(html); throw new JeroBootException(html);
} else { } 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) { if (mapList.size() != 0) {
for (Map<String, Object> map : mapList) { for (Map<String, Object> map : mapList) {
this.addInfo(map); this.addInfo(map);
@@ -1150,7 +1150,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
msgTitle = "The " + baseName + " virtual list you subscribed to has been updated"; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo); 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."; 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"; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo); bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
//飞书 //飞书
@@ -8,6 +8,8 @@ public enum MsgTypeEnum {
TASK_AFFIRM_ISSUE_DRE_MSG("任务确认分配dre消息","taskAffirmIssueDreMsg"), TASK_AFFIRM_ISSUE_DRE_MSG("任务确认分配dre消息","taskAffirmIssueDreMsg"),
TASK_AFFIRM_DRE_ACCEPTED("任务确认DRE通过消息","taskAffirmDreAccepted"), TASK_AFFIRM_DRE_ACCEPTED("任务确认DRE通过消息","taskAffirmDreAccepted"),
TASK_AFFIRM_DRE_REJECTED("任务确认DRE退回消息","taskAffirmDreRejected"), TASK_AFFIRM_DRE_REJECTED("任务确认DRE退回消息","taskAffirmDreRejected"),
TASK_AFFIRM_ACCEPTED_MSG("任务确认责任人通过消息","taskAffirmAcceptedMsg"),
TASK_AFFIRM_REJECTED_MSG("任务确认责任人拒绝消息","taskAffirmRejectedMsg"),
DESIGN_ISSUE_DRE_MSG("设计符合性确认分配dre消息","designIssueDreMsg"), DESIGN_ISSUE_DRE_MSG("设计符合性确认分配dre消息","designIssueDreMsg"),
DESIGN_REMIND_MSG("设计符合性提醒办理","designRemindMsg"), DESIGN_REMIND_MSG("设计符合性提醒办理","designRemindMsg"),
@@ -19,6 +21,15 @@ public enum MsgTypeEnum {
DESIGN_RETURN_MSG("设计符合性发起人退回","designReturnMsg"), DESIGN_RETURN_MSG("设计符合性发起人退回","designReturnMsg"),
PREHOMO_RETURN_MSG("prehomo发起人退回","prehomoReturnMsg"), PREHOMO_RETURN_MSG("prehomo发起人退回","prehomoReturnMsg"),
VERIFY_RETURN_MSG("验证符合性发起人退回","verifyReturnMsg"), 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; String name;
@@ -170,7 +170,7 @@ public class InventoryAffirmJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -208,7 +208,7 @@ public class InventoryAffirmJob implements Job {
sendMessageMap.put("hrefFeishu",hrefFeishu); sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -170,7 +170,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -207,7 +207,7 @@ public class PrehomoJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -167,7 +167,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -204,7 +204,7 @@ public class VerifyComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -163,7 +163,7 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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)){ if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
@@ -199,7 +199,7 @@ public class designComplianceJob implements Job {
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -78,7 +78,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/ */
Result<?> updateStatusBatch(JSONObject json); 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);
/** /**
* 匹配相关人员 * 匹配相关人员
@@ -1340,8 +1340,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(CollectionUtils.isNotEmpty(userIdList)){ if(CollectionUtils.isNotEmpty(userIdList)){
userIdList = userIdList.stream().distinct().collect(Collectors.toList()); userIdList = userIdList.stream().distinct().collect(Collectors.toList());
//消息内容 //消息内容
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for " String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket() + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
@@ -1377,7 +1375,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); 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 = "发起清单确认"; result = "发起清单确认";
@@ -1465,6 +1463,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue(); 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())){ if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue(); inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
@@ -1513,7 +1516,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//发送消息 //发送消息
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer()); 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 +1557,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//发送消息 //发送消息
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer()); 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 +1607,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//发送消息 //发送消息
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer()); 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 +1630,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
* @param projectLibraryId * @param projectLibraryId
*/ */
@Override @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; String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList); List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -1641,7 +1644,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String contentInfo = (String) sendMessageMap.get("contentInfo"); 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, idTemp); sendWebsocket(idTemp, idTemp);
@@ -1661,8 +1664,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
@NotNull @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 sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setInitiator(initiator);
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0"); sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date()); sysAnnouncement.setSendTime(new Date());
@@ -2074,6 +2078,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>() ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId)); .lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
SysUser studioUserInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
);
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>(); QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId()); projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper); ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
@@ -2090,6 +2099,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
MessageTypeEnum messageTypeEnum = null;
String taskType = "";
String initiator = "";
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) { if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
@@ -2099,6 +2112,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner."); 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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId); userIdList.add(dreUserId);
@@ -2109,6 +2126,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task. Please check and and handle it in time."); 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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2118,6 +2138,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has rejected the task. Please check and and handle it in time."); 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())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2127,11 +2150,155 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has submitted the task. Please check and and handle it in time."); 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)){ if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
feishuMsgVo.setTaskType("Regulation Task Confirmation"); feishuMsgVo.setTaskType(taskType);
feishuMsgVo.setRegulationNo(serialNumber); feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(sysUser.getUsername()); feishuMsgVo.setInitiator(sysUser.getUsername());
@@ -2149,7 +2316,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); 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 +6621,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
libraryBaseQueryWrapper.lambda().eq(ProjectLibraryBase::getId,projectLibraryId); libraryBaseQueryWrapper.lambda().eq(ProjectLibraryBase::getId,projectLibraryId);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseMapper.selectOne(libraryBaseQueryWrapper); ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseMapper.selectOne(libraryBaseQueryWrapper);
SysUser studioUserInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
);
projectLawsInventoryEOList.forEach(projectLawsInventoryEO -> { projectLawsInventoryEOList.forEach(projectLawsInventoryEO -> {
//如果清单确认状态为待确认的,进行催办 //如果清单确认状态为待确认的,进行催办
@@ -6515,7 +6686,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); 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 +6742,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
}); });
@@ -263,9 +263,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
lawEngineerName = lawEngineerUsers.stream().filter(e -> data.equals(e.getId())) lawEngineerName = lawEngineerUsers.stream().filter(e -> data.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(",")); .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())) engineeringInterfacePersonName = engineeringInterfacePersonUsers.stream().filter(e -> data.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(",")); .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())) certificationEngineerName = certificationEngineerUsers.stream().filter(e -> data.equals(e.getId()))
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(",")); .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));
} }
} }
@@ -372,7 +372,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -425,7 +425,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo); 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("提醒办理成功!"); return new Result<>().success("提醒办理成功!");
} }
@@ -992,7 +992,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
@@ -218,7 +218,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
@@ -419,7 +419,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
sendMessageMap.put("contentInfo",contentInfo); 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());
} }
} }
} }
@@ -54,7 +54,14 @@ public class SendMessageUtils {
SendMessageUtils.webSocket = webSocket; 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; String idTemp = projectLibraryId;
List<SysUser> sysUsers = sysUserService.listByIds(userIdList); List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
@@ -69,7 +76,7 @@ public class SendMessageUtils {
String contentInfo = (String) sendMessageMap.get("contentInfo"); 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket(idTemp, idTemp); sendWebsocket(idTemp, idTemp);
@@ -89,8 +96,9 @@ public class SendMessageUtils {
} }
@NotNull @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 sysAnnouncement = new SysAnnouncement();
sysAnnouncement.setInitiator(initiator);
sysAnnouncement.setDelFlag("0"); sysAnnouncement.setDelFlag("0");
sysAnnouncement.setSendStatus("0"); sysAnnouncement.setSendStatus("0");
sysAnnouncement.setSendTime(new Date()); sysAnnouncement.setSendTime(new Date());
@@ -335,7 +335,7 @@ public class LawsWarnService {
String title = content; 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo); bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
//飞书 //飞书
@@ -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) { 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); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content); bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
+1 -1
View File
@@ -32,7 +32,7 @@
return{ return{
visible:false, visible:false,
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload", uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static', downLoadFileUrl:window._CONFIG['domianPreviewURL']+'/sys/common/static',
myfileList:[], myfileList:[],
fileList:[], fileList:[],
fileTypeSatus:false, fileTypeSatus:false,
@@ -50,7 +50,7 @@
visible:false, visible:false,
// uploadAction:"http://10.0.1.25:8080/split/sarFileSplitItems/importSplitItems", // uploadAction:"http://10.0.1.25:8080/split/sarFileSplitItems/importSplitItems",
uploadAction:window._CONFIG['domianURL']+"/split/sarFileSplitItems/importSplitItems", uploadAction:window._CONFIG['domianURL']+"/split/sarFileSplitItems/importSplitItems",
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static', downLoadFileUrl:window._CONFIG['domianPreviewURL']+'/sys/common/static',
myfileList:[], myfileList:[],
fileList:[], fileList:[],
fileTypeSatus:false, fileTypeSatus:false,
@@ -37,7 +37,7 @@
visible: false, visible: false,
uploadAction: window._CONFIG['domianURL'] + '/split/sarFileSplitItems/upload', uploadAction: window._CONFIG['domianURL'] + '/split/sarFileSplitItems/upload',
upDataList: [], upDataList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/static',
fileList: [], fileList: [],
myfileList: [], myfileList: [],
isLoding: false, isLoding: false,
@@ -34,7 +34,7 @@
return { return {
visible: false, visible: false,
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload', uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/static',
myfileList: [], myfileList: [],
fileList: [], fileList: [],
fileTypeSatus: false, fileTypeSatus: false,
@@ -106,7 +106,7 @@ export default {
this.fileTypeSatus = true this.fileTypeSatus = true
}, },
mypreview(item) { mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1) let url = window._CONFIG['domianPreviewURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank') window.open(url, '_blank')
}, },
handleChange(info) { handleChange(info) {
@@ -188,17 +188,17 @@ export default {
let index1 = fileName.lastIndexOf('.') let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { // if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username)) // window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') { // } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) // let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') // window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { // } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) // let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') // window.open(url, '_blank')
} else { // } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} // }
} }
} }
} }
@@ -129,7 +129,7 @@ import { mapGetters } from 'vuex'
this.fileTypeSatus = true this.fileTypeSatus = true
}, },
mypreview(item) { mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1) let url = window._CONFIG['domianPreviewURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank') window.open(url, '_blank')
}, },
handleChange(info) { handleChange(info) {
@@ -211,17 +211,17 @@ import { mapGetters } from 'vuex'
let index1 = fileName.lastIndexOf('.') let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2) let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') { // if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id)) // window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') { // } else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) // let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') // window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') { // } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix) // let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank') // window.open(url, '_blank')
} else { // } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id }) downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
} // }
} }
} }
} }
@@ -2,6 +2,7 @@
<a-modal <a-modal
:title="$t('viewFile')" :title="$t('viewFile')"
:width="600" :width="600"
style="z-index: 1007"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@cancel="visibleFile = false" @cancel="visibleFile = false"
@@ -107,6 +107,7 @@
conList: [], conList: [],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
queryParam: {} queryParam: {}
} }
@@ -162,6 +162,12 @@
{{text}} {{text}}
</span> </span>
</span> </span>
<span slot="standard" slot-scope="text,record" :title="text">
<a class="textName" @click="standardClick(record)">
{{text}}
</a>
</span>
<span slot="designDeliverableTemplateName" slot-scope="text,record"> <span slot="designDeliverableTemplateName" slot-scope="text,record">
<span>{{record.designDeliverableTypeName}}</span><br v-if="record.designDeliverableTypeName"> <span>{{record.designDeliverableTypeName}}</span><br v-if="record.designDeliverableTypeName">
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1" <a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
@@ -306,7 +312,7 @@
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
width: 180, width: 180,
fixed: 'left', fixed: 'left',
scopedSlots: { customRender: 'titleName' } scopedSlots: { customRender: 'standard' }
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
@@ -840,6 +846,15 @@
this.loading = false this.loading = false
} }
}) })
},
standardClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.bussDocumentLibraryId
}
})
window.open(newUrl.href, '_blank')
} }
} }
} }
@@ -84,7 +84,8 @@
{}, {},
{ {
title: this.$t('standard'), title: this.$t('standard'),
value: 'serialNumber' value: 'serialNumber',
type: '4'
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
@@ -1503,7 +1503,7 @@
} }
} }
for (let i = 0; i < dataList.length; i++) { for (let i = 0; i < dataList.length; i++) {
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList.taskAffirmStatus == 'Rejected') && if ((dataList[i].taskAffirmStatus == 'Not started' || dataList[i].taskAffirmStatus == 'Rejected') &&
dataList[i].inventoryAffirmStatus == 'Accepted') { dataList[i].inventoryAffirmStatus == 'Accepted') {
if (dataList[i].engineeringInterfacePerson) { if (dataList[i].engineeringInterfacePerson) {
if (dataList[i].verifyDeliverableType) { if (dataList[i].verifyDeliverableType) {
@@ -125,6 +125,12 @@
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'msgTitile' } scopedSlots: { customRender: 'msgTitile' }
}, },
{
title: this.$t('Sponsor'),
align: 'center',
dataIndex: 'initiator',
width: 200,
},
{ {
title: this.$t('MessageType'), title: this.$t('MessageType'),
align: 'center', align: 'center',