| | |
| | | "apsClient/model/response" |
| | | "apsClient/nsq" |
| | | "apsClient/pkg/contextx" |
| | | "apsClient/pkg/convertx" |
| | | "apsClient/pkg/ecode" |
| | | "apsClient/pkg/logx" |
| | | "apsClient/pkg/safe" |
| | |
| | | "errors" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | | "gorm.io/gorm" |
| | | "github.com/jinzhu/gorm" |
| | | "github.com/spf13/cast" |
| | | "sort" |
| | | "sync" |
| | | "time" |
| | |
| | | ctx.Fail(ecode.ParamsErr) |
| | | return |
| | | } |
| | | id := convertx.Atoi(idx) |
| | | id := cast.ToUint(idx) |
| | | procedure, code := service.NewTaskService().GetProcedureById(id) |
| | | if code != ecode.OK { |
| | | ctx.Fail(code) |
| | |
| | | ctx.Fail(ecode.ParamsErr) |
| | | return |
| | | } |
| | | id := convertx.Atoi(idx) |
| | | id := cast.ToUint(idx) |
| | | procedure, code := service.NewTaskService().GetProcedureById(id) |
| | | if code != ecode.OK { |
| | | ctx.Fail(code) |
| | |
| | | return |
| | | } |
| | | plcConfig, code := service.NewDevicePlcService().GetDevicePlc() |
| | | if code != ecode.OK || plcConfig.Id == 0 { |
| | | if code != ecode.OK || plcConfig.ID == 0 { |
| | | ctx.FailWithMsg(ecode.NeedConfirmedErr, "请先配置PLC") |
| | | return |
| | | } |