|
|
|
|
@ -236,6 +236,9 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
} else if (modelId == 22) { // 22号模型:执法记录仪使用不规范问题
|
|
|
|
|
getModelCluesForModel22(sql, modelClues); |
|
|
|
|
return modelClues; |
|
|
|
|
} else if (modelId == 25) { // 25号模型:重点人员管控人数过多
|
|
|
|
|
getModelCluesForModel25(sql, modelClues); |
|
|
|
|
return modelClues; |
|
|
|
|
}else { |
|
|
|
|
System.out.println("模型" + modelId + "开始查询数据库"); |
|
|
|
|
modelClues = modelClueDataMapper.selectDataByDynamicSql(sql); |
|
|
|
|
@ -780,6 +783,33 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void getModelCluesForModel25(String sql, List<ModelClue> modelClues) { |
|
|
|
|
System.out.println("模型25开始查询数据库"); |
|
|
|
|
List<Map<String, Object>> sqlList = modelClueDataMapper.selectByUniqueKeys(sql); |
|
|
|
|
System.out.println("模型25查询数据库完毕"); |
|
|
|
|
if (sqlList.isEmpty()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
for (Map<String, Object> map : sqlList) { |
|
|
|
|
ModelClue newModelClue = new ModelClue(); |
|
|
|
|
newModelClue.setUniqueKey((String) map.get("xzdpcsdm") + map.get("xzdzzr")); |
|
|
|
|
newModelClue.setNegativeIdEx((String) map.get("xzdpcsdm") + map.get("xzdzzr")); |
|
|
|
|
newModelClue.setInvolveDepartName((String) map.get("xzdpcs")); |
|
|
|
|
SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getInternalId, map.get("xzdpcsdm")).last("LIMIT 1")); |
|
|
|
|
if (supExternalDepart != null) { |
|
|
|
|
if (supExternalDepart.getInternalId() != null) { |
|
|
|
|
newModelClue.setInvolveDepartId(supExternalDepart.getInternalId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
newModelClue.setData(JSONObject.toJSONString(map)); |
|
|
|
|
newModelClue.setDistributionState("0"); |
|
|
|
|
newModelClue.setThingDesc( |
|
|
|
|
"灵敏感知系统发现" + newModelClue.getInvolveDepartName() + "民警" + map.get("xzdzzr") |
|
|
|
|
+ "的管控人数为" + map.get("num") + "人。"); |
|
|
|
|
modelClues.add(newModelClue); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void mergeModelClues(List<ModelClue> modelClues2, List<ModelClue> modelClues1 , int no) { |
|
|
|
|
for (ModelClue modelClue2 : modelClues2) { |
|
|
|
|
Iterator<ModelClue> iterator1 = modelClues1.iterator(); |
|
|
|
|
|