Merge remote-tracking branch 'origin/master'

This commit is contained in:
tiger_zhou 2024-01-18 10:11:31 +08:00
commit 487ae08939
3 changed files with 4 additions and 4 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 0203bbcefa0797f2efae50bbaa5e9c6d0f30a84e
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)