feat: 完成附件存储重构与磁盘监控功能,同步物料档案与入库单规则更新

1.  新增跨平台磁盘空间监控能力,每日7点自动检测附件目录剩余空间,触发阈值告警
2.  重构附件存储方案为年/月/日/文件类型分层结构,统一MES与WMS的附件管理逻辑
3.  对齐物料档案与入库单的质量状态校验规则,仅合格品计入库存与出库
4.  实现入库单作废功能与区域库位的多级父子结构管理
5.  删除物料简称字段,补充规格型号与单位必填项,统一系统数据口径
6.  新增附件中心与磁盘状态查询接口,完善权限控制与操作日志
This commit is contained in:
SunYF
2026-09-19 10:54:15 +08:00
parent 9002d9a642
commit 62e45b7379
95 changed files with 10467 additions and 2677 deletions
+9 -5
View File
@@ -87,12 +87,15 @@ func (c *Client) MaterialExists(ctx context.Context, codes []string) ([]string,
}
// ProductTypeRow 产品型号档案行(WMS materials item_type=3
// 注:原「备注」随 WMS 物料档案「简称」一并删除(2026-09-19),
// 改为与 WMS 必填口径一致的「规格 / 单位」。
type ProductTypeRow struct {
ID int `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Spec string `json:"spec"`
Unit string `json:"unit"`
Category string `json:"category"`
Remark string `json:"remark"`
IsActive bool `json:"isActive"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
@@ -193,16 +196,17 @@ func (c *Client) ProductTypePage(ctx context.Context, code, name, category, isAc
}
// CreateProductType 新建产品型号(code 可空由 WMS 自动生成 PROD-日期-流水)
func (c *Client) CreateProductType(ctx context.Context, code, name, category, remark string, isActive bool) error {
// spec/unit 必填(与 WMS 物料档案必填口径一致)
func (c *Client) CreateProductType(ctx context.Context, code, name, spec, unit, category string, isActive bool) error {
return c.post(ctx, "/api/internal/product-types", map[string]any{
"code": code, "name": name, "category": category, "remark": remark, "isActive": isActive,
"code": code, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive,
})
}
// UpdateProductType 修改产品型号(编码不可改)
func (c *Client) UpdateProductType(ctx context.Context, id int, name, category, remark string, isActive bool) error {
func (c *Client) UpdateProductType(ctx context.Context, id int, name, spec, unit, category string, isActive bool) error {
return c.putJSON(ctx, "/api/internal/product-types", map[string]any{
"id": id, "name": name, "category": category, "remark": remark, "isActive": isActive,
"id": id, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive,
})
}