{ "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": "增补时长" }, { "Name": "增补费用" }, { "Name": "申请人" }, { "Name": "理由" } ] } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "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": "0", "compareType": 2 }, { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=增补费用" } }, "value": "0", "compareType": 2 } ], "RelationType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目信息", "TableValue": { "TableName": "项目表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目名称", "GUID": "77f3f956-399c-44e9-8b9f-4ffd7f550e64" }, "ColumnName": "项目名称" }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算工时", "GUID": "c5e6d17d-3ff2-4cc3-9dc1-1d09225040e0" }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算费用", "GUID": "77ccf1a4-3bde-4c83-92dc-aa4146cdfaca" }, "ColumnName": "项目预算费用" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目表", "ColumnName": "ID", "GUID": "8c9f3e87-4f04-4df8-9e69-c25dbb5d57a4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "43195d529ba847c3a361bde724f62e8b" }, { "$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": "8d9414ec-50fc-4b47-9add-0ced4d957ff4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目预算变动表", "ColumnName": "状态", "GUID": "17f93856-652c-4bc5-bb28-3ec9d8e75bc5" }, "Value": "审批中" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "f380a95256d64ec69c3ca83b020619f8" }, { "$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": "d589f664-6d6b-461a-b8f3-26cf453c854f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=申请人" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "项目ID", "GUID": "3087d854-c35b-4517-9674-ddd7e574925b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "原预算工时", "GUID": "bd9b0543-b5a2-4047-9b44-446fd0c1df4a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=INT(项目信息.项目预算工时)" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "增加预算工时", "GUID": "5dd04dc1-d019-4a2b-89b0-63e57d150a06" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=INT(增补时长)" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "原预算费用", "GUID": "2bed326e-7eae-46db-a777-57132f6d0bca" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=INT(项目信息.项目预算费用)" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "增加费用", "GUID": "4875f306-708c-46bd-ac7e-e47bb5b68164" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=INT(增补费用)" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "申请理由", "GUID": "8ab3518b-bbf4-4b59-9d90-ef7c74deb9f8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=理由" } }, { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "状态", "GUID": "b6ae7a61-2e36-46c0-8cbb-f5b25af20bc8" }, "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": "13e02fa1-7b77-4b31-92b6-ed337614bd7f" }, "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": "c4bc19bd-b0ed-42ab-b8a0-5d732128d1f3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=新表.ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目预算变动表", "ColumnName": "流程实例ID", "GUID": "05011eed-e58c-441d-a1c1-4828158ef0b3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=发起流程结果.ID" } } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "申请成功,请等待审批" } ], "ID": "4909f1f8-3da3-4a54-a6cc-28c1ce78a14c" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目已创建,但未能发起审批,请手动发起审批流程!" } ], "ID": "9732d211-79a0-4578-98af-9859de3499f0" } ] } ], "ID": "9ceb5305-2d28-40d1-9940-65dcd847e6c9" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "请等待上一条申请结束后,再提交新的申请!" } ], "ID": "ea3a5f27-37f9-4b70-b62b-658dc2fe2839" } ] } ], "ID": "c044fb28-9b46-4bfd-aeaf-39d927df5c61" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目不存在" } ], "ID": "013313f0-b0d1-45d1-9628-fde10321a8f2" } ] } ], "ID": "e7ab3e2f-2332-4f06-bc1b-98c9286c7bc5" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "申请时长或预算不能为0" } ], "ID": "0d5fb551-5c9e-458a-8c56-5758538c14de" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }