Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

dev_shibei_match
zxc 5 years ago
parent
commit
78189deaf7
  1. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
  2. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java
  3. 30
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

3
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 查询子级用户分布网格级别

3
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;
}

30
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -86,20 +86,28 @@
</select>
<!-- 查询机关下的党支部 -->
<select id="selectBranchCount" resultType="com.epmet.evaluationindex.screen.dto.result.BranchCountResultDTO">
<select id="selectAgencyInfo" resultType="com.epmet.evaluationindex.screen.dto.result.BranchCountResultDTO">
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}
</select>
<select id="selectBranchCount" resultType="integer" parameterType="string">
SELECT
COUNT( ID ) AS totalNum
FROM
screen_customer_grid
WHERE
DEL_FLAG = 0
AND all_parent_ids LIKE concat('%',#{agencyId}, '%')
</select>
</mapper>
Loading…
Cancel
Save