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
|
|
}
|
|
},
|
|
{
|
|
"Name": "新预算工时",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Commands": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "任务表",
|
|
"TableValue": {
|
|
"TableName": "任务平行视图",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "fcf545b1-38fb-4a2e-b3e3-1f4af870ac2f",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "5719fcb2-167f-46e2-a595-f2694094d3d4"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"GUID": "6835a1c1-53c9-4289-8d3f-dc5985f34647",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "14189ead-62a9-4601-a206-b4ce4e6c9b79",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"GUID": "ef21deed-1d60-41be-ae93-47447bc963f8",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "4e99fa55-723f-48b8-955c-5595ae187aa6",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "项目预算工时"
|
|
}
|
|
},
|
|
"ColumnName": "项目预算工时"
|
|
},
|
|
{
|
|
"GUID": "d677bdc0-525e-4549-a8cb-4c982387db0d",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "09bc90b5-976b-41f9-ac1d-235435d37d0b",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "项目总分配工时"
|
|
}
|
|
},
|
|
"ColumnName": "项目总分配工时"
|
|
},
|
|
{
|
|
"GUID": "4c2824d0-cb98-4b5b-b05c-09e82046f1da",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务名称",
|
|
"GUID": "027d069e-aaad-494d-adfc-ce3116a4e006"
|
|
},
|
|
"ColumnName": "任务名称"
|
|
},
|
|
{
|
|
"GUID": "60d2bc6f-c3b0-45f0-bbab-2dec192067ba",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "总分配工时",
|
|
"GUID": "6f70bc63-6e7f-4cdb-b495-564ead523b05"
|
|
},
|
|
"ColumnName": "总分配工时"
|
|
},
|
|
{
|
|
"GUID": "05d16810-fc64-4712-8fb4-0836a53b995c",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "已分配工时",
|
|
"GUID": "4a2a9325-8cad-4111-b6fd-0d9cfda9ed22"
|
|
},
|
|
"ColumnName": "已分配工时"
|
|
},
|
|
{
|
|
"GUID": "8fd091d2-15b2-4d23-b8ef-7527ff211841",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "d91016f5-5a46-4636-8dac-33b23d21f90a"
|
|
},
|
|
"ColumnName": "父任务ID"
|
|
},
|
|
{
|
|
"GUID": "288b89c9-f815-4a07-b151-9d4959a1712f",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "982feecb-8da9-46e9-99a4-0e7a4e599de3",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务平行视图",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "可分配工时"
|
|
}
|
|
},
|
|
"ColumnName": "父任务可分配工时"
|
|
},
|
|
{
|
|
"GUID": "55d60ec7-dfc4-4ef1-8341-43476395b337",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "本任务已分配工时",
|
|
"GUID": "d0b307f8-9206-4597-a5cf-4ecb4e3c27ea"
|
|
},
|
|
"ColumnName": "本任务已分配工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "ID",
|
|
"GUID": "8ed8daac-ea2a-4392-86e2-4c91c582a7b1"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "f9f427e2e0a249908d9c7ebc509143a3"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "项目可分配工时",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.项目预算工时-任务表.项目总分配工时"
|
|
},
|
|
"ID": "23a8904191ab4dc486ac16c1ba70cd5b"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
|
|
"TryCommandPart": {
|
|
"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": "=任务表.严格模式"
|
|
}
|
|
},
|
|
"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": "=新预算工时"
|
|
}
|
|
},
|
|
"value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.本任务已分配工时"
|
|
},
|
|
"compareType": 4
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"任务已被分配消耗\"&任务表.本任务已分配工时&\"小时,修改后工时,不可低于此值。\""
|
|
},
|
|
"CustomReturns": [
|
|
{
|
|
"ReturnPropertyName": "新工时",
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.总分配工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "79242b1f-9c33-4caf-aebc-9ba3ba7eba3d"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "0ef5c7f20704410eabf21c4b868fe64b",
|
|
"Comments": "如果没有父任务,则将项目可分配工时+任务当前的总分配工时 (相当于这个任务没有分)"
|
|
}
|
|
],
|
|
"ID": "8caee967-34b5-40d2-bc46-63dce90f29de"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "上级剩余工时",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.父任务可分配工时"
|
|
},
|
|
"ID": "37e3b8c29aa54194a07548cd3ba217ce",
|
|
"Comments": "如果没有父任务,则将项目可分配工时+任务当前的总分配工时 (相当于这个任务没有分)"
|
|
}
|
|
],
|
|
"ID": "581e89a0-73f9-4549-b3e3-3f43273374a7"
|
|
}
|
|
],
|
|
"Comments": "严格模式下,根据是否有父任务来计算本次预算工时的上限"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=上级剩余工时+任务表.总分配工时"
|
|
},
|
|
"ID": "fc23623d44294e18935812304bbb80ee",
|
|
"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": "=\"任务工时超标,无法修改,当前任务最大上线为:\"&预算工时上限&\"小时\""
|
|
},
|
|
"CustomReturns": [
|
|
{
|
|
"ReturnPropertyName": "新工时"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "2b0f5f20-95fb-4a4e-ad23-a151636a3b61"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "91aec6fc-2961-4d7f-b928-44110700caba"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon",
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "任务表",
|
|
"ShowConfirm": false,
|
|
"RowsToUpdate": 1,
|
|
"RowsToUpdateCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "36cde956-3506-4020-942d-ca6bb7016a8e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "c97c73f6-9c2f-4287-bbaf-507466d52b51"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新预算工时"
|
|
}
|
|
}
|
|
],
|
|
"ParamNameToSaveNewRowValue": "新任务"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "项目动态",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "d7ffa3b0-6f55-478f-b1f9-bbf7d3a49549"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目动态",
|
|
"GUID": "a8e4db37-d2d2-4f37-a5f8-e9205b6c6c2c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"调整了任务[\"&任务表.任务名称&\"]的预算工时\""
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "执行人",
|
|
"GUID": "d7524510-f1ac-415a-bb26-50b182b3c50a"
|
|
},
|
|
"Value": "%CurrentUser%"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "新增成功",
|
|
"CustomReturns": [
|
|
{
|
|
"ReturnPropertyName": "新工时",
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新预算工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"CatchCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionCode"
|
|
},
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionMessage"
|
|
},
|
|
"CustomReturns": [
|
|
{
|
|
"ReturnPropertyName": "新工时",
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.总分配工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"FinallyCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "项目统计",
|
|
"TableValue": {
|
|
"TableName": "View_项目统计信息",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "e712cac8-db4c-4e49-bbf4-22db3754f7be",
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "e2c10b48-d276-43ff-92d3-6982554995d3",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"GUID": "0f378adc-4c2f-4583-9380-29ab9162a247",
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目预算工时",
|
|
"GUID": "df4b665e-bf05-415f-b1d6-44ef6268356f"
|
|
},
|
|
"ColumnName": "项目预算工时"
|
|
},
|
|
{
|
|
"GUID": "365bbef0-0c71-4147-8ca1-6fae9781df36",
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "已分配任务工时",
|
|
"GUID": "e0b92957-2058-4acf-8f85-c8cb21e7751c"
|
|
},
|
|
"ColumnName": "已分配任务工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "a21318d5-5050-4baa-a025-483041bba932"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.项目ID"
|
|
}
|
|
},
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "62875afcfcce4e3995ac1f427b544e8c"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"ReturnProperties": [
|
|
{
|
|
"Name": "新工时"
|
|
}
|
|
]
|
|
} |