Commit 8e7fe087 by wqc

APP残疾页面更改

parent f227ef93
......@@ -67,4 +67,10 @@ public interface PortalFeign {
@PostMapping("/stats/getAreaUnderNumStats")
ResultVo getAreaUnderNumStats(@RequestBody Map<String, Object> paramsMap);
@PostMapping("/stats/getEnjoySubsidyStats")
ResultVo getEnjoySubsidyStats(Map<String, Object> paramsMap);
@PostMapping("/stats/getEnjoySumStatsData")
ResultVo getEnjoySumStatsData(Map<String, Object> paramsMap);
}
......@@ -92,6 +92,22 @@ public interface IApiLogic extends IApiCommon {
ApiResp getYearDisabledIssueStats(ApiForm form);
/**
* 获取在享补贴统计
*
* @param form
* @return
*/
ApiResp getEnjoySubsidyStats(ApiForm form);
/**
* 获取在享补贴统计
*
* @param form
* @return
*/
ApiResp getEnjoySumStatsData(ApiForm form);
/**
* 获取区域社会救助统计列表
*
* @param form
......
......@@ -91,6 +91,16 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
}
@Override
public ApiResp getEnjoySubsidyStats(ApiForm form) {
return ApiUtils.toApiResp(form, portalFeign.getEnjoySubsidyStats(form.getParamsMap()));
}
@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()));
}
......
......@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
@Api(tags = "残疾统计相关接口")
@RequiredArgsConstructor
@RestController
......@@ -39,4 +41,16 @@ public class CjStatsController {
return ResultVo.success(cjStatsService.getCacheAreaDisabledIssueStats(vo));
}
@ApiOperation("区域在享发放统计")
@PostMapping(value = "/getEnjoySubsidyStats")
public ResultVo getEnjoySubsidyStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(cjStatsService.getCacheEnjoySubsidyStats(vo));
}
@ApiOperation("在享发放总数")
@PostMapping(value = "/getEnjoySumStatsData")
public ResultVo getEnjoySumStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(cjStatsService.getCacheEnjoySumStatsData(vo));
}
}
......@@ -69,4 +69,8 @@ public interface CjStatsDao {
List<StatsVo> getYearIssueStats(StatsReqVo vo);
List<Map<String, Object>> search(SearchReqVo vo);
List<StatsVo> getAreaSubsidyStats(StatsReqVo vo);
List<StatsVo> getEnjoySumStats(StatsReqVo vo);
}
......@@ -76,6 +76,10 @@ public abstract class PortalCacheKeys {
return PREFIX + "getAreaDisabledIssueStats." + vo.getAreaCode() + "." + vo.getYear();
}
public static String getEnjoySubsidyStatsKey(StatsReqVo vo) {
return PREFIX + "getEnjoySubsidyStats." + vo.getAreaCode() + "." + vo.getYear();
}
// 获取区域养老院统计列表
public static String getAreaNursingStatsListKey(StatsReqVo vo) {
return PREFIX + "getAreaNursingStatsList." + vo.getAreaCode() + "." + vo.getYear() + "." + vo.getType();
......@@ -135,4 +139,9 @@ public abstract class PortalCacheKeys {
public static String getAreaShjzStats(StatsReqVo vo) {
return PREFIX + "getAreaShjzStats." + vo.getAreaCode();
}
//获取两项补贴统计
public static String getEnjoySumStatsKey(StatsReqVo vo) {
return PREFIX + "getEnjoySumStats." + vo.getAreaCode();
}
}
......@@ -278,4 +278,77 @@ public class CjStatsService {
}
return PagingUtils.paging(vo, cjStatsDao::search);
}
public Object getCacheEnjoySubsidyStats(StatsReqVo vo) {
Object obj = redisUtils.getObj(PortalCacheKeys.getEnjoySubsidyStatsKey(vo));
if (obj != null) {
return obj;
}
return getEnjoySubsidyStats(vo);
}
//区域补贴在享人数
public Object getEnjoySubsidyStats(StatsReqVo vo) {
if (StringUtils.isBlank(vo.getAreaCode())) {
vo.setAreaCode("450000000000");
}
SystemArea systemArea = areaDao.selectById(vo.getAreaCode());
vo.setSubAreaCode(systemArea.subAreaCode());
vo.setSize(SystemArea.getNextLevelLength(systemArea.getType()));
List<String> areaList = new ArrayList<>();
List<String> nursingSubsidyNumList = new ArrayList<>();//护理补贴
List<String> nursingSubsidyAmountList = new ArrayList<>();
List<String> livingAllowanceNumList = new ArrayList<>();//生活补贴
List<String> livingAllowanceAmountList = new ArrayList<>();
List<StatsVo> subsidyStats = cjStatsDao.getAreaSubsidyStats(vo);
for (StatsVo subsidyStat : subsidyStats) {
SystemArea area = areaDao.selectById(SystemArea.patchZero(subsidyStat.getCode()));
if (area == null) {
continue;
}
areaList.add(area.getName());
nursingSubsidyNumList.add(subsidyStat.getHlnum());
nursingSubsidyAmountList.add(subsidyStat.getHlamount());
livingAllowanceNumList.add(subsidyStat.getShnum());
livingAllowanceAmountList.add(subsidyStat.getShamount());
vo.setSubAreaCode(subsidyStat.getCode());
}
Map<String, Object> data = new HashMap<>();
data.put("areaList", areaList);
data.put("nursingSubsidyNum", nursingSubsidyNumList);
data.put("nursingSubsidyAmount", nursingSubsidyAmountList);
data.put("livingAllowanceNum", livingAllowanceNumList);
data.put("livingAllowanceAmount", livingAllowanceAmountList);
redisUtils.setObj(PortalCacheKeys.getEnjoySubsidyStatsKey(vo), data);
return data;
}
public Object getCacheEnjoySumStatsData(StatsReqVo vo) {
Object obj = redisUtils.getObj(PortalCacheKeys.getEnjoySumStatsKey(vo));
if (obj != null) {
return obj;
}
return getEnjoySumStatsData(vo);
}
public Object getEnjoySumStatsData(StatsReqVo vo) {
List<Map<String, Object>> returnData = new ArrayList<>();
List<StatsVo> enjoySumStats = cjStatsDao.getEnjoySumStats(vo);
for (StatsVo statsVo : enjoySumStats) {
Map<String, Object> data = new HashMap<>();
data.put("num", statsVo.getNum());
data.put("amout", statsVo.getAmount());
returnData.add(data);
}
redisUtils.setObj(PortalCacheKeys.getYearDisabledIssueStatsKey(vo), returnData);
return returnData;
}
}
......@@ -24,6 +24,14 @@ public class StatsVo {
private String amount;
private String hlnum;
private String hlamount;
private String shnum;
private String shamount;
private String code;
private String date;
......
......@@ -99,6 +99,24 @@
GROUP BY LEFT(UNIT_ID, #{size})
</select>
<select id="getAreaSubsidyStats" resultType="com.zq.portal.vo.StatsVo">
SELECT LEFT(AREACODE, 6) 'code', FF_DATE 'month',FF_ZD_PC 'hlnum', FF_ZD_MC 'hlamount',FF_KUN_PC 'shnum', FF_KUN_MC 'shamount'
FROM `ff_data_jm`
WHERE
CHAR_LENGTH (LEFT ( AREACODE, #{size} )) = #{size}
<if test="month != null">
AND DATE_FORMAT(FF_DATE, '%Y-%m')= #{year}
</if>
<if test="subAreaCode != null and subAreaCode != ''">
AND AREACODE LIKE CONCAT(#{subAreaCode}, '%')
</if>
GROUP BY LEFT(AREACODE, #{size})
</select>
<select id="getEnjoySumStats" resultType="com.zq.portal.vo.StatsVo">
SELECT SUM(S_PC) 'num' , SUM(S_MC) 'amount' FROM ff_data_jm
</select>
<select id="getYearIssueStats" resultType="com.zq.portal.vo.StatsVo">
SELECT APPLY_TYPE_ID 'type', GRANT_YEAR 'year', SUM( COUNT_PEOPLE ) 'num', SUM( SUM_MONEY ) 'amount'
FROM `statics_grant`
......
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