{ "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": "8682e42f-40e1-4d69-bf63-57c534fea59f", "BindingInfo": { "TableName": "收益请款单表", "ColumnName": "流程实例ID", "GUID": "6d1084b0-f563-41c1-961f-0648e641ede7" }, "ColumnName": "流程实例ID" }, { "GUID": "c3f46a55-01b8-4a3d-96bc-57a4fff7d1e3", "BindingInfo": { "TableName": "收益请款单表", "ColumnName": "状态", "GUID": "8917213e-ecad-4055-bf5c-75b1b1745dee" }, "ColumnName": "状态" }, { "GUID": "767bd869-cf60-481a-8a76-59f3c92128f5", "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": "c40e234c4d1d476d8880177218ef5549" }, { "$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.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "付款凭证表", "UpdateType": "delete", "ShowConfirm": true, "ConfirmText": "您确定要删除吗?", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "付款凭证表", "ColumnName": "ID", "GUID": "9ecff31a-0180-4597-accf-c1cd00144147" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单.付款凭证ID" } } } ] }, { "$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": "=请款单.流程实例ID" } }, "value": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.ProcessInstanceCommand, ServerDesignerCommon", "ProcessInstanceId": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=请款单.流程实例ID" }, "OperateType": 301 } ], "ID": "de8a4fb8-9a61-4bf5-88f5-5390e57ee323" } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "请款单已删除" } ], "ID": "8725d8d3-f602-48ca-8bd9-5af93f713187" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请款单未终止或已结款,无法撤销!" } ], "ID": "24f83620-3d67-4da8-939b-6533ba5d7d5f" } ] } ], "ID": "c1f867ac-b252-49f3-a141-80d4e6525212" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请款单不存在" } ], "ID": "6c3700e9-0ad1-4be1-af12-8079b30d54d9" } ] } ] }