diff --git a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql index 08b8f007e..3a32c5b11 100644 --- a/jero-boot/db/蔚来标准sql/dev_2nd_period.sql +++ b/jero-boot/db/蔚来标准sql/dev_2nd_period.sql @@ -22,3 +22,8 @@ ADD COLUMN `explanation` varchar(2000) NULL COMMENT '说明' AFTER `project_vers ALTER TABLE `laws_weilai`.`project_library_base` MODIFY COLUMN `software_version` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '软件版本' AFTER `explanation`; +-- 认证参数历史列表添加字段--------2022-11-02 未同步生产环境 +ALTER TABLE `laws_weilai`.`params_manifest_history` +ADD COLUMN `project_version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关项目版本' AFTER `params_template_name`, +ADD COLUMN `explanation` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `project_version`; + diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java index f9b86374a..fcb31c6e8 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java @@ -684,6 +684,7 @@ public class SysPermissionController { //项目参数任务 if(StringUtils.equals(permission.getId(), SysPermissionEnum.PROJECT_PARAMETER_TASKS.getId())){ boolean existTaskFlag = false; + existTaskFlag = sysPermissionService.judgeToDo(); meta.put("existTask",existTaskFlag); } json.put("meta", meta); diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/TodoCenterMapper.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/TodoCenterMapper.java index b6e0e59ca..d5b9363e4 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/TodoCenterMapper.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/TodoCenterMapper.java @@ -2,6 +2,7 @@ package com.jero.modules.system.mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; import java.util.Map; /** @@ -11,4 +12,10 @@ import java.util.Map; **/ public interface TodoCenterMapper { int todoCenterTaskCount(@Param("params") Map params); + + List listInfoHomo(@Param("userId") String userId, @Param("state") String state); + + Integer countSdtDre(@Param("userName") String userName); + + Integer countState(@Param("manifestId") String manifestId); } diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysAnnouncementSendMapper.xml b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysAnnouncementSendMapper.xml index e8572c2ad..c47d88995 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysAnnouncementSendMapper.xml +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysAnnouncementSendMapper.xml @@ -92,7 +92,9 @@ sa.open_type as open_type, sa.open_page as open_page, sa.msg_abstract, - sa.document_id as document_id + sa.document_id as document_id, + sa.msg_content_cn as msg_content_cn, + sa.msg_content_info_cn as msg_content_info_cn from sys_announcement_send sas left join sys_announcement sa ON sas.annt_id = sa.id where sa.del_flag = '0' diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/TodoCenterMapper.xml b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/TodoCenterMapper.xml index 29d53a4d9..75a7e43c2 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/TodoCenterMapper.xml +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/TodoCenterMapper.xml @@ -18,4 +18,39 @@ + + + + + + diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/ISysPermissionService.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/ISysPermissionService.java index 8f48db4f1..f9ab61583 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/ISysPermissionService.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/ISysPermissionService.java @@ -1,13 +1,11 @@ package com.jero.modules.system.service; -import java.util.List; - -import org.apache.ibatis.annotations.Param; +import com.baomidou.mybatisplus.extension.service.IService; import com.jero.common.exception.JeroBootException; import com.jero.modules.system.entity.SysPermission; import com.jero.modules.system.model.TreeModel; -import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; /** *

@@ -61,4 +59,6 @@ public interface ISysPermissionService extends IService { * @return */ public boolean hasPermission(String username, String url); + + boolean judgeToDo(); } diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysPermissionServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysPermissionServiceImpl.java index 042ce05df..af4973242 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysPermissionServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysPermissionServiceImpl.java @@ -1,33 +1,32 @@ package com.jero.modules.system.service.impl; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.constant.CacheConstant; import com.jero.common.constant.CommonConstant; import com.jero.common.exception.JeroBootException; +import com.jero.common.system.vo.LoginUser; import com.jero.common.util.oConvertUtils; import com.jero.modules.system.entity.SysPermission; import com.jero.modules.system.entity.SysPermissionDataRule; -import com.jero.modules.system.mapper.SysDepartPermissionMapper; -import com.jero.modules.system.mapper.SysDepartRolePermissionMapper; -import com.jero.modules.system.mapper.SysPermissionMapper; -import com.jero.modules.system.mapper.SysRolePermissionMapper; +import com.jero.modules.system.mapper.*; import com.jero.modules.system.model.TreeModel; import com.jero.modules.system.service.ISysPermissionDataRuleService; import com.jero.modules.system.service.ISysPermissionService; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import javax.annotation.Resource; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** *

