From 61f6a52dcc38643915b30272e48f35939df59967 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai Date: Fri, 8 Dec 2023 17:43:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=8F=E8=94=BD=E9=97=A8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/simulation.go | 2 +- .../wayside/memory/wayside_memory_psd.go | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) 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: