{ "Name": "删除请款单", "Description": "删除请款单、并重置对应工时记录", "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 } } ] } ], "Commands": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "请款单", "TableValue": { "TableName": "收益请款单表", "TableValueType": 1, "BindingInfos": [ { "GUID": "e9969098-818e-4750-9f5b-ebdd22d6d6bf", "BindingInfo": { "TableName": "收益请款单表", "ColumnName": "流程实例ID", "GUID": "6d1084b0-f563-41c1-961f-0648e641ede7" }, "ColumnName": "流程实例ID" }, { "GUID": "92196a03-fb15-4f55-b732-cfb0378dbb48", "BindingInfo": { "TableName": "收益请款单表", "ColumnName": "状态", "GUID": "8917213e-ecad-4055-bf5c-75b1b1745dee" }, "ColumnName": "状态" }, { "GUID": "e62b17f8-8bc4-4908-81dd-2bca97df0c05", "BindingInfo": { "TableName": "收益请款单表", "ColumnName": "付款凭证ID", "GUID": "a46a758b-1719-4353-847b-60e45db768d5" }, "ColumnName": "付款凭证ID" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "收益请款单表", "ColumnName": "ID", "GUID": "9260f94d-f521-47a6-9a33-cfb4782dfcd8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单ID" } }, "TopCount": "1" }, "ID": "d91326c4deea4be8817128ba26487d73" }, { "$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": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单.状态" } }, "value": "4", "compareType": 1 }, { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单.付款凭证ID" } }, "value": "%Null%" } ] }, "CommandList": [ { "$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": "7e4fd062-7a6b-4458-ad29-591d64c14167" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "请款单ID", "GUID": "7293b64a-dfba-4f28-9797-1d95b9bfe45f" }, "Value": "%Null%" } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "收益请款单表", "UpdateType": "delete", "ShowConfirm": true, "ConfirmText": "您确定要删除吗?", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "收益请款单表", "ColumnName": "ID", "GUID": "d81b95f7-f049-4617-9f43-edea4d2bf48e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单ID" } } } ] }, { "$type": "Forguncy.Model.ProcessInstanceCommand, ServerDesignerCommon", "ProcessInstanceId": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单.流程实例ID" }, "OperateType": 301 }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "请款单已删除" } ], "ID": "11e8fb08-4b26-45f5-8623-b43c4802896f" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请款单未终止或已结款,无法撤销!" } ], "ID": "5c7c5ef7-cffd-4818-8a6f-71bbdfdce2b1" } ] } ], "ID": "8c653230-3bf5-47c9-b5aa-cbd237c820c8" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请款单不存在" } ], "ID": "7bae4efe-28e9-4486-843a-641e63f74419" } ] } ] }