67412 法规清单-催办问题修改。
This commit is contained in:
+104
-53
@@ -9649,62 +9649,61 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
lawsInventoryEOQueryWrapper.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList);
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(lawsInventoryEOQueryWrapper);
|
||||
|
||||
// 只有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())
|
||||
|| 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 催办类型 可以只催设计符合性 也可以只催验证符合性
|
||||
String expeditingType = json.getString("expeditingType");
|
||||
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;
|
||||
@@ -9809,6 +9808,58 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user