refactor: 重构产线工位与备料流程,移除冗余字段

1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段
2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据
3. 重构日排产为工位产量分配模式,替代原接驳台列表
4. 新增备料单工位级字段与分批出库支持
5. 移除定时同步可生产数量,改为WMS实时拉取接口
6. 过滤操作日志,排除登录/退出相关日志
7. 调整仪表盘工序展示逻辑为今日派工路线
8. 新增接驳台维护菜单与基础数据
This commit is contained in:
SunYF
2026-09-19 07:50:21 +08:00
parent 543655d441
commit 37f10d3a13
156 changed files with 4489 additions and 1285 deletions
+20 -43
View File
@@ -12,7 +12,6 @@ import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/dialect/sql/sqljson"
"entgo.io/ent/schema/field"
)
@@ -100,21 +99,15 @@ func (_u *DailyPlanUpdate) AddCompletedQty(v int) *DailyPlanUpdate {
return _u
}
// SetDockCodes sets the "dockCodes" field.
func (_u *DailyPlanUpdate) SetDockCodes(v []string) *DailyPlanUpdate {
_u.mutation.SetDockCodes(v)
// SetStationPlanQty sets the "stationPlanQty" field.
func (_u *DailyPlanUpdate) SetStationPlanQty(v map[string]int) *DailyPlanUpdate {
_u.mutation.SetStationPlanQty(v)
return _u
}
// AppendDockCodes appends value to the "dockCodes" field.
func (_u *DailyPlanUpdate) AppendDockCodes(v []string) *DailyPlanUpdate {
_u.mutation.AppendDockCodes(v)
return _u
}
// ClearDockCodes clears the value of the "dockCodes" field.
func (_u *DailyPlanUpdate) ClearDockCodes() *DailyPlanUpdate {
_u.mutation.ClearDockCodes()
// ClearStationPlanQty clears the value of the "stationPlanQty" field.
func (_u *DailyPlanUpdate) ClearStationPlanQty() *DailyPlanUpdate {
_u.mutation.ClearStationPlanQty()
return _u
}
@@ -260,16 +253,11 @@ func (_u *DailyPlanUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if value, ok := _u.mutation.AddedCompletedQty(); ok {
_spec.AddField(dailyplan.FieldCompletedQty, field.TypeInt, value)
}
if value, ok := _u.mutation.DockCodes(); ok {
_spec.SetField(dailyplan.FieldDockCodes, field.TypeJSON, value)
if value, ok := _u.mutation.StationPlanQty(); ok {
_spec.SetField(dailyplan.FieldStationPlanQty, field.TypeJSON, value)
}
if value, ok := _u.mutation.AppendedDockCodes(); ok {
_spec.AddModifier(func(u *sql.UpdateBuilder) {
sqljson.Append(u, dailyplan.FieldDockCodes, value)
})
}
if _u.mutation.DockCodesCleared() {
_spec.ClearField(dailyplan.FieldDockCodes, field.TypeJSON)
if _u.mutation.StationPlanQtyCleared() {
_spec.ClearField(dailyplan.FieldStationPlanQty, field.TypeJSON)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(dailyplan.FieldStatus, field.TypeString, value)
@@ -375,21 +363,15 @@ func (_u *DailyPlanUpdateOne) AddCompletedQty(v int) *DailyPlanUpdateOne {
return _u
}
// SetDockCodes sets the "dockCodes" field.
func (_u *DailyPlanUpdateOne) SetDockCodes(v []string) *DailyPlanUpdateOne {
_u.mutation.SetDockCodes(v)
// SetStationPlanQty sets the "stationPlanQty" field.
func (_u *DailyPlanUpdateOne) SetStationPlanQty(v map[string]int) *DailyPlanUpdateOne {
_u.mutation.SetStationPlanQty(v)
return _u
}
// AppendDockCodes appends value to the "dockCodes" field.
func (_u *DailyPlanUpdateOne) AppendDockCodes(v []string) *DailyPlanUpdateOne {
_u.mutation.AppendDockCodes(v)
return _u
}
// ClearDockCodes clears the value of the "dockCodes" field.
func (_u *DailyPlanUpdateOne) ClearDockCodes() *DailyPlanUpdateOne {
_u.mutation.ClearDockCodes()
// ClearStationPlanQty clears the value of the "stationPlanQty" field.
func (_u *DailyPlanUpdateOne) ClearStationPlanQty() *DailyPlanUpdateOne {
_u.mutation.ClearStationPlanQty()
return _u
}
@@ -565,16 +547,11 @@ func (_u *DailyPlanUpdateOne) sqlSave(ctx context.Context) (_node *DailyPlan, er
if value, ok := _u.mutation.AddedCompletedQty(); ok {
_spec.AddField(dailyplan.FieldCompletedQty, field.TypeInt, value)
}
if value, ok := _u.mutation.DockCodes(); ok {
_spec.SetField(dailyplan.FieldDockCodes, field.TypeJSON, value)
if value, ok := _u.mutation.StationPlanQty(); ok {
_spec.SetField(dailyplan.FieldStationPlanQty, field.TypeJSON, value)
}
if value, ok := _u.mutation.AppendedDockCodes(); ok {
_spec.AddModifier(func(u *sql.UpdateBuilder) {
sqljson.Append(u, dailyplan.FieldDockCodes, value)
})
}
if _u.mutation.DockCodesCleared() {
_spec.ClearField(dailyplan.FieldDockCodes, field.TypeJSON)
if _u.mutation.StationPlanQtyCleared() {
_spec.ClearField(dailyplan.FieldStationPlanQty, field.TypeJSON)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(dailyplan.FieldStatus, field.TypeString, value)