Browse Source

修改3号模型,支持导入对应单位2

main
sjh 1 year ago
parent
commit
04c0d2ccd8
  1. 11
      src/main/java/com/biutag/supervision/service/ModelClueService.java

11
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -171,11 +171,6 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
for (ModelClue modelClue : modelClues) { for (ModelClue modelClue : modelClues) {
modelClue.setModelId(modelId); modelClue.setModelId(modelId);
modelClue.setCreateTime(LocalDateTime.now()); modelClue.setCreateTime(LocalDateTime.now());
SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getExternalId, modelClue.getInvolveDepartId()).last("LIMIT 1"));
if (supExternalDepart != null && supExternalDepart.getInternalShortName() != null && !supExternalDepart.getInternalShortName().isEmpty()) {
modelClue.setInvolveDepartName(supExternalDepart.getInternalShortName());
modelClue.setInvolveDepartId(supExternalDepart.getInternalId());
}
} }
modelClueMapper.insert(modelClues); modelClueMapper.insert(modelClues);
modelClueRecordMapper.insert(new ModelClueRecord().setModelId(modelId).setSize(modelClues.size()).setCreateTime(LocalDateTime.now()).setState("success")); modelClueRecordMapper.insert(new ModelClueRecord().setModelId(modelId).setSize(modelClues.size()).setCreateTime(LocalDateTime.now()).setState("success"));
@ -215,10 +210,10 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
if (Objects.equals(keyColumn, modelClue.getUniqueKey())) { if (Objects.equals(keyColumn, modelClue.getUniqueKey())) {
modelClue.setData(JSONObject.toJSONString(data)); modelClue.setData(JSONObject.toJSONString(data));
modelClue.setStatus(0); modelClue.setStatus(0);
SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getExternalId, data.get("involve_depart_id")).last("LIMIT 1")); SupExternalDepart supExternalDepart = supExternalDepartMapper.selectOne(new LambdaQueryWrapper<SupExternalDepart>().eq(SupExternalDepart::getExternalId, modelClue.getInvolveDepartId()).last("LIMIT 1"));
if (supExternalDepart != null && supExternalDepart.getExternalId() != null && supExternalDepart.getExternalName() != null && supExternalDepart.getInternalId() != null && supExternalDepart.getLevel() != null && supExternalDepart.getPid() != null) { if (supExternalDepart != null && supExternalDepart.getInternalShortName() != null && !supExternalDepart.getInternalShortName().isEmpty()) {
modelClue.setInvolveDepartId(supExternalDepart.getInternalId());
modelClue.setInvolveDepartName(supExternalDepart.getInternalShortName()); modelClue.setInvolveDepartName(supExternalDepart.getInternalShortName());
modelClue.setInvolveDepartId(supExternalDepart.getInternalId());
} }
setPerson(modelId, modelClue, data); setPerson(modelId, modelClue, data);
generateZFBAThingDesc(modelId, modelClue, data); generateZFBAThingDesc(modelId, modelClue, data);

Loading…
Cancel
Save