diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/MessageType2Enum.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/MessageType2Enum.java index bf4544532..67ff821fc 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/MessageType2Enum.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/constant/enums/MessageType2Enum.java @@ -13,7 +13,8 @@ public enum MessageType2Enum { VALIDATION_COMPLIANCE_CONFIRMATION("Validation Compliance Confirmation","验证符合性确认"), REGULATION_OPINION_COLLECTION("Regulation Opinion Collection","法规意见收集"), REGULATION_TECHNICAL_ASSESSMENT("Regulation Technical Assessment","法规技术评估"), - HOMO_PARAMETER_COLLECTION("Homo Parameter Collection","认证参数收集"); + HOMO_PARAMETER_COLLECTION("Homo Parameter Collection","认证参数收集"), + CERTIFICATION_LIST_CONFIRMATION("Certification List Confirmation","认证清单确认"); String en; String cn; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java new file mode 100644 index 000000000..af9737288 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/enums/TemplateInfoEnum2.java @@ -0,0 +1,129 @@ +package com.jero.modules.feishu.enums; + +/** + * 飞书消息模板枚举类 由于开发分支问题,此枚举只在认证清单流程中使用, 与 TemplateInfoEnum 作用一样 + */ +public enum TemplateInfoEnum2 { + + // 认证消息 + CERTIFICATION_MESSAGE1("stuido催办,认证工程师收到消息","ctp_AAuDmU58lKqB"), +// HOME_PARAMETER_COLLECTION2("工程接口人下发参数,填写人接收任务","ctp_AAfv49aET4Rn"), +// HOME_PARAMETER_COLLECTION3("工程接口人退回,通知认证工程师","ctp_AAfvQy0bsb6Y"), +// HOME_PARAMETER_COLLECTION4("填写人退回,通知工程接口人","ctp_AAfK3TvbkTLq"), +// HOME_PARAMETER_COLLECTION5("您的参数收集任务还有7天到期,请及时查看处理","ctp_AAfvdg0Cx6yN"), +// HOME_PARAMETER_COLLECTION6("您的参数收集任务已被XXX重新分发给XXX","ctp_AAfvKkz192fn"), +// HOME_PARAMETER_COLLECTION7(" 您的参数收集任务已被XXX撤回","ctp_AAfK2oTpFn9M"), +// HOME_PARAMETER_COLLECTION8(" 您的参数收集任务还有3天到期,请及时查看处理","ctp_AAft9XcQbrlT"), +// HOME_PARAMETER_COLLECTION9(" 您的参数收集任务将于今天到期,请及时查看处理","ctp_AAfefHo8thrQ"), +// +// REGULATION_TECHNICAL_ASSESSMENT1("法规技术评估发起提醒评估人","ctp_AAf2qRfouGcc"), +// REGULATION_TECHNICAL_ASSESSMENT2("评估人提交通知发起人审批","ctp_AAfvKkz1xSd7"), +// REGULATION_TECHNICAL_ASSESSMENT3("发起人审查通过,通知评估人","ctp_AAfK2oTpRGSa"), +// REGULATION_TECHNICAL_ASSESSMENT4("发起人审查退回,评估人接收 - 任务","ctp_AAfK2oTp4Mir"), +// REGULATION_TECHNICAL_ASSESSMENT5("任务提醒,评估人接收-任务 到期前三天","ctp_AAfvKkz1bozO"), +// REGULATION_TECHNICAL_ASSESSMENT6("任务提醒,评估人接收-任务 当天","ctp_AAf2qRforjyP"), +// +// REGULATION_OPINION_COLLECTION1("法规意见收集发起提醒评估人","ctp_AAftzD2mN9jr"), +// REGULATION_OPINION_COLLECTION2("任务提醒,评估人接收-任务 到期前三天","ctp_AAfK2oTpzhDX"), +// REGULATION_OPINION_COLLECTION3("任务提醒,评估人接收-任务 当天","ctp_AAfefHo8XrBl"), +// REGULATION_OPINION_COLLECTION4("评估人提交通知发起人","ctp_AAft9XcQW1lV"), +// REGULATION_OPINION_COLLECTION5("任务完成当天通知发起人","ctp_AAftJ7q0YClP"), +// +// +// +// +// SUBSCRIPTION_NOTIFICATION1("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"), +// SUBSCRIPTION_NOTIFICATION2("法规领域订阅更新","ctp_AAfvdg0Cy90I"), +// SUBSCRIPTION_NOTIFICATION3("虚拟清单订阅更新","ctp_AAfRLrOqGiF9"), +// +// SHARE_FORWARD1("转发推送","ctp_AAfdBUtdLJog"), +// SHARE_FORWARD2("问题知识库转发推送","ctp_AAfvQy0brRtq"), +// SHARE_FORWARD3("问题知识库评论信息","ctp_AAf2qRfosO2P"), +// +// REGULATION_EARLY_WARNING1("订阅法规预警","ctp_AAfvQy0br1R7"), +// REGULATION_EARLY_WARNING2("预警信息分享","ctp_AAfK3TvbktC9"), +// +// REGULATION_LIST_CONFIRMATION1("Studio发起,法规/认证接收-任务","ctp_AAfdBUtdpKCX"), +// REGULATION_LIST_CONFIRMATION2("任务提醒,法规认证接收-任务","ctp_AAftzD2mK31z"), +// REGULATION_LIST_CONFIRMATION3("状态通知,Studio接收/法规拒绝","ctp_AAftzD2mK7e6"), +// REGULATION_LIST_CONFIRMATION4("状态通知,Studio接收/认证拒绝","ctp_AAfvdg0C4OXb"), +// +// REGULATION_TASK_CONFIRMATION1("发起,工程接口人接收-任务","ctp_AAfvdg0C4qSM"), +// REGULATION_TASK_CONFIRMATION2("询问工程师,工程师接收-任务","ctp_AAftJ7q0OgGw"), +// REGULATION_TASK_CONFIRMATION3("工程师退回,接口人接收消息-任务","ctp_AAftzD2meZ6I"), +// REGULATION_TASK_CONFIRMATION4("工程师提交,接口人接收消息-任务","ctp_AAftJ7q0O8yL"), +// REGULATION_TASK_CONFIRMATION5("任务提醒,工程接口人接收-任务 3天前","ctp_AAfvdg0CdIu8"), +// REGULATION_TASK_CONFIRMATION6("任务提醒,工程接口人接收-任务 当天","ctp_AAftzD2mtsoN"), +// REGULATION_TASK_CONFIRMATION7("任务提醒,工程接口人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAfvKkz1QK9Z"), +// REGULATION_TASK_CONFIRMATION8("任务提醒,工程接口人接收-任务 催办","ctp_AAf2qRfog8ey"), +// REGULATION_TASK_CONFIRMATION9("状态提醒,Studio接收","ctp_AAfK2oTpd2de"), +// +// DESIGN_COMPLIANCE_CONFIRMATION1("设计符合性任务,责任人接收-任务","ctp_AAftJ7q0YuC7"), +// DESIGN_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务责任人下发工程师,工程师接收-任务","ctp_AAft9XcQP4Qi"), +// DESIGN_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0Czw0L"), +// DESIGN_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAft9XcQTO27"), +// DESIGN_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q0feyC"), +// DESIGN_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfefHo8XmE9"), +// DESIGN_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAfvKkz1Ewe9"), +// DESIGN_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAftJ7q0ur2Z"), +// DESIGN_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAfefHo8vZzW"), +// DESIGN_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 3天,7天,14天通知","ctp_AAft9XcQW9xx"), +// DESIGN_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q0Yym9"), +// DESIGN_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8vR6w"), +// DESIGN_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0YF7H"), +// +// PRE_HOMO_CONFIRMATION1("Pre-Homo任务,责任人接收-任务","ctp_AAftJ7q0uXRs"), +// PRE_HOMO_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAfefHo8KU8o"), +// PRE_HOMO_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfvdg0C91Dv"), +// PRE_HOMO_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAftJ7q03tft"), +// PRE_HOMO_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAftJ7q03Xer"), +// PRE_HOMO_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAfvKkz1ETZU"), +// PRE_HOMO_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知","ctp_AAft9XcQTFYa"), +// PRE_HOMO_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知","ctp_AAfefHo8219e"), +// PRE_HOMO_CONFIRMATION9("任务提醒,责任人接收-任务 当天","ctp_AAftzD2mWof3"), +// PRE_HOMO_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知","ctp_AAftJ7q0ul4M"), +// PRE_HOMO_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAfvKkz1Evrr"), +// PRE_HOMO_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfvKkz1nMgY"), +// PRE_HOMO_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAftJ7q0rtdn"), +// +// +// +// VALIDATION_COMPLIANCE_CONFIRMATION1("验证符合性任务,责任人接收-任务","ctp_AAftJ7q0u3Je"), +// VALIDATION_COMPLIANCE_CONFIRMATION2("责任人下发工程师,工程师接收-任务","ctp_AAft9XcQLuty"), +// VALIDATION_COMPLIANCE_CONFIRMATION3("责任人催办,工程师接收-任务","ctp_AAfefHo8Kpsf"), +// VALIDATION_COMPLIANCE_CONFIRMATION4("工程师提交反馈,责任人接收-任务","ctp_AAfefHo8K9Qk"), +// VALIDATION_COMPLIANCE_CONFIRMATION5("责任人回复工程师,工程师接收-任务","ctp_AAft9XcQLkZO"), +// VALIDATION_COMPLIANCE_CONFIRMATION6("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAftzD2mPku1"), +// VALIDATION_COMPLIANCE_CONFIRMATION7("任务提醒,责任人接收-任务 两周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0Hv3C"), +// VALIDATION_COMPLIANCE_CONFIRMATION8("任务提醒,责任人接收-任务 一周通知(接口人提交之后停止消息发送)","ctp_AAftJ7q0HzZL"), +// VALIDATION_COMPLIANCE_CONFIRMATION9("任务提醒,责任人接收-任务 当天(接口人提交之后停止消息发送)","ctp_AAfefHo8edYl"), +// VALIDATION_COMPLIANCE_CONFIRMATION10("任务提醒,责任人接收-任务 逾期之后 每天通知(接口人提交之后停止消息发送)","ctp_AAfefHo8ef2S"), +// VALIDATION_COMPLIANCE_CONFIRMATION11("责任人提交,发起人接收审查任务-任务","ctp_AAftJ7q03z1d"), +// VALIDATION_COMPLIANCE_CONFIRMATION12("发起人审查退回,责任人接收-任务","ctp_AAfefHo8eOyG"), +// VALIDATION_COMPLIANCE_CONFIRMATION13("发起人审查通过,责任人接收通知-通知","ctp_AAfefHo8K6DT"), + + ; + + String name; + String value; + + private TemplateInfoEnum2(String name, String value) { + this.name = name; + this.value = value; + } + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java index 3d1eb5108..bfcab0f60 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/IFeishuService.java @@ -122,4 +122,12 @@ public interface IFeishuService { * @param emailList */ JSONObject getUserInfoFromLarkByEmainList(List emailList) throws IOException ; + + /** + * 根据模板-批量发送飞书卡片消息 由于开发分支问题,此方法只在认证清单流程中使用, 与 batchSendLarkCardMsgByTemplate 作用一样 + * @param json + * @return + * @throws IOException + */ + Result batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java index f493376e1..251300b9e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/feishu/service/impl/FeishuServiceImpl.java @@ -1394,4 +1394,41 @@ public class FeishuServiceImpl implements IFeishuService { return responseJson; } + @Override + public Result batchSendLarkCardMsgByTemplate2(JSONObject json) throws IOException { + String token = this.getTenantAccessToken(); + // 设置请求头 + Map headerMap = new HashMap<>(); + headerMap.put("Authorization", "Bearer " + token); + headerMap.put("Content-Type", "application/json; charset=utf-8"); + + String template_id = json.getString("template_id"); + String[] userIdArr = json.getString("userIds").split(","); + Map templateVariableMap = JSONObject.parseObject(JSONObject.toJSONString(json.get("templateVariableMap")),Map.class); + + JSONObject templateJson = new JSONObject(); + + JSONObject data = new JSONObject(); + data.put("template_id",template_id); + data.put("template_variable",templateVariableMap); + + templateJson.put("type","template"); + templateJson.put("data",data); + + // 设置请求参数 + JSONObject paramsMap = new JSONObject(); + paramsMap.put("user_ids", userIdArr); + paramsMap.put("msg_type", "interactive"); + paramsMap.put("card", templateJson); + + // 发送请求给飞书 + String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString()); + // 获取返回结果 + JSONObject tokenJson = JSONObject.parseObject(response); + if(!tokenJson.get("code").toString().equals("0")) { + log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson); + } + return Result.OK(); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index e41ee60a8..898b198d4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -234,4 +234,11 @@ public class ProjectCertificationInventoryEOController extends JeroController transferTask(@RequestBody JSONObject json) { return this.projectCertificationInventoryEOService.transferTask(json); } + + @AutoLog(value = "项目库-认证清单表-催办") + @ApiOperation(value="项目库-认证清单表-催办", notes="项目库-认证清单表-催办") + @PostMapping(value = "/expediting") + public Result expediting(@RequestBody JSONObject json) { + return this.projectCertificationInventoryEOService.expediting(json); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java index 3a763eed5..895537666 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/JumpLinkEnum.java @@ -12,11 +12,13 @@ public enum JumpLinkEnum { * 103:跳转 项目库 - 任务清单 * 104:跳转 项目库 - 未符合项 * 105:跳转 项目库 - 认证参数收集 + * 106:跳转 项目库 - 认证清单 */ INVENTORY_AFFIRM_LINK("清单确认链接","1","/ProjectDetails?id=","&type=102"), PREHOMO_AFFIRM_LINK("prehomo确认链接","2","/ProjectDetails?id=","&type=103"), VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"), DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"), + CERTIFICATION_INVENTORY_LINK("认证清单链接","5","/ProjectDetails?id=","&type=106"), TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""), FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""), XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""), diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java index 731d28c0f..96ba83105 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/OperatorTypeEnum.java @@ -46,6 +46,13 @@ public enum OperatorTypeEnum { * 流程信息明细表 */ UPDATE_PROCESS_INFO_DETAIL_BY_TASK_ID("根据taskId更新流程信息明细表","updateProcessInfoDetailByTaskId"), + + /** + * 项目库-认证清单 + */ + CERTIFICATION_INVENTORY_STUDIO_EXPEDITING("认证清单-studio催办","certificationInventoryStudioExpediting"), + CERTIFICATION_INVENTORY_CERTIFICATION_ENGINEER_EXPEDITING("认证清单-认证工程师催办","certificationInventoryCertificationEngineerExpediting"), + CERTIFICATION_INVENTORY_SDT_EXPEDITING("认证清单-接口人催办","certificationInventorySdtExpediting"), ; String name; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index a912e8105..d2811c33a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -149,4 +149,11 @@ public interface IProjectCertificationInventoryEOService extends IService transferTask(JSONObject json); + + /** + * 催办任务 + * @param json + * @return + */ + Result expediting(JSONObject json); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 9b8206178..0804587db 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -11,6 +11,8 @@ import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.vo.LoginUser; import com.jero.common.util.DateUtils; +import com.jero.modules.feishu.enums.TemplateInfoEnum2; +import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.project.entity.ProjectCertificationInventoryEO; import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectRelatedPersonnel; @@ -40,8 +42,10 @@ import org.springframework.beans.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.io.IOException; import java.util.*; import java.util.stream.Collectors; @@ -78,6 +82,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl expediting(JSONObject json) { + String ids = json.getString("ids"); + if(StringUtils.isEmpty(ids)){ + throw new JeroBootException("至少选择一条数据进行操作!"); + } + + String projectLibraryId = json.getString("projectLibraryId"); + ProjectLibraryBase projectLibraryBase = projectLibraryBaseService.queryById(projectLibraryId, CutEnum.EN.getValue()).get(0); + String PRN_EN = projectLibraryBase.getProjectName();//项目名称 + if(ObjectUtils.isEmpty(projectLibraryBase)){ + throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!"); + } +// ProjectLibraryBase projectLibraryBaseCn = projectLibraryBaseService.queryById(projectLibraryId, CutEnum.CN.getValue()).get(0); +// String PRN_CN = projectLibraryBase.getProjectName();//项目名称 + + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + List idList = Arrays.asList(ids.split(",")); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList); + queryWrapper.lambda().in(ProjectCertificationInventoryEO::getDutyPerson,currentUser.getId()); + List projectCertificationInventoryEOList = this.list(queryWrapper); + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){ + //飞书跳转链接 + String hrefFeishu_CN = backUrl + + JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink() + + projectLibraryId + + JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType() + + "&projectName=" + PRN_EN; + + //飞书跳转链接 + String hrefFeishu_EN = backUrl + + JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getLink() + + projectLibraryId + + JumpLinkEnum.CERTIFICATION_INVENTORY_LINK.getType() + + "&projectName=" + PRN_EN; + + /** + * studio催办:除了 清单待发布、审查通过、认证退回 的 催办当前办理人 + * 认证工程师催办:任务待确认、结果待提交、审查退回 的 催办当前办理人 + * 接口人催办:任务待确认 、结果待提交、审查退回 的 催办当前办理人 + */ + String operatorType = json.getString("operatorType"); + if(StringUtils.equals(operatorType,OperatorTypeEnum.CERTIFICATION_INVENTORY_STUDIO_EXPEDITING.getValue())){ + List certificationInventoryEOList = projectCertificationInventoryEOList.stream().filter(data -> { + return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue()) + || StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue()) + || StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())); + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(certificationInventoryEOList)){ + String certificationEngineerIds = projectLibraryBase.getCertificationEngineer(); + if(StringUtils.isNotEmpty(certificationEngineerIds)){ + List certificationEngineerIdList = Arrays.asList(certificationEngineerIds.split(",")); + + List certificationEngineerList = this.sysUserService.querySysUserListByIdList(certificationEngineerIdList); + StringBuilder standNameSb = new StringBuilder(); + StringBuilder itemNameSb = new StringBuilder(); + + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + Collections.sort(certificationInventoryEOList, new Comparator() { + @Override + public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { + return p1.getEndTime().compareTo(p2.getEndTime()); + } + }); + Date endTime = certificationInventoryEOList.get(0).getEndTime(); + + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) { + if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){ + itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(","); + } + if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){ + standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(","); + } + } + + String standName = ""; + if(StringUtils.isNotEmpty(standNameSb.toString())){ + standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1); + } + String itemName = ""; + if(StringUtils.isNotEmpty(itemNameSb.toString())){ + itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1); + } + + if(CollectionUtils.isNotEmpty(certificationEngineerList)){ + for (String certificationEngineerId : certificationEngineerIdList) { + String thirdId = certificationEngineerList.stream().filter(certificationEngineer -> { + boolean flag = false; + if(StringUtils.equals(certificationEngineerId,certificationEngineer.getId())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()).get(0).getThirdId(); + + try { + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue()); + larkMesJson.put("userIds",thirdId); + + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("projectNameCn",PRN_EN); + templateVariableMap.put("projectNameEn",PRN_EN); + templateVariableMap.put("standName",standName); + templateVariableMap.put("itemName",itemName); + templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName()); + templateVariableMap.put("endTime",DateUtils.formatDate(endTime)); + templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN); + templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN); + + larkMesJson.put("templateVariableMap",templateVariableMap); + this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson); + } catch (Exception e) { + log.error("飞书消息推送失败"); + } + } + } + } + } + } + + List dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); + List dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList); + + Map> certifycationInventoryListByDutyPersonMap = projectCertificationInventoryEOList.stream().filter(data -> { + return (StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()) + || StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()) + || StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())); + }).collect(Collectors.groupingBy(ProjectCertificationInventoryEO::getDutyPerson)); + + if(!ObjectUtils.isEmpty(certifycationInventoryListByDutyPersonMap) && CollectionUtils.isNotEmpty(dutyPersonList)){ + for (Map.Entry> map : certifycationInventoryListByDutyPersonMap.entrySet()) { + String key = map.getKey(); + List value = map.getValue(); + + String thirdId = dutyPersonList.stream().filter(dutyPersonInfo -> { + boolean flag = false; + if(StringUtils.equals(key,dutyPersonInfo.getId())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()).get(0).getThirdId(); + + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + Collections.sort(value, new Comparator() { + @Override + public int compare(ProjectCertificationInventoryEO p1, ProjectCertificationInventoryEO p2) { + return p1.getEndTime().compareTo(p2.getEndTime()); + } + }); + Date endTime = value.get(0).getEndTime(); + + StringBuilder standNameSb = new StringBuilder(); + StringBuilder itemNameSb = new StringBuilder(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : value) { + if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){ + itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(","); + } + if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getSerialNumber())){ + standNameSb.append(projectCertificationInventoryEO.getSerialNumber()).append(","); + } + } + + String standName = ""; + if(StringUtils.isNotEmpty(standNameSb.toString())){ + standName = standNameSb.toString().substring(0,standNameSb.toString().length()-1); + } + String itemName = ""; + if(StringUtils.isNotEmpty(itemNameSb.toString())){ + itemName = itemNameSb.toString().substring(0,itemNameSb.toString().length()-1); + } + + try { + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE1.getValue()); + larkMesJson.put("userIds",thirdId); + + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("projectNameCn",PRN_EN); + templateVariableMap.put("projectNameEn",PRN_EN); + templateVariableMap.put("standName",standName); + templateVariableMap.put("itemName",itemName); + templateVariableMap.put("Initiator",projectLibraryBase.getStudioEngineerName()); + templateVariableMap.put("endTime",DateUtils.formatDate(endTime)); + templateVariableMap.put("viewBtnUrlCn",hrefFeishu_CN); + templateVariableMap.put("viewBtnUrlEn",hrefFeishu_EN); + + larkMesJson.put("templateVariableMap",templateVariableMap); + this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson); + } catch (Exception e) { + log.error("飞书消息推送失败"); + } + } + } + } + + return Result.OK("催办成功!"); + } + } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 48809bef7..60c430cf0 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1430,4 +1430,5 @@ module.exports = { confirmreturn:'Confirm return ?', onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected', youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved', + batchmodify:'Whether to batch modify', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 7b02545d5..cde456b01 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1524,6 +1524,7 @@ module.exports = { confirmReturnForApproval:'确认退回审批?', onlyDataStatusResultReviewedCanBeSelected:'只能选择流程状态为结果待审查的数据', confirmResetProcess:'确认重置流程?', + confirmUrging:'确认催办', statusthetasistobeconfirmed:'只有清单待校核状态或任务确认状态为待确认时才可以进行撤回', confirmreturn:'确认退回?', confirmUrging:'确认催办?', @@ -1531,4 +1532,5 @@ module.exports = { onlyListCheckedCanRecalled:'只能撤回流程状态为清单待校核的数据', onlyDataSelected:'只能选择流程状态为任务待确认、结果待提交、审查退回的数据', youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布、审查通过的数据', + batchmodify:'是否批量修改', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/batSetting.vue b/jero-web/src/views/projectManagement/components/batSetting.vue index f215a1b33..a41b50bc8 100644 --- a/jero-web/src/views/projectManagement/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/batSetting.vue @@ -10,21 +10,6 @@ > - -
-
- {{$t('implementationCategory')}} -
- - - -
-
@@ -43,22 +28,6 @@
- - - -
-
- {{$t('zoneOfApplication')}} -
- - - -
-
@@ -96,93 +65,253 @@
{{$t('vehicleInProductionDate')}} + :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}
- - + + + + + + + +
- +
- {{$t('ImplementationDate')}} + {{$t('regulatoryEngineer')}}
- - - -
-
- -
-
- - {{$t('deadlineForConfirmationOfDesignCompliance')}} -
- - + + + + + + + +
+
+  {{$t('confirmationOfDesignConformity')}} +
- - {{$t('prehomoConfirmationDeadline')}} + {{$t('personLiable')}}
- - + + + + + + + +
- - {{$t('verificationComplianceConfirmationDeadline')}} + {{$t('cutoffTime')}}
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ {{$t('typeOfDeliverables')}} +
+ + + + + + + + +
+
+
+
+  {{$t('verificationAndConformityconfirmation')}} +
+ + +
+
+ {{$t('personLiable')}} +
+ + + + + + + + + +
+
+ +
+
+ {{$t('cutoffTime')}} +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ {{$t('typeOfDeliverables')}} +
+ + + + + + + + + +
+
@@ -190,25 +319,39 @@