Browse Source

Merge remote-tracking branch 'origin/dev_pyscreen' into dev_temp

master
yinzuomei 5 years ago
parent
commit
85ce79b6f8
  1. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java
  2. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
  3. 77
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  4. 4
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
  5. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java

@ -44,4 +44,6 @@ public class GovernCapacityResultDTO implements Serializable {
* 当前agencyName的上一级组织名称
*/
private String parentAgencyName;
private String orgId;
}

15
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java

@ -12,6 +12,7 @@ import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO;
@ -78,7 +79,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));
}else{
result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue()))));
result.setPercentInPlatForm(getRatio(result.getPartyMemberTotal(),result.getPlatFormTotal()));
}
return result;
}
@ -96,11 +97,21 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));
}else{
result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue()))));
result.setPercentInPlatForm(getRatio(result.getPartyMemberTotal(),result.getPlatFormTotal()));
}
return result;
}
public String getRatio(Integer partyMemberTotal, Integer platFormTotal){
if (null == partyMemberTotal || null == platFormTotal || partyMemberTotal == NumConstant.ZERO || platFormTotal == NumConstant.ZERO){
return "0.00%";
}
BigDecimal aDecimal = new BigDecimal(partyMemberTotal);
BigDecimal bDecimal = new BigDecimal(platFormTotal);
BigDecimal result = aDecimal.divide(bDecimal, NumConstant.FOUR, BigDecimal.ROUND_HALF_UP);
return result.multiply(NumConstant.ONE_HUNDRED_DECIMAL).setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP).toPlainString().concat(ScreenConstant.RATIO);
}
/**
* @Description 2党员基本情况-年龄分布
* @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980

77
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml

@ -6,6 +6,7 @@
<!-- 查询政府治理能力各项指标 -->
<select id="selectGovernCapacityRatio" resultType="com.epmet.evaluationindex.screen.dto.result.GovernCapacityResultDTO">
SELECT
rankData.org_id as orgId,
rankData.ORG_NAME AS agencyName,
rankData.RESPONSE_RATIO,
rankData.RESOLVED_RATIO,
@ -27,27 +28,61 @@
<!-- 基层治理-治理能力榜单 多客户版,调用此sql -->
<select id="selectGovernCapacityRatioNew" resultType="com.epmet.evaluationindex.screen.dto.result.GovernCapacityResultDTO">
SELECT
rankData.ORG_NAME AS agencyName,
rankData.RESPONSE_RATIO,
rankData.RESOLVED_RATIO,
rankData.GOVERN_RATIO,
rankData.SATISFACTION_RATIO,
pa.AGENCY_NAME AS parentAgencyName
FROM
screen_govern_rank_data rankData
LEFT JOIN screen_customer_agency agency ON (rankData.org_id = agency.AGENCY_ID AND agency.DEL_FLAG = '0')
left join screen_customer_agency pa on(agency.PARENT_AREA_CODE=pa.AREA_CODE and pa.DEL_FLAG='0')
WHERE
rankData.DEL_FLAG = '0'
AND rankData.org_id in
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
AND rankData.MONTH_ID =#{monthId}
ORDER BY
(rankData.RESPONSE_RATIO + rankData.RESOLVED_RATIO + rankData.GOVERN_RATIO + rankData.SATISFACTION_RATIO) DESC,
rankData.RESPONSE_RATIO DESC,rankData.RESOLVED_RATIO DESC,rankData.GOVERN_RATIO DESC,rankData.SATISFACTION_RATIO DESC
(SELECT
agency.agency_id as orgId,
agency.AGENCY_NAME AS agencyName,
IFNULL(rankData.RESPONSE_RATIO,0) AS RESPONSE_RATIO,
IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_RATIO,
pa.AGENCY_NAME AS parentAgencyName
FROM screen_customer_agency agency
left join screen_customer_agency pa
on(agency.PARENT_AREA_CODE=pa.AREA_CODE
and pa.DEL_FLAG='0')
left join screen_govern_rank_data rankData
ON (agency.AGENCY_ID =rankData.org_id
AND rankData.DEL_FLAG = '0'
and rankData.org_type='agency')
WHERE
agency.DEL_FLAG = '0'
AND agency.agency_id in
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
AND rankData.MONTH_ID =#{monthId}
ORDER BY
(rankData.RESPONSE_RATIO + rankData.RESOLVED_RATIO + rankData.GOVERN_RATIO + rankData.SATISFACTION_RATIO) DESC,
rankData.RESPONSE_RATIO DESC,rankData.RESOLVED_RATIO DESC,rankData.GOVERN_RATIO DESC,rankData.SATISFACTION_RATIO DESC
)
union
(
SELECT
grid.grid_id as orgId,
grid.GRID_NAME AS agencyName,
IFNULL(rankData.RESPONSE_RATIO,0) AS RESPONSE_RATIO,
IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_RATIO,
ca.agency_name AS parentAgencyName
FROM screen_customer_grid grid
left join screen_customer_agency ca
on (ca.agency_id = grid.parent_agency_id)
left join screen_govern_rank_data rankData
ON (grid.grid_id=rankData.org_id
AND grid.DEL_FLAG = 0
and rankData.org_type='grid')
WHERE grid.DEL_FLAG = '0'
AND grid.GRID_ID in
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
AND rankData.MONTH_ID =#{monthId}
ORDER BY
(rankData.RESPONSE_RATIO + rankData.RESOLVED_RATIO + rankData.GOVERN_RATIO + rankData.SATISFACTION_RATIO) DESC,
rankData.RESPONSE_RATIO DESC,rankData.RESOLVED_RATIO DESC,rankData.GOVERN_RATIO DESC,rankData.SATISFACTION_RATIO
DESC
)
</select>
</mapper>

4
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml

@ -29,7 +29,7 @@
FROM
screen_customer_agency sca
LEFT JOIN screen_party_link_masses_data md
ON ( sca.agency_id = md.ORG_ID AND md.del_flag = '0' )
ON ( sca.agency_id = md.ORG_ID AND md.del_flag = '0' and md.org_type='agency')
WHERE SCA.DEL_FLAG='0'
AND sca.is_display = '1'
<if test="agencyIdList != null and agencyIdList.size() > 0">
@ -47,7 +47,7 @@
FROM
screen_customer_grid scg
LEFT JOIN screen_party_link_masses_data md
ON ( scg.GRID_ID = md.ORG_ID AND md.del_flag = '0' )
ON ( scg.GRID_ID = md.ORG_ID AND md.del_flag = '0' and md.org_type='grid' )
WHERE scg.DEL_FLAG='0'
<if test="agencyIdList != null and agencyIdList.size() > 0">
AND scg.GRID_ID in

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

@ -188,19 +188,19 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl<
if (!CollectionUtils.isEmpty(projectOrg)){
projectOrg.forEach(p -> {
if (a.getAreaCode().equals(p.getAreaCode())){
a.setClosedIncr(p.getClosedIncr());
a.setProjectIncr(p.getProjectIncr());
a.setProjectIncr(p.getProjectIncr());
a.setClosedIncr(null == p.getClosedIncr() ? NumConstant.ZERO : p.getClosedIncr());
a.setProjectIncr(null == p.getProjectIncr() ? NumConstant.ZERO : p.getProjectIncr());
a.setProjectIncr(null == p.getProjectIncr() ? NumConstant.ZERO : p.getProjectIncr());
}
});
}
if (!CollectionUtils.isEmpty(projectGrandOrg)){
projectGrandOrg.forEach(p -> {
if (a.getAreaCode().equals(p.getAreaCode())){
a.setClosedTotal(p.getClosedTotal());
a.setProjectTotal(p.getProjectTotal());
a.setUnClosedTotal(p.getUnClosedTotal());
a.setProjectIncr(p.getProjectIncr());
a.setClosedTotal(null == p.getClosedTotal() ? NumConstant.ZERO : p.getClosedTotal());
a.setProjectTotal(null == p.getProjectTotal() ? NumConstant.ZERO : p.getProjectTotal());
a.setUnClosedTotal(null == p.getUnClosedTotal() ? NumConstant.ZERO : p.getUnClosedTotal());
a.setProjectIncr(null == p.getProjectIncr() ? NumConstant.ZERO : p.getProjectIncr());
}
});
}

Loading…
Cancel
Save