Files
clue/ServerCommands/工时/分配任务工时.json
超哥 0d4aabf056 {"Message":"完善任务删除逻辑;\r\n完善工时删除逻辑;\r\n完善项目申请流程;\r\n完善任务新增流程;","MessageType":2,"Modules":[{"State":1,"Type":7,"Name":"Table/任务表"},{"State":1,"Type":1,"Name":"PCPage/项目列表"},{"State":1,"Type":1,"Name":"PCPage/项目标题"},{"State":1,"Type":1,"Name":"PCPage/任务列表"},{"State":1,"Type":1,"Name":"PCPage/项目成员"},{"State":1,"Type":1,"Name":"PCPage/项目信息"},{"State":1,"Type":1,"Name":"PCPage/项目审批"},{"State":1,"Type":1,"Name":"PCPage/任务首页"},{"State":1,"Type":1,"Name":"PCPage/任务-工时"},{"State":1,"Type":1,"Name":"PCPage/工时详情"},{"State":1,"Type":1,"Name":"PCPage/新增任务"},{"State":1,"Type":31,"Name":"UserControlPage/工时记录列表"},{"State":1,"Type":15,"Name":"ServerCommand/修改任务预算工时"},{"State":1,"Type":15,"Name":"ServerCommand/删除任务成员所有工时"},{"State":1,"Type":15,"Name":"ServerCommand/上报实际工时"},{"State":1,"Type":15,"Name":"ServerCommand/分配任务工时"},{"State":1,"Type":9,"Name":"Theme"},{"State":1,"Type":15,"Name":"ServerCommand/计算报工数据"},{"State":1,"Type":15,"Name":"ServerCommand/任务发起流程前校验"},{"State":1,"Type":28,"Name":"ProcessItem/新增任务流程"},{"State":1,"Type":23,"Name":"TableView/项目平行视图"},{"State":1,"Type":23,"Name":"TableView/任务平行视图"},{"State":2,"Type":15,"Name":"ServerCommand/新增任务"},{"State":1,"Type":1,"Name":"PCPage/创建项目"},{"State":2,"Type":15,"Name":"ServerCommand/创建项目校验"},{"State":3,"Type":6,"Name":"Pages/任务/任务审批"},{"State":3,"Type":1,"Name":"PCPage/任务审批"},{"State":3,"Type":15,"Name":"ServerCommand/发起任务(废弃)"},{"State":3,"Type":15,"Name":"ServerCommand/项目流程发起前校验"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/递归检测子任务"},{"State":3,"Type":15,"Name":"ServerCommand/删除任务"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/递归删除任务"}],"Version":"v1"}
2024-06-19 16:45:52 +08:00

1110 lines
70 KiB
JSON

{
"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": "38530c9c-55ce-4b58-aeb6-41fd0cd410ca",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "项目ID",
"GUID": "305361b8-995e-48bc-99d6-f008471584ca"
},
"ColumnName": "项目ID"
},
{
"GUID": "75a0c7ab-3df4-41d5-9d5c-3c76c7faf0e4",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务名称",
"GUID": "1514429a-cb4c-433a-a448-a452f6e330dd"
},
"ColumnName": "任务名称"
},
{
"GUID": "9bc18e2f-094e-4c66-b126-11d2ed71e566",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务预算工时",
"GUID": "8520efd4-9787-45fb-9ff8-62d895ac5d91"
},
"ColumnName": "任务预算工时"
},
{
"GUID": "9f12fb1e-573e-4f5e-8390-60aa0e2d7bd7",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务状态",
"GUID": "b0c6d3c7-733a-4b63-a511-f4f3299b9e05"
},
"ColumnName": "任务状态"
},
{
"GUID": "bd611fd0-85d4-40d2-94c1-e18624451231",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务状态",
"GUID": "4fe7e2d7-474c-4257-9186-51fd7c25b219",
"RelationBinding": {
"RelatedTable": "任务状态",
"RelatedColumn": "状态码",
"DisplayColumn": "任务状态"
}
},
"ColumnName": "任务状态文本"
},
{
"GUID": "8dc3ccf2-e6f7-4ba3-9431-e2f8061fdc5f",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "项目ID",
"GUID": "7ce07b47-d21f-4abe-8a7a-3e0ec69b559d",
"RelationBinding": {
"RelatedTable": "项目平行视图",
"RelatedColumn": "ID",
"DisplayColumn": "严格模式"
}
},
"ColumnName": "严格模式"
},
{
"GUID": "867a17b9-b513-4a95-b51a-3d54fefeff42",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "项目ID",
"GUID": "65e3a033-3a0b-4c52-901a-9618d6a0e040",
"RelationBinding": {
"RelatedTable": "项目平行视图",
"RelatedColumn": "ID",
"DisplayColumn": "项目预算工时"
}
},
"ColumnName": "项目预算工时"
},
{
"GUID": "a6c64613-6b4c-48e2-b5f6-8dbf4dfcd97f",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "项目ID",
"GUID": "c3d0bc58-22c8-42ad-82f4-10d13ecb7b7a",
"RelationBinding": {
"RelatedTable": "项目平行视图",
"RelatedColumn": "ID",
"DisplayColumn": "项目预算费用"
}
},
"ColumnName": "项目预算费用"
},
{
"GUID": "c0a645c0-4604-4fa9-b081-1152376d75cf",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务类型",
"GUID": "bea8ca1b-c9c4-4681-940b-d701f4944130",
"RelationBinding": {
"RelatedTable": "任务类型",
"RelatedColumn": "ID",
"DisplayColumn": "提成系数"
}
},
"ColumnName": "提成系数"
},
{
"GUID": "3909f85c-a724-46ce-b341-b75f2c5d9352",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "项目ID",
"GUID": "e76d70e2-a2fe-48eb-bd6e-e28af6b71990",
"RelationBinding": {
"RelatedTable": "项目平行视图",
"RelatedColumn": "ID",
"DisplayColumn": "工时分配方式"
}
},
"ColumnName": "工时分配方式"
},
{
"GUID": "73bd10b2-6cbb-4c92-93a0-ed1db85cf781",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "开始时间",
"GUID": "862b87e2-946e-40a0-896e-09a97d96f51c"
},
"ColumnName": "开始时间"
},
{
"GUID": "ecf738aa-2e2d-4b4e-9a0a-52b60bcf8d7e",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "任务负责人",
"GUID": "a2e73ddf-4af8-436f-8a01-997bff966952"
},
"ColumnName": "执行者"
},
{
"GUID": "a87c068d-26b1-44c8-8b58-5514df5a139a",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "成员计划工时",
"GUID": "f355236f-a6cc-49a5-8ce3-a184a4a90b78"
},
"ColumnName": "总计划工时"
},
{
"GUID": "23318a88-ce48-4abb-afe9-9b6f2914b87b",
"BindingInfo": {
"TableName": "任务平行视图",
"ColumnName": "成员实际工时",
"GUID": "85ccdc21-2211-4e56-914f-90445409db03"
},
"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": "05d2877d0b384aa5b7afc3b3f2225489"
},
{
"$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": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$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": 4
},
{
"$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": 4
}
]
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "项目成员",
"TableValue": {
"TableName": "项目成员表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "8dc569c6-5d7d-435c-9e25-9384593acfdd",
"BindingInfo": {
"TableName": "项目成员表",
"ColumnName": "ID",
"GUID": "5b0ac4f9-25c2-4d0b-953b-8fc25f915d3b"
},
"ColumnName": "ID"
},
{
"GUID": "900d917f-11e0-42c7-8ce2-44783dea1cb6",
"BindingInfo": {
"TableName": "项目成员表",
"ColumnName": "项目成员",
"GUID": "5e5071c7-2eb0-4ea8-a5c9-d4a102f25e24"
},
"ColumnName": "项目成员"
},
{
"GUID": "a22fbeeb-ea30-4420-b3c1-c4a7f7600491",
"BindingInfo": {
"TableName": "项目成员表",
"ColumnName": "默认时薪",
"GUID": "d434791e-bf5a-4688-8caa-7777fe811018"
},
"ColumnName": "成员时薪"
},
{
"GUID": "35ccd89d-5316-4952-88cf-42403f181492",
"BindingInfo": {
"TableName": "项目成员表",
"ColumnName": "岗位ID",
"GUID": "0742bcd9-236d-4c48-87fb-d1f4a981a3e5",
"RelationBinding": {
"RelatedTable": "项目岗位",
"RelatedColumn": "ID",
"DisplayColumn": "默认时薪"
}
},
"ColumnName": "岗位时薪"
},
{
"GUID": "b55c41c6-2f85-474b-b253-f5a5fcc733f5",
"BindingInfo": {
"TableName": "项目成员表",
"ColumnName": "项目成员",
"GUID": "653b75d4-3491-4a4c-a330-00b180998295",
"AttachType": {
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
"UserColumnAttachType": 5,
"AttachTypeTag": "默认时薪"
}
},
"ColumnName": "用户时薪"
},
{
"GUID": "0ff49b9c-2d0d-45db-92a1-25bc5c083363",
"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": "1ce0f23ab033498c9e4cf43fef25e86d"
},
{
"$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": "58c7218ea48d4bf088891cc7a0af834a"
},
{
"$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": "85f05fa8d3b844e9afb58b9ac148bf1a"
},
{
"$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": "754d8031-358c-4e31-b85c-a32646177485"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.项目ID"
}
},
{
"BindingInfo": {
"TableName": "任务成员表",
"ColumnName": "任务ID",
"GUID": "9e181156-cf0c-4f43-afd6-a9b9e1bf6a24"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
{
"BindingInfo": {
"TableName": "任务成员表",
"ColumnName": "任务成员",
"GUID": "d674cbcf-a85a-4265-820f-d8b4645be281"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=执行人"
}
}
],
"ParamNameToSaveNewRowValue": ""
}
],
"ID": "f8e075eb-d389-4c05-9d02-adb7467c1fd2"
}
]
},
{
"$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": "b001c8aa74dd4f8382a375f3912a62da"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "计算结束日期",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TODAY()"
},
"ID": "91295edff0c44f608a14d5c9f9594f3e"
}
],
"ID": "332b9caa-2069-4b23-ad1a-41a9d4840a14"
},
{
"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": "234119e808564ed7acaf62c2c6b38398"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "计算结束日期",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=结束日期"
},
"ID": "727f49edcb914303adf91ed9a40e4355"
}
],
"ID": "8620cd87-3273-476a-8635-dfed055b4715"
}
],
"Comments": "如果是按人分配,则把计划工时分到一天中"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "待分配工时",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=工时数"
},
"ID": "e384d36ab63b4ebd80ab9bb4d389c9d6"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "分配天数",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1"
},
"ID": "4fb6ad850e174b6a85aded16a0b82e91"
},
{
"$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": "f631633dde2d48c39491e29455a3fb28"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "统计工时",
"TableValue": {
"TableName": "任务工时表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "b2045f09-df40-4815-8068-2112ed5d1925",
"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": "b17117425ffb4ebe8fb149578b3d52df"
},
{
"$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": "622dd1eb09094e29b7b7201423479597"
}
],
"ID": "da2889e3-da14-4e63-a66e-c250ddb7d809"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "计算本次分配工时",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ROUNDUP(待分配工时,1)"
},
"ID": "22bbafd761814075a115c7c935a993c0"
}
],
"ID": "578e7635-09da-41e0-bcb8-fa9836f23531"
}
]
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "预计增加后工时",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(统计工时.总工时=\"\",0,统计工时.总工时)+计算本次分配工时"
},
"ID": "02c134ab677047ef9f05766105a85c57"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "执行人负荷",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IF(OR(项目成员.成员负荷=\"\",项目成员.成员负荷=0,项目成员.成员负荷>24),24,项目成员.成员负荷)"
},
"ID": "eb8fa08ae96c4c81bace7556eeea279b"
},
{
"$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": "7ac0d2f1abf7464682eb5962f48e2868"
},
{
"$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon",
"CommandList": [
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "任务工时表",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "项目ID",
"GUID": "bf8f469d-4b9b-4904-bacf-1496956bda22"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.项目ID"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "任务ID",
"GUID": "518a4412-a28d-4938-a3cb-6099930a0b6f"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "工时日期",
"GUID": "ad1c8f81-00b1-4c33-b49c-8a43c27b1fc8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=当前日期"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "工时类型",
"GUID": "3adc128c-6b4f-4636-aaec-5e69f3ffb08d"
},
"Value": "计划"
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "执行人",
"GUID": "78a763a5-332c-4cd7-86e6-bb1fbed3e553"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=执行人"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "执行内容",
"GUID": "8fcd4935-3c9d-49ca-aa1d-6de6ae29d21a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=备注"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "工时",
"GUID": "b74e9a17-2d24-4156-88b7-eb2f41f00ced"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=计算本次分配工时"
}
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "时薪单价",
"GUID": "48b863e9-ca60-4d29-a23d-de37e0b00c08"
},
"Value": "0"
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "提成系数",
"GUID": "2f756808-6964-4e0b-9ecf-262337984419"
},
"Value": "0"
},
{
"BindingInfo": {
"TableName": "任务工时表",
"ColumnName": "时薪来源",
"GUID": "09a998b1-3b57-4d29-ae08-58e215b1502d"
}
}
]
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "项目动态",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "项目ID",
"GUID": "dbda7c11-89e3-46b3-9878-6542c1573be8"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.项目ID"
}
},
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "项目动态",
"GUID": "85746779-19f7-4a95-9e17-c874ad036526"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]增加计划工时\"&工时数&\"小时\""
}
},
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "执行人",
"GUID": "9310fd02-1c73-480f-b38d-ec60a02a6964"
},
"Value": "%CurrentUser%"
}
]
}
]
}
],
"Comments": "如果不是按人分配,且分配后的工时超过负荷,则报错",
"ID": "ae4f8c95-9b35-45e1-830d-ce0c525eb6d7"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制的\"&执行人负荷&\"小时,请重新提交!\""
}
}
],
"ID": "3d372284-136c-4c92-abc2-5561242c303a"
}
]
}
]
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "分配计划工时成功"
}
],
"ID": "04a63f83-c351-40a2-841a-5b8f14d5e783"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\""
}
}
],
"ID": "402ab5e2-b6c8-465f-93e7-dbf0d4e52ee5"
}
]
}
],
"ID": "63bb8572-4f70-41c3-b2a3-7edd8736d4e5"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "该用户不是项目成员"
}
],
"ID": "4158fbd4-5c6a-4ba8-9f82-ebf5e096c543"
}
],
"Comments": "如果任务成员中没有,则自动加一个"
}
],
"ID": "ca047f4b-b6e4-4fb8-b7a2-80f8b518f08f"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "您提交的工时超过任务预算工时,请修改后重新提交"
}
],
"ID": "1d9ed9f0-3590-43b7-b42f-b1573d9212ba"
}
]
}
],
"ID": "c0d0927b-98c4-4224-a3fa-38651c5b9c3f"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "任务不存在"
}
],
"ID": "d3f6e687-6364-4e9d-b9aa-287ee721db7d"
}
]
}
]
},
"CatchCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionCode"
},
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionMessage"
}
}
]
}
}
]
}