{ "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 } }, { "Type": 1, "ArrayParamItems": [ { "Name": "ID", "DataValidationInfo": {} }, { "Name": "项目成员ID", "DataValidationInfo": { "IgnoreBlank": false } } ], "OnlySendChangedData": true, "PrimaryKeys": [ "ID" ], "Name": "参与人列表", "DataValidationInfo": {} } ] } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "6c4cdca5-9307-42c1-9312-e9a44ccc4a38", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "cea97372-d27e-43fe-bf11-394cc980045f" }, "ColumnName": "项目ID" }, { "GUID": "f7063842-ddae-402a-bb1c-2eb59eaef40f", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务名称", "GUID": "f8778b5b-59e8-4106-9e8f-5e341baceee9" }, "ColumnName": "任务名称" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "6089b59b-1f23-455f-b64a-81664e14491d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "TopCount": "1" }, "ID": "0fd0c86a6f374aa4abc280b617e1e539" }, { "$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.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=参与人列表.AddRows" }, "LoopIndexParamName": "index", "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目成员", "TableValue": { "TableName": "项目成员表", "TableValueType": 1, "BindingInfos": [ { "GUID": "1ae2e435-8589-44b8-90f2-2074f16d627a", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "ID", "GUID": "75b08a3a-0654-4d51-ba9d-f9ccef9b56fa" }, "ColumnName": "ID" }, { "GUID": "ae25725b-7e90-45aa-877d-6c00d0adc1c9", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "93597332-e399-4a0d-a240-1dcf2b225322" }, "ColumnName": "项目成员" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "ID", "GUID": "62c34996-370e-4c8e-b099-81f2617b3ff9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.项目成员ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "6dcb21c2775546ab8c0eb04808be92b5" }, { "$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.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "项目ID", "GUID": "6e8cb24d-759f-4f14-8094-4d7c6536b4b8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "9a4804ab-880a-4699-8e37-9cee1b59dcdd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "97c6e866-8618-4c75-8faf-e81b4116d2ef" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目成员.项目成员" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "项目成员ID", "GUID": "f2e983df-31be-4895-a418-9638947b290c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目成员.ID" } } ] } ], "ID": "d54491d2-d209-43f1-9a88-2aa0fa337ab6" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"第\"&index&\"行中的成员不存在于此项目,无法设置!\"" } } ], "ID": "54dd5691-3c82-48dc-ba50-99ffc3dd95ae" } ] } ] }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=参与人列表.EditRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目成员", "TableValue": { "TableName": "项目成员表", "TableValueType": 1, "BindingInfos": [ { "GUID": "63c54ac5-e33e-4b8e-b71e-b6ace41f3d4b", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "ID", "GUID": "75b08a3a-0654-4d51-ba9d-f9ccef9b56fa" }, "ColumnName": "ID" }, { "GUID": "9d40985a-94cf-4ea1-ac37-9b8f71c73014", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "93597332-e399-4a0d-a240-1dcf2b225322" }, "ColumnName": "项目成员" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "ID", "GUID": "62c34996-370e-4c8e-b099-81f2617b3ff9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.项目成员ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "264c4699b6b749b990b2cb7a5b49be48" }, { "$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.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "ID", "GUID": "43efc519-1bf8-47bd-b809-383653ec559c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "3bfbeb6e-d44b-43f6-b5ad-5e7b0eb49bc7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.参与人" } } ] } ], "ID": "00fccb01-6a9e-43da-a237-776ee5dc7143" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"第\"&index&\"行中的成员不存在于此项目,无法设置!\"" } } ], "ID": "cc159815-cd7a-4699-8dde-dbd02788399a" } ] } ] }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=参与人列表.DeleteRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "UpdateType": "delete", "ShowConfirm": true, "ConfirmText": "您确定要删除吗?", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "ID", "GUID": "43efc519-1bf8-47bd-b809-383653ec559c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.ID" } } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "9127e9d8-b881-41b7-b2d9-bef0be70be8f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "5fb59df9-9497-4380-9d0f-1297f2207418" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"更新了任务[\"&任务信息.任务名称&\"]的参与人员\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "093e634b-bf7a-4a79-b955-5ff81169d06c" }, "Value": "%CurrentUser%" } ] } ] }, { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "同步任务参与人字段", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "任务ID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "RefreshAfterFinish": true, "CheckDataValidation": true }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "操作完成" } ], "ID": "a6d30f87-4427-4907-b5d2-852ebad7f2c4" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务不存在" } ], "ID": "4954d9ac-2daf-4224-b359-ea3fd4bb10d0" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }