diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java index 17f2492..ca278ed 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java @@ -106,7 +106,10 @@ public class SubOneCaseVerifController { endTime= DateUtil.endOfDay(endTime); CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId); - long total =dataCaseVerifMapper.selectCount(new LambdaQueryWrapper().between(DataCaseVerif::getCreateTime,beginTime,endTime)); + long total =dataCaseVerifMapper.selectCount( + new LambdaQueryWrapper().between(DataCaseVerif::getCreateTime,beginTime,endTime) + .eq(DataCaseVerif::getSecondDepartId,departId) + ); overview.setTotal((int) total); int confirmed = overview.getConfirmed() != null?overview.getConfirmed():0; overview.setRate(NumberUtil.div((Number) (confirmed * 100),total ).doubleValue()); diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java index b6ee1ca..9d58ab1 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java @@ -24,6 +24,7 @@ import com.biutag.supervision.service.RpcApplyService; import com.biutag.supervision.service.SupDepartService; import com.biutag.supervision.service.SupDictDataService; import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil; +import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -90,11 +91,17 @@ public class SubOneRightsController { List pcsList = rpcApplyMapper.selectSubPcsProtectRightsBarList(beginTime, endTime, departId,10); // 维权案件情况 - 大队 List dbList = rpcApplyMapper.selectSubDdProtectRightsBarList(beginTime, endTime, departId,10); - + //抚慰金额-派出所 + List fxsjComfortMoneyRank = rpcApplyMapper.selectSubProtectRightsBarList(beginTime, endTime, departId,10); + //抚慰金额-大队 + List jsdwComfortMoneyRank=rpcApplyMapper.selectSubComfortMoneyBarList(beginTime, endTime, departId,10); JSONObject data = new JSONObject() .fluentPut("comfortOverview", comfortOverview) .fluentPut("fxsjRightsRankList",pcsList) - .fluentPut("jsdwRightsRankList",dbList); + .fluentPut("jsdwRightsRankList",dbList) + .fluentPut("fxsjComfortMoneyRank",fxsjComfortMoneyRank) + .fluentPut("jsdwComfortMoneyRank",jsdwComfortMoneyRank); + return Result.success(data); } @@ -205,6 +212,10 @@ public class SubOneRightsController { return Result.success(data); } + + + + // endregion //打处情况 @GetMapping("getPunishmentSituation") diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index c22b0aa..308ab04 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -105,7 +105,7 @@ public class Job { private final RpcApplySuperviseService rpcApplySuperviseService; // 每天一次 23:30:00 //todo 维权信息 -// @Scheduled(cron = "0 30 23 * * ?") + @Scheduled(cron = "0 30 23 * * ?") public void rights() { log.info("rights--------------------"); log.info("维权信息抓取中---------------------"); diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java index 778fb26..2441c11 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java @@ -268,6 +268,37 @@ public interface RpcApplyMapper extends BaseMapper { " GROUP BY sdp.short_name order by value desc") List selectSubDdProtectRightsBarList(Date beginTime, Date endTime, Integer departId, Integer departGroupId); + //二级大屏抚慰金额-派出所 + @Select("SELECT " + + " depart_name as name, " + + " ROUND(sum(p.provide_relief) / 10000, 2) as value " + + " from rpc_apply_person p " + + " left join rpc_apply r on p.rpc_id = r.rpc_id " + + " left JOIN sup_depart sdp on r.depart_id = sdp.id " + + " where " + + " sdp.pid= #{departId} " + + " and r.type = 2 " + + " and sdp.statistics_group_id = #{departGroupId}" + + " and r.crt_time between #{beginTime} and #{endTime} " + + " GROUP BY depart_name") + List selectSubProtectRightsBarList(Date beginTime, Date endTime, Integer departId, Integer departGroupId); + //二级大屏抚慰金额-大队 + @Select("SELECT " + + " depart_name as name, " + + " ROUND(sum(p.provide_relief) / 10000, 2) as value " + + " from rpc_apply_person p " + + " left join rpc_apply r on p.rpc_id = r.rpc_id " + + " left JOIN sup_depart sdp on r.depart_id = sdp.id " + + " where " + + " sdp.pid= #{departId} " + + " and r.type = 2 " + + " and sdp.statistics_group_id != #{departGroupId}" + + " and r.crt_time between #{beginTime} and #{endTime} " + + " GROUP BY depart_name") + List selectSubComfortMoneyBarList(Date beginTime, Date endTime, Integer departId, Integer departGroupId); + + + //民辅警受伤表 @Select(