455 lines
20 KiB
JSON
455 lines
20 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": "administrator"
|
|
},
|
|
{
|
|
"Name": "新工时数",
|
|
"DataValidationInfo": {
|
|
"IgnoreBlank": false
|
|
},
|
|
"TestData": "40"
|
|
},
|
|
{
|
|
"Name": "新进展内容",
|
|
"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": "2a0f3989-eb4c-4880-9a84-e0bb02f0ff4f"
|
|
},
|
|
"ColumnName": "任务ID"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时类型",
|
|
"GUID": "c2159a41-2005-4c9d-9d56-6837720b58ad"
|
|
},
|
|
"ColumnName": "工时类型"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "f5c955d8-221c-4d6f-9539-688cf2226c0d",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "任务状态"
|
|
}
|
|
},
|
|
"ColumnName": "任务状态"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "任务ID",
|
|
"GUID": "b4e60853-be38-42dc-afe4-f7952fdc738b",
|
|
"RelationBinding": {
|
|
"RelatedTable": "任务表",
|
|
"RelatedColumn": "ID",
|
|
"DisplayColumn": "任务状态",
|
|
"NextRelationBinding": {
|
|
"RelatedTable": "任务状态",
|
|
"RelatedColumn": "状态码",
|
|
"DisplayColumn": "任务状态"
|
|
}
|
|
}
|
|
},
|
|
"ColumnName": "任务状态文本"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "ID",
|
|
"GUID": "98a8dedc-639e-4eee-b5d3-a160f03632ea"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=报工ID"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "37d3a730e3c443e5a0faef85944856d7"
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "执行者",
|
|
"TableValue": {
|
|
"TableName": "用户信息视图",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "用户信息视图",
|
|
"ColumnName": "全名",
|
|
"GUID": "8b30a356-3f3b-4b53-8eca-8ddad3d5dc6a"
|
|
},
|
|
"ColumnName": "全名"
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "用户信息视图",
|
|
"ColumnName": "负荷",
|
|
"GUID": "d045ab4b-5dc9-45b0-b0fd-e0820d081760"
|
|
},
|
|
"ColumnName": "负荷"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "用户信息视图",
|
|
"ColumnName": "用户名",
|
|
"GUID": "4242eed5-1317-4247-85d6-487a0d28482d"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新执行者"
|
|
}
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0,
|
|
"TopCount": "1"
|
|
},
|
|
"ID": "831eeac58ef048508ca1b6a6d9a0f130"
|
|
},
|
|
{
|
|
"$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": "统计时长",
|
|
"TableValue": {
|
|
"TableName": "任务工时表",
|
|
"TableValueType": 1,
|
|
"BindingInfos": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "总工时",
|
|
"GUID": "37a2654f-b7c5-4e19-a9c3-6ab16b77bbe9"
|
|
},
|
|
"ColumnName": "总工时"
|
|
}
|
|
],
|
|
"SqlCondition": {
|
|
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
|
|
"SubConditions": [
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行人",
|
|
"GUID": "51191cba-1a0c-4290-b0e3-74d5138f35b9"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新执行者"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时类型",
|
|
"GUID": "fc94b9e1-c61f-4d76-9ac3-e5b0f6acc74c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=报工信息.工时类型"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"CompareType": 1,
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "ID",
|
|
"GUID": "2f9dd395-014a-4ae0-8e20-756d2a7c2677"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=报工ID"
|
|
}
|
|
},
|
|
{
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "bdccfeef-34a2-47a2-9c3c-61f97cb0867c"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新日期"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"NullFormulaValueQueryPolicy": 0
|
|
},
|
|
"ID": "7176cf9473f14ad8999ca17165be68a2"
|
|
},
|
|
{
|
|
"$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": "ba90f02dc09f480d9f6bb05a0870bf01"
|
|
}
|
|
],
|
|
"ID": "75c00f0b-03b1-4105-9035-39089d210515"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
|
"ParameterName": "最大负荷",
|
|
"ParameterValue": "24",
|
|
"ID": "54da0c7bde46476c964ac90743685d76"
|
|
}
|
|
],
|
|
"ID": "7393f8d1-70c2-4835-b084-6eacf76487b4"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$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": "=IF(统计时长.总工时=\"\",0,统计时长.总工时)+新工时数"
|
|
}
|
|
},
|
|
"value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=最大负荷"
|
|
},
|
|
"compareType": 5
|
|
},
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
|
|
"TableName": "任务工时表",
|
|
"ShowConfirm": false,
|
|
"RowsToUpdate": 1,
|
|
"RowsToUpdateCondition": {
|
|
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
|
"ColumnBindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "ID",
|
|
"GUID": "6364508b-0430-40c8-819c-5abfd9112015"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=报工ID"
|
|
}
|
|
},
|
|
"UpdateBindingValues": [
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时日期",
|
|
"GUID": "12979f18-64fe-4738-9040-962247aee8a5"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新日期"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行人",
|
|
"GUID": "86bb7645-a0c3-441e-9aec-238115c4ed87"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新执行者"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "执行内容",
|
|
"GUID": "dc82c110-eb9f-40b7-a4ba-a64d925f217e"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新进展内容"
|
|
}
|
|
},
|
|
{
|
|
"BindingInfo": {
|
|
"TableName": "任务工时表",
|
|
"ColumnName": "工时",
|
|
"GUID": "807fdc8e-d861-4e31-9db2-e194c40e05ee"
|
|
},
|
|
"Value": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=新工时数"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "0",
|
|
"Message": "更新成功"
|
|
}
|
|
],
|
|
"ID": "f8bb6f85-bc98-42f7-a06e-7f16bc423dc9"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"你提交的工时超过了\"&执行者.全名&\"设置的最大负荷\"&最大负荷&\"小时\""
|
|
}
|
|
}
|
|
],
|
|
"ID": "1c2b1dce-073d-42a3-848e-c6ea584e5a63"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"ID": "6235168d-f1f1-4270-bee6-a6b93e27e00e"
|
|
},
|
|
{
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": "400",
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=\"当前任务状态为[\"&报工信息.任务状态文本&\"],无法修改工时!\""
|
|
}
|
|
}
|
|
],
|
|
"ID": "0635cab1-c78a-44cb-affb-ca9c62c0b52b"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"CatchCommandPart": {
|
|
"CommandList": [
|
|
{
|
|
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
|
"ErrorCode": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionCode"
|
|
},
|
|
"Message": {
|
|
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
|
"SerializeProperty": "=ExceptionMessage"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |