chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -6,13 +6,17 @@ import (
|
||||
"bj_power_mes/common/httpx"
|
||||
"bj_power_mes/internal/logic"
|
||||
"bj_power_mes/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/pathvar"
|
||||
)
|
||||
|
||||
// ListProcessFlowsHandler GET /process-flows?stationNo=
|
||||
func ListProcessFlowsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
stationNo := atoiDefault(r.URL.Query().Get("stationNo"), 0)
|
||||
data, err := logic.New(svcCtx).ListFlows(r.Context(), stationNo)
|
||||
page := atoiDefault(r.URL.Query().Get("page"), 0)
|
||||
pageSize := atoiDefault(r.URL.Query().Get("pageSize"), 20)
|
||||
data, err := logic.New(svcCtx).ListFlows(r.Context(), stationNo, page, pageSize)
|
||||
if err != nil {
|
||||
httpx.Fail(w, 2201, err.Error())
|
||||
return
|
||||
@@ -71,6 +75,15 @@ func FileDownloadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// FilePathHandler GET /files/:date/:name —— 路径式文件 URL(巡检拍照上传返回的
|
||||
// url 形如 /api/v1/files/2026-09-07/xxx.png,此前无此路由导致照片 404)
|
||||
func FilePathHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
vars := pathvar.Vars(r)
|
||||
serveUploadFile(w, r, svcCtx.Config.Upload.Dir, vars["date"]+"/"+vars["name"])
|
||||
}
|
||||
}
|
||||
|
||||
// ListStationsHandler GET /stations
|
||||
func ListStationsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user