{ "Name": "移除任务成员", "Enabled": true, "Triggers": [ { "$type": "Forguncy.ServerCommands.Models.PostRequestTrigger, 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": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "bf631fc5-2aea-4f67-8c3e-5687fcd17db1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "2a652f1e-a4f3-4c21-83cf-0e8546ac250c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员用户名" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "779d1a620e1f4c5fb9e69747944b537b" }, { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "f86b2436-5824-47c8-80e9-7deaa1385b6b" }, "ColumnName": "项目ID" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务名称", "GUID": "85d6de7c-6adf-4725-bfea-d450b404f74e" }, "ColumnName": "任务名称" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "5f9bb9c4-f177-4206-9975-eaeb99acc1de" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "TopCount": "1" }, "ID": "8174cfc9dc9c4c6e990ea8a6e0cc7dd4" }, { "$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": "用户信息视图", "OnlyGetValue": true, "TableValueType": 0, "BindingInfos": [ { "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "9dd6b21a-caef-4226-9747-b359dea02e9b" }, "ColumnName": "全名" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "d91c3fdb-7b4a-4a6c-81e5-2e83e3d1f3b9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员用户名" } }, "TopCount": "1" }, "ID": "c3a79e37337f461e92466b13d96434af" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "UpdateType": "delete", "ShowConfirm": true, "ConfirmText": "您确定要删除吗?", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "17bed3eb-36f7-46c3-b030-c125facc33ec" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "a66e269f-657c-4cd7-b545-5b61dc9ed8c8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员用户名" } } ] } }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "16af2943-b274-4526-a1a1-1d0b184df4e5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "00834ae4-957a-482a-91f9-fdd15fef7b25" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]将\"&成员全名&\"移除\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "1b67fbcf-23b4-4e5b-a3a0-c9a49cb17903" }, "Value": "%CurrentUser%" } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "移除成功" } ], "ID": "9dcb7de5-d631-419a-9738-73fd00ef7534" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务不存在" } ], "ID": "c9324acc-950d-47c9-894e-9bb14eb9a90a" } ] } ], "ID": "8201f684-7b40-4039-be3c-7b3cbef6c74d" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "该成员存在报工记录,无法移除!" } ], "ID": "482a94d6-200b-4bf9-adad-32b14cd7d24c" } ] } ] }