feat: 重构BOM架构,新增基础设置与虚拟工位管理功能
本次重构删除原有BOM物料清单表,改用工单工艺组合×工艺物料清单作为唯一用料来源;新增系统基础设置表支持WMS地址、日志保留天数等配置,新增虚拟工位作业管理后台接口与前端页签控制功能,同时优化工位号校验逻辑、事件日志自动清理与工单用料查询能力。
This commit is contained in:
@@ -73,4 +73,10 @@ func (w *Writer) Query(ctx context.Context, eventType, workOrderNo string, opera
|
||||
return nil, 0, err
|
||||
}
|
||||
return list, total, nil
|
||||
}
|
||||
|
||||
// CleanupBefore 删除早于 cutoff 的操作日志(基础设置「事件日志保留天数」用),返回删除条数。
|
||||
func (w *Writer) CleanupBefore(ctx context.Context, cutoff time.Time) (int, error) {
|
||||
n, err := w.client.EventLog.Delete().Where(eventlog.CreatedAtLT(cutoff)).Exec(ctx)
|
||||
return int(n), err
|
||||
}
|
||||
Reference in New Issue
Block a user