{ "Name": "新增工时", "Enabled": true, "Triggers": [ { "$type": "Forguncy.ServerCommands.Models.PostRequestTrigger, 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 }, "TestData": "2" }, { "Name": "开始日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024-03-01" }, { "Name": "结束日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024-03-10" }, { "Name": "成员ID", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "administrator" }, { "Name": "工时数", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "40" }, { "Name": "进展内容", "TestData": "测试" }, { "Name": "工时类型", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "计划" }, { "Name": "指定时薪单价" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "30658003-478f-40bc-bec5-21323cc4acb9" }, "ColumnName": "项目ID" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "bd55e51c-f8c0-4411-b7c8-3e50c87bdd7e" }, "ColumnName": "任务状态" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "5bf81dab-5b37-4eb0-be4e-18037fd35888", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "426ce019-dcb5-46a3-8147-1bffb07a0b18", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "严格模式" } }, "ColumnName": "严格模式" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "53087541-fe0b-413b-8f8e-1779bf6bd16c", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算工时" } }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "84fc268c-bf7b-4147-bed7-155011320551", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算费用" } }, "ColumnName": "项目预算费用" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "f2452327-3883-4cf3-8413-6203bb7b43b9", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "默认工时核定方式" } }, "ColumnName": "默认工时核定方式" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "b756dff3-adfe-4149-bcf5-11b9c40ef0e6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "929f17779e0c4d99aaf4f46aa7264abb" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务成员", "TableValue": { "TableName": "任务成员表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "59aedf59-110e-485a-b423-bcd39b775e75" }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "98aa8733-230d-4c50-899a-3f9191834e67", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "负荷" } }, "ColumnName": "参与人负荷" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务时薪", "GUID": "2015c0d5-1299-4d27-b8b6-ff4a26cce7d7" }, "ColumnName": "任务默认时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "岗位ID", "GUID": "6519575a-3bbe-4c37-9da9-1aef4ba06859", "RelationBinding": { "RelatedTable": "项目岗位", "RelatedColumn": "ID", "DisplayColumn": "默认时薪" } }, "ColumnName": "岗位默认时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "f48e0ea1-c309-4cb5-9c32-87020502b86a", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "默认时薪" } }, "ColumnName": "参与人默认时薪" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "ID", "GUID": "20e214aa-5692-4637-a78c-216bfc9708b3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "71614a0f129141b5bde65657df1d0bfd" }, { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(任务成员.任务默认时薪>0,任务成员.任务默认时薪,IF(任务成员.岗位默认时薪>0,任务成员.岗位默认时薪,IF(任务成员.参与人默认时薪>0,任务成员.参与人默认时薪,0)))" }, "ID": "8da0f282ca844012842bd0beecb5ed92" } ], "ID": "814e11f3-9661-4fb9-948c-964c735db926" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=指定时薪单价" }, "ID": "e60f8982826348f182313c0fb4b84f3a" } ], "ID": "b89eb085-b0c8-411e-a6c6-96db03a20492" } ] }, { "$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": "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": "=任务信息.默认工时核定方式" } }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "总计划工时", "TableValue": { "TableName": "任务工时表", "OnlyGetValue": true, "TableValueType": 0, "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "4a9d56c8-57ea-4e91-b39f-1abddfff05e3" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "ID", "GUID": "16004d07-1b90-4d20-860d-b97019f2829c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "c9a1b4db-dc37-457f-9fd2-593dd9487b8b" }, "Value": "计划" } ] } }, "ID": "9b9825bc5aa24e159d27259c07a9ebbf", "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": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"计划工时总时长(\"&工时数&\"h)超过项目预算工时时长(\"&任务信息.项目预算工时&\"h),请修改后提交!\"" } } ], "ID": "4c5503c2-583d-40c1-b74d-ebf56887982e" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计划消耗列表", "TableValue": { "TableName": "任务工时表", "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "0da8b305-24c1-4de1-ac04-bd4c4f3bf0c3", "RelationBinding": { "RelatedTable": "任务成员表", "RelatedColumn": "ID", "DisplayColumn": "参与人" } }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "7a8bdedb-03ec-478d-be75-97a5a5a2095b", "RelationBinding": { "RelatedTable": "任务成员表", "RelatedColumn": "ID", "DisplayColumn": "任务时薪" } }, "ColumnName": "任务时薪" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "b28ed0ac-3392-494f-9906-e0e37d91bea1" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "ID", "GUID": "18302667-d429-4d0f-b620-fa6903b1bdff" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "5e9a67b3-4db6-4a54-bdc0-004844401b1a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(任务信息.默认工时核定方式=1,\"计划\",\"实际\")" } } ] } }, "ID": "f84fe0844214461fbdd56060934dfa24", "Comments": "检查预算是否超支" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "总消耗金额", "ParameterValue": "0", "ID": "ea3316190a0d490fa5b64c2be167533d" }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计划消耗列表" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "总消耗金额", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=总消耗金额+(Item.任务时薪*Item.总工时)" }, "ID": "299d3687c3d1429791f73507bea2d5e6" } ] }, { "$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": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"计划工时总预算超过项目预算金额(\"&任务信息.项目预算费用&\"元),请修改后提交!\"" } } ], "ID": "c1223bd2-b2d4-41eb-8f10-f543c38f1df8" } ] } ], "Comments": "如果提交的工时类型等于项目工时的核定方式", "ID": "2a0cc0b3-1b76-4dbc-a2fa-0653012c057b" } ] } ], "ID": "2a7b87a4-8485-4290-9259-e7cd590d159d" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时数" }, "ID": "d63b795db2da442a826146ac7d87d239" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "分配天数", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1" }, "ID": "c050ca8a42f34ec0a7b4ebfbda3c2a47" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分配天数" }, "LoopIndexParamName": "index", "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "当前日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期+(index-1)" }, "ID": "aec022bc176243ac8935e01cdc2e6cbd" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "统计工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "94b49e51-4abc-4781-945f-1a44c5cf2048" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "609e8eb1-c8d4-4888-81ff-fed104c1dcc7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "98133852-dd53-4274-aa8d-760332dd12a6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "e42f6081-4cbe-4467-80e4-01d754edd4b5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "ca5ea7f6ea644851b29b2a59813bb41e" }, { "$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": "=index" } }, "value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分配天数" }, "compareType": 4 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(工时数/分配天数,1)" }, "ID": "cb85c2cb59854a3fbf833f96a3acd658" } ], "ID": "bd2d2e56-e0ec-40a2-ad29-0a3d4e8b1484" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=待分配工时" }, "ID": "5574195e75eb4eef8f2e352e0e1614da" } ], "ID": "5c13fbe4-5acc-4b1f-a4f9-dad79a18762d" } ] }, { "$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": "计划" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "执行人负荷", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(OR(任务成员.参与人负荷=\"\",任务成员.参与人负荷=0,任务成员.参与人负荷>24),24,任务成员.参与人负荷)" }, "ID": "1d64577832de466897d1c9a953717594" } ], "ID": "8b9b2eb3-1503-424d-951e-980100744035" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } }, "value": "实际" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "执行人负荷", "ParameterValue": "24", "ID": "518ad3dadbf649fa9409382d3c7209bf" } ], "ID": "50b18a15-5e90-4cfc-aa4d-a801c1aa1806" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "预计增加后工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(统计工时.总工时=\"\",0,统计工时.总工时)+计算本次分配工时" }, "ID": "452168f697db479aaf2e519ffb7e824a" }, { "$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": 5 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时-计算本次分配工时,1)" }, "ID": "0bddc8cfd55c4c2c92dab2ad91ea5ff4" }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务工时表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "9d9f1cc1-16f2-4806-b4cf-b4018d0fa411" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "aee3ecdd-3e2d-40f4-87d9-64eb28fc7da2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "dd897598-9e8f-41d5-87ba-1204a02fe873" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "af2e2347-3dcd-4495-a5cc-29dc7b10d7fa" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "a02bb91a-4c83-4797-b7fe-e6546548fa2d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "39b2029e-52a9-4338-afc5-305a95d0cbc6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.参与人" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "abf4b9bb-ff79-42e7-a3e5-d6cd5393010c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=进展内容" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "29ab3f03-9006-4fa3-b2c0-bb08e4aca8d8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算本次分配工时" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪单价", "GUID": "95a3adbb-b9ba-4922-969b-1655ebfd738a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算时薪" } } ] } ], "ID": "a25fb449-e0f1-4eda-af74-f0bbb0fce524" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\"" } } ], "ID": "beeaf738-6851-4f9a-b488-4cf61794e40c" } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "提交工时成功" } ], "ID": "1cdf6748-407f-4f0f-b616-e1d5006f3f5f" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\"" } } ], "ID": "a62187b1-5de9-4d78-9420-5cf793bb5ad8" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }