equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentInfoController.java
@@ -67,10 +67,10 @@ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType"); } PageUtils.checkCheck(pageQuery); PageUtils.checkCheck(pageQuery); return this.equipmentInfoService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -108,10 +108,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.equipmentInfoService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -401,8 +403,8 @@ infoDto.setDestoryReason(""); infoDto.setDestorySubmitDate(new Timestamp(new java.util.Date().getTime())); infoDto.setActualDestoryDate(new Timestamp(new java.util.Date().getTime())); System.out.println(JSONObject.toJSONString(infoDto)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/EquipmentTypeMngController.java
@@ -41,10 +41,10 @@ */ @PostMapping(value = "/page/list") public ResultVO selectAll(@RequestBody PageQuery<EquipmentTypeMngQueryCriteria> pageQuery){ PageUtils.checkCheck(pageQuery); PageUtils.checkCheck(pageQuery); return this.equipmentTypeMngService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -79,10 +79,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.equipmentTypeMngService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -97,4 +99,4 @@ public ResultVO treeData(){ return new ResultVO<>(ResultCodes.OK,this.equipmentTypeMngService.treeData(0L)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java
@@ -62,10 +62,10 @@ */ @PostMapping(value = "/page/list") public ResultVO selectAll(@RequestBody PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery){ PageUtils.checkCheck(pageQuery); PageUtils.checkCheck(pageQuery); return this.keypointEquipmentInfoService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -100,10 +100,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.keypointEquipmentInfoService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -286,4 +288,4 @@ } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/EquipmentInfo.java
@@ -1,7 +1,7 @@ package com.gkhy.safePlatform.equipment.entity; import java.sql.Timestamp; import com.gkhy.safePlatform.equipment.entity.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; @@ -10,7 +10,7 @@ * 设备设施详细信息(EquipmentInfo)表实体类 * * @author xurui * @since 2022-07-20 09:19:29 * @since 2022-08-03 10:55:54 */ @SuppressWarnings("serial") @TableName("equipment_info") @@ -237,6 +237,16 @@ public void setLeadingPersonId(Long leadingPersonId) { this.leadingPersonId = leadingPersonId; } //负责人名称 private String leadingPersonName; public String getLeadingPersonName() { return leadingPersonName; } public void setLeadingPersonName(String leadingPersonName) { this.leadingPersonName = leadingPersonName; } //负责人部门外键 private Long leadingPersonDepartmentId; @@ -427,6 +437,16 @@ public void setStopSubmitPersonId(Long stopSubmitPersonId) { this.stopSubmitPersonId = stopSubmitPersonId; } //停用提交人名称 private String stopSubmitPersonName; public String getStopSubmitPersonName() { return stopSubmitPersonName; } public void setStopSubmitPersonName(String stopSubmitPersonName) { this.stopSubmitPersonName = stopSubmitPersonName; } //停用提交日期 private Timestamp stopSubmitDate; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/EquipmentRepairDetail.java
@@ -1,7 +1,7 @@ package com.gkhy.safePlatform.equipment.entity; import java.sql.Timestamp; import com.gkhy.safePlatform.equipment.entity.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; @@ -10,7 +10,7 @@ * 设备维修明细(EquipmentRepairDetail)表实体类 * * @author xurui * @since 2022-07-19 15:10:57 * @since 2022-08-03 11:17:00 */ @SuppressWarnings("serial") @TableName("equipment_repair_detail") @@ -57,6 +57,16 @@ public void setRepairPersonId(Long repairPersonId) { this.repairPersonId = repairPersonId; } //维修负责人名称 private String repairPersonName; public String getRepairPersonName() { return repairPersonName; } public void setRepairPersonName(String repairPersonName) { this.repairPersonName = repairPersonName; } //维修开始日期 private Timestamp repairStartDate; @@ -87,6 +97,16 @@ public void setRepairPersonDepartmentId(Long repairPersonDepartmentId) { this.repairPersonDepartmentId = repairPersonDepartmentId; } //维修负责人单位名称 private String repairPersonDepartmentName; public String getRepairPersonDepartmentName() { return repairPersonDepartmentName; } public void setRepairPersonDepartmentName(String repairPersonDepartmentName) { this.repairPersonDepartmentName = repairPersonDepartmentName; } //维修情况 private String repairMemo; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/EquipmentTakecareDetail.java
@@ -1,7 +1,7 @@ package com.gkhy.safePlatform.equipment.entity; import java.sql.Timestamp; import com.gkhy.safePlatform.equipment.entity.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; @@ -10,7 +10,7 @@ * 设备保养明细(EquipmentTakecareDetail)表实体类 * * @author xurui * @since 2022-07-19 14:40:28 * @since 2022-08-03 11:14:57 */ @SuppressWarnings("serial") @TableName("equipment_takecare_detail") @@ -67,6 +67,16 @@ public void setLeadingPersonId(Long leadingPersonId) { this.leadingPersonId = leadingPersonId; } //保养负责人名称 private String leadingPersonName; public String getLeadingPersonName() { return leadingPersonName; } public void setLeadingPersonName(String leadingPersonName) { this.leadingPersonName = leadingPersonName; } //保养日期 private Timestamp takecareDate; @@ -87,5 +97,15 @@ public void setLeadingPersonDepartmentId(Long leadingPersonDepartmentId) { this.leadingPersonDepartmentId = leadingPersonDepartmentId; } //保养负责人单位名称 private String leadingPersonDepartmentName; public String getLeadingPersonDepartmentName() { return leadingPersonDepartmentName; } public void setLeadingPersonDepartmentName(String leadingPersonDepartmentName) { this.leadingPersonDepartmentName = leadingPersonDepartmentName; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/EquipmentTestDetail.java
@@ -1,7 +1,7 @@ package com.gkhy.safePlatform.equipment.entity; import java.sql.Timestamp; import com.gkhy.safePlatform.equipment.entity.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; @@ -10,7 +10,7 @@ * 设备检测明细(EquipmentTestDetail)表实体类 * * @author xurui * @since 2022-07-19 15:08:23 * @since 2022-08-03 11:15:57 */ @SuppressWarnings("serial") @TableName("equipment_test_detail") @@ -57,6 +57,16 @@ public void setTestPersonId(Long testPersonId) { this.testPersonId = testPersonId; } //检测人名称 private String testPersonName; public String getTestPersonName() { return testPersonName; } public void setTestPersonName(String testPersonName) { this.testPersonName = testPersonName; } //检测日期 private Timestamp testDate; @@ -77,6 +87,16 @@ public void setTestPersonDepartmentId(Long testPersonDepartmentId) { this.testPersonDepartmentId = testPersonDepartmentId; } //检测人单位名称 private String testPersonDepartmentName; public String getTestPersonDepartmentName() { return testPersonDepartmentName; } public void setTestPersonDepartmentName(String testPersonDepartmentName) { this.testPersonDepartmentName = testPersonDepartmentName; } //检测内容 private String testMemo; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentInfoSaveOrUpdate.java
@@ -52,6 +52,8 @@ private Timestamp nextTakecareDate; //负责人ID外键 private Long leadingPersonId; //负责人名称 private String leadingPersonName; //负责人部门外键 private Long leadingPersonDepartmentId; //供应商 @@ -90,6 +92,8 @@ private Timestamp actualStopDate; //停用提交人/外键 private Long stopSubmitPersonId; //停用提交人名称 private String stopSubmitPersonName; //停用提交日期 private Timestamp stopSubmitDate; //恢复理由 @@ -145,6 +149,22 @@ //要删除的检查标准 private String delCheckStandardeDetails; public String getLeadingPersonName() { return leadingPersonName; } public void setLeadingPersonName(String leadingPersonName) { this.leadingPersonName = leadingPersonName; } public String getStopSubmitPersonName() { return stopSubmitPersonName; } public void setStopSubmitPersonName(String stopSubmitPersonName) { this.stopSubmitPersonName = stopSubmitPersonName; } public String getDelTakecareDetails() { return delTakecareDetails; } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/resp/EquipmentInfoDto.java
@@ -24,6 +24,8 @@ private String model; //单位部门外键 private Long departmentId; //单位部门名称 private String departmentName; //设置部位 private String setPart; //生产日期 @@ -54,6 +56,8 @@ private Long leadingPersonId; //负责人部门外键 private Long leadingPersonDepartmentId; //负责人部门名称 private String leadingPersonDepartmentName; //供应商 private String supplyName; //使用说明 @@ -76,6 +80,8 @@ private String checkContent; //负责部门/外键 private Long leadingDepartmentId; //负责部门名称 private String leadingDepartmentName; //检查指标 private String checkPoint; //预警值 @@ -579,4 +585,28 @@ public List<EquipmentCheckStandardDetail> getCheckStandardeDetailList() { return checkStandardeDetailList; } public String getDepartmentName() { return departmentName; } public void setDepartmentName(String departmentName) { this.departmentName = departmentName; } public String getLeadingPersonDepartmentName() { return leadingPersonDepartmentName; } public void setLeadingPersonDepartmentName(String leadingPersonDepartmentName) { this.leadingPersonDepartmentName = leadingPersonDepartmentName; } public String getLeadingDepartmentName() { return leadingDepartmentName; } public void setLeadingDepartmentName(String leadingDepartmentName) { this.leadingDepartmentName = leadingDepartmentName; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/EquipmentInfoService.java
@@ -10,6 +10,8 @@ import java.io.Serializable; import java.util.List; import java.util.Map; import java.util.Set; /** @@ -28,4 +30,6 @@ void addOrUpdate(EquipmentInfoSaveOrUpdate infoDto); Object statistics(); Map<Long,String> getDepName(Set<Long> collectDepIdSet); } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentCheckStandardDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private EquipmentCheckStandardDetailRepository equipmentCheckStandardDetailRepository; @Override public ResultVO queryAll(PageQuery<EquipmentCheckStandardDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<EquipmentCheckStandardDetail> queryAll(EquipmentCheckStandardDetailQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentCheckStandardDetail.class, criteria)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.query.PageQuery; import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; @@ -16,14 +18,13 @@ import com.gkhy.safePlatform.equipment.repository.EquipmentInfoRepository; import com.gkhy.safePlatform.equipment.service.*; import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.io.Serializable; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.*; import java.util.stream.Collectors; /** @@ -52,6 +53,10 @@ @Autowired private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; @DubboReference(check = false) private AccountDepartmentService accountDepartmentService; @Override public ResultVO queryAll(PageQuery<EquipmentInfoQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -87,6 +92,29 @@ criteria2.setInfoTpe(pageQuery.getSearchParams().getInfoType()); List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); f.setRepaireDetailList(repairDetailList); // --------------------------- 获取部门信息----------------------- //收集所用到的部门ID Set<Long> collectDepIdSet = new HashSet(); collectDepIdSet.add(f.getDepartmentId()); collectDepIdSet.add(f.getLeadingDepartmentId()); collectDepIdSet.add(f.getLeadingPersonDepartmentId()); takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); //获取部门名集合 Map<Long,String> depNameMap = getDepName(collectDepIdSet); //set f.setDepartmentName(depNameMap.get(f.getDepartmentId())); f.setLeadingDepartmentName(depNameMap.get(f.getLeadingDepartmentId())); f.setLeadingPersonDepartmentName(depNameMap.get(f.getLeadingPersonDepartmentId())); takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); }); return new SearchResultVO<>( true, @@ -110,6 +138,7 @@ if(equipmentInfo == null){ return null; } EquipmentInfoDto infoDto = BeanCopyUtils.copyBean(equipmentInfo, EquipmentInfoDto.class); //设备保养 @@ -150,6 +179,27 @@ List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); // --------------------------- 获取部门信息----------------------- //收集所用到的部门ID Set<Long> collectDepIdSet = new HashSet(); collectDepIdSet.add(infoDto.getDepartmentId()); collectDepIdSet.add(infoDto.getLeadingDepartmentId()); collectDepIdSet.add(infoDto.getLeadingPersonDepartmentId()); takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); //获取部门名集合 Map<Long,String> depNameMap = getDepName(collectDepIdSet); //set infoDto.setDepartmentName(depNameMap.get(infoDto.getDepartmentId())); infoDto.setLeadingDepartmentName(depNameMap.get(infoDto.getLeadingDepartmentId())); infoDto.setLeadingPersonDepartmentName(depNameMap.get(infoDto.getLeadingPersonDepartmentId())); takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); return infoDto; } @@ -245,4 +295,26 @@ return this.listMaps(wrapper); } } @Override public Map<Long,String> getDepName(Set<Long> collectDepIdSet) { Map<Long, String> depPool = new HashMap<>(); collectDepIdSet.forEach(depId ->{ // 设置部门名称 if (!depPool.containsKey(depId)) { try { ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(depId); if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { if (rpcResult.getData() != null) { DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); depPool.put(dep.getDepId(), dep.getDepName()); } } } catch (Exception e) { log.error("exception",e); } } }); return depPool; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentRepairDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private EquipmentRepairDetailRepository equipmentRepairDetailRepository; @Override public ResultVO queryAll(PageQuery<EquipmentRepairDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<EquipmentRepairDetail> queryAll(EquipmentRepairDetailQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentRepairDetail.class, criteria)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentTakecareDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private EquipmentTakecareDetailRepository equipmentTakecareDetailRepository; @Override public ResultVO queryAll(PageQuery<EquipmentTakecareDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<EquipmentTakecareDetail> queryAll(EquipmentTakecareDetailQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareDetail.class, criteria)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentTakecareStardardDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private EquipmentTakecareStardardDetailRepository equipmentTakecareStardardDetailRepository; @Override public ResultVO queryAll(PageQuery<EquipmentTakecareStardardDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<EquipmentTakecareStardardDetail> queryAll(EquipmentTakecareStardardDetailQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTakecareStardardDetail.class, criteria)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentTestDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private EquipmentTestDetailRepository equipmentTestDetailRepository; @Override public ResultVO queryAll(PageQuery<EquipmentTestDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<EquipmentTestDetail> queryAll(EquipmentTestDetailQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(EquipmentTestDetail.class, criteria)); } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentTypeMngServiceImpl.java
@@ -31,9 +31,9 @@ @Autowired private EquipmentTypeMngRepository equipmentTypeMngRepository; @Override public ResultVO queryAll(PageQuery<EquipmentTypeMngQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -78,4 +78,4 @@ } return rsList; } } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/KeypointEquipmentInfoServiceImpl.java
@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; import com.gkhy.safePlatform.equipment.entity.*; import com.gkhy.safePlatform.equipment.model.dto.req.*; import com.gkhy.safePlatform.equipment.repository.KeypointEquipmentInfoRepository; import com.gkhy.safePlatform.equipment.service.*; import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import com.gkhy.safePlatform.commons.enums.ResultCodes; @@ -20,8 +22,7 @@ import org.springframework.util.StringUtils; import java.io.Serializable; import java.util.Arrays; import java.util.List; import java.util.*; import java.util.stream.Collectors; /** @@ -52,6 +53,12 @@ @Autowired private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; @DubboReference(check = false) private AccountDepartmentService accountDepartmentService; @Autowired private EquipmentInfoService equipmentInfoService; @Override public ResultVO queryAll(PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -61,8 +68,6 @@ page = baseMapper.selectPage(page, QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, pageQuery.getSearchParams())); List<KeypointEquipmentInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), KeypointEquipmentInfoDto.class); // TODO:获取所属部门名称 //获取额外信息 respList.forEach(f->{ @@ -89,6 +94,24 @@ criteria2.setInfoTpe(3); List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); f.setRepaireDetailList(repairDetailList); // --------------------------- 获取部门信息----------------------- //收集所用到的部门ID Set<Long> collectDepIdSet = new HashSet(); collectDepIdSet.add(f.getDepartmentId()); takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); //获取部门名集合 Map<Long,String> depNameMap = equipmentInfoService.getDepName(collectDepIdSet); //set f.setDepartmentName(depNameMap.get(f.getDepartmentId())); takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); }); return new SearchResultVO<>( true, @@ -152,6 +175,23 @@ criteria4.setInfoTpe(3); List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); // --------------------------- 获取部门信息----------------------- //收集所用到的部门ID Set<Long> collectDepIdSet = new HashSet(); collectDepIdSet.add(infoDto.getDepartmentId()); takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); //获取部门名集合 Map<Long,String> depNameMap = equipmentInfoService.getDepName(collectDepIdSet); //set infoDto.setDepartmentName(depNameMap.get(infoDto.getDepartmentId())); takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); return infoDto; } @@ -232,4 +272,4 @@ equipmentTakecareStardardDetailService.removeByIds(idList); } } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineMngController.java
@@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.gkhy.safePlatform.commons.co.ContextCacheUser; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.query.PageQuery; import com.gkhy.safePlatform.commons.utils.PageUtils; @@ -10,6 +11,7 @@ import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -17,7 +19,7 @@ import java.sql.Timestamp; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * 绩效考核管理-安全考核管理(ExamineMng)表控制层 @@ -45,7 +47,7 @@ PageUtils.checkCheck(pageQuery); return this.examineMngService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -66,7 +68,11 @@ * @return 修改结果 */ @PostMapping(value = "/addOrUpdate") public ResultVO update(@RequestBody ExamineMng examineMng) { public ResultVO update(Authentication authentication, @RequestBody ExamineMng examineMng) { // 获取当前用户 ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); examineMng.setExamineDepartmentId(currentUser.getDepId()); examineMng.setExaminePersonId(currentUser.getUid()); if (examineMng.getId() == null) { return new ResultVO<>(ResultCodes.OK,examineMngService.save(examineMng)); } else { @@ -81,10 +87,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.examineMngService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -98,7 +106,7 @@ examineTemplateSaveOrUpdate.setExamineDate(new Timestamp(new java.util.Date().getTime())); examineTemplateSaveOrUpdate.setExamineTotalNumber("3"); examineTemplateSaveOrUpdate.setMemo("4"); examineTemplateSaveOrUpdate.setExaminePersonId("5"); examineTemplateSaveOrUpdate.setExaminePersonId(5L); examineTemplateSaveOrUpdate.setBeExaminedPersonId("6"); examineTemplateSaveOrUpdate.setExamineDepartmentId(7L); examineTemplateSaveOrUpdate.setBeExaminedDepartmentId(8L); @@ -107,4 +115,4 @@ System.out.println(JSONObject.toJSONString(examineTemplateSaveOrUpdate)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java
@@ -1,33 +1,23 @@ package com.gkhy.safePlatform.targetDuty.controller; import java.util.Date; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject; import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; import com.google.common.collect.Lists; import java.sql.Timestamp; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto; import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import com.gkhy.safePlatform.commons.co.ContextCacheUser; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.query.PageQuery; import com.gkhy.safePlatform.commons.utils.PageUtils; import com.gkhy.safePlatform.commons.vo.ResultVO; import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; import com.google.common.collect.Lists; import org.springframework.security.core.Authentication; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.stream.Collectors; import javax.annotation.Resource; import java.io.Serializable; import java.util.Arrays; import java.util.List; /** @@ -56,7 +46,7 @@ PageUtils.checkCheck(pageQuery); return this.examineTemplateService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -76,10 +66,16 @@ * @return 修改结果 */ @PostMapping(value = "/addOrUpdate") public ResultVO update(@RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) { public ResultVO update(Authentication authentication, @RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) { if(!StringUtils.hasText(examineTemplateSaveOrUpdate.getTitle())){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少title"); } // 获取当前用户 ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); //设置设定人ID和设定人部门ID examineTemplateSaveOrUpdate.setSetPersonDepartmentId(currentUser.getDepId()); examineTemplateSaveOrUpdate.setSetPersonId(currentUser.getUid()); examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate); return new ResultVO<>(ResultCodes.OK); } @@ -90,10 +86,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.examineTemplateService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -120,4 +118,4 @@ examineTemplateSaveOrUpdate.setExamineItemList(examineItemList); System.out.println(JSONObject.toJSONString(examineTemplateSaveOrUpdate)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java
@@ -61,7 +61,7 @@ PageUtils.checkCheck(pageQuery); return this.rewardPunishmentDetailService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -89,19 +89,19 @@ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少rewardPunishmentStandardId"); } List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) .collect(Collectors.toList()); List<RewardPunishmentDetail> list = new ArrayList<>(); pIdList.forEach(f->{ RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); new1.setPersonId(f+""); list.add(new1); }); // List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) // .collect(Collectors.toList()); // // List<RewardPunishmentDetail> list = new ArrayList<>(); // pIdList.forEach(f->{ // RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); // new1.setPersonId(f+""); // list.add(new1); // }); if (rewardPunishmentDetail.getId() == null) { return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.saveBatch(list)); return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail)); } else { rewardPunishmentDetailService.updateBatchById(list); rewardPunishmentDetailService.updateById(rewardPunishmentDetail); return new ResultVO<>(ResultCodes.OK); } } @@ -112,10 +112,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.rewardPunishmentDetailService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -148,4 +150,4 @@ response.getOutputStream().close(); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentStandardController.java
@@ -62,7 +62,7 @@ PageUtils.checkCheck(pageQuery); return this.rewardPunishmentStandardService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -103,10 +103,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.rewardPunishmentStandardService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -199,4 +201,4 @@ System.out.println(JSONObject.toJSONString(mng)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutySummaryController.java
@@ -59,10 +59,10 @@ */ @PostMapping(value = "/page/list") public ResultVO selectAll(@RequestBody PageQuery<TargetDutySummaryQueryCriteria> pageQuery){ PageUtils.checkCheck(pageQuery); PageUtils.checkCheck(pageQuery); return this.targetDutySummaryService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -97,10 +97,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.targetDutySummaryService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -166,4 +168,4 @@ System.out.println(JSONObject.toJSONString(mng)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java
@@ -52,7 +52,7 @@ PageUtils.checkCheck(pageQuery); return this.targetDutyfileInfoService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -87,10 +87,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.targetDutyfileInfoService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } @@ -106,4 +108,4 @@ } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetExamineController.java
@@ -99,10 +99,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); this.targetExamineService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetMngController.java
@@ -71,7 +71,7 @@ PageUtils.checkCheck(pageQuery); return this.targetMngService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -112,10 +112,12 @@ * @param ids 主键结合 * @return 删除结果 */ @GetMapping(value = "/delete") public ResultVO delete(String ids) { List<String> idList = Arrays.stream(ids.split(",")) .collect(Collectors.toList()); @RequestMapping(value = "/delete",method = RequestMethod.POST) public ResultVO delete(@RequestBody Long[] ids) { if(ids == null){ return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); } List<Long> idList = Arrays.asList(ids); //删除关联表数据 this.targetDivideDetailService.remove(new QueryWrapper<TargetDivideDetail>().in("target_id",idList)); @@ -217,4 +219,4 @@ System.out.println(JSONObject.toJSONString(mng)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/WorkApproveController.java
@@ -49,7 +49,7 @@ PageUtils.checkCheck(pageQuery); return this.workApproveService.queryAll(pageQuery); } /** * 通过主键查询单条数据 @@ -103,4 +103,4 @@ this.workApproveService.removeByIds(idList); return new ResultVO<>(ResultCodes.OK); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/entity/ExamineMng.java
@@ -7,10 +7,10 @@ import com.baomidou.mybatisplus.annotation.IdType; /** * 安全考核管理(ExamineMng)表实体类 * 绩效考核管理-安全考核管理(ExamineMng)表实体类 * * @author xurui * @since 2022-07-21 13:43:08 * @since 2022-08-03 10:05:37 */ @SuppressWarnings("serial") @TableName("examine_mng") @@ -88,14 +88,24 @@ this.memo = memo; } //考核人ID/外键 private String examinePersonId; private Long examinePersonId; public String getExaminePersonId() { public Long getExaminePersonId() { return examinePersonId; } public void setExaminePersonId(String examinePersonId) { public void setExaminePersonId(Long examinePersonId) { this.examinePersonId = examinePersonId; } //考核人名称 private String examinePersonName; public String getExaminePersonName() { return examinePersonName; } public void setExaminePersonName(String examinePersonName) { this.examinePersonName = examinePersonName; } //被考核人ID/外键(可能有多个,用逗号隔开) private String beExaminedPersonId; @@ -107,7 +117,17 @@ public void setBeExaminedPersonId(String beExaminedPersonId) { this.beExaminedPersonId = beExaminedPersonId; } //考核部门ID/外键 //被考核人名称 private String beExaminedPersonName; public String getBeExaminedPersonName() { return beExaminedPersonName; } public void setBeExaminedPersonName(String beExaminedPersonName) { this.beExaminedPersonName = beExaminedPersonName; } //考核部门ID/外键(可能有多个,用逗号隔开) private Long examineDepartmentId; public Long getExamineDepartmentId() { goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/entity/ExamineTemplate.java
@@ -7,10 +7,10 @@ import com.baomidou.mybatisplus.annotation.IdType; /** * 绩效考核标准(ExamineTemplate)表实体类 * 绩效考核管理-绩效考核标准(ExamineTemplate)表实体类 * * @author xurui * @since 2022-07-21 10:58:10 * @since 2022-08-03 09:50:44 */ @SuppressWarnings("serial") @TableName("examine_template") @@ -77,7 +77,7 @@ public void setMemo(String memo) { this.memo = memo; } //设定人/外键 private Long setPersonId; public Long getSetPersonId() { @@ -87,7 +87,17 @@ public void setSetPersonId(Long setPersonId) { this.setPersonId = setPersonId; } //设定人名称 private String setPersonName; public String getSetPersonName() { return setPersonName; } public void setSetPersonName(String setPersonName) { this.setPersonName = setPersonName; } //设定人部门ID/外键 private Long setPersonDepartmentId; public Long getSetPersonDepartmentId() { goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/entity/RewardPunishmentDetail.java
@@ -10,7 +10,7 @@ * 奖惩记录(RewardPunishmentDetail)表实体类 * * @author xurui * @since 2022-07-27 15:37:45 * @since 2022-08-03 10:37:54 */ @SuppressWarnings("serial") @TableName("reward_punishment_detail") @@ -37,7 +37,7 @@ public void setRewardPunishmentStandardId(Long rewardPunishmentStandardId) { this.rewardPunishmentStandardId = rewardPunishmentStandardId; } //员工(多个用逗号隔开) //员工ID(多个用逗号隔开) private String personId; public String getPersonId() { @@ -47,6 +47,16 @@ public void setPersonId(String personId) { this.personId = personId; } //员工名(多个用逗号隔开) private String personName; public String getPersonName() { return personName; } public void setPersonName(String personName) { this.personName = personName; } //备注信息 private String memo; goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/entity/TargetDivideDetail.java
@@ -10,7 +10,7 @@ * 目标指标分解详情(TargetDivideDetail)表实体类 * * @author xurui * @since 2022-07-20 13:32:39 * @since 2022-08-03 09:25:40 */ @SuppressWarnings("serial") @TableName("target_divide_detail") @@ -87,5 +87,15 @@ public void setCommitPersonId(Long commitPersonId) { this.commitPersonId = commitPersonId; } //上报人名称 private String commitPersonName; public String getCommitPersonName() { return commitPersonName; } public void setCommitPersonName(String commitPersonName) { this.commitPersonName = commitPersonName; } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/ExamineMngDto.java
@@ -46,6 +46,28 @@ //被考核部门名称/外键 private String beExaminedDepartmentName; //考核人名称 private String examinePersonName; public String getExaminePersonName() { return examinePersonName; } public void setExaminePersonName(String examinePersonName) { this.examinePersonName = examinePersonName; } //被考核人名称 private String beExaminedPersonName; public String getBeExaminedPersonName() { return beExaminedPersonName; } public void setBeExaminedPersonName(String beExaminedPersonName) { this.beExaminedPersonName = beExaminedPersonName; } public String getBeExaminedDepartmentName() { return beExaminedDepartmentName; } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/ExamineTemplateDto.java
@@ -21,9 +21,11 @@ private String memo; //设定人/外键 private Long setPersonId; //设定人名称 private Long setPersonName; //设定部门ID/外键 private Long setPersonDepartmentId; //设定部门名称/外键 //设定部门名称 private String setPersonDepartmentName; private Timestamp setTimem; @@ -137,4 +139,12 @@ public void setUpdateTime(Timestamp updateTime) { this.updateTime = updateTime; } public Long getSetPersonName() { return setPersonName; } public void setSetPersonName(Long setPersonName) { this.setPersonName = setPersonName; } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/TargetDivideDetailDto.java
@@ -23,6 +23,37 @@ private Timestamp updateTime; //上报人名称 private String commitPersonName; //责任部门名称 private String dutyDepartmentName; //制定人部门名称 private String makerDepartmentName; public String getDutyDepartmentName() { return dutyDepartmentName; } public void setDutyDepartmentName(String dutyDepartmentName) { this.dutyDepartmentName = dutyDepartmentName; } public String getMakerDepartmentName() { return makerDepartmentName; } public void setMakerDepartmentName(String makerDepartmentName) { this.makerDepartmentName = makerDepartmentName; } public String getCommitPersonName() { return commitPersonName; } public void setCommitPersonName(String commitPersonName) { this.commitPersonName = commitPersonName; } public Long getId() { return id; goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/TargetMngDto.java
@@ -34,13 +34,13 @@ private Timestamp updateTime; //目标指标分解列表 private List<TargetDivideDetail> targetDivideDetailList = new ArrayList<>(); private List<TargetDivideDetailDto> targetDivideDetailList = new ArrayList<>(); public List<TargetDivideDetail> getTargetDivideDetailList() { public List<TargetDivideDetailDto> getTargetDivideDetailList() { return targetDivideDetailList; } public void setTargetDivideDetailList(List<TargetDivideDetail> targetDivideDetailList) { public void setTargetDivideDetailList(List<TargetDivideDetailDto> targetDivideDetailList) { this.targetDivideDetailList = targetDivideDetailList; } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/TargetMngService.java
@@ -5,6 +5,7 @@ import com.gkhy.safePlatform.commons.vo.ResultVO; import com.gkhy.safePlatform.commons.query.PageQuery; import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngDto; import java.io.Serializable; import java.util.List; @@ -17,7 +18,7 @@ * @since 2022-07-20 11:49:22 */ public interface TargetMngService extends IService<TargetMng> { ResultVO queryAll(PageQuery<TargetMngQueryCriteria> pageQuery); ResultVO<List<TargetMngDto>> queryAll(PageQuery<TargetMngQueryCriteria> pageQuery); List<TargetMng> queryAll(TargetMngQueryCriteria criteria); goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineItemServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private ExamineItemRepository examineItemRepository; @Override public ResultVO queryAll(PageQuery<ExamineItemQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<ExamineItem> queryAll(ExamineItemQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(ExamineItem.class, criteria)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
@@ -41,8 +41,8 @@ private ExamineMngRepository examineMngRepository; @Autowired private ExamineItemRepository examineItemRepository; @Override public ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -104,4 +104,4 @@ dto.setCurrentExamineDtoList(list); return dto; } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineTemplateServiceImpl.java
@@ -52,8 +52,8 @@ @Autowired private ExamineItemService examineItemService; @Override public ResultVO queryAll(PageQuery<ExamineTemplateQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -114,8 +114,8 @@ } List<ExamineItem> list = infoDto.getExamineItemList(); list.forEach(f->{f.setExamineTemplateId(examineTemplate.getId());}); list.forEach(f->{f.setExamineTemplateId(infoDto.getId());}); examineItemService.saveOrUpdateBatch(list); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/RewardPunishmentDetailServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private RewardPunishmentDetailRepository rewardPunishmentDetailRepository; @Override public ResultVO queryAll(PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -64,4 +64,4 @@ public List<RewardPunishmentDetail> queryAllRelation(RewardPunishmentDetailQueryCriteria criteria) { return baseMapper.queryAll(criteria.getPersonId()); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/RewardPunishmentStandardServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private RewardPunishmentStandardRepository rewardPunishmentStandardRepository; @Override public ResultVO queryAll(PageQuery<RewardPunishmentStandardQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -58,4 +58,4 @@ public List<RewardPunishmentStandard> queryAll(RewardPunishmentStandardQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(RewardPunishmentStandard.class, criteria)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetDivideDetailServiceImpl.java
@@ -44,9 +44,9 @@ @Autowired private TargetMngRepository targetMngRepository; @Override public ResultVO queryAll(PageQuery<TargetDivideDetailQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -88,7 +88,7 @@ //保存主数据 //如果目标指标已经被分解,那么就不能再次增加 if(targetMng.getDivideStatus() == 1){ if(targetMng.getDivideStatus() == 1 && infoDto.getTargetId() == null){ throw new TargetDutyException(TargetDutyResultCodes.E2); } @@ -102,4 +102,4 @@ } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetDutySummaryServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private TargetDutySummaryRepository targetDutySummaryRepository; @Override public ResultVO queryAll(PageQuery<TargetDutySummaryQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -60,4 +60,4 @@ public List<TargetDutySummary> queryAll(TargetDutySummaryQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutySummary.class, criteria)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetDutyfileInfoServiceImpl.java
@@ -30,9 +30,9 @@ @Autowired private TargetDutyfileInfoRepository targetDutyfileInfoRepository; @Override public ResultVO queryAll(PageQuery<TargetDutyfileInfoQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -42,6 +42,8 @@ page = baseMapper.selectPage(page, QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, pageQuery.getSearchParams())); List<TargetDutyfileInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutyfileInfoDto.class); // TODO 岗位名 return new SearchResultVO<>( true, @@ -58,4 +60,4 @@ public List<TargetDutyfileInfo> queryAll(TargetDutyfileInfoQueryCriteria criteria) { return baseMapper.selectList(QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, criteria)); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetExamineServiceImpl.java
@@ -35,9 +35,9 @@ @Autowired private TargetExamineRepository targetExamineRepository; @Override public ResultVO queryAll(PageQuery<TargetExamineQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -79,4 +79,4 @@ }); this.saveOrUpdateBatch(infoDto.getExamineList()); } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetMngServiceImpl.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDivideDetailDto; import com.gkhy.safePlatform.targetDuty.repository.TargetMngRepository; import com.gkhy.safePlatform.targetDuty.entity.TargetMng; import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; @@ -38,9 +39,9 @@ @Resource private TargetDivideDetailService targetDivideDetailService; @Override public ResultVO queryAll(PageQuery<TargetMngQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -78,7 +79,11 @@ //查询关联分解信息 TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); criteria.setTargetId(targetMng.getId()); targetMngDto.setTargetDivideDetailList(targetDivideDetailService.queryAll(criteria)); List<TargetDivideDetailDto> respList = BeanCopyUtils.copyBeanList(targetDivideDetailService.queryAll(criteria), TargetDivideDetailDto.class); //循环获取部门信息 TODO targetMngDto.setTargetDivideDetailList(respList); return targetMngDto; } } } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/WorkApproveServiceImpl.java
@@ -32,9 +32,9 @@ @Autowired private WorkApproveRepository workApproveRepository; @Override public ResultVO queryAll(PageQuery<WorkApproveQueryCriteria> pageQuery) { Long pageIndex = pageQuery.getPageIndex(); @@ -75,4 +75,4 @@ workApprove.setApproveStatus(3); this.updateById(workApprove); } } }