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("获取子级殡葬火化分析列表")
......
......@@ -23,13 +23,13 @@ public class HyStatsController {
@ApiOperation("获取结婚离婚人数")
@PostMapping(value = "/getMarriageStats")
public ResultVo<VMarriageStats> getMarriageStats(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheMarriageStats(vo));
return ResultVo.success(hyStatsService.getMarriageStats(vo));//getCacheMarriageStats
}
@ApiOperation("获取地区下面婚姻统计列表")
@PostMapping(value = "/getAreaUnderMarriageStatsList")
public ResultVo getAreaUnderMarriageStatsList(@RequestBody StatsReqVo vo) {
return ResultVo.success(hyStatsService.getCacheAreaUnderMarriageStatsList(vo));
return ResultVo.success(hyStatsService.getAreaUnderMarriageStatsList(vo));//getCacheAreaUnderMarriageStatsList
}
@ApiOperation("获取近5年结婚离婚走势")
......
......@@ -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;
}
}
......@@ -58,11 +58,14 @@ public class HyStatsService {
SystemArea area = areaDao.getAreaByCode(vo.getAreaCode());
vo.setSubAreaCode(area.subAreaCode());
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
// 统计实体
VMarriageStats build = VMarriageStats.builder()
.areaCode(area.getCode())
.areaName(area.getName())
.year(2022)
.year(year)
.createTime(DateUtil.parseDate(DateUtil.today()))
.build();
......@@ -99,14 +102,14 @@ public class HyStatsService {
// 放进数据库 有时间条件的不存库
// VMarriageStats marriageStats = vMarriageStatsDao.selectOne(Wrappers.lambdaQuery(VMarriageStats.builder().year(vo.getYear() == null ? 0 : vo.getYear()).areaCode(area.getCode()).createTime(DateUtil.parseDate(DateUtil.today())).build()));
VMarriageStats marriageStats = vMarriageStatsDao.selectOne(Wrappers.lambdaQuery(VMarriageStats.builder().year(2022).areaCode(area.getCode()).createTime(DateUtil.parseDate(DateUtil.today())).build()));
VMarriageStats marriageStats = vMarriageStatsDao.selectOne(Wrappers.lambdaQuery(VMarriageStats.builder().year(year).areaCode(area.getCode()).createTime(DateUtil.parseDate(DateUtil.today())).build()));
if (marriageStats == null) {
vMarriageStatsDao.insert(build);
} else {
build.setId(marriageStats.getId());
vMarriageStatsDao.updateById(build);
}
vMarriageStatsDao.delete(Wrappers.lambdaQuery(VMarriageStats.builder().year(2022).areaCode("450000000000").createTime(DateUtil.parseDate(DateUtil.today())).build()));
return build;
}
......@@ -180,7 +183,7 @@ public class HyStatsService {
List<SystemArea> systemAreaList = areaDao.selectList(Wrappers.lambdaQuery(SystemArea.builder().parentId(vo.getAreaCode()).build()));
for (SystemArea systemArea : systemAreaList) {
vo.setAreaCode(systemArea.getCode());
VMarriageStats marriageStats = getCacheMarriageStats(vo);
VMarriageStats marriageStats = getMarriageStats(vo);
returnData.add(marriageStats);
}
......
......@@ -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));
}
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 >
......
......@@ -38,9 +38,7 @@
WHERE
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
......@@ -60,9 +58,7 @@
m.AIAX0072 = '1'
AND m.BIAX0075 = '1'
AND CHAR_LENGTH (LEFT ( t.YAB003, #{size} )) = #{size}
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if test="type != null and type != ''">
AND m.AIAX0001 = #{type}
</if>
......@@ -85,9 +81,7 @@
AND m.BIAX0075 = '1'
AND LEFT(m.AIAP0013,4) != LEFT(t.YAB003,4)
AND LEFT(m.AIAP0014,4) != LEFT(t.YAB003,4)
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
......@@ -102,9 +96,7 @@
WHERE m.AIAX0001 = 'IB'
AND m.BIAX0075 = '1'
AND m.AIAX0072 != '1'
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 LIKE CONCAT(#{subAreaCode},'%')
</if>
......@@ -117,9 +109,7 @@
WHERE m.AIAX0001 = 'IA'
AND m.BIAX0075 = '1'
AND m.AIAX0072 = '1'
<if test="year != null">
AND m.AIAX0059 = #{year}
</if>
AND m.AIAX0059 = DATE_FORMAT(NOW(),'%Y')
<if test="subAreaCode != null and subAreaCode != ''">
AND t.YAB003 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