{ "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": "bb20fdc3-0297-49f1-ab7e-1fd6a72d1b4f" }, "ColumnName": "项目ID" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "8209e318-8db6-4b0b-be51-ac7f7708da86" }, "ColumnName": "任务状态" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务状态", "GUID": "69980b59-ccac-40f8-b175-9d1ce3a0cd0f", "RelationBinding": { "RelatedTable": "任务状态", "RelatedColumn": "状态码", "DisplayColumn": "任务状态" } }, "ColumnName": "任务状态文本" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "7477f4b3-4261-410f-92f3-ec4f17977e56", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "严格模式" } }, "ColumnName": "严格模式" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "26218662-d3c9-4467-8302-886d229b9e1e", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算工时" } }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "7f5ccbe0-4bcf-4fff-bed9-5099a6c7f24d", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目预算费用" } }, "ColumnName": "项目预算费用" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "19794bfa-cb8a-4893-95f0-07303a3cbe29", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "工时核定方式" } }, "ColumnName": "工时核定方式" }, { "BindingInfo": { "TableName": "任务表", "ColumnName": "任务类型", "GUID": "7c7d1161-864d-46c5-89da-5eaaf1eec879", "RelationBinding": { "RelatedTable": "任务类型", "RelatedColumn": "ID", "DisplayColumn": "提成系数" } }, "ColumnName": "提成系数" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "dd9dcf5f-2c56-43e7-b1fd-fac6aa05a3ca" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "665750151a594df6a048b8d95bed1ea7" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务成员", "TableValue": { "TableName": "任务成员表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "cda3345e-0eb7-4d5f-adf7-3f52ca9f73c5" }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "5a9a96a5-57b7-4711-b44e-1acbf70974c8", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "负荷" } }, "ColumnName": "参与人负荷" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务时薪", "GUID": "605be2d4-7bb3-4ae7-b001-9f80d68f9112" }, "ColumnName": "任务默认时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "岗位ID", "GUID": "697c882c-f66c-46bd-a196-cde86291560a", "RelationBinding": { "RelatedTable": "项目岗位", "RelatedColumn": "ID", "DisplayColumn": "默认时薪" } }, "ColumnName": "岗位默认时薪" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "5c2bd0b7-bb61-40de-922f-cae4993b46a6", "AttachType": { "$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess", "UserColumnAttachType": 5, "AttachTypeTag": "默认时薪" } }, "ColumnName": "参与人默认时薪" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "ID", "GUID": "60c34cb9-850e-4626-99ba-dfe39eb6e2f5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "f9be7598e218438fbcba12f354a21d2e" }, { "$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": "fd0a6ff93fc147caa102137da708d9f7" } ], "ID": "3129685c-5bf4-4a4a-a664-03b157dfa923" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算时薪", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=指定时薪单价" }, "ID": "fcccbd0c8c854b9d9a39cf048258230b" } ], "ID": "f8493f97-96b1-47a1-98da-41c713e152cb" } ] }, { "$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": "faf92a52-90dd-434f-8e4c-2dd18c788ae4" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "ID", "GUID": "849f349b-6d13-452a-869c-cdef36e3ad9e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "9d6cdc4d-5c2f-4e04-8880-cc49a0d8201a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.工时核定方式" } } ] } }, "ID": "00e2481e06a9420ba8b4f0891da835ab", "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": "00c78b96-462f-4720-903d-f55cabbc3c4d" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计划消耗列表", "TableValue": { "TableName": "任务工时表", "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "39ac01fa-1c11-4e3f-89b8-e300b9e98826", "RelationBinding": { "RelatedTable": "任务成员表", "RelatedColumn": "ID", "DisplayColumn": "参与人" } }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "e403c34a-b579-4e3a-9a1d-749817405d38", "RelationBinding": { "RelatedTable": "任务成员表", "RelatedColumn": "ID", "DisplayColumn": "任务时薪" } }, "ColumnName": "任务时薪" }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "5384b183-3576-4c98-afec-a35e3d97d1ea" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "ID", "GUID": "d786e2e8-d965-49f2-aca3-34474923e79c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "385c56d4-82c3-4a97-9bdb-73664b687909" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.工时核定方式" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "0542b89aba6649e2b3e7fb9764f0b2da", "Comments": "检查预算是否超支" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "总消耗金额", "ParameterValue": "0", "ID": "7338661c547b45b684a0a8d6f28991f4" }, { "$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": "510cee3e14ef407090c6ab0033375081" } ] }, { "$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": "35413fc8-74a0-4834-8353-3c5f5ef12f92" } ] } ], "Comments": "如果提交的工时类型等于项目工时的核定方式", "ID": "e158e76c-f48d-4e31-8480-4ae8c3da237b" } ] } ], "ID": "5284f69c-4cdd-4e2c-be87-25e8940c2d77" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "待分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时数" }, "ID": "126980c6dce445b589b0d837ea8352a4" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "分配天数", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1" }, "ID": "dd576b98745d4a67bfe42ae84e9d9481" }, { "$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": "29f235cfbf2743818c18336764a24557" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "统计工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "bad45eaa-11c6-4e3a-8904-a714c109029d" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "adc3a145-9b6a-47f7-8400-83443bdb81f5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "02481477-98e3-44c2-bba1-40488f4e1386" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "25577926-1f1a-4312-8dae-6171772e81a5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "94c6dba001f14a0498de4ff9d2d7f3a6" }, { "$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": "bda1df1ee564481e8c2ab06427335a4b" } ], "ID": "5b6a4078-4152-455d-8cf3-5e1809864231" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "计算本次分配工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ROUNDUP(待分配工时,1)" }, "ID": "16ceb6f64bb747038fbe75470891dcf1" } ], "ID": "80d4e798-38ef-42d1-9948-cf6b6eb49e4e" } ] }, { "$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": "774578bbf7f24e13a6f4a2714f8aad3a" } ], "ID": "1d85c7d6-544e-45f1-b16d-abe79cdb5a91" }, { "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": "0d70f908359547a9ba6cc11028ae963c" } ], "ID": "b385c012-060b-4bc8-a6dd-e8f8f2b7b129" } ] }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "预计增加后工时", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(统计工时.总工时=\"\",0,统计工时.总工时)+计算本次分配工时" }, "ID": "8d198be5380848faa3522373af16a625" }, { "$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": "eed86e76439f40daaed2031e95250400" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "任务工时表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "成员ID", "GUID": "437fa8e5-d746-4865-8281-0161a9af4f2d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=成员ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "976d41d6-8274-497e-ac49-dd574d3d5a7c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "任务ID", "GUID": "f8a12139-e96c-4641-abb9-52ce7c8e45f0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务ID" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "f86a3778-9a64-4191-aba8-2a6b977adfa2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前日期" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "234454f0-5b5a-48d6-8e49-ff07e4417be0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时类型" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "d4859e62-67be-48ec-b8ae-9643cbf7c2ab" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务成员.参与人" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "6cab4748-35d8-48f9-9ecd-1efcf362a60c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=进展内容" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "af198079-26a2-4240-af0c-7e2150ec998f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算本次分配工时" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "时薪单价", "GUID": "9f43f009-5b33-441c-b236-84e261a64334" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=计算时薪" } }, { "BindingInfo": { "TableName": "任务工时表", "ColumnName": "提成系数", "GUID": "55cce1b6-dac1-492a-a705-fa244d90312e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.提成系数" } } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目动态", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目ID", "GUID": "82b781bb-f51d-466b-87bb-ab01e5cfa334" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=任务信息.项目ID" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "项目动态", "GUID": "cd538298-4070-48bf-847e-9303cdbff30b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]增加\"&工时类型&\"工时\"&工时数&\"小时\"" } }, { "BindingInfo": { "TableName": "项目动态", "ColumnName": "执行人", "GUID": "405f8c04-8f4e-4838-a3d7-a702276d39c6" }, "Value": "%CurrentUser%" } ] } ] } ], "ID": "75a82e2b-36d8-4aa8-a328-972ebcba58a5" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\"" } } ], "ID": "d9e80b15-3bba-45c5-af43-43277a33af2d" } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "提交工时成功" } ], "ID": "aa5ff36f-0104-4d9c-9f42-dd83b07d3249" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\"" } } ], "ID": "0bc9dcbe-d789-465e-9505-df798ec54639" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }