Browse Source

平阴数据统计列表调整查询组织、网格逻辑

dev
syc 3 years ago
parent
commit
d216530497
  1. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  3. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java

@ -86,4 +86,5 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
CustomerGridDTO getGridInfo(@Param("gridId") String gridId); CustomerGridDTO getGridInfo(@Param("gridId") String gridId);
List<ScreenCustomerGridDTO> getSubGridList(@Param("customerId") String customerId, @Param("agencyId") String agencyId); List<ScreenCustomerGridDTO> getSubGridList(@Param("customerId") String customerId, @Param("agencyId") String agencyId);
List<ScreenCustomerGridDTO> getAllSubGridList(@Param("customerId") String customerId, @Param("agencyId") String agencyId);
} }

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -1487,7 +1487,7 @@ public class GovOrgServiceImpl implements GovOrgService {
List<ScreenCustomerGridDTO> gridList = new ArrayList<>(); List<ScreenCustomerGridDTO> gridList = new ArrayList<>();
//组织级别为街道的查询下级所有网格 //组织级别为街道的查询下级所有网格
if (isGetSubAllGrid && (OrgLevelEnum.STREET.getCode().equals(dto.getLevel()))) { if (isGetSubAllGrid && (OrgLevelEnum.STREET.getCode().equals(dto.getLevel()))) {
gridList = customerGridDao.getSubGridList(customerId, agencyId); gridList = customerGridDao.getAllSubGridList(customerId, agencyId);
List<ScreenAgencyOrGridListDTO.AgencyGrid> allGridList = new ArrayList<>(); List<ScreenAgencyOrGridListDTO.AgencyGrid> allGridList = new ArrayList<>();
gridList.forEach(gr -> { gridList.forEach(gr -> {
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid();

16
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml

@ -197,4 +197,20 @@
ORDER BY pid, grid_name ORDER BY pid, grid_name
</select> </select>
<select id="getAllSubGridList" resultType="com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO">
SELECT
customer_id AS customerId,
id AS gridId,
grid_name AS gridName,
pid AS parentAgencyId,
pids AS allParentIds
FROM
customer_grid
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND pids LIKE concat('%',#{agencyId},'%')
ORDER BY pid, grid_name
</select>
</mapper> </mapper>

Loading…
Cancel
Save