This commit is contained in:
walker 2024-01-18 10:20:40 +08:00
commit 1db384297b
4 changed files with 5 additions and 5 deletions

View File

@ -638,9 +638,9 @@ func balisePositionModify(c *gin.Context) {
}
simulation := checkDeviceDataAndReturn(req.SimulationId)
slog.Info("传入状态参数", req)
err := memory.BalisePositionModify(simulation, req)
var err *sys_error.BusinessError = memory.BalisePositionModify(simulation, req)
if err != nil {
panic(sys_error.New(fmt.Sprintf("应答器移位操作失败,%s", err.Error()), err))
panic(err)
}
c.JSON(http.StatusOK, "ok")
}

@ -1 +1 @@
Subproject commit 8469ef8778e98f43caa6cdf6e18a19ecb7f490de
Subproject commit 3ec969bbd23c98ea2b32e5202f60e0cb41a23b10

@ -1 +1 @@
Subproject commit a6e451e33ffc058fd65e6f39f3751946090043ac
Subproject commit 8cd0f61fb0aa36fe69bc55ada1ffb4397626b365

View File

@ -90,7 +90,7 @@ func BalisePositionModify(simulation *VerifySimulation, req *dto.BaliseMoveReqDt
//更新应答器公里标和Link位置
entry, _ := entity.GetEntityByUid(simulation.World, uid)
if km.Value <= minKm.Value || km.Value >= maxKm.Value {
return sys_error.New(fmt.Sprintf("超出可设置范围(%d:%d)", minKm.Value, maxKm.Value))
return sys_error.New("位置设置错误,必须在相邻的应答器/道岔/轨道边界之间")
}
component.KmType.Set(entry, km)
offset := number.Abs(km.Value - akm.Value)