feat: 新增 AgvPoint 点位表及客户端,支持点位编码与接驳台绑定
This commit is contained in:
@@ -114,13 +114,13 @@ func (s *Service) PlcMonitorMW(ctx context.Context) ([]MWState, error) {
|
||||
// 3) 写 MW 寄存器;
|
||||
// 4) 记操作日志(event_log,type=plc_manual_write)。
|
||||
func (s *Service) PlcMonitorManualWrite(ctx context.Context, req ManualWriteReq, operator string) (*MonitorPreview, error) {
|
||||
// 1. 互斥:在途指令(工位组合下发尚未收到完成信号)
|
||||
// 1. 互斥:在途指令(工位下发尚未收到完成信号)
|
||||
inTransit, err := s.ctx.EntClient.PlcSendLog.Query().Where(plcsendlog.Status("SENT")).Exist(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if inTransit {
|
||||
return nil, errors.New("存在在途指令(工位组合下发尚未收到完成信号),手动下发被拒绝,以免打断自动线")
|
||||
return nil, errors.New("存在在途指令(工位下发尚未收到完成信号),手动下发被拒绝,以免打断自动线;可在「工位下发」页撤回或人工完成后重试")
|
||||
}
|
||||
// 2. 校验组合
|
||||
st, stok := plc.ParseSrcType(req.SrcType)
|
||||
|
||||
Reference in New Issue
Block a user