axle section request
This commit is contained in:
parent
fc6170ae01
commit
deb49b393c
167
docs/docs.go
167
docs/docs.go
|
@ -1,5 +1,4 @@
|
|||
// Code generated by swaggo/swag. DO NOT EDIT.
|
||||
|
||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
@ -2758,7 +2757,8 @@ const docTemplate = `{
|
|||
{
|
||||
"type": "string",
|
||||
"name": "config",
|
||||
"in": "query"
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -2773,7 +2773,8 @@ const docTemplate = `{
|
|||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
@ -3129,6 +3130,58 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axle/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "ATS测试-计轴操作",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "ATS测试-计轴操作",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "ATS测试仿真-操作计轴",
|
||||
"name": "AxleOperationReqDto",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AxleOperationReqDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axleSection/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
|
@ -3387,49 +3440,6 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/getDataChannelName": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取仿真信息更新通道名称",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "获取仿真信息更新通道名称",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/ibp/btn/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
|
@ -5280,7 +5290,7 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"dto.AxleOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
|
@ -5306,6 +5316,28 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"mapId",
|
||||
"simulationId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mapId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "#/definitions/request_proto.Section_SectionOperation"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CheckMapDataReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -5682,6 +5714,10 @@ const docTemplate = `{
|
|||
"projectId": {
|
||||
"description": "项目id",
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5703,6 +5739,10 @@ const docTemplate = `{
|
|||
"description": "项目ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"description": "仿真id",
|
||||
"type": "string"
|
||||
|
@ -5724,6 +5764,10 @@ const docTemplate = `{
|
|||
"projectId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -6052,21 +6096,30 @@ const docTemplate = `{
|
|||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3
|
||||
1
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_Drst": "设置计轴直接复位",
|
||||
"Section_Pdrst": "设置计轴预复位",
|
||||
"Section_TrainIn": "设置计轴区段内有车轴",
|
||||
"Section_TrainOut": "设置计轴区段内没有车轴"
|
||||
"Section_Pdrst": "设置计轴预复位"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_Drst",
|
||||
"Section_Pdrst",
|
||||
"Section_TrainIn",
|
||||
"Section_TrainOut"
|
||||
"Section_Pdrst"
|
||||
]
|
||||
},
|
||||
"request_proto.Section_SectionOperation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_CancelFaultOcc": "取消故障占用",
|
||||
"Section_SetFaultOcc": "设置故障占用"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_SetFaultOcc",
|
||||
"Section_CancelFaultOcc"
|
||||
]
|
||||
},
|
||||
"request_proto.Signal_Operation": {
|
||||
|
|
|
@ -2751,7 +2751,8 @@
|
|||
{
|
||||
"type": "string",
|
||||
"name": "config",
|
||||
"in": "query"
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -2766,7 +2767,8 @@
|
|||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
@ -3122,6 +3124,58 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axle/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "ATS测试-计轴操作",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "ATS测试-计轴操作",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "ATS测试仿真-操作计轴",
|
||||
"name": "AxleOperationReqDto",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AxleOperationReqDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axleSection/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
|
@ -3380,49 +3434,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/getDataChannelName": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取仿真信息更新通道名称",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "获取仿真信息更新通道名称",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/ibp/btn/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
|
@ -5273,7 +5284,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"dto.AxleOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
|
@ -5299,6 +5310,28 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"mapId",
|
||||
"simulationId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mapId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "#/definitions/request_proto.Section_SectionOperation"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CheckMapDataReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -5675,6 +5708,10 @@
|
|||
"projectId": {
|
||||
"description": "项目id",
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5696,6 +5733,10 @@
|
|||
"description": "项目ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"description": "仿真id",
|
||||
"type": "string"
|
||||
|
@ -5717,6 +5758,10 @@
|
|||
"projectId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"runConfigId": {
|
||||
"description": "运行环境ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -6045,21 +6090,30 @@
|
|||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3
|
||||
1
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_Drst": "设置计轴直接复位",
|
||||
"Section_Pdrst": "设置计轴预复位",
|
||||
"Section_TrainIn": "设置计轴区段内有车轴",
|
||||
"Section_TrainOut": "设置计轴区段内没有车轴"
|
||||
"Section_Pdrst": "设置计轴预复位"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_Drst",
|
||||
"Section_Pdrst",
|
||||
"Section_TrainIn",
|
||||
"Section_TrainOut"
|
||||
"Section_Pdrst"
|
||||
]
|
||||
},
|
||||
"request_proto.Section_SectionOperation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_CancelFaultOcc": "取消故障占用",
|
||||
"Section_SetFaultOcc": "设置故障占用"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_SetFaultOcc",
|
||||
"Section_CancelFaultOcc"
|
||||
]
|
||||
},
|
||||
"request_proto.Signal_Operation": {
|
||||
|
|
|
@ -60,7 +60,7 @@ definitions:
|
|||
name:
|
||||
type: string
|
||||
type: object
|
||||
dto.AxleSectionOperationReqDto:
|
||||
dto.AxleOperationReqDto:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
|
@ -78,6 +78,21 @@ definitions:
|
|||
- mapId
|
||||
- simulationId
|
||||
type: object
|
||||
dto.AxleSectionOperationReqDto:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
mapId:
|
||||
type: integer
|
||||
operation:
|
||||
$ref: '#/definitions/request_proto.Section_SectionOperation'
|
||||
simulationId:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- mapId
|
||||
- simulationId
|
||||
type: object
|
||||
dto.CheckMapDataReqDto:
|
||||
properties:
|
||||
data:
|
||||
|
@ -333,6 +348,9 @@ definitions:
|
|||
projectId:
|
||||
description: 项目id
|
||||
type: integer
|
||||
runConfigId:
|
||||
description: 运行环境ID
|
||||
type: integer
|
||||
type: object
|
||||
dto.SimulationCreateRspDto:
|
||||
properties:
|
||||
|
@ -347,6 +365,9 @@ definitions:
|
|||
projectId:
|
||||
description: 项目ID
|
||||
type: integer
|
||||
runConfigId:
|
||||
description: 运行环境ID
|
||||
type: integer
|
||||
simulationId:
|
||||
description: 仿真id
|
||||
type: string
|
||||
|
@ -361,6 +382,9 @@ definitions:
|
|||
type: array
|
||||
projectId:
|
||||
type: integer
|
||||
runConfigId:
|
||||
description: 运行环境ID
|
||||
type: integer
|
||||
simulationId:
|
||||
type: string
|
||||
type: object
|
||||
|
@ -596,19 +620,24 @@ definitions:
|
|||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
type: integer
|
||||
x-enum-comments:
|
||||
Section_Drst: 设置计轴直接复位
|
||||
Section_Pdrst: 设置计轴预复位
|
||||
Section_TrainIn: 设置计轴区段内有车轴
|
||||
Section_TrainOut: 设置计轴区段内没有车轴
|
||||
x-enum-varnames:
|
||||
- Section_Drst
|
||||
- Section_Pdrst
|
||||
- Section_TrainIn
|
||||
- Section_TrainOut
|
||||
request_proto.Section_SectionOperation:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
type: integer
|
||||
x-enum-comments:
|
||||
Section_CancelFaultOcc: 取消故障占用
|
||||
Section_SetFaultOcc: 设置故障占用
|
||||
x-enum-varnames:
|
||||
- Section_SetFaultOcc
|
||||
- Section_CancelFaultOcc
|
||||
request_proto.Signal_Operation:
|
||||
enum:
|
||||
- 0
|
||||
|
@ -2464,6 +2493,7 @@ paths:
|
|||
parameters:
|
||||
- in: query
|
||||
name: config
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
|
@ -2473,6 +2503,7 @@ paths:
|
|||
type: integer
|
||||
- in: query
|
||||
name: name
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
|
@ -2705,6 +2736,39 @@ paths:
|
|||
summary: 获取仿真地图的公里标范围
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/axle/operation:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: ATS测试-计轴操作
|
||||
parameters:
|
||||
- description: JWT Token
|
||||
in: header
|
||||
name: Authorization
|
||||
required: true
|
||||
type: string
|
||||
- description: ATS测试仿真-操作计轴
|
||||
in: body
|
||||
name: AxleOperationReqDto
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AxleOperationReqDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: ATS测试-计轴操作
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/axleSection/operation:
|
||||
post:
|
||||
consumes:
|
||||
|
@ -2869,33 +2933,6 @@ paths:
|
|||
summary: ATS测试-ESB按钮操作
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/getDataChannelName:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 获取仿真信息更新通道名称
|
||||
parameters:
|
||||
- description: JWT Token
|
||||
in: header
|
||||
name: Authorization
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 获取仿真信息更新通道名称
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/ibp/btn/operation:
|
||||
post:
|
||||
consumes:
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
package memory
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/dto/request_proto"
|
||||
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
|
||||
"joylink.club/rtsssimulation/fi"
|
||||
)
|
||||
|
||||
func ChangeAxleSectionState(simulation *VerifySimulation, req *dto.AxleSectionOperationReqDto) {
|
||||
sectionUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Section{})
|
||||
slog.Debug("操作计轴区段", "axleSectionUid", sectionUid)
|
||||
switch req.Operation {
|
||||
case request_proto.Section_Drst:
|
||||
fi.DriveAxleSectionDrst(simulation.World, sectionUid, req.Reset)
|
||||
case request_proto.Section_Pdrst:
|
||||
fi.DriveAxleSectionPdrst(simulation.World, sectionUid, req.Reset)
|
||||
/*
|
||||
case request_proto.Section_TrainIn:
|
||||
fi.DriveAxleSectionTrainIn(simulation.World, sectionUid)
|
||||
case request_proto.Section_TrainOut:
|
||||
fi.DriveAxleSectionTrainOut(simulation.World, sectionUid)
|
||||
*/
|
||||
/*
|
||||
sectionUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Section{})
|
||||
slog.Debug("操作计轴区段", "axleSectionUid", sectionUid)
|
||||
switch req.Operation {
|
||||
case request_proto.Section_Drst:
|
||||
fi.DriveAxleSectionDrst(simulation.World, sectionUid, req.Reset)
|
||||
case request_proto.Section_Pdrst:
|
||||
fi.DriveAxleSectionPdrst(simulation.World, sectionUid, req.Reset)
|
||||
|
||||
}
|
||||
case request_proto.Section_TrainIn:
|
||||
fi.DriveAxleSectionTrainIn(simulation.World, sectionUid)
|
||||
case request_proto.Section_TrainOut:
|
||||
fi.DriveAxleSectionTrainOut(simulation.World, sectionUid)
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue