diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java index 4e3daf80bc..5b2eff214c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java @@ -1,6 +1,7 @@ package com.epmet.commons.tools.redis.common; import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.CommonAggFeignClient; import com.epmet.commons.tools.redis.RedisKeys; @@ -51,6 +52,7 @@ public class CustomerOrgRedis { public static GridInfoCache getGridInfo(String gridId){ String key = RedisKeys.getGridInfoKey(gridId); Map grid = customerOrgRedis.redisUtils.hGetAll(key); + log.info("grid is {}", JSON.toJSONString(grid)); if (!CollectionUtils.isEmpty(grid)) { return ConvertUtils.mapToEntity(grid, GridInfoCache.class); } @@ -62,6 +64,7 @@ public class CustomerOrgRedis { //throw new RenException("没有此网格信息..."); return null; } + log.info("select grid info is {}", JSON.toJSONString(gridInfoResult.getData())); Map map = BeanUtil.beanToMap(gridInfoResult.getData(), false, true); customerOrgRedis.redisUtils.hMSet(key, map); return gridInfoResult.getData(); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml index adc659eae6..0625e55ce5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml @@ -174,8 +174,8 @@ cg.* FROM customer_grid cg LEFT JOIN customer_agency ca ON (ca.ID = cg.PID AND ca.DEL_FLAG = '0') - WHERE cg.DEL_FLAG = '0' - AND cg.ID = #{gridId} + WHERE cg.ID = #{gridId} + AND cg.DEL_FLAG = '0' diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java index 752bb721cd..9c2d142132 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java @@ -131,4 +131,9 @@ public class CustomerGridDTO implements Serializable { * 所有上级组织名 */ private String allParentName; + + /** + * 弃用标记 + */ + private Integer abandonFlag; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index f57f99bcdf..3b9e0be490 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -822,14 +822,6 @@ public class CustomerGridServiceImpl extends BaseServiceImpl IFNULL(cg.longitude,ca.longitude) longitude, - IFNULL(cg.latitude,ca.latitude) latitude + IFNULL(cg.latitude,ca.latitude) latitude, + cg.ABANDON_FLAG FROM customer_grid cg INNER JOIN customer_agency ca ON ca.pid = '0' AND ca.customer_id = cg.customer_id