|
|
|
|
@ -113,13 +113,17 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
map -> map.get("internal_id") == null ? "" : (String) map.get("internal_id") |
|
|
|
|
)); |
|
|
|
|
List<String> values = resultMap2.values().stream().filter(Objects::nonNull).toList();// 1011
|
|
|
|
|
Map<String, String> resultMap3 = idsByDepartIds.stream().filter(map -> map.get("external_id") != null).collect(Collectors.toMap( |
|
|
|
|
map -> (String) map.get("external_id"), |
|
|
|
|
map -> map.get("internal_short_name") == null ? "" : (String) map.get("internal_short_name") |
|
|
|
|
)); |
|
|
|
|
List<Map<String, Object>> resultList = statisticsDepartMapper.getGroupIdsByDepartIds(values); |
|
|
|
|
Map<String, Long> resultMap = resultList.stream().collect(Collectors.toMap( |
|
|
|
|
map -> (String) map.get("departId"), |
|
|
|
|
map -> (Long) map.get("groupId") |
|
|
|
|
)); |
|
|
|
|
List<Long> groupIds = new ArrayList<>(); |
|
|
|
|
generateBusinessPoliceList(happenTime, gBaseCJDSList, resultMap, resultMap2, groupIds, businessPoliceList, gBaseAJJBXXMapSR, gBaseAJJBXXMapLR, gBaseAJJBXXMapPR); |
|
|
|
|
generateBusinessPoliceList(happenTime, gBaseCJDSList, resultMap, resultMap2, resultMap3, groupIds, businessPoliceList, gBaseAJJBXXMapSR, gBaseAJJBXXMapLR, gBaseAJJBXXMapPR); |
|
|
|
|
List<Map<Long, Object>> nameList = statisticsGroupMapper.getNameByGroupIds(groupIds); |
|
|
|
|
Map<Long, String> names = nameList.stream().collect(Collectors.toMap( |
|
|
|
|
map -> (Long) map.get("groupId"), |
|
|
|
|
@ -136,14 +140,14 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
businessLogMapper.insert(new BusinessLog().setType("个人业务数据").setNum(gBaseCJDSList.size()).setActualNum(actualNum).setCreateTime(LocalDateTime.now())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void generateBusinessPoliceList(List<Date> happenTime, List<GBaseCJD> gBaseCJDSList, Map<String, Long> resultMap, Map<String, String> resultMap2, List<Long> groupIds, List<BusinessPolice> businessPoliceList, Map<String, GBaseAJJBXX> gBaseAJJBXXMapSR, Map<String, GBaseAJJBXX> gBaseAJJBXXMapLR, Map<String, GBaseAJJBXX> gBaseAJJBXXMapPR) { |
|
|
|
|
private static void generateBusinessPoliceList(List<Date> happenTime, List<GBaseCJD> gBaseCJDSList, Map<String, Long> resultMap, Map<String, String> resultMap2, Map<String, String> resultMap3, List<Long> groupIds, List<BusinessPolice> businessPoliceList, Map<String, GBaseAJJBXX> gBaseAJJBXXMapSR, Map<String, GBaseAJJBXX> gBaseAJJBXXMapLR, Map<String, GBaseAJJBXX> gBaseAJJBXXMapPR) { |
|
|
|
|
for (GBaseCJD gBaseCJD : gBaseCJDSList) { |
|
|
|
|
Long groupId = resultMap.get(resultMap2.get(gBaseCJD.getCjdxssdwdm())); |
|
|
|
|
if (groupId == null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
groupIds.add(groupId); |
|
|
|
|
BusinessPolice businessPolice = getJJDBusinessPolice(happenTime, gBaseCJD, groupId); |
|
|
|
|
BusinessPolice businessPolice = getJJDBusinessPolice(happenTime, gBaseCJD, groupId, resultMap2, resultMap3); |
|
|
|
|
businessPoliceList.add(businessPolice); |
|
|
|
|
} |
|
|
|
|
for (GBaseAJJBXX gBaseAJJBXX : gBaseAJJBXXMapSR.values()) { |
|
|
|
|
@ -152,7 +156,7 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
groupIds.add(groupId); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 4); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 4, resultMap2, resultMap3); |
|
|
|
|
businessPoliceList.add(businessPolice); |
|
|
|
|
} |
|
|
|
|
for (GBaseAJJBXX gBaseAJJBXX : gBaseAJJBXXMapLR.values()) { |
|
|
|
|
@ -161,7 +165,7 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
groupIds.add(groupId); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 5); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 5, resultMap2, resultMap3); |
|
|
|
|
businessPoliceList.add(businessPolice); |
|
|
|
|
} |
|
|
|
|
for (GBaseAJJBXX gBaseAJJBXX : gBaseAJJBXXMapPR.values()) { |
|
|
|
|
@ -170,7 +174,7 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
groupIds.add(groupId); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 6); |
|
|
|
|
BusinessPolice businessPolice = getAJJBXXBusinessPolice(happenTime, gBaseAJJBXX, groupId, 6, resultMap2, resultMap3); |
|
|
|
|
businessPoliceList.add(businessPolice); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -351,11 +355,11 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
private record ZFBAResult(List<Map<String, Object>> bar1, List<Map<String, Object>> bar2, List<Map<String, Object>> bar3, List<Map<String, Object>> bar4, List<Map<String, Object>> bar5, List<Map<String, Object>> bar6) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static BusinessPolice getJJDBusinessPolice(List<Date> happenTime, GBaseCJD gBaseCJD, Long groupId) { |
|
|
|
|
private static BusinessPolice getJJDBusinessPolice(List<Date> happenTime, GBaseCJD gBaseCJD, Long groupId, Map<String, String> resultMap2, Map<String, String> resultMap3) { |
|
|
|
|
BusinessPolice businessPolice = new BusinessPolice(); |
|
|
|
|
businessPolice.setDate(happenTime.get(0)); |
|
|
|
|
businessPolice.setDepartId(gBaseCJD.getCjdxssdwdm()); |
|
|
|
|
businessPolice.setDepartName(gBaseCJD.getCjdxssdwmc()); |
|
|
|
|
businessPolice.setDepartId(resultMap2.get(gBaseCJD.getCjdxssdwdm())); |
|
|
|
|
businessPolice.setDepartName(resultMap3.get(gBaseCJD.getCjdxssdwdm())); |
|
|
|
|
businessPolice.setGroupId(groupId); |
|
|
|
|
businessPolice.setNumber(gBaseCJD.getClwbrxmTotal()); |
|
|
|
|
businessPolice.setPoliceName(gBaseCJD.getClwbrxm()); |
|
|
|
|
@ -373,11 +377,11 @@ public class BusinessPoliceService extends ServiceImpl<BusinessPoliceMapper, Bus
|
|
|
|
|
return businessPolice; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static BusinessPolice getAJJBXXBusinessPolice(List<Date> happenTime, GBaseAJJBXX gBaseAJJBXX, Long groupId, int type) { |
|
|
|
|
private static BusinessPolice getAJJBXXBusinessPolice(List<Date> happenTime, GBaseAJJBXX gBaseAJJBXX, Long groupId, int type, Map<String, String> resultMap2, Map<String, String> resultMap3) { |
|
|
|
|
BusinessPolice businessPolice = new BusinessPolice(); |
|
|
|
|
businessPolice.setDate(happenTime.get(0)); |
|
|
|
|
businessPolice.setDepartId(gBaseAJJBXX.getBADWIDdm()); |
|
|
|
|
businessPolice.setDepartName(gBaseAJJBXX.getBADWIDmc()); |
|
|
|
|
businessPolice.setDepartId(resultMap2.get(gBaseAJJBXX.getBADWIDdm())); |
|
|
|
|
businessPolice.setDepartName(resultMap3.get(gBaseAJJBXX.getBADWIDdm())); |
|
|
|
|
businessPolice.setGroupId(groupId); |
|
|
|
|
businessPolice.setNumber(gBaseAJJBXX.getBARNum()); |
|
|
|
|
businessPolice.setPoliceName(gBaseAJJBXX.getXM()); |
|
|
|
|
|