510 lines
21 KiB
JSON
510 lines
21 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": "0be8de78-c7c0-414b-9ea8-21bf727c7826"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "fbf23b28-53c3-4c6e-b04d-8fd2a22e6ff8"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "d0460f18-1d55-4c08-a921-b6e7b1a9fc0e"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "3a2ec4ad-512f-4ee6-93fd-b25226907433"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "f50a279e-15ee-4d37-82b6-25f971f78c6f"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "0d5ac7332bf942d1998fe6e03c20481e"
|
|
}
|
|
],
|
|
"ID": "1510307d-3f0e-4506-a698-da76ba49d1a3"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.父任务可分配工时"
|
|
},
|
|
"ID": "b1aff090a96e4e618b49838429706ff5"
|
|
}
|
|
],
|
|
"ID": "f620c048-3338-49db-99c9-19ab316aa4d1"
|
|
}
|
|
],
|
|
"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": "8bd11489-d35c-4d5c-bd1f-dc8767600961"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "743e50f1-e5d4-4c01-9c28-f609accef155"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |