Commit 5b2bfd9f authored by 刘林's avatar 刘林

fix(jg):已纳管管道编辑bug修改

parent 7fcb984c
......@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionalEventListener;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.concurrent.BlockingQueue;
......@@ -335,9 +336,23 @@ public class ChangeEquipImpactCertListener {
log.info("处理 handleNewProjectEdit 类型逻辑");
IdxBizJgProjectContraption projectContraption = jgProjectContraptionService.getById(projectContraptionId);
JSONObject certificatePrintTag = Optional.ofNullable(projectContraption.getCertificatePrintTag())
.map(JSONObject::parseObject).orElse(new JSONObject());
.map(JSONObject::parseObject)
.orElseGet(JSONObject::new);
JSONObject tagJson = this.handleFieldChangeProject(fieldChangeMetaList, certificatePrintTag);
projectContraption.setCertificatePrintTag(JSONObject.toJSONString(tagJson));
projectContraption.setCertificatePrintTag(tagJson.toJSONString());
jgProjectContraptionService.updateById(projectContraption);
String useOrgCode = fieldChangeMetaList.stream()
.filter(meta -> "useRegistrationCode".equals(meta.getColumnKey()))
.map(FieldChangeMeta::getColumnOldValue)
.findFirst()
.orElse(null);
if (!ValidationUtil.isEmpty(useOrgCode)) {
JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, useOrgCode)
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one();
this.handleFieldChange(fieldChangeMetaList, jgUseRegistrationManage);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment