style(formatter): 格式化代码中的缩进和空行
- 统一了结构体字段的对齐方式,保持一致的缩进 - 调整了 import 语句的顺序,将 fmt 移至合适位置 - 修复了多处多余的空行和空白字符 - 规范化了注释的缩进格式 - 整理了路由配置的缩进层次 - 调整了常量定义的对齐格式
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package wmsclient
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
@@ -119,7 +119,7 @@ func semiInboundHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
SetNillableTestRecordNo(strPtr(req.TestRecordNo)).
|
||||
SetNillableRecordedBy(strPtr(req.RecordedBy)).
|
||||
SetNillableRecordedAt(int64Ptr(req.RecordedAt)).
|
||||
SetRemark(catLabel+"完工暂存回流").
|
||||
SetRemark(catLabel + "完工暂存回流").
|
||||
Save(ctx0())
|
||||
if err != nil {
|
||||
fail(w, http.StatusInternalServerError, err.Error())
|
||||
@@ -305,6 +305,7 @@ type ledgerRow struct {
|
||||
// ledgerState 备料四态判定(客户诉求 问题记录 L242-258 孙彦飞口径),优先级:未到货 > 预警 > 未齐套 > 齐套。
|
||||
//
|
||||
// 状态定义(L253-256):
|
||||
//
|
||||
// 齐套 :可用库存 ≥ 需求总量
|
||||
// 未齐套:0 < 可用库存 < 需求总量
|
||||
// 未到货:可用库存 = 0 且 已出库 = 0
|
||||
|
||||
@@ -249,5 +249,5 @@ func RegisterHandlers(server *rest.Server, ctx *svc.ServiceContext) {
|
||||
{Method: http.MethodGet, Path: "/api/internal/docks", Handler: wrapInternal(ctx)(listDocksInternalHandler(ctx))},
|
||||
{Method: http.MethodPost, Path: "/api/internal/material/backflush", Handler: wrapInternal(ctx)(backflushInternalHandler(ctx))},
|
||||
},
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"bj_power_wms/ent"
|
||||
"bj_power_wms/ent/inventory"
|
||||
"bj_power_wms/ent/inventorylock"
|
||||
@@ -15,6 +14,8 @@ import (
|
||||
"bj_power_wms/ent/predicate"
|
||||
"bj_power_wms/ent/zone"
|
||||
"bj_power_wms/internal/svc"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// stockKey 库存聚合行的唯一标识(组合键)+ 明细下钻的过滤条件
|
||||
@@ -665,6 +666,7 @@ func exportStockHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
sendExcel(w, xlsxFilename("库存汇总"), headers, matrix)
|
||||
}
|
||||
}
|
||||
|
||||
// zoneSummRow 区域汇总行(按 区域 + 质量状态 + 类型 聚合)
|
||||
// ID/ZoneCreatedAt 取区域主表(zone)主键与创建时间——聚合视图无自身实体,主表字段即行标识,禁止伪 id。
|
||||
type zoneSummRow struct {
|
||||
|
||||
@@ -342,6 +342,7 @@ func updateZoneNodeHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
// listZonesForPicker 库位下拉(兼容 + 层级两用):
|
||||
// - 不带 level:返回所有启用位置号(level4)扁平结构(兼容 Outbound/Stocktake/Inventory 旧调用)
|
||||
// - 带 level:返回该层级节点(用于入库页区域→货架→层→位置 级联下拉)
|
||||
//
|
||||
// locKey 四级货位比较键:区域/货架忽略大小写(存量数据存在 z01/Z01 混用),层/位置原样。
|
||||
func locKey(zoneCode, shelfNo, layerNo, positionNo string) string {
|
||||
return strings.ToLower(strings.TrimSpace(zoneCode)) + "|" +
|
||||
|
||||
Reference in New Issue
Block a user