feat: 移除工位模板、AGV 链路增强与产品BOM/混产模板完善

- 移除工位模板体系(handler/logic 全删),同步路由与 seed
- AGV 链路增强:点位锁、车辆状态、退料派车调整,新增海康 RCS Postman 调试集合
- MES 产品BOM/混产模板完善:新增 ProductBOMDialog 组件,调整 handler/logic;日排产达成对比调整
- WMS 业务完善:出入库、检验、备料、退料、成品入库、缺料代报等 handler 与前端页面调整
- 前端通用:双端新增 RemotePageSelect 组件,统一 nextStep 规则/帮助文档/布局/请求拦截
- 文档:更新产线API/案例/部署手册/问题记录等
This commit is contained in:
SunYF
2026-11-18 09:53:42 +08:00
parent 5c9a7e32d2
commit f8482b18f6
122 changed files with 3381 additions and 2004 deletions
+11 -4
View File
@@ -59,10 +59,14 @@ type ManualWriteReq struct {
}
// PlcMonitorBits 读取 48 位点位状态并按位置分组(工位/主线/接驳台+库房)。
// 2026-11-17:PLC 断电时 tcp.go 持锁拨号 ctx 打断不了,裸读会挂满 10s 被 go-zero slowcall
// 掐成 503。改走 plcHardCut(2.5s fail-open),超时返回明确错误而非拖垮页面。
func (s *Service) PlcMonitorBits(ctx context.Context) (*BitsGroup, error) {
bits, err := s.ctx.PLC.Get().ReadBits(ctx)
bits, err := plcHardCut(ctx, 2500*time.Millisecond, func(c context.Context) ([]bool, error) {
return s.ctx.PLC.Get().ReadBits(c)
})
if err != nil {
return nil, err
return nil, fmt.Errorf("读取 PLC 点位失败:2.5 秒内未读到数据,PLC 可能断电或网络不通。请确认 PLC 已上电、网线连接正常后再刷新(%v)", err)
}
g := &BitsGroup{Mock: s.ctx.PLC.IsMock()}
for i := 0; i < 12; i++ {
@@ -232,9 +236,12 @@ type PositionCheck struct {
// PlcPositionCheck 核对「MES 记录的工件物理位置 vs PLC 实际托盘位」:
// MES 记 atStationNo=n(工件应在工位 n),但 PLC 该工位无托盘 ⇒ 记录过期/错位,列出待纠正。
func (s *Service) PlcPositionCheck(ctx context.Context) (*PositionCheck, error) {
bits, err := s.ctx.PLC.Get().ReadBits(ctx)
// 2026-11-17:同 PlcMonitorBits,PLC 不可达时硬切,避免 slowcall 503。
bits, err := plcHardCut(ctx, 2500*time.Millisecond, func(c context.Context) ([]bool, error) {
return s.ctx.PLC.Get().ReadBits(c)
})
if err != nil {
return nil, err
return nil, fmt.Errorf("核对工件位置失败:2.5 秒内未读到 PLC 托盘状态,PLC 可能断电或网络不通。请确认 PLC 已上电、网线连接正常后再刷新(%v)", err)
}
stations := make([]PointBit, 0, 12)
for i := 0; i < 12; i++ {