diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index c13b31fa6..531e4aa80 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -706,4 +706,27 @@ public class ParamsCollectManifestEOController extends JeroController queryDutyTerritory(@RequestParam(name="id",required=true) String id) { return this.paramsCollectManifestEOService.queryDutyTerritory(id); } + /** + * 查询本清单所有责任领域 + */ + @AutoLog(value = "参数项历史收集清单-查询本清单所有责任领域") + @ApiOperation(value="参数项历史收集清单-查询本清单所有责任领域", notes="参数项历史收集清单-查询本清单所有责任领域") + @GetMapping(value = "/queryDutyTerritoryHistory") + public Result queryDutyTerritoryHistory(@RequestParam(name="id",required=true) String id) { + return this.paramsCollectManifestEOService.queryDutyTerritoryHistory(id); + } + + /** + * 某个项目责任领域下-工程接口人 + * + * @return + */ + @AutoLog(value = "某个项目责任领域下-工程接口人") + @ApiOperation(value="某个项目责任领域下-工程接口人", notes="某个项目责任领域下-工程接口人") + @GetMapping(value = "/getSdtList") + public Result>> getSdtList(String projectId,String projectVersion,String dutyTerritory) { + List> sdtList = paramsCollectManifestEOService.getSdtList(projectId,projectVersion,dutyTerritory); + return Result.OK(sdtList); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java index c0ebc31a4..492b99ce5 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestHistoryEO.java @@ -1,5 +1,6 @@ package com.jero.modules.cert.collect.entity; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; @@ -37,4 +38,7 @@ public class ParamsCollectManifestHistoryEO extends ParamsCollectManifestBaseEO @ApiModelProperty(value = "参考列") private String referencesCol; + + @TableField(exist = false) + private String userTypes;//用户类型 } 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 cdcbc1cee..a1013f53f 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 @@ -1,11 +1,9 @@ package com.jero.modules.cert.collect.mapper; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.entity.ParamsManifestEO; -import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -41,5 +39,7 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper queryDutyTerritory(@Param("paramsManifestId") String paramsManifestId); + List queryDutyTerritoryHistory(@Param("paramsManifestId") String paramsManifestId); + } 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 04d385b79..d49dcd42e 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 @@ -159,5 +159,8 @@ + 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 b45dd037e..9dd1382d5 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 @@ -113,6 +113,8 @@ public interface IParamsCollectManifestEOService extends IService> querySdtList(ParamsCollectManifestVO paramsCollectManifestVO); + List> getSdtList(String projectId,String projectVersion,String dutyTerritory); + List> getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO, String cut); Map isCollectFinished(String paramsManifestId); @@ -204,4 +206,5 @@ public interface IParamsCollectManifestEOService extends IService getList(Map params); Result queryDutyTerritory(String id); + Result queryDutyTerritoryHistory(String id); } 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 d91b37a25..b852a6c70 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 @@ -13,7 +13,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.jero.common.api.vo.Result; -import com.jero.common.constant.enums.*; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.constant.enums.MessageType2Enum; +import com.jero.common.constant.enums.MessageTypeEnum; +import com.jero.common.constant.enums.ModuleEnum; +import com.jero.common.constant.enums.MsgColorEnum; +import com.jero.common.constant.enums.YesOrNoEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.query.QueryRuleEnum; @@ -21,15 +26,42 @@ import com.jero.common.system.vo.LoginUser; import com.jero.common.util.oss.CosBootUtil; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; -import com.jero.modules.cert.collect.entity.*; -import com.jero.modules.cert.collect.enums.*; +import com.jero.modules.cert.collect.entity.ParamsCollectExport; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestBaseEO; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestLogEO; +import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; +import com.jero.modules.cert.collect.entity.ParamsConfigEO; +import com.jero.modules.cert.collect.entity.ParamsManifestEO; +import com.jero.modules.cert.collect.enums.CollectManifestChangeFlagEnum; +import com.jero.modules.cert.collect.enums.CollectManifestRoleIdEnum; +import com.jero.modules.cert.collect.enums.CollectManifestStateEnum; +import com.jero.modules.cert.collect.enums.CollectManifestUserTypeEnum; +import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum; +import com.jero.modules.cert.collect.enums.ConfigLockEnum; +import com.jero.modules.cert.collect.enums.ExportStateEnum; +import com.jero.modules.cert.collect.enums.ManifestStateEnum; import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper; -import com.jero.modules.cert.collect.service.*; +import com.jero.modules.cert.collect.service.IParamsCollectExportService; +import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; +import com.jero.modules.cert.collect.service.IParamsCollectManifestLogEOService; +import com.jero.modules.cert.collect.service.IParamsCollectManifestUserTypeLogEOService; +import com.jero.modules.cert.collect.service.IParamsConfigDataEOService; +import com.jero.modules.cert.collect.service.IParamsConfigEOService; +import com.jero.modules.cert.collect.service.IParamsManifestEOService; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; import com.jero.modules.cert.collect.vo.ParamsConfigDataVO; import com.jero.modules.cert.collect.vo.ParamsManifestVO; -import com.jero.modules.cert.report.entity.*; -import com.jero.modules.cert.report.service.*; +import com.jero.modules.cert.report.entity.ParamsReportConfigDataEO; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; +import com.jero.modules.cert.report.entity.ParamsReportEO; +import com.jero.modules.cert.report.entity.ReportCertCategoryParamsInfoEO; +import com.jero.modules.cert.report.service.IParamsReportConfigDataEOService; +import com.jero.modules.cert.report.service.IParamsReportConfigEOService; +import com.jero.modules.cert.report.service.IParamsReportDetailEOService; +import com.jero.modules.cert.report.service.IParamsReportEOService; +import com.jero.modules.cert.report.service.IReportCertCategoryParamsInfoEOService; import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO; import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.cert.template.enums.ControlTypeEnum; @@ -61,22 +93,34 @@ import com.jero.modules.split.common.ReadExcel; import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.entity.SysUserRole; +import com.jero.modules.system.service.IProjectUserDutyTerritoryService; import com.jero.modules.system.service.ISysAnnouncementService; import com.jero.modules.system.service.ISysDictItemService; import com.jero.modules.system.service.ISysUserRoleService; import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import org.apache.commons.collections4.CollectionUtils; -import com.jero.modules.system.service.*; 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.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.util.IOUtils; -import org.apache.poi.xssf.usermodel.*; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFCellStyle; +import org.apache.poi.xssf.usermodel.XSSFFont; +import org.apache.poi.xssf.usermodel.XSSFRichTextString; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.shiro.SecurityUtils; import org.aspectj.util.FileUtil; import org.springframework.beans.BeanUtils; @@ -92,15 +136,33 @@ import org.yaml.snakeyaml.util.UriEncoder; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; -import java.text.Collator; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.UUID; import java.util.stream.Collectors; import static com.jero.modules.split.util.ExcelUtil.checkObjAllFieldsIsNull; @@ -1525,7 +1587,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> getSdtList(String projectId,String projectVersion,String dutyTerritory) { + // 根据主项目ID 查询 相关项目版本的项目ID + String projectVersionId = projectLibraryBaseService.getIdByVersionAndParentId(projectVersion, projectId); + + List> sdtList = new ArrayList<>(); + ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(projectVersionId, dutyTerritory); + if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) { + String sdtIds = projectRelatedPersonnel.getEngineeringInterfacePerson(); + if (StringUtils.isNotBlank(sdtIds)) { + String[] sdtIdStr = sdtIds.split(","); + for (int i = 0; i < sdtIdStr.length; i++) { + SysUser sysUser = sysUserService.getById(sdtIdStr[i]); + if (ObjectUtil.isNotEmpty(sysUser)) { + Map userMap = new HashMap<>(); + userMap.put("userName", sysUser.getUsername()); + userMap.put("id", sysUser.getId()); + sdtList.add(userMap); + } + } + } + } + return sdtList; + } @Override public List> getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO, String cut) { @@ -3569,6 +3657,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl list = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); - // 过滤出 状态为:待发起收集,且工程接口人处为空的参数项 - list = list.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())).collect(Collectors.toList()); + //带入逻辑修改为只带入勾选的条目 + if(StringUtils.isNotBlank(paramsCollectManifestVO.getIds())){ + list = list.stream().filter(e->paramsCollectManifestVO.getIds().contains(e.getId())).collect(Collectors.toList()); + } + // 过滤出 状态为:待发起收集或变更,且工程接口人处为空的参数项 + list = list.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState()) + || CollectManifestStateEnum.CHANGE.getValue().equals(e.getState())).collect(Collectors.toList()); +// list = list.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())).collect(Collectors.toList()); + + //以下为新需求 2023-10-25---------------- + //变更状态下允许带入接口人 + //带入逻辑修改为只带入勾选的条目, + //原有B或空,相关人A=A,相关人BC=B,相关人AC=空 List updateCollectManifestEOList = new ArrayList<>(); if (CollectionUtil.isNotEmpty(list)) { list.forEach(collectManifestEO -> { - + String sdt = collectManifestEO.getSdt(); // 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段 ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), collectManifestEO.getDutyTerritory()); if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) { String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson(); - if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段 + if (StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段 SysUser sysUser = sysUserService.getById(sdtId); if (ObjectUtil.isNotEmpty(sysUser)) { ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO(); @@ -3600,6 +3702,20 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl sysUserList = sysUserService.listByIds(Arrays.asList(sdtId.split(","))); + List userNameList = sysUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); + + if (StringUtils.isNotBlank(sdt) + && ObjectUtils.isNotEmpty(userNameList) + && sdtId.contains(",") + && !userNameList.contains(sdt)) { + + ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO(); + updateCollectManifestEO.setId(collectManifestEO.getId()); + updateCollectManifestEO.setSdt(""); + + updateCollectManifestEOList.add(updateCollectManifestEO); + } } }); @@ -3607,6 +3723,46 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl list = paramsCollectManifestEOMapper.listInfo(paramsCollectManifestEO); +// // 过滤出 状态为:待发起收集,且工程接口人处为空的参数项 +// list = list.stream().filter(e -> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())).collect(Collectors.toList()); +// +// List updateCollectManifestEOList = new ArrayList<>(); +// if (CollectionUtil.isNotEmpty(list)) { +// list.forEach(collectManifestEO -> { +// +// // 根据负责领域处理工程接口人(零个,一个,多个): 领域中仅有一个人时,添加该字段 +// ProjectRelatedPersonnel projectRelatedPersonnel = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritory(paramsManifestEO.getProjectVersionId(), collectManifestEO.getDutyTerritory()); +// if (ObjectUtil.isNotEmpty(projectRelatedPersonnel)) { +// String sdtId = projectRelatedPersonnel.getEngineeringInterfacePerson(); +// if (org.apache.commons.lang.StringUtils.isNotBlank(sdtId) && !sdtId.contains(",")) { // 领域中仅有一个人时,添加该字段 +// SysUser sysUser = sysUserService.getById(sdtId); +// if (ObjectUtil.isNotEmpty(sysUser)) { +// ParamsCollectManifestEO updateCollectManifestEO = new ParamsCollectManifestEO(); +// updateCollectManifestEO.setId(collectManifestEO.getId()); +// updateCollectManifestEO.setSdt(sysUser.getUsername()); +// +// updateCollectManifestEOList.add(updateCollectManifestEO); +// } +// } +// } +// }); +// +// } +// +// return updateBatchById(updateCollectManifestEOList); +// } @Override public void exportAll(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request) { @@ -7499,4 +7655,22 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryDutyTerritoryHistory(String paramsManifestId) { + List dtList = paramsCollectManifestEOMapper.queryDutyTerritoryHistory(paramsManifestId); + List dtSdiList = sysDictItemService.selectItemsByDictCode("duty_territory"); + Map dictItemsMap = dtSdiList.stream().collect(Collectors.toMap(SysDictItem::getItemValue, SysDictItem::getEnName)); + JSONArray resList = new JSONArray(); + if(ObjectUtils.isNotEmpty(dtList)){ + for (String dtId : dtList) { + if(StringUtils.isNotBlank(dtId)){ + JSONObject dt = new JSONObject(); + dt.put("key",dtId); + dt.put("value",dictItemsMap.get(dtId)); + resList.add(dt); + } + } + } + return Result.OK(resList); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java index 6c0bb194a..d03068e6a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java @@ -16,7 +16,12 @@ import com.jero.common.system.vo.LoginUser; import com.jero.common.util.oss.CosBootUtil; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; -import com.jero.modules.cert.collect.entity.*; +import com.jero.modules.cert.collect.entity.ParamsCollectExport; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO; +import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO; +import com.jero.modules.cert.collect.entity.ParamsConfigEO; +import com.jero.modules.cert.collect.entity.ParamsConfigHistoryEO; import com.jero.modules.cert.collect.enums.CollectManifestStateEnum; import com.jero.modules.cert.collect.enums.CollectManifestUserTypeEnum; import com.jero.modules.cert.collect.enums.ConfigDataTypeEnum; @@ -36,13 +41,20 @@ import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.split.common.ReadExcel; import com.jero.modules.system.entity.SysDictItem; +import com.jero.modules.system.service.IProjectUserDutyTerritoryService; import com.jero.modules.system.service.ISysDictItemService; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.util.IOUtils; -import org.apache.poi.xssf.usermodel.*; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFCellStyle; +import org.apache.poi.xssf.usermodel.XSSFFont; +import org.apache.poi.xssf.usermodel.XSSFRichTextString; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.shiro.SecurityUtils; import org.aspectj.util.FileUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -53,13 +65,31 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.lang.reflect.Field; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; import java.util.stream.Collectors; /** @@ -92,6 +122,8 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl(Arrays.asList("2","4","5","6","7","8"))); + } else if (CollectManifestUserTypeEnum.DRE.getValue().equals(userTypes)) { + queryWrapper.lambda().eq(ParamsCollectManifestHistoryEO::getDre,loginUser.getUsername()); + queryWrapper.lambda().in(ParamsCollectManifestHistoryEO::getState,new ArrayList(Arrays.asList("4","6","7","8"))); + } else if (CollectManifestUserTypeEnum.GUEST.getValue().equals(userTypes)) { + return page; + } else if (CollectManifestUserTypeEnum.VIEWER.getValue().equals(userTypes)) { + List dutyTerritoryList = projectUserDutyTerritoryService.queryDutyTerritoryByUserId(loginUser.getId()); + queryWrapper.lambda().and(q->{ + q.eq(ParamsCollectManifestHistoryEO::getSdt,loginUser.getUsername()); + q.or().eq(ParamsCollectManifestHistoryEO::getDre,loginUser.getUsername()); + q.or().in(ParamsCollectManifestHistoryEO::getDutyTerritory,dutyTerritoryList); + }); + } + IPage pageInfo = page(page, queryWrapper); // 查询固定列 // IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java index 9ee5c5679..45143111f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java @@ -14,9 +14,7 @@ import com.jero.common.system.vo.DictModel; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO; import com.jero.modules.cert.collect.entity.ParamsConfigDataEO; -import com.jero.modules.cert.collect.entity.ParamsConfigDataHistoryEO; import com.jero.modules.cert.collect.entity.ParamsConfigEO; -import com.jero.modules.cert.collect.entity.ParamsConfigHistoryEO; import com.jero.modules.cert.collect.entity.ParamsManifestEO; import com.jero.modules.cert.collect.entity.ParamsManifestHistoryEO; import com.jero.modules.cert.collect.enums.CollectManifestChangeFlagEnum; @@ -187,7 +185,21 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl + + + + + + {{ item.userName}} + + + + + - - - - + + + + - - - + + + @@ -66,235 +84,260 @@ \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/ProjectDetails/index.vue b/jero-web/src/views/projectManagement/ProjectDetails/index.vue index 3dcaf7c09..d24bf45f4 100644 --- a/jero-web/src/views/projectManagement/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ProjectDetails/index.vue @@ -293,7 +293,7 @@ export default { }, roleSwitchListEn: { '0': 'R&H Studio', - '1': 'studio', + '1': 'Regulation', '2': 'homo', '4': 'Regulatory Engineer/Certification Engineer', '11': 'R&H Manager', diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 8f22803d6..41317e19a 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -234,7 +234,7 @@
- {{$t('Adjustareasofresponsibility')}} + {{$t('BatchSetting')}}
@@ -272,17 +272,20 @@ {{$t('dataExport')}}
-
+
{{$t('Derivedlist')}}
-
+
{{$t('referenceparameter')}}
-
+
{{$t('tempSave')}}
@@ -359,12 +362,14 @@
-
+
{{$t('dataExport')}}
-
+
{{$t('Derivedlist')}}
@@ -455,7 +460,7 @@ @areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/> - + @@ -631,27 +636,27 @@ @ok="exportok" @cancel="exportvisiblecancel" > - - + + {{$t('download')}} {{$t('delete')}} - - - - - - + + + + + +
- + import TableCollection from '@/components/tableCollection/index' import parameterColumn from '../dialog/parametercolumn' - import { getAction, postAction, downloadFile ,deleteAction } from '../../../api/manage' + import { getAction, postAction, downloadFile, deleteAction } from '../../../api/manage' import eventBUs from '../../../common/event' import customizeList from './customizeList' import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index' @@ -774,7 +779,7 @@ globalAdvancedQuery, batchUpdateDeadline }, - mixins:[ResizeHeader, ResizeColumnProvide], + mixins: [ResizeHeader, ResizeColumnProvide], data() { this.statusList = [ { @@ -894,7 +899,7 @@ title: this.$t('status'), align: 'left', dataIndex: 'stateText', - width: 120, + width: 120 }, { title: this.$t('Exporttime'), @@ -1162,9 +1167,9 @@ } if (this.$route.query.statusFlag == '1') { this.formInline.state = '1' - } else if(this.$route.query.statusFlag == '2'){ + } else if (this.$route.query.statusFlag == '2') { this.formInline.state = '2' - }else if(this.$route.query.statusFlag == '4'){ + } else if (this.$route.query.statusFlag == '4') { this.formInline.state = '4' } // clearTimeout(this.timeBatch) @@ -1206,7 +1211,13 @@ methods: { ...mapGetters(['userInfo']), getQueryDutyTerritory() { - getAction('/params/collectManifest/queryDutyTerritory', { id: this.$route.query.id }).then((res) => { + let url = '' + if(this.$route.query.it){ + url = '/params/collectManifest/queryDutyTerritoryHistory' + }else{ + url = '/params/collectManifest/queryDutyTerritory' + } + getAction(url, { id: this.$route.query.id }).then((res) => { if (res.success) { // res.result.push( // { @@ -1272,20 +1283,29 @@ this.visibleRoleSwitching = false }, bringInTheProjectInterfaceClick() { - let query = { - paramsManifestId: this.paramsManifest.id, - projectId: this.$route.query.projectId - } - this.textLoading = true - getAction('/params/collectManifest/bringSdtInto', query).then((res) => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.$refs.CollectionTabel.getTableList(this.queryParamQuery) - } else { - this.$message.warning(this.$t('operationFailed')) + if (this.selectedRowKeysValue && this.selectedRowKeysValue.length > 0) { + let ids = [] + this.selectedRowKeysValue.forEach(res => { + ids.push(res.id) + }) + let query = { + paramsManifestId: this.paramsManifest.id, + ids: ids.join(','), + projectId: this.$route.query.projectId } - this.textLoading = false - }) + this.textLoading = true + getAction('/params/collectManifest/bringSdtInto', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.$refs.CollectionTabel.getTableList(this.queryParamQuery) + } else { + this.$message.warning(this.$t('operationFailed')) + } + this.textLoading = false + }) + } else { + this.$message.warning(this.$t('selectLeastOne')) + } }, handleOkRoleSwitching() { if (this.$route.query.type == '1') { @@ -1574,7 +1594,7 @@ // downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear) }, // 导出列表 - Derivedlist(){ + Derivedlist() { this.exportvisible = true this.expoteList() }, @@ -1587,22 +1607,22 @@ this.pageSizehistory = pageSize this.expoteList() }, - exportok(){ + exportok() { this.exportvisible = false }, - exportvisiblecancel(){ + exportvisiblecancel() { this.exportvisible = false }, - exportsubmit(){ + exportsubmit() { this.ExportFailed = false }, - exportcancel(){ + exportcancel() { this.ExportFailed = false }, - exportdata(item){ + exportdata(item) { downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.fileId }) }, - exportdelete(item){ + exportdelete(item) { this.$confirm({ title: this.$t('confirmDeletion'), content: '', @@ -1661,8 +1681,8 @@ paramsTemplatePublishVersion: 1, cut: this.cut, userTypes: this.currentPersonRole, - exportName: this.$route.query.projectName.slice(0,-3)+ '-' + this.$route.query.projectVersion + '(' + this.$route.query.title + ')'+'-' + this.$route.query.version, - isHistory:this.isHistroy + exportName: this.$route.query.projectName.slice(0, -3) + '-' + this.$route.query.projectVersion + '(' + this.$route.query.title + ')' + '-' + this.$route.query.version, + isHistory: this.isHistroy } let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip' getAction('/params/collectManifest/exportAll', query).then((res) => { @@ -2325,7 +2345,7 @@ let selectedRowKeysValue = [] data.forEach(res => { if (res.state == 'To be filled' || res.state == '待填写' || res.state == '认证工程师退回' || - res.state == 'Rejected by homo engineer' ||res.state == 'Modify' || res.state == '变更') { + res.state == 'Rejected by homo engineer' || res.state == 'Modify' || res.state == '变更') { selectedRowKeysValue.push(res) } }) @@ -2509,7 +2529,7 @@ if (keyNameOne[l].type == 'pull_more') { keyNameOne[l].dataValue = keyNameOne[l].dataValue.join(',') } - if ((keyNameOne[l].dataValue== undefined || keyNameOne[l].dataValue == null) && keyNameOne[l].isMust == '1' && keyNameOne[l].isLock == '0') { + if ((keyNameOne[l].dataValue == undefined || keyNameOne[l].dataValue == null) && keyNameOne[l].isMust == '1' && keyNameOne[l].isLock == '0') { this.$message.warning(selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty')) return }