diff --git a/SynologyDrive/4.数据库变更记录/李雅玮sql变更记录.sql b/SynologyDrive/4.数据库变更记录/李雅玮sql变更记录.sql index 38b7e6d0d..3f2798162 100644 --- a/SynologyDrive/4.数据库变更记录/李雅玮sql变更记录.sql +++ b/SynologyDrive/4.数据库变更记录/李雅玮sql变更记录.sql @@ -45,4 +45,8 @@ ALTER TABLE `laws_weilai`.`params_collect_manifest_history` CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`; ALTER TABLE `laws_weilai`.`params_report_detail` - CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`; \ No newline at end of file + CHANGE COLUMN `file_template` `file_template_connect_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件模板' AFTER `control_verify`; + +---2022-06-15 +ALTER TABLE `laws_weilai`.`sys_user_role` + MODIFY COLUMN `role_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色id' AFTER `user_id`; \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestRoleIdEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestRoleIdEnum.java index a81e532a9..cad81c249 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestRoleIdEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/enums/CollectManifestRoleIdEnum.java @@ -15,7 +15,7 @@ import java.util.List; * @Date: Created in 10:56 2022/6/11 */ public enum CollectManifestRoleIdEnum { - STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1), +// STUDIO_ID("R&H Studio","R&H Studio","studio","1534019911296118786",1), ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2), MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index f91ee4a94..44429e9b7 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -37,7 +37,9 @@ import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.ocr.util.LineHumpUtil; import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.project.entity.ProjectRelatedPersonnel; +import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; import com.jero.modules.project.service.IProjectRelatedPersonnelService; import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysDictItem; @@ -109,6 +111,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl userRoles = sysUserRoleService.list(new QueryWrapper().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色 - List userRoleIds = new ArrayList<>(); // 用户管理员/领导/studio角色 + List userRoleIds = new ArrayList<>(); // 用户管理员/领导 if (CollectionUtil.isNotEmpty(userRoles)) { List roleIdList = CollectManifestRoleIdEnum.getIdList(); List userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()); userRoleIds = roleIdList.stream().filter(e->userRoleIdList.contains(e)).collect(Collectors.toList()); } - if (CollectionUtil.isEmpty(userRoleIds) && !homoList.contains(loginUser.getUsername()) + // TODO 查询当前登录用户角色 是否是当前项目的studio + List studioList = new ArrayList<>(); + List projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectId); + if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) { + studioList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getStudioEngineerName).collect(Collectors.toList()); + } + + if (CollectionUtil.isEmpty(userRoleIds) && !studioList.contains(loginUser.getUsername()) + && !homoList.contains(loginUser.getUsername()) && !sdtList.contains(loginUser.getUsername()) && !dreListOfPCM.contains(loginUser.getUsername())) { @@ -860,6 +872,17 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl map = new HashMap<>(); + if (CutEnum.CN.getValue().equals(cut)) { + map.put("label", CollectManifestUserTypeEnum.STUDIO.getName()); + } else { + map.put("label", CollectManifestUserTypeEnum.STUDIO.getEnName()); + } + map.put("value", CollectManifestUserTypeEnum.STUDIO.getValue()); + userTypeList.add(map); + } + if (CollectionUtil.isNotEmpty(userRoleIds)) { List collectManifestRoleIdEnumList = CollectManifestRoleIdEnum.getByIdList(userRoleIds); for (CollectManifestRoleIdEnum collectManifestRoleIdEnum : collectManifestRoleIdEnumList) { @@ -912,6 +935,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl paramsCollectManifestEOList = listByIds(Arrays.asList(paramsCollectManifestIdStr)); List sdtList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getSdt).distinct().collect(Collectors.toList()); + if (CollectionUtil.isEmpty(sdtList)) { + throw new JeroBootException("没有可下发的工程接口人!"); + } for(String sdt : sdtList) { StringBuilder connectBuilder = new StringBuilder(); @@ -1067,7 +1112,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImplthe link,"; - String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " to handle it."; + String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter " + href + " and fill in the relevant information."; // 发送系统消息 SysAnnouncement sysAnnouncement = new SysAnnouncement(); @@ -1083,7 +1128,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl paramsConfigIdList = Arrays.asList(paramsConfigIds.split(",")); @@ -1153,6 +1201,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(ParamsManifestEO::getTitle, oldParamsManifestEO.getTitle()); - queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId()); - List paramsManifestEOList = list(queryWrapper); - if (CollectionUtil.isNotEmpty(paramsManifestEOList)) { - throw new JeroBootException("标题已存在!"); + ParamsManifestEO oldParamsManifestEO = getById(paramsManifestEO.getId()); + if (!oldParamsManifestEO.getTitle().equals(paramsManifestEO.getTitle())) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsManifestEO::getTitle, paramsManifestEO.getTitle()); + queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId()); + List paramsManifestEOList = list(queryWrapper); + if (CollectionUtil.isNotEmpty(paramsManifestEOList)) { + throw new JeroBootException("标题已存在!"); + } } ParamsManifestEO updateEO = new ParamsManifestEO(); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java index 6c1162f49..dabf60f86 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java @@ -100,7 +100,7 @@ public class ParamsInfoEO implements Serializable { private String description; /**认证类别*/ - @Excel(name = "认证类别", width = 15, dicCode = "cert_category") + @Excel(name = "*认证类别", width = 15, dicCode = "cert_category") @Dict(dicCode = "cert_category") @ApiModelProperty(value = "认证类别") private String certCategory; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java index 7ff7c338f..84bb61e12 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/IParamsInfoEOService.java @@ -97,7 +97,6 @@ public interface IParamsInfoEOService extends IService { String paramsTemplateId, String cut); - int deleteByParamsTemplateIds(String paramsTemplateIds); List selectListByParamsTemplateIds(String paramsTemplateIds); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java index d447a460c..faaa6d9ca 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/service/impl/ParamsInfoEOServiceImpl.java @@ -13,6 +13,7 @@ import com.jero.common.api.vo.Result; import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.IsMustEnum; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO; import com.jero.modules.cert.template.entity.ParamsInfoEO; import com.jero.modules.cert.template.enums.ControlTypeEnum; @@ -34,6 +35,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.jeecgframework.poi.excel.ExcelExportUtil; @@ -313,10 +315,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl bussExportMap = new HashMap<>(); bussExportMap.put("title", bussExportParams); - bussExportMap.put("entity", ParamsInfoEO.class); + if (CutEnum.CN.getValue().equals(cut)) { + bussExportMap.put("entity", ParamsInfoEO.class); bussExportMap.put("data", new ArrayList()); } else if (CutEnum.EN.getValue().equals(cut)) { + bussExportMap.put("entity", ParamsInfoEnExport.class); bussExportMap.put("data", new ArrayList()); } sheetsList.add(bussExportMap); @@ -332,10 +336,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl certExportMap = new HashMap<>(); certExportMap.put("title", certExportParams); - certExportMap.put("entity", CertCategoryParamsInfoEO.class); + if (CutEnum.CN.getValue().equals(cut)) { + certExportMap.put("entity", CertCategoryParamsInfoEO.class); certExportMap.put("data", new ArrayList()); } else if (CutEnum.EN.getValue().equals(cut)) { + certExportMap.put("entity", CertCategoryParamsInfoEnExport.class); certExportMap.put("data", new ArrayList()); } sheetsList.add(certExportMap); @@ -613,15 +619,15 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl result = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoCnImport.class, params); - paramsInfoEOList = result.getList(); + if (CutEnum.EN.getValue().equals(cut)) { + ExcelImportResult resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params); + List paramsInfoEOListEn = resultEn.getList(); + copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList); + } else { + ExcelImportResult result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params); + paramsInfoEOList = result.getList(); + } } else { // 认证类别参数表 if (certCategoryMap.containsKey(sheetName)) { - ExcelImportResult result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params); - List list = result.getList(); + List list = new ArrayList<>(); + if (CutEnum.EN.getValue().equals(cut)) { + ExcelImportResult resultEn = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoEnImport.class, params); + List listEn = resultEn.getList(); + copycertCategoryParamsInfoList(listEn, list); + } else { + ExcelImportResult result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params); + list = result.getList(); + } if (CollectionUtil.isNotEmpty(list)) { for (CertCategoryParamsInfoCnImport certCategoryParamsInfoEO : list){ //判断此行数据是否全部为空,是则不读取 @@ -822,6 +841,27 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl sourceList, List targetList) { + if (CollectionUtil.isNotEmpty(sourceList)) { + sourceList.forEach(item -> { + ParamsInfoCnImport target = new ParamsInfoCnImport(); + BeanUtils.copyProperties(item, target); + targetList.add(target); + }); + } + } + // 集合复制 + private void copycertCategoryParamsInfoList(List sourceList, List targetList) { + if (CollectionUtil.isNotEmpty(sourceList)) { + sourceList.forEach(item -> { + CertCategoryParamsInfoCnImport target = new CertCategoryParamsInfoCnImport(); + BeanUtils.copyProperties(item, target); + targetList.add(target); + }); + } + } + @Override public Result importParamsInfoData(List paramsInfoEOList, Map> certCategoryParamsInfoEOListMap, @@ -1129,7 +1169,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl { @Select("SELECT * FROM sys_dict_item WHERE DICT_ID = #{mainId} order by sort_order asc, item_value asc") public List selectItemsByMainId(String mainId); - @Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sort_order asc, item_value asc") + @Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE sys_dict_item.DEL_FLAG = 0 and DICT_CODE = #{dictCode} order by sort_order asc, item_value asc") public List selectItemsByDictCode(String dictCode); @Select("SELECT sys_dict_item.* FROM sys_dict_item LEFT JOIN sys_dict ON sys_dict_item.dict_id = sys_dict.id WHERE DICT_CODE = #{dictCode} order by sys_dict_item.sort_order asc") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 1adc12ed4..595f18294 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -2578,8 +2578,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.in(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryBaseEO.getId()); List dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(lambdaQueryWrapper); - String contentLog = null; + String contentLog = ""; if(dummyContentChangeEOList.size() == 0){ //没有添加过需要进行第一次添加 @@ -418,11 +418,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl updateLogList = dummyLogEOService.list(logEOQueryWrapper); if(CollectionUtils.isNotEmpty(updateLogList)){ - contentLog = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.joining("

