527 lines
22 KiB
JSON
527 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": "ba455dea-c603-4f25-85ad-acf820a7e0c0",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "50961c18-f454-469e-ae8f-eb11862b1148"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"GUID": "900d46b7-3532-4567-91cb-57aca96a546e",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "d043ddbd-c8a3-4a31-a47e-bcdac7551398"
|
|
},
|
|
"ColumnName": "父任务ID"
|
|
},
|
|
{
|
|
"GUID": "d73e44fd-2e43-4116-b585-333ca2562fc6",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "7471e7c8-3650-42a7-b438-3a775347aef8",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "任务状态"
|
|
}
|
|
},
|
|
"ColumnName": "父任务任务状态"
|
|
},
|
|
{
|
|
"GUID": "da8b6abf-5d57-46f6-874a-3fc3147afcd7",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "a6f8cca7-5575-4839-9365-ffebe1facca9",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "ID",
|
|
"NextRelationBinding": {
|
|
"RelatedTable": "View_项目统计信息",
|
|
"RelatedColumn": "项目ID",
|
|
"DisplayColumn": "项目预算工时"
|
|
}
|
|
}
|
|
},
|
|
"ColumnName": "项目预算工时"
|
|
},
|
|
{
|
|
"GUID": "e74e3554-e9ed-45bd-b47c-1f1d33211bd3",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "69975d40-afe9-4bc8-b156-b06f8e589350",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "ID",
|
|
"NextRelationBinding": {
|
|
"RelatedTable": "View_项目统计信息",
|
|
"RelatedColumn": "项目ID",
|
|
"DisplayColumn": "已分配任务工时"
|
|
}
|
|
}
|
|
},
|
|
"ColumnName": "已分配任务工时"
|
|
},
|
|
{
|
|
"GUID": "818c62b8-cdcd-46ea-8ea9-ae9858011d1b",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "3256ecff-7321-48f2-9e3e-5aefeaac7b90",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "项目经理"
|
|
}
|
|
},
|
|
"ColumnName": "项目经理"
|
|
},
|
|
{
|
|
"GUID": "2f826e88-d8ea-4d6d-84ae-9ed11f948656",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "3b610fae-f462-4d6d-ba6e-e6b24dfce8af",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "工时分配方式"
|
|
}
|
|
},
|
|
"ColumnName": "工时分配方式"
|
|
},
|
|
{
|
|
"GUID": "931496b5-6162-4e8c-890a-14c022b7b92a",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "2d53d463-1d5c-4117-aa9a-796165ad9c89"
|
|
},
|
|
"ColumnName": "任务预算工时"
|
|
},
|
|
{
|
|
"GUID": "b325857a-1e57-4233-93d0-78ca004b9f8a",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "b688b437-4733-4102-9763-f9dee3d372cd",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"GUID": "ad0b06ae-6b5e-4d6f-9a57-5c2918c2cf04",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务负责人",
|
|
"GUID": "3f7a6d55-8578-48be-b14a-ba4a6e17f266"
|
|
},
|
|
"ColumnName": "执行者"
|
|
},
|
|
{
|
|
"GUID": "a0d5f139-812d-4bea-9a3f-cc0ee388f3dc",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务类型",
|
|
"GUID": "050b2a2a-e802-4280-bc06-10d5e76c4e35"
|
|
},
|
|
"ColumnName": "任务类型"
|
|
},
|
|
{
|
|
"GUID": "64cb157e-5ff8-41b9-a1cc-eabdd1e74f85",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "版本",
|
|
"GUID": "1fa6cc05-da37-4315-b822-951a8b751213"
|
|
},
|
|
"ColumnName": "版本"
|
|
},
|
|
{
|
|
"GUID": "c52c4d94-9d70-4366-a948-2799e4043614",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "8b3ea124-961b-4d9c-8342-d06a89709702"
|
|
},
|
|
"ColumnName": "任务状态"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "ae5a57e8-074d-401e-9d6b-c85747f92057"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "05732b16f68a40aea1411edf257a1a75"
|
|
},
|
|
{
|
|
"$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": "0ffd4993-3dcd-4726-bd66-951c44d1ce9d"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "03745930-4d16-4d69-9c87-a81e35683b88"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "e244e7d0-6f12-499f-bac0-3e6e3adee3d9"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "1c3d6abb-4f24-4101-8804-9d9f17fcd996"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "81e2f52f-7bca-4c27-9a80-e4a9b7a4df10"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "f067411d74064d7b94eaa375d9410597"
|
|
}
|
|
],
|
|
"ID": "42b18717-7bb8-4288-96d3-22c208d5ce83"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "父任务",
|
|
"TableValue": {
|
|
"TableName": "任务平行视图",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "8468e5ee-2d0c-4653-b414-2845ded5b828",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "层级",
|
|
"GUID": "f77e0f2d-5a46-41ee-817e-8a25586086aa"
|
|
},
|
|
"ColumnName": "层级"
|
|
},
|
|
{
|
|
"GUID": "36f92afd-5705-417e-b76c-db3eda355d94",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "69c38d9a-9a17-45e9-8265-7b383df92d76"
|
|
},
|
|
"ColumnName": "任务预算工时"
|
|
},
|
|
{
|
|
"GUID": "6201715b-2e80-4961-88aa-230d8c064dac",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "子任务预算工时",
|
|
"GUID": "04e49339-f18b-4166-80b6-4153098333d3"
|
|
},
|
|
"ColumnName": "子任务预算工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "ID",
|
|
"GUID": "1203dd82-1886-4972-bf84-daa88a6926bd"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.父任务ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "7bd17b4b5c814c7f97e0cdcd18390d41"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=父任务.任务预算工时-父任务.子任务预算工时"
|
|
},
|
|
"ID": "d9c75d72e3cb44e1928346d49e88b7da"
|
|
}
|
|
],
|
|
"ID": "6bf73aa0-951b-4080-b09e-8c0b2c968796"
|
|
}
|
|
],
|
|
"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": 4
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=IF(任务信息.父任务ID>0,\"预算工时超标:父任务可支配计划工时不足,请修改后提交!\",\"预算工时超标:项目可只配计划工时不足,请修改后提交!\")"
|
|
}
|
|
}
|
|
],
|
|
"ID": "51343141-8cfe-414d-ac01-7a82d052ac51"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "5a4607f9-f6cf-4e93-a344-74c178029992"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |