This commit is contained in:
weizhihong 2023-12-08 17:56:02 +08:00
commit edc502a16e
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: