539 lines
27 KiB
JSON
539 lines
27 KiB
JSON
{
|
|
"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": "执行者",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
},
|
|
"TestData": "administrator"
|
|
},
|
|
{
|
|
"Name": "工时数",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
},
|
|
"TestData": "40"
|
|
},
|
|
{
|
|
"Name": "进展内容",
|
|
"TestData": "测试"
|
|
},
|
|
{
|
|
"Name": "工时类型",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
},
|
|
"TestData": "计划"
|
|
}
|
|
],
|
|
"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": "b1249d88-174d-4f42-b82e-87c775a5ec16"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "dfd8dba3-a9e7-46af-82b0-e6346ced04c1"
|
|
},
|
|
"ColumnName": "任务状态"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "17d042b8-e5cd-423f-a4f2-5bfca0a2de16",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务状态",
|
|
"RelatedColumn": "状态码",
|
|
"DisplayColumn": "任务状态"
|
|
}
|
|
},
|
|
"ColumnName": "任务状态文本"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "执行者",
|
|
"GUID": "45d69552-542b-431e-9153-d5f2f886ac89",
|
|
"AttachType": {
|
|
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
|
|
"UserColumnAttachType": 5,
|
|
"AttachTypeTag": "负荷"
|
|
}
|
|
},
|
|
"ColumnName": "执行者负荷"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "77617259-ecbf-4a0a-943a-bc9523d74a4a"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "40fc605c55a049edb4ddfa172010d1fa"
|
|
},
|
|
{
|
|
"$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": "=工时数"
|
|
},
|
|
"ID": "3c523ae8bad44c56803f29297f525e6a"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "分配天数",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")+1"
|
|
},
|
|
"ID": "47a4bd79866c44a68d4a8130857e0e0e"
|
|
},
|
|
{
|
|
"$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": "60a04c424d0b4a51a96e2eb557cf1df9"
|
|
},
|
|
{
|
|
"$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": "统计负荷",
|
|
"TableValue": {
|
|
"TableName": "View_任务工时统计",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "计划工时",
|
|
"GUID": "c293ccd3-0a01-450a-9c96-4a22b5f40bba"
|
|
},
|
|
"ColumnName": "计划工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
|
|
"SubConditions": [
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "88d7be4e-bac7-4366-9e82-5ec0e43d3cde"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "执行人",
|
|
"GUID": "45422432-e2a6-4c0e-ae7f-85d15794298f"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=执行者"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "b38537dd-3794-42b1-b349-46edd53fbca9"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=当前日期"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "1a7c7a0561d24027953d7057ac3caa93"
|
|
},
|
|
{
|
|
"$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": "0",
|
|
"compareType": 2
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
|
"param": {
|
|
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
|
"ParamObject": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=统计负荷"
|
|
}
|
|
},
|
|
"value": "%Null%",
|
|
"compareType": 1
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
|
"param": {
|
|
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
|
"ParamObject": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=统计负荷.计划工时+计算本次分配工时"
|
|
}
|
|
},
|
|
"value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.执行者负荷"
|
|
},
|
|
"compareType": 2
|
|
}
|
|
]
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=TEXT(当前日期,\"yyyy年mm月dd\")&\"的最大工作负荷超出限制,请重新编排提交!\""
|
|
}
|
|
}
|
|
],
|
|
"ID": "b539d26d-1d71-4ce6-b60b-527c90f86132"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "d6558544-652c-44af-81eb-31dec04f33b2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "cb78ce7bdd4c440b9b449d7af1470fd9"
|
|
}
|
|
],
|
|
"ID": "52096b70-4bfb-4135-9f7c-a3a984edea0b"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "计算本次分配工时",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=待分配工时"
|
|
},
|
|
"ID": "308e266c05e3417f9d13962caff1095b"
|
|
}
|
|
],
|
|
"ID": "60f32b23-a3f2-4b49-b84a-11eb342d4799"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "待分配工时",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ROUNDUP(待分配工时-计算本次分配工时,1)"
|
|
},
|
|
"ID": "0a0b3c873fcf4de9b94766fc7c44005e"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "任务工时表",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "62460558-f2bd-4b87-8cea-6fc0dadf3b39"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "acc1cf0b-5748-40bc-b1b2-5bb59df509a1"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "d8afca37-aace-413f-8d57-1fba6d54b77c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=当前日期"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时类型",
|
|
"GUID": "1dd01750-f4f3-4c1d-9afb-37c8caa80b30"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=工时类型"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行人",
|
|
"GUID": "29749b4c-60d8-4963-9ced-4fc1c4d52d67"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=执行者"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行内容",
|
|
"GUID": "3e99bd55-10d7-4f5d-9dd8-a866365961a2"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=进展内容"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时",
|
|
"GUID": "d9623657-4a05-4e47-a927-0e188c5fa69a"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=计算本次分配工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "提交工时成功"
|
|
}
|
|
],
|
|
"ID": "67983164-51fb-452a-ad85-bab842928a39"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\""
|
|
}
|
|
}
|
|
],
|
|
"ID": "876ca00c-e70e-4e57-beb3-7f440cb828b8"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"CatchCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionCode"
|
|
},
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionMessage"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |