feat&refactor: 2026-09-22 半成品业务模型重构与功能完善

- 重构半成品流转逻辑:进度权威源改为 workpiece.currentStationNo,新增 completedText 快照字段,废除 doneProcessCodes
- 清理物料品类中半成品类型,存量数据幂等清理,调整物料管理方式文案为批次/序列号
- 新增日排产状态专用更新接口,修复工单工艺校验逻辑
- 新增物料档案代理接口、深路径文件下载接口
- 优化前端界面文案与工位选择逻辑,补充追溯页半成品流转展示
- 调整WMS端物料品类校验与入库接口契约
- 新增/更新数据库表结构与实体类代码
This commit is contained in:
SunYF
2026-09-22 14:42:52 +08:00
parent 09cfc6ca1c
commit d3eda6b588
49 changed files with 1155 additions and 1122 deletions
+13 -13
View File
@@ -1,16 +1,16 @@
// Code generated by ent, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package enttest
import (
"context"
"bj_power_wms"
"bj_power_wms/ent"
"bj_power_wms/ent/migrate"
// required by schema hooks.
_ "bj_power_wms/runtime"
"bj_power_wms/migrate"
"entgo.io/ent/dialect/sql/schema"
)
@@ -26,13 +26,13 @@ type (
Option func(*options)
options struct {
opts []bj_power_wms.Option
opts []ent.Option
migrateOpts []schema.MigrateOption
}
)
// WithOptions forwards options to client creation.
func WithOptions(opts ...bj_power_wms.Option) Option {
func WithOptions(opts ...ent.Option) Option {
return func(o *options) {
o.opts = append(o.opts, opts...)
}
@@ -53,10 +53,10 @@ func newOptions(opts []Option) *options {
return o
}
// Open calls bj_power_wms.Open and auto-run migration.
func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *bj_power_wms.Client {
// Open calls ent.Open and auto-run migration.
func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *ent.Client {
o := newOptions(opts)
c, err := bj_power_wms.Open(driverName, dataSourceName, o.opts...)
c, err := ent.Open(driverName, dataSourceName, o.opts...)
if err != nil {
t.Error(err)
t.FailNow()
@@ -65,14 +65,14 @@ func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *bj_pow
return c
}
// NewClient calls bj_power_wms.NewClient and auto-run migration.
func NewClient(t TestingT, opts ...Option) *bj_power_wms.Client {
// NewClient calls ent.NewClient and auto-run migration.
func NewClient(t TestingT, opts ...Option) *ent.Client {
o := newOptions(opts)
c := bj_power_wms.NewClient(o.opts...)
c := ent.NewClient(o.opts...)
migrateSchema(t, c, o)
return c
}
func migrateSchema(t TestingT, c *bj_power_wms.Client, o *options) {
func migrateSchema(t TestingT, c *ent.Client, o *options) {
tables, err := schema.CopyTables(migrate.Tables)
if err != nil {
t.Error(err)