public SingleObjectComponent GetSingleObjectComponent(int metaObjectId, int InterfaceFieldId, FilterDefinition <BsonDocument> condition) { var document = Get(metaObjectId, condition); SingleObjectComponent singleObjectComponent = new SingleObjectComponent { BizData = fieldBizDataService.ToBizDataDictionary(InterfaceFieldId, document), ColunmDatas = fieldListAggregationService.GetColumnDataByFieldListId(InterfaceFieldId).OrderBy(t => t.CmpData.ShowIndex).ToList() }; return(singleObjectComponent); }
public SingleObjectComponent GetSingleObjectComponent(QueryPiplineContext queryPiplineContext, FilterDefinition <BsonDocument> condition) { var fieldMetas = fieldListAggregationService.GetColumnDataByFieldListId(queryPiplineContext); var document = Get(queryPiplineContext.TenantId, queryPiplineContext.MetaObjectId, condition, fieldMetas?.Select(t => t.CmpData.Name)?.ToArray()); SingleObjectComponent singleObjectComponent = new SingleObjectComponent { BizData = fieldBizDataService.ToBizDataDictionary(queryPiplineContext, document), ColunmDatas = fieldMetas?.OrderBy(t => t.CmpData.ShowIndex)?.ToList() }; return(singleObjectComponent); }
public SingleObjectComponent SingleObjectAfter(int metaObjectId, string operateCode, SingleObjectComponent singleObjectComponent) { var triggerScripts = triggerScriptService.GetTriggerScriptsUnDeletedByMetaObjectIdAndScriptType(metaObjectId, (int)ScriptType.SingleObject_After); if (triggerScripts != null && triggerScripts.Any()) { foreach (var item in triggerScripts) { try { singleObjectComponent = CommonExecute <SingleObjectComponent, SingleObjectArg>(operateCode, item.Script, "SingleObjectAfter(operateCode,singleObjectComponent)", new SingleObjectArg { operateCode = operateCode, singleObjectComponent = singleObjectComponent }); } catch (Exception ex) { if (item.FailurePolicy == (int)FailurePolicy.Break) { throw ex; } } } } return(singleObjectComponent); }