feat: 完成产线与仓储系统多模块迭代升级
本次迭代覆盖MES与WMS核心业务: 1. 新增接驳台托盘传感器读取与AGV对接能力 2. 完善工单排产、备料流程与权限体系拆分 3. 优化看板接口与前端路由、样式 4. 新增操作日志、库存盘点与角色保护逻辑 5. 修复代理地址、BOM保存等已知问题
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"bj_power_wms/internal/svc"
|
||||
)
|
||||
|
||||
// eventLogListHandler GET /api/event/logs 操作日志分页查询
|
||||
// 筛选:eventType(事件类型) operator(操作人) entityType(对象类型) from/to(unix 秒)
|
||||
func eventLogListHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
return requirePerm(ctx, "eventlog:manage", func(w http.ResponseWriter, r *http.Request) {
|
||||
q := r.URL.Query()
|
||||
page, _ := strconv.Atoi(q.Get("page"))
|
||||
pageSize, _ := strconv.Atoi(q.Get("pageSize"))
|
||||
from, _ := strconv.ParseInt(q.Get("from"), 10, 64)
|
||||
to, _ := strconv.ParseInt(q.Get("to"), 10, 64)
|
||||
list, total, err := ctx.EventLog.Query(ctx0(),
|
||||
q.Get("eventType"), q.Get("operator"), q.Get("entityType"),
|
||||
from, to, page, pageSize)
|
||||
if err != nil {
|
||||
fail(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
ok(w, map[string]any{"list": list, "total": total})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user