438 lines
19 KiB
JSON
438 lines
19 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.CatchExceptionCommand, ServerDesignerCommon",
|
|
"TryCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "任务表",
|
|
"TableValue": {
|
|
"TableName": "任务表",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "e4efa15a-3c9e-4cfe-a495-00030d11e9c5",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "8fc75aad-be22-4706-bfc1-5d2a9e34ee8c"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"GUID": "96c4a14f-f7be-4ca1-8882-36a1c2feba42",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "父任务ID",
|
|
"GUID": "b3058106-27e3-4405-825a-c6317d65dbba"
|
|
},
|
|
"ColumnName": "父任务ID"
|
|
},
|
|
{
|
|
"GUID": "a1090bc3-3a03-4758-ae63-4bf90f90913d",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务名称",
|
|
"GUID": "efdec58c-5625-4843-a75d-ff21aec11dff"
|
|
},
|
|
"ColumnName": "任务名称"
|
|
},
|
|
{
|
|
"GUID": "ef8a7ac8-87a8-4687-8382-b81c6df691ca",
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "3db7c756-c246-409a-abb4-19c211e4658e"
|
|
},
|
|
"ColumnName": "任务预算工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "23383ca7-120e-436c-8f7b-3b828003fcfe"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "86690732be6d422cbe4dd8b8b862d941"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "项目统计",
|
|
"TableValue": {
|
|
"TableName": "View_项目统计信息",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "1071aaed-c888-40f1-960a-cb391e04daf9",
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "e2c10b48-d276-43ff-92d3-6982554995d3",
|
|
"RelationBinding": {
|
|
"RelatedTable": "项目表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "严格模式"
|
|
}
|
|
},
|
|
"ColumnName": "严格模式"
|
|
},
|
|
{
|
|
"GUID": "280bf59f-50d3-47ce-9900-bdd1d38770ef",
|
|
"BindingInfo": {
|
|
"TableName": "View_项目统计信息",
|
|
"ColumnName": "项目预算工时",
|
|
"GUID": "df4b665e-bf05-415f-b1d6-44ef6268356f"
|
|
},
|
|
"ColumnName": "项目预算工时"
|
|
},
|
|
{
|
|
"GUID": "1eed9f7a-0f20-496c-822e-57487829c330",
|
|
"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": "be3e901989ee48be8342a779529ecad0"
|
|
},
|
|
{
|
|
"$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": "e583a0048e5044a0b325443e28146bdb"
|
|
}
|
|
],
|
|
"ID": "ca412410-4961-425b-bcbd-78e522a2b526"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "父任务",
|
|
"TableValue": {
|
|
"TableName": "任务平行视图",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"GUID": "561e2df3-b364-4b71-82d7-e257f78c6b8f",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "层级",
|
|
"GUID": "a5e920a4-a2a4-4af1-ae02-5f800213a048"
|
|
},
|
|
"ColumnName": "层级"
|
|
},
|
|
{
|
|
"GUID": "e21efd11-6c4b-447c-b4b8-e8dae1f3a23e",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "任务预算工时",
|
|
"GUID": "c8f84a0f-d253-4d60-942d-a1473cb8f830"
|
|
},
|
|
"ColumnName": "任务预算工时"
|
|
},
|
|
{
|
|
"GUID": "2375b49f-a344-481d-b24f-255535146b39",
|
|
"BindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "总计划工时",
|
|
"GUID": "9644df0b-6bd7-483b-8aaf-96d5c3fa435a"
|
|
},
|
|
"ColumnName": "总计划工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务平行视图",
|
|
"ColumnName": "ID",
|
|
"GUID": "aa8ca1bc-889e-404f-a711-80fc6a865711"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.父任务ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "30e709ea5084438aa023a958fc494046"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "预算工时上限",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=父任务.任务预算工时-父任务.总计划工时--任务表.任务预算工时"
|
|
},
|
|
"ID": "423c3d6d0618419c9eac630be5066c46"
|
|
}
|
|
],
|
|
"ID": "d213848d-aed2-41b6-a65a-d385ef1edbb9"
|
|
}
|
|
],
|
|
"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,\"预算工时超标:父任务可支配计划工时不足,请修改后提交!\",\"预算工时超标:项目可只配计划工时不足,请修改后提交!\")"
|
|
},
|
|
"CustomReturns": [
|
|
{
|
|
"ReturnPropertyName": "新工时"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "97dfa6d6-3f61-4f65-b209-2acaa2f36726"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "5e9cf66f-56d4-4903-8dd3-d32a9ac9990c"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "0eb570fc-b0ce-4140-be2e-a2151dd6f191"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新预算工时"
|
|
}
|
|
}
|
|
],
|
|
"ParamNameToSaveNewRowValue": "新任务"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "项目动态",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "b30d67e3-974e-49c6-b555-58d77f4aead7"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务表.项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "项目动态",
|
|
"GUID": "8337d1ea-3d21-49bd-9e46-8e81777cafc2"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"调整了任务[\"&任务表.任务名称&\"]的预算工时\""
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "项目动态",
|
|
"ColumnName": "执行人",
|
|
"GUID": "d13db88a-278c-4c08-a328-db04b1d4606b"
|
|
},
|
|
"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": "=任务表.任务预算工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"ReturnProperties": [
|
|
{
|
|
"Name": "新工时"
|
|
}
|
|
]
|
|
} |