{ "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": {}, "TestData": "2024-03-01" }, { "Name": "结束日期", "DataValidationInfo": {}, "TestData": "2024-03-10" }, { "Name": "执行人", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "administrator" }, { "Name": "工时数", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "40" }, { "Name": "备注", "DataValidationInfo": {}, "TestData": "测试" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务平行视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "d70fbe4e-6b17-426f-814a-ca333b61e544", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "项目ID", "GUID": "305361b8-995e-48bc-99d6-f008471584ca" }, "ColumnName": "项目ID" }, { "GUID": "3af3de5a-0e95-4e4e-8b88-5acd176de61f", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "任务名称", "GUID": "1514429a-cb4c-433a-a448-a452f6e330dd" }, "ColumnName": "任务名称" }, { "GUID": "215fef37-f138-47fc-89a8-df8782920810", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "任务状态", "GUID": "b0c6d3c7-733a-4b63-a511-f4f3299b9e05" }, "ColumnName": "任务状态" }, { "GUID": "83d114d4-8d25-4d00-8d8f-7aa1d22fba08", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "任务状态", "GUID": "4fe7e2d7-474c-4257-9186-51fd7c25b219", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "GUID": "4a5b48e7-bb1f-4726-8e21-ceaaa11f2022", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "项目ID", "GUID": "7ce07b47-d21f-4abe-8a7a-3e0ec69b559d", "RelationBinding": { "RelatedTable": "项目平行视图", "RelatedColumn": "ID", "DisplayColumn": "严格模式" } }, "ColumnName": "严格模式" }, { "GUID": "2a8af634-7280-46a3-8f3a-f1837b6401e5", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "任务类型", "GUID": "bea8ca1b-c9c4-4681-940b-d701f4944130", "RelationBinding": { "RelatedTable": "任务类型", "RelatedColumn": "ID", "DisplayColumn": "提成系数" } }, "ColumnName": "提成系数" }, { "GUID": "3c6b7687-5711-448e-b490-9aabb156e498", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "项目ID", "GUID": "e76d70e2-a2fe-48eb-bd6e-e28af6b71990", "RelationBinding": { "RelatedTable": "项目平行视图", "RelatedColumn": "ID", "DisplayColumn": "工时分配方式" } }, "ColumnName": "工时分配方式" }, { "GUID": "f7fbe8b6-9f82-43b5-8ec8-52205a2152f9", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "开始时间", "GUID": "862b87e2-946e-40a0-896e-09a97d96f51c" }, "ColumnName": "开始时间" }, { "GUID": "3bb8328a-b934-488d-a1bd-805072bf2328", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "任务负责人", "GUID": "a2e73ddf-4af8-436f-8a01-997bff966952" }, "ColumnName": "执行者" }, { "GUID": "5adaea42-50c9-4b24-94cf-daa981707cf0", "BindingInfo": { "TableName": "任务平行视图", "ColumnName": "可分配工时", "GUID": "6054feca-ba74-4e7f-989e-c9a201859a2e" }, "ColumnName": "可分配工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务平行视图", "ColumnName": "ID", "GUID": "565ce7a5-e5aa-434e-aecf-d7e00ac509fd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "04187475662c442396affecd4e52794f" }, { "$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.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": "项目成员", "TableValue": { "TableName": "项目成员表", "TableValueType": 1, "BindingInfos": [ { "GUID": "ee221b91-2992-463b-9493-acc5b7663f33", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "ID", "GUID": "5b0ac4f9-25c2-4d0b-953b-8fc25f915d3b" }, "ColumnName": "ID" }, { "GUID": "c1732deb-776f-49d7-8563-7d9058f5b468", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "5e5071c7-2eb0-4ea8-a5c9-d4a102f25e24" }, "ColumnName": "项目成员" }, { "GUID": "bfa78a83-ddf3-4e65-8bc8-47f34976a30e", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "默认时薪", "GUID": "d434791e-bf5a-4688-8caa-7777fe811018" }, "ColumnName": "成员时薪" }, { "GUID": "45ac5922-6553-416d-9fa5-456c90450ff7", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "岗位ID", "GUID": "0742bcd9-236d-4c48-87fb-d1f4a981a3e5", "RelationBinding": { "RelatedTable": "项目岗位", "RelatedColumn": "ID", "DisplayColumn": "默认时薪" } }, "ColumnName": "岗位时薪" }, { "GUID": "bf119452-c85b-4e1e-b6bc-8caa94231883", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "653b75d4-3491-4a4c-a330-00b180998295", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "默认时薪" } }, "ColumnName": "用户时薪" }, { "GUID": "7fcdba55-5874-49c8-af9d-5bba537ebbf5", "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "496e2025-1b05-42b2-8858-f75e717c926f", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "负荷" } }, "ColumnName": "成员负荷" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目ID", "GUID": "363b99f0-817d-4c62-aabd-a1cc3bfc8d6c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "ee74776e-38e4-4133-98c0-520529836bdf" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } } ] }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "2c47908cb40649a4b37a29783b09b61b" }, { "$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": "cf9f329698f54d8e9b353d2f024fd2de" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务成员是否存在", "TableValue": { "TableName": "任务成员表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "513afd45-e476-45f0-a858-293abdb3c212" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务成员", "GUID": "40488a39-9df7-4064-80ab-e9f36af4a0e3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "94021ae43c984221ba0c00ffdd38ae06" }, { "$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": "0" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务成员表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "项目ID", "GUID": "907e634d-70aa-4e00-88d9-f79953045dfd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "abd77ff1-74af-4c64-b709-ba12c09c4449" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务成员", "GUID": "0cd16274-f487-4f8c-944d-2160958e5a56" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } } ], "ParamNameToSaveNewRowValue": "" } ], "ID": "7b5c9507-6fcf-4351-96a0-00134cfc0acd" } ] }, { "$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": "2" }, "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": "计算开始日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TODAY()" }, "ID": "c784c1c888af40a18ac06d86dd9aa3c1" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算结束日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TODAY()" }, "ID": "f1babee3af9a4401b69d66a5728facf3" } ], "ID": "d084fbee-4af1-4e4d-8eaa-6af89e55b775" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.工时分配方式" } }, "value": "2" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算开始日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" }, "ID": "f23c325e19c74deaac8b0bd00de7bb0c" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算结束日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" }, "ID": "d184eff4cba7445a955fa8144ebd3951" } ], "ID": "0b37c3cb-e565-4743-bb74-87d80ddbd9f5" } ], "Comments": "如果是按人分配,则把计划工时分到一天中" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时数" }, "ID": "538fe8a21ecb4b4cb6f8fbf831f03d1d" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "分配天数", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1" }, "ID": "e885f0713e4446d59779d8102dfa7ca5" }, { "$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": "89d195a8f1f34d1ba004d79dc714d5ab" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "统计工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 1, "BindingInfos": [ { "GUID": "4ae72769-fd2f-4b8c-9ca5-cd1bb5f84b30", "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": "计划" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "7e69c5b18dbc4befa21da00cc4b1487f" }, { "$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": "954da7d900d44d068c49c0775cbb66ad" } ], "ID": "9136d195-6c6d-421a-a38c-82180d48e4eb" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时,1)" }, "ID": "bd03cd955f4449cf9d84c422471b58ac" } ], "ID": "1f4284c0-335b-4330-9c39-0620a677e8fe" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "预计增加后工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(统计工时.总工时=\"\",0,统计工时.总工时)+计算本次分配工时" }, "ID": "cdea7fa17c4a44c5ba0ae697ab76f6e5" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "执行人负荷", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(OR(项目成员.成员负荷=\"\",项目成员.成员负荷=0,项目成员.成员负荷>24),24,项目成员.成员负荷)" }, "ID": "5af95d7b590044bd919ee967c7ce6ae3" }, { "$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": "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": 5 } ], "RelationType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时-计算本次分配工时,1)" }, "ID": "8762d3868c56480ebf590a29716e9f32" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务工时表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "ca5a3d90-f76a-4612-a67a-7c2bf36c3aa6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "019b582a-4594-409d-b829-edf35f98b6e4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "f22bd597-15b2-4d6d-97d9-e170e3aa5b0b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "91caa3f1-8ae3-4f93-88ae-9fca29adafc1" }, "Value": "计划" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "c578c59d-5fa9-4424-8c61-f1230195ea85" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=执行人" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "98b6d94b-9796-4c91-8ca4-4245ff59587b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=备注" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "a6b55b11-0242-4631-8bcf-7922ab6bce46" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算本次分配工时" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪单价", "GUID": "9635331d-aeae-43e3-a89b-c34570f6058c" }, "Value": "0" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "提成系数", "GUID": "f2cee9cd-2d00-40d0-970b-c94c90ea9415" }, "Value": "0" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪来源", "GUID": "e53d2e82-3206-4faa-8aec-b464aa95a62b" } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "db36359f-e763-408e-a6ea-83c3e530edb1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "ee984db3-7339-4498-aa0a-e0f891fe3888" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]增加计划工时\"&工时数&\"小时\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "34733e1c-c4d9-4f27-8669-097ae7ef3e15" }, "Value": "%CurrentUser%" } ] } ] } ], "Comments": "如果不是按人分配,且分配后的工时超过负荷,则报错", "ID": "5ee7326c-c558-4870-8c9b-3b901b21182c" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\"" } } ], "ID": "bd16d028-b73c-491a-b4a8-6d00a6923fec" } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "分配计划工时成功" } ], "ID": "5fac0eb5-f731-44cc-a018-995976e67698" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\"" } } ], "ID": "892579fc-1bf9-43bc-80d7-6c3b50ea11c3" } ] } ], "ID": "215c9939-b849-4e09-b1c6-dc0d0b7d3c77" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "该用户不是项目成员" } ], "ID": "f1bfbc10-35b8-44c1-b4c9-a8d6965a7f01" } ], "Comments": "如果任务成员中没有,则自动加一个" } ], "ID": "bbfe9b03-66df-4e36-9b90-0d6758c44408" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "您提交的工时超过任务预算工时,请修改后重新提交" } ], "ID": "36775ed1-cd32-4f99-acdf-6b85362b827c" } ] } ], "ID": "dc63381f-0182-438c-bba5-f8470ca29226" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "任务不存在" } ], "ID": "76705ade-2b7a-4303-bb61-e297fdf90439" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }