Commit 8cb5b69d by wqc

APP更改

parent 1f861786
...@@ -364,8 +364,6 @@ public class ShjzStatsService { ...@@ -364,8 +364,6 @@ public class ShjzStatsService {
totalData.put("cityTotal",totalStat.getNum());//城市低保 totalData.put("cityTotal",totalStat.getNum());//城市低保
} }
} }
totalData.put("areaCode", "0");
totalData.put("city", "");
Map<String, Map<String, Object>> map = new HashMap<>(); Map<String, Map<String, Object>> map = new HashMap<>();
// 添加城市低保人数 // 添加城市低保人数
...@@ -394,7 +392,6 @@ public class ShjzStatsService { ...@@ -394,7 +392,6 @@ public class ShjzStatsService {
}); });
List<Map<String, Object>> dataList = new ArrayList<>(); List<Map<String, Object>> dataList = new ArrayList<>();
dataList.add(totalData);
// map数据转成list,提示添加key为区域码 // map数据转成list,提示添加key为区域码
map.forEach((k, v) -> { map.forEach((k, v) -> {
SystemArea area = areaDao.selectById(SystemArea.patchZero(k)); SystemArea area = areaDao.selectById(SystemArea.patchZero(k));
...@@ -402,7 +399,10 @@ public class ShjzStatsService { ...@@ -402,7 +399,10 @@ public class ShjzStatsService {
v.put("city", area!=null?area.getName():""); v.put("city", area!=null?area.getName():"");
dataList.add(v); dataList.add(v);
}); });
List<Map<String,Object>> returnData = dataList.stream().sorted(Comparator.comparing(m -> m.get("areaCode").toString())).collect(Collectors.toList()); List<Map<String,Object>> mapData = dataList.stream().sorted(Comparator.comparing(m -> m.get("areaCode").toString())).collect(Collectors.toList());
Map<String, Object> returnData = new HashMap<>();
returnData.put("map",mapData);
returnData.put("total",totalData);
redisUtils.setObj(PortalCacheKeys.getAreaShjzStats(vo), returnData); redisUtils.setObj(PortalCacheKeys.getAreaShjzStats(vo), returnData);
......
...@@ -100,13 +100,11 @@ ...@@ -100,13 +100,11 @@
</select> </select>
<select id="getAreaSubsidyStats" resultType="com.zq.portal.vo.StatsVo"> <select id="getAreaSubsidyStats" resultType="com.zq.portal.vo.StatsVo">
SELECT LEFT(AREACODE, #{size}) 'code', FF_DATE 'month',FF_ZD_PC 'hlnum', FF_ZD_MC 'hlamount',FF_KUN_PC 'shnum', FF_KUN_MC 'shamount' SELECT LEFT(AREACODE, #{size}) 'code', FF_DATE 'month',SUM(FF_ZD_PC ) 'hlnum', SUM(FF_ZD_MC) 'hlamount',SUM(FF_KUN_PC) 'shnum', SUM(FF_KUN_MC) 'shamount'
FROM `ff_data_jm` FROM `ff_data_jm`
WHERE WHERE
CHAR_LENGTH (LEFT ( AREACODE, #{size} )) = #{size} CHAR_LENGTH (LEFT ( AREACODE, #{size} )) = #{size}
<if test="month != null"> AND FF_DATE = DATE_FORMAT(NOW(),'%Y-%m')
AND DATE_FORMAT(FF_DATE, '%Y-%m')= #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''"> <if test="subAreaCode != null and subAreaCode != ''">
AND AREACODE LIKE CONCAT(#{subAreaCode}, '%') AND AREACODE LIKE CONCAT(#{subAreaCode}, '%')
</if> </if>
...@@ -114,7 +112,9 @@ ...@@ -114,7 +112,9 @@
</select> </select>
<select id="getEnjoySumStats" resultType="com.zq.portal.vo.StatsVo"> <select id="getEnjoySumStats" resultType="com.zq.portal.vo.StatsVo">
SELECT SUM(S_PC) 'num' , SUM(S_MC) 'amount' FROM ff_data_jm SELECT SUM(S_PC) 'num' , SUM(S_MC) 'amount'
FROM ff_data_jm
WHERE FF_DATE = DATE_FORMAT(NOW(),'%Y-%m')
</select> </select>
<select id="getYearIssueStats" resultType="com.zq.portal.vo.StatsVo"> <select id="getYearIssueStats" resultType="com.zq.portal.vo.StatsVo">
......
...@@ -107,6 +107,28 @@ ...@@ -107,6 +107,28 @@
</choose> </choose>
</select> </select>
<select id="getAreaUnderNumStats" resultType="com.zq.portal.vo.StatsVo">
SELECT
LEFT(h.UNIT_ID, #{size}) 'code',
h.ISCITY 'type',
SUM( h.SURE_POPULATION ) 'num'
FROM
ENBUZ_APPLY_HOME h
WHERE h.VP_STATE = 4
AND LEFT(h.UNIT_ID, #{size}) IS NOT NULL
<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;= '2021-12-01'
AND DATE_FORMAT( h.STOP_DATE, "%Y-%m-%d" ) >= '2021-12-01'
GROUP BY
LEFT(h.UNIT_ID, #{size}),
type
</select>
<select id="getAreaTotalNumStats" resultType="com.zq.portal.vo.StatsVo"> <select id="getAreaTotalNumStats" resultType="com.zq.portal.vo.StatsVo">
SELECT SELECT
h.ISCITY 'type', h.ISCITY 'type',
...@@ -146,7 +168,7 @@ ...@@ -146,7 +168,7 @@
--> -->
<select id="getFivesYearEnjoyStats" resultType="com.zq.portal.vo.StatsVo"> <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', SELECT LEFT(date, 4) 'year', type, SUM(num) 'num' FROM ( SELECT DATE_FORMAT(h.PERMIT_DATE, "%Y-%m") 'date',
h.ISCITY ( CASE h.ISCITY
WHEN 0 THEN '农村低保' WHEN 0 THEN '农村低保'
WHEN 1 THEN '城市低保' WHEN 1 THEN '城市低保'
WHEN 6 THEN '特困供养' WHEN 6 THEN '特困供养'
...@@ -202,8 +224,9 @@ ...@@ -202,8 +224,9 @@
mon_pay p mon_pay p
WHERE WHERE
p.pay_state = 2 p.pay_state = 2
AND DATE_FORMAT( p.pmonth, "%Y-%m-%d" ) &lt;= '2021-12-01' AND p.vp_state = 4
AND DATE_FORMAT( p.pmonth, "%Y-%m-%d" ) >= '2021-12-01' AND DATE_FORMAT( p.pmonth, "%Y-%m-%d" ) >= '2021-12-01'
AND DATE_FORMAT( p.pmonth, "%Y-%m-%d" ) &lt;= '2021-12-01'
AND CHAR_LENGTH (LEFT ( p.unit_id, #{size} )) = #{size} AND CHAR_LENGTH (LEFT ( p.unit_id, #{size} )) = #{size}
<if test="subAreaCode != null and subAreaCode != ''"> <if test="subAreaCode != null and subAreaCode != ''">
AND p.unit_id LIKE CONCAT(#{subAreaCode}, '%') AND p.unit_id LIKE CONCAT(#{subAreaCode}, '%')
......
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