diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index e0a36b8fc3..741a6956eb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -54,7 +54,8 @@ public interface ScreenCustomerGridDao { * @author zxc * @date 2020/10/27 11:11 上午 */ - BranchCountResultDTO selectBranchCount(@Param("agencyId")String agencyId); + BranchCountResultDTO selectAgencyInfo(@Param("agencyId")String agencyId); + Integer selectBranchCount(@Param("agencyId")String agencyId); /** * @Description 查询子级用户分布【网格级别】 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index 456ef83a92..a55b4e5e69 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -58,10 +58,11 @@ public class DistributionServiceImpl implements DistributionService { */ @Override public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { - BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId()); if (null == branchCountFormDTO){ return new BranchCountResultDTO(); } + branchCountResultDTO.setTotalNum(screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId())); return branchCountResultDTO; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index eccb843876..39b4cd2153 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -86,20 +86,28 @@ - SELECT - scg.PARENT_AGENCY_ID AS agencyId, - sca.AGENCY_NAME AS name, - IFNULL(sca.PARTY_MARK,'') AS partyMark, - IFNULL(sca.CENTER_MARK,'[]') AS centerMark, - COUNT(scg.ID) AS totalNum + AGENCY_ID, + AGENCY_NAME AS name, + IFNULL(PARTY_MARK,''), + IFNULL(CENTER_MARK,'') FROM - screen_customer_grid scg - LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID AND sca.IS_DISPLAY = 1 + screen_customer_agency WHERE - scg.del_flag = 0 - AND sca.DEL_FLAG = 0 - AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%') + DEL_FLAG = 0 + AND IS_DISPLAY = 1 + AND AGENCY_ID = #{agencyId} + + + \ No newline at end of file