Commit d32bfedc by wqc

APP社会救助页面数据更改

parent c0f8f818
......@@ -100,14 +100,6 @@ public interface IApiLogic extends IApiCommon {
ApiResp getEnjoySubsidyStats(ApiForm form);
/**
* 获取在享补贴统计
*
* @param form
* @return
*/
ApiResp getEnjoySumStatsData(ApiForm form);
/**
* 获取区域社会救助统计列表
*
* @param form
......
......@@ -96,11 +96,6 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
}
@Override
public ApiResp getEnjoySumStatsData(ApiForm form) {
return ApiUtils.toApiResp(form, portalFeign.getEnjoySumStatsData(form.getParamsMap()));
}
@Override
public ApiResp getAreaShjzStats(ApiForm form) {
return ApiUtils.toApiResp(form, portalFeign.getAreaShjzStats(form.getParamsMap()));
}
......
......@@ -353,16 +353,33 @@ public class ShjzStatsService {
List<StatsVo> peopleNumStats = shjzStatsDao.getPeopleNumStats(vo);
// 金额
List<StatsVo> monyStats = shjzStatsDao.getMonyNumStats(vo);
//总人数
List<StatsVo> enjoyNum = shjzStatsDao.getAreaUnderNumStats(vo);
Map<String, Map<String, Object>> map = new HashMap<>();
//总农村低保人数
List<StatsVo> villageTotal= enjoyNum.stream().filter(statsVo -> "0".equals(statsVo.getType())).collect(Collectors.toList());
villageTotal.forEach(statsVo -> {
Map<String, Object> data = map.computeIfAbsent(statsVo.getCode(), k -> new HashMap<>());
data.put("villageTotal", statsVo.getNum());
});
//总城市低保人数
List<StatsVo> cityTotal= enjoyNum.stream().filter(statsVo -> "1".equals(statsVo.getType())).collect(Collectors.toList());
cityTotal.forEach(statsVo -> {
Map<String, Object> data = map.computeIfAbsent(statsVo.getCode(), k -> new HashMap<>());
data.put("cityTotal", statsVo.getNum());
});
// 添加城市低保人数
List<StatsVo> cityPeopleNumStats = peopleNumStats.stream().filter(statsVo -> "农村低保".equals(statsVo.getType())).collect(Collectors.toList());
List<StatsVo> cityPeopleNumStats = peopleNumStats.stream().filter(statsVo -> "城市低保".equals(statsVo.getType())).collect(Collectors.toList());
cityPeopleNumStats.forEach(statsVo -> {
Map<String, Object> data = map.computeIfAbsent(statsVo.getCode(), k -> new HashMap<>());
data.put("cityPeopleNum", statsVo.getNum());
});
// 添加农村低保人数
List<StatsVo> villagePeopleNumStats = peopleNumStats.stream().filter(statsVo -> "城市低保".equals(statsVo.getType())).collect(Collectors.toList());
List<StatsVo> villagePeopleNumStats = peopleNumStats.stream().filter(statsVo -> "农村低保".equals(statsVo.getType())).collect(Collectors.toList());
villagePeopleNumStats.forEach(statsVo -> {
Map<String, Object> data = map.computeIfAbsent(statsVo.getCode(), k -> new HashMap<>());
data.put("villagePeopleNum", statsVo.getNum());
......
......@@ -110,15 +110,7 @@
<select id="getAreaUnderNumStats" resultType="com.zq.portal.vo.StatsVo">
SELECT
LEFT(h.UNIT_ID, #{size}) 'code',
( CASE h.ISCITY
WHEN 0 THEN '农村低保'
WHEN 1 THEN '城市低保'
WHEN 6 THEN '特困供养'
WHEN 10 THEN '农村低收入'
WHEN 11 THEN '城市低收入'
WHEN 21 THEN '住房救助'
WHEN 31 THEN '城市特困'
ELSE '其他' END ) 'type',
h.ISCITY 'type',
SUM( h.SURE_POPULATION ) 'num'
FROM
ENBUZ_APPLY_HOME h
......@@ -127,11 +119,14 @@
<if test="subAreaCode != null and subAreaCode != ''">
AND h.UNIT_ID LIKE CONCAT(#{subAreaCode}, '%')
</if>
<if test="type != null and type != ''">
AND h.ISCITY = #{type}
</if>
AND DATE_FORMAT( h.PERMIT_DATE, "%Y-%m-%d" ) &lt;= #{date}
AND DATE_FORMAT( h.STOP_DATE, "%Y-%m-%d" ) >= #{date}
GROUP BY
LEFT(h.UNIT_ID, #{size}),
ISCITY
type
</select>
<!--
......@@ -159,7 +154,7 @@
-->
<select id="getFivesYearEnjoyStats" resultType="com.zq.portal.vo.StatsVo">
SELECT LEFT(date, 4) 'year', type, SUM(num) 'num' FROM ( SELECT DATE_FORMAT(h.PERMIT_DATE, "%Y-%m") 'date',
( CASE h.ISCITY
h.ISCITY
WHEN 0 THEN '农村低保'
WHEN 1 THEN '城市低保'
WHEN 6 THEN '特困供养'
......@@ -214,7 +209,7 @@
FROM
mon_pay p
WHERE
p.pmonth >= CONCAT(DATE_FORMAT( NOW(), '%Y' ), '-01-01')
p.pmonth >= DATE_FORMAT( NOW(), '%Y%m%d' )
AND p.pmonth &lt;= DATE_FORMAT( NOW(), '%Y%m%d' )
AND p.vp_state = 4
AND p.pay_state = 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment