{ "Name": "添加任务成员", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon", "Permission": { "PermissionData": { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core", "permissionResource": { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core" }, "permissionBindings": [ { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core", "roleNames": [ "FGC_LoginUser" ] } ] } }, "Parameters": [ { "Name": "任务ID", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "成员", "DataValidationInfo": { "IgnoreBlank": false } } ] } ], "Commands": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "47e92c41-58f4-4a71-83af-2427165737fd", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "714cdef2-9e30-4b83-bc44-cdf05bfc0d4a" }, "ColumnName": "项目ID" }, { "GUID": "5dffa8d6-6568-407c-88ba-59fad29962df", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务名称", "GUID": "3f0b4dd4-e242-4828-8081-4d62b7c5335a" }, "ColumnName": "任务名称" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "ca93195f-5067-4300-9261-0fca3124f7e3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "c5ff723d4e8f4be4801dc0135a434afd" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "用户", "TableValue": { "TableName": "用户信息视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "4a28ca68-9d89-4951-8303-13e68b83ed63", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "0cc525a1-5db8-45ec-ac91-daca881ccfca" }, "ColumnName": "全名" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "322806e3-02e9-4412-8496-e0283909c1bb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "c488aa6c7d1048c5a8e688e8794992aa" }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务" } }, "value": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户" } }, "value": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "是否存在", "TableValue": { "TableName": "任务成员表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "ID", "GUID": "286f4312-5d25-489c-a22f-fc629037d3bf" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务成员", "GUID": "34063411-20d4-45bc-9c25-291a024600ae" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "c0ad8d38baf740c68763777ca53c5cf5" }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=是否存在" } }, "value": "0" }, "CommandList": [ { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "项目ID", "GUID": "e118ef57-0a38-4af1-b96b-2d0e05f97b71" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务.项目ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "e74fbd35-0dbb-4d36-a7ad-4b893539ba4a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务成员", "GUID": "3ecd6178-ccb6-4618-9206-1e0cc1c9f414" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员" } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "6b73263e-0d5c-4ee3-b578-e4c0aadc0ef4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "7819d096-df5f-4444-a3ee-c1f79d6fcaca" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务.任务名称&\"]将\"&用户.全名&\"加入到参与人\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "747fabb3-2a9a-4aae-93f4-eaa7a2d6b34b" }, "Value": "%CurrentUser%" } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "新增成功" } ], "ID": "ecd27f40-6675-4b97-91ec-61841ee0156a" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "新增成功" } ], "ID": "a313671f-b7e7-4ac0-b8ae-7e05be939f8d" } ] } ], "ID": "2f4f4fa0-901b-4248-b601-1d5c4083378e" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "成员不存在" } ], "ID": "f3674c09-cd06-488e-836f-3e1d566da70e" } ] } ], "ID": "017a4259-fef2-40f9-a315-af8590ffeb61" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务不存在" } ], "ID": "475e3810-3875-433f-afdf-9c2cf85f5fa7" } ] } ] }