484 lines
20 KiB
JSON
484 lines
20 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": "c66244a0-0b2c-4d80-b302-9d8646e26876"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "bfa64f70-1f93-43cb-b795-c7d544722030"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "2f4170e1-257f-40c3-98a6-17323c4e8ea2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "5b83fd48-5d1e-4bdd-ac19-2b1dedb5776a"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "4661da29-6cba-4137-9ee1-3d33a08eadeb"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.父任务可分配工时"
|
|
},
|
|
"ID": "b1aff090a96e4e618b49838429706ff5"
|
|
}
|
|
],
|
|
"ID": "88baa758-743d-49d3-9ee6-b0b22da513df"
|
|
}
|
|
],
|
|
"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": "0a4e2697-1831-44b7-bfc4-f7a5439e046e"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "7ae391ca-88f5-424d-8756-636d8cd84c69"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |