533 lines
25 KiB
JSON
533 lines
25 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
|
|
}
|
|
},
|
|
{
|
|
"Name": "父任务ID",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "任务标题",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
},
|
|
{
|
|
"Name": "执行人",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "开始日期",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "结束日期",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "任务分组",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "任务类型",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "任务版本",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "预算工时",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "任务说明",
|
|
"DataValidationInfo": {}
|
|
},
|
|
{
|
|
"Name": "备注",
|
|
"DataValidationInfo": {}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Commands": [
|
|
{
|
|
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
|
"TryCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "项目统计",
|
|
"TableValue": {
|
|
"TableName": "View_项目统计信息",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "8be465f9-1173-4551-ba9c-8077e9e1068a",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目预算工时",
|
|
"GUID": "c3f88088-ff8f-4ba4-b4b8-0b9b680f51b1"
|
|
},
|
|
"ColumnName": "项目预算工时"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "已分配任务工时",
|
|
"GUID": "ec163591-391a-496f-b95b-2b30be766815"
|
|
},
|
|
"ColumnName": "已分配任务工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "f6308398-2aec-4b4a-9e2a-ec524facb605"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=项目ID"
|
|
}
|
|
},
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "89a933bed8a0415093c1ca7e65863c02"
|
|
},
|
|
{
|
|
"$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%",
|
|
"compareType": 1
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$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": "=项目统计.严格模式"
|
|
}
|
|
},
|
|
"value": "1"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
|
"param": {
|
|
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
|
"ParamObject": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=预算工时"
|
|
}
|
|
},
|
|
"value": "0",
|
|
"compareType": 2
|
|
},
|
|
{
|
|
"$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": "任务预算工时超标,请修改或申请新的预算。"
|
|
}
|
|
],
|
|
"ID": "c34452bd-96e1-4411-be79-24f1fdab9459"
|
|
},
|
|
{
|
|
"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": "1",
|
|
"ID": "b16d29a07b0c438fbbb99f78efd15b82"
|
|
}
|
|
],
|
|
"ID": "cdd0d56f-8d1c-47da-9f46-0dc7557e3e4d"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "父任务",
|
|
"TableValue": {
|
|
"TableName": "任务表",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "层级",
|
|
"GUID": "71447dd9-ed15-40d3-8c95-35af02be1228"
|
|
},
|
|
"ColumnName": "层级"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "a11173ee-ce04-46d5-a2fe-57bac8f3d19f"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=父任务ID"
|
|
}
|
|
},
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "a739bad14f7e43d0bfa3c64950d43eed"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "层级",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=父任务.层级+1"
|
|
},
|
|
"ID": "94dddad10a1647e3906a84c6cf0793dc"
|
|
}
|
|
],
|
|
"ID": "b1ec1f65-b9b5-409f-981b-514b838ecbec"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon",
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "任务表",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "d1ce9d9b-3111-45d3-86cb-9d2d13ca96a9"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "663b0fd7-aeaf-45bd-9bd8-5081460bf68b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=父任务ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务名称",
|
|
"GUID": "8f65568f-c2bf-47dd-a801-33660d2d3b1e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务标题"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "执行者",
|
|
"GUID": "cd0b6e71-917b-4141-97fa-759aee7d60dc"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=执行人"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "开始时间",
|
|
"GUID": "3c7c2bda-50f9-428a-a444-c72e4ab3bba8"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=开始日期"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "结束时间",
|
|
"GUID": "10d5a495-3443-43f1-814a-7b26b663a59b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=结束日期"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务类型",
|
|
"GUID": "7182f12f-6e4a-456f-93dd-259034437aec"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务类型"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "分组ID",
|
|
"GUID": "30b21965-c8f2-446f-b463-fd5acbe18fad"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务分组"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "版本",
|
|
"GUID": "00196d28-a6a3-41b9-b4ff-96e22d2908d2"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务版本"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务说明",
|
|
"GUID": "b5c7d432-0b10-4fd8-a018-59dda1fa58bd"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务说明"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "备注",
|
|
"GUID": "d16f82bf-c2b1-45e1-a6e7-09ec92385858"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=备注"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "层级",
|
|
"GUID": "85f9bb94-726b-45d3-a097-0e26e70a57db"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=层级"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "06ca0878-5d0b-4450-8d58-d0a598927853"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=预算工时"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "3f066ba2-b601-4a29-a83b-d0c77ac63dc7"
|
|
},
|
|
"Value": "0"
|
|
}
|
|
],
|
|
"ParamNameToSaveNewRowValue": "新任务"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "项目动态",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "10414937-35a4-4c78-88ee-573c87c57613"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目动态",
|
|
"GUID": "78700379-81df-4091-a3c0-c0ce09788052"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"新增任务[\"&任务标题&\"]\""
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "执行人",
|
|
"GUID": "2a010c61-4894-4c8f-9e2c-3a7d6c7eee3c"
|
|
},
|
|
"Value": "%CurrentUser%"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "新增任务成功,请添加参与人和设置人员岗位、薪资等信息!"
|
|
}
|
|
],
|
|
"ID": "bfea1c53-d963-4a65-9bf7-f3f7d4bcbe2c"
|
|
}
|
|
],
|
|
"Comments": "如果任务设置了预算工时,则检测是否超标"
|
|
}
|
|
],
|
|
"ID": "5d3bd8b4-c692-4b38-ad2d-cfa994a0e420"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": "项目不存在"
|
|
}
|
|
],
|
|
"ID": "00cae617-053f-407e-9436-464e88870862"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"CatchCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionCode"
|
|
},
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionMessage"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |