|
|
|
|
@ -269,7 +269,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
System.out.println("开始查询新sql" + newSql); |
|
|
|
|
List<Map<String, Object>> allData = modelClueDataMapper.selectByUniqueKeys(newSql); |
|
|
|
|
if (modelId == 26) { |
|
|
|
|
filterDataForModel26(allData); |
|
|
|
|
return filterDataForModel26(allData); |
|
|
|
|
} |
|
|
|
|
System.out.println("查询新sql完成,结果数量:" + allData.size()); |
|
|
|
|
String originalFieldName = getKeyFieldName(sql); |
|
|
|
|
@ -293,7 +293,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
return needsInsertModelClues; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void filterDataForModel26(List<Map<String, Object>> allData) { |
|
|
|
|
private List<ModelClue> filterDataForModel26(List<Map<String, Object>> allData) { |
|
|
|
|
List<Map<String, Object>> filteredData = allData.stream().filter(map -> map.get("ajbh") != null && map.get("zjhm") != null).toList(); |
|
|
|
|
Map<String, Map<String, List<Map<String, Object>>>> groupedData = filteredData.stream() |
|
|
|
|
.collect(Collectors.groupingBy( |
|
|
|
|
@ -345,11 +345,27 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
System.out.println("模型26筛选后的alldata数量:" + allData.size()); |
|
|
|
|
System.out.println("查询新sql完成,结果数量:" + allData.size()); |
|
|
|
|
List<ModelClue> modelClues = new ArrayList<>(); |
|
|
|
|
for (Map<String, Object> data : allData) { |
|
|
|
|
ModelClue modelClue = new ModelClue(); |
|
|
|
|
modelClue.setData(JSONObject.toJSONString(data)); |
|
|
|
|
modelClue.setDistributionState("0"); |
|
|
|
|
SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getExternalId, data.get("csid")).last("LIMIT 1")); |
|
|
|
|
if (supExternalDepart != null && supExternalDepart.getInternalShortName() != null && !supExternalDepart.getInternalShortName().isEmpty()) { |
|
|
|
|
modelClue.setInvolveDepartName(supExternalDepart.getInternalShortName()); |
|
|
|
|
modelClue.setInvolveDepartId(supExternalDepart.getInternalId()); |
|
|
|
|
} |
|
|
|
|
setPerson(26, modelClue, data); |
|
|
|
|
generateThingDesc(26, modelClue, data); |
|
|
|
|
modelClues.add(modelClue); |
|
|
|
|
} |
|
|
|
|
return modelClues; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setPerson(Integer modelId, ModelClue modelClue, Map<String, Object> data) { |
|
|
|
|
// 执法区域人员表
|
|
|
|
|
if (modelId == 3) { |
|
|
|
|
if (modelId == 3 || modelId == 26) { |
|
|
|
|
String bar1 = (String) data.get("bar1"); |
|
|
|
|
String bar2 = (String) data.get("bar2"); |
|
|
|
|
String involvePoliceName = (bar1 != null && !bar1.isEmpty() && bar2 != null && !bar2.isEmpty()) |
|
|
|
|
|