From fcd013f2bf7934b62c69f45e917f6fad24aca1d9 Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Tue, 21 Mar 2023 18:05:47 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=93=8D=E4=BD=9C-=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feishu/enums/TemplateInfoEnum2.java | 13 + .../job/CertificationInventoryJob.java | 91 +++++- ...rojectCertificationInventoryEOService.java | 10 + ...ctCertificationInventoryEOServiceImpl.java | 309 +++++++++++++++++- 4 files changed, 410 insertions(+), 13 deletions(-) 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 index 2d41f0066..7c754a8ef 100644 --- 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 @@ -16,6 +16,19 @@ public enum TemplateInfoEnum2 { CERTIFICATION_MESSAGE8("认证清单-任务提醒,已逾期","ctp_AAuDMwOPU71H"), //CERTIFICATION_MESSAGE9("认证清单-责任人分发(转办),第二责任人收到消息","ctp_AAuDM8YP6soc"), CERTIFICATION_MESSAGE10("认证工程师发起流程,责任人收到消息","ctp_AAuePL6rUK1L"), + CERTIFICATION_MESSAGE11("责任人拒绝,认证工程师收到消息","ctp_AAu2ZrSEiB1V"), + CERTIFICATION_MESSAGE12("责任人接受,认证工程师收到消息","ctp_AAuePL6r3B0I"), + CERTIFICATION_MESSAGE13("studio修改认证工程师,被修改人收到消息",""), + CERTIFICATION_MESSAGE14("studio修改符合性截止时间,认证工程师收到消息","ctp_AAuePL6r3XqN"), + CERTIFICATION_MESSAGE15("认证工程师修改责任人,被修改人收到消息","ctp_AAu2ZrSE1z3f"), + CERTIFICATION_MESSAGE16("认证工程师催办,责任人收到消息","ctp_AAuPfn0M0H6i"), + CERTIFICATION_MESSAGE17("责任人下发工程师,工程师接收-任务","ctp_AAuPfn0MCwlH"), + CERTIFICATION_MESSAGE18("任务提醒,责任人接收-任务 发起人催办责任人","ctp_AAuPh3LJ2Nex"), + CERTIFICATION_MESSAGE19("任务提醒,责任人接收-任务 两周通知","ctp_AAuPh3LJKUZk"), + CERTIFICATION_MESSAGE20("任务提醒,责任人接收-任务 一周通知","ctp_AAuXnIIM45B0"), + CERTIFICATION_MESSAGE21("任务提醒,责任人接收-任务 当天","ctp_AAu2lBIgnWND"), + CERTIFICATION_MESSAGE22("任务提醒,责任人接收-任务 逾期之后 每天通知","ctp_AAuPfn0MDOYu"), + CERTIFICATION_MESSAGE23("责任人提交,发起人接收审查任务-任务","ctp_AAuPh3LJKoIX"), ; String name; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/CertificationInventoryJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/CertificationInventoryJob.java index 55146d016..2875f1db0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/CertificationInventoryJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/CertificationInventoryJob.java @@ -173,7 +173,7 @@ public class CertificationInventoryJob implements Job { } Map sendMsgDataListMap = this.disposeSendMsgDataList(dutyPersonDataList); - // 三天后结束的 + /*// 三天后结束的 List threeDaysList = (List) sendMsgDataListMap.get("threeDaysList"); if(CollectionUtils.isNotEmpty(threeDaysList)){ this.sendLarkCardMsgByTemplate( @@ -183,7 +183,32 @@ public class CertificationInventoryJob implements Job { threeDaysList, TemplateInfoEnum2.CERTIFICATION_MESSAGE6.getValue() ); + }*/ + + // 十四天后结束的 + List fourteenDaysList = (List) sendMsgDataListMap.get("fourteenDaysList"); + if(CollectionUtils.isNotEmpty(fourteenDaysList)){ + this.sendLarkCardMsgByTemplate( + projectLibraryBase, + dutyPersonList, + dutyPersonUserId, + fourteenDaysList, + TemplateInfoEnum2.CERTIFICATION_MESSAGE19.getValue() + ); } + + // 七天后结束的 + List sevenDaysList = (List) sendMsgDataListMap.get("sevenDaysList"); + if(CollectionUtils.isNotEmpty(sevenDaysList)){ + this.sendLarkCardMsgByTemplate( + projectLibraryBase, + dutyPersonList, + dutyPersonUserId, + sevenDaysList, + TemplateInfoEnum2.CERTIFICATION_MESSAGE20.getValue() + ); + } + // 当天结束的 List currentDaysList = (List) sendMsgDataListMap.get("currentDaysList"); if(CollectionUtils.isNotEmpty(currentDaysList)){ @@ -192,7 +217,7 @@ public class CertificationInventoryJob implements Job { dutyPersonList, dutyPersonUserId, currentDaysList, - TemplateInfoEnum2.CERTIFICATION_MESSAGE7.getValue() + TemplateInfoEnum2.CERTIFICATION_MESSAGE21.getValue() ); } // 逾期的 @@ -203,7 +228,7 @@ public class CertificationInventoryJob implements Job { dutyPersonList, dutyPersonUserId, overdueList, - TemplateInfoEnum2.CERTIFICATION_MESSAGE8.getValue() + TemplateInfoEnum2.CERTIFICATION_MESSAGE22.getValue() ); } } @@ -225,15 +250,31 @@ public class CertificationInventoryJob implements Job { calendar.add(Calendar.DATE,3); Date threeDays = calendar.getTime(); + //获取后七天后的时间 + Calendar sevenCalendar=new GregorianCalendar(); + sevenCalendar.setTime(new Date()); + sevenCalendar.add(Calendar.DATE,7); + Date sevenDays = sevenCalendar.getTime(); //fourteen + + //获取后十四天后的时间 + Calendar fourteenCalendar=new GregorianCalendar(); + fourteenCalendar.setTime(new Date()); + fourteenCalendar.add(Calendar.DATE,14); + Date fourteenDays = fourteenCalendar.getTime(); //fourteen + String threeDaysStr = sdf.format(threeDays); + String sevenDaysStr = sdf.format(sevenDays); + String fourteenDaysStr = sdf.format(fourteenDays); String currentDateStr = sdf.format(currentDate); // 当天结束的 List currentDaysList = dutyPersonDataList.stream().filter(data -> { boolean flag = false; //结束日期是当前日期 - if (StringUtils.equals(currentDateStr, sdf.format(data.getEndTime()))) { - flag = true; + if(data.getEndTime() != null){ + if (StringUtils.equals(currentDateStr, sdf.format(data.getEndTime()))) { + flag = true; + } } return flag; }).collect(Collectors.toList()); @@ -241,16 +282,39 @@ public class CertificationInventoryJob implements Job { // 三天后结束的 List threeDaysList = dutyPersonDataList.stream().filter(data -> { boolean flag = false; - //结束日期是当前日期 - if (StringUtils.equals(threeDaysStr, sdf.format(data.getEndTime()))) { - flag = true; + if(data.getEndTime() != null){ + if (StringUtils.equals(threeDaysStr, sdf.format(data.getEndTime()))) { + flag = true; + } + } + return flag; + }).collect(Collectors.toList()); + + // 七天后结束的 + List sevenDaysList = dutyPersonDataList.stream().filter(data -> { + boolean flag = false; + if(data.getEndTime()!=null){ + if (StringUtils.equals(sevenDaysStr, sdf.format(data.getEndTime()))) { + flag = true; + } + } + return flag; + }).collect(Collectors.toList()); + + // 十四天后结束的 + List fourteenDaysList = dutyPersonDataList.stream().filter(data -> { + boolean flag = false; + if(data.getEndTime() != null){ + if (StringUtils.equals(fourteenDaysStr, sdf.format(data.getEndTime()))) { + flag = true; + } } return flag; }).collect(Collectors.toList()); // 逾期的 List overdueList = dutyPersonDataList.stream().filter(data -> { - // 逾期3天、七天、14天 + /*// 逾期3天、七天、14天 Calendar day3Later = new GregorianCalendar(); day3Later.setTime(data.getEndTime()); day3Later.add(Calendar.DATE, 3); @@ -270,13 +334,20 @@ public class CertificationInventoryJob implements Job { StringUtils.equals(sdf.format(overdue3Days), sdf.format(currentDate)) || StringUtils.equals(sdf.format(overdue7Days), sdf.format(currentDate)) || StringUtils.equals(sdf.format(overdue14Days), sdf.format(currentDate)) - ); + );*/ + // 只要早于当前日期都算逾期 + boolean flag = false; + if(data.getEndTime() != null){ + flag = (data.getEndTime().before(currentDate)); + } return flag; }).collect(Collectors.toList()); result.put("currentDaysList",currentDaysList); result.put("threeDaysList",threeDaysList); result.put("overdueList",overdueList); + result.put("sevenDaysList",sevenDaysList); + result.put("fourteenDaysList",fourteenDaysList); return result; } 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 c24e7c499..3a6b6e9e9 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 @@ -9,6 +9,7 @@ import com.jero.modules.project.entity.ProjectCertificationInventoryEO; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.system.entity.SysCategory; import com.jero.modules.system.entity.SysRole; +import com.jero.modules.system.entity.SysUser; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; import org.springframework.web.multipart.MultipartFile; @@ -216,4 +217,13 @@ public interface IProjectCertificationInventoryEOService extends IService citeDeliverable(JSONObject json); + + /** + * 根据模板返送消息 + * @param projectCertificationInventoryEOS + * @param templeteId + * @param userIdList + * @param userInfoList + */ + void sendMessageByTemplateId(List projectCertificationInventoryEOS,String templeteId,List userIdList,List userInfoList); } 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 25bc52893..4eb30489a 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 @@ -160,6 +160,66 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl flowStatusList = new ArrayList<>(); + flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); + + QueryWrapper certificationQueryWrap = new QueryWrapper<>(); + certificationQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getId,projectCertificationInventoryEO.getId()); + certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + List editEndTimeCertificationInventoryEOS = this.list(certificationQueryWrap); + + // 编辑截至日期发消息 + if(projectCertificationInventoryEO.getEndTime() != null){ + editEndTimeCertificationInventoryEOS = editEndTimeCertificationInventoryEOS.stream().filter(certificationInventory -> { + boolean flag = false; + if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(editEndTimeCertificationInventoryEOS)){ + + ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(editEndTimeCertificationInventoryEOS.get(0).getProjectLibraryId()); + List userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(",")); + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + + this.sendMessageByTemplateId( + editEndTimeCertificationInventoryEOS, + TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(), + userIdList, + userInfoList + ); + } + } + + // 如果编辑了责任人,给责任人发消息 + if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getDutyPerson())){ + QueryWrapper editDutyPersonCertificationQueryWrap = new QueryWrapper<>(); + editDutyPersonCertificationQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getId,projectCertificationInventoryEO.getId()); + List editDutyPersonCertificationInventoryEOS = this.list(editDutyPersonCertificationQueryWrap); + + editDutyPersonCertificationInventoryEOS = editDutyPersonCertificationInventoryEOS.stream().filter(certificationInventory -> { + boolean flag = false; + if(!StringUtils.equals(certificationInventory.getDutyPerson(),projectCertificationInventoryEO.getDutyPerson())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(editDutyPersonCertificationInventoryEOS)){ + List userIdList = editDutyPersonCertificationInventoryEOS.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + this.sendMessageByTemplateId( + editDutyPersonCertificationInventoryEOS, + TemplateInfoEnum2.CERTIFICATION_MESSAGE15.getValue(), + userIdList, + userInfoList + ); + } + } + + Date now = new Date(); projectCertificationInventoryEO.setUpdateTime(now); saveOrUpdate(projectCertificationInventoryEO); @@ -293,6 +353,36 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl flowStatusList = new ArrayList<>(); + flowStatusList.add(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue()); + + QueryWrapper certificationQueryWrap = new QueryWrapper<>(); + certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList); + certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList); + List projectCertificationInventoryEOS = this.list(certificationQueryWrap); + + if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)){ + projectCertificationInventoryEOS = projectCertificationInventoryEOS.stream().filter(certificationInventory -> { + boolean flag = false; + if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if (CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)) { + ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId()); + List userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(",")); + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + + this.sendMessageByTemplateId( + projectCertificationInventoryEOS, + TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(), + userIdList, + userInfoList + ); + } + } if(CollectionUtils.isNotEmpty(updateList)){ this.updateBatchById(updateList); } @@ -302,6 +392,62 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryEOS,String templeteId,List userIdList,List userInfoList){ + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId()); + + String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文 + String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文 + + // 获取认证清单 - 飞书跳转链接 + Map hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN); + String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN"); + String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN"); + + Map standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOS); + String standName = (String) standNameAndItemName.get("standName"); + String itemName = (String) standNameAndItemName.get("itemName"); + + try { + for (String userId : userIdList) { + String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList,userId); + + if(StringUtils.isNotEmpty(thirdId)){ + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOS); + Date endTime = projectCertificationInventoryEOS.get(0).getEndTime(); + + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", templeteId); + larkMesJson.put("userIds",thirdId); + + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("projectNameCn",PRN_CN); + 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); + templateVariableMap.put("operateUserName",currentUser.getUsername()); + + larkMesJson.put("templateVariableMap",templateVariableMap); + this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson); + } + } + } catch (Exception e) { + log.error("飞书消息推送失败"); + } + } + @Override public void importDisposeData(List datas, String cut) { if(CollectionUtils.isNotEmpty(datas)){ @@ -1201,6 +1347,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl certificationEngineers = this.sysUserService.querySysUserListByIdList(certificationEngineerList); + try { this.updateBatchById(projectCertificationInventoryEOList); @@ -1217,6 +1366,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl projectCertificationInventoryLogEOList = new ArrayList<>(); List processInfoDetailEOList = new ArrayList<>(); @@ -1279,6 +1439,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN); + String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN"); + String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN"); + + Map standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOList); + String standName = (String) standNameAndItemName.get("standName"); + String itemName = (String) standNameAndItemName.get("itemName"); + try { List certificationIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getId).distinct().collect(Collectors.toList()); // 将当前责任人的待办任务转为已办 @@ -1295,6 +1467,41 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl certificationEngineerList = Arrays.asList(certificationEngineer.split(",")); + List certificationEngineers = this.sysUserService.querySysUserListByIdList(certificationEngineerList); + try { + for (String userId : certificationEngineerList) { + String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineers,userId); + + if(StringUtils.isNotEmpty(thirdId)){ + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList); + Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); + + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE12.getValue()); + larkMesJson.put("userIds",thirdId); + + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("projectNameCn",PRN_CN); + 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); + templateVariableMap.put("operateUserName",currentUser.getUsername()); + + larkMesJson.put("templateVariableMap",templateVariableMap); + this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson); + } + } + } catch (Exception e) { + log.error("飞书消息推送失败"); + } }catch (Exception ex){ ex.printStackTrace(); log.error("责任人-接受任务失败:" + ex.getMessage()); @@ -1357,6 +1564,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl hrefFeishuMap = this.getCertificationInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN); + String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN"); + String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN"); + + Map standNameAndItemName = this.projectCertificationInventoryEOService.getStandNameAndItemName(projectCertificationInventoryEOList); + String standName = (String) standNameAndItemName.get("standName"); + String itemName = (String) standNameAndItemName.get("itemName"); + try { // 将当前责任人的待办任务转为已办 LambdaUpdateWrapper detailUpdateWrap = new LambdaUpdateWrapper<>(); @@ -1391,6 +1610,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl certificationEngineers = this.sysUserService.querySysUserListByIdList(certificationEngineerList); + try { + for (String userId : certificationEngineerList) { + String thirdId = this.sysUserService.getUserThirdIdByUserId(certificationEngineers,userId); + + if(StringUtils.isNotEmpty(thirdId)){ + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 + this.certificationInventoryEOListSortByEndTimeAsc(projectCertificationInventoryEOList); + Date endTime = projectCertificationInventoryEOList.get(0).getEndTime(); + + JSONObject larkMesJson = new JSONObject(); + larkMesJson.put("template_id", TemplateInfoEnum2.CERTIFICATION_MESSAGE11.getValue()); + larkMesJson.put("userIds",thirdId); + + Map templateVariableMap = new HashMap<>(); + templateVariableMap.put("projectNameCn",PRN_CN); + 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); + templateVariableMap.put("operateUserName",currentUser.getUsername()); + + larkMesJson.put("templateVariableMap",templateVariableMap); + this.feishuService.batchSendLarkCardMsgByTemplate2(larkMesJson); + } + } + } catch (Exception e) { + log.error("飞书消息推送失败"); + } }catch (Exception ex){ ex.printStackTrace(); log.error("责任人-拒绝任务失败:" + ex.getMessage()); @@ -1906,6 +2158,15 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl userIdList = Arrays.asList(transferUserId.split(",")); + List userInfoList = this.sysUserService.querySysUserListByIdList(userIdList); + this.sendMessageByTemplateId( + projectCertificationInventoryEOList, + TemplateInfoEnum2.CERTIFICATION_MESSAGE17.getValue(), + userIdList, + userInfoList + ); // 获取认证清单 - 飞书跳转链接 // 2023-03-15 去掉此消息 @@ -2054,10 +2315,46 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl> map : certifycationInventoryListByDutyPersonMap.entrySet()) { String key = map.getKey(); List value = map.getValue(); + List userIdList = Arrays.asList(key.split(",")); - String thirdId = this.sysUserService.getUserThirdIdByUserId(dutyPersonList,key); + // 给责任人发消息 + this.sendMessageByTemplateId( + value, + TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(), + userIdList, + dutyPersonList + ); + + /*// 待提交数据 单独发消息 + List toBeSubmitDataList = value.stream().filter(v -> { + boolean flag = false; + if(StringUtils.equals(v.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(toBeSubmitDataList)) { + + this.sendMessageByTemplateId( + toBeSubmitDataList, + TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(), + userIdList, + dutyPersonList + ); + }*/ + + /*String thirdId = this.sysUserService.getUserThirdIdByUserId(dutyPersonList,key); if(StringUtils.isNotEmpty(thirdId)){ + // 过滤掉 待提交的数据,正常发消息 + value = value.stream().filter(v -> { + boolean flag = false; + if(!StringUtils.equals(v.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + // 根据结束时间进行排序,获取最近的时间,发消息时使用。 Collections.sort(value, new Comparator() { @Override @@ -2076,7 +2373,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl templateVariableMap = new HashMap<>(); @@ -2094,7 +2397,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl Date: Tue, 21 Mar 2023 21:33:32 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=93=8D=E4=BD=9C-=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=B6=88=E6=81=AF=E3=80=82=20=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E4=B8=AD=E5=BF=83=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feishu/enums/TemplateInfoEnum2.java | 2 ++ ...ctCertificationInventoryEOServiceImpl.java | 21 +++++++++++++++++-- .../wkflow/entity/ProcessHistoryEO.java | 3 +++ .../impl/ProcessHistoryEOServiceImpl.java | 3 +++ 4 files changed, 27 insertions(+), 2 deletions(-) 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 index 7c754a8ef..1bd954e22 100644 --- 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 @@ -29,6 +29,8 @@ public enum TemplateInfoEnum2 { CERTIFICATION_MESSAGE21("任务提醒,责任人接收-任务 当天","ctp_AAu2lBIgnWND"), CERTIFICATION_MESSAGE22("任务提醒,责任人接收-任务 逾期之后 每天通知","ctp_AAuPfn0MDOYu"), CERTIFICATION_MESSAGE23("责任人提交,发起人接收审查任务-任务","ctp_AAuPh3LJKoIX"), + CERTIFICATION_MESSAGE24("发起人审查退回,责任人接收-任务","ctp_AAu2lBIgZK5f"), + CERTIFICATION_MESSAGE25("发起人审查通过,责任人接收通知-通知","ctp_AAuPKJ9CDwIP"), ; String name; 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 4eb30489a..d4ec8e3da 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 @@ -1154,7 +1154,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); + List dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList); try { // 更新数据状态为 审查退回 this.updateBatchById(projectCertificationInventoryEOList); @@ -1165,6 +1166,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); + List dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList); try { // 更新数据状态为 审查通过 this.updateBatchById(projectCertificationInventoryEOList); @@ -1231,6 +1240,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl sysUser.getId().equals(data.getOperatorPersonId())).collect(Collectors.toList()).get(0); data.setAssignee(userInfo.getUsername()); From 750061f7e899e2c49cce0c2404303088b40833f5 Mon Sep 17 00:00:00 2001 From: wangzhijiang Date: Wed, 22 Mar 2023 09:33:15 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=EF=BC=8C=E5=B1=95=E7=A4=BA=E8=B4=A3=E4=BB=BB=E9=A2=86=E5=9F=9F?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=90=8D=E7=A7=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IProjectLawsInventoryEOService.java | 12 +++++ .../ProjectLawsInventoryEOServiceImpl.java | 50 +++++++++++++++++++ .../impl/ProcessInfoEOServiceImpl.java | 14 +++++- .../modules/todoCenter/vo/ProcessInfoVO.java | 2 + 4 files changed, 76 insertions(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java index 88bb14dae..82db7cb24 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java @@ -10,6 +10,7 @@ import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.project.entity.ProjectLawsInventoryEO; import com.jero.modules.project.vo.ProjectTaskUrgVo; import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysRole; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; @@ -192,4 +193,15 @@ public interface IProjectLawsInventoryEOService extends IService projectLawsInventoryEOList,List categoryList); + + /** + * 根据id获取责任领域展示名称 + * @param projectLawsInventoryId + * @param cut + * @param projectLawsInventoryEOList + * @param sysDictItems + * @param dicCode + * @return + */ + String getDutyTerritoryNameById(String projectLawsInventoryId, String cut, List projectLawsInventoryEOList, List sysDictItems,String dicCode); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 82e60c2e5..093fa0bd3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -10096,5 +10096,55 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl projectLawsInventoryEOList, List sysDictItems,String dicCode) { + String result = ""; + for (ProjectLawsInventoryEO lawsInventory : projectLawsInventoryEOList) { + if(StringUtils.equals(projectLawsInventoryId,lawsInventory.getId())){ + String dutyTerritory = lawsInventory.getDutyTerritory(); + + result = disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()); + /*if(StringUtils.isNotEmpty(fieldValues)){ + List sysDictItemList = sysDictItems.stream().filter(e -> { + boolean flag = false; + if(StringUtils.equals(e.getDictCode(),dicCode)){ + flag = true; + } + return flag; + }).distinct().collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(sysDictItemList)){ + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + result = sysDictItemList.stream().filter(e -> { + boolean flag = false; + List fieldValueStrList = Arrays.asList(fieldValues.split(",")); + for (String fieldValueStr : fieldValueStrList) { + if(StringUtils.equals(fieldValueStr,e.getItemValue())){ + flag = true; + break; + } + } + return flag; + }).map(SysDictItem::getItemText).collect(Collectors.joining(",")); + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + result = sysDictItemList.stream().filter(e -> { + boolean flag = false; + List fieldValueStrList = Arrays.asList(fieldValues.split(",")); + for (String fieldValueStr : fieldValueStrList) { + if(StringUtils.equals(fieldValueStr,e.getItemValue())){ + flag = true; + break; + } + } + return flag; + }).map(SysDictItem::getEnName).collect(Collectors.joining(",")); + } + } + }*/ + break; + } + } + return result; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java index 6f56545ad..d2163643e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/service/impl/ProcessInfoEOServiceImpl.java @@ -25,11 +25,13 @@ import com.jero.modules.project.service.IProjectLibraryBaseService; import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService; import com.jero.modules.project.service.IProjectTaskInventoryEOService; import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.enums.DicCodeEnum; import com.jero.modules.system.service.ISysDictService; import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysCategoryServiceImpl; +import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO; import com.jero.modules.todoCenter.entity.ProcessInfoEO; import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum; @@ -92,6 +94,8 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl categoryList = sysCategoryService.list(); + List categoryList = this.sysCategoryService.list(); + + List sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll(); for (ProcessInfoVO data : datas) { - // 处理展示的交付物类型信息 if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){ + // 处理展示的交付物类型信息 String projectLawsInventoryId = data.getProjectLawsInventoryId(); String deliverableTypeName = this.projectLawsInventoryEOService.getDeliverableTypeNameById(projectLawsInventoryId,cut,data.getFlowType(),projectLawsInventoryEOList,categoryList); data.setDeliverableTypeName(deliverableTypeName); + + // 处理责任领域展示信息 + String dutyTerritoryName = this.projectLawsInventoryEOService.getDutyTerritoryNameById(projectLawsInventoryId,cut,projectLawsInventoryEOList,sysDictItems,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()); + data.setDutyTerritoryName(dutyTerritoryName); } } datas.forEach(data -> { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ProcessInfoVO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ProcessInfoVO.java index 7f97d363e..beae3265d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ProcessInfoVO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ProcessInfoVO.java @@ -116,4 +116,6 @@ public class ProcessInfoVO implements Serializable { /**交付物类型展示名称**/ private String deliverableTypeName; + /**责任领域展示抿成**/ + private String dutyTerritoryName; } From a84efecf9f0086b97b0193c5642af9915d9fddc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 22 Mar 2023 10:19:24 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E7=9A=84=E5=88=97=E8=A1=A8=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listOfRegulations.vue | 96 +------------------ .../components/SentList.vue | 12 +-- .../components/circulationHistory.vue | 2 +- .../components/confirmationDrawer.vue | 4 +- .../components/designCompliance.vue | 1 + .../components/doneList.vue | 6 +- .../reviewedByThePersonInCharge.vue | 2 +- 7 files changed, 11 insertions(+), 112 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 587a44a6b..1d30390c7 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -863,7 +863,7 @@ headFieldEn: 'Process Status', field: 'designFlowStatusName', affirmFlag: '1', - key: 24 , + key: 24, moduleFlag: '法规清单' }, { @@ -1496,6 +1496,7 @@ this.visibleRoleSwitching = false this.confirmLoadingRoleSwitching = false this.$emit('getRoleSwitch', this.formInlineRoleSwitching.roleSwitchingCode) + this.selectedRowKeys = [] this.getList() } else { this.confirmLoadingRoleSwitching = false @@ -1868,97 +1869,6 @@ } }, - initiateTaskConfirmationClick(name) { - this.timeName = name - this.listTitle = this.$t('taskConfirmationDeadline') - if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - let isTrue = true - this.TaskSuccessList = [] - this.TaskWarningList = [] - let dataList = [] - for (let i = 0; i < this.dataSource.length; i++) { - for (let j = 0; j < selectedRowKeys.length; j++) { - if (this.dataSource[i].id == selectedRowKeys[j]) { - dataList.push(this.dataSource[i]) - } - } - } - for (let i = 0; i < dataList.length; i++) { - if ((dataList[i].taskAffirmStatus == 'Not started' || dataList[i].taskAffirmStatus == 'Rejected') && - dataList[i].inventoryAffirmStatus == 'Accepted') { - if (dataList[i].engineeringInterfacePerson) { - if (dataList[i].verifyDeliverableType) { - if (dataList[i].verifyDueDate && dataList[i].verifyDutyId - && dataList[i].verifyInitiatorId) { - } else { - this.TaskWarningList.push( - < div > { dataList[i].serialNumber + this.$t('pleaseConformityVerification') } < /div>) - continue - // isTrue = false - // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification')) - // return - } - } - - if (dataList[i].prehomoDeliverableType) { - if (dataList[i].prehomoDueDate && dataList[i].prehomoDutyId - && dataList[i].prehomoInitiatorId) { - } else { - this.TaskWarningList.push( - < div > { dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } < /div>) - continue - // isTrue = false - // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo')) - // return - } - } - - if (dataList[i].designDeliverableType) { - if (dataList[i].designDueDate && dataList[i].designDutyId - && dataList[i].designInitiatorId) { - } else { - this.TaskWarningList.push( - < div > { dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation') } < /div>) - continue - // isTrue = false - // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation')) - // return - } - } - this.TaskSuccessList.push(dataList[i]) - } else { - this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('theProjectContactEmpty') } < /div>) - // isTrue = false - // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty')) - // return - } - } else { - this.TaskWarningList.push( - < div > { dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected') } < /div>) - // isTrue = false - // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected')) - // return - } - } - if (this.TaskSuccessList && this.TaskSuccessList.length > 0) { - this.visible = true - this.formInline = {} - } else { - let that = this - this.$warning({ - content: ( - < div > - { that.TaskWarningList } - < /div> - ) - }) - } - } else { - this.$message.warning(this.$t('selectLeastOne')) - } - }, - handleOk() { this.$refs.ruleForm.validate(valid => { if (valid) { @@ -2198,7 +2108,7 @@ if (dataList[i].verifyFlowStatus == 'List to be checked') { if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) { this.requestsNum++ - _this.startProcess(dataList[i], 2, this.requestsNum) + _this.startProcess(dataList[i], 4, this.requestsNum) } } else { _this.detailedWarningList.push( diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue index 60efd4260..11bef884b 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/SentList.vue @@ -272,11 +272,7 @@ primaryKeyId: row.primaryKeyId, PersonChargeFeedback: row.personChargeFeedback } - let newUrl = this.$router.resolve({ - path: '/taskListProcess', - query: query - }) - window.open(newUrl.href, '_blank') + this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), this.$t('designComplianceReview')) } else if (row.flowType == '4') { row.taskId = row.taskId + '' if (row.taskId.length > 30) { @@ -306,11 +302,7 @@ primaryKeyId: row.primaryKeyId, PersonChargeFeedback: row.personChargeFeedback } - let newUrl = this.$router.resolve({ - path: '/taskListProcess', - query: query - }) - window.open(newUrl.href, '_blank') + this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), this.$t('verificationComplianceReview')) } }, searchQuery(value) { diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue index f8dc8a8e5..6440c1f4d 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/circulationHistory.vue @@ -109,7 +109,7 @@ }, { title: this.$t('Tasknode'), - dataIndex: 'taskDefinitionKeyName', + dataIndex: 'name', align: 'left', width: 180, ellipsis: true diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/confirmationDrawer.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/confirmationDrawer.vue index bf3c6a7d6..9b060963e 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/confirmationDrawer.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/confirmationDrawer.vue @@ -160,7 +160,7 @@ { title: this.$t('areaOfResponsibility'), align: 'left', - dataIndex: '', + dataIndex: 'dutyTerritoryName', ellipsis: true, width: 120 }, @@ -204,7 +204,7 @@ { title: this.$t('areaOfResponsibility'), align: 'left', - dataIndex: '', + dataIndex: 'dutyTerritoryName', ellipsis: true, width: 120 }, diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/designCompliance.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/designCompliance.vue index cf6340b07..5c50f1ab1 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/designCompliance.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/designCompliance.vue @@ -178,6 +178,7 @@ }) }, getList(row, title) { + console.log(row) this.queryData = row this.queryData.isDisplay = JSON.parse(this.queryData.isDisplay) this.loading = true diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue index eb4af51f0..2e44fdfd3 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/doneList.vue @@ -296,11 +296,7 @@ primaryKeyId: row.primaryKeyId, PersonChargeFeedback: row.personChargeFeedback } - let newUrl = this.$router.resolve({ - path: '/taskListProcess', - query: query - }) - window.open(newUrl.href, '_blank') + this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), this.$t('verificationComplianceReview')) } }, searchQuery(value) { diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/reviewedByThePersonInCharge.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/reviewedByThePersonInCharge.vue index f6f2f86e0..c5972a464 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/reviewedByThePersonInCharge.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/reviewedByThePersonInCharge.vue @@ -4,7 +4,7 @@
{{query.TaskKey == 'zrrqr' || query.TaskKey == 'dezrrqr' || query.TaskKey == 'zrrtjjfw' || $route.query.TaskKey == 'dezrrtjjfw' - ? $t('personLiableConfirm'):$t('fillInProjectDelivery')}} + ? $t('personLiableConfirm'):$t('sponsorReview')}}
From 019d3e8e98349241d6f9a9e402dce92ba7f2855f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 22 Mar 2023 14:30:11 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E7=9A=84=E6=B5=81=E7=A8=8B=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E3=80=81=E6=89=B9=E9=87=8F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E3=80=81=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/batSetting.vue | 109 ++++--- .../components/listEditModel.vue | 90 +++--- .../components/listOfRegulations.vue | 270 ++++++++++++------ 3 files changed, 297 insertions(+), 172 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/batSetting.vue b/jero-web/src/views/projectManagement/components/batSetting.vue index 4904dd5ef..e4371c4e2 100644 --- a/jero-web/src/views/projectManagement/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/batSetting.vue @@ -15,7 +15,7 @@
{{$t('certificationType')}}
- + {{$t('certificationLevel')}} - + - +
@@ -55,25 +55,33 @@
- +
{{$t('engineeringInterfacePerson')}} + :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}
- - + + + + + {{ item.name }} + + + @@ -85,19 +93,20 @@ - +
{{$t('regulatoryEngineer')}} + :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}
- + @@ -118,13 +127,13 @@ {{$t('personLiable')}}
- - + + v-model="formInline.designDutyIdName"/> @@ -140,13 +149,13 @@ {{$t('cutoffTime')}}
- + @@ -189,7 +198,7 @@ {{$t('typeOfDeliverables')}} - + {{$t('personLiable')}} - - + + v-model="formInline.verifyDutyIdName"/> @@ -291,7 +300,7 @@ {{$t('typeOfDeliverables')}} - + { + if (res.success) { + this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师 + } + }) + }, PersonnelSelectionChange(value, id) { this.formInline[value] = id this.formInline = { ...this.formInline } }, - edit(data,code) { + edit(data, code) { this.visible = true this.getDeliverableTree() this.code = code - console.log(this.code) this.$nextTick(() => { this.ids = data || [] this.formInline = {} @@ -375,9 +400,15 @@ }, handleOkOne() { let ids = JSON.parse(JSON.stringify(this.ids)) + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) let query = { ids: ids.join(','), - ...this.formInline + ...formInline } this.confirmLoading = true postAction(this.url.setBatch, query).then((res) => { @@ -398,9 +429,15 @@ content: _this.$t('batchmodify'), onOk() { let ids = JSON.parse(JSON.stringify(_this.ids)) + let formInline = JSON.parse(JSON.stringify(_this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) let query = { ids: ids.join(','), - ..._this.formInline + ...formInline } _this.confirmLoading = true postAction(_this.url.setBatch, query).then((res) => { diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 29b533712..7e428bf1b 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -252,19 +252,26 @@ {{$t('engineeringInterfacePerson')}} - - - - {{ item.name }} - - - + + + + + + + + + + + + + +
@@ -315,19 +322,25 @@ :title="$t('personLiable')">{{$t('personLiable')}} - - - - {{ item.name }} - - - + + + + + + + + + + + + + + @@ -644,25 +657,12 @@ :title="$t('personLiable')">{{$t('personLiable')}} - - - - {{ item.name }} - - - - - - - - - +
diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 1d30390c7..1fb67f214 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -214,7 +214,7 @@
{{ $t('export') }} @@ -320,6 +320,22 @@ -- + + + {{text}} + + {{text}} + + + + {{text}} + + {{text}} +
{{ $t('total') + ' ' + this.dataSource.length + ' ' + $t('strip') }} @@ -446,11 +462,13 @@ +