514 lines
22 KiB
JSON
514 lines
22 KiB
JSON
{
|
||
"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": {
|
||
"IgnoreBlank": false
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"Commands": [
|
||
{
|
||
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
||
"TryCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "任务信息",
|
||
"TableValue": {
|
||
"TableName": "任务平行视图",
|
||
"TableValueType": 1,
|
||
"BindingInfos": [
|
||
{
|
||
"GUID": "f2d81556-ab55-4731-87c8-2ef6dc3b8390",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "3fcb9229-1223-4763-a77e-ac72385bbab5"
|
||
},
|
||
"ColumnName": "项目ID"
|
||
},
|
||
{
|
||
"GUID": "6b5a65e5-2d38-4552-8325-29978f5bf07c",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "520135bf-2fcf-4362-9158-169ab7e3533f",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "严格模式"
|
||
}
|
||
},
|
||
"ColumnName": "严格模式"
|
||
},
|
||
{
|
||
"GUID": "3b6b6225-a8f2-4428-ac2b-5bacc8aeff24",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "dccedd60-946a-4f17-a590-e9c68adb9847",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "项目可分配工时"
|
||
}
|
||
},
|
||
"ColumnName": "项目可分配工时"
|
||
},
|
||
{
|
||
"GUID": "93b3deac-ce8a-4163-b369-da71413992d3",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "7e747a55-8682-45c0-8a9a-e3c326f41748",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "项目经理"
|
||
}
|
||
},
|
||
"ColumnName": "项目经理"
|
||
},
|
||
{
|
||
"GUID": "f416e1d1-3931-4f6e-9b99-28911cb1368b",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务名称",
|
||
"GUID": "e2aacc34-2273-4151-b175-8da6d8acf713"
|
||
},
|
||
"ColumnName": "任务名称"
|
||
},
|
||
{
|
||
"GUID": "395821a1-25a2-45e1-9bf6-e701c2d97ef6",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务负责人",
|
||
"GUID": "11139a01-b0dc-475f-8542-4fa8c3662ac5"
|
||
},
|
||
"ColumnName": "任务负责人"
|
||
},
|
||
{
|
||
"GUID": "02361f6b-cdca-423f-8e4d-3db1023d8c65",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务负责人",
|
||
"GUID": "9598f201-f250-4a2f-9fa9-ae79e86a1b1f",
|
||
"AttachType": {
|
||
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
|
||
"UserColumnAttachType": 1
|
||
}
|
||
},
|
||
"ColumnName": "任务负责人_全名"
|
||
},
|
||
{
|
||
"GUID": "25f0ac07-cd61-4518-a914-9e0a3f2b97b0",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务预算工时",
|
||
"GUID": "54000c20-3ba4-45a0-b00c-8c725a7f78da"
|
||
},
|
||
"ColumnName": "任务预算工时"
|
||
},
|
||
{
|
||
"GUID": "f26bf7ca-95bf-4f22-9095-489d2762c417",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务类型",
|
||
"GUID": "9c80ca72-6b1b-421d-93ac-212fe7fc0dbe"
|
||
},
|
||
"ColumnName": "任务类型"
|
||
},
|
||
{
|
||
"GUID": "9dba06cb-c256-4b07-b09d-ab48d689fb3b",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "版本",
|
||
"GUID": "816b95a0-3936-4894-b812-7ac32e536c25"
|
||
},
|
||
"ColumnName": "版本"
|
||
},
|
||
{
|
||
"GUID": "1f550c76-91e1-4716-8b59-7db72099ff34",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务状态",
|
||
"GUID": "19e92c87-7fe8-47b0-bd25-91b91facd1ab"
|
||
},
|
||
"ColumnName": "任务状态"
|
||
},
|
||
{
|
||
"GUID": "d1c1cddf-db47-4d81-9165-54a2f2a0b974",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "流程实例ID",
|
||
"GUID": "12f152b3-bb0f-40c7-8f81-f40529853a1b"
|
||
},
|
||
"ColumnName": "流程实例ID"
|
||
},
|
||
{
|
||
"GUID": "6be8e55b-4f64-4b06-9512-cb11970c3541",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "父任务ID",
|
||
"GUID": "dc24ea34-d67e-4edd-8dc0-8f1eb3306702"
|
||
},
|
||
"ColumnName": "父任务ID"
|
||
},
|
||
{
|
||
"GUID": "4207d524-41af-48ee-8e0a-9e7bbd3153b1",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "父任务ID",
|
||
"GUID": "dd6e075c-7aab-4cd9-b38a-8ccc2e579162",
|
||
"RelationBinding": {
|
||
"RelatedTable": "任务平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "可分配工时"
|
||
}
|
||
},
|
||
"ColumnName": "父任务可分配工时"
|
||
},
|
||
{
|
||
"GUID": "c3efe081-b843-4300-9b80-5f55da0f8e34",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "父任务ID",
|
||
"GUID": "9a0e290a-0970-4f72-810c-bf9e7517be87",
|
||
"RelationBinding": {
|
||
"RelatedTable": "任务平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "任务状态"
|
||
}
|
||
},
|
||
"ColumnName": "父任务状态"
|
||
}
|
||
],
|
||
"SqlCondition": {
|
||
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
||
"ColumnBindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "ID",
|
||
"GUID": "2e5cdd61-2cb0-4b4f-99ed-18d29255cd70"
|
||
},
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务ID"
|
||
}
|
||
},
|
||
"TopCount": "1"
|
||
},
|
||
"ID": "e8265f2c785c461b936a8cf4271090f0"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ProcessInstanceCommand, ServerDesignerCommon",
|
||
"ProcessInstanceId": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.流程实例ID"
|
||
},
|
||
"OperateType": 400,
|
||
"ProcessInstanceName": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.任务负责人_全名&\"分配任务\"&\"[\"&任务信息.任务名称&\"]等待接收\""
|
||
}
|
||
},
|
||
{
|
||
"$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": "=任务信息.父任务ID"
|
||
}
|
||
},
|
||
"value": "%Null%",
|
||
"compareType": 1
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||
"param": {
|
||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||
"ParamObject": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.父任务状态"
|
||
}
|
||
},
|
||
"value": "2",
|
||
"compareType": 1
|
||
}
|
||
]
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "请等待父任务审批后方可发起!"
|
||
}
|
||
],
|
||
"ID": "c6e846b5-7a58-4aa4-9586-da098bcb80c8"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "8a138cde-55be-4875-89a8-ece1875a779a"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "90b5051c-5cf5-486c-85cf-b24a9202a8bb"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "25a587e9-40ec-4674-ab47-3d1ca0fc54bd"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "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": "=任务信息.父任务ID"
|
||
}
|
||
},
|
||
"value": "%Null%"
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "预算工时上限",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.项目可分配工时"
|
||
},
|
||
"ID": "dce9e9bfa9454e68a44bc81b7559c096"
|
||
}
|
||
],
|
||
"ID": "3b0c61b7-4462-4f4d-9445-8aca9294039c"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "预算工时上限",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.父任务可分配工时"
|
||
},
|
||
"ID": "149f6070b4f94a4aa8f1b7106553337a"
|
||
}
|
||
],
|
||
"ID": "3c3ed4d6-f6bd-40e6-885f-6f0a2c4e09be"
|
||
}
|
||
],
|
||
"Comments": "严格模式下,根据是否有父任务来计算本次预算工时的上限"
|
||
},
|
||
{
|
||
"$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": 2
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=\"任务工时超过限制,当前工时上限为:\"&预算工时上限&\"小时\""
|
||
}
|
||
}
|
||
],
|
||
"ID": "5653b3c9-2877-4aab-8d5a-255ea39acd1e"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": 5
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=\"开启严格模式下,任务预算工时不能为0\""
|
||
}
|
||
}
|
||
],
|
||
"ID": "0b140361-0f9d-4242-8475-e109b935c2a6"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "c0a5dc55-9938-449a-a6b4-4975853e25bb"
|
||
}
|
||
],
|
||
"Comments": "校验工时情况是否通过"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "0",
|
||
"Message": "任务校验通过"
|
||
}
|
||
]
|
||
},
|
||
"CatchCommandPart": {
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionCode"
|
||
},
|
||
"Message": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=ExceptionMessage"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
} |