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 ae78fd2a6..0cbc8deb9 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 @@ -8,16 +8,32 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.jero.common.api.vo.Result; import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.common.system.vo.DictModel; -import com.jero.modules.cert.collect.entity.*; +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; import com.jero.modules.cert.collect.enums.CollectManifestStateEnum; import com.jero.modules.cert.collect.enums.ManifestStateEnum; -import com.jero.modules.cert.collect.mapper.*; -import com.jero.modules.cert.collect.service.*; +import com.jero.modules.cert.collect.mapper.ParamsCollectManifestEOMapper; +import com.jero.modules.cert.collect.mapper.ParamsCollectManifestHistoryEOMapper; +import com.jero.modules.cert.collect.mapper.ParamsConfigEOMapper; +import com.jero.modules.cert.collect.mapper.ParamsManifestEOMapper; +import com.jero.modules.cert.collect.mapper.ParamsManifestHistoryEOMapper; +import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; +import com.jero.modules.cert.collect.service.IParamsConfigDataEOService; +import com.jero.modules.cert.collect.service.IParamsConfigDataHistoryEOService; +import com.jero.modules.cert.collect.service.IParamsConfigEOService; +import com.jero.modules.cert.collect.service.IParamsConfigHistoryEOService; +import com.jero.modules.cert.collect.service.IParamsManifestEOService; +import com.jero.modules.cert.collect.service.IParamsManifestHistoryEOService; import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO; import com.jero.modules.cert.collect.vo.ParamsManifestVO; import com.jero.modules.cert.report.entity.ParamsReportEO; @@ -29,7 +45,6 @@ import com.jero.modules.cert.template.enums.ControlTypeEnum; import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.enums.DictCodeEnum; -import com.jero.modules.project.entity.ProjectCertificationInventoryEO; import com.jero.modules.project.entity.ProjectRelatedPersonnel; import com.jero.modules.project.service.IProjectLibraryBaseService; import com.jero.modules.project.service.IProjectRelatedPersonnelService; @@ -50,7 +65,16 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.text.NumberFormat; -import java.util.*; +import java.util.ArrayList; +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.UUID; import java.util.stream.Collectors; /** @@ -1241,20 +1265,24 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.get("state")) - || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.get("state")) - || CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) && dictItem.getItemValue().equals(e.get("duty_territory"))) + || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.get("state"))) + && dictItem.getItemValue().equals(e.get("duty_territory"))) .count(); // 未开始的参数项 数量 collectingNumber += listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.get("state")) || CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.get("state")) || CollectManifestStateEnum.DRE_BACK.getValue().equals(e.get("state")) - || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.get("state"))) && dictItem.getItemValue().equals(e.get("duty_territory"))) + || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.get("state"))) + && dictItem.getItemValue().equals(e.get("duty_territory"))) .count(); // 收集中的参数项 数量 - submitNumber += listAll.stream().filter(e -> CollectManifestStateEnum.SUBMIT.getValue().equals(e.get("state")) && dictItem.getItemValue().equals(e.get("duty_territory"))) + submitNumber += listAll.stream().filter(e -> (CollectManifestStateEnum.SUBMIT.getValue().equals(e.get("state")) + || CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) + && dictItem.getItemValue().equals(e.get("duty_territory"))) .count(); // 已提交的参数项 数量 - syncReportNumber += listAll.stream().filter(e -> CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.get("state")) && dictItem.getItemValue().equals(e.get("duty_territory"))) + syncReportNumber += listAll.stream().filter(e -> CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.get("state")) + && dictItem.getItemValue().equals(e.get("duty_territory"))) .count(); // 已同步上报库的参数项 数量 } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java index 4e9c06391..f25ae55b1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLawsInventoryEOServiceImpl.java @@ -10147,7 +10147,7 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl { boolean flag = ( StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue()) ); return flag; }).count(); @@ -10219,7 +10221,7 @@ public class PlatformProjectLawsInventoryEOServiceImpl extends ServiceImpl { boolean flag = ( StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue()) ); return flag; }).count(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java index 888ce7c63..8f45a7c6a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/platform/service/impl/PlatformProjectLibraryBaseServiceImpl.java @@ -1007,7 +1007,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl queryById(String id,String cut) { List records = platformProjectLibraryBaseMapper.queryById(id); - disposeData(records,"",false); + disposeData(records,cut,false); //目标市场数据字典 List targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode()); for(ProjectLibraryBase projectLibraryBase: records){ @@ -1537,6 +1537,15 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl param = new HashMap<>(); + param.put("cut",cut); + String targetMarketTemp = getMarket(param, targetMarketList, projectLibraryBase); + //项目名称(功率-生产商-目标市场) + String projectName = projectLibraryBase.getPower() + "-" + projectLibraryBase.getProducer() + "-" + targetMarketTemp; + projectLibraryBase.setProjectNameId(projectName);//原设计平台件项目名称去这个字段值 + //平台件项目名称改为拼接的形式,projectNameId不在存数据,如果这个变更影响其他的地方,项目名称取值可以取projectName的值 + projectLibraryBase.setProjectName(projectName); if(disposeTargetMarketFlag){ if(StringUtils.isNotEmpty(projectLibraryBase.getTargetMarket())){ @@ -1615,31 +1624,6 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl> currentProjectStatusMapList = new ArrayList<>(); - CurrentProjectStatusEnum[] values = CurrentProjectStatusEnum.values(); - for (CurrentProjectStatusEnum value : values) { - Map map = new HashMap<>(); - map.put("color",value.getValue()); - currentProjectStatusMapList.add(map); - } - int currentProjectStatusTotal; - List projectStatusAssessList = this.conditionAssessmentEOService.getProjectStatusAssessList(projectLawsInventoryIdList); - - for (Map map : currentProjectStatusMapList) { - List collect = projectStatusAssessList.stream().filter( - projectStatusAssess -> StringUtils.equals(projectStatusAssess.getConditionAssessment(),map.get("color").toString()) - ).collect(Collectors.toList()); - map.put("conditionAssessmentCount",collect.size()); - } - - currentProjectStatusTotal = currentProjectStatusMapList.stream().filter( - currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString()) != 0 - ).mapToInt(currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString())).sum(); - - currentProjectStatusMap.put("currentProjectStatusMapList",currentProjectStatusMapList); - currentProjectStatusMap.put("currentProjectStatusTotal",currentProjectStatusTotal); - result.put("currentProjectStatusMap",currentProjectStatusMap);*/ //设计符合性 List> designComplianceMapList = this.platformProjectLawsInventoryEOService.getDesignComplianceStatistice(projectLawsInventoryEOList); @@ -1664,36 +1648,6 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl> certificationProgressMapList = this.projectTaskInventoryEOMapper.getCertificationProgressStatistics(projectLawsInventoryIdList); - certificationProgressTotal = certificationProgressMapList.stream().filter( - certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString()) != 0 - ).mapToInt(certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString())).sum(); - - CertificationProgressEnum[] CertificationProgressEnumValues = CertificationProgressEnum.values(); - for (CertificationProgressEnum certificationProgressEnumValue : CertificationProgressEnumValues) { - boolean flag = true; - for (Map map : certificationProgressMapList) { - if(map.get("certificationProgress") != null){ - if(StringUtils.equals(certificationProgressEnumValue.getValue(),map.get("certificationProgress").toString())){ - flag = false; - break; - } - } - } - if(flag){ - Map map = new HashMap<>(); - map.put("certificationProgress",certificationProgressEnumValue.getValue()); - map.put("certificationProgressCount",0); - certificationProgressMapList.add(map); - } - } - - certificationProgressMap.put("certificationProgressTotal",certificationProgressTotal); - certificationProgressMap.put("certificationProgressMapList",certificationProgressMapList); - result.put("certificationProgressMap",certificationProgressMap);*/ } QueryWrapper pciQueryWrap = new QueryWrapper<>(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index ecf1766f9..564b436ea 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -10118,7 +10118,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl { boolean flag = ( StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue()) ); return flag; }).count(); @@ -10190,7 +10192,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl { boolean flag = ( StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue()) ); return flag; }).count(); 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 d7ca2b6f9..21a021e7f 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 @@ -1935,32 +1935,6 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> currentProjectStatusMapList = new ArrayList<>(); - CurrentProjectStatusEnum[] values = CurrentProjectStatusEnum.values(); - for (CurrentProjectStatusEnum value : values) { - Map map = new HashMap<>(); - map.put("color",value.getValue()); - currentProjectStatusMapList.add(map); - } - int currentProjectStatusTotal; - List projectStatusAssessList = this.conditionAssessmentEOService.getProjectStatusAssessList(projectLawsInventoryIdList); - - for (Map map : currentProjectStatusMapList) { - List collect = projectStatusAssessList.stream().filter( - projectStatusAssess -> StringUtils.equals(projectStatusAssess.getConditionAssessment(),map.get("color").toString()) - ).collect(Collectors.toList()); - map.put("conditionAssessmentCount",collect.size()); - } - - currentProjectStatusTotal = currentProjectStatusMapList.stream().filter( - currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString()) != 0 - ).mapToInt(currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString())).sum(); - - currentProjectStatusMap.put("currentProjectStatusMapList",currentProjectStatusMapList); - currentProjectStatusMap.put("currentProjectStatusTotal",currentProjectStatusTotal); - result.put("currentProjectStatusMap",currentProjectStatusMap);*/ - //设计符合性 List> designComplianceMapList = this.projectLawsInventoryEOService.getDesignComplianceStatistice(projectLawsInventoryEOList); int designFlowTaskStatusCount = 0; @@ -1984,36 +1958,6 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> certificationProgressMapList = this.projectTaskInventoryEOMapper.getCertificationProgressStatistics(projectLawsInventoryIdList); - certificationProgressTotal = certificationProgressMapList.stream().filter( - certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString()) != 0 - ).mapToInt(certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString())).sum(); - - CertificationProgressEnum[] CertificationProgressEnumValues = CertificationProgressEnum.values(); - for (CertificationProgressEnum certificationProgressEnumValue : CertificationProgressEnumValues) { - boolean flag = true; - for (Map map : certificationProgressMapList) { - if(map.get("certificationProgress") != null){ - if(StringUtils.equals(certificationProgressEnumValue.getValue(),map.get("certificationProgress").toString())){ - flag = false; - break; - } - } - } - if(flag){ - Map map = new HashMap<>(); - map.put("certificationProgress",certificationProgressEnumValue.getValue()); - map.put("certificationProgressCount",0); - certificationProgressMapList.add(map); - } - } - - certificationProgressMap.put("certificationProgressTotal",certificationProgressTotal); - certificationProgressMap.put("certificationProgressMapList",certificationProgressMapList); - result.put("certificationProgressMap",certificationProgressMap);*/ } QueryWrapper pciQueryWrap = new QueryWrapper<>();