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 7040622f3..c025bcae8 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 @@ -16,9 +16,11 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper; import com.jero.modules.project.service.IConditionAssessmentEOService; import com.jero.modules.project.service.IProjectLibraryBaseService; +import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.mapper.SysDictItemMapper; import com.jero.modules.system.mapper.SysUserMapper; +import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.util.StringUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.poi.hssf.usermodel.HSSFSheet; @@ -68,6 +70,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl result = new HashMap<>(); QueryWrapper lawsInventoryEOQueryWrapper = new QueryWrapper<>(); @@ -334,30 +339,35 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> conditionAssessmentMapList = this.conditionAssessmentEOService.getProjectStatusAssessStatisticsGroupByTerritory(params); - result.put("conditionAssessmentMapList",conditionAssessmentMapList); + disposeData(conditionAssessmentMapList,cut); + result.put("dataList",conditionAssessmentMapList); }else if(StringUtils.equals(OperatorTypeEnum.QUERY_LISTING_TO_CONFIRM_STATISTICS.getValue(),operatorType)){ //清单确认 状态 String inventoryAffirmStatus = (String) params.get("inventoryAffirmStatus"); List> listingToConfirmList = this.projectLawsInventoryEOMapper.getListingToConfirmStatisticsGroupByTerritory(projectLibraryId,inventoryAffirmStatus); - result.put("listingToConfirmList",listingToConfirmList); + disposeData(listingToConfirmList,cut); + result.put("dataList",listingToConfirmList); }else if(StringUtils.equals(OperatorTypeEnum.QUERY_TASK_TO_CONFIRM_STATISTICS.getValue(),operatorType)){ //任务确认 状态 String taskAffirmStatus = (String) params.get("taskAffirmStatus"); List> taskToConfirmList = this.projectLawsInventoryEOMapper.getTaskToConfirmStatisticsGroupByTerritory(projectLibraryId,taskAffirmStatus); - result.put("taskToConfirmList",taskToConfirmList); + disposeData(taskToConfirmList,cut); + result.put("dataList",taskToConfirmList); }else if(StringUtils.equals(OperatorTypeEnum.QUERY_DESIGN_STATISTICS.getValue(),operatorType)){ //设计符合性 流程任务状态 String designFlowTaskStatus = (String) params.get("designFlowTaskStatus"); if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){ List> designComplianceList = this.projectTaskInventoryEOMapper.getDesignComplianceStatisticeGroupByTerritory(projectLawsInventoryIdList,designFlowTaskStatus); - result.put("designComplianceList",designComplianceList); + disposeData(designComplianceList,cut); + result.put("dataList",designComplianceList); } }else if(StringUtils.equals(OperatorTypeEnum.QUERY_PREHOMO_STATISTICS.getValue(),operatorType)){ //prehomo确认 流程任务状态 String prehomoFlowTaskStatus = (String) params.get("prehomoFlowTaskStatus"); if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){ List> prehomoList = this.projectTaskInventoryEOMapper.getPrehomoStatisticeGroupByTerritory(projectLawsInventoryIdList,prehomoFlowTaskStatus); - result.put("prehomoList",prehomoList); + disposeData(prehomoList,cut); + result.put("dataList",prehomoList); } }else if(StringUtils.equals(OperatorTypeEnum.QUERY_VERIFY_STATISTICS.getValue(),operatorType)){ //验证符合性 流程任务状态 @@ -365,7 +375,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> verifyComplianceList = this.projectTaskInventoryEOMapper.getVerifyComplianceStatisticeGroupByTerritory(projectLawsInventoryIdList,verifyFlowTaskStatus); - result.put("verifyComplianceList",verifyComplianceList); + disposeData(verifyComplianceList,cut); + result.put("dataList",verifyComplianceList); } }else if(StringUtils.equals(OperatorTypeEnum.QUERY_CERTIFICATION_PROGRESS_STATISTICS.getValue(),operatorType)){ //认证进度 流程任务状态 @@ -373,7 +384,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> certificationProgressList = this.projectTaskInventoryEOMapper.getCertificationProgressStatisticsGroupByTerritory(projectLawsInventoryIdList,certificationProgress); - result.put("certificationProgressList",certificationProgressList); + disposeData(certificationProgressList,cut); + result.put("dataList",certificationProgressList); } } return result; @@ -458,23 +470,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl projectDetailsStatisticsGroupByTerritory, Map params){ List> exportData = new ArrayList<>(); - String operatorType = (String) params.get("operatorType"); - if(StringUtils.equals(OperatorTypeEnum.QUERY_CURRENT_PROJECT_STATUS_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("conditionAssessmentMapList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_LISTING_TO_CONFIRM_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("listingToConfirmList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_TASK_TO_CONFIRM_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("taskToConfirmList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_DESIGN_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("designComplianceList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_PREHOMO_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("prehomoList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_VERIFY_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("verifyComplianceList"); - }else if(StringUtils.equals(OperatorTypeEnum.QUERY_CERTIFICATION_PROGRESS_STATISTICS.getValue(),operatorType)){ - exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("certificationProgressList"); - } - + exportData = (List>) projectDetailsStatisticsGroupByTerritory.get("dataList"); int rowIndex = 1; for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { Row dataRow = sheet.createRow(rowIndex); @@ -483,6 +479,25 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> datas,String cut){ + List dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("duty_territory"); + if(CollectionUtils.isNotEmpty(datas)){ + for (Map data : datas) { + List dutyTerritory = dictItemList.stream().filter(dict -> StringUtils.equals(dict.getItemValue(), data.get("dutyTerritory").toString())).collect(Collectors.toList()); + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + data.put("",dutyTerritory.get(0).getItemText()); + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + data.put("",dutyTerritory.get(0).getEnName()); + } + } + } + } }