feat: 完成产线MES系统全流程功能迭代与优化
本提交完成了多个核心模块的功能完善与业务对齐: 1. 工位终端:固定工位配置、移除自选工位逻辑、适配配置化工位号 2. MES核心:重构工位组合逻辑、新增工单/流程状态管理、补全报工/追溯逻辑 3. WMS客户端:新增修改密码功能、优化帮助弹窗逻辑 4. 文档与权限:补充完整操作手册、统一菜单名称与权限描述 5. 修复多业务校验:排产数量校验、工单状态校验、工位绑定规则
This commit is contained in:
@@ -5,10 +5,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"bj_power_workstation/internal/auth"
|
||||
"bj_power_workstation/internal/svc"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
func healthHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
@@ -60,11 +57,11 @@ func loginHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
|
||||
// configHandler GET /api/config 返回工位配置:
|
||||
// 固定工位号 stationNo(Station.Code 为空则前端可自选 1~12)、本工位需拧紧的螺丝颗数。
|
||||
// 固定工位号 stationNo(1~12,由 yaml 配置在启动时加载,终端不可修改)、本工位需拧紧的螺丝颗数。
|
||||
func configHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
ok(w, map[string]any{
|
||||
"stationNo": atoi(ctx.Config.Station.Code, 0),
|
||||
"stationNo": ctx.Config.Station.StationNo,
|
||||
"screwCount": ctx.Config.Station.ScrewCount,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -34,17 +34,21 @@ func taskCurrentHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// workloadHandler 代理 MES GET /api/internal/station/workload?operator=&from=&to=(块6)。
|
||||
// 工位终端「我的工作量」仅查询当前登录人数据;MES 响应体原样透传。
|
||||
// workloadHandler 代理 MES GET /api/internal/station/workload?operator=&stationNo=&from=&to=(块6)。
|
||||
// 工位终端「我的工作量」查询当前登录人全部工位的工作,stationNo 为空=全部工位;MES 响应体原样透传。
|
||||
func workloadHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
operator := strings.TrimSpace(r.URL.Query().Get("operator"))
|
||||
stationNo := strings.TrimSpace(r.URL.Query().Get("stationNo"))
|
||||
from := strings.TrimSpace(r.URL.Query().Get("from"))
|
||||
to := strings.TrimSpace(r.URL.Query().Get("to"))
|
||||
params := url.Values{}
|
||||
if operator != "" {
|
||||
params.Set("operator", operator)
|
||||
}
|
||||
if stationNo != "" {
|
||||
params.Set("stationNo", stationNo)
|
||||
}
|
||||
if from != "" {
|
||||
params.Set("from", from)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user