feat: 菜单按业务域重排为7组 + 预警中心更名异常告警 + AGV独立权限码与齐套测算分账明细
This commit is contained in:
@@ -40,6 +40,20 @@ func linePointsHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// linePointSensorHandler GET /api/line/point-sensor?pointNo=
|
||||
// 建档前实物核对:转发 MES 读取所选点位 PLC 传感器实时有货状态(只读,不触发下流)。
|
||||
// 透传 {pointNo, hasGoods, plcOk, code};plcOk=false 时前端降级为人工确认提示。
|
||||
func linePointSensorHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
q := url.Values{}
|
||||
if v := strings.TrimSpace(r.URL.Query().Get("pointNo")); v != "" {
|
||||
q.Set("pointNo", v)
|
||||
}
|
||||
body, _, err := ctx.Mes.Get("/api/internal/line/point-sensor", q, bearerOf(r))
|
||||
mesJSON(w, body, err)
|
||||
}
|
||||
}
|
||||
|
||||
// lineOccupyHandler POST /api/line/occupy(点位人工记账:IN 上料 / OUT 下料)
|
||||
// 请求体:{pointNo, sn, orderNo, action} —— operator 由本服务补当前登录人。
|
||||
func lineOccupyHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
@@ -59,6 +59,8 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
|
||||
// 产线点位 / 叫料(代理 MES 内部 API)
|
||||
{Method: http.MethodGet, Path: "/api/line/points", Handler: linePointsHandler(ctx)},
|
||||
// 建档前点位传感器实物核对(只读,不触发下流;PLC 读不到时前端降级人工确认)
|
||||
{Method: http.MethodGet, Path: "/api/line/point-sensor", Handler: linePointSensorHandler(ctx)},
|
||||
{Method: http.MethodPost, Path: "/api/line/occupy", Handler: lineOccupyHandler(ctx)},
|
||||
// B5 叫料六端点(代理 MES 内部 API):池子/发起/列表/签收/取消/退库申请
|
||||
{Method: http.MethodGet, Path: "/api/call/pool", Handler: callPoolHandler(ctx)},
|
||||
|
||||
Reference in New Issue
Block a user