@@ -55,6 +54,9 @@ public class SysPermissionServiceImpl extends ServiceImpl queryListByParentId(String parentId) { return sysPermissionMapper.queryListByParentId(parentId); @@ -263,4 +265,25 @@ public class SysPermissionServiceImpl extends ServiceImpl 0) { + return true; + } + + List manifestIdList = todoCenterMapper.listInfoHomo(loginUser.getId(),"收集中"); + if(CollectionUtil.isNotEmpty(manifestIdList)) { + for (int i = 0; i < manifestIdList.size(); i++) { + int coutState = todoCenterMapper.countState(manifestIdList.get(i)); + if (coutState > 0) { + return true; + } + } + } + + return false; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java index 1a6edaa5b..f157d3b57 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java @@ -17,6 +17,8 @@ import java.util.Map; public interface ParamsCollectManifestEOMapper extends BaseMapper { List listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); + + List listInfoOfTodoCenter(@Param("manifestIdList") List manifestIdList); List> listInfoForExport(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO, @Param("ids") String ids); List listInfoOfTodoCenter(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java index 5d718889d..94f76a559 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/ParamsManifestEOMapper.java @@ -31,4 +31,7 @@ public interface ParamsManifestEOMapper extends BaseMapper { ParamsManifestVO getProjectById(@Param("projectId") String projectId); List> labelListForProjectDetails(@Param("projectId") String projectId); + + List listInfoHomo(@Param("userId") String userId, @Param("state") String state); + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index 80b2edd93..f26174908 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -86,6 +86,10 @@ - + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index 7a20536f8..9ab78c99b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -169,7 +169,7 @@ public interface IParamsCollectManifestEOService extends IService importDre(MultipartFile file, String cut, String paramsManifestId) throws IOException; + Result importDre(MultipartFile file, String cut, String paramsManifestId); Result importData(List> dataList, String unzipfilepath, diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index ab69cbfe9..24926b2ef 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -41,7 +41,6 @@ import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOSe import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsg2Vo; -import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.message.websocket.WebSocket; import com.jero.modules.ocr.service.WebSocketServer; import com.jero.modules.ocr.util.LineHumpUtil; @@ -64,6 +63,7 @@ import com.jero.modules.system.service.ISysUserService; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDataFormat; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; @@ -1892,13 +1892,20 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl").append(nioNumber).append("").append("工程接口人没有填写,请填写完工程接口人再进行下发收集。"); } - } else { + } else if ("2".equals(type)) { if (CutEnum.EN.getValue().equals(cut)) { stringBuilder.append("NIO number is ").append(nioNumber).append(",state is ").append("").append(stateName).append("").append(",no operation permission for this button."); } else { stringBuilder.append("NIO编号为").append(nioNumber).append(",状态为").append("").append(stateName).append("").append(",没有此按钮的操作权限。"); } + } else if ("3".equals(type)) { + if (CutEnum.EN.getValue().equals(cut)) { + stringBuilder.append("NIO number is ").append(nioNumber).append(",state is ").append("").append(stateName).append("").append(", fail to import."); + } else { + stringBuilder.append("NIO编号为").append(nioNumber).append(",状态为").append("").append(stateName).append("").append(",导入失败。"); + } + } msgList.add(stringBuilder.toString()); @@ -2447,6 +2454,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl allRelevFileList = new ArrayList<>(); + Map fileNowPathMap = new HashMap<>(); + //放文字内容 int allRow = 2; for(int rowNum = 0;rowNum < allParamsInfoList.size(); rowNum++){ Map exportDto = allParamsInfoList.get(rowNum); + // 处理文件 + List fileList = (List) exportDto.get("fileList"); + if (CollectionUtil.isNotEmpty(fileList)) { + allRelevFileList.addAll(fileList); + fileList.forEach(file -> { + fileNowPathMap.put(file.getId(), fileNowPath + File.separator + exportDto.get("nio_number")); + }); + + } + allRow++; XSSFRow row1 = sheetItems.createRow(allRow); for(int cellNum = 0; cellNum < fieldList.size(); cellNum++){ @@ -2552,13 +2581,29 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl importDre(MultipartFile file, String cut, String paramsManifestId) throws IOException { + public Result importDre(MultipartFile file, String cut, String paramsManifestId) { //验证文件名是否合格 /* 截取后缀名 */ int pos = file.getOriginalFilename().lastIndexOf("."); @@ -2605,8 +2651,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> datas = result; if(datas!=null &&!datas.isEmpty()){ try { - int i = 0 ; - List> datasUpdate = new ArrayList<>(); +// int i = 0 ; +// List> datasUpdate = new ArrayList<>(); //处理空行数据,当读取exceL出现空行过多时,空行数为20以上时中断读取,将数据清洗为新的list - for(Map importDto :datas){ - if(i>20){ - break; - } - //判断此行数据是否全部为空 - if(checkObjAllFieldsIsNull(importDto)){ - i++; - //是则不读取 - continue; - } - i = 0; - datasUpdate.add(importDto); - } +// for(Map importDto :datas){ +// if(i>20){ +// break; +// } +// //判断此行数据是否全部为空 +// if(checkObjAllFieldsIsNull(importDto)){ +// i++; +// //是则不读取 +// continue; +// } +// i = 0; +// datasUpdate.add(importDto); +// } String unzipfilepath = zipEntryName; - Result message = importData(datasUpdate,unzipfilepath,cut,paramsManifestId); + Result message = importData(datas,unzipfilepath,cut,paramsManifestId); //删除原上传文件 FileUnZip.deleteDir(saveDirectory); return message; + } catch (NullPointerException e) { + //删除原上传文件 + FileUnZip.deleteDir(saveDirectory); + if(CutEnum.CN.getValue().equals(cut)){ + resultMsg = "读取失败,请严格按照模板文件导入数据"; + }else{ + resultMsg = "The data fails to be read. Import data strictly according to the template file"; + } + return Result.error(1, resultMsg); } catch (Exception e) { //删除原上传文件 FileUnZip.deleteDir(saveDirectory); @@ -2738,6 +2793,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl configDataList = (List) map.get("configDataList"); + List> notImportNioNumberList = (List>) map.get("notImportNioNumberList"); for (ParamsConfigDataEO importDto : configDataList) { //判断此行数据是否全部为空,是则不读取 @@ -2752,7 +2808,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl msgList = getMsgOfIssueCollection(notImportNioNumberList, cut, "3"); + return Result.OK(null, msgList); + } else { - msg = "import " + countSuccess + " datas successfully"; + int countSuccess = configDataList.size(); + if (CutEnum.CN.getValue().equals(cut)) { + msg = "成功导入" + countSuccess + "条"; + } else { + msg = "import " + countSuccess + " datas successfully"; + } + return Result.OK(msg, null); } - return Result.OK(msg, null); } else { if (CutEnum.CN.getValue().equals(cut)) { msg = "导入失败"; @@ -3172,6 +3234,11 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询所有配置列 + + List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); + List paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据 + Map isMustMap = ParamsIsMustEnum.toMapForExport(cut); Map controlVerifyMap = ControlVerifyEnum.toMapForExport(cut); Map controlTypeMap = ControlTypeEnum.toMapForExport(cut); @@ -3182,11 +3249,128 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl fileList = new ArrayList<>(); + + paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 + + String paramsConfigId = paramsConfigEO.getId(); + List paramsConfigDataEOS = paramsConfigDataEOList.stream().filter(e-> paramsConfigId.equals(e.getParamsConfigId()) && paramsCollectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList()); // 参数配置数据 + StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 + if (CollectionUtil.isNotEmpty(paramsConfigDataEOS)) { + ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOS.get(0); + + if (ControlTypeEnum.TEXT.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()); + } + + } else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType) + || ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!")); + } + + } else if (ControlTypeEnum.FILE.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()); + + fileList.addAll(ossFileList); + } + + } + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType) + || ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) { + + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()); + } + + configDataBuilder.append("#"); + + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!")); + } + + } else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()); + } + + configDataBuilder.append("#"); + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()); + + fileList.addAll(ossFileList); + } + + } + + } else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType) + || ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!")); + } + + configDataBuilder.append("#"); + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()); + + fileList.addAll(ossFileList); + } + + } + + } else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) { + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()); + } + configDataBuilder.append("#"); + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!")); + } + configDataBuilder.append("#"); + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()); + + fileList.addAll(ossFileList); + } + + } + + } + + } + + String configData = configDataBuilder.toString(); + if (StringUtils.isNotEmpty(configData) && "".equals(configData.replace("#", ""))) { + configData = configData.replace("#", ""); + } + + record1.put(paramsConfigEO.getId(), configData); + }); + + record1.put("fileList", fileList); + } + + result.add(record1); } return result; @@ -3574,9 +3758,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl configIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); List paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(configIdList); - Map controlTypeMap = ControlTypeEnum.toMapForImport(cut); - Map controlVerifyMap = ControlVerifyEnum.toMapForImport(cut); - Map paramsIsMustMap = ParamsIsMustEnum.toMapForImport(cut); - //存放数据验证结果信息 List configDataList = new ArrayList<>(); + List verifyNioNumber = new ArrayList<>(); + List> notImportNioNumberList = new ArrayList<>(); List stringMessage = new ArrayList<>(); int i = 3; //记录行号 //循环验证数据 @@ -3618,10 +3800,50 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl resultMap = new HashMap<>(); String nioNumber = (String) dto.get("nio_number"); - String controlType = controlTypeMap.get((String) dto.get("control_type")); - String controlVerify = controlVerifyMap.get((String) dto.get("control_verify")); - String controlValues = (String) dto.get("control_values"); - String isMust = paramsIsMustMap.get((String) dto.get("is_must")); + if (StringUtils.isBlank(nioNumber)) { + continue; + } + + List listPCM = paramsCollectManifestEOList.stream().filter(e-> nioNumber.equals(e.getNioNumber())).collect(Collectors.toList()); + if (CollectionUtil.isEmpty(listPCM)) { + if (CutEnum.EN.getValue().equals(cut)) { + errorMsg += "NIO Number can not find; "; + } else{ + errorMsg += "NIO编号不存在;"; + } + countError++; + stringMessage.add(errorMsg); + continue; + } + + if (!verifyNioNumber.contains(nioNumber)) { + verifyNioNumber.add(nioNumber); + } else{ + if (CutEnum.EN.getValue().equals(cut)) { + errorMsg += "NIO Number is repeat; "; + } else{ + errorMsg += "NIO编号重复;"; + } + countError ++; + stringMessage.add(errorMsg); + continue; + } + + ParamsCollectManifestEO paramsCollectManifestEO = listPCM.get(0); + String state = paramsCollectManifestEO.getState(); + if (!CollectManifestStateEnum.WAIT_FILL.getValue().equals(state) && !CollectManifestStateEnum.CERT_BACK.getValue().equals(state)) { + Map msgMap = new HashMap<>(); + msgMap.put("nioNumber", nioNumber); + msgMap.put("state", state); + msgMap.put("type", "3"); + notImportNioNumberList.add(msgMap); + continue; + } + + String controlType = paramsCollectManifestEO.getControlType(); + String controlVerify = paramsCollectManifestEO.getControlVerify(); + String controlValues = paramsCollectManifestEO.getControlValues(); + String isMust = paramsCollectManifestEO.getIsMust(); for (Map.Entry entry : dto.entrySet()) { String key = entry.getKey(); String value = (String) entry.getValue(); @@ -3681,22 +3903,43 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[1]); + if (StringUtils.isNotEmpty(value)) { + if (countChar(value, "#") != 1) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "格式不正确;"; + } else { + errorMsg += configMap.get(key) + " format is incorrect; "; + } + countError++; + } else { + if (value.split("#").length > 1) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[1]); - resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setTextData(value.split("#")[0]); + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); - } else { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, true, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[0]); + } else if (value.split("#").length == 1 && value.endsWith("#")) { + // 校验必填 + if (IsMustEnum.YES.getValue().equals(isMust)) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "下拉单选为必填项,不能为空;"; + } else { + errorMsg += configMap.get(key) + " is mandatory and cannot be empty; "; + } + countError++; + } + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); + + } + } } } @@ -3710,21 +3953,42 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, false, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[1]); + if (StringUtils.isNotEmpty(value)) { + if (countChar(value, "#") != 1) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "格式不正确;"; + } else { + errorMsg += configMap.get(key) + " format is incorrect; "; + } + countError++; + } else { + if (value.split("#").length > 1) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, false, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[1]); - resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setTextData(value.split("#")[0]); - } else { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[0]); + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); + } else if (value.split("#").length == 1 && value.endsWith("#")) { + // 校验必填 + if (IsMustEnum.YES.getValue().equals(isMust)) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "下拉多选为必填项,不能为空;"; + } else { + errorMsg += configMap.get(key) + " is mandatory and cannot be empty; "; + } + countError++; + } + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); + + } + } } } @@ -3737,18 +4001,35 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], isMust, "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); - if (value.split("#").length > 1) { - resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setFileConnectId(value.split("#")[1]); - } + resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setFileConnectId(value.split("#")[1]); + } else if (value.split("#").length == 1 && value.endsWith("#")) { + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], isMust, "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); + + } + } + } } } else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) { @@ -3761,16 +4042,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, true, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[0]); - if (value.split("#").length > 1) { - resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setFileConnectId(value.split("#")[1]); + resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setFileConnectId(value.split("#")[1]); + } else if (value.split("#").length == 1 && value.endsWith("#")) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, true, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[0]); + } + } } } @@ -3784,16 +4081,33 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[0]); - if (value.split("#").length > 1) { - resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setFileConnectId(value.split("#")[1]); + resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setFileConnectId(value.split("#")[1]); + } else if (value.split("#").length == 1 && value.endsWith("#")) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[0]); + + } + } } } @@ -3807,28 +4121,51 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl 1) { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[1]); + if(StringUtils.isNotEmpty(value)) { + if (countChar(value, "#") != 2) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "格式不正确;"; + } else { + errorMsg += configMap.get(key) + " format is incorrect; "; + } + countError++; + } else { + if (value.split("#").length > 1) { + resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setPullData(value.split("#")[1]); - resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setTextData(value.split("#")[0]); + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); - if (value.split("#").length > 2) { - resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[2], ParamsIsMustEnum.NO.getValue(), cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setFileConnectId(value.split("#")[2]); + if (!value.endsWith("#")) { //3 + resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[2], ParamsIsMustEnum.NO.getValue(), cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setFileConnectId(value.split("#")[2]); + + } + + } else if (value.split("#").length == 1 && value.endsWith("#")) { + // 校验必填 + if (IsMustEnum.YES.getValue().equals(isMust)) { + if (CutEnum.CN.getValue().equals(cut)) { + errorMsg += configMap.get(key) + "下拉单选为必填项,不能为空;"; + } else { + errorMsg += configMap.get(key) + " is mandatory and cannot be empty; "; + } + countError++; + } + + resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut); + errorMsg += (String) resultMap.get("errorMsg"); + countError += (int) resultMap.get("countError"); + configDataEO.setTextData(value.split("#")[0]); + } } - } else { - resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut); - errorMsg += (String) resultMap.get("errorMsg"); - countError += (int) resultMap.get("countError"); - configDataEO.setPullData(value.split("#")[0]); } } @@ -3855,6 +4192,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl transPageInfo(@RequestBody Map parameter) { + IPage infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter); + return Result.OK(infoPage); + } + /** * 列表查询 * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index b4bc7f017..e7692c4c6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -459,10 +459,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl" + baseEO.getName() + ""; + //消息英文--不带标签 String contentNo = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + sbContentNo; //消息英文--带标签 - String contentYes = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:"+ "
" + sbContentYes;; + String contentYes = "The "+ hrefTemp+" virtual list you subscribed to has been updated as follows:"+ "
" + sbContentYes;; int countInfoNo = 1; StringBuilder sbContentINfoNo = new StringBuilder(); @@ -487,9 +491,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl"+sbContentInfoYes; - - + String contentInfoYes = "您所订阅的"+hrefTemp+"虚拟清单已更新,更新内容如下:"+"
"+sbContentInfoYes; List userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId()); List thirdIdList = new ArrayList<>(); @@ -545,47 +547,52 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId()); - List thirdIdList = new ArrayList<>(); - if(userNameList.size() != 0){ - List userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList()); - thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList()); - if(userIdList.size() != 0){ - //封装消息的实体类 The XX virtual list you subscribed to has been withdrawn - String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; - //Please note that the XX virtual list you subscribed to has been withdrawn. - String contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; +// try { +// List userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId()); +// List thirdIdList = new ArrayList<>(); +// if(userNameList.size() != 0){ +// List userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList()); +// thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList()); +// if(userIdList.size() != 0){ +// String hrefTemp = "" + baseEO.getName() + ""; +// //封装消息的实体类 The XX virtual list you subscribed to has been withdrawn +// String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; +// //Please note that the XX virtual list you subscribed to has been withdrawn. +// String contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; - String contentCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; - String contentInfoEn = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; - SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, - title, - contentInfoEn, - contentInfoEn, - MessageTypeEnum.READ.getValue(), - MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), - contentCn,contentCn); - sysAnnouncementService.saveAnnouncement(sysAnnouncement); - bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title); - } - } +// String contentCnNo = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; +// String contentCnYes = "您订阅的虚拟清单"+ hrefTemp+"已被撤回."; +// String contentInfoEnNo = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; +// String contentInfoEnYes = "Please note that the "+ hrefTemp+" virtual list you subscribed to has been withdrawn."; +// SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, +// title, +// contentInfoEnNo, +// contentInfoEnYes, +// MessageTypeEnum.READ.getValue(), +// MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), +// contentCnNo,contentCnYes); +// sysAnnouncementService.saveAnnouncement(sysAnnouncement); +// bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title); +// } +// } //飞书 - if(thirdIdList.size() != 0){ - String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; - String contentInfoFeiCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; - String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单"; - FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); - feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); - feishuMsgVo.setUrl(href); - feishuMsgVo.setContentEn(contentInfoTemp); - feishuMsgVo.setContent(contentInfoFeiCn); - iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}), feishuMsgVo,null,null); -// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href); - } - }catch (Exception e){ - e.printStackTrace(); - } +// if(thirdIdList.size() != 0){ +// String contentInfoTemp = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn."; +// String contentInfoFeiCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回."; +// String href = backUrl + "/virtualListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单"; +// FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); +// feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); +// feishuMsgVo.setUrl(href); +// feishuMsgVo.setContentEn(contentInfoTemp); +// feishuMsgVo.setContent(contentInfoFeiCn); +// iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}), feishuMsgVo,null,null); +//// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href); +// } +// }catch (Exception e){ +// e.printStackTrace(); +// } } } // /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/home/service/impl/HomeFunctionModuleEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/home/service/impl/HomeFunctionModuleEOServiceImpl.java index f5157cf51..5b74357c8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/home/service/impl/HomeFunctionModuleEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/home/service/impl/HomeFunctionModuleEOServiceImpl.java @@ -10,13 +10,19 @@ import com.jero.modules.home.mapper.HomeFunctionModuleEOMapper; import com.jero.modules.home.service.IHomeFunctionModuleEOService; import com.alibaba.fastjson.JSONObject; +import com.jero.modules.system.entity.SysPermission; +import com.jero.modules.system.service.ISysPermissionService; +import org.apache.commons.lang3.ObjectUtils; import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.stream.Collectors; /** * @Description: 功能模块 @@ -27,6 +33,9 @@ import java.util.UUID; @Service public class HomeFunctionModuleEOServiceImpl extends ServiceImpl implements IHomeFunctionModuleEOService { + @Autowired + private ISysPermissionService sysPermissionService; + /** * 保存 * @@ -103,22 +112,35 @@ public class HomeFunctionModuleEOServiceImpl extends ServiceImpl queryList(String cut) { LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //用户拥有权限的菜单 + List metaList = sysPermissionService.queryByUser(loginUser.getUsername()); + //所有的图表(state=0) LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.in(HomeFunctionModuleEO::getState,"0").isNull(HomeFunctionModuleEO::getCreateBy); List homeFunctionModuleEOList = this.list(wrapper); + List homeFunctionModuleEOListTemp = new ArrayList<>(); + if(ObjectUtils.isNotEmpty(homeFunctionModuleEOList)){ + for (SysPermission sysPermission : metaList) { + List collect = homeFunctionModuleEOList.stream().filter(e -> e.getIconName().equals(sysPermission.getName())).collect(Collectors.toList()); + if(ObjectUtils.isNotEmpty(collect)){ + homeFunctionModuleEOListTemp.addAll(collect); + } + } + } + homeFunctionModuleEOListTemp = homeFunctionModuleEOListTemp.stream().distinct().collect(Collectors.toList()); //当前用户配置的图表 LambdaQueryWrapper wrapperTemp = new LambdaQueryWrapper<>(); wrapperTemp.in(HomeFunctionModuleEO::getCreateBy,loginUser.getUsername()).orderByAsc(HomeFunctionModuleEO::getState).orderByAsc(HomeFunctionModuleEO::getSort); List homeFunctionModuleEOS = this.list(wrapperTemp); if(homeFunctionModuleEOS.size() == 0){ if(CutEnum.EN.getValue().equals(cut)){ - for (HomeFunctionModuleEO homeFunctionModuleEO : homeFunctionModuleEOList) { + for (HomeFunctionModuleEO homeFunctionModuleEO : homeFunctionModuleEOListTemp) { homeFunctionModuleEO.setIconName(homeFunctionModuleEO.getIconNameEn()); } } - return homeFunctionModuleEOList; + return homeFunctionModuleEOListTemp; }else{ if(CutEnum.EN.getValue().equals(cut)){ for (HomeFunctionModuleEO homeFunctionModuleEO : homeFunctionModuleEOS) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java index a5a6e52ac..82050c16a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseCommentEOServiceImpl.java @@ -88,28 +88,33 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl"+ problemKnowledgeBaseEO.getTitle() + ""; + String contentINfoCNNo = "您发布的问题知识库信息"+href+"有新评论,请注意查看."; + String contentInfoENNo = "In the Q&A knowledge "+href+" you created, a new comment has been added. Please be reminded to check it out."; + + //发送消息(站内和飞书) //您发布的问题知识库信息XXXXXXXX有新评论,请注意查看。 //In the Q&A knowledge xxxxxxxx you created, a new comment has been added. Please be reminded to check it out. SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(Arrays.asList(sysUser.getId().split(",")), "msgTitle", contentENNo, - contentENNo, + contentInfoENNo, MessageTypeEnum.PUSH.getValue(), MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(), contentCNNo, - contentCNNo); + contentINfoCNNo); this.sysAnnouncementService.saveAnnouncement(sysAnnouncement); bussDocumentLibraryEOService.sendWebsocket(com.jero.modules.system.util.StringUtils.join(sysUser.getThirdId(), ","), sysUser.getThirdId()); - String href = backUrl +"/problemknowledgeBase"; +// String href = backUrl +"/problemknowledgeBase"; FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName()); - feishuMsgVo.setUrl(href); + feishuMsgVo.setUrl(url); feishuMsgVo.setContentEn(contentENNo); feishuMsgVo.setContent(contentCNNo); 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 352110c00..915893fa7 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 @@ -170,7 +170,7 @@ public class PrehomoJob implements Job { } } //如果prehomo - 逾期后每天通知 - if (projectLawsInventoryEO.getDesignDueDate().before(currentDate)) { + if (!StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))&&projectLawsInventoryEO.getDesignDueDate().before(currentDate)) { if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){ dueUserIdList.add(projectLawsInventoryEO.getDesignDutyId()); } 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 b96f9c712..65b071784 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 @@ -169,7 +169,7 @@ public class VerifyComplianceJob implements Job { } } //如果验证符合性 - 逾期后每天通知 - if (projectLawsInventoryEO.getVerifyDueDate().before(currentDate)) { + if (!StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))&&projectLawsInventoryEO.getVerifyDueDate().before(currentDate)) { if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){ dueUserIdList.add(projectLawsInventoryEO.getVerifyDutyId()); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java index 19caa49cd..f6ad08d25 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java @@ -41,6 +41,7 @@ import com.jero.modules.system.enums.DicCodeEnum; import com.jero.modules.system.mapper.SysDictItemMapper; import com.jero.modules.system.mapper.SysUserMapper; import com.jero.modules.system.service.ISysDictService; +import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.util.StringUtils; import org.apache.commons.collections4.CollectionUtils; @@ -129,6 +130,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl projectLibraryBases = this.queryById(id,null); - if(!loginUser.getUsername().equals(projectLibraryBases.get(0).getCreateBy())){ + //管理员和创建人可以删除,其余人不能删除 + boolean administrator = sysUserService.isAdministrator(); + if(!loginUser.getUsername().equals(projectLibraryBases.get(0).getCreateBy()) && !administrator){ if(CutEnum.CN.getValue().equals(cut)){ throw new JeroBootException("该条项目非本人创建,不能删除"); }else{ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java index 5d96f809a..96b769351 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryFeedbackEOServiceImpl.java @@ -477,13 +477,13 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl queryOneWrapper = new QueryWrapper<>(); - queryOneWrapper.lambda().eq(SysUser::getId,initiatorId); - SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper); - initiator = sysUser.getUsername(); - } + //String initiator = ""; + //if (StringUtils.isNotEmpty(initiatorId)) { + // QueryWrapper queryOneWrapper = new QueryWrapper<>(); + // queryOneWrapper.lambda().eq(SysUser::getId,initiatorId); + // SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper); + // initiator = sysUser.getUsername(); + //} //feishuMsgVo.setInitiator(initiator); //MessageTypeEnum messageTypeEnum = null; @@ -518,12 +518,12 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl paramsManifestEOListAll = paramsManifestEOMapper.listForTodoCenter(pageVO); - - // 筛选出当前登录人能在清单中是homo/sdt/dre角色的清单,并分页 - LambdaQueryWrapper projectLibraryBaseLambdaQueryWrapper = new LambdaQueryWrapper<>(); - List projectLibraryBaseListAll = projectLibraryBaseMapper.selectList(projectLibraryBaseLambdaQueryWrapper); + int pageNo = pageVO.getPageNo(); + int pageSize = pageVO.getPageSize(); + IPage page = new Page(pageNo, pageSize); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户 - List paramsManifestEOList = new ArrayList<>(); - List projectLibraryBaseList = new ArrayList<>(); - Map manifestUserTypeOfHomo = new HashMap<>(); - Map manifestUserTypeOfSdt = new HashMap<>(); - Map manifestUserTypeOfDre = new HashMap<>(); - Map> paramsManifestEOListMap = new HashMap<>(); + // 查询所有项目下的 状态为收集中的清单 + pageVO.setState(ManifestStateEnum.COLLECTING.getValue()); + pageVO.setUserId(loginUser.getId()); + pageVO.setUserName(loginUser.getUsername()); + List paramsManifestEOListAll = paramsManifestEOMapper.listForTodoCenter(pageVO); // 查询清单的所有参数项 - List pcmListAll = paramsCollectManifestEOMapper.listInfoOfTodoCenter(); + List manifestIdList = paramsManifestEOListAll.stream().map(ParamsManifestTodoCenterEO::getId).collect(Collectors.toList()); + if (CollectionUtil.isEmpty(manifestIdList)) { + return page; + } + List pcmListAll = paramsCollectManifestEOMapper.listInfoOfTodoCenter(manifestIdList); + if (CollectionUtil.isEmpty(pcmListAll)) { + return page; + } - String userType = ""; + List manifestIdListHomo = paramsManifestEOMapper.listInfoHomo(loginUser.getId(), ManifestStateEnum.COLLECTING.getValue());// 获取当前登录人 拥有认证工程师角色的清单 for(ParamsManifestTodoCenterEO paramsManifestEO : paramsManifestEOListAll) { // 查询清单的所有参数项 List pcmList = pcmListAll.stream().filter(e->paramsManifestEO.getId().equals(e.getParamsManifestId())).collect(Collectors.toList()); @@ -83,44 +68,57 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC continue; } - // 判断是不是homo角色 - projectLibraryBaseList = projectLibraryBaseListAll.stream().filter(e->paramsManifestEO.getProjectId().equals(e.getId())).collect(Collectors.toList()); - userType = getLoginUserTypeOfHomo(projectLibraryBaseList, loginUser); - if(StringUtils.isNotBlank(userType)) { - paramsManifestEOList.add(paramsManifestEO); - manifestUserTypeOfHomo.put(paramsManifestEO.getId(), true); - paramsManifestEOListMap.put(paramsManifestEO.getId(), pcmList); - continue; + int count = 0; + + if(CollectionUtil.isNotEmpty(manifestIdListHomo) && manifestIdListHomo.contains(paramsManifestEO.getId())) { // 认证工程师 可以看到三种数量 + // 统计待发起数量 包括状态:待发起收集,变更,工程接口人退回 + count = (int) pcmList.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState()) + || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState()) + || CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).count(); + if (count > 0) { + paramsManifestEO.setWaitCollectNum(count); + } + + // 统计待分配数量 包括状态:待工程接口人处理,填写人退回 + count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState()) + || CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))).count(); + if (count > 0) { + paramsManifestEO.setWaitSdtNum(count); + } + + // 统计待填写数量 包括状态:待填写,认证工程师退回 + count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState()) + || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))).count(); + if (count > 0) { + paramsManifestEO.setWaitFillNum(count); + } + } else { // 工程接口人和填写人 只能看到 工程接口人是自己 或 填写人是自己 的数量 + // 统计待分配数量 包括状态:待工程接口人处理,填写人退回 + count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState()) + || CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState())) + && loginUser.getUsername().equals(e.getSdt())).count(); + if (count > 0) { + paramsManifestEO.setWaitSdtNum(count); + } + + // 统计待填写数量 包括状态:待填写,认证工程师退回 + count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState()) + || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState())) + && loginUser.getUsername().equals(e.getDre())).count(); + if (count > 0) { + paramsManifestEO.setWaitFillNum(count); + } } - // 判断是不是sdt角色 - userType = getLoginUserTypeOfSdt(pcmList, loginUser); - if(StringUtils.isNotBlank(userType)) { - paramsManifestEOList.add(paramsManifestEO); - manifestUserTypeOfSdt.put(paramsManifestEO.getId(), true); - paramsManifestEOListMap.put(paramsManifestEO.getId(), pcmList); - continue; - } - // 判断是不是dre角色 - userType = getLoginUserTypeOfDre(pcmList, loginUser); - if(StringUtils.isNotBlank(userType)) { - paramsManifestEOList.add(paramsManifestEO); - manifestUserTypeOfDre.put(paramsManifestEO.getId(), true); - paramsManifestEOListMap.put(paramsManifestEO.getId(), pcmList); - continue; - } } // 分页 - paramsManifestEOList = paramsManifestEOList.stream() + List paramsManifestEOList =paramsManifestEOListAll.stream() + .filter(e->ObjectUtil.isNotNull(e.getWaitCollectNum()) || ObjectUtil.isNotNull(e.getWaitSdtNum()) || ObjectUtil.isNotNull(e.getWaitFillNum())) .sorted(Comparator.comparing(ParamsManifestTodoCenterEO::getCreateTime).reversed()) .collect(Collectors.toList()); List result = new ArrayList<>(); - int pageNo = pageVO.getPageNo(); - int pageSize = pageVO.getPageSize(); - IPage page = new Page(pageNo, pageSize); - page.setTotal(paramsManifestEOList.size()); int subSize = pageVO.getPageSize(); // 每页记录数 int subCount = paramsManifestEOList.size(); // 总记录数 @@ -134,217 +132,9 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC result = new ArrayList(); } - // 统计清单中的待办参数数据 - List records = getStatistics(result, manifestUserTypeOfHomo, manifestUserTypeOfSdt, manifestUserTypeOfDre, paramsManifestEOListMap,loginUser); - page.setRecords(records); + page.setTotal(paramsManifestEOList.size()); + page.setRecords(result); return page; } - - public List getStatistics(List paramsManifestEOList, Map manifestUserTypeOfHomo - ,Map manifestUserTypeOfSdt, Map manifestUserTypeOfDre, Map> paramsManifestEOListMap, LoginUser loginUser) { - List paramsManifestTodoCenterEOList = new ArrayList<>(); - - for(ParamsManifestTodoCenterEO paramsManifestTodoCenterEO : paramsManifestEOList) { - // 查询清单的所有参数项 - ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO(); - paramsCollectManifestEO.setParamsManifestId(paramsManifestTodoCenterEO.getId()); - List pcmList = paramsManifestEOListMap.get(paramsManifestTodoCenterEO.getId()); - int count = 0; - - if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) - && ObjectUtil.isNotEmpty(manifestUserTypeOfHomo.get(paramsManifestTodoCenterEO.getId()))) { - // 统计待发起数量 包括状态:待发起收集,变更,工程接口人退回 - count = (int) pcmList.stream().filter(e-> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState()) - || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState()) - || CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitCollectNum(count); - } - // 统计待分配数量 包括状态:待工程接口人处理,填写人退回 - count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState()) - || CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitSdtNum(count); - } - // 统计待填写数量 包括状态:待填写,认证工程师退回 - count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState()) - || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitFillNum(count); - } - } else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) - && ObjectUtil.isNotEmpty(manifestUserTypeOfSdt.get(paramsManifestTodoCenterEO.getId()))) { - // 统计待分配数量 包括状态:待工程接口人处理,填写人退回 - count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState()) - || CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState())) - && loginUser.getUsername().equals(e.getSdt())).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitSdtNum(count); - } - // 统计待填写数量 包括状态:待填写,认证工程师退回 - count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState()) - || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitFillNum(count); - } - - } else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) - && ObjectUtil.isNotEmpty(manifestUserTypeOfDre.get(paramsManifestTodoCenterEO.getId()))) { - // 统计待填写数量 包括状态:待填写,认证工程师退回 - count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState()) - || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState())) - && loginUser.getUsername().equals(e.getDre())).count(); - if (count > 0) { - paramsManifestTodoCenterEO.setWaitFillNum(count); - } - - } - - paramsManifestTodoCenterEOList.add(paramsManifestTodoCenterEO); - } - return paramsManifestTodoCenterEOList; - } - - /** - * 根据项目id,清单id查询当前登录人的Homo角色 - * @param projectId - * @param paramsManifestId - * @return - */ - public List getLoginUserTypes(String projectId, String paramsManifestId, LoginUser loginUser) { - - List userTypeList = new ArrayList<>(); // 一个用户可以有多个用户类型 -// LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户 - - // 查询项目下所有责任领域下的 homo人员 - List projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectId); - List homoList = new ArrayList<>(); - if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) { - String homoIdStr = projectLibraryBaseList.get(0).getCertificationEngineer(); - if (StringUtils.isNotEmpty(homoIdStr)) { - List homoIdList = Arrays.asList(homoIdStr.split(",")).stream().distinct().collect(Collectors.toList()); - homoList = sysUserService.listByIds(homoIdList).stream().map(SysUser::getUsername).collect(Collectors.toList()); - } - } - - // 查询项目下所有责任领域下的 sdt人员 - List sdtList = new ArrayList<>(); - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(ProjectRelatedPersonnel::getProjectId, projectId); - List prpList = projectRelatedPersonnelService.list(queryWrapper); -// String homoIdStr = prpList.stream().map(e -> e.getCertificationEngineer()).collect(Collectors.joining(",")); - String sdtIdStr = prpList.stream().map(e -> e.getEngineeringInterfacePerson()).collect(Collectors.joining(",")); - // 项目下有homo-->不一定有sdt - if(StringUtils.isNotBlank(sdtIdStr)) { - List sdtIdList = Arrays.asList(sdtIdStr.split(",")).stream().distinct().collect(Collectors.toList()); - sdtList = sysUserService.listByIds(sdtIdList).stream().map(SysUser::getUsername).collect(Collectors.toList()); - } - - // 查询项目下参数清单下收集参数项中的 sdt,dre人员 - ParamsCollectManifestEO paramsCollectManifestEO = new ParamsCollectManifestEO(); - paramsCollectManifestEO.setParamsManifestId(paramsManifestId); - List pcmList = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); - List sdtListOfPCM = pcmList.stream() - .filter(e->StringUtils.isNotEmpty(e.getSdt())) - .map(ParamsCollectManifestEO::getSdt) - .distinct() - .collect(Collectors.toList()); - sdtList.addAll(sdtListOfPCM); // 需要取并集,因为存在参数项开始收集但 人员相关名单中sdt被修改的情况 - - List dreListOfPCM = pcmList.stream() - .filter(e->StringUtils.isNotEmpty(e.getDre())) - .map(ParamsCollectManifestEO::getDre) - .distinct() - .collect(Collectors.toList()); - - String loginUserName = loginUser.getUsername().toLowerCase(); - - homoList = toLowerCaseOfList(homoList); - sdtList = toLowerCaseOfList(sdtList); - dreListOfPCM = toLowerCaseOfList(dreListOfPCM); - - - if (homoList.contains(loginUserName)) { - userTypeList.add(CollectManifestUserTypeEnum.HOMO.getValue()); - } - - if (sdtList.contains(loginUserName)) { - userTypeList.add(CollectManifestUserTypeEnum.SDT.getValue()); - } - - if (dreListOfPCM.contains(loginUserName)) { - userTypeList.add(CollectManifestUserTypeEnum.DRE.getValue()); - } - - return userTypeList; - } - - public String getLoginUserTypeOfHomo(List projectLibraryBaseList, LoginUser loginUser) { - - String userType = ""; // 一个用户可以有多个用户类型 - - // 查询项目下的 homo人员 - List homoList = new ArrayList<>(); - if (CollectionUtil.isNotEmpty(projectLibraryBaseList)) { - String homoIdStr = projectLibraryBaseList.get(0).getCertificationEngineer(); - if (StringUtils.isNotEmpty(homoIdStr)) { - List homoIdList = Arrays.asList(homoIdStr.split(",")).stream().distinct().collect(Collectors.toList()); - homoList = sysUserService.listByIds(homoIdList).stream().map(SysUser::getUsername).collect(Collectors.toList()); - } - } - - String loginUserName = loginUser.getUsername().toLowerCase(); - homoList = toLowerCaseOfList(homoList); - if (homoList.contains(loginUserName)) { - userType = CollectManifestUserTypeEnum.HOMO.getValue(); - } - return userType; - } - - public String getLoginUserTypeOfSdt(List pcmList, LoginUser loginUser) { - - String userType = ""; // 一个用户可以有多个用户类型 - - List sdtListOfPCM = pcmList.stream() - .filter(e->StringUtils.isNotEmpty(e.getSdt())) - .map(ParamsCollectManifestEO::getSdt) - .distinct() - .collect(Collectors.toList()); - - String loginUserName = loginUser.getUsername().toLowerCase(); - sdtListOfPCM = toLowerCaseOfList(sdtListOfPCM); - if (sdtListOfPCM.contains(loginUserName)) { - userType = CollectManifestUserTypeEnum.SDT.getValue(); - } - return userType; - } - - public String getLoginUserTypeOfDre(List pcmList, LoginUser loginUser) { - - String userType = ""; // 一个用户可以有多个用户类型 - - List dreListOfPCM = pcmList.stream() - .filter(e->StringUtils.isNotEmpty(e.getDre())) - .map(ParamsCollectManifestEO::getDre) - .distinct() - .collect(Collectors.toList()); - - String loginUserName = loginUser.getUsername().toLowerCase(); - dreListOfPCM = toLowerCaseOfList(dreListOfPCM); - if (dreListOfPCM.contains(loginUserName)) { - userType = CollectManifestUserTypeEnum.DRE.getValue(); - } - return userType; - } - - private List toLowerCaseOfList(List list) { - List newList = list; - if (CollectionUtil.isNotEmpty(list)) { - newList = list.stream().map(String::toLowerCase).collect(Collectors.toList()); - } - return newList; - } - - } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ParamsManifestTodoCenterEOPage.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ParamsManifestTodoCenterEOPage.java index 98079f027..907d43b92 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ParamsManifestTodoCenterEOPage.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/todoCenter/vo/ParamsManifestTodoCenterEOPage.java @@ -42,4 +42,8 @@ public class ParamsManifestTodoCenterEOPage { private int pageNo; private int pageSize; private String state; + + private String userId; + private String userName; + } diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csdcmbgl.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csdcmbgl.png new file mode 100644 index 000000000..4ff7efb25 Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csdcmbgl.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csmbgl.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csmbgl.png new file mode 100644 index 000000000..a023127b9 Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/csmbgl.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/dwbggl.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/dwbggl.png new file mode 100644 index 000000000..989d5841c Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/dwbggl.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgfhxkb.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgfhxkb.png new file mode 100644 index 000000000..381669457 Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgfhxkb.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgjspg.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgjspg.png new file mode 100644 index 000000000..bfc4c9b6c Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgjspg.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyb.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyb.png new file mode 100644 index 000000000..ce8bdce6c Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyb.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyj.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyj.png new file mode 100644 index 000000000..81993e2a9 Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyj.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyjsj.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyjsj.png new file mode 100644 index 000000000..a5eaa68bc Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/fgyjsj.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/sbkgl.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/sbkgl.png new file mode 100644 index 000000000..16eaba591 Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/sbkgl.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wddb.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wddb.png index 5db1b6cba..ac6d8ba8a 100644 Binary files a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wddb.png and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wddb.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdfy.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdfy.png index 2348991fc..a040257d7 100644 Binary files a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdfy.png and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdfy.png differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdsb.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdsb.png deleted file mode 100644 index 5948fd0bd..000000000 Binary files a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wdsb.png and /dev/null differ diff --git a/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wtzsk.png b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wtzsk.png new file mode 100644 index 000000000..1a3131a9d Binary files /dev/null and b/jero-boot/jero-boot-single-startup/src/main/resources/static/home/wtzsk.png differ diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 71d3e0940..08529934a 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1359,5 +1359,6 @@ module.exports = { Topping:'Topping', cancelTopping:'Cancel Topping', relatedProjectVersion:'Related project version', + Importfailure:'Import failure', CuiBan:'CuiBan', } \ 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 b059e001a..63891c8d9 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1460,5 +1460,6 @@ module.exports = { Topping:'置顶', cancelTopping:'取消置顶', relatedProjectVersion:'相关项目版本', + Importfailure:'导入失败', CuiBan:'催办', } \ No newline at end of file diff --git a/jero-web/src/components/ImportFileOnlyListtag/index.vue b/jero-web/src/components/ImportFileOnlyListtag/index.vue new file mode 100644 index 000000000..86a679cfa --- /dev/null +++ b/jero-web/src/components/ImportFileOnlyListtag/index.vue @@ -0,0 +1,284 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/documentManage/library/docDetail/index.vue b/jero-web/src/views/documentManage/library/docDetail/index.vue index 8f770354b..b0de57787 100644 --- a/jero-web/src/views/documentManage/library/docDetail/index.vue +++ b/jero-web/src/views/documentManage/library/docDetail/index.vue @@ -26,11 +26,11 @@ {{$t('DocumentSplitting')}} -

- - {{$t('DocumentTranslation')}} -
+ + + + +
diff --git a/jero-web/src/views/documentManage/splitting/modules/SplitDetail.vue b/jero-web/src/views/documentManage/splitting/modules/SplitDetail.vue index 043fd45b1..d5bd07ddc 100644 --- a/jero-web/src/views/documentManage/splitting/modules/SplitDetail.vue +++ b/jero-web/src/views/documentManage/splitting/modules/SplitDetail.vue @@ -42,7 +42,7 @@ {{title && title.length > 18?title.slice(0,17)+'...':title}}