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
+61 -9
View File
@@ -197,6 +197,52 @@ func init() {
attachmentDescCreatedAt := attachmentFields[7].Descriptor()
// attachment.DefaultCreatedAt holds the default value on creation for the createdAt field.
attachment.DefaultCreatedAt = attachmentDescCreatedAt.Default.(func() time.Time)
// attachmentDescFileType is the schema descriptor for fileType field.
attachmentDescFileType := attachmentFields[8].Descriptor()
// attachment.DefaultFileType holds the default value on creation for the fileType field.
attachment.DefaultFileType = attachmentDescFileType.Default.(string)
// attachment.FileTypeValidator is a validator for the "fileType" field. It is called by the builders before save.
attachment.FileTypeValidator = attachmentDescFileType.Validators[0].(func(string) error)
// attachmentDescFileExt is the schema descriptor for fileExt field.
attachmentDescFileExt := attachmentFields[9].Descriptor()
// attachment.DefaultFileExt holds the default value on creation for the fileExt field.
attachment.DefaultFileExt = attachmentDescFileExt.Default.(string)
// attachment.FileExtValidator is a validator for the "fileExt" field. It is called by the builders before save.
attachment.FileExtValidator = attachmentDescFileExt.Validators[0].(func(string) error)
// attachmentDescFileMd5 is the schema descriptor for fileMd5 field.
attachmentDescFileMd5 := attachmentFields[10].Descriptor()
// attachment.DefaultFileMd5 holds the default value on creation for the fileMd5 field.
attachment.DefaultFileMd5 = attachmentDescFileMd5.Default.(string)
// attachment.FileMd5Validator is a validator for the "fileMd5" field. It is called by the builders before save.
attachment.FileMd5Validator = attachmentDescFileMd5.Validators[0].(func(string) error)
// attachmentDescMimeType is the schema descriptor for mimeType field.
attachmentDescMimeType := attachmentFields[11].Descriptor()
// attachment.DefaultMimeType holds the default value on creation for the mimeType field.
attachment.DefaultMimeType = attachmentDescMimeType.Default.(string)
// attachment.MimeTypeValidator is a validator for the "mimeType" field. It is called by the builders before save.
attachment.MimeTypeValidator = attachmentDescMimeType.Validators[0].(func(string) error)
// attachmentDescArchived is the schema descriptor for archived field.
attachmentDescArchived := attachmentFields[12].Descriptor()
// attachment.DefaultArchived holds the default value on creation for the archived field.
attachment.DefaultArchived = attachmentDescArchived.Default.(bool)
// attachmentDescArchivedAt is the schema descriptor for archivedAt field.
attachmentDescArchivedAt := attachmentFields[13].Descriptor()
// attachment.DefaultArchivedAt holds the default value on creation for the archivedAt field.
attachment.DefaultArchivedAt = attachmentDescArchivedAt.Default.(int64)
// attachmentDescDeleted is the schema descriptor for deleted field.
attachmentDescDeleted := attachmentFields[14].Descriptor()
// attachment.DefaultDeleted holds the default value on creation for the deleted field.
attachment.DefaultDeleted = attachmentDescDeleted.Default.(bool)
// attachmentDescDeletedAt is the schema descriptor for deletedAt field.
attachmentDescDeletedAt := attachmentFields[15].Descriptor()
// attachment.DefaultDeletedAt holds the default value on creation for the deletedAt field.
attachment.DefaultDeletedAt = attachmentDescDeletedAt.Default.(int64)
// attachmentDescDeletedBy is the schema descriptor for deletedBy field.
attachmentDescDeletedBy := attachmentFields[16].Descriptor()
// attachment.DefaultDeletedBy holds the default value on creation for the deletedBy field.
attachment.DefaultDeletedBy = attachmentDescDeletedBy.Default.(string)
// attachment.DeletedByValidator is a validator for the "deletedBy" field. It is called by the builders before save.
attachment.DeletedByValidator = attachmentDescDeletedBy.Validators[0].(func(string) error)
// attachmentDescID is the schema descriptor for id field.
attachmentDescID := attachmentFields[0].Descriptor()
// attachment.IDValidator is a validator for the "id" field. It is called by the builders before save.
@@ -947,22 +993,28 @@ func init() {
producttype.DefaultCategory = producttypeDescCategory.Default.(string)
// producttype.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
producttype.CategoryValidator = producttypeDescCategory.Validators[0].(func(string) error)
// producttypeDescRemark is the schema descriptor for remark field.
producttypeDescRemark := producttypeFields[4].Descriptor()
// producttype.DefaultRemark holds the default value on creation for the remark field.
producttype.DefaultRemark = producttypeDescRemark.Default.(string)
// producttype.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
producttype.RemarkValidator = producttypeDescRemark.Validators[0].(func(string) error)
// producttypeDescSpec is the schema descriptor for spec field.
producttypeDescSpec := producttypeFields[4].Descriptor()
// producttype.DefaultSpec holds the default value on creation for the spec field.
producttype.DefaultSpec = producttypeDescSpec.Default.(string)
// producttype.SpecValidator is a validator for the "spec" field. It is called by the builders before save.
producttype.SpecValidator = producttypeDescSpec.Validators[0].(func(string) error)
// producttypeDescUnit is the schema descriptor for unit field.
producttypeDescUnit := producttypeFields[5].Descriptor()
// producttype.DefaultUnit holds the default value on creation for the unit field.
producttype.DefaultUnit = producttypeDescUnit.Default.(string)
// producttype.UnitValidator is a validator for the "unit" field. It is called by the builders before save.
producttype.UnitValidator = producttypeDescUnit.Validators[0].(func(string) error)
// producttypeDescIsActive is the schema descriptor for isActive field.
producttypeDescIsActive := producttypeFields[5].Descriptor()
producttypeDescIsActive := producttypeFields[6].Descriptor()
// producttype.DefaultIsActive holds the default value on creation for the isActive field.
producttype.DefaultIsActive = producttypeDescIsActive.Default.(bool)
// producttypeDescCreatedAt is the schema descriptor for createdAt field.
producttypeDescCreatedAt := producttypeFields[6].Descriptor()
producttypeDescCreatedAt := producttypeFields[7].Descriptor()
// producttype.DefaultCreatedAt holds the default value on creation for the createdAt field.
producttype.DefaultCreatedAt = producttypeDescCreatedAt.Default.(func() time.Time)
// producttypeDescUpdatedAt is the schema descriptor for updatedAt field.
producttypeDescUpdatedAt := producttypeFields[7].Descriptor()
producttypeDescUpdatedAt := producttypeFields[8].Descriptor()
// producttype.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
producttype.DefaultUpdatedAt = producttypeDescUpdatedAt.Default.(func() time.Time)
// producttype.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.