|
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
|
|
|
|
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; |
|
|
|
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum; |
|
|
|
import com.biutag.supervision.mapper.RpcApplyMapper; |
|
|
|
import com.biutag.supervision.mapper.RpcApplyMapper; |
|
|
|
import com.biutag.supervision.mapper.RpcInfringerResultMapper; |
|
|
|
import com.biutag.supervision.mapper.RpcInfringerResultMapper; |
|
|
|
@ -14,11 +13,9 @@ import com.biutag.supervision.pojo.dto.common.PieItem; |
|
|
|
import com.biutag.supervision.pojo.entity.RpcApply; |
|
|
|
import com.biutag.supervision.pojo.entity.RpcApply; |
|
|
|
import com.biutag.supervision.pojo.entity.RpcInfringerResult; |
|
|
|
import com.biutag.supervision.pojo.entity.RpcInfringerResult; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
import com.biutag.supervision.pojo.entity.SupDictData; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.model.DataRightsComfortModel; |
|
|
|
import com.biutag.supervision.pojo.model.DataRightsComfortModel; |
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.vo.ComfortMapIconVo; |
|
|
|
import com.biutag.supervision.pojo.vo.ComfortMapIconVo; |
|
|
|
import com.biutag.supervision.pojo.vo.EchartsVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.service.DataRightsComfortService; |
|
|
|
import com.biutag.supervision.service.DataRightsComfortService; |
|
|
|
import com.biutag.supervision.service.RpcApplyService; |
|
|
|
import com.biutag.supervision.service.RpcApplyService; |
|
|
|
import com.biutag.supervision.service.SupDepartService; |
|
|
|
import com.biutag.supervision.service.SupDepartService; |
|
|
|
@ -141,16 +138,6 @@ public class DataVRightsComfortController { |
|
|
|
return new PieItem(name, (int) (size - number +numData)); |
|
|
|
return new PieItem(name, (int) (size - number +numData)); |
|
|
|
} |
|
|
|
} |
|
|
|
}).toList()); |
|
|
|
}).toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String, List<RpcApply>> collect = list.stream()
|
|
|
|
|
|
|
|
// .filter(s-> StrUtil.isNotEmpty(s.getInfringerHandle()) )
|
|
|
|
|
|
|
|
// .collect(Collectors.groupingBy(RpcApply::getInfringerHandle));
|
|
|
|
|
|
|
|
// // 打处情况
|
|
|
|
|
|
|
|
// result.setPunishmentSituation(collect.keySet().stream().map(name -> {
|
|
|
|
|
|
|
|
// return new PieItem(name, collect.get(name).size());
|
|
|
|
|
|
|
|
// }).toList());
|
|
|
|
|
|
|
|
}), |
|
|
|
}), |
|
|
|
CompletableFutureUtil.runSyncObject(() -> { |
|
|
|
CompletableFutureUtil.runSyncObject(() -> { |
|
|
|
// 抚慰人数
|
|
|
|
// 抚慰人数
|
|
|
|
@ -160,25 +147,7 @@ public class DataVRightsComfortController { |
|
|
|
// 抚慰金额(万元)
|
|
|
|
// 抚慰金额(万元)
|
|
|
|
result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, finalEndTime)); |
|
|
|
result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, finalEndTime)); |
|
|
|
}), |
|
|
|
}), |
|
|
|
// CompletableFutureUtil.runSyncObject(() -> {
|
|
|
|
|
|
|
|
// // 抚慰金额情况 - 分县市局
|
|
|
|
|
|
|
|
// result.setCountyComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 3));
|
|
|
|
|
|
|
|
// }),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// CompletableFutureUtil.runSyncObject(() -> {
|
|
|
|
|
|
|
|
// // 抚慰金额情况 - 局属单位
|
|
|
|
|
|
|
|
// result.setBureauComfortMoneyBarList(rpcApplyMapper.selectComfortMoneyBarList(beginTime, finalEndTime, 4));
|
|
|
|
|
|
|
|
// }),
|
|
|
|
|
|
|
|
// CompletableFutureUtil.runSyncObject(()->{
|
|
|
|
|
|
|
|
// // 维权案件情况 - 分县市局
|
|
|
|
|
|
|
|
// result.setCountyRightsBarList(rpcApplyMapper.selectProtectRightsBarList(beginTime, finalEndTime, 3));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CompletableFutureUtil.runSyncObject(()->{
|
|
|
|
|
|
|
|
// // 维权案件情况 - 局属单位
|
|
|
|
|
|
|
|
// result.setBureauRightsBarList(rpcApplyMapper.selectProtectRightsBarList(beginTime, finalEndTime, 4));
|
|
|
|
|
|
|
|
// }),
|
|
|
|
|
|
|
|
CompletableFutureUtil.runSyncObject(()->{ |
|
|
|
CompletableFutureUtil.runSyncObject(()->{ |
|
|
|
//案件类别 - 刑事
|
|
|
|
//案件类别 - 刑事
|
|
|
|
result.setCrownCaseBarList(rpcApplyMapper.selectCaseData(beginTime, finalEndTime,"1")); |
|
|
|
result.setCrownCaseBarList(rpcApplyMapper.selectCaseData(beginTime, finalEndTime,"1")); |
|
|
|
@ -186,37 +155,35 @@ public class DataVRightsComfortController { |
|
|
|
CompletableFutureUtil.runSyncObject(()->{ |
|
|
|
CompletableFutureUtil.runSyncObject(()->{ |
|
|
|
//案件类别 - 行政
|
|
|
|
//案件类别 - 行政
|
|
|
|
result.setAdministrativeCaseList(rpcApplyMapper.selectCaseData( beginTime, finalEndTime,"2")); |
|
|
|
result.setAdministrativeCaseList(rpcApplyMapper.selectCaseData( beginTime, finalEndTime,"2")); |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CompletableFutureUtil.runSyncObject(() -> { |
|
|
|
|
|
|
|
// 抚慰情况
|
|
|
|
|
|
|
|
List<PieItem> data = rpcApplyMapper.selectComfortPoliceInjurySituation(beginTime, finalEndTime); |
|
|
|
|
|
|
|
//获取字典中的民警类型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SupDictData> supDictDataList = supDictDataService.list( new LambdaQueryWrapper<SupDictData>().eq(SupDictData::getDictType,"personType")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.forEach(s->{ |
|
|
|
|
|
|
|
Optional<SupDictData> supDictData = supDictDataList.stream().filter(v->v.getDictValue().equals(s.getName())).findFirst(); |
|
|
|
|
|
|
|
supDictData.ifPresent(dictData -> s.setName(dictData.getDictLabel())); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.setComfortPoliceInjurySituation(data); |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
CompletableFutureUtil.runSyncObject(() -> { |
|
|
|
|
|
|
|
// 民辅警受伤类别
|
|
|
|
|
|
|
|
result.setComfortInjuryCategory(rpcApplyMapper.selectComfortInjuryCategory(beginTime, finalEndTime)); |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CompletableFutureUtil.runSyncObject(() -> {
|
|
|
|
|
|
|
|
// // 抚慰情况
|
|
|
|
|
|
|
|
// List<PieItem> data = rpcApplyMapper.selectComfortPoliceInjurySituation(beginTime, finalEndTime);
|
|
|
|
|
|
|
|
// //获取字典中的民警类型
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<SupDictData> supDictDataList = supDictDataService.list( new LambdaQueryWrapper<SupDictData>().eq(SupDictData::getDictType,"personType"));
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// data.forEach(s->{
|
|
|
|
|
|
|
|
// Optional<SupDictData> supDictData = supDictDataList.stream().filter(v->v.getDictValue().equals(s.getName())).findFirst();
|
|
|
|
|
|
|
|
// supDictData.ifPresent(dictData -> s.setName(dictData.getDictLabel()));
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// result.setComfortPoliceInjurySituation(data);
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// CompletableFutureUtil.runSyncObject(() -> {
|
|
|
|
|
|
|
|
// // 民辅警受伤类别
|
|
|
|
|
|
|
|
// result.setComfortInjuryCategory(rpcApplyMapper.selectComfortInjuryCategory(beginTime, finalEndTime));
|
|
|
|
|
|
|
|
// })
|
|
|
|
).join(); |
|
|
|
).join(); |
|
|
|
return Result.success(result); |
|
|
|
return Result.success(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 抚慰情况
|
|
|
|
// 抚慰情况
|
|
|
|
@GetMapping("/getComfortSituation") |
|
|
|
@PostMapping("/getComfortSituation") |
|
|
|
public Result<JSONObject> getComfortSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
|
|
public Result<JSONObject> getComfortSituation(@RequestBody DataVRequest request) { |
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
|
|
List<PieItem> comfortPoliceInjurySituation = rpcApplyMapper.selectComfortSituation(request.getBeginTime(), request.getEndTime()); |
|
|
|
endTime = DateUtil.endOfDay(endTime); |
|
|
|
JSONObject data = new JSONObject().fluentPut("comfortPoliceInjurySituation", comfortPoliceInjurySituation); |
|
|
|
List<PieItem> comfortSituationList = rpcApplyMapper.selectComfortSituation(beginTime, endTime); |
|
|
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("comfortSituationList", comfortSituationList); |
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
return Result.success(data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -269,44 +236,20 @@ public class DataVRightsComfortController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 右边
|
|
|
|
// region 右边
|
|
|
|
// 民辅警受伤人数情况和受伤类别
|
|
|
|
@Operation(summary = "民辅警受伤情况") |
|
|
|
@GetMapping("/getPoliceHurtSituationAndHurtType") |
|
|
|
@PostMapping("/getPoliceHurtSituationAndHurtType") |
|
|
|
public Result<JSONObject> getPoliceHurtSituationAndHurtType(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
|
|
public Result<JSONObject> getPoliceHurtSituationAndHurtType(@RequestBody DataVRequest request) { |
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
|
|
return datavService.getPoliceHurtSituationAndHurtType(request); |
|
|
|
endTime = DateUtil.endOfDay(endTime); |
|
|
|
|
|
|
|
List<EchartsVo> policeHurtSituationList = rpcApplyMapper.getPoliceHurtSituation(beginTime, endTime); // 人数情况
|
|
|
|
|
|
|
|
List<EchartsVo> policeHurtTypeList = rpcApplyMapper.getPoliceHurtType(beginTime, endTime); // 受伤类别
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
|
|
|
|
.fluentPut("policeHurtSituationList", policeHurtSituationList) |
|
|
|
|
|
|
|
.fluentPut("policeHurtTypeList", policeHurtTypeList); |
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 发案情况占比
|
|
|
|
|
|
|
|
@GetMapping("/getCaseAriseSituationRate") |
|
|
|
|
|
|
|
public Result<JSONObject> getCaseAriseSituationRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
|
|
|
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
|
|
|
|
|
|
endTime = DateUtil.endOfDay(endTime); |
|
|
|
|
|
|
|
// 发案环节
|
|
|
|
|
|
|
|
List<EchartsVo> incidentLinkList =rpcApplyMapper.getIncidentLink(beginTime, endTime); |
|
|
|
|
|
|
|
// 发案警种
|
|
|
|
|
|
|
|
List<EchartsVo> incidentPoliceList = rpcApplyMapper.getIncidentPolice(beginTime, endTime); |
|
|
|
|
|
|
|
List<SupDictData> supDictDataList = supDictDataService.list( new LambdaQueryWrapper<SupDictData>().eq(SupDictData::getDictType,"personType")); |
|
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(incidentLinkList)){ |
|
|
|
|
|
|
|
incidentPoliceList.forEach(s->{ |
|
|
|
|
|
|
|
Optional<SupDictData> supDictData = supDictDataList.stream().filter(v->v.getDictValue().equals(s.getName())).findFirst(); |
|
|
|
|
|
|
|
supDictData.ifPresent(dictData -> s.setName(dictData.getDictLabel())); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 发案单位
|
|
|
|
|
|
|
|
List<EchartsVo> incidentOrgList = rpcApplyMapper.getIncidentOrg(beginTime, endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject() |
|
|
|
@Operation(summary = "发案情况占比") |
|
|
|
.fluentPut("incidentLinkList", incidentLinkList) |
|
|
|
@PostMapping("/getCaseAriseSituationRate") |
|
|
|
.fluentPut("incidentPoliceTypeList", incidentPoliceList) |
|
|
|
public Result<JSONObject> getCaseAriseSituationRate(@RequestBody DataVRequest request) { |
|
|
|
.fluentPut("incidentOrgList", incidentOrgList); |
|
|
|
return datavService.getCaseAriseSituationRate(request); |
|
|
|
return Result.success(data); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|