Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ public enum MessageTypeEnum {
|
||||
//DESIGN_COMPLIANCE_NOTIFICATION("Design Compliance Notification", "12"), // 设计符合性通知
|
||||
//PRE_HOMO_NOTIFICATION("Pre-Homo Notification", "13"), // Pre-Homo通知
|
||||
//VALIDATION_COMPLIANCE_NOTIFICATION("Validation Compliance Notification", "14"), // 验证符合性通知
|
||||
SYSTEMATIC_NOTIFICATION("Systematic Notification","", "15"), // 系统通知
|
||||
SYSTEMATIC_NOTIFICATION("Systematic Notification","系统通知", "15"), // 系统通知
|
||||
LIST_CONFIRMATION("List Confirmation", "","17"), // 清单确认
|
||||
TASK_CONFIRMATION("Task Confirmation", "","18"), // 任务确认
|
||||
COMPLIANCE_CONFIRMATION("Compliance Confirmation","", "19"), // 符合性确认
|
||||
|
||||
+135
-54
@@ -2309,10 +2309,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -2330,10 +2331,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",sdtIdList);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_BACK.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -2417,11 +2419,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate","");
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params,null);
|
||||
|
||||
return updateBatchById(updateEOList);
|
||||
}
|
||||
@@ -2655,11 +2658,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -2830,13 +2834,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
// params.put("back_url_cn",(String)hrefFeishuMap.get("hrefFeishu_cn"));
|
||||
// params.put("back_url_en",(String)hrefFeishuMap.get("hrefFeishu_en"));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -6249,19 +6254,30 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String now = sdf.format(new Date());// 当前时间
|
||||
QueryWrapper<ParamsManifestEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("state", ManifestStateEnum.COLLECTING.getValue());
|
||||
// queryWrapper.eq("id","391e08fd7ed54740a20924f174aa83a2");//测试使用
|
||||
List<ParamsManifestEO> manifestEOS = paramsManifestEOService.list(queryWrapper);
|
||||
for (ParamsManifestEO manifestEO : manifestEOS) {
|
||||
//项目名称
|
||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(manifestEO.getProjectId(), manifestEO.getProjectVersion(), null);
|
||||
if (ObjectUtils.isNotEmpty(projectInfo)) {
|
||||
manifestEO.setProjectName(projectInfo.getProjectName());
|
||||
//url
|
||||
String urlParamsStr = parseUrlParams(manifestEO,null,null);
|
||||
String urlParamsStr = parseUrlParams(manifestEO,null,projectInfo.getProjectNameEn());
|
||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||
|
||||
String urlParamsStrCn = parseUrlParams(manifestEO,CutEnum.CN.getValue(),projectInfo.getProjectNameEn());
|
||||
String urlParamsStrEn = parseUrlParams(manifestEO,CutEnum.EN.getValue(),projectInfo.getProjectNameEn());
|
||||
String hrefFeishuCn = backUrl + "/ParameterItemCollection" + urlParamsStrCn;
|
||||
String hrefFeishuEn = backUrl + "/ParameterItemCollection" + urlParamsStrEn;
|
||||
//查出对应清单
|
||||
List<ParamsCollectManifestEO> collectManifestEOS = paramsCollectManifestEOMapper.queryByParamManifestId(manifestEO.getId());
|
||||
Map<String, List<String>> seven = new HashMap<>();
|
||||
Map<String, List<String>> three = new HashMap<>();
|
||||
Map<String, List<String>> today = new HashMap<>();
|
||||
List<String> userIdList7 = new ArrayList<>();
|
||||
List<String> userIdList3 = new ArrayList<>();
|
||||
List<String> userIdList0 = new ArrayList<>();
|
||||
String dueDate = "";
|
||||
for (ParamsCollectManifestEO collectManifestEO : collectManifestEOS) {
|
||||
String thirdId = null;
|
||||
if (CollectManifestStateEnum.WAIT_SDT.getValue().equals(collectManifestEO.getState())
|
||||
@@ -6271,6 +6287,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
SysUser sdt = sysUserService.getUserByName(collectManifestEO.getSdt());
|
||||
if (ObjectUtils.isNotEmpty(sdt)) {
|
||||
thirdId = sdt.getThirdId();
|
||||
userIdList7.add(sdt.getId());
|
||||
userIdList3.add(sdt.getId());
|
||||
userIdList0.add(sdt.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6281,16 +6300,21 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
SysUser dre = sysUserService.getUserByName(collectManifestEO.getDre());
|
||||
if (ObjectUtils.isNotEmpty(dre)) {
|
||||
thirdId = dre.getThirdId();
|
||||
userIdList7.add(dre.getId());
|
||||
userIdList3.add(dre.getId());
|
||||
userIdList0.add(dre.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
//截止时间
|
||||
if (ObjectUtils.isNotEmpty(thirdId) && ObjectUtils.isNotEmpty(collectManifestEO.getDeadline())) {
|
||||
String deadline = sdf.format(collectManifestEO.getDeadline());
|
||||
dueDate = sdf.format(collectManifestEO.getDeadline());
|
||||
//判断日期
|
||||
int days = 0;
|
||||
long days = 0;
|
||||
try {
|
||||
days = (int) (sdf.parse(deadline).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000);
|
||||
// days = (int) (sdf.parse(deadline).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000);
|
||||
days = (sdf.parse(deadline).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000L);;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new JeroBootException("时间获取失败");
|
||||
@@ -6305,7 +6329,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String flag = "warn";
|
||||
String title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
|
||||
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
||||
"\n发起人: 系统通知";
|
||||
@@ -6318,16 +6342,33 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> stringList = seven.get(key);
|
||||
String join = StringUtils.join(stringList, ",");
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",还有7天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire in 7 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirds, feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
// feishuMsgVo.setTitle(title);
|
||||
// feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",还有7天到期,请及时查看处理");
|
||||
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
// feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire in 7 days. Please check and address it in a timely manner");
|
||||
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||
// feishuMsgVo.setUrl(hrefFeishu);
|
||||
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
// feishuService.sendCard(thirds, feishuMsgVo);
|
||||
//
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",还有7天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire in 7 days. Please check and address it in a timely manner.";
|
||||
userIdList7 = userIdList7.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFeiEn);
|
||||
params.put("userIdList",userIdList7);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiatorCn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getNameCn());
|
||||
params.put("initiatorEn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
@@ -6339,16 +6380,34 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> stringList = three.get(key);
|
||||
String join = StringUtils.join(stringList, ",");
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",还有3天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire in 3 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirds, feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
// feishuMsgVo.setTitle(title);
|
||||
// feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",还有3天到期,请及时查看处理");
|
||||
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
// feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire in 3 days. Please check and address it in a timely manner");
|
||||
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||
// feishuMsgVo.setUrl(hrefFeishu);
|
||||
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
// feishuService.sendCard(thirds, feishuMsgVo);
|
||||
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",还有3天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire in 3 days. Please check and address it in a timely manner.";
|
||||
userIdList3 = userIdList3.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFeiEn);
|
||||
params.put("userIdList",userIdList3);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiatorCn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getNameCn());
|
||||
params.put("initiatorEn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
@@ -6360,16 +6419,34 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> stringList = today.get(key);
|
||||
String join = StringUtils.join(stringList, ",");
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",将于今天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire today. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirds, feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
// feishuMsgVo.setTitle(title);
|
||||
// feishuMsgVo.setCnContentUpper("您参与填写的参数" + join + ",将于今天到期,请及时查看处理");
|
||||
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
// feishuMsgVo.setEnContentUpper("The parameter " + join + " you filled in will expire today. Please check and address it in a timely manner");
|
||||
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||
// feishuMsgVo.setUrl(hrefFeishu);
|
||||
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
// feishuService.sendCard(thirds, feishuMsgVo);
|
||||
|
||||
String contentInfoFeiCn = "您参与填写的参数" + join + ",将于今天到期,请及时查看处理。";
|
||||
String contentInfoFeiEn = "The parameter " + join + " you filled in will expire today. Please check and address it in a timely manner.";
|
||||
userIdList0 = userIdList0.stream().distinct().collect(Collectors.toList());
|
||||
//飞书消息(模板-20230410)
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentInfoFeiCn",contentInfoFeiCn);
|
||||
params.put("contentInfoFeiEn",contentInfoFeiEn);
|
||||
params.put("userIdList",userIdList0);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiatorCn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getNameCn());
|
||||
params.put("initiatorEn",MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
params.put("dueDate",dueDate);
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,flag);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
@@ -6728,11 +6805,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate","");
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_NO_DEADLINE.getValue(),params,null);
|
||||
|
||||
|
||||
return Result.OK("强制撤回成功!");
|
||||
@@ -6864,11 +6942,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -6926,11 +7005,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
@@ -6980,11 +7060,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
params.put("userIdList",Arrays.asList(sysUser.getId().split(",")));
|
||||
params.put("projectCn",projectInfo.getProjectName());
|
||||
params.put("projectEn",projectInfo.getProjectNameEn());
|
||||
params.put("initiator",currentUser.getUsername());
|
||||
params.put("initiatorCn",currentUser.getUsername());
|
||||
params.put("initiatorEn",currentUser.getUsername());
|
||||
params.put("dueDate",sdf.format(deadline));
|
||||
params.put("back_url_cn",hrefFeishuCn);
|
||||
params.put("back_url_en",hrefFeishuEn);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params);
|
||||
feishuService.sendMessageHomoParameterCollection(TemplateInfoEnum2.HOMO_PARAMETER_COLLECTION_GREEN.getValue(),params,null);
|
||||
} catch (Exception e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -6996,10 +7077,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> stringList = today.get(thirdId);
|
||||
if (ObjectUtils.isEmpty(stringList)) {
|
||||
stringList = new ArrayList<>();
|
||||
stringList.add("NIO-" + collectManifestEO.getNioNumber());
|
||||
stringList.add(collectManifestEO.getNioNumber());
|
||||
today.put(thirdId, stringList);
|
||||
} else {
|
||||
stringList.add("NIO-" + collectManifestEO.getNioNumber());
|
||||
stringList.add(collectManifestEO.getNioNumber());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+31
@@ -2,6 +2,9 @@ package com.jero.modules.cert.collect.task;
|
||||
|
||||
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -28,3 +31,31 @@ public class ScheduledTask {
|
||||
|
||||
|
||||
}
|
||||
|
||||
//测试定时任务使用
|
||||
//@Component
|
||||
//@Slf4j
|
||||
//public class ScheduledTask implements Job {
|
||||
//
|
||||
// @Autowired
|
||||
// private IParamsCollectManifestEOService paramsCollectManifestEOServicea;
|
||||
//
|
||||
// /**
|
||||
// * 监控参数收集任务的截止时间,并根据时间段发送飞书
|
||||
// */
|
||||
// //@Scheduled(cron = "0 30 14 * * ?")
|
||||
//// @Scheduled(cron = "0 0 0 */1 * ?")
|
||||
//// public void checkTime() {
|
||||
//// log.info("-----checkDeadline-----begin-----------");
|
||||
////
|
||||
//// paramsCollectManifestEOServicea.checkDeadline();
|
||||
////
|
||||
//// log.info("-----checkDeadline------end-----------");
|
||||
//// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
// paramsCollectManifestEOServicea.checkDeadline();
|
||||
// }
|
||||
//}
|
||||
|
||||
+2
-2
@@ -153,10 +153,10 @@ public interface IFeishuService {
|
||||
void sendMessageRegulationOpinionCollection(String templeteId,Map<String,Object> params);
|
||||
|
||||
/**
|
||||
* 飞书消息模板--认证参数收集(主题颜色为红色或绿色)
|
||||
* 飞书消息模板--认证参数收集(主题颜色为绿色)
|
||||
* @param templeteId
|
||||
* @param params
|
||||
*/
|
||||
void sendMessageHomoParameterCollection(String templeteId,Map<String,Object> params);
|
||||
void sendMessageHomoParameterCollection(String templeteId,Map<String,Object> params,String flag);
|
||||
|
||||
}
|
||||
|
||||
+9
-5
@@ -1581,7 +1581,7 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
* @param params
|
||||
*/
|
||||
@Override
|
||||
public void sendMessageHomoParameterCollection(String templeteId, Map<String, Object> params) {
|
||||
public void sendMessageHomoParameterCollection(String templeteId, Map<String, Object> params,String flag) {
|
||||
List<String> userIdList = (List<String>) params.get("userIdList");
|
||||
if (CollectionUtils.isNotEmpty(userIdList)) {
|
||||
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
|
||||
@@ -1592,8 +1592,8 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
String back_url_en = (String) params.get("back_url_en");
|
||||
String projectCn = (String) params.get("projectCn");
|
||||
String projectEn = (String) params.get("projectEn");
|
||||
String initiator = (String) params.get("initiator");
|
||||
// String initiatorEn = (String) params.get("initiatorEn");
|
||||
String initiatorCn = (String) params.get("initiatorCn");
|
||||
String initiatorEn = (String) params.get("initiatorEn");
|
||||
String dueDate = (String) params.get("dueDate");
|
||||
try {
|
||||
for (String userId : userIdList) {
|
||||
@@ -1610,8 +1610,12 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
templateVariableMap.put("view_url_en",back_url_en);
|
||||
templateVariableMap.put("projectCn"," " + projectCn);
|
||||
templateVariableMap.put("projectEn"," " + projectEn);
|
||||
templateVariableMap.put("initiator"," " + initiator);
|
||||
// templateVariableMap.put("initiatorEn",initiatorEn);
|
||||
templateVariableMap.put("initiatorCn"," " + initiatorCn);
|
||||
if(StringUtils.isNotBlank(flag)){
|
||||
templateVariableMap.put("initiatorEn"," " + initiatorEn);
|
||||
}else{
|
||||
templateVariableMap.put("initiatorEn"," " + initiatorCn);
|
||||
}
|
||||
templateVariableMap.put("dueDate"," " + dueDate);
|
||||
|
||||
larkMesJson.put("templateVariableMap",templateVariableMap);
|
||||
|
||||
+8
@@ -222,4 +222,12 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String reasonForReturn;
|
||||
|
||||
//排序(1->正序, 2->倒序)
|
||||
@TableField(exist = false)
|
||||
private String orderBy;
|
||||
|
||||
//排序字段
|
||||
@TableField(exist = false)
|
||||
private String orderByField;
|
||||
}
|
||||
|
||||
+119
@@ -29,6 +29,7 @@ import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.dummy.enums.OrderEnum;
|
||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -83,6 +84,7 @@ import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.*;
|
||||
import java.text.Collator;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -1374,9 +1376,126 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
this.createQueryPermission(queryWrapper,roleCode);
|
||||
IPage<ProjectCertificationInventoryEO> pageList = this.page(page, queryWrapper);
|
||||
this.disposeData(pageList.getRecords(),cut);
|
||||
List<ProjectCertificationInventoryEO> records = this.hearSort(projectCertificationInventoryEO, pageList.getRecords());
|
||||
pageList.setRecords(records);
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头排序
|
||||
* @param pciEo
|
||||
* @param datas
|
||||
* @return
|
||||
*/
|
||||
private List<ProjectCertificationInventoryEO> hearSort(ProjectCertificationInventoryEO pciEo, List<ProjectCertificationInventoryEO> datas) {
|
||||
String orderBy = pciEo.getOrderBy();
|
||||
String orderByField = pciEo.getOrderByField();
|
||||
if(ObjectUtils.isNotEmpty(orderByField)){
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
// 类别 category
|
||||
if(StringUtils.equals("category",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1Category = (StringUtils.isNotEmpty(e1.getCategory()) ? e1.getCategory() : "");
|
||||
String e2Category = (StringUtils.isNotEmpty(e2.getCategory()) ? e2.getCategory() : "");
|
||||
return comparator.compare(e1Category,e2Category);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1Category = (StringUtils.isNotEmpty(e1.getCategory()) ? e1.getCategory() : "");
|
||||
String e2Category = (StringUtils.isNotEmpty(e2.getCategory()) ? e2.getCategory() : "");
|
||||
return comparator.compare(e2Category,e1Category);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 检验项目 inspectionItem
|
||||
if(StringUtils.equals("inspectionItem",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1InspectionItem = (StringUtils.isNotEmpty(e1.getInspectionItem()) ? e1.getInspectionItem() : "");
|
||||
String e2InspectionItem = (StringUtils.isNotEmpty(e2.getInspectionItem()) ? e2.getInspectionItem() : "");
|
||||
return comparator.compare(e1InspectionItem,e2InspectionItem);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1InspectionItem = (StringUtils.isNotEmpty(e1.getInspectionItem()) ? e1.getInspectionItem() : "");
|
||||
String e2InspectionItem = (StringUtils.isNotEmpty(e2.getInspectionItem()) ? e2.getInspectionItem() : "");
|
||||
return comparator.compare(e2InspectionItem,e1InspectionItem);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 标准编号 serialNumber
|
||||
if(StringUtils.equals("serialNumber",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1SerialNumber = (StringUtils.isNotEmpty(e1.getSerialNumber()) ? e1.getSerialNumber() : "");
|
||||
String e2SerialNumber = (StringUtils.isNotEmpty(e2.getSerialNumber()) ? e2.getSerialNumber() : "");
|
||||
return comparator.compare(e1SerialNumber,e2SerialNumber);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1SerialNumber = (StringUtils.isNotEmpty(e1.getSerialNumber()) ? e1.getSerialNumber() : "");
|
||||
String e2SerialNumber = (StringUtils.isNotEmpty(e2.getSerialNumber()) ? e2.getSerialNumber() : "");
|
||||
return comparator.compare(e2SerialNumber,e1SerialNumber);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 交付物类型 deliverableTypeName
|
||||
if(StringUtils.equals("deliverableTypeName",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1DeliverableTypeName = (StringUtils.isNotEmpty(e1.getDeliverableTypeName()) ? e1.getDeliverableTypeName() : "");
|
||||
String e2DeliverableTypeName = (StringUtils.isNotEmpty(e2.getDeliverableTypeName()) ? e2.getDeliverableTypeName() : "");
|
||||
return comparator.compare(e1DeliverableTypeName,e2DeliverableTypeName);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1DeliverableTypeName = (StringUtils.isNotEmpty(e1.getDeliverableTypeName()) ? e1.getDeliverableTypeName() : "");
|
||||
String e2DeliverableTypeName = (StringUtils.isNotEmpty(e2.getDeliverableTypeName()) ? e2.getDeliverableTypeName() : "");
|
||||
return comparator.compare(e2DeliverableTypeName,e1DeliverableTypeName);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 截止日期 endTime
|
||||
if(StringUtils.equals("endTime",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1EndTime = (e1.getEndTime() != null ? DateUtils.formatDate(e1.getEndTime()) : "");
|
||||
String e2EndTime = (e2.getEndTime() != null ? DateUtils.formatDate(e2.getEndTime()) : "");
|
||||
return comparator.compare(e1EndTime,e2EndTime);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1EndTime = (e1.getEndTime() != null ? DateUtils.formatDate(e1.getEndTime()) : "");
|
||||
String e2EndTime = (e2.getEndTime() != null ? DateUtils.formatDate(e2.getEndTime()) : "");
|
||||
return comparator.compare(e2EndTime,e1EndTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 流程状态 flowStatusName
|
||||
if(StringUtils.equals("flowStatusName",orderByField)){
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1, e2)->{
|
||||
String e1FlowStatusName = (StringUtils.isNotEmpty(e1.getFlowStatusName()) ? e1.getFlowStatusName() : "");
|
||||
String e2FlowStatusName = (StringUtils.isNotEmpty(e2.getFlowStatusName()) ? e2.getFlowStatusName() : "");
|
||||
return comparator.compare(e1FlowStatusName,e2FlowStatusName);
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(datas,(e1,e2)->{
|
||||
String e1FlowStatusName = (StringUtils.isNotEmpty(e1.getFlowStatusName()) ? e1.getFlowStatusName() : "");
|
||||
String e2FlowStatusName = (StringUtils.isNotEmpty(e2.getFlowStatusName()) ? e2.getFlowStatusName() : "");
|
||||
return comparator.compare(e2FlowStatusName,e1FlowStatusName);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createQueryPermission(QueryWrapper<ProjectCertificationInventoryEO> queryWrapper, String roleCode) {
|
||||
/**
|
||||
|
||||
@@ -1785,4 +1785,5 @@ module.exports = {
|
||||
onlyDesignComplianceConfirmationSelected:'Only data with a design compliance confirmation process status of task to be confirmed, result to be submitted, or verification compliance confirmation process status of task to be confirmed, result to be submitted can be selected',
|
||||
oneThePersonnelMustBeSelected:'One of the personnel must be selected',
|
||||
pleaseSelectRegulatoryCurrentLogin:'Please select Regulatory Engineer as the data for the current login',
|
||||
cannotSetResponsibilityAreas:'Cannot set an interface person due to different responsibility areas',
|
||||
}
|
||||
@@ -1887,4 +1887,5 @@ module.exports = {
|
||||
onlyDesignComplianceConfirmationSelected:'只能选择设计符合性确认流程状态为任务待确认、结果待提交或验证符合性确认流程状态为任务待确认、结果待提交的数据',
|
||||
oneThePersonnelMustBeSelected:'必须选择其中一个人员',
|
||||
pleaseSelectRegulatoryCurrentLogin:'请选择法规工程师为当前登录人的数据',
|
||||
cannotSetResponsibilityAreas:'所属不同责任领域,不能设置接口人',
|
||||
}
|
||||
@@ -100,7 +100,7 @@
|
||||
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="designDutyId">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
|
||||
<a-select :placeholder="$t('cannotSetResponsibilityAreas')"
|
||||
class="box-input"
|
||||
allowClear
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
@@ -382,13 +382,13 @@
|
||||
if (res.success) {
|
||||
this.regulatoryEngineerList = res.result.lawEngineerList || [] //法规工程师
|
||||
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] //工程接口人
|
||||
if (this.regulatoryEngineerList.length == 1) {
|
||||
this.formInline.regulationOwnerId = this.regulatoryEngineerList[0].value
|
||||
}
|
||||
if (this.engineeringInterfacePersonList.length == 1) {
|
||||
this.formInline.engineeringInterfacePerson = this.engineeringInterfacePersonList[0].value
|
||||
}
|
||||
this.formInline = {...this.formInline}
|
||||
// if (this.regulatoryEngineerList.length == 1) {
|
||||
// this.formInline.regulationOwnerId = this.regulatoryEngineerList[0].value
|
||||
// }
|
||||
// if (this.engineeringInterfacePersonList.length == 1) {
|
||||
// this.formInline.engineeringInterfacePerson = this.engineeringInterfacePersonList[0].value
|
||||
// }
|
||||
// this.formInline = {...this.formInline}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -405,7 +405,7 @@
|
||||
this.$nextTick(() => {
|
||||
this.ids = data || []
|
||||
this.formInline = {}
|
||||
if (content) {
|
||||
if (content && code == '0') {
|
||||
this.formInline.dutyTerritory = content.dutyTerritory
|
||||
this.queryPersonByProject(content)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user