feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
var processStartTime = time.Now()
|
||||
|
||||
// SystemInfoHandler GET /api/system/info 只读本机信息面板数据。
|
||||
// 含 OS / 主机名 / Go 版本 / 监听端口 / 启动时间 / MES 地址(MES 地址只读,修改需改配置文件并重启)。
|
||||
// 含 OS / 主机名 / Go 版本 / 监听端口 / 启动时间 / MES 地址(当前生效值:sys_config 覆盖优先)。
|
||||
func SystemInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
host, _ := os.Hostname()
|
||||
@@ -25,7 +25,18 @@ func SystemInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
"port": c.Port,
|
||||
"startTime": processStartTime.Unix(),
|
||||
"uptimeSeconds": int64(time.Since(processStartTime).Seconds()),
|
||||
"mesAddress": c.Mes.BaseURL,
|
||||
"mesAddress": svcCtx.Mes.BaseURL(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// MesPingHandler GET /api/system/mes-ping MES 连通性测试(admin-only,供基础设置页"测试连接")。
|
||||
func MesPingHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
if err := svcCtx.Mes.Ping(r.Context()); err != nil {
|
||||
fail(w, http.StatusBadGateway, err.Error())
|
||||
return
|
||||
}
|
||||
ok(w, map[string]any{"ok": true, "mesAddress": svcCtx.Mes.BaseURL()})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user