{ "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": "28feaa57524d4b629c887584e8943b68" }, { "$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": "项目ID", "GUID": "17b7e0ce-f6c5-4095-93e6-637aa62440a7", "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": "fd009643b2374e2fbc54775cf4ebe137" }, { "$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": "03fde63189d94667ae6d5c6a1979a5bb" } ], "ID": "1be0fa3d-4226-478b-9916-63423673dea2" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=指定时薪单价" }, "ID": "6fc649ddfae843caa1f555278ace195d" } ], "ID": "ae194b64-06f0-4113-8c61-89b159094f8a" } ] }, { "$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.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": "View_项目统计信息", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算费用", "GUID": "1f23c586-e318-41f8-9e2c-f9fc47949199" }, "ColumnName": "项目预算费用" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总成本", "GUID": "7c3a493f-d2ac-49b3-957f-7a772d5138bf" }, "ColumnName": "总成本" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算工时", "GUID": "45110ee2-aa57-4a49-bea6-a94586f164ba" }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总核定工时", "GUID": "a4773f83-2817-4be0-9e7d-4b5b3cd36ed5" }, "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": "9a972b19262c4b819a666d6c442c6d6b", "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),请修改后提交!\"" } } ], "Comments": "如果加上本次提交的工时>预算的工时,则拦截", "ID": "18583b21-d2a0-428e-996a-3cfc62fd4887" }, { "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": "d4cd3b02-8a6f-41dc-bf86-9773da9f0fb4" }, { "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": "9d97ee1dd7d0410b9602c3373d41759c" }, { "$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": "c3edd061-47b0-48f1-924e-f0b3a7250f6a" } ] } ], "Comments": "如果上面两条项目都没超标,就检查是否设置了任务预算工时。", "ID": "b3bfc6b0-689a-45a4-99ca-7b07d8b03653" } ] } ], "Comments": "如果提交的工时类型等于项目工时的核定方式", "ID": "5c34c921-a5f1-434e-a589-050799038608" } ] } ], "Comments": "严格模式下,需要校验工时和费用是否超标", "ID": "dae3bbb7-7b4e-48d3-8b08-fecf28a357c1" } ] }, { "$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": "fbb132d33b854e1aaf0d772bc3a8dbef" }, { "$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": "6bdf772f-22a4-4f5b-b055-9f6536541fd0" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时,1)" }, "ID": "de7c26c08e4e4086bfa6f4d8dbcaa4fe" } ], "ID": "69e6f7b6-a80f-4d1e-907c-e6a189bd95f7" } ] }, { "$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": "cd001833-22d4-4525-bcf3-0692f8a4164f" }, { "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": "2c656595-72a8-4019-b45a-26b2f75d103c" } ] }, { "$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": "48030a9d-d571-48e1-ba20-5a07fde2d76d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "f560a7a1-56da-43f4-81ed-4fcbd46e74b0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "f75337d0-3045-47db-b89f-91e723bb678b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "5eaa88d9-791e-429d-b63a-a33127b143d6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "c0a03cd6-8949-45ab-b55a-112f8350a866" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.参与人" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "7a34035c-a6c0-4c86-9ee2-ffce0a7ecd21" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=进展内容" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "26d2cda5-0221-4f00-bbf3-af07b8a1fa39" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算本次分配工时" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪单价", "GUID": "59ceb364-5bae-44c0-8ad5-c6a86452cb45" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算时薪" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "提成系数", "GUID": "f8051ee9-3d0a-4ca2-930b-118a5f359c71" }, "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": "dfad8684-4662-48c9-a44b-d8c82d1ce252" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\"" } } ], "ID": "f238fec4-27aa-4f24-b2b6-3096a1e12d58" } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "提交工时成功" } ], "ID": "70d852be-8d93-43a3-a7b5-edcab6981caf" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\"" } } ], "ID": "01558a83-dd2d-4cfe-90af-5bf8d94845be" } ] } ], "ID": "82029e6a-99c0-49a5-9646-0fc534133b8b" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "成员不在任务内,无法报工!" } ], "ID": "58aede58-95c2-47ac-a465-d08f0a32da5c" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }