Files
clue/ServerCommands/任务/修改任务预算工时.json
超哥 0d4aabf056 {"Message":"完善任务删除逻辑;\r\n完善工时删除逻辑;\r\n完善项目申请流程;\r\n完善任务新增流程;","MessageType":2,"Modules":[{"State":1,"Type":7,"Name":"Table/任务表"},{"State":1,"Type":1,"Name":"PCPage/项目列表"},{"State":1,"Type":1,"Name":"PCPage/项目标题"},{"State":1,"Type":1,"Name":"PCPage/任务列表"},{"State":1,"Type":1,"Name":"PCPage/项目成员"},{"State":1,"Type":1,"Name":"PCPage/项目信息"},{"State":1,"Type":1,"Name":"PCPage/项目审批"},{"State":1,"Type":1,"Name":"PCPage/任务首页"},{"State":1,"Type":1,"Name":"PCPage/任务-工时"},{"State":1,"Type":1,"Name":"PCPage/工时详情"},{"State":1,"Type":1,"Name":"PCPage/新增任务"},{"State":1,"Type":31,"Name":"UserControlPage/工时记录列表"},{"State":1,"Type":15,"Name":"ServerCommand/修改任务预算工时"},{"State":1,"Type":15,"Name":"ServerCommand/删除任务成员所有工时"},{"State":1,"Type":15,"Name":"ServerCommand/上报实际工时"},{"State":1,"Type":15,"Name":"ServerCommand/分配任务工时"},{"State":1,"Type":9,"Name":"Theme"},{"State":1,"Type":15,"Name":"ServerCommand/计算报工数据"},{"State":1,"Type":15,"Name":"ServerCommand/任务发起流程前校验"},{"State":1,"Type":28,"Name":"ProcessItem/新增任务流程"},{"State":1,"Type":23,"Name":"TableView/项目平行视图"},{"State":1,"Type":23,"Name":"TableView/任务平行视图"},{"State":2,"Type":15,"Name":"ServerCommand/新增任务"},{"State":1,"Type":1,"Name":"PCPage/创建项目"},{"State":2,"Type":15,"Name":"ServerCommand/创建项目校验"},{"State":3,"Type":6,"Name":"Pages/任务/任务审批"},{"State":3,"Type":1,"Name":"PCPage/任务审批"},{"State":3,"Type":15,"Name":"ServerCommand/发起任务(废弃)"},{"State":3,"Type":15,"Name":"ServerCommand/项目流程发起前校验"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/递归检测子任务"},{"State":3,"Type":15,"Name":"ServerCommand/删除任务"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/递归删除任务"}],"Version":"v1"}
2024-06-19 16:45:52 +08:00

527 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
}
},
{
"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.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "子任务总预算工时",
"TableValue": {
"TableName": "任务表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "40bd1e33-4105-4ded-8088-c30758b2397d",
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "总任务预算工时",
"GUID": "511457d9-7abf-404b-82ae-ba26a29ab5a8"
},
"ColumnName": "总任务预算工时"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "任务表",
"ColumnName": "父任务ID",
"GUID": "d129907c-cb5f-4eb3-bf88-b3aa460dfb44"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
"NullFormulaValueQueryPolicy": 0
},
"ID": "de31cf4feec24851abbeeaab23503aba"
},
{
"$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": "%Null%",
"compareType": 1
},
{
"$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": "此操作会导致子任务预算工时不足,无法修改!",
"CustomReturns": [
{
"ReturnPropertyName": "新工时",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务表.任务预算工时"
}
}
]
}
],
"ID": "08d32666-d901-4736-8b9d-f3a37b9b3f72"
}
]
},
{
"$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": "c3e577e2-28e8-46f1-bb0d-0bed874a00b3"
},
{
"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": "2aa16f65-1c6d-44aa-96ca-127cf34ed417"
}
],
"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": "a466e785-7cc9-4ce8-a45f-3204e491ed05"
}
]
}
],
"ID": "56c7dbed-d2e5-428f-86dc-f27e0e1d489f"
}
]
},
{
"$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": "新工时"
}
]
}