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 * @author zxc
* @date 2020/10/27 11:11 上午 * @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 查询子级用户分布网格级别 * @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 @Override
public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) {
BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId());
if (null == branchCountFormDTO){ if (null == branchCountFormDTO){
return new BranchCountResultDTO(); return new BranchCountResultDTO();
} }
branchCountResultDTO.setTotalNum(screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()));
return branchCountResultDTO; return branchCountResultDTO;
} }

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

@ -86,20 +86,28 @@
</select> </select>
<!-- 查询机关下的党支部 --> <!-- 查询机关下的党支部 -->
<select id="selectBranchCount" resultType="com.epmet.evaluationindex.screen.dto.result.BranchCountResultDTO"> <select id="selectAgencyInfo" resultType="com.epmet.evaluationindex.screen.dto.result.BranchCountResultDTO">
SELECT SELECT
scg.PARENT_AGENCY_ID AS agencyId, AGENCY_ID,
sca.AGENCY_NAME AS name, AGENCY_NAME AS name,
IFNULL(sca.PARTY_MARK,'') AS partyMark, IFNULL(PARTY_MARK,''),
IFNULL(sca.CENTER_MARK,'[]') AS centerMark, IFNULL(CENTER_MARK,'')
COUNT(scg.ID) AS totalNum
FROM FROM
screen_customer_grid scg screen_customer_agency
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID AND sca.IS_DISPLAY = 1
WHERE WHERE
scg.del_flag = 0 DEL_FLAG = 0
AND sca.DEL_FLAG = 0 AND IS_DISPLAY = 1
AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%') 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> </select>
</mapper> </mapper>
Loading…
Cancel
Save