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": "cc7c64c9-d547-44f8-a74c-d809c42cf5f6",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "3fcb9229-1223-4763-a77e-ac72385bbab5"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"GUID": "fa36557e-c629-4282-9a76-ec532265aff8",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "520135bf-2fcf-4362-9158-169ab7e3533f",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"GUID": "7bbe0367-afcc-4774-b788-a5b7f4992c13",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "dccedd60-946a-4f17-a590-e9c68adb9847",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "项目可分配工时"
|
|
}
|
|
},
|
|
"ColumnName": "项目可分配工时"
|
|
},
|
|
{
|
|
"GUID": "ebbc1500-2450-4da6-a039-432646d2a57d",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "7e747a55-8682-45c0-8a9a-e3c326f41748",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "项目经理"
|
|
}
|
|
},
|
|
"ColumnName": "项目经理"
|
|
},
|
|
{
|
|
"GUID": "b0a82edb-12b8-469b-b9fb-e43874e280b8",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务名称",
|
|
"GUID": "e2aacc34-2273-4151-b175-8da6d8acf713"
|
|
},
|
|
"ColumnName": "任务名称"
|
|
},
|
|
{
|
|
"GUID": "2cf83bd0-7a9b-49ec-9cf9-d93af702d011",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务负责人",
|
|
"GUID": "11139a01-b0dc-475f-8542-4fa8c3662ac5"
|
|
},
|
|
"ColumnName": "任务负责人"
|
|
},
|
|
{
|
|
"GUID": "02e3c579-ae91-4da8-b60a-3200dd4753fd",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务负责人",
|
|
"GUID": "9598f201-f250-4a2f-9fa9-ae79e86a1b1f",
|
|
"AttachType": {
|
|
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
|
|
"UserColumnAttachType": 1
|
|
}
|
|
},
|
|
"ColumnName": "任务负责人_全名"
|
|
},
|
|
{
|
|
"GUID": "205ad391-8767-4d08-a3de-a11add4eb703",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "54000c20-3ba4-45a0-b00c-8c725a7f78da"
|
|
},
|
|
"ColumnName": "任务预算工时"
|
|
},
|
|
{
|
|
"GUID": "3352d607-f8ee-4059-bc16-8393a33c3db4",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务类型",
|
|
"GUID": "9c80ca72-6b1b-421d-93ac-212fe7fc0dbe"
|
|
},
|
|
"ColumnName": "任务类型"
|
|
},
|
|
{
|
|
"GUID": "d6d1da58-1e04-4af9-9854-6a786b9c61fb",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "版本",
|
|
"GUID": "816b95a0-3936-4894-b812-7ac32e536c25"
|
|
},
|
|
"ColumnName": "版本"
|
|
},
|
|
{
|
|
"GUID": "e9452e89-1aad-458d-89ce-f61679398c07",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "19e92c87-7fe8-47b0-bd25-91b91facd1ab"
|
|
},
|
|
"ColumnName": "任务状态"
|
|
},
|
|
{
|
|
"GUID": "5783df06-a66a-4418-950d-dfd0642fea8b",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "流程实例ID",
|
|
"GUID": "12f152b3-bb0f-40c7-8f81-f40529853a1b"
|
|
},
|
|
"ColumnName": "流程实例ID"
|
|
},
|
|
{
|
|
"GUID": "f0e8274f-9608-4778-9d66-eb8d36aa8b90",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "dc24ea34-d67e-4edd-8dc0-8f1eb3306702"
|
|
},
|
|
"ColumnName": "父任务ID"
|
|
},
|
|
{
|
|
"GUID": "2dcd075c-85a3-4a82-bbbb-ad88cd31deb6",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "dd6e075c-7aab-4cd9-b38a-8ccc2e579162",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "可分配工时"
|
|
}
|
|
},
|
|
"ColumnName": "父任务可分配工时"
|
|
},
|
|
{
|
|
"GUID": "3befa333-23eb-4d29-a85d-b245af4f64c9",
|
|
"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": "eb8bc078107346f9835e245f468fb303"
|
|
},
|
|
{
|
|
"$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": "f7a26904-1155-4d52-ba96-aeee4148bbe9"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "06c623ed-8d18-4376-868e-dd67dba49938"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "f51ef549-d53c-49d6-8b0e-e5ccb959508d"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "21b2883d-3fc7-4742-9836-55c06e5d6a44"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "f8d8b0c5-49fd-44f0-9e7d-e11c92dc30ee"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "b866a42a1fd14b288e0fa63d199220a7"
|
|
}
|
|
],
|
|
"ID": "1848cdd5-1953-445b-a507-e05cd778f940"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.父任务可分配工时"
|
|
},
|
|
"ID": "bac8fd9431a640f4836d285d9ecbd597"
|
|
}
|
|
],
|
|
"ID": "f089826f-d44e-49bf-bc54-10568e049f17"
|
|
}
|
|
],
|
|
"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": "99facc91-cdee-49ee-a352-553cf939e45c"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "51e1b7bb-21be-4bbb-8c1c-480c746a9e36"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |