feat: 重构BOM架构,新增基础设置与虚拟工位管理功能

本次重构删除原有BOM物料清单表,改用工单工艺组合×工艺物料清单作为唯一用料来源;新增系统基础设置表支持WMS地址、日志保留天数等配置,新增虚拟工位作业管理后台接口与前端页签控制功能,同时优化工位号校验逻辑、事件日志自动清理与工单用料查询能力。
This commit is contained in:
SunYF
2026-09-23 11:41:28 +08:00
parent d3eda6b588
commit f274da044c
74 changed files with 3637 additions and 5586 deletions
+12 -1
View File
@@ -105,7 +105,8 @@ func StationChangePasswordInternalHandler(svcCtx *svc.ServiceContext) http.Handl
func StationTaskInternalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
stationNo := atoiDefault(r.URL.Query().Get("stationNo"), 0)
if stationNo <= 0 {
// 0=上线位为合法虚拟工位,仅负数视为未配置
if stationNo < 0 {
httpx.BadRequest(w, "缺少 stationNo 参数")
return
}
@@ -118,6 +119,16 @@ func StationTaskInternalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
}
}
// StationTaskAdminHandler GET /station/task?stationNo= 管理后台「虚拟工位作业」页拉取任务(与终端同逻辑)
func StationTaskAdminHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return StationTaskInternalHandler(svcCtx)
}
// StationReportAdminHandler POST /station/report 管理后台「虚拟工位作业」报工(与终端同逻辑,operator=登录账号)
func StationReportAdminHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return StationReportInternalHandler(svcCtx)
}
// StationReportInternalHandler 工位终端工艺报工(写工位实绩 + 步骤考核)
func StationReportInternalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {