{ "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": {}, "TestData": "8" }, { "Name": "状态码", "DataValidationInfo": {}, "TestData": "2" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "56bf3a1a-b506-4531-9d01-f209f6e2f7b3", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "417ccd27-5484-41ae-9712-c69d5b98c6fa" }, "ColumnName": "项目ID" }, { "GUID": "a2c50e9a-2c0f-4d7e-b43e-19456cb3c5ef", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务名称", "GUID": "59897440-858b-44cb-aa96-6e74d4f7751c" }, "ColumnName": "任务名称" }, { "GUID": "c5ee4845-58d1-4e51-95c0-aef99ba9da4c", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "8f13c1bf-e86a-4cb1-afd2-492b85d4cc08" }, "ColumnName": "任务状态" }, { "GUID": "f0106ccd-42db-42c2-862f-a612166fa173", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "59dd4107-010a-41cb-b897-a68506488492", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "GUID": "63a4f69f-e22f-4f00-a188-6ffbb5607a6a", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务负责人", "GUID": "3f3806fd-032f-4750-925c-83a5dfe69bb0" }, "ColumnName": "任务负责人" }, { "GUID": "e6246a80-54cc-403c-9f9b-566de00dc7b1", "BindingInfo": { "TableName": "任务表", "ColumnName": "开始时间", "GUID": "b582715f-80a4-4224-8423-f78cd0c8931e" }, "ColumnName": "开始时间" }, { "GUID": "5ffd390a-0c35-4cca-a52b-af7231ea8381", "BindingInfo": { "TableName": "任务表", "ColumnName": "结束时间", "GUID": "4e747135-a8aa-4f79-9c50-37d6915e63c3" }, "ColumnName": "结束时间" }, { "GUID": "3206d98b-fd30-41e5-8041-bfd090722e03", "BindingInfo": { "TableName": "任务表", "ColumnName": "任务类型", "GUID": "832e03dc-8b1d-42c1-8053-7e14912e96b9" }, "ColumnName": "任务类型" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "135664f5-205c-4493-b3d0-5764de228e17" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "3573b52ffc3742a7bab1dc862b262276" }, { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "新任务状态", "TableValue": { "TableName": "任务状态", "OnlyGetValue": true, "TableValueType": 0, "BindingInfos": [ { "GUID": "b31ec5c9-8a86-4148-8e7c-232ccc011d6a", "BindingInfo": { "TableName": "任务状态", "ColumnName": "任务状态", "GUID": "263a2a05-e711-4f5c-90ac-5114c2367ddc" }, "ColumnName": "任务状态" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务状态", "ColumnName": "状态码", "GUID": "726e05d0-450e-4d21-9fc3-9bd5c6975e85" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=状态码" } } }, "ID": "d13f627dec7147d68c48a6324b2316ff" }, { "$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": "aeafd224-f511-481e-8355-8d0f79ac733a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0 }, "ID": "ff207234ca244312adfeb7866e96d51c" }, { "$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": "7307f9cb-0a43-4b3d-9335-72465015f8e2" } ] } ], "ID": "6833cd39-b4c3-44f1-ac37-e7fc1e7556dd" }, { "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": "9f576937-8c65-4748-a948-5cc1b9aa9da2" } ] } ], "ID": "483b270e-e6e6-4280-990e-9140fafef969" }, { "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": "b1922fb3-0f59-462d-ac9c-b9dadab1b4c6" } ] } ], "ID": "c6047401-1633-4822-9376-4de5021f3017" } ] }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "8cd30f24-ad8d-43c1-9342-2c7f001d137f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "6edbee6e-922a-4904-b1f8-0bc7b5a7eccd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=状态码" } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "47dbb777-470d-4222-b8ce-3290bf908349" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "46dff42e-9185-48a4-a09c-b1b42df875bb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]从\"&任务信息.任务状态文本&\"状态变更为\"&新任务状态" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "70d9cdae-463b-44d4-97ef-dedf26616565" }, "Value": "%CurrentUser%" } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "操作成功" } ], "ID": "94ecbaa9-2b7f-4aff-9c77-305d5e58a983" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "操作成功" } ], "ID": "e9a1e04e-c47f-4eca-aabd-b60cbe20bcde" } ] } ], "ID": "fd32ee3d-f7dd-4030-a4f0-3fce9ced5372" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务ID=\"&任务ID&\",不存在。\"" } } ], "ID": "7f6ab919-fd03-43b0-a234-c9bd5299c7c9" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "日志表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "日志表", "ColumnName": "标题", "GUID": "88ca8e09-2124-454f-aaf5-7f2abb7b9e88" }, "Value": "修改任务状态" }, { "BindingInfo": { "TableName": "日志表", "ColumnName": "内容", "GUID": "d3c4570e-a309-413b-95f4-09c91d5308cd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务ID=\"&任务ID&\",状态码=\"&状态码" } }, { "BindingInfo": { "TableName": "日志表", "ColumnName": "类型", "GUID": "acb845cd-d40d-4c4e-9709-0601c6e6ff8f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }