diff --git a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java index 40f7b0cde433ff48cbecf3340f068de035565b47..18ca431273d5a26023c72e077416a04c3ac63fd9 100644 --- a/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java +++ b/src/main/java/neatlogic/module/cmdb/process/stephandler/CmdbSyncProcessComponent.java @@ -569,9 +569,10 @@ public class CmdbSyncProcessComponent extends ProcessStepHandlerBase { // 如果工单有表单信息,则查询出表单配置及数据 IProcessTaskCrossoverMapper processTaskCrossoverMapper = CrossoverServiceFactory.getApi(IProcessTaskCrossoverMapper.class); ProcessTaskFormVo processTaskFormVo = processTaskCrossoverMapper.getProcessTaskFormByProcessTaskId(processTaskId); - if (processTaskFormVo != null) { - ISelectContentByHashCrossoverMapper selectContentByHashCrossoverMapper = CrossoverServiceFactory.getApi(ISelectContentByHashCrossoverMapper.class); - formConfig = selectContentByHashCrossoverMapper.getProcessTaskFromContentByHash(processTaskFormVo.getFormContentHash()); + if (processTaskFormVo != null && StringUtils.isNotBlank(processTaskFormVo.getFormContent())) { +// ISelectContentByHashCrossoverMapper selectContentByHashCrossoverMapper = CrossoverServiceFactory.getApi(ISelectContentByHashCrossoverMapper.class); +// formConfig = selectContentByHashCrossoverMapper.getProcessTaskFromContentByHash(processTaskFormVo.getFormContentHash()); + formConfig = processTaskFormVo.getFormContent(); IProcessTaskCrossoverService processTaskCrossoverService = CrossoverServiceFactory.getApi(IProcessTaskCrossoverService.class); List processTaskFormAttributeDataList = processTaskCrossoverService.getProcessTaskFormAttributeDataListByProcessTaskId(processTaskId); if (CollectionUtils.isNotEmpty(processTaskFormAttributeDataList)) { diff --git a/src/main/java/neatlogic/module/cmdb/workerdispatcher/handler/CmdbDispatcher.java b/src/main/java/neatlogic/module/cmdb/workerdispatcher/handler/CmdbDispatcher.java index 946ec3e17d735d6409ae6043d85c221d7298e6f0..ab91db22e667ae6923186b04ddd071004526c0cf 100644 --- a/src/main/java/neatlogic/module/cmdb/workerdispatcher/handler/CmdbDispatcher.java +++ b/src/main/java/neatlogic/module/cmdb/workerdispatcher/handler/CmdbDispatcher.java @@ -24,7 +24,6 @@ import neatlogic.framework.form.constvalue.FormHandler; import neatlogic.framework.process.constvalue.ProcessUserType; import neatlogic.framework.process.crossover.IProcessTaskCrossoverMapper; import neatlogic.framework.process.crossover.IProcessTaskCrossoverService; -import neatlogic.framework.process.crossover.ISelectContentByHashCrossoverMapper; import neatlogic.framework.process.dto.ProcessTaskFormAttributeDataVo; import neatlogic.framework.process.dto.ProcessTaskFormVo; import neatlogic.framework.process.dto.ProcessTaskStepVo; @@ -391,18 +390,18 @@ public class CmdbDispatcher extends WorkerDispatcherBase { private Map formAttributeDataMap(Long processTaskId) { IProcessTaskCrossoverMapper processTaskCrossoverMapper = CrossoverServiceFactory.getApi(IProcessTaskCrossoverMapper.class); - ISelectContentByHashCrossoverMapper selectContentByHashCrossoverMapper = CrossoverServiceFactory.getApi(ISelectContentByHashCrossoverMapper.class); +// ISelectContentByHashCrossoverMapper selectContentByHashCrossoverMapper = CrossoverServiceFactory.getApi(ISelectContentByHashCrossoverMapper.class); Map formAttributeDataMap = new HashMap<>(); - String formConfig = null; +// String formConfig = null; // 如果工单有表单信息,则查询出表单配置及数据 ProcessTaskFormVo processTaskFormVo = processTaskCrossoverMapper.getProcessTaskFormByProcessTaskId(processTaskId); - if (processTaskFormVo != null) { - formConfig = selectContentByHashCrossoverMapper.getProcessTaskFromContentByHash(processTaskFormVo.getFormContentHash()); + if (processTaskFormVo != null && StringUtils.isNotBlank(processTaskFormVo.getFormContent())) { +// formConfig = selectContentByHashCrossoverMapper.getProcessTaskFromContentByHash(processTaskFormVo.getFormContentHash()); IProcessTaskCrossoverService processTaskCrossoverService = CrossoverServiceFactory.getApi(IProcessTaskCrossoverService.class); List processTaskFormAttributeDataList = processTaskCrossoverService.getProcessTaskFormAttributeDataListByProcessTaskId(processTaskId); if (CollectionUtils.isNotEmpty(processTaskFormAttributeDataList)) { for (ProcessTaskFormAttributeDataVo attributeDataVo : processTaskFormAttributeDataList) { - Object dataObj = formAttributeDataAdaptsToCmdb(attributeDataVo.getAttributeUuid(), attributeDataVo.getDataObj(), formConfig); + Object dataObj = formAttributeDataAdaptsToCmdb(attributeDataVo.getAttributeUuid(), attributeDataVo.getDataObj(), processTaskFormVo.getFormContent()); if (dataObj == null) { continue; }