")); + List contentLogList = updateLogList.stream().map(e -> e.getLogContent()).collect(Collectors.toList()); + for(int i=0 ; i < contentLogList.size() ;i++){ + contentLog += "("+ (i+1) +")" + contentLogList.get(i) + "
"; + } } } - //列表,维护清单不同的字段,addSerialNumber,deleteSerialNumber都为空->证明是没有更新的数据,不发送消息,数据不处理 if(MapUtils.isNotEmpty(baseDiff) || StringUtils.isNotEmpty(contentLog)) { //向订阅该领域管理的人发消息和飞书 @@ -1130,8 +1132,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl"+ contentLog; } return contentInfo; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java index 9ac30797f..973a8c568 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java @@ -127,7 +127,7 @@ public class InventoryAffirmJob implements Job { // XXX . String msgContentEN = "The remaining processing time for the regulation list confirmation of" + projectNameInfoEO.getProjectName() - + " is 3 days. Please check and handle it in time."; + + " are 3 days. Please check and handle it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); @@ -148,9 +148,9 @@ public class InventoryAffirmJob implements Job { currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); /*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/ - String msgContentEN = "The the regulation list confirmation of " + String msgContentEN = "The the regulation list confirmation for " + projectNameInfoEO.getProjectName() - + " is coming to an end today. Please check and deal with it in time"; + + " will expire today. Please check and address it in a timely manner."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java index 32183fc67..f5489d989 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/PrehomoJob.java @@ -133,7 +133,7 @@ public class PrehomoJob implements Job { //The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time. String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is 3 days. Please check and handle it in time."; + + " are 3 days. Please check and handle it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); @@ -157,7 +157,7 @@ public class PrehomoJob implements Job { //The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time String msgContentEN = "The the Pre-Homo confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is coming to an end today. Please check and deal with it in time."; + + " will expire today. Please check and address it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java index 052617f47..32a1ea3b8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/VerifyComplianceJob.java @@ -130,9 +130,9 @@ public class VerifyComplianceJob implements Job { //您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理 //The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time. - String msgContentEN = "The remaining processing time for the Verify compliance confirmation of " + String msgContentEN = "The remaining processing time for the validation compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is 3 days. Please check and handle it in time."; + + " are 3 days. Please check and handle it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); @@ -154,9 +154,9 @@ public class VerifyComplianceJob implements Job { //您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理 //The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time - String msgContentEN = "The the Verify compliance confirmation of " + String msgContentEN = "The the validation compliance confirmation of " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is coming to an end today. Please check and deal with it in time."; + + " will expire today. Please check and address it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java index 100ab9d79..d50c58f77 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/designComplianceJob.java @@ -128,9 +128,9 @@ public class designComplianceJob implements Job { threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList()); //您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理 - String msgContentEN = "The remaining processing time for the design compliance confirmation of " + String msgContentEN = "The remaining processing time for the design compliance confirmation for " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is 3 days. Please check and handle it in time."; + + " are 3 days. Please check and address it in a timely manner."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); @@ -151,9 +151,9 @@ public class designComplianceJob implements Job { currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList()); //您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理 - String msgContentEN = "The the design compliance confirmation of " + String msgContentEN = "The the design compliance confirmation for " + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() - + " is coming to an end today. Please check and deal with it in time."; + + " will expire today. Please check and address it in time."; //飞书跳转链接 String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType(); 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 d63cd43fb..b8a0705aa 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 @@ -1085,8 +1085,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl
- + {{ $t('ExportReport') }}
{{ $t('batSetting') }}
+
+ + {{ $t('question') }} +
...{{ $t('more') }} @@ -971,6 +975,49 @@ this.$message.warning(this.$t('selectLeastOne')) } }, + questionClick() { + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + let isTrue + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < selectedRowKeys.length; j++) { + if (this.dataSource[i].id == selectedRowKeys[j]) { + if (this.dataSource[i].taskAffirmStatus == 'List to confirm' || + this.dataSource[i].inventoryAffirmStatus == 'List to confirm') { + isTrue = true + } else { + isTrue = false + this.$message.warning(this.$t('OnlyOrTaskconfirmationOut')) + return + } + } + } + } + if (isTrue) { + let _this = this + this.$confirm({ + content: _this.$t('ConfirmQuestion'), + onOk() { + let query = { + ids: selectedRowKeys.join(','), + projectLibraryId: _this.$route.query.id + } + postAction('project/projectLawsInventoryEO/expediting', query).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.getList() + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + } + }) + } + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, fixedPlateClick() { if (this.dataSource && this.dataSource.length > 0) { let isTrue diff --git a/jero-web/src/views/projectManagement/projectStatusBoard/components/TaskPlanList.vue b/jero-web/src/views/projectManagement/projectStatusBoard/components/TaskPlanList.vue index e4315a5d1..0551e59df 100644 --- a/jero-web/src/views/projectManagement/projectStatusBoard/components/TaskPlanList.vue +++ b/jero-web/src/views/projectManagement/projectStatusBoard/components/TaskPlanList.vue @@ -27,9 +27,40 @@
-
-
-
+
+ + +
+
+ {{item.projectName}} +
+
+
+
+
{{item}}
+
+
+
+
+
+
{{val.name}}
+ + + +
{{val.time.slice(0,11)}}
+
+
+
+
+ {{handlingTime}} +
+
+ +
{{this.$t('dataLoading')}}
@@ -57,7 +88,10 @@ loadingMain: false, dataSource: [], open: false, - getTime: [] + getTime: [], + timeList: [], + timeData: [], + handlingTime: '' } }, created() { @@ -65,6 +99,7 @@ }, mounted() { this.getTimeline() + this.handlingTime = moment(new Date()).format('YYYY-MM-DD') }, methods: { getTimeline() { @@ -104,166 +139,100 @@ } getAction(this.url.timelineList, query).then((res) => { if (res.success) { - this.getEcharts(time, res.result.reverse()) + this.getEcharts(time, res.result) } }) }, getEcharts(timeList, timeData) { - var chartDom = document.getElementById('main') - var myChart = echarts.init(chartDom) - var option - let list = [] - let listTime = [] - for (let i = 0; i < timeList.length; i++) { - for (let j = 0; j < 31; j++) { - let num - if ((j + 1) < 10) { - num = '0' + (j + 1) - } else { - num = (j + 1) + this.timeList = [] + if (timeList.length <= 12) { + this.timeList = timeList + } else if (timeList.length <= 24) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 2 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 36) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 3 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 48) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 4 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 60) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 5 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } } - listTime.push(timeList[i]) - list.push(timeList[i] + '-' + num) - } - } - const hours = listTime - const days = [] - let content = [] - if (timeData && timeData.length > 0) { - timeData.forEach(res => { - days.push(res.projectName) - content.push(res.data[0]) }) } - let timeDataList = [] - let data = [] - for (let j = 0; j < content.length; j++) { - for (let k = 0; k < content[j].length; k++) { - content[j][k].index = j - timeDataList.push(content[j][k]) - } - } - for (let i = 0; i < list.length; i++) { - for (let j = 0; j < timeDataList.length; j++) { - let time = JSON.stringify(timeDataList[j].time).slice(1, 11) - if (time == list[i]) { - data.push([i, timeDataList[j].index, 12, j]) + let dataList = document.getElementsByClassName('box-top-content-right-top-text') + let contentRightText = document.getElementsByClassName('box-top-content-right-text') + let contentRightXian = document.getElementsByClassName('box-top-content-right-xian') + + setTimeout(() => { + let length = timeList.length / dataList.length + let clientWidth = dataList[0].clientWidth + clientWidth = clientWidth / length + for (let i = 0; i < timeData.length; i++) { + for (let j = 0; j < timeData[i].data[0].length; j++) { + for (let k = 0; k < dataList.length; k++) { + let num = (Math.ceil(clientWidth / 31)) * parseInt(timeData[i].data[0][j].time.slice(8, 10)) + timeList.forEach((res, index) => { + if (timeData[i].data[0][j].time.slice(0, 7) == res.slice(0, 7)) { + timeData[i].data[0][j].left = 'left:' + ((clientWidth * index + num) + 4) + 'px' + } + }) + } } } - } - let num = timeList.length * 3 - if (num < 31) { - num = 31 - } - option = { - legend: { - data: ['Punch Card'], - left: 'right' - }, - tooltip: { - position: 'left', - formatter: function(params) { - return ( - timeDataList[params.value[3]].name + '
' + - timeDataList[params.value[3]].time.slice(0, 11) - ) + contentRightText[0].style = 'display:none' + contentRightXian[0].style = 'display:none' + let clientWidthOne = dataList[0].clientWidth + clientWidthOne = clientWidthOne / length + let num = Math.ceil(clientWidthOne / 31) * parseInt(this.handlingTime.slice(8, 10)) + timeList.forEach((res, index) => { + if (res.slice(0, 7) == this.handlingTime.slice(0, 7)) { + contentRightText[0].style = 'left:' + ((clientWidthOne * index + num) - 24) + 'px;' + 'display:block' + contentRightXian[0].style = 'left:' + ((clientWidthOne * index + num) + 10) + 'px;' + 'display:block' } - }, - grid: { - top: 10, - left: 40, - right: 40, - containLabel: true - }, - xAxis: { - type: 'category', - data: hours, - boundaryGap: false, - splitLine: { - show: false - }, - axisTick: { - show: false - }, - position: 'top', - axisLabel: { - showMinLabel: true, - interval: num, - textStyle: { - fontFamily: 'Blue Sky Noto', - color: '#000F16', - fontSize: '16' - } - }, - axisLine: { - show: false - } - }, - yAxis: { - type: 'category', - data: days, - splitLine: { - show: false - }, - axisLine: { - show: false - }, - axisTick: { - show: false - }, - scale: true, - triggerEvent: true, - axisLabel: { - textStyle: { - fontFamily: 'Blue Sky Noto', - color: '#000F16', - fontSize: '16' - }, - margin: 50, - formatter: function(params) { - var val = '' - if (params.length > 8) { - val = params.substr(0, 8) + '...' - return val - } else { - return params - } - } - } - }, - series: [ - { - type: 'scatter', - color:['#21c9cc'], - symbolSize: function(val) { - return val[2] * 2 - }, - data: data, - animationDelay: function(idx) { - return idx * 5 - } - } - ] - } - this.loadingMain = false - option && myChart.setOption(option, true) - window.onresize = () => { - myChart.resize() - } - myChart.on('mouseover', 'yAxis.category', function(e) { - console.log(e) - let axisTip = document.querySelector('.axis-tip') - console.log(axisTip) - axisTip.innerText = e.value - axisTip.style.left = 100 + 'px' - axisTip.style.top = (e.event.event.y) - 180 + 'px' - axisTip.style.display = 'block' - }) - myChart.on('mouseout', 'yAxis.category', function(e) { - let axisTip = document.querySelector('.axis-tip') - axisTip.innerText = '' - axisTip.style.display = 'none' - }) + }) + + this.timeData = timeData + this.timeData = [...this.timeData] + this.loadingMain = false + }, 500) + } } } @@ -339,7 +308,7 @@ width: 100%; height: calc(100vh - 160px); margin-bottom: 20px; - padding: 10px 20px; + padding: 25px 20px 10px 20px; box-sizing: border-box; overflow: auto; } @@ -373,4 +342,132 @@ margin-top: -4px; margin-right: 20px; } + + .box-top-content-left { + width: 160px; + float: left; + padding-top: 100px; + margin-right: 20px; + } + + .box-top-content-left-text { + color: #191E29; + font-weight: bold; + font-size: 14px; + height: 104px; + letter-spacing: 0px; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .box-top-content-right { + width: calc(100% - 180px); + float: left; + } + + .box-top-content-right-top { + display: flex; + flex-direction: row; + justify-content: space-between; + } + + .box-top-content-right-top-text { + border-left: 1px #EAEAEC solid; + border-top: 1px #EAEAEC solid; + border-bottom: 1px #EAEAEC solid; + flex: 1; + height: 36px; + padding-left: 10px; + color: #54565A; + font-weight: bold; + font-size: 14px; + line-height: 36px; + letter-spacing: 0px; + text-align: center; + } + + .box-top-content-right-top-text:last-child { + border-right: 1px #EAEAEC solid; + } + + .box-top-content-right-bottom { + position: relative; + padding-top: 60px; + } + + .process-content { + position: relative; + height: 104px; + + .process-content-content { + background: #fff; + z-index: 98; + /*padding: 0 6px;*/ + position: absolute; + left: 40px; + text-align: center; + width: 24px; + height: 24px; + border-radius: 50%; + margin-top: 5px; + + .process-content-left { + width: 24px; + height: 24px; + /*margin-top: 5px;*/ + } + + .process-content-right-top { + font-size: 14px; + color: #040B29; + max-width: 155px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + position: absolute; + top: -8px; + left: 50%; + transform: translate(-50%, -50%); + } + + .process-content-right-button { + width: 70px; + font-size: 12px; + font-weight: 400; + color: #6F7385; + position: absolute; + left: 50%; + top: 34px; + transform: translate(-50%, -50%); + } + } + + .process-content-right-xian { + height: 2px; + width: 100%; + background: #E6E6E9; + position: absolute; + top: 16px; + } + } + + .box-top-content-right-xian { + width: 2px; + height: 100%; + border: 1px #21c9cc dashed; + position: absolute; + top: -36px; + z-index: 999; + } + + .box-top-content-right-text { + position: absolute; + top: -60px; + color: #21c9cc; + font-weight: bold; + font-size: 14px; + width: 100px; + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue index 918228ca2..1a70df1be 100644 --- a/jero-web/src/views/projectManagement/projectStatusBoard/index.vue +++ b/jero-web/src/views/projectManagement/projectStatusBoard/index.vue @@ -54,8 +54,37 @@
-
-
+ + +
+
+ {{item.projectName}} +
+
+
+
+
{{item}}
+
+
+
+
+
+
{{val.name}}
+ + + +
{{val.time.slice(0,11)}}
+
+
+
+
+ {{handlingTime}} +
+
+ +
{{this.$t('dataLoading')}}
@@ -116,6 +145,8 @@ data() { return { queryParam: {}, + timeList: [], + timeData: [], loading: false, loadingMain: false, dataSource: [], @@ -191,12 +222,14 @@ } ], startTime: undefined, - endTime: undefined + endTime: undefined, + handlingTime: '' } }, mounted() { this.getList() this.getTimeline() + this.handlingTime = moment(new Date()).format('YYYY-MM-DD') }, methods: { getTimeline() { @@ -238,164 +271,100 @@ } getAction(this.url.timelineList, query).then((res) => { if (res.success) { - this.getEcharts(time, res.result.reverse()) + this.getEcharts(time, res.result) } }) }, getEcharts(timeList, timeData) { - var chartDom = document.getElementById('main') - var myChart = echarts.init(chartDom) - var option - let list = [] - let listTime = [] - for (let i = 0; i < timeList.length; i++) { - for (let j = 0; j < 31; j++) { - let num - if ((j + 1) < 10) { - num = '0' + (j + 1) - } else { - num = (j + 1) + this.timeList = [] + if (timeList.length <= 12) { + this.timeList = timeList + } else if (timeList.length <= 24) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 2 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 36) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 3 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 48) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 4 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } + } + }) + } else if (timeList.length <= 60) { + timeList.forEach((res, index) => { + if (index == 0) { + this.timeList.push(res) + } else if (index == timeList.length - 1) { + this.timeList.push(res) + } else if (index % 5 == 0) { + if (this.timeList.length < 11) { + this.timeList.push(res) + } } - listTime.push(timeList[i]) - list.push(timeList[i] + '-' + num) - } - } - const hours = listTime - const days = [] - let content = [] - if (timeData && timeData.length > 0) { - timeData.forEach(res => { - days.push(res.projectName) - content.push(res.data[0]) }) } - let timeDataList = [] - let data = [] - for (let j = 0; j < content.length; j++) { - for (let k = 0; k < content[j].length; k++) { - content[j][k].index = j - timeDataList.push(content[j][k]) - } - } - for (let i = 0; i < list.length; i++) { - for (let j = 0; j < timeDataList.length; j++) { - let time = JSON.stringify(timeDataList[j].time).slice(1, 11) - if (time == list[i]) { - data.push([i, timeDataList[j].index, 12, j]) + let dataList = document.getElementsByClassName('box-top-content-right-top-text') + let contentRightText = document.getElementsByClassName('box-top-content-right-text') + let contentRightXian = document.getElementsByClassName('box-top-content-right-xian') + + setTimeout(() => { + let length = timeList.length / dataList.length + let clientWidth = dataList[0].clientWidth + clientWidth = clientWidth / length + for (let i = 0; i < timeData.length; i++) { + for (let j = 0; j < timeData[i].data[0].length; j++) { + for (let k = 0; k < dataList.length; k++) { + let num = (Math.ceil(clientWidth / 31)) * parseInt(timeData[i].data[0][j].time.slice(8, 10)) + timeList.forEach((res, index) => { + if (timeData[i].data[0][j].time.slice(0, 7) == res.slice(0, 7)) { + timeData[i].data[0][j].left = 'left:' + ((clientWidth * index + num) + 4) + 'px' + } + }) + } } } - } - let num = timeList.length * 3 - if (num < 31) { - num = 31 - } - option = { - legend: { - data: ['Punch Card'], - left: 'right' - }, - tooltip: { - position: 'left', - formatter: function(params) { - return ( - timeDataList[params.value[3]].name + '
' + - timeDataList[params.value[3]].time.slice(0, 11) - ) + contentRightText[0].style = 'display:none' + contentRightXian[0].style = 'display:none' + let clientWidthOne = dataList[0].clientWidth + clientWidthOne = clientWidthOne / length + let num = Math.ceil(clientWidthOne / 31) * parseInt(this.handlingTime.slice(8, 10)) + timeList.forEach((res, index) => { + if (res.slice(0, 7) == this.handlingTime.slice(0, 7)) { + contentRightText[0].style = 'left:' + ((clientWidthOne * index + num) - 24) + 'px;' + 'display:block' + contentRightXian[0].style = 'left:' + ((clientWidthOne * index + num) + 10) + 'px;' + 'display:block' } - }, - grid: { - top: 10, - left: 40, - right: 40, - containLabel: true - }, - xAxis: { - type: 'category', - data: hours, - boundaryGap: false, - splitLine: { - show: false - }, - axisTick: { - show: false - }, - position: 'top', - axisLabel: { - showMinLabel: true, - interval: num, - textStyle: { - fontFamily: 'Blue Sky Noto', - color: '#000F16', - fontSize: '16' - } - }, - axisLine: { - show: false - } - }, - yAxis: { - type: 'category', - data: days, - splitLine: { - show: false - }, - axisLine: { - show: false - }, - axisTick: { - show: false - }, - scale: true, - triggerEvent: true, - axisLabel: { - textStyle: { - fontFamily: 'Blue Sky Noto', - color: '#000F16', - fontSize: '16' - }, - margin: 50, - formatter: function(params) { - var val = '' - if (params.length > 8) { - val = params.substr(0, 8) + '...' - return val - } else { - return params - } - } - } - }, - series: [ - { - type: 'scatter', - color:['#21c9cc'], - symbolSize: function(val) { - return val[2] * 2 - }, - data: data, - animationDelay: function(idx) { - return idx * 5 - } - } - ] - } - this.loadingMain = false - option && myChart.setOption(option, true) - window.onresize = () => { - myChart.resize() - } - myChart.on('mouseover', 'yAxis.category', function(e) { - let axisTip = document.querySelector('.axis-tip') - axisTip.innerText = e.value - axisTip.style.left = 100 + 'px' - axisTip.style.top = (e.event.event.y) - 180 + 'px' - axisTip.style.display = 'block' - }) - myChart.on('mouseout', 'yAxis.category', function(e) { - let axisTip = document.querySelector('.axis-tip') - axisTip.innerText = '' - axisTip.style.display = 'none' - }) + }) + + this.timeData = timeData + this.timeData = [...this.timeData] + this.loadingMain = false + }, 500) + }, TaskPlanListClick() { let newUrl = this.$router.resolve({ @@ -439,7 +408,7 @@ width: 300px; } - \ No newline at end of file