471 lines
25 KiB
JSON
471 lines
25 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
|
|
}
|
|
},
|
|
{
|
|
"Name": "开始日期",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
},
|
|
{
|
|
"Name": "结束日期",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
},
|
|
{
|
|
"Name": "执行者",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
},
|
|
{
|
|
"Name": "工时数",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
},
|
|
{
|
|
"Name": "进展内容"
|
|
},
|
|
{
|
|
"Name": "工时类型",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"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": "76e8039a-2ce0-4c74-9879-63da073db9ee"
|
|
},
|
|
"ColumnName": "项目ID"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "c45d8519-bfff-4a2d-9e43-2106fd6cfc8a"
|
|
},
|
|
"ColumnName": "任务状态"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "任务状态",
|
|
"GUID": "f1c49b96-cafd-41bb-a773-aed819d56819",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务状态",
|
|
"RelatedColumn": "状态码",
|
|
"DisplayColumn": "任务状态"
|
|
}
|
|
},
|
|
"ColumnName": "任务状态文本"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "执行者",
|
|
"GUID": "b8d6214f-a443-45f7-acf4-f756f3536dea",
|
|
"AttachType": {
|
|
"$type": "ForguncyDataAccess.UserColumnAttachObj, ForguncyDataAccess",
|
|
"UserColumnAttachType": 5,
|
|
"AttachTypeTag": "负荷"
|
|
}
|
|
},
|
|
"ColumnName": "执行者负荷"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务表",
|
|
"ColumnName": "ID",
|
|
"GUID": "c0cdf54c-f3e1-4362-81bc-095932a4f40b"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "87a8a1ca8afc42e6b601a540a47b88d5"
|
|
},
|
|
{
|
|
"$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": "8dc0c955c31047479a6536c2fbd39f6a"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "分配天数",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")"
|
|
},
|
|
"ID": "e47382a2af7248b98483985baaa51a32"
|
|
},
|
|
{
|
|
"$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": "834d914107c94850bcaf6300a7318523"
|
|
},
|
|
{
|
|
"$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": "5ab6d9d2-aba5-4656-a845-e83d1b72a91c"
|
|
},
|
|
"ColumnName": "计划工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
|
|
"SubConditions": [
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "c75276ab-6c2a-46c6-aa4d-474d509de3c5"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "执行人",
|
|
"GUID": "ebf1b722-31b2-48af-aee4-8456f3aceb01"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=执行者"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "View_任务工时统计",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "05a3349d-83d3-4670-9577-faa2dedcc951"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=当前日期"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "d656dc16830a4ebd9c62865373622d5e"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "计算本次分配工时",
|
|
"ParameterValue": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=IF(index>=分配天数,待分配工时,ROUNDDOWN(工时数/分配天数,1))"
|
|
},
|
|
"ID": "5555a281080a4bd3b45369f61f980778"
|
|
},
|
|
{
|
|
"$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": "0c91b6dc-374c-4f05-b2c9-7a27efc905e9"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "任务工时表",
|
|
"UpdateType": "add",
|
|
"ShowConfirm": false,
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "项目ID",
|
|
"GUID": "cb331dd7-3590-4815-876c-055ee05dc73a"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务信息.项目ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "2c498cc8-01d4-420a-a792-b1cc996af78e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=任务ID"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "4fae1347-33a7-4ada-904a-a27efd524b71"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=当前日期"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时类型",
|
|
"GUID": "0c4c47f0-ecf3-48c7-85f1-4a5f306b5f59"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=工时类型"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行人",
|
|
"GUID": "6608888f-6f1a-4551-a084-6daa5803005d"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=执行者"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行内容",
|
|
"GUID": "b824dc5e-e940-4a84-b47d-7c29ecf47382"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=进展内容"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时",
|
|
"GUID": "9a43a905-e60e-45a3-b46c-256d04d33236"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=计算本次分配工时"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "a27646cc-5b6a-4ed0-989a-e89d20560650"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "caa7447f-18f4-4b64-b07c-930f7b8a8980"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "提交工时成功"
|
|
}
|
|
],
|
|
"ID": "999a42e2-8f3b-4e6b-94d4-5b9471630f27"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"当前任务状态为[\"&任务信息.任务状态文本&\"],无法提交工时!\""
|
|
}
|
|
}
|
|
],
|
|
"ID": "3bac0ed8-af90-447b-af27-0f7faf151ec7"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |