diff --git a/api/simulation.go b/api/simulation.go index 0b8df38..db897c9 100644 --- a/api/simulation.go +++ b/api/simulation.go @@ -493,7 +493,7 @@ func psdOperation(c *gin.Context) { simulation := checkDeviceDataAndReturn(req.SimulationId) slog.Info("传入状态参数", req) if err := memory.HandlePsdOperation(simulation, req); err != nil { - panic(dto.ErrorDto{Code: dto.ArgumentError, Message: err.Error()}) + panic(sys_error.New(err.Error(), err)) } c.JSON(http.StatusOK, "ok") } diff --git a/ts/simulation/wayside/memory/wayside_memory_psd.go b/ts/simulation/wayside/memory/wayside_memory_psd.go index 3e95f1c..73ac267 100644 --- a/ts/simulation/wayside/memory/wayside_memory_psd.go +++ b/ts/simulation/wayside/memory/wayside_memory_psd.go @@ -12,21 +12,6 @@ import ( func HandlePsdOperation(simulation *VerifySimulation, req *request_proto.PsdOperationReq) error { uid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.ScreenDoor{}) switch req.Operation { - //case request_proto.Psd_Km4: - // return fi.SetInterlockKm4(simulation.World, uid) - //case request_proto.Psd_CancelKm4: - // return fi.CancelInterlockKm4(simulation.World, uid) - //case request_proto.Psd_Km8: - // return fi.SetInterlockKm8(simulation.World, uid) - //case request_proto.Psd_CancelKm8: - // return fi.CancelInterlockKm8(simulation.World, uid) - //case request_proto.Psd_Gm: - // return fi.SetInterlockGm(simulation.World, uid) - //case request_proto.Psd_CancelGm: - // return fi.CancelInterlockGm(simulation.World, uid) - //case request_proto.Psd_ForceKm4: - //case request_proto.Psd_ForceKm8: - //case request_proto.Psd_ForceGm: case request_proto.Psd_Km: return fi.SetInterlockKm(simulation.World, uid, req.Group) case request_proto.Psd_CancelKm: