diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java index fb205ff276..1acaf678ce 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/StaffPatrolDetailServiceImpl.java @@ -124,7 +124,7 @@ public class StaffPatrolDetailServiceImpl implements StaffPatrolDetailService { result.forEach(r -> { if (!r.getLlStatus()){ finalGrids.forEach(g -> { - if (StringUtils.isNotBlank(g.getCenterMark())){ + if (StringUtils.isNotBlank(g.getCenterMark())&& !"[]".equals(g.getCenterMark())){ r.setLongitude(getLL(g.getCenterMark(),PatrolConstant.LONGITUDE)); r.setLatitude(getLL(g.getCenterMark(),PatrolConstant.LATITUDE)); } @@ -191,4 +191,4 @@ public class StaffPatrolDetailServiceImpl implements StaffPatrolDetailService { } -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index afd8256f26..6da4882ef5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -83,10 +84,17 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic meta.setProjectCreateTime(projectInfo.getCreatedTime()); meta.setProjectTitle(projectInfo.getTitle()); meta.setOrigin(projectInfo.getOrigin()); - //直接立项的话 项目内容是项目背景 + //直接立项的话 项目内容是项目背景 经纬度添加 if (ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(projectInfo.getOrigin())){ meta.setProjectContent(projectInfo.getBackGround()); meta.setLinkName(projectInfo.getCreatedBy()); + if (StringUtils.isNotBlank(projectInfo.getLocateDimension())){ + meta.setLatitude(new BigDecimal(projectInfo.getLocateDimension())); + } + if (StringUtils.isNotBlank(projectInfo.getLocateLongitude())){ + meta.setLongitude(new BigDecimal(projectInfo.getLocateLongitude())); + } + meta.setProjectAddress(projectInfo.getLocateAddress()); } return meta; })).collect(Collectors.toList()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql index fd3b7ffcfa..02284815d2 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql @@ -4,21 +4,3 @@ ADD COLUMN `LOCATE_LONGITUDE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4 ADD COLUMN `LOCATE_DIMENSION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位维度' AFTER `LOCATE_LONGITUDE`; - -UPDATE - project a, - ( - SELECT - locate_address a, - locate_longitude b, - locate_dimension c, - issue_id d - FROM epmet_resi_group.resi_topic - ) b -SET - a.locate_address = b.a, - a.locate_longitude = b.b, - a.locate_dimension = b.c -WHERE - a.origin = 'issue' -AND a.origin_id = b.d \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql new file mode 100644 index 0000000000..66e3aed7a3 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql @@ -0,0 +1,2 @@ +update project set locate_address = NULL,locate_longitude = NULL,locate_dimension = NULL; +