fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package temp_station
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"bj_power_mes/internal/logic/temp_station"
|
||||
"bj_power_mes/internal/svc"
|
||||
)
|
||||
|
||||
// 暂存台槽位监控
|
||||
func ListBufferSlotsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := temp_station.NewListBufferSlotsLogic(r.Context(), svcCtx)
|
||||
resp, err := l.ListBufferSlots()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package temp_station
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"bj_power_mes/internal/logic/temp_station"
|
||||
"bj_power_mes/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
// 重置暂存台:将在位工件回写到接驳台位置
|
||||
func ResetBufferHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := temp_station.NewResetBufferLogic(r.Context(), svcCtx)
|
||||
resp, err := l.ResetBuffer()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user