{ "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 }, "TestData": "2" }, { "Name": "开始日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024-03-01" }, { "Name": "结束日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024-03-10" }, { "Name": "执行人", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "administrator" }, { "Name": "工时数", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "40" }, { "Name": "进展内容", "DataValidationInfo": {}, "TestData": "测试" }, { "Name": "工时类型", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "计划" }, { "Name": "指定时薪单价", "DataValidationInfo": {} } ], "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": "参与人", "GUID": "20d5971e-0ac3-4236-9e5f-0e67e2034b35" }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "b0fb9e47-ca43-45d0-bb54-cf7ac8edce15", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "负荷" } }, "ColumnName": "参与人负荷" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务时薪", "GUID": "93b2f1d8-fd53-468a-9211-87f51b6a5494" }, "ColumnName": "任务成员时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "岗位ID", "GUID": "299a3d18-2733-483d-bcd6-09e057c343ef", "RelationBinding": { "RelatedTable": "项目岗位", "RelatedColumn": "ID", "DisplayColumn": "默认时薪" } }, "ColumnName": "任务岗位时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "599afbfc-245b-40b1-b078-adb9ca71abef", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "默认时薪" } }, "ColumnName": "参与人默认时薪" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "7d139430-ab2a-40df-98d0-38bc039435e2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "2b46a973-8db3-40e7-b10b-93ddb666b812" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } } ] }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "565209b7bd154c90b096249545dfa352" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目成员", "TableValue": { "TableName": "项目成员表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "岗位ID", "GUID": "e72fecb8-c4b6-4ef0-a802-f18cb6d6ba24", "RelationBinding": { "RelatedTable": "项目岗位", "RelatedColumn": "ID", "DisplayColumn": "默认时薪" } }, "ColumnName": "项目岗位时薪" }, { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "默认时薪", "GUID": "90991267-4d34-4537-8be3-0ef990118f3e" }, "ColumnName": "项目成员时薪" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目ID", "GUID": "25c7933c-8b27-4163-ad03-a22d7efe88fb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "02b01205-9bbb-4e4f-8534-f52ea963c907" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } } ] }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "99e42cdcf1d74dc2aa15b8fadb9d87e5" }, { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "1b1dfe53-8569-419b-9ac7-4bb4e54e5cb3" }, "ColumnName": "项目ID" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务名称", "GUID": "2f0ff2cf-b0cf-49ba-99c2-9b8636152c54" }, "ColumnName": "任务名称" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务预算工时", "GUID": "503e9dd2-fc8c-4426-a37f-c7d582c9577a" }, "ColumnName": "任务预算工时" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "93ff9848-29c1-4cf6-a3cd-d33eb1d033c4" }, "ColumnName": "任务状态" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "da675aa2-3619-422b-817f-eed8c7c118c7", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "038a41fb-93fa-46f8-b259-87eb94cc28ad", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "严格模式" } }, "ColumnName": "严格模式" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "f4212e88-f2aa-4d8f-8ba8-b7c518505bb7", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算工时" } }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "31040160-fc88-459c-b67b-8621acbc0920", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算费用" } }, "ColumnName": "项目预算费用" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务类型", "GUID": "f6fb60c7-0ba6-450b-9cda-28eb2412e296", "RelationBinding": { "RelatedTable": "任务类型", "RelatedColumn": "ID", "DisplayColumn": "提成系数" } }, "ColumnName": "提成系数" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "总计划工时", "GUID": "4bdf7858-40b1-495e-be0d-109aaaf4f69f" }, "ColumnName": "总计划工时" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "总实际工时", "GUID": "8505a216-3aee-4056-affe-6c760e35c844" }, "ColumnName": "总实际工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "6ffb7caa-1cd8-4373-b2bf-8a03556c1866" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "a9121deede5e47809d0a7e3a37a1befc" }, { "$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.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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.任务默认时薪" }, "ID": "068f4611d05f4d0f8c97425c44bea1f0" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "任务成员时薪", "ID": "59b966a6d5e042b79fba6d9e1f659758" } ], "ID": "e82fc3fd-1f12-4671-a8db-c281d9a508d6" }, { "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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.岗位默认时薪" }, "ID": "c661840bf7dd4209b486efc6b9eebf59" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "任务岗位时薪", "ID": "05df8d3ef9fa454b8ec03882ddda515f" } ], "ID": "beacabcf-3bb9-4323-bbf4-a7fae4f5ba83" }, { "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": "%Null%", "compareType": 1 } ] }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目成员.项目成员时薪" }, "ID": "3c9b1a387c9942f68be78e905f6efe7f" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "项目成员时薪", "ID": "25ff3a82fd57430b94e16b296b77c513" } ], "ID": "21f7227a-17fb-4cbb-a041-e28ee5e26b34" }, { "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": "%Null%", "compareType": 1 } ] }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目成员.项目岗位时薪" }, "ID": "7851dbe270c34767aeeb95f619c1f52b" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "项目岗位时薪", "ID": "22bb1104b90b4467b078e638f3f4aa51" } ], "ID": "cfaf4dbf-85a9-4bd8-afbc-b133edf12a79" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.参与人默认时薪" }, "ID": "ca126f12d798410491c2eae2674f0ec6" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "用户默认时薪", "ID": "fd64e93a07ae4ca2820422202ad6e7a4" } ], "ID": "323a99c1-f431-4171-adf2-bd1011494ea2" } ] } ], "ID": "4a4bd5f5-6079-4b28-b3e2-95aaa77a2972" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=指定时薪单价" }, "ID": "f2849da5adc443fb92b3dbb9bb1779fb" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "时薪计算来源", "ParameterValue": "特殊指定", "ID": "a8b2f1ff8b9c4519b5e80575c9550bed" } ], "ID": "d998a80f-60c4-4412-ae82-9a3353b0fe0e" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "预测本次产生成本", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目统计信息.总成本+(计算时薪*工时数*任务信息.提成系数)" }, "ID": "1663c0564426454cb4d8f6337bec5d02" }, { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目统计信息", "TableValue": { "TableName": "View_项目统计信息", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "工时核定方式", "GUID": "b31caaa2-8cbc-4f56-8e9e-0597c91d89da" }, "ColumnName": "工时核定方式" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算费用", "GUID": "1f23c586-e318-41f8-9e2c-f9fc47949199" }, "ColumnName": "项目预算费用" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算工时", "GUID": "45110ee2-aa57-4a49-bea6-a94586f164ba" }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总核定工时", "GUID": "a4773f83-2817-4be0-9e7d-4b5b3cd36ed5" }, "ColumnName": "总核定工时" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总成本", "GUID": "7c3a493f-d2ac-49b3-957f-7a772d5138bf" }, "ColumnName": "总成本" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目ID", "GUID": "0aa2d908-82fb-4233-a1e8-eb5a36cecaa2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, "TopCount": "1" }, "ID": "8f20e26c0c7f468f93fd1112fda69cb7", "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": "=任务信息.工时核定方式" } }, "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": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"项目工时预算不足,请申请预算后提交!\"" } } ], "Comments": "如果加上本次提交的工时>预算的工时,则拦截", "ID": "518a9271-6e46-4a9a-9b18-41f4bf2a7a31" }, { "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": "=\"项目费用预算不足,请申请预算后提交!\"" } } ], "Comments": "先算出本次提交产生的成本,如果>预算的费用,则拦截", "ID": "4109f03a-956f-422b-be68-13d8edf1f4c7" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.任务预算工时" } }, "value": "0", "compareType": 2 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务统计信息", "TableValue": { "TableName": "View_任务工时统计", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "View_任务工时统计", "ColumnName": "总核定工时", "GUID": "30e9fee2-cc98-4ce8-954a-4694deb3225d" }, "ColumnName": "总核定工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "View_任务工时统计", "ColumnName": "任务ID", "GUID": "4ef81414-5f02-4242-a14a-3c0762e72e33" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } } }, "ID": "f7ed048b6276441b8981d5758a1bf56a" }, { "$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": "此次报工超过任务工时限制,请修改后提交!" } ], "Comments": "如果任务当前工时+本次报工工时大于预算,则拦截", "ID": "18e16fe3-8d87-4306-900f-cf0b7ab17100" } ] } ], "Comments": "如果上面两条项目都没超标,就检查是否设置了任务预算工时。", "ID": "7b3a035b-cbd4-4beb-ba34-3b0da0a8b25c" } ] } ], "Comments": "如果提交的工时类型等于项目工时的核定方式", "ID": "3e24d042-00d3-46e1-b07f-9134849cc28c" } ] } ], "Comments": "严格模式下,需要校验工时和费用是否超标", "ID": "6884a15a-1da6-4a79-9d98-42f406e6b48b" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时数" }, "ID": "9fa5a1b21c574f1a8b59a42611442fd7" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "分配天数", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1" }, "ID": "e9869319ddf04a8395ae0b9cb8c5d2c4" }, { "$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": "579061b5cf414774a2af1aaa9c04b29b" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "统计工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "a0006a9d-3fba-4cf5-a20a-d2a0909d5175" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "98f3f236-67bc-4db2-9af7-407e52bdcd74" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "9a1d5408-9353-4ab0-bef4-91af355df584" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "6fae6e04-e2b8-4d6c-b594-3bd02c5883d2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "5bbe6bbbe41642e19df09b58c7b289c3" }, { "$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": "44b51db4c6be470dbc468d4a9abfa061" } ], "ID": "3e265f58-f9c4-4380-a74c-a0a3ac089b8b" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时,1)" }, "ID": "de7c26c08e4e4086bfa6f4d8dbcaa4fe" } ], "ID": "69598862-13bb-447e-afaa-39457f3d44e3" } ] }, { "$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": "03f94c6a676740b799eddd0aafce2fe5" } ], "ID": "549f42fc-cbe4-422c-a493-02d7ce693210" }, { "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": "f998993f4e8f4778a448ca19dc771a2b" } ], "ID": "baab28eb-8a70-4c8c-97c9-769d468934be" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "预计增加后工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(统计工时.总工时=\"\",0,统计工时.总工时)+计算本次分配工时" }, "ID": "36354abf29e44a4e9790b6db43c12fa9" }, { "$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": "8e34730a7bb547b880d26b1e4d60fc06" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务工时表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "344588f5-2837-40af-ac17-16ba8d1d493a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "b3e83a46-79ec-4561-ba4f-7943d9ee7e71" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "5b5d6e91-43a2-44bf-85b9-ba2d2954465a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "e0186f85-f462-44d1-84dc-b78871d946b0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "0eafacff-e048-48f3-b48f-0ca82a89d73d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.参与人" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "6ca1d705-d57c-44f2-914b-eff4774fa49a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=进展内容" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "6dcb7e08-7e02-4c85-9264-453d97833ba6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算本次分配工时" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪单价", "GUID": "f7409fd9-e56a-4767-bc33-06b0010d71cd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算时薪" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "提成系数", "GUID": "78395ee2-2002-4354-9309-d5aeab731ad0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.提成系数" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪来源", "GUID": "99f983c0-c3bc-48c0-a98e-9754e62d5268" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=时薪计算来源" } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "93679277-9641-47dd-819f-ac3571a21ae5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "8f465c29-ba82-4212-bd94-bfe43ac0fa42" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]增加\"&工时类型&\"工时\"&工时数&\"小时\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "a754f2cb-3bfd-439f-99fc-ace8f8510b11" }, "Value": "%CurrentUser%" } ] } ] } ], "ID": "c13c63bd-75ed-4fd4-9e63-9c5b780a49e4" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\"" } } ], "ID": "421b11ec-1f58-4993-bfae-5fa734979761" } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "提交工时成功" } ], "ID": "93db7169-bcca-429d-aacf-3fa2b546ee52" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\"" } } ], "ID": "bee19115-020f-4c50-8e0b-4a87f2e00ef3" } ] } ], "ID": "6f0e4d07-319b-4f31-8384-aa5b2f618f5f" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "成员不在任务内,无法报工!" } ], "ID": "60999756-b879-4cc0-93c2-1658179e46f2" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }