|
|
|
|
@ -31,6 +31,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.format.annotation.DateTimeFormat; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.concurrent.CompletableFuture; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
@ -239,24 +240,14 @@ public class DataVRightsComfortController {
|
|
|
|
|
} |
|
|
|
|
for (ComfortMapIconVo re : res) { |
|
|
|
|
String departId = re.getDepartId(); |
|
|
|
|
List<String> allNodeIds = supDepartService.getAllNodeIds(departId); |
|
|
|
|
List<RpcApply> list = rpcApplyService.list(new LambdaQueryWrapper<RpcApply>() |
|
|
|
|
.between(RpcApply::getCrtTime, beginTime, finalEndTime) |
|
|
|
|
.in(RpcApply::getDepartId,allNodeIds) |
|
|
|
|
// .eq(RpcApply::getVerified,"0")
|
|
|
|
|
.eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue())); |
|
|
|
|
|
|
|
|
|
Set<String> caseNumbers = list.stream() |
|
|
|
|
.filter(one->StrUtil.isNotBlank(one.getDepartId())) |
|
|
|
|
.map(RpcApply::getCaseNumber) |
|
|
|
|
.collect(Collectors.toSet()); |
|
|
|
|
|
|
|
|
|
// 维权案件总数
|
|
|
|
|
re.setRightsNumber(caseNumbers.size()); |
|
|
|
|
// 受侵害人数
|
|
|
|
|
re.setVictimNumber(rpcApplyMapper.selectVictimNumberByOrg(beginTime,finalEndTime,departId)); |
|
|
|
|
// 打击处理人数
|
|
|
|
|
List<String> tortNames = rpcInfringerResultMapper.selectNamesByOrgTime(beginTime, finalEndTime,departId); |
|
|
|
|
Integer rightsNumber = rpcApplyMapper.selectMapRightsNumber(beginTime, finalEndTime, departId); |
|
|
|
|
Integer victimNumber = rpcApplyMapper.selectMapVictimNumber(beginTime, finalEndTime, departId); |
|
|
|
|
Long comfortPersonNumber = rpcApplyMapper.selectMapComfortPersonNumber(beginTime, finalEndTime, departId); |
|
|
|
|
List<String> tortNames = rpcApplyMapper.selectMaptHitPersonNumber(beginTime, finalEndTime, departId); |
|
|
|
|
BigDecimal comfortMoney = rpcApplyMapper.selectMapComfortMoney(beginTime, finalEndTime, departId); |
|
|
|
|
re.setRightsNumber(rightsNumber); |
|
|
|
|
re.setVictimNumber(victimNumber); |
|
|
|
|
re.setComfortPersonNumber(comfortPersonNumber); |
|
|
|
|
long initialListSize = tortNames.size(); |
|
|
|
|
long hitPersonNumber = tortNames.stream() |
|
|
|
|
.filter(s -> s.contains(",")).toList().size(); |
|
|
|
|
@ -270,20 +261,8 @@ public class DataVRightsComfortController {
|
|
|
|
|
}else{ |
|
|
|
|
re.setHitPersonNumber(initialListSize + nums - hitPersonNumber); |
|
|
|
|
} |
|
|
|
|
//抚慰金额
|
|
|
|
|
re.setComfortMoney(rpcApplyMapper.selectComfortMoneyBar(beginTime, finalEndTime, departId)); |
|
|
|
|
// CompletableFutureUtil.runSyncObject(() -> {
|
|
|
|
|
//
|
|
|
|
|
// re.setComfortMoney(rpcApplyMapper.selectComfortMoneyBarByOrg(beginTime, finalEndTime, departId));
|
|
|
|
|
// }).join();
|
|
|
|
|
CompletableFutureUtil.runSyncObject(() -> { |
|
|
|
|
// 抚慰人数
|
|
|
|
|
re.setComfortPersonNumber(rpcApplyService.orgCount(beginTime, finalEndTime, RpcApplyTypeEnum.COMFORT.getValue(), departId)); |
|
|
|
|
}).join(); |
|
|
|
|
re.setComfortMoney(comfortMoney); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("comfortMapVoList", res); |
|
|
|
|
return Result.success(data); |
|
|
|
|
} |
|
|
|
|
|