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
@@ -45,6 +45,14 @@ const (
FieldOwnershipNo = "ownership_no"
// FieldQualityStatus holds the string denoting the quality_status field in the database.
FieldQualityStatus = "quality_status"
// FieldVoided holds the string denoting the voided field in the database.
FieldVoided = "voided"
// FieldVoidReason holds the string denoting the void_reason field in the database.
FieldVoidReason = "void_reason"
// FieldVoidedBy holds the string denoting the voided_by field in the database.
FieldVoidedBy = "voided_by"
// FieldVoidedAt holds the string denoting the voided_at field in the database.
FieldVoidedAt = "voided_at"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the inboundorder in the database.
@@ -71,6 +79,10 @@ var Columns = []string{
FieldOwnershipType,
FieldOwnershipNo,
FieldQualityStatus,
FieldVoided,
FieldVoidReason,
FieldVoidedBy,
FieldVoidedAt,
FieldCreatedAt,
}
@@ -93,6 +105,8 @@ var (
DefaultQuantity int
// DefaultOwnershipType holds the default value on creation for the "ownership_type" field.
DefaultOwnershipType string
// DefaultVoided holds the default value on creation for the "voided" field.
DefaultVoided bool
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() int64
)
@@ -190,6 +204,26 @@ func ByQualityStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldQualityStatus, opts...).ToFunc()
}
// ByVoided orders the results by the voided field.
func ByVoided(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVoided, opts...).ToFunc()
}
// ByVoidReason orders the results by the void_reason field.
func ByVoidReason(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVoidReason, opts...).ToFunc()
}
// ByVoidedBy orders the results by the voided_by field.
func ByVoidedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVoidedBy, opts...).ToFunc()
}
// ByVoidedAt orders the results by the voided_at field.
func ByVoidedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVoidedAt, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()