|
|
|
|
@ -197,6 +197,22 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void generate(Integer modelId) { |
|
|
|
|
if (modelId == 1300) { |
|
|
|
|
List<ModelClue> modelClues = modelClueMapper.selectByModelId(103); |
|
|
|
|
if (modelClues != null && !modelClues.isEmpty()) { |
|
|
|
|
for (ModelClue modelClue : modelClues) { |
|
|
|
|
SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getExternalId, modelClue.getInvolveDepartId()).last("LIMIT 1")); |
|
|
|
|
if (supExternalDepart != null) { |
|
|
|
|
if (supExternalDepart.getInternalId() != null) { |
|
|
|
|
modelClueMapper.updateInvolveDepartId(modelClue.getId(), supExternalDepart.getInternalId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
System.out.println("No records found for model_id 103."); |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Model model = modelMapper.selectById(modelId); |
|
|
|
|
List<ModelClue> modelClues = new ArrayList<>(); |
|
|
|
|
if (!Objects.isNull(model) && model.getModelSql() != null) { |
|
|
|
|
@ -1041,6 +1057,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
|
|
|
|
|
if (statisticsDepart != null && statisticsDepart.getGroupId() != null && statisticsDepart.getGroupId() == 11L) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
newModelClue.setInvolveDepartId(supExternalDepart.getInternalId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
newModelClue.setData(JSONObject.toJSONString(newMap)); |
|
|
|
|
|