style(formatter): 格式化代码中的缩进和空行

- 统一了结构体字段的对齐方式,保持一致的缩进
- 调整了 import 语句的顺序,将 fmt 移至合适位置
- 修复了多处多余的空行和空白字符
- 规范化了注释的缩进格式
- 整理了路由配置的缩进层次
- 调整了常量定义的对齐格式
This commit is contained in:
SunYF
2026-09-20 14:53:14 +08:00
parent f35e9b5b75
commit 60eacc9c4f
10 changed files with 66 additions and 62 deletions
@@ -66,16 +66,16 @@ func ImportBomHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
}
}
item := logic.BomItemReq{
ProductCode: productCode,
BomName: bomName,
MaterialCode: materialCode,
MaterialName: trimCell(row, 3),
Spec: trimCell(row, 4),
Unit: trimCell(row, 5),
ManageMode: "2",
ProcessCode: &pc,
UnitQty: parseFloat(trimCell(row, 6)),
LossRate: parseFloat(trimCell(row, 7)),
ProductCode: productCode,
BomName: bomName,
MaterialCode: materialCode,
MaterialName: trimCell(row, 3),
Spec: trimCell(row, 4),
Unit: trimCell(row, 5),
ManageMode: "2",
ProcessCode: &pc,
UnitQty: parseFloat(trimCell(row, 6)),
LossRate: parseFloat(trimCell(row, 7)),
RelatedStandard: trimCell(row, 9),
}
k := key{productCode, bomName}
@@ -357,4 +357,4 @@ func StationReceiveMaterialInternalHandler(svcCtx *svc.ServiceContext) http.Hand
}
httpx.Ok(w, nil)
}
}
}
+4 -4
View File
@@ -1,11 +1,11 @@
package wmsclient
import (
"fmt"
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
"time"
@@ -186,8 +186,8 @@ func (c *Client) ProductTypePage(ctx context.Context, code, name, category, isAc
q += "&isActive=" + isActive
}
var data struct {
Total int64 `json:"total"`
List []ProductTypeRow `json:"list"`
Total int64 `json:"total"`
List []ProductTypeRow `json:"list"`
}
if err := c.get(ctx, q, &data); err != nil {
return 0, nil, err
@@ -651,4 +651,4 @@ type RespError struct {
func (e *RespError) Error() string {
return "wms call failed with status " + string(rune('0'+e.Status))
}
}