feat: 完成附件存储重构与磁盘监控功能,同步物料档案与入库单规则更新
1. 新增跨平台磁盘空间监控能力,每日7点自动检测附件目录剩余空间,触发阈值告警 2. 重构附件存储方案为年/月/日/文件类型分层结构,统一MES与WMS的附件管理逻辑 3. 对齐物料档案与入库单的质量状态校验规则,仅合格品计入库存与出库 4. 实现入库单作废功能与区域库位的多级父子结构管理 5. 删除物料简称字段,补充规格型号与单位必填项,统一系统数据口径 6. 新增附件中心与磁盘状态查询接口,完善权限控制与操作日志
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -138,6 +138,26 @@ func QualityStatus(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldQualityStatus, v))
|
||||
}
|
||||
|
||||
// Voided applies equality check predicate on the "voided" field. It's identical to VoidedEQ.
|
||||
func Voided(v bool) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoided, v))
|
||||
}
|
||||
|
||||
// VoidReason applies equality check predicate on the "void_reason" field. It's identical to VoidReasonEQ.
|
||||
func VoidReason(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidedBy applies equality check predicate on the "voided_by" field. It's identical to VoidedByEQ.
|
||||
func VoidedBy(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedAt applies equality check predicate on the "voided_at" field. It's identical to VoidedAtEQ.
|
||||
func VoidedAt(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -1298,6 +1318,216 @@ func QualityStatusContainsFold(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldContainsFold(FieldQualityStatus, v))
|
||||
}
|
||||
|
||||
// VoidedEQ applies the EQ predicate on the "voided" field.
|
||||
func VoidedEQ(v bool) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoided, v))
|
||||
}
|
||||
|
||||
// VoidedNEQ applies the NEQ predicate on the "voided" field.
|
||||
func VoidedNEQ(v bool) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNEQ(FieldVoided, v))
|
||||
}
|
||||
|
||||
// VoidReasonEQ applies the EQ predicate on the "void_reason" field.
|
||||
func VoidReasonEQ(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonNEQ applies the NEQ predicate on the "void_reason" field.
|
||||
func VoidReasonNEQ(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNEQ(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonIn applies the In predicate on the "void_reason" field.
|
||||
func VoidReasonIn(vs ...string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIn(FieldVoidReason, vs...))
|
||||
}
|
||||
|
||||
// VoidReasonNotIn applies the NotIn predicate on the "void_reason" field.
|
||||
func VoidReasonNotIn(vs ...string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotIn(FieldVoidReason, vs...))
|
||||
}
|
||||
|
||||
// VoidReasonGT applies the GT predicate on the "void_reason" field.
|
||||
func VoidReasonGT(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGT(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonGTE applies the GTE predicate on the "void_reason" field.
|
||||
func VoidReasonGTE(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGTE(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonLT applies the LT predicate on the "void_reason" field.
|
||||
func VoidReasonLT(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLT(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonLTE applies the LTE predicate on the "void_reason" field.
|
||||
func VoidReasonLTE(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLTE(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonContains applies the Contains predicate on the "void_reason" field.
|
||||
func VoidReasonContains(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldContains(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonHasPrefix applies the HasPrefix predicate on the "void_reason" field.
|
||||
func VoidReasonHasPrefix(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldHasPrefix(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonHasSuffix applies the HasSuffix predicate on the "void_reason" field.
|
||||
func VoidReasonHasSuffix(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldHasSuffix(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonIsNil applies the IsNil predicate on the "void_reason" field.
|
||||
func VoidReasonIsNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIsNull(FieldVoidReason))
|
||||
}
|
||||
|
||||
// VoidReasonNotNil applies the NotNil predicate on the "void_reason" field.
|
||||
func VoidReasonNotNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotNull(FieldVoidReason))
|
||||
}
|
||||
|
||||
// VoidReasonEqualFold applies the EqualFold predicate on the "void_reason" field.
|
||||
func VoidReasonEqualFold(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEqualFold(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidReasonContainsFold applies the ContainsFold predicate on the "void_reason" field.
|
||||
func VoidReasonContainsFold(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldContainsFold(FieldVoidReason, v))
|
||||
}
|
||||
|
||||
// VoidedByEQ applies the EQ predicate on the "voided_by" field.
|
||||
func VoidedByEQ(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByNEQ applies the NEQ predicate on the "voided_by" field.
|
||||
func VoidedByNEQ(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNEQ(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByIn applies the In predicate on the "voided_by" field.
|
||||
func VoidedByIn(vs ...string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIn(FieldVoidedBy, vs...))
|
||||
}
|
||||
|
||||
// VoidedByNotIn applies the NotIn predicate on the "voided_by" field.
|
||||
func VoidedByNotIn(vs ...string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotIn(FieldVoidedBy, vs...))
|
||||
}
|
||||
|
||||
// VoidedByGT applies the GT predicate on the "voided_by" field.
|
||||
func VoidedByGT(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGT(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByGTE applies the GTE predicate on the "voided_by" field.
|
||||
func VoidedByGTE(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGTE(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByLT applies the LT predicate on the "voided_by" field.
|
||||
func VoidedByLT(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLT(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByLTE applies the LTE predicate on the "voided_by" field.
|
||||
func VoidedByLTE(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLTE(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByContains applies the Contains predicate on the "voided_by" field.
|
||||
func VoidedByContains(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldContains(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByHasPrefix applies the HasPrefix predicate on the "voided_by" field.
|
||||
func VoidedByHasPrefix(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldHasPrefix(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByHasSuffix applies the HasSuffix predicate on the "voided_by" field.
|
||||
func VoidedByHasSuffix(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldHasSuffix(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByIsNil applies the IsNil predicate on the "voided_by" field.
|
||||
func VoidedByIsNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIsNull(FieldVoidedBy))
|
||||
}
|
||||
|
||||
// VoidedByNotNil applies the NotNil predicate on the "voided_by" field.
|
||||
func VoidedByNotNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotNull(FieldVoidedBy))
|
||||
}
|
||||
|
||||
// VoidedByEqualFold applies the EqualFold predicate on the "voided_by" field.
|
||||
func VoidedByEqualFold(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEqualFold(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedByContainsFold applies the ContainsFold predicate on the "voided_by" field.
|
||||
func VoidedByContainsFold(v string) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldContainsFold(FieldVoidedBy, v))
|
||||
}
|
||||
|
||||
// VoidedAtEQ applies the EQ predicate on the "voided_at" field.
|
||||
func VoidedAtEQ(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtNEQ applies the NEQ predicate on the "voided_at" field.
|
||||
func VoidedAtNEQ(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNEQ(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtIn applies the In predicate on the "voided_at" field.
|
||||
func VoidedAtIn(vs ...int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIn(FieldVoidedAt, vs...))
|
||||
}
|
||||
|
||||
// VoidedAtNotIn applies the NotIn predicate on the "voided_at" field.
|
||||
func VoidedAtNotIn(vs ...int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotIn(FieldVoidedAt, vs...))
|
||||
}
|
||||
|
||||
// VoidedAtGT applies the GT predicate on the "voided_at" field.
|
||||
func VoidedAtGT(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGT(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtGTE applies the GTE predicate on the "voided_at" field.
|
||||
func VoidedAtGTE(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldGTE(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtLT applies the LT predicate on the "voided_at" field.
|
||||
func VoidedAtLT(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLT(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtLTE applies the LTE predicate on the "voided_at" field.
|
||||
func VoidedAtLTE(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldLTE(FieldVoidedAt, v))
|
||||
}
|
||||
|
||||
// VoidedAtIsNil applies the IsNil predicate on the "voided_at" field.
|
||||
func VoidedAtIsNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldIsNull(FieldVoidedAt))
|
||||
}
|
||||
|
||||
// VoidedAtNotNil applies the NotNil predicate on the "voided_at" field.
|
||||
func VoidedAtNotNil() predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldNotNull(FieldVoidedAt))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.InboundOrder {
|
||||
return predicate.InboundOrder(sql.FieldEQ(FieldCreatedAt, v))
|
||||
|
||||
Reference in New Issue
Block a user