修改屏蔽门操作逻辑

This commit is contained in:
joylink_zhangsai 2023-12-08 17:43:21 +08:00
parent 685a3b0902
commit 61f6a52dcc
2 changed files with 1 additions and 16 deletions

View File

@ -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")
}

View File

@ -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: