修改bug
This commit is contained in:
		| @ -18,6 +18,7 @@ import org.dromara.facility.service.IFacMatrixService; | |||||||
| import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; | import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryService; | import org.dromara.progress.service.IPgsProgressCategoryService; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryTemplateService; | import org.dromara.progress.service.IPgsProgressCategoryTemplateService; | ||||||
|  | import org.dromara.progress.service.IPgsProgressPlanDetailService; | ||||||
| import org.dromara.project.service.IBusProjectService; | import org.dromara.project.service.IBusProjectService; | ||||||
| import org.dromara.system.service.ISysDeptService; | import org.dromara.system.service.ISysDeptService; | ||||||
| import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl; | import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl; | ||||||
| @ -46,6 +47,9 @@ public class DemoTest { | |||||||
|     @Resource |     @Resource | ||||||
|     private IPgsProgressCategoryTemplateService progressCategoryTemplateService; |     private IPgsProgressCategoryTemplateService progressCategoryTemplateService; | ||||||
|  |  | ||||||
|  |     @Resource | ||||||
|  |     private IPgsProgressPlanDetailService progressPlanDetailService; | ||||||
|  |  | ||||||
|     @Resource |     @Resource | ||||||
|     private IFacMatrixService matrixService; |     private IFacMatrixService matrixService; | ||||||
|  |  | ||||||
| @ -69,6 +73,11 @@ public class DemoTest { | |||||||
|     @Resource |     @Resource | ||||||
|     private IdCardEncryptorUtil idCardEncryptorUtil; |     private IdCardEncryptorUtil idCardEncryptorUtil; | ||||||
|  |  | ||||||
|  |     @Test | ||||||
|  |     void testConstructionValue() { | ||||||
|  |         progressPlanDetailService.syncPlanDetail2ConstructionValue(LocalDate.now().minusDays(1), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void setIdCardEncryptorUtil() { |     void setIdCardEncryptorUtil() { | ||||||
|         List<SubConstructionUser> list = constructionUserService.list(); |         List<SubConstructionUser> list = constructionUserService.list(); | ||||||
|  | |||||||
| @ -27,4 +27,9 @@ public class FacFacilityPositionGisReq implements Serializable { | |||||||
|      * 方阵id列表 |      * 方阵id列表 | ||||||
|      */ |      */ | ||||||
|     private List<Long> matrixIdList; |     private List<Long> matrixIdList; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 类型 | ||||||
|  |      */ | ||||||
|  |     private List<String> typeList; | ||||||
| } | } | ||||||
|  | |||||||
| @ -12,7 +12,6 @@ import org.dromara.common.core.utils.ObjectUtils; | |||||||
| import org.dromara.common.core.utils.StringUtils; | import org.dromara.common.core.utils.StringUtils; | ||||||
| import org.dromara.common.mybatis.core.page.PageQuery; | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
| import org.dromara.common.satoken.utils.LoginHelper; |  | ||||||
| import org.dromara.common.utils.JSTUtil; | import org.dromara.common.utils.JSTUtil; | ||||||
| import org.dromara.facility.constant.FacRedisKeyConstant; | import org.dromara.facility.constant.FacRedisKeyConstant; | ||||||
| import org.dromara.facility.domain.*; | import org.dromara.facility.domain.*; | ||||||
| @ -296,8 +295,11 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix | |||||||
|             List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry); |             List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry); | ||||||
|             // 获取方阵名称 |             // 获取方阵名称 | ||||||
|             String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures); |             String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures); | ||||||
|  |             if (StringUtils.isBlank(nameStr)) { | ||||||
|  |                 continue; | ||||||
|  |             } | ||||||
|             String name = nameStr.split(" ")[0]; |             String name = nameStr.split(" ")[0]; | ||||||
|             if (name == null) { |             if (StringUtils.isBlank(name)) { | ||||||
|                 continue; |                 continue; | ||||||
|             } |             } | ||||||
|             // 将位置信息转换为 JSON 字符串 |             // 将位置信息转换为 JSON 字符串 | ||||||
| @ -563,6 +565,7 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix | |||||||
|     public List<FacFacilityPositionGisVo> getPositionGis(FacFacilityPositionGisReq req) { |     public List<FacFacilityPositionGisVo> getPositionGis(FacFacilityPositionGisReq req) { | ||||||
|         Long projectId = req.getProjectId(); |         Long projectId = req.getProjectId(); | ||||||
|         List<Long> matrixIdList = req.getMatrixIdList(); |         List<Long> matrixIdList = req.getMatrixIdList(); | ||||||
|  |         List<String> typeList = req.getTypeList(); | ||||||
|         BusProject project = projectService.getById(projectId); |         BusProject project = projectService.getById(projectId); | ||||||
|         if (project == null) { |         if (project == null) { | ||||||
|             throw new ServiceException("项目信息不存在", HttpStatus.NOT_FOUND); |             throw new ServiceException("项目信息不存在", HttpStatus.NOT_FOUND); | ||||||
| @ -575,145 +578,159 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix | |||||||
|         if (CollUtil.isEmpty(matrixList)) { |         if (CollUtil.isEmpty(matrixList)) { | ||||||
|             return result; |             return result; | ||||||
|         } |         } | ||||||
|         List<FacFacilityPositionGisVo> matrixVoList = matrixList.stream().map(obj -> |         if (CollUtil.isEmpty(typeList) || typeList.contains("1")) { | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> matrixVoList = matrixList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getMatrixName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getMatrixName(), | ||||||
|                     null, |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.MATRIX.getValue() |                         null, | ||||||
|                 )) |                         FacCategoryEnum.MATRIX.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(matrixVoList); |                 .toList(); | ||||||
|  |             result.addAll(matrixVoList); | ||||||
|  |         } | ||||||
|         // 获取光伏板立柱信息 |         // 获取光伏板立柱信息 | ||||||
|         List<FacPhotovoltaicPanelColumn> columnList = photovoltaicPanelColumnService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("2")) { | ||||||
|             .select( |             List<FacPhotovoltaicPanelColumn> columnList = photovoltaicPanelColumnService.lambdaQuery() | ||||||
|                 FacPhotovoltaicPanelColumn::getId, |                 .select( | ||||||
|                 FacPhotovoltaicPanelColumn::getName, |                     FacPhotovoltaicPanelColumn::getId, | ||||||
|                 FacPhotovoltaicPanelColumn::getPositions, |                     FacPhotovoltaicPanelColumn::getName, | ||||||
|                 FacPhotovoltaicPanelColumn::getStatus |                     FacPhotovoltaicPanelColumn::getPositions, | ||||||
|             ) |                     FacPhotovoltaicPanelColumn::getStatus | ||||||
|             .eq(FacPhotovoltaicPanelColumn::getProjectId, projectId) |                 ) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelColumn::getMatrixId, matrixIdList) |                 .eq(FacPhotovoltaicPanelColumn::getProjectId, projectId) | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelColumn::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> columnVoList = columnList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> columnVoList = columnList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.PHOTOVOLTAIC_PANEL_COLUMN.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.PHOTOVOLTAIC_PANEL_COLUMN.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(columnVoList); |                 .toList(); | ||||||
|  |             result.addAll(columnVoList); | ||||||
|  |         } | ||||||
|         // 获取光伏板点信息 |         // 获取光伏板点信息 | ||||||
|         List<FacPhotovoltaicPanelPoint> pointList = photovoltaicPanelPointService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("3")) { | ||||||
|             .select( |             List<FacPhotovoltaicPanelPoint> pointList = photovoltaicPanelPointService.lambdaQuery() | ||||||
|                 FacPhotovoltaicPanelPoint::getId, |                 .select( | ||||||
|                 FacPhotovoltaicPanelPoint::getName, |                     FacPhotovoltaicPanelPoint::getId, | ||||||
|                 FacPhotovoltaicPanelPoint::getPositions, |                     FacPhotovoltaicPanelPoint::getName, | ||||||
|                 FacPhotovoltaicPanelPoint::getStatus |                     FacPhotovoltaicPanelPoint::getPositions, | ||||||
|             ) |                     FacPhotovoltaicPanelPoint::getStatus | ||||||
|             .eq(FacPhotovoltaicPanelPoint::getProjectId, projectId) |                 ) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelPoint::getMatrixId, matrixIdList) |                 .eq(FacPhotovoltaicPanelPoint::getProjectId, projectId) | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelPoint::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> pointVoList = pointList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> pointVoList = pointList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.PHOTOVOLTAIC_PANEL_POINT.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.PHOTOVOLTAIC_PANEL_POINT.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(pointVoList); |                 .toList(); | ||||||
|  |             result.addAll(pointVoList); | ||||||
|  |         } | ||||||
|         // 获取光伏板支架信息 |         // 获取光伏板支架信息 | ||||||
|         List<FacPhotovoltaicPanelSupport> supportList = photovoltaicPanelSupportService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("4")) { | ||||||
|             .select( |             List<FacPhotovoltaicPanelSupport> supportList = photovoltaicPanelSupportService.lambdaQuery() | ||||||
|                 FacPhotovoltaicPanelSupport::getId, |                 .select( | ||||||
|                 FacPhotovoltaicPanelSupport::getName, |                     FacPhotovoltaicPanelSupport::getId, | ||||||
|                 FacPhotovoltaicPanelSupport::getPositions, |                     FacPhotovoltaicPanelSupport::getName, | ||||||
|                 FacPhotovoltaicPanelSupport::getStatus |                     FacPhotovoltaicPanelSupport::getPositions, | ||||||
|             ) |                     FacPhotovoltaicPanelSupport::getStatus | ||||||
|             .eq(FacPhotovoltaicPanelSupport::getProjectId, projectId) |                 ) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelSupport::getMatrixId, matrixIdList) |                 .eq(FacPhotovoltaicPanelSupport::getProjectId, projectId) | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanelSupport::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> supporVotList = supportList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> supporVotList = supportList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.PHOTOVOLTAIC_PANEL_SUPPORT.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.PHOTOVOLTAIC_PANEL_SUPPORT.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(supporVotList); |                 .toList(); | ||||||
|  |             result.addAll(supporVotList); | ||||||
|  |         } | ||||||
|         // 获取光伏板信息 |         // 获取光伏板信息 | ||||||
|         List<FacPhotovoltaicPanel> panelList = photovoltaicPanelService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("5")) { | ||||||
|             .select( |             List<FacPhotovoltaicPanel> panelList = photovoltaicPanelService.lambdaQuery() | ||||||
|                 FacPhotovoltaicPanel::getId, |                 .select( | ||||||
|                 FacPhotovoltaicPanel::getName, |                     FacPhotovoltaicPanel::getId, | ||||||
|                 FacPhotovoltaicPanel::getPositions, |                     FacPhotovoltaicPanel::getName, | ||||||
|                 FacPhotovoltaicPanel::getStatus |                     FacPhotovoltaicPanel::getPositions, | ||||||
|             ) |                     FacPhotovoltaicPanel::getStatus | ||||||
|             .eq(FacPhotovoltaicPanel::getProjectId, projectId) |                 ) | ||||||
|             .eq(FacPhotovoltaicPanel::getProgressCategoryName, "组件安装") |                 .eq(FacPhotovoltaicPanel::getProjectId, projectId) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanel::getMatrixId, matrixIdList) |                 .eq(FacPhotovoltaicPanel::getProgressCategoryName, "组件安装") | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacPhotovoltaicPanel::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> panelVoList = panelList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> panelVoList = panelList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.PHOTOVOLTAIC_PANEL.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.PHOTOVOLTAIC_PANEL.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(panelVoList); |                 .toList(); | ||||||
|  |             result.addAll(panelVoList); | ||||||
|  |         } | ||||||
|         // 获取箱变信息 |         // 获取箱变信息 | ||||||
|         List<FacBoxTransformer> boxTransformerList = boxTransformerService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("6")) { | ||||||
|             .select( |             List<FacBoxTransformer> boxTransformerList = boxTransformerService.lambdaQuery() | ||||||
|                 FacBoxTransformer::getId, |                 .select( | ||||||
|                 FacBoxTransformer::getName, |                     FacBoxTransformer::getId, | ||||||
|                 FacBoxTransformer::getPositions, |                     FacBoxTransformer::getName, | ||||||
|                 FacBoxTransformer::getStatus |                     FacBoxTransformer::getPositions, | ||||||
|             ) |                     FacBoxTransformer::getStatus | ||||||
|             .eq(FacBoxTransformer::getProjectId, projectId) |                 ) | ||||||
|             .eq(FacBoxTransformer::getProgressCategoryName, "箱变基础") |                 .eq(FacBoxTransformer::getProjectId, projectId) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacBoxTransformer::getMatrixId, matrixIdList) |                 .eq(FacBoxTransformer::getProgressCategoryName, "箱变基础") | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacBoxTransformer::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> boxTransformerVoList = boxTransformerList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> boxTransformerVoList = boxTransformerList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.BOX_TRANSFORMER.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.BOX_TRANSFORMER.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(boxTransformerVoList); |                 .toList(); | ||||||
|  |             result.addAll(boxTransformerVoList); | ||||||
|  |         } | ||||||
|         // 获取逆变器信息 |         // 获取逆变器信息 | ||||||
|         List<FacInverter> inverterList = inverterService.lambdaQuery() |         if (CollUtil.isEmpty(typeList) || typeList.contains("7")) { | ||||||
|             .select( |             List<FacInverter> inverterList = inverterService.lambdaQuery() | ||||||
|                 FacInverter::getId, |                 .select( | ||||||
|                 FacInverter::getName, |                     FacInverter::getId, | ||||||
|                 FacInverter::getPositions, |                     FacInverter::getName, | ||||||
|                 FacInverter::getStatus |                     FacInverter::getPositions, | ||||||
|             ) |                     FacInverter::getStatus | ||||||
|             .eq(FacInverter::getProjectId, projectId) |                 ) | ||||||
|             .eq(FacInverter::getProgressCategoryName, "逆变器安装") |                 .eq(FacInverter::getProjectId, projectId) | ||||||
|             .in(CollUtil.isNotEmpty(matrixIdList), FacInverter::getMatrixId, matrixIdList) |                 .eq(FacInverter::getProgressCategoryName, "逆变器安装") | ||||||
|             .list(); |                 .in(CollUtil.isNotEmpty(matrixIdList), FacInverter::getMatrixId, matrixIdList) | ||||||
|         List<FacFacilityPositionGisVo> inverterVoList = inverterList.stream().map(obj -> |                 .list(); | ||||||
|                 FacFacilityPositionGisVo.obj2vo( |             List<FacFacilityPositionGisVo> inverterVoList = inverterList.stream().map(obj -> | ||||||
|                     obj.getId(), |                     FacFacilityPositionGisVo.obj2vo( | ||||||
|                     obj.getName(), |                         obj.getId(), | ||||||
|                     obj.getPositions(), |                         obj.getName(), | ||||||
|                     obj.getStatus(), |                         obj.getPositions(), | ||||||
|                     FacCategoryEnum.INVERTER.getValue() |                         obj.getStatus(), | ||||||
|                 )) |                         FacCategoryEnum.INVERTER.getValue() | ||||||
|             .toList(); |                     )) | ||||||
|         result.addAll(inverterVoList); |                 .toList(); | ||||||
|  |             result.addAll(inverterVoList); | ||||||
|  |         } | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -201,7 +201,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic | |||||||
|         } |         } | ||||||
|         // 获取项目下方阵信息 |         // 获取项目下方阵信息 | ||||||
|         List<FacMatrix> matrixList = matrixService.lambdaQuery() |         List<FacMatrix> matrixList = matrixService.lambdaQuery() | ||||||
|             .select(FacMatrix::getId, FacMatrix::getPositions) |             .select(FacMatrix::getId, FacMatrix::getPositions, FacMatrix::getMatrixName) | ||||||
|             .eq(FacMatrix::getProjectId, projectId).list(); |             .eq(FacMatrix::getProjectId, projectId).list(); | ||||||
|         if (CollUtil.isEmpty(matrixList)) { |         if (CollUtil.isEmpty(matrixList)) { | ||||||
|             throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息", HttpStatus.NOT_FOUND); |             throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息", HttpStatus.NOT_FOUND); | ||||||
| @ -292,7 +292,10 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic | |||||||
|                                 FacProperties nameProperties = nameFeature.getProperties(); |                                 FacProperties nameProperties = nameFeature.getProperties(); | ||||||
|                                 String name = nameProperties.getText(); |                                 String name = nameProperties.getText(); | ||||||
|                                 // ① 获取名称 |                                 // ① 获取名称 | ||||||
|                                 if (StringUtils.isBlank(name)) return Collections.emptyList(); |                                 if (StringUtils.isBlank(name)) { | ||||||
|  |                                     log.info("名称为空,跳过"); | ||||||
|  |                                     return Collections.emptyList(); | ||||||
|  |                                 } | ||||||
| //                                if (!name.startsWith("G")) return Collections.emptyList(); | //                                if (!name.startsWith("G")) return Collections.emptyList(); | ||||||
|                                 List<FacPhotovoltaicPanel> panelList = new ArrayList<>(); |                                 List<FacPhotovoltaicPanel> panelList = new ArrayList<>(); | ||||||
|                                 // ② 找到该点对应的 polygon(优先包含,否则最近) |                                 // ② 找到该点对应的 polygon(优先包含,否则最近) | ||||||
| @ -301,8 +304,33 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic | |||||||
|                                 // ③ 获取 geometry 坐标 |                                 // ③ 获取 geometry 坐标 | ||||||
|                                 List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst(); |                                 List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst(); | ||||||
|                                 // ④ 判断所属方阵 |                                 // ④ 判断所属方阵 | ||||||
|                                 FacMatrix matrix = matrixService.getMatrixIdBy2Coordinates(matrixList, coordinates); | /*                                FacMatrix matrix = matrixService.getMatrixIdBy2Coordinates(matrixList, coordinates); | ||||||
|                                 if (matrix == null) return Collections.emptyList(); |                                 if (matrix == null) { | ||||||
|  |                                     log.info("所属方阵为空,跳过"); | ||||||
|  |                                     return Collections.emptyList(); | ||||||
|  |                                 } | ||||||
|  |                                 Long matrixId = matrix.getId();*/ | ||||||
|  |                                 // 去掉首字母 (T/G) | ||||||
|  |                                 String withoutPrefix = name.substring(1); | ||||||
|  |  | ||||||
|  |                                 // 如果包含".",只取第一个"."前的数字 | ||||||
|  |                                 int dotIndex = withoutPrefix.indexOf("."); | ||||||
|  |                                 if (dotIndex != -1) { | ||||||
|  |                                     withoutPrefix = withoutPrefix.substring(0, dotIndex); | ||||||
|  |                                 } | ||||||
|  |                                 FacMatrix matrix = null; | ||||||
|  |                                 for (FacMatrix facMatrix : matrixList) { | ||||||
|  |                                     String matrixName = facMatrix.getMatrixName(); | ||||||
|  |                                     String matrixName1 = matrixName.substring(1); | ||||||
|  |                                     if (withoutPrefix.equals(matrixName1)) { | ||||||
|  |                                         matrix = facMatrix; | ||||||
|  |                                         break; | ||||||
|  |                                     } | ||||||
|  |                                 } | ||||||
|  |                                 if (matrix == null) { | ||||||
|  |                                     log.info("所属方阵为空,跳过"); | ||||||
|  |                                     return Collections.emptyList(); | ||||||
|  |                                 } | ||||||
|                                 Long matrixId = matrix.getId(); |                                 Long matrixId = matrix.getId(); | ||||||
|                                 // ⑤ 获取进度类别 |                                 // ⑤ 获取进度类别 | ||||||
|                                 List<PgsProgressCategory> progressCategoryListByMatrix = progressCategoryMap.get(matrixId); |                                 List<PgsProgressCategory> progressCategoryListByMatrix = progressCategoryMap.get(matrixId); | ||||||
|  | |||||||
| @ -124,7 +124,7 @@ public interface WeatherConstant { | |||||||
|      */ |      */ | ||||||
|     static Map<String, List<String>> getWeatherStatusMap() { |     static Map<String, List<String>> getWeatherStatusMap() { | ||||||
|         Map<String, List<String>> weatherStatusMap = new HashMap<>(); |         Map<String, List<String>> weatherStatusMap = new HashMap<>(); | ||||||
|         weatherStatusMap.put("sunny", SUNNY); |         weatherStatusMap.put("Sunny", SUNNY); | ||||||
|         weatherStatusMap.put("manyCloud", MANY_CLOUD); |         weatherStatusMap.put("manyCloud", MANY_CLOUD); | ||||||
|         weatherStatusMap.put("cloudy", CLOUDY); |         weatherStatusMap.put("cloudy", CLOUDY); | ||||||
|         weatherStatusMap.put("smallRain", SMALL_RAIN); |         weatherStatusMap.put("smallRain", SMALL_RAIN); | ||||||
|  | |||||||
| @ -255,7 +255,7 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst | |||||||
|         // 主 Sheet 设置表头 |         // 主 Sheet 设置表头 | ||||||
|         Row sheetRow = mainSheet.createRow(0); |         Row sheetRow = mainSheet.createRow(0); | ||||||
|         String[] headers = {"编号(格式:1,1-1,1-1-1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码", |         String[] headers = {"编号(格式:1,1-1,1-1-1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码", | ||||||
|             "预计开始时间(格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"}; |             "预计开始时间(输入格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"}; | ||||||
|         for (int i = 0; i < headers.length; i++) { |         for (int i = 0; i < headers.length; i++) { | ||||||
|             Cell cell = sheetRow.createCell(i); |             Cell cell = sheetRow.createCell(i); | ||||||
|             cell.setCellValue(headers[i]); |             cell.setCellValue(headers[i]); | ||||||
| @ -333,11 +333,11 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst | |||||||
|  |  | ||||||
|  |  | ||||||
|         // 调整列宽 |         // 调整列宽 | ||||||
|         mainSheet.setColumnWidth(0, 20 * 256); |         mainSheet.setColumnWidth(0, 20 * 320); | ||||||
|         mainSheet.setColumnWidth(1, 20 * 280); |         mainSheet.setColumnWidth(1, 20 * 280); | ||||||
|         mainSheet.setColumnWidth(2, 20 * 280); |         mainSheet.setColumnWidth(2, 20 * 280); | ||||||
|         mainSheet.setColumnWidth(3, 20 * 400); |         mainSheet.setColumnWidth(3, 20 * 360); | ||||||
|         mainSheet.setColumnWidth(4, 20 * 200); |         mainSheet.setColumnWidth(4, 20 * 320); | ||||||
|         mainSheet.setColumnWidth(5, 20 * 200); |         mainSheet.setColumnWidth(5, 20 * 200); | ||||||
|         mainSheet.setColumnWidth(6, 20 * 200); |         mainSheet.setColumnWidth(6, 20 * 200); | ||||||
|         mainSheet.setColumnWidth(7, 20 * 200); |         mainSheet.setColumnWidth(7, 20 * 200); | ||||||
|  | |||||||
| @ -1066,18 +1066,18 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj | |||||||
|                 for (FacMatrix matrix : matrixList) { |                 for (FacMatrix matrix : matrixList) { | ||||||
|                     map.put(matrix.getId(), "方阵:" + matrix.getMatrixName()); |                     map.put(matrix.getId(), "方阵:" + matrix.getMatrixName()); | ||||||
|                 } |                 } | ||||||
|             } |                 // 获取分项工程 | ||||||
|             // 获取分项工程 |                 List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery() | ||||||
|             List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery() |                     .in(PgsProgressCategory::getMatrixId, matrixList.stream().map(FacMatrix::getId).toList()) | ||||||
|                 .in(PgsProgressCategory::getMatrixId, matrixList.stream().map(FacMatrix::getId).toList()) |                     .list(); | ||||||
|                 .list(); |                 if (CollUtil.isNotEmpty(progressCategoryList)) { | ||||||
|             if (CollUtil.isNotEmpty(progressCategoryList)) { |                     for (PgsProgressCategory progressCategory : progressCategoryList) { | ||||||
|                 for (PgsProgressCategory progressCategory : progressCategoryList) { |                         String matrixName = progressCategory.getMatrixName(); | ||||||
|                     String matrixName = progressCategory.getMatrixName(); |                         if (StringUtils.isNotBlank(matrixName)) { | ||||||
|                     if (StringUtils.isNotBlank(matrixName)) { |                             map.put(progressCategory.getId(), "分项工程:" + matrixName + "-" + progressCategory.getName()); | ||||||
|                         map.put(progressCategory.getId(), "分项工程:" + matrixName + "-" + progressCategory.getName()); |                         } else { | ||||||
|                     } else { |                             map.put(progressCategory.getId(), "分项工程:" + progressCategory.getName()); | ||||||
|                         map.put(progressCategory.getId(), "分项工程:" + progressCategory.getName()); |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -15,13 +15,12 @@ import org.dromara.common.mybatis.core.page.TableDataInfo; | |||||||
| import org.dromara.common.web.core.BaseController; | import org.dromara.common.web.core.BaseController; | ||||||
| import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo; | import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo; | ||||||
| import org.dromara.project.service.IBusProjectTeamService; | import org.dromara.project.service.IBusProjectTeamService; | ||||||
| import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq; | import org.dromara.quality.domain.QltQualityInspection; | ||||||
| import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq; | import org.dromara.quality.domain.dto.qualityinspection.*; | ||||||
| import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq; |  | ||||||
| import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq; |  | ||||||
| import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo; | import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo; | ||||||
| import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo; | import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo; | ||||||
| import org.dromara.quality.service.IQltQualityInspectionService; | import org.dromara.quality.service.IQltQualityInspectionService; | ||||||
|  | import org.springframework.beans.BeanUtils; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
| @ -43,6 +42,13 @@ public class QltQualityInspectionController extends BaseController { | |||||||
|  |  | ||||||
|     private final IBusProjectTeamService busProjectTeamService; |     private final IBusProjectTeamService busProjectTeamService; | ||||||
|  |  | ||||||
|  |     @PutMapping("/test/add") | ||||||
|  |     public R<Boolean> testAdd(QltQualityInspectionUpdateFileReq req) { | ||||||
|  |         QltQualityInspection qualityInspection = new QltQualityInspection(); | ||||||
|  |         BeanUtils.copyProperties(req, qualityInspection); | ||||||
|  |         return R.ok(qualityInspectionService.updateById(qualityInspection)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询质量-检查工单列表 |      * 查询质量-检查工单列表 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -0,0 +1,42 @@ | |||||||
|  | package org.dromara.quality.domain.dto.qualityinspection; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-19 14:45 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class QltQualityInspectionUpdateFileReq implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 4892385858816127150L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键 | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 巡检附件 | ||||||
|  |      */ | ||||||
|  |     private String inspectionFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 巡检图片附件 | ||||||
|  |      */ | ||||||
|  |     private String inspectionImgFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 整改附件 | ||||||
|  |      */ | ||||||
|  |     private String rectificationFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 整改图片附件 | ||||||
|  |      */ | ||||||
|  |     private String rectificationImgFile; | ||||||
|  | } | ||||||
| @ -13,10 +13,12 @@ import org.dromara.common.log.enums.BusinessType; | |||||||
| import org.dromara.common.mybatis.core.page.PageQuery; | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
| import org.dromara.common.web.core.BaseController; | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.safety.domain.HseSafetyInspection; | ||||||
| import org.dromara.safety.domain.dto.safetyinspection.*; | import org.dromara.safety.domain.dto.safetyinspection.*; | ||||||
| import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo; | import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo; | ||||||
| import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo; | import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo; | ||||||
| import org.dromara.safety.service.IHseSafetyInspectionService; | import org.dromara.safety.service.IHseSafetyInspectionService; | ||||||
|  | import org.springframework.beans.BeanUtils; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
| @ -36,6 +38,13 @@ public class HseSafetyInspectionController extends BaseController { | |||||||
|  |  | ||||||
|     private final IHseSafetyInspectionService safetyInspectionService; |     private final IHseSafetyInspectionService safetyInspectionService; | ||||||
|  |  | ||||||
|  |     @PutMapping("/test/add") | ||||||
|  |     public R<Boolean> testAdd(@Validated @RequestBody HseSafetyInspectionUpdateFileReq req) { | ||||||
|  |         HseSafetyInspection inspection = new HseSafetyInspection(); | ||||||
|  |         BeanUtils.copyProperties(req, inspection); | ||||||
|  |         return R.ok(safetyInspectionService.updateById(inspection)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询安全巡检工单列表 |      * 查询安全巡检工单列表 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -0,0 +1,32 @@ | |||||||
|  | package org.dromara.safety.domain.dto.safetyinspection; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-19 14:49 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class HseSafetyInspectionUpdateFileReq implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 3900623694038061296L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键ID | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 检查附件 | ||||||
|  |      */ | ||||||
|  |     private String checkFile; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 整改附件 | ||||||
|  |      */ | ||||||
|  |     private String rectificationFile; | ||||||
|  | } | ||||||
| @ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||||
| import jakarta.servlet.http.HttpServletResponse; | import jakarta.servlet.http.HttpServletResponse; | ||||||
| import org.dromara.common.mybatis.core.page.PageQuery; | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
| import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo; |  | ||||||
| import org.dromara.safety.domain.HseSafetyInspection; | import org.dromara.safety.domain.HseSafetyInspection; | ||||||
| import org.dromara.safety.domain.dto.safetyinspection.*; | import org.dromara.safety.domain.dto.safetyinspection.*; | ||||||
| import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo; | import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo; | ||||||
|  | |||||||
| @ -312,7 +312,9 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect | |||||||
|                 safetyInspectionVo.setRectificationName(contractor.getName()); |                 safetyInspectionVo.setRectificationName(contractor.getName()); | ||||||
|             } else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) { |             } else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) { | ||||||
|                 BusProjectTeam team = projectTeamService.getById(rectificationId); |                 BusProjectTeam team = projectTeamService.getById(rectificationId); | ||||||
|                 safetyInspectionVo.setRectificationName(team.getTeamName()); |                 if (team != null) { | ||||||
|  |                     safetyInspectionVo.setRectificationName(team.getTeamName()); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         return safetyInspectionVo; |         return safetyInspectionVo; | ||||||
|  | |||||||
| @ -61,6 +61,20 @@ public class SysOssController extends BaseController { | |||||||
|         return R.ok(list); |         return R.ok(list); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 上传OSS对象存储 | ||||||
|  |      * | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/uploadFileUrl") | ||||||
|  |     public R<SysOssUploadVo> uploadFileUrl(String url, String fileName) { | ||||||
|  |         SysOssVo oss = ossService.uploadFileUrl(url, fileName); | ||||||
|  |         SysOssUploadVo uploadVo = new SysOssUploadVo(); | ||||||
|  |         uploadVo.setUrl(oss.getUrl()); | ||||||
|  |         uploadVo.setFileName(oss.getOriginalName()); | ||||||
|  |         uploadVo.setOssId(oss.getOssId().toString()); | ||||||
|  |         return R.ok(uploadVo); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 上传OSS对象存储 |      * 上传OSS对象存储 | ||||||
|      * |      * | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user