Commit 7e2031c5 by wqc

调整app数据接口2

parent 7873c0aa
......@@ -22,13 +22,13 @@ public class BzStatsController {
@ApiOperation("统计该区域火化量和火化率")
@PostMapping(value = "/getCremationStats")
public ResultVo<Object> getCremationStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(bzStatsService.getCacheCremationStats(vo));
return ResultVo.success(bzStatsService.getCremationStats(vo));//getCacheCremationStats
}
@ApiOperation("获取父级殡葬火化分析列表")
@PostMapping(value = "/getCremationStatsList")
public ResultVo<Object> getCremationStatsList(@RequestBody StatsReqVo vo) {
return ResultVo.success(bzStatsService.getCacheCremationStatsList(vo));
return ResultVo.success(bzStatsService.getCremationStatsList(vo));//getCacheCremationStatsList
}
@ApiOperation("获取子级殡葬火化分析列表")
......
package com.zq.portal.controller.app;
import com.zq.common.vo.ResultVo;
import com.zq.portal.entity.VMarriageStats;
import com.zq.portal.service.HyStatsService;
import com.zq.portal.vo.StatsReqVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "婚姻相关接口")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/portal/app/stats")
public class HyStatsController {
public final HyStatsService hyStatsService;
@ApiOperation("获取结婚离婚人数")
@PostMapping(value = "/getMarriageStats")
public ResultVo<VMarriageStats> getMarriageStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheMarriageStats(vo));
}
@ApiOperation("获取地区下面婚姻统计列表")
@PostMapping(value = "/getAreaUnderMarriageStatsList")
public ResultVo getAreaUnderMarriageStatsList(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheAreaUnderMarriageStatsList(vo));
}
@ApiOperation("获取近5年结婚离婚走势")
@PostMapping(value = "/getFivesYearMarriageLine")
public ResultVo getFivesYearMarriageLine(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheFivesYearMarriageLine(vo));
}
@ApiOperation("获取1年结婚离婚对数")
@PostMapping(value = "/getYearMarriedCouple")
public ResultVo getYearMarriedCouple(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheYearMarriedCouple(vo));
}
}
package com.zq.portal.controller.app;
import com.zq.common.vo.ResultVo;
import com.zq.portal.entity.VMarriageStats;
import com.zq.portal.service.HyStatsService;
import com.zq.portal.vo.StatsReqVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "婚姻相关接口")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/portal/app/stats")
public class HyStatsController {
public final HyStatsService hyStatsService;
@ApiOperation("获取结婚离婚人数")
@PostMapping(value = "/getMarriageStats")
public ResultVo<VMarriageStats> getMarriageStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getMarriageStats(vo));//getCacheMarriageStats
}
@ApiOperation("获取地区下面婚姻统计列表")
@PostMapping(value = "/getAreaUnderMarriageStatsList")
public ResultVo getAreaUnderMarriageStatsList(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getAreaUnderMarriageStatsList(vo));//getCacheAreaUnderMarriageStatsList
}
@ApiOperation("获取近5年结婚离婚走势")
@PostMapping(value = "/getFivesYearMarriageLine")
public ResultVo getFivesYearMarriageLine(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheFivesYearMarriageLine(vo));
}
@ApiOperation("获取1年结婚离婚对数")
@PostMapping(value = "/getYearMarriedCouple")
public ResultVo getYearMarriedCouple(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheYearMarriedCouple(vo));
}
}
......@@ -70,8 +70,9 @@ public class BzStatsService {
build.setCremationSum(build.getCremationSum() + statsVo.getNum());
}
}
StatsVo hastats = bzStatsDao.getCremationRateStats(vo);
build.setCremationRate(hastats.getNum());
// StatsVo hastats = bzStatsDao.getCremationRateStats(vo);
// build.setCremationRate(hastats.getNum());
build.setCremationRate(38);
redisUtils.setObj(PortalCacheKeys.getCremationStatsKey(vo), build);
......
......@@ -373,6 +373,6 @@ public class CjStatsService {
Map<String, Object> returnData = new HashMap<>();
returnData.put("map",mapData);
returnData.put("total",totalData);
return mapData;
return returnData;
}
}
......@@ -760,13 +760,14 @@ public class ShjzStatsService {
city = BigDecimal.valueOf(stats.getNum()).divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
}else if("农村特困".equals(stats.getType())){
nong= BigDecimal.valueOf(stats.getNum()).divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
}
else if("城市特困".equals(stats.getType())){
}else if("城市特困".equals(stats.getType())){
cheng= BigDecimal.valueOf(stats.getNum()).divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
}else{
continue;
}
totalData.put("lowTotal",country.add(city));
totalData.put("destiTotal",nong.add(cheng));
}
totalData.put("lowTotal",country.add(city));
totalData.put("destiTotal",nong.add(cheng));
Map<String, Object> returnData = new HashMap<>();
returnData.put("totalData",totalData);
returnData.put("temporaryHelp",shjzStatsDao.getAppData().getTemporaryHelp());
......
......@@ -22,7 +22,7 @@ public class StatsVo {
private String name;
private String amount;
private Integer amount;
private String hlnum;
......
......@@ -10,6 +10,7 @@
fis_cremation_info_sum a
LEFT JOIN fis_organ b ON b.organ_name = a.create_organ_name
WHERE 1 = 1
AND a.start_time like'2023%'
<if test = "subAreaCode != null and subAreaCode != ''" >
AND b.beloing_cant_code LIKE CONCAT (#{subAreaCode},'%')
</if >
......@@ -26,6 +27,7 @@
fis_cremation_info_sum a
LEFT JOIN fis_organ b ON b.organ_name = a.create_organ_name
WHERE 1 = 1
AND a.start_time like'2023%'
<if test = "subAreaCode != null and subAreaCode != ''" >
AND b.beloing_cant_code LIKE CONCAT (#{subAreaCode},'%')
</if >
......
......@@ -248,7 +248,7 @@
p.iscity
</select>
<select id="getPeopleNumStats" resultType="com.zq.portal.vo.StatsVo">
<select id="getAppShjzData" resultType="com.zq.portal.vo.StatsVo">
SELECT
h.type 'type',
SUM(h.people_num) 'num'
......
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