67785 法规清单,催办功能完善。
This commit is contained in:
+494
-301
@@ -9767,313 +9767,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if(StringUtils.contains(expeditingType,OperatorTypeEnum.LAWS_INVENTORY_DESIGN_EXPEDITING.getValue())){
|
||||
// 只有studio催办的时候,才会给法规工程师发消息
|
||||
if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_STUDIO_EXPEDITING.getValue())){
|
||||
// 如果设计符合性流程状态为 清单待校核,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeCheckedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeCheckedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeCheckedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByInventoryAffirmDueDate(lawsInventoryEOList);
|
||||
Date inventoryAffirmDueDate = lawsInventoryEOList.get(0).getInventoryAffirmDueDate();
|
||||
String endTime = "";
|
||||
if(inventoryAffirmDueDate != null){
|
||||
endTime = DateUtils.formatDate(inventoryAffirmDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时校核法规清单内容并发起符合性流程,谢谢!");
|
||||
params.put("contentEn","Please check the content of the regulation list and initiate the compliance process in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 催办设计符合性流程状态为 清单待确认的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
|
||||
String designDutyId = designDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByDesignDueDate(lawsInventoryEOList);
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getDesignDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(designDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
// 催办设计符合性流程状态为 结果待提交的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
|
||||
String designDutyId = designDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(designDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
// 设计符合性 清单待校核状态数据催办。
|
||||
this.designExpeditingToBeChecked(projectLibraryId, projectLawsInventoryEOList);
|
||||
// 设计符合性 结果待审查状态数据催办。
|
||||
this.designExpeditingToBeReviewed(projectLibraryId, projectLawsInventoryEOList);
|
||||
}
|
||||
// 设计符合性 清单待确认状态数据催办
|
||||
this.designExpeditingToBeConfirmed(projectLibraryId, projectLawsInventoryEOList);
|
||||
// 设计符合性 结果待提交状态数据催办
|
||||
this.designExpeditingToBeSubmitted(projectLibraryId, projectLawsInventoryEOList);
|
||||
}
|
||||
if(StringUtils.contains(expeditingType,OperatorTypeEnum.LAWS_INVENTORY_VERIFY_EXPEDITING.getValue())){
|
||||
// 只有studio催办的时候,才会给法规工程师发消息
|
||||
if(StringUtils.equals(operateType,OperatorTypeEnum.LAWS_INVENTORY_STUDIO_EXPEDITING.getValue())){
|
||||
// 如果设计符合性流程状态为 清单待校核,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeCheckedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeCheckedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeCheckedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByInventoryAffirmDueDate(lawsInventoryEOList);
|
||||
Date inventoryAffirmDueDate = lawsInventoryEOList.get(0).getInventoryAffirmDueDate();
|
||||
String endTime = "";
|
||||
if(inventoryAffirmDueDate != null){
|
||||
endTime = DateUtils.formatDate(inventoryAffirmDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时校核法规清单内容并发起符合性流程,谢谢!");
|
||||
params.put("contentEn","Please check the content of the regulation list and initiate the compliance process in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 催办验证符合性流程状态为 清单待确认的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
|
||||
String verifyDutyId = verifyDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(verifyDueDate != null){
|
||||
endTime = DateUtils.formatDate(verifyDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
// 催办验证符合性流程状态为 结果待提交的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
|
||||
String verifyDutyId = verifyDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
|
||||
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(verifyDueDate != null){
|
||||
endTime = DateUtils.formatDate(verifyDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
// 验证符合性 清单待校核状态数据催办。
|
||||
this.verifyExpeditingToBeChecked(projectLibraryId, projectLawsInventoryEOList);
|
||||
// 验证符合性 结果待审查状态数据催办。
|
||||
this.verifyExpeditingToBeReviewed(projectLibraryId, projectLawsInventoryEOList);
|
||||
}
|
||||
// 验证符合性 清单待确认状态数据催办
|
||||
this.verifyExpeditingToBeConfirmed(projectLibraryId, projectLawsInventoryEOList);
|
||||
// 验证符合性 结果待提交状态数据催办
|
||||
this.verifyExpeditingToBeSubmitted(projectLibraryId, projectLawsInventoryEOList);
|
||||
}
|
||||
|
||||
/*//获取已经发起的 任务确认流程信息(当前处理人)
|
||||
@@ -10288,6 +10003,484 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证符合性 结果待提交状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void verifyExpeditingToBeSubmitted(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 催办验证符合性流程状态为 结果待提交的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
|
||||
String verifyDutyId = verifyDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
|
||||
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(verifyDueDate != null){
|
||||
endTime = DateUtils.formatDate(verifyDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证符合性 清单待确认状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void verifyExpeditingToBeConfirmed(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 催办验证符合性流程状态为 清单待确认的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> verifyDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> verifyDutyMap : verifyDutyGroupMap.entrySet()) {
|
||||
String verifyDutyId = verifyDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = verifyDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(verifyDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
Date verifyDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(verifyDueDate != null){
|
||||
endTime = DateUtils.formatDate(verifyDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryId, todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证符合性 结果待审查状态数据催办。
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void verifyExpeditingToBeReviewed(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 如果验证符合性流程状态为 结果待审查,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeReviewedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeReviewedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeReviewedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getDesignDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证符合性 清单待校核状态数据催办。
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void verifyExpeditingToBeChecked(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 如果验证符合性流程状态为 清单待校核,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeCheckedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeCheckedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeCheckedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByInventoryAffirmDueDate(lawsInventoryEOList);
|
||||
Date inventoryAffirmDueDate = lawsInventoryEOList.get(0).getInventoryAffirmDueDate();
|
||||
String endTime = "";
|
||||
if(inventoryAffirmDueDate != null){
|
||||
endTime = DateUtils.formatDate(inventoryAffirmDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时校核法规清单内容并发起符合性流程,谢谢!");
|
||||
params.put("contentEn","Please check the content of the regulation list and initiate the compliance process in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计符合性 结果待提交状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void designExpeditingToBeSubmitted(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 催办设计符合性流程状态为 结果待提交的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeSubmitLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeSubmitLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeSubmitLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getVerifyDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
|
||||
String designDutyId = designDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
this.lawsInventoryEOListSortByVerifyDueDate(lawsInventoryEOList);
|
||||
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getVerifyDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(designDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计符合性 清单待确认状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void designExpeditingToBeConfirmed(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 催办设计符合性流程状态为 清单待确认的 责任人
|
||||
List<ProjectLawsInventoryEO> toBeConfirmedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeConfirmedLawsInventoryList)) {
|
||||
Map<String, List<ProjectLawsInventoryEO>> designDutyGroupMap = toBeConfirmedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getDesignDutyId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> designDutyMap : designDutyGroupMap.entrySet()) {
|
||||
String designDutyId = designDutyMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = designDutyMap.getValue();
|
||||
if(StringUtils.isEmpty(designDutyId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByDesignDueDate(lawsInventoryEOList);
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getDesignDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(designDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时查看确认以下任务要求,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryId, todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
String regulationOwnerId = lawsInventoryEOList.get(0).getRegulationOwnerId();
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计符合性 结果待审查状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void designExpeditingToBeReviewed(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 如果设计符合性流程状态为 结果待审查,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeReviewedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeReviewedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeReviewedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByDesignDueDate(lawsInventoryEOList);
|
||||
Date designDueDate = lawsInventoryEOList.get(0).getDesignDueDate();
|
||||
String endTime = "";
|
||||
if(designDueDate != null){
|
||||
endTime = DateUtils.formatDate(designDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请尽快查看处理此项任务,谢谢!");
|
||||
params.put("contentEn","Hello! Please check and address the task ASAP. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
List<SysUser> regulationOwnerUserList = this.sysUserService.querySysUserListByIdList(Arrays.asList(regulationOwnerId.split(",")));
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator",regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计符合性 清单待校核状态数据催办
|
||||
* @param projectLibraryId
|
||||
* @param projectLawsInventoryEOList
|
||||
*/
|
||||
private void designExpeditingToBeChecked(String projectLibraryId, List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
|
||||
// 如果设计符合性流程状态为 清单待校核,催办时就需要给这一条数据的法规工程师发消息
|
||||
List<ProjectLawsInventoryEO> toBeCheckedLawsInventoryList = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag =false;
|
||||
if (StringUtils.equals(lawsInventory.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(toBeCheckedLawsInventoryList)){
|
||||
Map<String, List<ProjectLawsInventoryEO>> regulationOwnerGroupMap = toBeCheckedLawsInventoryList.stream().collect(Collectors.groupingBy(ProjectLawsInventoryEO::getRegulationOwnerId));
|
||||
for (Map.Entry<String, List<ProjectLawsInventoryEO>> regulationOwnerMap : regulationOwnerGroupMap.entrySet()) {
|
||||
String regulationOwnerId = regulationOwnerMap.getKey();
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = regulationOwnerMap.getValue();
|
||||
if(StringUtils.isEmpty(regulationOwnerId) || CollectionUtils.isEmpty(lawsInventoryEOList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
this.lawsInventoryEOListSortByInventoryAffirmDueDate(lawsInventoryEOList);
|
||||
Date inventoryAffirmDueDate = lawsInventoryEOList.get(0).getInventoryAffirmDueDate();
|
||||
String endTime = "";
|
||||
if(inventoryAffirmDueDate != null){
|
||||
endTime = DateUtils.formatDate(inventoryAffirmDueDate);
|
||||
}
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(regulationOwnerId.split(","));
|
||||
// 给法规工程师发消息
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("contentCn","您好,请及时校核法规清单内容并发起符合性流程,谢谢!");
|
||||
params.put("contentEn","Please check the content of the regulation list and initiate the compliance process in a timely manner. Thank you!");
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
params.put("Initiator",projectLibraryBase.getStudioEngineerName());
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<SysRole> getRoleByUserId(String projectLibraryId,String cut) {
|
||||
|
||||
Reference in New Issue
Block a user