{ "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 } }, { "Name": "申请人" }, { "Name": "理由" } ] } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目信息", "TableValue": { "TableName": "项目表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目名称", "GUID": "233443c9-5006-4869-a441-6cad4abb1286" }, "ColumnName": "项目名称" }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算工时", "GUID": "f96e6699-9f01-4ba5-89ef-98dafb1120f5" }, "ColumnName": "项目预算工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目表", "ColumnName": "ID", "GUID": "e5d0c43c-2c1b-472f-afb7-53cd07dd64d4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "e9d3c27e7cac4cc4820ff8d67c25bb77" }, { "$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": "项目预算变动表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目预算变动表", "ColumnName": "项目ID", "GUID": "69d303fd-3a6a-474a-b5dc-7eb09f44874f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目预算变动表", "ColumnName": "状态", "GUID": "312f378b-c1be-47fa-a0f8-b1c77d4399d7" }, "Value": "审批中" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "01d8aa2100314f4e90279d010dc8219f" }, { "$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.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目预算变动表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "申请人", "GUID": "776ec5ab-05d9-4e4b-ac74-eec576f32b80" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=申请人" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "项目ID", "GUID": "a890a01a-72d5-425e-923b-5db9c6b88dfa" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "原预算工时", "GUID": "841f20bd-e9d5-406d-9400-7750f8c9b3a1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目信息.项目预算工时" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "增加预算工时", "GUID": "15ae580a-4a57-4173-b2c3-20e3df710e73" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=增补时长" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "申请理由", "GUID": "fc9add42-cacc-4efc-a55c-0ffd8655b6cf" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=理由" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "状态", "GUID": "f96e1b72-a646-476b-b640-c71ae1ef214f" }, "Value": "待提交" } ], "ParamNameToSaveNewRowValue": "新表" }, { "$type": "Forguncy.Model.ProcessStartCommand, ServerDesignerCommon", "ProcessDefinitionResourceName": "工时增补申请", "ProcessInstanceName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目信息.项目名称&\"申请增补工时\"" }, "SelectedTable": "项目预算变动表", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目预算变动表", "ColumnName": "ID", "GUID": "251e7754-3c92-47eb-861e-dd202a911250" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=新表.ID" } }, "Initiator": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=申请人" }, "ReturnResultName": "发起流程结果" }, { "$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": "%Null%", "compareType": 1 }, { "$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.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目预算变动表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目预算变动表", "ColumnName": "ID", "GUID": "6f90ac57-8b74-4c54-aa9a-218ac5c5af72" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=新表.ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "流程实例ID", "GUID": "7bba36ed-d6d6-49d1-aa41-9de807a7efcd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=发起流程结果.ID" } } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "申请成功,请等待审批" } ], "ID": "e5832496-2b9f-438f-b253-807ffdc98bb4" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目已创建,但未能发起审批,请手动发起审批流程!" } ], "ID": "9b364c89-1a17-4e95-bc89-0c5eedbd5d12" } ] } ], "ID": "de088139-3ef2-475b-8b6a-d5709e8f01db" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请等待上一条申请结束后,再提交新的申请!" } ], "ID": "0ae58906-b856-4a9c-8cf4-ad8ee1e71f32" } ] } ], "ID": "45a51cd8-3a1a-424a-8c79-51da306846f1" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目不存在" } ], "ID": "8fa9acdf-1508-453b-8a43-0ea2d3934021" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }