{ "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.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "afbdd48e-487e-440c-b59c-e565e61e9cd1" }, "ColumnName": "任务状态" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "c2c55272-c31d-4118-b3a8-a8e1690ce6b5", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "执行者", "GUID": "f650100e-6369-4760-a093-a73cb3a74f7a" }, "ColumnName": "执行者" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "开始时间", "GUID": "fb57404b-3cad-4911-9eec-6a424d3ba882" }, "ColumnName": "开始时间" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "结束时间", "GUID": "5b07138d-c511-4f69-ba7d-46c7e067ccd0" }, "ColumnName": "结束时间" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务类型", "GUID": "4cd38e49-3e3a-4c0d-a71d-a3db6d2d4b60" }, "ColumnName": "任务类型" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "39e445d7-7f6a-4403-aaad-904e8e86474a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "TopCount": "1" }, "ID": "92bcc24f55b847a9a5d795ab096048ed" }, { "$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": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.任务状态" }, "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": "0" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "484f7f7d-70e0-4450-b1b5-05e631733d79" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0 }, "ID": "e07a763289954cb29930901258108a44" }, { "$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", "compareType": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"该任务已报工,无法切换至\"&任务信息.任务状态文本&\"状态\"" } } ], "ID": "57d72271-f903-47ea-88b1-772145976e08" } ] } ], "ID": "1461a11a-f9bd-4d9f-a414-35b0e7471f86" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=状态码" } }, "value": "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%" }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务执行者不能为空" } ], "ID": "4381895d-aa83-45b0-b9a4-2c1ca6e8aa2b" } ] } ], "ID": "2077a523-e818-4741-bf46-2836d81ad4a9" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=状态码" } }, "value": "2" }, "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%" }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务执行者不能为空" } ], "ID": "381e934c-ce36-4b13-8abd-f889ea350a9d" } ] } ], "ID": "5c67b8b1-d3d0-4068-bb42-346d51d4d375" } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "a2c10ff5-a33d-46de-b3f8-ddcfcc7948a7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "a698faf8-07b4-4e5f-ada0-dd9f31c1cdd7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=状态码" } } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "操作成功" } ], "ID": "e358cd4e-0338-48cb-8b79-d474d8343331" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "操作成功" } ], "ID": "a79b949e-f0ff-44e7-9685-5693135ddec8" } ] } ], "ID": "c6d0246e-17fc-45bf-b64f-33954fa2971b" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon" } ], "ID": "d6a89ce9-b9c2-4091-80a8-c431a63ae888" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }