diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictItemController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictItemController.java index 8af578ca4..bba601efa 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictItemController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictItemController.java @@ -28,10 +28,7 @@ import org.springframework.cache.annotation.CacheEvict; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; /** *

@@ -331,4 +328,24 @@ public class SysDictItemController { } } + /** + * 获取一级责任领域(统计节点)信息接口 + * @param params + * @return + */ + @RequestMapping(value = "/getFirstLevelDutyTerritory", method = RequestMethod.GET) + @ApiOperation("获取一级责任领域(统计节点)信息接口") + public Result getFirstLevelDutyTerritory(@RequestParam Map params) { + List> result = new ArrayList<>(); + List sysDictItems = this.sysDictItemService.selectItemsAll(); + Map> firstLevelDutyTerritoryMap = this.sysDictItemService.getFirstLevelSysDictItemByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue(),sysDictItems); + for (Map.Entry> dutyTerritoryMap : firstLevelDutyTerritoryMap.entrySet()) { + Map map = new HashMap<>(); + map.put("key",dutyTerritoryMap.getKey()); + map.put("value",dutyTerritoryMap.getValue()); + result.add(map); + } + return Result.OK(result); + } + } diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java index 7735f4266..b3d6abffe 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java @@ -143,6 +143,7 @@ public class SysUserController { } user.setOrgCode(null); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(user, newReqMap); + queryWrapper.orderByAsc("username"); //TODO 外部模拟登陆临时账号,列表不显示 queryWrapper.ne("username", "_reserve_user_external"); String[] orgCode = reqMap.get("orgCode"); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/controller/AuthDummyInventoryInfoEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/controller/AuthDummyInventoryInfoEOController.java index a08f4af17..b0eb5a9f9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/controller/AuthDummyInventoryInfoEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/controller/AuthDummyInventoryInfoEOController.java @@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.modules.dummy.entity.DummyInventoryInfoEO; import lombok.extern.slf4j.Slf4j; import com.jero.common.system.base.controller.JeroController; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -57,7 +58,16 @@ public class AuthDummyInventoryInfoEOController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(authDummyInventoryInfoEO, req.getParameterMap()); - queryWrapper.orderByDesc("create_time"); + String orderByField = authDummyInventoryInfoEO.getOrderByField(); + String orderBy = authDummyInventoryInfoEO.getOrderBy(); + // 如果排序字段不为空 + if(StringUtils.isNotEmpty(orderByField)){ + // 转换字段 + orderByField = this.authDummyInventoryInfoEOService.convertOrderByField(orderByField); + queryWrapper.orderBy(true, "1".equals(orderBy)?true:false, orderByField); + }else { + queryWrapper.orderByDesc("create_time"); + } Page page = new Page(pageNo, pageSize); IPage pageList = this.authDummyInventoryInfoEOService.page(page, queryWrapper); this.authDummyInventoryInfoEOService.disposeData(pageList.getRecords(),authDummyInventoryInfoEO.getCut()); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/IAuthDummyInventoryInfoEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/IAuthDummyInventoryInfoEOService.java index 4bbb55bc5..f13e5a99e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/IAuthDummyInventoryInfoEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/IAuthDummyInventoryInfoEOService.java @@ -113,6 +113,8 @@ public interface IAuthDummyInventoryInfoEOService extends IService datas, String cut); + String convertOrderByField(String orderByField); + /** * 获取责任领域名称 * @param cut diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java index 605ac3bf8..4d59bc41e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java @@ -607,8 +607,8 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl authDummyInventoryInfoEOList = this.list(queryWrapper); return authDummyInventoryInfoEOList; } - - private String convertOrderByField(String orderByField) { + @Override + public String convertOrderByField(String orderByField) { if(StringUtils.isEmpty(orderByField)){ return null; } @@ -620,6 +620,7 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl getStatisticsForProjectDetails(String paramsManifestId, String cut) { - // 查询所有责任领域 - List dutyTerritoryDictList = sysDictMapper.queryDictItemsByCode("duty_territory"); + List sysDictItems = this.sysDictItemService.selectItemsAll(); + Map> firstLevelDutyTerritoryMap = this.sysDictItemService.getFirstLevelSysDictItemByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue(),sysDictItems); Map result = new LinkedHashMap<>(); List dutyTerritoryNameList = new LinkedList<>(); @@ -898,60 +904,122 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl> listAll = paramsCollectManifestEOMapper.listInfoForExport(paramsCollectManifestEO, null); - // 循环责任领域,计算每个责任领域中的四种状态数据 - for (DictModel item : dutyTerritoryDictList) { + if(ObjectUtil.isNotEmpty(firstLevelDutyTerritoryMap)){ + for (Map.Entry> dutyTerritoryMap : firstLevelDutyTerritoryMap.entrySet()) { + String firstLevelDutyTerritory = dutyTerritoryMap.getKey(); + List dutyTerritoryList = dutyTerritoryMap.getValue(); + if(StringUtils.isEmpty(firstLevelDutyTerritory) || CollectionUtils.isEmpty(dutyTerritoryList)){ + continue; + } - // 计算数量 - double notStartNumber = listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.get("state")) + double notStartNumber = 0; + double collectingNumber = 0; + double submitNumber = 0; + double syncReportNumber = 0; + + for (SysDictItem dictItem : dutyTerritoryList) { + // 计算数量 + notStartNumber += listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.get("state")) || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.get("state")) - || CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) && item.getValue().equals(e.get("duty_territory"))) - .count(); // 未开始的参数项 数量 + || CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) && dictItem.getItemValue().equals(e.get("duty_territory"))) + .count(); // 未开始的参数项 数量 - double collectingNumber = listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.get("state")) + 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"))) && item.getValue().equals(e.get("duty_territory"))) - .count(); // 收集中的参数项 数量 + || CollectManifestStateEnum.CERT_BACK.getValue().equals(e.get("state"))) && dictItem.getItemValue().equals(e.get("duty_territory"))) + .count(); // 收集中的参数项 数量 - double submitNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SUBMIT.getValue().equals(e.get("state")) && item.getValue().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"))) + .count(); // 已提交的参数项 数量 - double syncReportNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.get("state")) && item.getValue().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"))) + .count(); // 已同步上报库的参数项 数量 + } - // 计算百分比 - double total = notStartNumber + collectingNumber + submitNumber + syncReportNumber; // 当前责任领域参数项总数 - String notStartPercent = getRatio(notStartNumber, total); // 未开始的参数项 百分比 - String collectingPercent = getRatio(collectingNumber, total); // 收集中的参数项 百分比 - String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比 - String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比 + // 计算百分比 + double total = notStartNumber + collectingNumber + submitNumber + syncReportNumber; // 当前责任领域参数项总数 + String notStartPercent = getRatio(notStartNumber, total); // 未开始的参数项 百分比 + String collectingPercent = getRatio(collectingNumber, total); // 收集中的参数项 百分比 + String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比 + String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比 - // 累加 - totalAll += total; - notStartTotal += notStartNumber; - collectingTotal += collectingNumber; - submitTotal += submitNumber; - syncReportTotal += syncReportNumber; + // 累加 + totalAll += total; + notStartTotal += notStartNumber; + collectingTotal += collectingNumber; + submitTotal += submitNumber; + syncReportTotal += syncReportNumber; + // 组装数据 返回前端 + if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) { + continue; + } + getData(notStartList, notStartNumber, notStartPercent); + getData(collectingList, collectingNumber, collectingPercent); + getData(submitList, submitNumber, submitPercent); + getData(syncReportList, syncReportNumber, syncReportPercent); - // 组装数据 返回前端 - if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) { - continue; + dutyTerritoryNameList.add(firstLevelDutyTerritory); } - - if (CutEnum.EN.getValue().equals(cut)) { - dutyTerritoryNameList.add(item.getTextEn()); - } else { - dutyTerritoryNameList.add(item.getText()); - } - - getData(notStartList, notStartNumber, notStartPercent); - getData(collectingList, collectingNumber, collectingPercent); - getData(submitList, submitNumber, submitPercent); - getData(syncReportList, syncReportNumber, syncReportPercent); - } +// // 查询所有责任领域 +// List dutyTerritoryDictList = sysDictMapper.queryDictItemsByCode("duty_territory"); +// // 循环责任领域,计算每个责任领域中的四种状态数据 +// for (DictModel item : dutyTerritoryDictList) { +// +// // 计算数量 +// double notStartNumber = listAll.stream().filter(e -> (CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.get("state")) +// || CollectManifestStateEnum.SDT_BACK.getValue().equals(e.get("state")) +// || CollectManifestStateEnum.CHANGE.getValue().equals(e.get("state"))) && item.getValue().equals(e.get("duty_territory"))) +// .count(); // 未开始的参数项 数量 +// +// double 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"))) && item.getValue().equals(e.get("duty_territory"))) +// .count(); // 收集中的参数项 数量 +// +// double submitNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SUBMIT.getValue().equals(e.get("state")) && item.getValue().equals(e.get("duty_territory"))) +// .count(); // 已提交的参数项 数量 +// +// double syncReportNumber = listAll.stream().filter(e -> CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.get("state")) && item.getValue().equals(e.get("duty_territory"))) +// .count(); // 已同步上报库的参数项 数量 +// +// // 计算百分比 +// double total = notStartNumber + collectingNumber + submitNumber + syncReportNumber; // 当前责任领域参数项总数 +// String notStartPercent = getRatio(notStartNumber, total); // 未开始的参数项 百分比 +// String collectingPercent = getRatio(collectingNumber, total); // 收集中的参数项 百分比 +// String submitPercent = getRatio(submitNumber, total); // 已提交的参数项 百分比 +// String syncReportPercent = getRatio(syncReportNumber, total); // 已同步上报库的参数项 百分比 +// +// // 累加 +// totalAll += total; +// notStartTotal += notStartNumber; +// collectingTotal += collectingNumber; +// submitTotal += submitNumber; +// syncReportTotal += syncReportNumber; +// +// +// // 组装数据 返回前端 +// if (notStartNumber == collectingNumber && collectingNumber == submitNumber && submitNumber == syncReportNumber && syncReportNumber == 0) { +// continue; +// } +// +// if (CutEnum.EN.getValue().equals(cut)) { +// dutyTerritoryNameList.add(item.getTextEn()); +// } else { +// dutyTerritoryNameList.add(item.getText()); +// } +// +// getData(notStartList, notStartNumber, notStartPercent); +// getData(collectingList, collectingNumber, collectingPercent); +// getData(submitList, submitNumber, submitPercent); +// getData(syncReportList, syncReportNumber, syncReportPercent); +// +// } + // 设置全部 if (CutEnum.EN.getValue().equals(cut)) { dutyTerritoryNameList.add(0, "All"); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryInfoEOServiceImpl.java index 2e4ddf68c..5db1e9113 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryInfoEOServiceImpl.java @@ -106,12 +106,87 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl getPageInfo(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) { + long startTime = System.currentTimeMillis(); + String orderBy = dummyInventoryInfoEO.getOrderBy(); + String orderByField = dummyInventoryInfoEO.getOrderByField(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoEO, req.getParameterMap()); - queryWrapper.orderByDesc("create_time"); + //新车型实施日期,在产车实施日期(排序) + if("xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(orderByField) || "implement_time".equals(orderByField)){ + if(OrderEnum.POSITIVE.getValue().equals(orderBy)){ + queryWrapper.orderByAsc(orderByField); + }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ + queryWrapper.orderByDesc(orderByField); + } + } + if(StringUtils.isBlank(orderByField)){ + queryWrapper.orderByDesc("create_time","serial_number"); + } + + if(StringUtils.isNotEmpty(dummyInventoryInfoEO.getImplementTimeString())){ + String[] implementTimeArr = dummyInventoryInfoEO.getImplementTimeString().split(","); + + QueryWrapper phasedDetailsQueryWrap = new QueryWrapper<>(); + phasedDetailsQueryWrap.lambda().like(PhasedImplementationDetailsEO::getImplementationType,ImplementationTypeEnum.CAR_IN_PRODUCTION.getItemValue()); + phasedDetailsQueryWrap.lambda().ge(PhasedImplementationDetailsEO::getImplementationDate,implementTimeArr[0]); + phasedDetailsQueryWrap.lambda().le(PhasedImplementationDetailsEO::getImplementationDate,implementTimeArr[1]); + List bussDocumentLibraryIdList = this.phasedImplementationDetailsEOService.list(phasedDetailsQueryWrap) + .stream().map(PhasedImplementationDetailsEO::getBussDocumentLibraryId).collect(Collectors.toList()); + + queryWrapper.and(query -> { + query.and(q -> { + q.lambda().ge(DummyInventoryInfoEO::getImplementTime,implementTimeArr[0]); + q.lambda().le(DummyInventoryInfoEO::getImplementTime,implementTimeArr[1]); + }); + + if(CollectionUtils.isNotEmpty(bussDocumentLibraryIdList)){ + query.or(q -> { + q.lambda().in(DummyInventoryInfoEO::getBussDocumentLibraryId,bussDocumentLibraryIdList); + }); + } + }); + } + if(StringUtils.isNotEmpty(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())){ + String[] newCarTimeArr = dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().split(","); + + QueryWrapper phasedDetailsQueryWrap = new QueryWrapper<>(); + phasedDetailsQueryWrap.lambda().like(PhasedImplementationDetailsEO::getImplementationType,ImplementationTypeEnum.NEW_CAR_MODEL.getItemValue()); + phasedDetailsQueryWrap.lambda().ge(PhasedImplementationDetailsEO::getImplementationDate,newCarTimeArr[0]); + phasedDetailsQueryWrap.lambda().le(PhasedImplementationDetailsEO::getImplementationDate,newCarTimeArr[1]); + List bussDocumentLibraryIdList = this.phasedImplementationDetailsEOService.list(phasedDetailsQueryWrap) + .stream().map(PhasedImplementationDetailsEO::getBussDocumentLibraryId).collect(Collectors.toList()); + + queryWrapper.and(query -> { + query.and(q -> { + q.lambda().ge(DummyInventoryInfoEO::getXin1Che1Xing2Shi2Shi1Ri4Qi1,newCarTimeArr[0]); + q.lambda().le(DummyInventoryInfoEO::getXin1Che1Xing2Shi2Shi1Ri4Qi1,newCarTimeArr[1]); + }); + if(CollectionUtils.isNotEmpty(bussDocumentLibraryIdList)){ + query.or(q -> { + q.lambda().in(DummyInventoryInfoEO::getBussDocumentLibraryId,bussDocumentLibraryIdList); + }); + } + }); + } + Page page = new Page(dummyInventoryInfoEO.getPageNo(), dummyInventoryInfoEO.getPageSize()); IPage pageInfo = this.page(page, queryWrapper); //技术领域处理 // treeDict(dummyInventoryInfoEO, pageInfo); + List dummyInventoryInfoEOList = pageInfo.getRecords(); + log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime)); + //数据字典 + List sysDictItems = sysDictItemServiceImpl.selectItemsAll(); + //技术领域处理 + treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList,sysDictItems); + log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime)); + this.dataDicDispose(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut()); + log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime)); + treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList,sysDictItems); + // 数据处理 + this.disposeData(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut()); + //表头排序 + dummyInventoryInfoEOList = hearSort(orderBy, orderByField, dummyInventoryInfoEOList); return pageInfo; } @@ -634,18 +709,18 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl{ - if(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null && e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null){ - String e1xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1()); - String e2xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1()); + if(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1String() != null && e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1String() != null){ + String e1xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1String()); + String e2xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1String()); return comparator.compare(e1xin1Che1Xing2Shi2Shi1Ri4Qi,e2xin1Che1Xing2Shi2Shi1Ri4Qi); } return 0; }); }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ Collections.sort(dummyInventoryInfoEOList,(e1,e2)->{ - if(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null && e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null){ - String e1xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1()); - String e2xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1()); + if(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1String() != null && e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1String() != null){ + String e1xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e1.getXin1Che1Xing2Shi2Shi1Ri4Qi1String()); + String e2xin1Che1Xing2Shi2Shi1Ri4Qi = DateUtils.formatDate(e2.getXin1Che1Xing2Shi2Shi1Ri4Qi1String()); return comparator.compare(e2xin1Che1Xing2Shi2Shi1Ri4Qi,e1xin1Che1Xing2Shi2Shi1Ri4Qi); } return 0; @@ -656,18 +731,18 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl{ - if(e1.getImplementTime() != null && e2.getImplementTime() != null){ - String e1ImplementTime = DateUtils.formatDate(e1.getImplementTime()); - String e2ImplementTime = DateUtils.formatDate(e2.getImplementTime()); + if(e1.getImplementTimeString() != null && e2.getImplementTimeString() != null){ + String e1ImplementTime = DateUtils.formatDate(e1.getImplementTimeString()); + String e2ImplementTime = DateUtils.formatDate(e2.getImplementTimeString()); return comparator.compare(e1ImplementTime,e2ImplementTime); } return 0; }); }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ Collections.sort(dummyInventoryInfoEOList,(e1,e2)->{ - if(e1.getImplementTime() != null && e2.getImplementTime() != null){ - String e1ImplementTime = DateUtils.formatDate(e1.getImplementTime()); - String e2ImplementTime = DateUtils.formatDate(e2.getImplementTime()); + if(e1.getImplementTimeString() != null && e2.getImplementTimeString() != null){ + String e1ImplementTime = DateUtils.formatDate(e1.getImplementTimeString()); + String e2ImplementTime = DateUtils.formatDate(e2.getImplementTimeString()); return comparator.compare(e2ImplementTime,e1ImplementTime); } return 0; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java index da571bd3b..ae498ef27 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java @@ -81,9 +81,7 @@ public class ProjectLawsInventoryEOController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryEO, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = projectLawsInventoryEOService.page(page, queryWrapper); + IPage pageList = this.projectLawsInventoryEOService.queryPage(projectLawsInventoryEO,pageNo,pageSize,req); return Result.OK(pageList); } @@ -566,4 +564,11 @@ public class ProjectLawsInventoryEOController extends JeroController params) { this.projectLawsInventoryEOService.exportNotComplianList(response,request, params); } + + @AutoLog(value = "项目库-法规清单表-定版校验") + @ApiOperation(value="项目库-法规清单表-定版校验", notes="项目库-法规清单表-定版校验") + @GetMapping(value = "/finalizationVerify") + public Result finalizationVerify(@RequestParam Map params){ + return this.projectLawsInventoryEOService.finalizationVerify(params); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java index d2da8dcb3..e1fb9be12 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectStatusBoardController.java @@ -45,8 +45,8 @@ public class ProjectStatusBoardController { @ApiOperation(value="时间轴列表", notes="时间轴列表") @GetMapping(value = "/timelineList") @RequiresPermissions("ProjectStatusBoard:info") - public Result timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) { - List> result = iProjectStatusBoardService.timelineList(projectLibraryBase, req); + public Result timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req,@RequestParam("queryAllProject") boolean queryAllProject) { + List> result = iProjectStatusBoardService.timelineList(projectLibraryBase, req,queryAllProject); if(result==null) { return Result.error("未找到对应数据"); } @@ -85,8 +85,8 @@ public class ProjectStatusBoardController { // 导出excel文件 @RequestMapping(value = "/exportXls") - public void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase) { - this.iProjectStatusBoardService.exportXls(response,request, projectLibraryBase); + public void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase,@RequestParam("queryAllProject") boolean queryAllProject) { + this.iProjectStatusBoardService.exportXls(response,request, projectLibraryBase,queryAllProject); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 81f7d6d4b..ce184bbfd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -254,4 +254,8 @@ public class ProjectCertificationInventoryEO implements Serializable { /**认证类型*/ @ApiModelProperty(value = "认证类型") private String attestationType; + + /**一级责任领域**/ + @TableField(exist = false) + private String firstLevelDutyTerritory; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java index f739e73aa..045b3a717 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java @@ -530,4 +530,8 @@ public class ProjectLawsInventoryEO implements Serializable { /**流程类型展示名称*/ @TableField(exist = false) private String flowTypeName; + + /**一级责任领域**/ + @TableField(exist = false) + private String firstLevelDutyTerritory; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java index 4c2437e46..208d148fb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java @@ -304,4 +304,8 @@ public interface IProjectLawsInventoryEOService extends IService groupByVerifyStatus(List pliEos); + + IPage queryPage(ProjectLawsInventoryEO projectLawsInventoryEO, Integer pageNo, Integer pageSize, HttpServletRequest req); + + Result finalizationVerify(Map params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java index 3194b7e20..4c740a141 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectStatusBoardService.java @@ -22,7 +22,7 @@ public interface IProjectStatusBoardService { * @param req * @return */ - List> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req); + List> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req,boolean queryAllProject); List timeline(String startTime, String endTime); @@ -39,5 +39,5 @@ public interface IProjectStatusBoardService { * @param request * @param projectLibraryBase */ - void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase); + void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase,boolean queryAllProject); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 381b14bb4..b02fa2963 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -30,6 +30,7 @@ import com.jero.modules.document.entity.BussDocumentLibraryEO; import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; import com.jero.modules.document.service.IBussDocumentLibraryEOService; import com.jero.modules.dummy.enums.OrderEnum; +import com.jero.modules.enums.DictCodeEnum; import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.oss.entity.OSSFile; @@ -1415,6 +1416,36 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl sysDictItems = this.sysDictItemServiceImpl.selectItemsAll(); + List dutyTerritorys = new ArrayList<>(); + Map> firstLevelDTMap = this.sysDictItemServiceImpl.getFirstLevelSysDictItemByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue(), sysDictItems); + String[] firstLevelDTArr = projectCertificationInventoryEO.getFirstLevelDutyTerritory().split(","); + for (String firstLevelDT : firstLevelDTArr){ + if(CollectionUtils.isNotEmpty(firstLevelDTMap.get(firstLevelDT))){ + dutyTerritorys.addAll(firstLevelDTMap.get(firstLevelDT)); + } + } + if(CollectionUtils.isNotEmpty(dutyTerritorys)){ + dutyTerritoryStr = dutyTerritorys.stream().map(SysDictItem::getItemValue).distinct().collect(Collectors.joining(",")); + } + } + if (StringUtils.isNotEmpty(dutyTerritoryStr)) { + String finalDutyTerritoryStr = dutyTerritoryStr.replaceAll("\\*",""); + queryWrapper.and(query -> { + query.lambda().like(ProjectCertificationInventoryEO::getDutyTerritory, finalDutyTerritoryStr); + if(StringUtils.contains(finalDutyTerritoryStr,",")){ + String[] dutyTerritoryArr = finalDutyTerritoryStr.split(","); + for (String duty : dutyTerritoryArr) { + query.or(q -> { + q.like("duty_territory",duty); + }); + } + } + }); + } IPage pageList = this.page(page, queryWrapper); this.disposeData(pageList.getRecords(),cut); List records = this.hearSort(projectCertificationInventoryEO, pageList.getRecords()); @@ -1467,6 +1498,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl{ + String e1AttestationTypeName = (StringUtils.isNotEmpty(e1.getAttestationTypeName()) ? e1.getAttestationTypeName() : ""); + String e2AttestationTypeName = (StringUtils.isNotEmpty(e2.getAttestationTypeName()) ? e2.getAttestationTypeName() : ""); + return comparator.compare(e1AttestationTypeName,e2AttestationTypeName); + }); + }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ + Collections.sort(datas,(e1,e2)->{ + String e1AttestationTypeName = (StringUtils.isNotEmpty(e1.getAttestationTypeName()) ? e1.getAttestationTypeName() : ""); + String e2AttestationTypeName = (StringUtils.isNotEmpty(e2.getAttestationTypeName()) ? e2.getAttestationTypeName() : ""); + return comparator.compare(e2AttestationTypeName,e1AttestationTypeName); + }); + } + } + // WVTA ID wvtaId if(StringUtils.equals("wvtaId",orderByField)){ if(OrderEnum.POSITIVE.getValue().equals(orderBy)){ 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 2926875c6..38ac9efbf 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 @@ -40,6 +40,7 @@ import com.jero.modules.dummy.service.IDummyInventoryInfoEOService; import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl; import com.jero.modules.dummy.util.DeepCopyListUtil; import com.jero.modules.dummy.util.ListDiff; +import com.jero.modules.enums.DictCodeEnum; import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.vo.FeishuMsg2Vo; @@ -1454,6 +1455,38 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl{ + String e1AttestationType = StringUtils.isNotBlank(e1.getAttestationType()) ? e1.getAttestationType() : ""; + String e2AttestationType = StringUtils.isNotBlank(e2.getAttestationType()) ? e2.getAttestationType() : ""; + return comparator.compare(e1AttestationType,e2AttestationType); + }); + }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ + Collections.sort(result,(e1,e2)->{ + String e1AttestationType = StringUtils.isNotBlank(e1.getAttestationType()) ? e1.getAttestationType() : ""; + String e2AttestationType = StringUtils.isNotBlank(e2.getAttestationType()) ? e2.getAttestationType() : ""; + return comparator.compare(e2AttestationType,e1AttestationType); + }); + } + } + // 认证级别 attestationRank + if("attestationRank".equals(orderByField)){ + if(OrderEnum.POSITIVE.getValue().equals(orderBy)){ + Collections.sort(result,(e1, e2)->{ + String e1AttestationRank = StringUtils.isNotBlank(e1.getAttestationRank()) ? e1.getAttestationRank() : ""; + String e2AttestationRank = StringUtils.isNotBlank(e2.getAttestationRank()) ? e2.getAttestationRank() : ""; + return comparator.compare(e1AttestationRank,e2AttestationRank); + }); + }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ + Collections.sort(result,(e1,e2)->{ + String e1AttestationRank = StringUtils.isNotBlank(e1.getAttestationRank()) ? e1.getAttestationRank() : ""; + String e2AttestationRank = StringUtils.isNotBlank(e2.getAttestationRank()) ? e2.getAttestationRank() : ""; + return comparator.compare(e2AttestationRank,e1AttestationRank); + }); + } + } // WVTA ID wvtaId if ("wvtaId".equals(orderByField)) { if (OrderEnum.POSITIVE.getValue().equals(orderBy)) { @@ -13364,6 +13397,117 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl queryPage(ProjectLawsInventoryEO projectLawsInventoryEO, Integer pageNo, Integer pageSize, HttpServletRequest req) { + String dutyTerritoryStr = ""; + if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDutyTerritory())) { + dutyTerritoryStr = projectLawsInventoryEO.getDutyTerritory(); + projectLawsInventoryEO.setDutyTerritory(null); + } + + // 根据一级责任领域(统计节点),查询该一级责任领域下所有子责任领域的法规清单数据。 + if(StringUtils.isNotEmpty(projectLawsInventoryEO.getFirstLevelDutyTerritory())){ + List sysDictItems = this.sysDictItemServiceImpl.selectItemsAll(); + List dutyTerritorys = new ArrayList<>(); + Map> firstLevelDTMap = this.sysDictItemServiceImpl.getFirstLevelSysDictItemByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue(), sysDictItems); + String[] firstLevelDTArr = projectLawsInventoryEO.getFirstLevelDutyTerritory().split(","); + for (String firstLevelDT : firstLevelDTArr){ + if(CollectionUtils.isNotEmpty(firstLevelDTMap.get(firstLevelDT))){ + dutyTerritorys.addAll(firstLevelDTMap.get(firstLevelDT)); + } + } + if(CollectionUtils.isNotEmpty(dutyTerritorys)){ + dutyTerritoryStr = dutyTerritorys.stream().map(SysDictItem::getItemValue).distinct().collect(Collectors.joining(",")); + } + } + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryEO, req.getParameterMap()); + queryWrapper.orderByDesc("create_time","serial_number"); + + if (StringUtils.isNotEmpty(dutyTerritoryStr)) { + String finalDutyTerritoryStr = dutyTerritoryStr.replaceAll("\\*",""); + queryWrapper.and(query -> { + query.lambda().like(ProjectLawsInventoryEO::getDutyTerritory, finalDutyTerritoryStr); + if(StringUtils.contains(finalDutyTerritoryStr,",")){ + String[] dutyTerritoryArr = finalDutyTerritoryStr.split(","); + for (String duty : dutyTerritoryArr) { + query.or(q -> { + q.like("duty_territory",duty); + }); + } + } + }); + } + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode()); + if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue()) + && isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue()) + && isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue()) + && isProjectRole != Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())){ + // 创建查询权限 + this.createQueryPermission(isProjectRole,currentUser,queryWrapper); + } + + Page page = new Page(pageNo, pageSize); + IPage pageList = this.page(page, queryWrapper); + List result = pageList.getRecords(); + if (isProjectRole == Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())) { + //查当前用户Viewer对应责任领域 + List dutyTerritoryList = this.projectUserDutyTerritoryService.queryDutyTerritoryByUserId(currentUser.getId()); + if (ObjectUtils.isNotEmpty(dutyTerritoryList)) { + result = result.stream().filter(e -> dutyTerritoryList.contains(e.getDutyTerritory())).collect(Collectors.toList()); + } else { + result = new ArrayList<>(); + } + } + this.dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut()); + this.dataDictDispose(result,projectLawsInventoryEO.getCut()); + //表头排序 + result = this.hearSort(projectLawsInventoryEO, result); + return pageList; + } + + @Override + public Result finalizationVerify(Map params) { + boolean result = false; // 返回true,可以定版,返回false 不能定版 + String projectLibraryId = (String) params.get("projectLibraryId"); + if(StringUtils.isEmpty(projectLibraryId)){ + throw new JeroBootException("项目库id不能为空,请检查!"); + } + QueryWrapper pliQueryWrap = new QueryWrapper<>(); + pliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId); + List pliEoList = this.list(pliQueryWrap); + if(CollectionUtils.isNotEmpty(pliEoList)){ + for (ProjectLawsInventoryEO pliEo : pliEoList) { + String designFlowStatus = pliEo.getDesignFlowStatus(); + String verifyFlowStatus = pliEo.getVerifyFlowStatus(); + boolean designFlowStatusFlag = ( + StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()) + || StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()) + || StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.CONFORMITY.getValue()) + || StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.TO_TRACK.getValue()) + || StringUtils.equals(designFlowStatus,ComplianceFlowStatusEnum.UNINVOLVED.getValue()) + ); + boolean verifyFlowStatusFlag = ( + StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()) + || StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue()) + || StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.CONFORMITY.getValue()) + || StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.INCONFORMITY.getValue()) + || StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.TO_TRACK.getValue()) + || StringUtils.equals(verifyFlowStatus,ComplianceFlowStatusEnum.UNINVOLVED.getValue()) + ); + if(designFlowStatusFlag && verifyFlowStatusFlag){ + result = true; + }else { + result = false; + break; + } + } + } + return Result.OK(result); + } + @Override public Map>> queryDutyPersonByProjectId(Map params) { Map>> result = new HashMap<>(); 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 71dd57ef4..0e3d4a4fc 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 @@ -1518,7 +1518,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> taskToConfirmMapList = this.projectLawsInventoryEOService.getTaskToConfirmStatistics(projectLawsInventoryEOList); + int taskAffirmStatusCount = 0; + if(CollectionUtils.isNotEmpty(taskToConfirmMapList)){ + //taskAffirmStatusCount + for (Map taskToConfirm : taskToConfirmMapList) { + taskAffirmStatusCount += (int) taskToConfirm.get("taskAffirmStatusCount"); + } + } taskToConfirmMap.put("taskToConfirmMapList",taskToConfirmMapList); + taskToConfirmMap.put("count",taskAffirmStatusCount); result.put("taskToConfirmMap",taskToConfirmMap); //当前项目状态统计 获取一个 最差的结果 统计的数据 就是studio看到的数据。 @@ -1549,12 +1557,26 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> designComplianceMapList = this.projectLawsInventoryEOService.getDesignComplianceStatistice(projectLawsInventoryEOList); + int designFlowTaskStatusCount = 0; + if(CollectionUtils.isNotEmpty(designComplianceMapList)){ + for (Map designCompliance : designComplianceMapList) { + designFlowTaskStatusCount += (int) designCompliance.get("designFlowTaskStatusCount"); + } + } designComplianceMap.put("designComplianceMapList",designComplianceMapList); + designComplianceMap.put("count",designFlowTaskStatusCount); result.put("designComplianceMap",designComplianceMap); //验证符合性 List> verifyComplianceMapList = this.projectLawsInventoryEOService.getVerifyComplianceStatistice(projectLawsInventoryEOList); + int verifyFlowTaskStatusCount = 0; + if(CollectionUtils.isNotEmpty(verifyComplianceMapList)){ + for (Map verifyCompliance : verifyComplianceMapList) { + verifyFlowTaskStatusCount += (int) verifyCompliance.get("verifyFlowTaskStatusCount"); + } + } verifyComplianceMap.put("verifyComplianceMapList",verifyComplianceMapList); + verifyComplianceMap.put("count",verifyFlowTaskStatusCount); result.put("verifyComplianceMap",verifyComplianceMap); //认证进度统计 @@ -1594,12 +1616,26 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> rzTaskToConfirmMapList = this.projectCertificationInventoryEOService.getTaskToConfirmStatistics(pciEoList); + int taskAffirmStatusCount = 0; + if(CollectionUtils.isNotEmpty(rzTaskToConfirmMapList)){ + for (Map rzTaskToConfirm : rzTaskToConfirmMapList) { + taskAffirmStatusCount += (int) rzTaskToConfirm.get("taskAffirmStatusCount"); + } + } rzTaskToConfirmMap.put("rzTaskToConfirmMapList",rzTaskToConfirmMapList); + rzTaskToConfirmMap.put("count",taskAffirmStatusCount); result.put("rzTaskToConfirmMap",rzTaskToConfirmMap); // Pre-Homo 统计 List> prehomoMapList = this.projectCertificationInventoryEOService.getPrehomoStatistice(pciEoList); + int preHomoCount = 0; + if (CollectionUtils.isNotEmpty(prehomoMapList)) { + for (Map prehomo : prehomoMapList) { + preHomoCount += (int) prehomo.get("taskAffirmStatusCount"); + } + } prehomoMap.put("prehomoMapList",prehomoMapList); + prehomoMap.put("count",preHomoCount); result.put("prehomoMap",prehomoMap); // 认证进度 统计 @@ -1609,6 +1645,28 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl all : allMapList) { + allCount += (int) all.get("certificationProgressCount"); + } + } + int carCount = 0; + if(CollectionUtils.isNotEmpty(carMapList)){ + for (Map car : carMapList) { + carCount += (int) car.get("certificationProgressCount"); + } + } + int partCount = 0; + if(CollectionUtils.isNotEmpty(partMapList)){ + for (Map part : partMapList) { + partCount += (int) part.get("certificationProgressCount"); + } + } + + certificationProgressMap.put("allCount",allCount);// 全部 + certificationProgressMap.put("carCount",carCount);// 整车 + certificationProgressMap.put("partCount",partCount);// 零部件 result.put("certificationProgressMap",certificationProgressMap); } @@ -1816,6 +1874,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> dataList,Map params) { + String orderByField = (String) params.get("orderByField"); + String orderBy = (String) params.get("orderBy"); + if(CollectionUtils.isNotEmpty(dataList) && StringUtils.isNotEmpty(orderByField) && StringUtils.isNotEmpty(orderBy)){ + Collator comparator = Collator.getInstance(Locale.CHINESE); + Collections.sort(dataList,(data1,data2)->{ + String param1 = ""; + String param2 = ""; + // 一级责任领域名称 + if("dutyTerritoryName".equals(orderByField)){ + param1 = StringUtils.isNotEmpty((String) data1.get("dutyTerritoryName")) ? (String) data1.get("dutyTerritoryName") : ""; + param2 = StringUtils.isNotEmpty((String) data2.get("dutyTerritoryName")) ? (String) data2.get("dutyTerritoryName") : ""; + } + // 数量 + if("amount".equals(orderByField)){ + param1 = StringUtils.isNotEmpty(String.valueOf(data1.get("amount"))) ? String.valueOf(data1.get("amount")) : ""; + param2 = StringUtils.isNotEmpty(String.valueOf(data2.get("amount"))) ? String.valueOf(data2.get("amount")) : ""; + } + // 占比 + if("percentage".equals(orderByField)){ + param1 = StringUtils.isNotEmpty((String) data1.get("percentage")) ? (String) data1.get("percentage") : ""; + param2 = StringUtils.isNotEmpty((String) data2.get("percentage")) ? (String) data2.get("percentage") : ""; + } + if(OrderEnum.POSITIVE.getValue().equals(orderBy)){ + return comparator.compare(param1,param2); + }else if(OrderEnum.REVERSE.getValue().equals(orderBy)){ + return comparator.compare(param2,param1); + } + return 0; + }); + } + } + @Override public void exportProjectDetailsStatisticsGroupByTerritoryXls(HttpServletResponse response, HttpServletRequest request, Map params) { Map projectDetailsStatisticsGroupByTerritory = getProjectDetailsStatisticsGroupByTerritory(params); @@ -1990,7 +2088,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) { + public List> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req,boolean queryAllProject) { if(StringUtils.isNotBlank(projectLibraryBase.getProjectName())){ String s = projectLibraryBase.getProjectName().replaceAll("\\*", ""); projectLibraryBase.setProjectName(s); @@ -107,6 +111,13 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //项目库信息 List projectLibraryBaseList = projectLibraryBaseService.getList(projectLibraryBase); + if(!queryAllProject){ + // 如果不是查询所有项目,只查询主项目 + projectLibraryBaseList = projectLibraryBaseList.stream().filter(plbEo -> { + boolean flag = (StringUtils.isEmpty(plbEo.getParentId()) || StringUtils.equals(plbEo.getProjectVersion(),"00")); + return flag; + }).collect(Collectors.toList()); + } List> list = new ArrayList<>(); List> result = new ArrayList<>(); @@ -538,12 +549,25 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService @Override - public void exportXls(HttpServletResponse response, HttpServletRequest request,ProjectLibraryBase projectLibraryBase) { + public void exportXls(HttpServletResponse response, HttpServletRequest request,ProjectLibraryBase projectLibraryBase,boolean queryAllProject) { + long startTime = System.currentTimeMillis(); String fileName = ""; String cut = projectLibraryBase.getCut(); OutputStream ops = null; HSSFWorkbook workbook = new HSSFWorkbook(); + + if(StringUtils.isNotBlank(projectLibraryBase.getProjectName())){ + String s = projectLibraryBase.getProjectName().replaceAll("\\*", ""); + projectLibraryBase.setProjectName(s); + } List plbEoList = this.projectLibraryBaseService.getList(projectLibraryBase); + if(!queryAllProject){ + // 如果不是查询所有项目,只查询主项目 + plbEoList = plbEoList.stream().filter(plbEo -> { + boolean flag = (StringUtils.isEmpty(plbEo.getParentId()) || StringUtils.equals(plbEo.getProjectVersion(),"00")); + return flag; + }).collect(Collectors.toList()); + } List dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region"); for (ProjectLibraryBase libraryBase : plbEoList) { targetMarket(projectLibraryBase, dictItemList, libraryBase); @@ -552,10 +576,49 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService List pciEoList = this.projectCertificationInventoryEOService.list(); List ptpEoList = this.projectTaskPlanningService.list(); List pmEoList = this.paramsManifestEOService.list(); + log.info("一阶段消耗时间:" + (System.currentTimeMillis() - startTime)); List pcmEoList = this.paramsCollectManifestEOService.getList(null); - this.exportCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList); - this.exportOverviewCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList); + log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime)); + +// this.exportCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList); +// this.exportOverviewCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList); + + HSSFSheet corssProjectProgressSheet = createCorssProjectProgressSheet(workbook, projectLibraryBase); + HSSFSheet overviewCrossProjectProgressSheet = this.createOverviewCrossProjectProgressSheet(workbook, projectLibraryBase); + CellStyle cellStyleTitle = workbook.createCellStyle(); + cellStyleTitle.setAlignment(HorizontalAlignment.CENTER); + cellStyleTitle.setVerticalAlignment(VerticalAlignment.CENTER); + + // 多线程代码 + // 创建线程一 + List finalPlbEoList = plbEoList; + Thread thread1 = new Thread(new Runnable() { + @Override + public void run() { + exportCrossProjectProgressSetData(finalPlbEoList, corssProjectProgressSheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList); + } + }); + + // 创建线程二 + Thread thread2 = new Thread(new Runnable() { + @Override + public void run() { + exportOverviewCrossProjectProgressSetData(finalPlbEoList, overviewCrossProjectProgressSheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList,cellStyleTitle); + } + }); + + // 启动线程一和线程二 + thread1.start(); + thread2.start(); + + // 等待线程一和线程二执行完毕 + try { + thread1.join(); + thread2.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } try { response.setHeader("Content-Disposition", "attachment; filename=" + fileName); @@ -573,6 +636,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService }finally { IOUtils.closeQuietly(ops); } + log.info("总消耗时间:" + (System.currentTimeMillis() - startTime)); } /** @@ -586,7 +650,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService * @param pcmEoList * @param ptpEoList */ - private void exportCrossProjectProgress(HSSFWorkbook workbook, + private void exportCrossProjectProgress(HSSFSheet sheet, ProjectLibraryBase projectLibraryBase, List plbEoList, List pliEoList, @@ -594,6 +658,11 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService List pmEoList, List pcmEoList, List ptpEoList) { + this.exportCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList); + } + + @NotNull + private HSSFSheet createCorssProjectProgressSheet(HSSFWorkbook workbook, ProjectLibraryBase projectLibraryBase) { String cut = projectLibraryBase.getCut(); String sheetName = "项目进度"; String firstTitle = "项目," + @@ -682,8 +751,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService secondRowCell.setCellValue(secondTitleArr[i-1]); } } - - this.exportCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList); + return sheet; } /** @@ -707,6 +775,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService List ptpEoList) { int dataIndex = 2; for (ProjectLibraryBase plbEo : plbEoList) { + long startTime = System.currentTimeMillis(); Row dataRow = sheet.createRow(dataIndex); dataRow.createCell(0).setCellValue(plbEo.getShowName()); @@ -900,6 +969,8 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService dataRow.createCell(55).setCellValue(parameterCollectingPercentageStr + percentSign); dataRow.createCell(56).setCellValue(certificationSubmissionStr); dataIndex ++; + + log.info("11111处理"+ dataIndex +"个项目消耗时间:" + (System.currentTimeMillis() - startTime)); } } @@ -914,14 +985,19 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService * @param pcmEoList * @param ptpEoList */ - private void exportOverviewCrossProjectProgress(HSSFWorkbook workbook, + private void exportOverviewCrossProjectProgress(HSSFSheet sheet, ProjectLibraryBase projectLibraryBase, List plbEoList, List pliEoList, List pciEoList, List pmEoList, List pcmEoList, - List ptpEoList) { + List ptpEoList, + CellStyle cellStyleTitle) { + this.exportOverviewCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList,cellStyleTitle); + } + + public HSSFSheet createOverviewCrossProjectProgressSheet(HSSFWorkbook workbook, ProjectLibraryBase projectLibraryBase){ String cut = projectLibraryBase.getCut(); String sheetName = "项目进度概览"; String firstTitle = "项目,R&H Studio,法规符合性管理,认证活动管理"; @@ -975,7 +1051,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService secondRowCell.setCellValue(secondTitleArr[i]); } } - this.exportOverviewCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList,cellStyleTitle); + return sheet; } /** @@ -1001,6 +1077,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService CellStyle cellStyleTitle) { int dataIndex = 2; for (ProjectLibraryBase plbEo : plbEoList) { + long startTime = System.currentTimeMillis(); List ptpEoListTemp = ptpEoList.stream().filter(ptpEo -> StringUtils.equals(ptpEo.getProjectId(), plbEo.getId())).collect(Collectors.toList()); String legalTaskConfirmationStr = ""; String designDeadlineStr = ""; @@ -1131,6 +1208,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService } } dataIndex += 2; + log.info("22222处理"+ dataIndex +"个项目消耗时间:" + (System.currentTimeMillis() - startTime)); } } diff --git a/jero-web/src/App.vue b/jero-web/src/App.vue index 3439653a2..d4bd69fbf 100644 --- a/jero-web/src/App.vue +++ b/jero-web/src/App.vue @@ -180,18 +180,18 @@ } .ant-table-column-title { - font-weight: bold!important; + font-weight: bold !important; } .ant-table-thead > tr > th { - background: #f3f6f6!important; - padding-top: 12px!important; - padding-bottom: 12px!important; + background: #f3f6f6 !important; + padding-top: 12px !important; + padding-bottom: 12px !important; } .ant-table-tbody > tr > td { - padding-top: 12px!important; - padding-bottom: 12px!important; + padding-top: 12px !important; + padding-bottom: 12px !important; } .ant-tooltip-inner { @@ -206,4 +206,13 @@ .ant-menu-inline-collapsed-tooltip a { color: #333 !important; } + + .page .ant-select-selection--single { + height: 32px !important; + line-height: 32px !important; + } + .page .ant-select-selection__rendered{ + height: 32px !important; + line-height: 32px !important; + } \ No newline at end of file diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8c14f1ee7..712b2e66c 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -735,7 +735,7 @@ module.exports = { regulatoryTaskConfirmation: 'Regulation Task Confirmed ', certificationStart: 'Homo Completed ', preHomoCompletion: 'Pre-Homo Completed ', - certificationEnd: 'Homo Approved ', + certificationEnd: 'Homo KO', directoryName: 'Catalogue Name', batch: 'Batch', uploadTime: 'Upload Time', @@ -1447,12 +1447,12 @@ module.exports = { select:'select', onlyDataWithProcessStatusDeleted:'Only data with process status of list to be released and approved can be deleted', complianceCertificationProgram:'Compliance & Homologation Program', - listPublishing:'List Release', - responsibilityConfirmation:'Responsibility Confirm', - designVerification:'Design Check', - getStarted:'Pre-Homo Starts', - certificationStartOne:'Homo Starts', - verificationAndVerification:'Validation Check', + listPublishing:'List Publishing', + responsibilityConfirmation:'Responsibility Confirmation', + designVerification:'Design Verification', + getStarted:'Get Started', + certificationStartOne:'Certification Start', + verificationAndVerification:'Verification And Verification', projectInterfacePersonRegulationEngineerSetting:'Project Interface Person - Regulation Engineer Setting', projectInterfacePersonCertificationEngineerSetting:'Project Interface Person - Certification Engineer Setting', registrationnumber:'Product registration number', @@ -1705,7 +1705,7 @@ module.exports = { softwareversion:'Software version', returntofill:'Return to fill', thereAreCurrentlyNoRegulationsToHandle:'No regulations to be processed now', - certificationSubmission:'Application Submitted', + certificationSubmission:'Certification Submission', upgradecompletion:'Upgrade completion', implementedupgrade:'Whether the implemented upgrade is consistent with the record', numberofvehicles:'Number of vehicles that have completed upgrades', @@ -1827,4 +1827,8 @@ module.exports = { proportion:'Proportion', projectProgressStatistics:'Project Progress Statistics', GRPSystemProjectProgressStatistics:'GRP system project progress statistics', + statisticalNodes:'Statistical Nodes', + proportionWithInTheAreaOfResponsibility:'Proportion within the area of responsibility', + contentsearch:'Content Search', + masterProject:'Master Project', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index f6bab58b0..f7055ac72 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1928,4 +1928,8 @@ module.exports = { proportion:'占比', projectProgressStatistics:'项目进度统计', GRPSystemProjectProgressStatistics:'GRP系统项目进度统计', + statisticalNodes:'统计节点', + proportionWithInTheAreaOfResponsibility:'责任领域内占比', + contentsearch:'内容搜索', + masterProject:'主项目', } \ No newline at end of file diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 0a1609d71..afc0eb21d 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -5,6 +5,7 @@ :mode="isSingleChoice?'':'multiple'" class="itemModelStand-input" show-search + :allowClear="isSingleChoice ? true : false" :label-in-value="isSingleChoice ? false:true" :value="selectValue" :placeholder="$t('PleaseSelect')+query.db_field_txt" @@ -147,6 +148,8 @@ let username = [] if (this.selectValue.length > 0) { this.selectValue.forEach(res => { + let reg = /[\t\r\f\n\s]*/g + res.label = res.label.replace(reg, '') id.push(res.key) username.push(res.label) }) diff --git a/jero-web/src/views/documentManage/tags/dialog/DicList.vue b/jero-web/src/views/documentManage/tags/dialog/DicList.vue index 41307da80..ed37d66fb 100644 --- a/jero-web/src/views/documentManage/tags/dialog/DicList.vue +++ b/jero-web/src/views/documentManage/tags/dialog/DicList.vue @@ -75,6 +75,9 @@ + + + @@ -139,6 +142,14 @@ { min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' }, { validator: this.test } ], + statNode:[ + { required: true, message: this.$t('statisticalNodes')+ this.$t('cannotEmpty'), trigger: 'blur' }, + { + max: 100, + message: this.$t('statisticalNodes') + this.$t('cannotExceed') + 100 + this.$t('Characters'), + trigger: 'blur' + } + ], valueType:[ { required: true, message: this.$t('type') + this.$t('cannotEmpty'), trigger: 'change' }, ], diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 1b8c32b24..8caae84e1 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -314,9 +314,22 @@ -- -
- {{$t('total')+' '+this.dataSource.length+' '+ $t('strip')}} +
+
+ + +
@@ -403,6 +416,9 @@ orderBy: '1', istable: true, orderByField: '', + pageNo: 1, + pageSize: 50, + total: 0, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download', dataSourceFile: [], @@ -424,7 +440,7 @@ url: { addModelList: '/dummy/dummyInventoryInfoEO/queryPageDummy', queryConditionInventory: '/dummy/dummyInventoryInfoEO/queryConditionInventory', - list: '/dummy/dummyInventoryInfoEO/list', + list: '/dummy/dummyInventoryInfoEO/page', addModel: '/dummy/dummyInventoryInfoEO/add', editModel: '/dummy/dummyInventoryInfoEO/edit', deleteBatch: '/dummy/dummyInventoryInfoEO/deleteBatch', @@ -1231,6 +1247,15 @@ } }) }, + onChangeSize(page, pageSize) { + this.pageNo = page + this.getList() + }, + SizeChange(page, pageSize) { + this.pageNo = 1 + this.pageSize = pageSize + this.getList() + }, getList() { if (this.queryParam.xin1Che1Xing2Shi2Shi1Ri4Qi1String && this.queryParam.xin1Che1Xing2Shi2Shi1Ri4Qi1String instanceof Array) { this.queryParam.xin1Che1Xing2Shi2Shi1Ri4Qi1String = this.queryParam.xin1Che1Xing2Shi2Shi1Ri4Qi1String.join(',') @@ -1243,12 +1268,21 @@ ...this.queryParamQuery, orderBy: this.orderBy, orderByField: this.orderByField, - dummyInventoryBaseId: this.$route.query.id + dummyInventoryBaseId: this.$route.query.id, + pageNo: this.pageNo, + pageSize: this.pageSize } this.loading = true getAction(this.url.list, query).then((res) => { if (res.success) { - this.dataSource = res.result || [] + if (res.result.current > 1 && res.result.records.length == 0) { + this.pageNo = 1 + this.getList() + return + } + this.dataSource = res.result.records || [] + this.total = res.result.total + // this.dataSource = res.result || [] if (this.dataSource.length == 0) { this.$nextTick(() => { let anttablebody = document.getElementsByClassName('ant-table-body') @@ -1727,6 +1761,11 @@ padding-left: 16px!important; border-right: 1px solid #e8e8e8; } + .page { + text-align: right; + margin-top: 20px; + margin-bottom: 20px; + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationActivity.vue b/jero-web/src/views/projectManagement/components/certificationActivity.vue index 499e9893f..7450f2c6e 100644 --- a/jero-web/src/views/projectManagement/components/certificationActivity.vue +++ b/jero-web/src/views/projectManagement/components/certificationActivity.vue @@ -2,14 +2,24 @@
+
+ {{$t('totalTable')+' : '+mainLeftNum}} +
+
+ {{$t('totalTable')+' : '+mainRightNum}} +
+
+ {{$t('totalTable')+' : '+mainBottomNum}} +
{{$t('whole')}} @@ -50,8 +60,12 @@ url: { getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics' }, - certificationProgressMap:{}, - num:'0', + certificationProgressMap: {}, + num: '0', + mainLeftNum: 0, + mainRightNum: 0, + mainBottomNum: 0, + long: localStorage.getItem('language') || 'zh-cn' } }, mounted() { @@ -92,6 +106,7 @@ dataEcharts(dataSource) { let data = [] let color = [] + this.mainLeftNum = 0 if (dataSource && dataSource.length > 0) { this.dataSource = [{}] dataSource.forEach(res => { @@ -100,7 +115,7 @@ value: res.taskAffirmStatusCount, name: this.$t('notLaunch'), color: '#00B3BE', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#00B3BE') } else if (res.taskAffirmStatus == 'List to confirm') { @@ -108,7 +123,7 @@ value: res.taskAffirmStatusCount, name: this.$t('listToConfirm'), color: '#FDA71C', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#FDA71C') } else if (res.taskAffirmStatus == 'Accepted') { @@ -116,7 +131,7 @@ value: res.taskAffirmStatusCount, name: this.$t('accept'), color: '#26BC4B', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#26BC4B') } else if (res.taskAffirmStatus == 'Rejected') { @@ -124,17 +139,19 @@ value: res.taskAffirmStatusCount, name: this.$t('refuse'), color: '#E83030', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#E83030') } + this.mainLeftNum += res.taskAffirmStatusCount }) } this.getEcharts('main-left', this.$t('certificationTaskConfirmation'), color, data) }, - mainRightEcharts(dataSource){ + mainRightEcharts(dataSource) { let data = [] let color = [] + this.mainRightNum = 0 if (dataSource && dataSource.length > 0) { this.dataSource = [{}] dataSource.forEach(res => { @@ -143,7 +160,7 @@ value: res.taskAffirmStatusCount, name: this.$t('notLaunch'), color: '#00B3BE', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#00B3BE') } else if (res.taskAffirmStatus == 'List to confirm') { @@ -151,7 +168,7 @@ value: res.taskAffirmStatusCount, name: this.$t('listToConfirm'), color: '#FDA71C', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#FDA71C') } else if (res.taskAffirmStatus == 'Review and pass') { @@ -159,7 +176,7 @@ value: res.taskAffirmStatusCount, name: this.$t('reviewAndPass'), color: '#26BC4B', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#26BC4B') } else if (res.taskAffirmStatus == 'Review and return') { @@ -167,17 +184,19 @@ value: res.taskAffirmStatusCount, name: this.$t('reviewAndReturn'), color: '#E83030', - status:res.taskAffirmStatus + status: res.taskAffirmStatus }) color.push('#E83030') } + this.mainRightNum += res.taskAffirmStatusCount }) } this.getEcharts('main-right', this.$t('preHomoFlow'), color, data) }, - mainBottomEcharts(dataSource){ + mainBottomEcharts(dataSource) { let data = [] let color = [] + this.mainBottomNum = 0 if (dataSource && dataSource.length > 0) { dataSource.forEach(res => { if (res.certificationProgress == 'Not start') { @@ -185,7 +204,7 @@ value: res.certificationProgressCount, name: this.$t('Notatthe'), color: '#00B3BE', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#00B3BE') } else if (res.certificationProgress == 'In progress') { @@ -193,7 +212,7 @@ value: res.certificationProgressCount, name: this.$t('inProgress'), color: '#FDA71C', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#FDA71C') } else if (res.certificationProgress == 'Test passed') { @@ -201,7 +220,7 @@ value: res.certificationProgressCount, name: this.$t('experimentPassed'), color: '#26BC4B', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#26BC4B') } else if (res.certificationProgress == 'Test failed') { @@ -209,34 +228,35 @@ value: res.certificationProgressCount, name: this.$t('experimentFailed'), color: '#E83030', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#E83030') - }else if (res.certificationProgress == 'Component report not submitted') { + } else if (res.certificationProgress == 'Component report not submitted') { data.push({ value: res.certificationProgressCount, name: this.$t('componentReportNotSubmitted'), color: '#FDA71C', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#FDA71C') - }else if (res.certificationProgress == 'Component report submitted') { + } else if (res.certificationProgress == 'Component report submitted') { data.push({ value: res.certificationProgressCount, name: this.$t('componentReportSubmitted'), color: '#6FD682', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#6FD682') - }else if (res.certificationProgress == 'Component report has been stored') { + } else if (res.certificationProgress == 'Component report has been stored') { data.push({ value: res.certificationProgressCount, name: this.$t('componentReportHasBeenStored'), color: '#26BC4B', - status:res.certificationProgress + status: res.certificationProgress }) color.push('#26BC4B') } + this.mainBottomNum += res.certificationProgressCount }) } this.getEcharts('main-bottom', this.$t('CertificationProgress'), color, data) @@ -249,14 +269,14 @@ }, tooltip: { trigger: 'item', - textStyle : { - fontWeight : 'normal', - fontSize : 14, - color:'#040B29', - fontFamily:'BlueSkyNoto', + textStyle: { + fontWeight: 'normal', + fontSize: 14, + color: '#040B29', + fontFamily: 'BlueSkyNoto' }, - formatter: function (parms) { - let str = parms.marker+' '+parms.data.name+'        '+parms.data.value+' ('+parms.percent+'%)' + formatter: function(parms) { + let str = parms.marker + ' ' + parms.data.name + '        ' + parms.data.value + ' (' + parms.percent + '%)' return str } }, @@ -300,11 +320,11 @@ query.operatorType = 'queryPrehomoStatistics' query.status = params.data.status } else if (params.seriesName === this.$t('CertificationProgress')) { - if (this.num == '0'){ + if (this.num == '0') { query.operatorType = 'queryCertificationProgressStatisticsAll' - }else if(this.num == '1'){ + } else if (this.num == '1') { query.operatorType = 'queryCertificationProgressStatisticsCar' - }else if(this.num == '2'){ + } else if (this.num == '2') { query.operatorType = 'queryCertificationProgressStatisticsPart' } query.status = params.data.status @@ -327,12 +347,12 @@ boxContentTextText[num].classList.add('box-content-text-color') } this.num = num - if (num == 0){ - this.mainBottomEcharts( this.certificationProgressMap.allMapList || []) - }else if(num == 1){ - this.mainBottomEcharts( this.certificationProgressMap.carMapList || []) - }else if(num == 2){ - this.mainBottomEcharts( this.certificationProgressMap.partMapList || []) + if (num == 0) { + this.mainBottomEcharts(this.certificationProgressMap.allMapList || []) + } else if (num == 1) { + this.mainBottomEcharts(this.certificationProgressMap.carMapList || []) + } else if (num == 2) { + this.mainBottomEcharts(this.certificationProgressMap.partMapList || []) } } } @@ -350,6 +370,7 @@ .box-content-left { width: calc(50% - 10px); height: 346px; + position: relative; border: 2px #eff1f3 solid; border-radius: 6px; margin-top: 4px; @@ -365,6 +386,7 @@ .box-content-right { width: calc(50% - 10px); height: 346px; + position: relative; border: 2px #eff1f3 solid; border-radius: 6px; margin-top: 4px; @@ -384,6 +406,7 @@ position: relative; border-radius: 6px; margin-top: 20px; + overflow: hidden; .box-content-text { height: 30px; @@ -429,4 +452,27 @@ } } + .total-text { + position: absolute; + right: 28px; + top: 19px; + font-size: 18px; + font-weight: bold; + } + + .total-text-text { + position: absolute; + right: 28px; + top: 21px; + font-size: 18px; + font-weight: bold; + } + + .total-text-text-cntop { + right: 180px; + } + + .total-text-text-entop { + right: 290px; + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 1d40ff894..713cccc45 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -43,17 +43,39 @@
- -
-
- {{ $t('standardNo') }} -
- -
-
@@ -62,10 +84,10 @@ - - - - + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + @@ -537,7 +559,7 @@ export default { name: 'index', - props: ['isDisplayNum'], + props: ['isDisplayNum','areaOfResponsibility'], mixins: [ResizeColumnProvide, ResizeHeader], components: { globalAdvancedQuery, @@ -827,16 +849,19 @@ toDoIds: [], toDoNotConditions: [], userInfoQuery: {}, - DeliverableTreeList: [] + DeliverableTreeList: [], + firstLevelDutyTerritoryList:[], } }, mounted() { // this.getList() + this.getFirstLevelDutyTerritory() this.long = localStorage.getItem('language') || 'zh-cn' this.loading = true this.userInfoQuery = this.userInfo() - if (this.areaOfResponsibility && this.areaOfResponsibility.dutyTerritory) { - this.queryParam.dutyTerritory = this.areaOfResponsibility.dutyTerritory + console.log(this.areaOfResponsibility) + if (this.areaOfResponsibility && this.areaOfResponsibility.dutyTerritoryName) { + this.queryParam.firstLevelDutyTerritory = this.areaOfResponsibility.dutyTerritoryName this.queryParam = { ...this.queryParam } } this.getProcessStatus() @@ -884,6 +909,15 @@ }, methods: { ...mapGetters(['userInfo']), + getFirstLevelDutyTerritory() { + getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => { + if (res.success) { + this.firstLevelDutyTerritoryList = res.result + } else { + this.firstLevelDutyTerritoryList = [] + } + }) + }, addConfigurationClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.$refs.addConfigurationRef.getData(JSON.parse(JSON.stringify(this.selectedRowKeys))) @@ -1045,9 +1079,9 @@ } this.dataSource = res.result.records || [] this.dataSource.forEach(value => { - if (value.flowStatusName =='清单待校核'){ + if (value.flowStatusName == '清单待校核') { value.flowStatusName = '任务待发起' - }else if(value.flowStatusName =='List to be checked'){ + } else if (value.flowStatusName == 'List to be checked') { value.flowStatusName = 'The task is to be initiated' } }) @@ -2365,6 +2399,7 @@ .page { text-align: right; margin-top: 20px; + margin-bottom: 20px; } .operator-text-left { @@ -2561,10 +2596,12 @@ background: #dbf6e2; color: #26BD4B; } - .componentColor{ + + .componentColor { background: #EDFCEF; color: #6FD682; } + .nonConformityColor { background: #f3dddd; color: #E83030; diff --git a/jero-web/src/views/projectManagement/components/complianceCertificationForm.vue b/jero-web/src/views/projectManagement/components/complianceCertificationForm.vue index 2790f90d3..1181bfe9e 100644 --- a/jero-web/src/views/projectManagement/components/complianceCertificationForm.vue +++ b/jero-web/src/views/projectManagement/components/complianceCertificationForm.vue @@ -8,11 +8,12 @@
{{ val.name }}
+
{{ val.time.slice(0, 11) }}
@@ -27,12 +28,12 @@
- +
{{ val.time.slice(0, 11) }}
{{ val.name }}
@@ -192,10 +193,10 @@ width: 83px; font-size: 12px; font-weight: 400; - color: #6F7385; + color: #9C9FAC; position: absolute; left: 50%; - top: 36px; + top: -36px; transform: translate(-50%, -50%); overflow: hidden; display: -webkit-box; @@ -229,13 +230,13 @@ .process-content-right-top { font-size: 12px; - color: #040B29; width: 83px; background: #fff; display: inline-block; overflow: hidden; position: absolute; - top: -12px; + color: #9C9FAC; + top: 57px; left: 50%; transform: translate(-50%, -50%); overflow: hidden; @@ -253,10 +254,12 @@ width: 83px; font-size: 12px; font-weight: 400; - color: #6F7385; + color: #040B29; + background: #fff; position: absolute; left: 50%; top: 36px; + line-height: 11px; transform: translate(-50%, -50%); overflow: hidden; display: -webkit-box; diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 5135f18f9..a184b8a39 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -68,6 +68,31 @@
+ @@ -97,10 +122,10 @@ - - - - + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + @@ -143,10 +168,10 @@ {{ $t('copy') }}
- + + >