feat: 新增 AgvPoint 点位表及客户端,支持点位编码与接驳台绑定

This commit is contained in:
SunYF
2026-11-03 10:17:49 +08:00
parent fd2f0e2767
commit 2ccf9bb9ca
62 changed files with 5501 additions and 238 deletions
+4 -3
View File
@@ -477,11 +477,12 @@ func (s *Service) CreateCallOrders(ctx context.Context, stationNo int, items []C
}
allowCross := s.CfgInt(ctx, CfgAllowCrossDay, 1) == 1
allowBorrow := s.CfgInt(ctx, CfgAllowBorrow, 1) == 1
// 接驳台校验:目标接驳台必须属于该工位(一工位左L/右R 两个,真源=dock 表)
// 接驳台校验:目标接驳台必须属于该工位(一工位左L/右R 两个,真源=dock 表);
// 停用(DISABLED)接驳台不进候选(2026-11-03 断头路补全:此前只校验归属不校验启停,停用台仍可被叫料指向)
dockSet := map[string]bool{}
if dks, e := s.ctx.EntClient.Dock.Query().Where(dock.StationNo(stationNo)).All(ctx); e == nil {
for _, d := range dks {
if d.DockCode != "" {
if d.DockCode != "" && d.Status != "DISABLED" {
dockSet[d.DockCode] = true
}
}
@@ -495,7 +496,7 @@ func (s *Service) CreateCallOrders(ctx context.Context, stationNo int, items []C
return 0, errors.New("请选择目标接驳台")
}
if !dockSet[it.Dock] {
return 0, errors.New("该工位无此接驳台:" + it.Dock)
return 0, fmt.Errorf("接驳台 %s 不属于本工位或已停用,请在「产线管理」确认后重选", it.Dock)
}
}
tx, terr := s.ctx.EntClient.Tx(ctx)