555 lines
23 KiB
JSON
555 lines
23 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": "7a31149d-43cb-4fde-8426-8ccb701dd060",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "3fcb9229-1223-4763-a77e-ac72385bbab5"
|
||
},
|
||
"ColumnName": "项目ID"
|
||
},
|
||
{
|
||
"GUID": "8a7ba34c-6d92-4dfb-8b4a-d92ff67805c1",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "520135bf-2fcf-4362-9158-169ab7e3533f",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "严格模式"
|
||
}
|
||
},
|
||
"ColumnName": "严格模式"
|
||
},
|
||
{
|
||
"GUID": "1ecf93fe-37c5-48bc-a2ce-e7c7b473b6cf",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "dccedd60-946a-4f17-a590-e9c68adb9847",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "项目可分配工时"
|
||
}
|
||
},
|
||
"ColumnName": "项目可分配工时"
|
||
},
|
||
{
|
||
"GUID": "210d3ce5-12f1-46df-b929-7f291ddabc1e",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "7e747a55-8682-45c0-8a9a-e3c326f41748",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "项目经理"
|
||
}
|
||
},
|
||
"ColumnName": "项目经理"
|
||
},
|
||
{
|
||
"GUID": "428e7d59-ed26-4f0f-9a0c-38520817fb68",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "项目ID",
|
||
"GUID": "78c95388-c35e-44e0-a245-d2376153020f",
|
||
"RelationBinding": {
|
||
"RelatedTable": "项目平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "项目状态"
|
||
}
|
||
},
|
||
"ColumnName": "项目状态"
|
||
},
|
||
{
|
||
"GUID": "4c6c8cbf-5e89-4cd0-b08e-e20d6df70dff",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务名称",
|
||
"GUID": "e2aacc34-2273-4151-b175-8da6d8acf713"
|
||
},
|
||
"ColumnName": "任务名称"
|
||
},
|
||
{
|
||
"GUID": "d0b133e7-d427-4d99-ae37-ccd184a0b6bc",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务负责人",
|
||
"GUID": "11139a01-b0dc-475f-8542-4fa8c3662ac5"
|
||
},
|
||
"ColumnName": "任务负责人"
|
||
},
|
||
{
|
||
"GUID": "87745f89-1f60-412e-8c15-5f8090261fb2",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务负责人",
|
||
"GUID": "9598f201-f250-4a2f-9fa9-ae79e86a1b1f",
|
||
"AttachType": {
|
||
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
|
||
"UserColumnAttachType": 1
|
||
}
|
||
},
|
||
"ColumnName": "任务负责人_全名"
|
||
},
|
||
{
|
||
"GUID": "c42e34c3-7fdb-4408-bd50-a3d0d0a26339",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务预算工时",
|
||
"GUID": "54000c20-3ba4-45a0-b00c-8c725a7f78da"
|
||
},
|
||
"ColumnName": "任务预算工时"
|
||
},
|
||
{
|
||
"GUID": "0a82cb81-f3bf-4a6a-be20-4cfa6be6c389",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务类型",
|
||
"GUID": "9c80ca72-6b1b-421d-93ac-212fe7fc0dbe"
|
||
},
|
||
"ColumnName": "任务类型"
|
||
},
|
||
{
|
||
"GUID": "0c90ee57-f5fe-4409-bbfe-fc82a013d36e",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "版本",
|
||
"GUID": "816b95a0-3936-4894-b812-7ac32e536c25"
|
||
},
|
||
"ColumnName": "版本"
|
||
},
|
||
{
|
||
"GUID": "9020a9d5-3b67-4bd8-8672-067b42b1489f",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "任务状态",
|
||
"GUID": "19e92c87-7fe8-47b0-bd25-91b91facd1ab"
|
||
},
|
||
"ColumnName": "任务状态"
|
||
},
|
||
{
|
||
"GUID": "93a39474-a25f-4dac-aa3e-22f703f78590",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "流程实例ID",
|
||
"GUID": "12f152b3-bb0f-40c7-8f81-f40529853a1b"
|
||
},
|
||
"ColumnName": "流程实例ID"
|
||
},
|
||
{
|
||
"GUID": "c875121d-bf71-49fe-8940-2b074144f87f",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "父任务ID",
|
||
"GUID": "dc24ea34-d67e-4edd-8dc0-8f1eb3306702"
|
||
},
|
||
"ColumnName": "父任务ID"
|
||
},
|
||
{
|
||
"GUID": "4e8c5b2a-92f9-463d-9210-02e5a095e2a0",
|
||
"BindingInfo": {
|
||
"TableName": "任务平行视图",
|
||
"ColumnName": "父任务ID",
|
||
"GUID": "dd6e075c-7aab-4cd9-b38a-8ccc2e579162",
|
||
"RelationBinding": {
|
||
"RelatedTable": "任务平行视图",
|
||
"RelatedColumn": "ID",
|
||
"DisplayColumn": "可分配工时"
|
||
}
|
||
},
|
||
"ColumnName": "父任务可分配工时"
|
||
},
|
||
{
|
||
"GUID": "b8dd4752-ce62-4b77-a87f-04e772245362",
|
||
"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": "c9827988ce994d8bbc64e2644432122f"
|
||
},
|
||
{
|
||
"$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": "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": "94a51cf6-f6ad-49df-b7d5-18c40a6fb11f"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "8a5c3b7a-3e0f-4bf9-ae22-894757b38c2e"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "3d087976-a992-48f3-9259-6b83865b3724"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "ee7b931c-0bcd-402d-9082-845bbe227af9"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "bdc32952-704f-4965-a2a8-ec2df0398633"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "10547d07-8179-4949-866b-f3a7f0c1d2de"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "预算工时上限",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=任务信息.父任务可分配工时"
|
||
},
|
||
"ID": "149f6070b4f94a4aa8f1b7106553337a"
|
||
}
|
||
],
|
||
"ID": "287935c4-a1a8-4cbe-a727-46201b040a3a"
|
||
}
|
||
],
|
||
"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": "70cf284b-237b-43a5-b9a8-2d9231af215f"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "2282241b-e0e8-49e0-a9bd-d387311e2d65"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "2ce6ff5f-b124-4079-b91c-285ffb31b403"
|
||
}
|
||
],
|
||
"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"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
]
|
||
} |