chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -229,13 +229,18 @@ func queryInspectionHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
inspector := r.URL.Query().Get("inspector")
|
||||
startDate := r.URL.Query().Get("startDate")
|
||||
endDate := r.URL.Query().Get("endDate")
|
||||
startDate, endDate, rerr := normalizeExportRange(startDate, endDate)
|
||||
if rerr != nil {
|
||||
fail(w, http.StatusBadRequest, rerr.Error())
|
||||
return
|
||||
}
|
||||
|
||||
q := ctx.EntClient.InspectionRecord.Query()
|
||||
if targetId != "" {
|
||||
q = q.Where(inspectionrecord.TargetIDContains(targetId))
|
||||
q = q.Where(inspectionrecord.TargetIDContainsFold(targetId))
|
||||
}
|
||||
if materialCode != "" {
|
||||
q = q.Where(inspectionrecord.MaterialCodeContains(materialCode))
|
||||
q = q.Where(inspectionrecord.MaterialCodeContainsFold(materialCode))
|
||||
}
|
||||
if inspectionType != "" {
|
||||
q = q.Where(inspectionrecord.InspectionTypeEQ(inspectionType))
|
||||
@@ -244,7 +249,7 @@ func queryInspectionHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
q = q.Where(inspectionrecord.StatusEQ(status))
|
||||
}
|
||||
if inspector != "" {
|
||||
q = q.Where(inspectionrecord.InspectorContains(inspector))
|
||||
q = q.Where(inspectionrecord.InspectorContainsFold(inspector))
|
||||
}
|
||||
// 时间筛选(默认近3个月由前端传入;兼容两端口径)
|
||||
if startDate != "" {
|
||||
@@ -290,13 +295,18 @@ func exportInspectionHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
inspector := r.URL.Query().Get("inspector")
|
||||
startDate := r.URL.Query().Get("startDate")
|
||||
endDate := r.URL.Query().Get("endDate")
|
||||
startDate, endDate, rerr := normalizeExportRange(startDate, endDate)
|
||||
if rerr != nil {
|
||||
fail(w, http.StatusBadRequest, rerr.Error())
|
||||
return
|
||||
}
|
||||
|
||||
q := ctx.EntClient.InspectionRecord.Query()
|
||||
if targetId != "" {
|
||||
q = q.Where(inspectionrecord.TargetIDContains(targetId))
|
||||
q = q.Where(inspectionrecord.TargetIDContainsFold(targetId))
|
||||
}
|
||||
if materialCode != "" {
|
||||
q = q.Where(inspectionrecord.MaterialCodeContains(materialCode))
|
||||
q = q.Where(inspectionrecord.MaterialCodeContainsFold(materialCode))
|
||||
}
|
||||
if inspectionType != "" {
|
||||
q = q.Where(inspectionrecord.InspectionTypeEQ(inspectionType))
|
||||
@@ -305,7 +315,7 @@ func exportInspectionHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
q = q.Where(inspectionrecord.StatusEQ(status))
|
||||
}
|
||||
if inspector != "" {
|
||||
q = q.Where(inspectionrecord.InspectorContains(inspector))
|
||||
q = q.Where(inspectionrecord.InspectorContainsFold(inspector))
|
||||
}
|
||||
if startDate != "" {
|
||||
if t, err := time.ParseInLocation("2006-01-02", startDate, time.Local); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user