refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
This commit is contained in:
@@ -26,8 +26,8 @@ type DailyPlan struct {
|
||||
PlanQty int `json:"planQty,omitempty"`
|
||||
// 已完成数量
|
||||
CompletedQty int `json:"completedQty,omitempty"`
|
||||
// 送达接驳台列表 DOCK01..20
|
||||
DockCodes []string `json:"dockCodes,omitempty"`
|
||||
// 各工位产量分配 stationNo→计划产量
|
||||
StationPlanQty map[string]int `json:"stationPlanQty,omitempty"`
|
||||
// Status holds the value of the "status" field.
|
||||
Status string `json:"status,omitempty"`
|
||||
// Operator holds the value of the "operator" field.
|
||||
@@ -44,7 +44,7 @@ func (*DailyPlan) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case dailyplan.FieldDockCodes:
|
||||
case dailyplan.FieldStationPlanQty:
|
||||
values[i] = new([]byte)
|
||||
case dailyplan.FieldID, dailyplan.FieldPlanQty, dailyplan.FieldCompletedQty:
|
||||
values[i] = new(sql.NullInt64)
|
||||
@@ -97,12 +97,12 @@ func (_m *DailyPlan) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.CompletedQty = int(value.Int64)
|
||||
}
|
||||
case dailyplan.FieldDockCodes:
|
||||
case dailyplan.FieldStationPlanQty:
|
||||
if value, ok := values[i].(*[]byte); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field dockCodes", values[i])
|
||||
return fmt.Errorf("unexpected type %T for field stationPlanQty", values[i])
|
||||
} else if value != nil && len(*value) > 0 {
|
||||
if err := json.Unmarshal(*value, &_m.DockCodes); err != nil {
|
||||
return fmt.Errorf("unmarshal field dockCodes: %w", err)
|
||||
if err := json.Unmarshal(*value, &_m.StationPlanQty); err != nil {
|
||||
return fmt.Errorf("unmarshal field stationPlanQty: %w", err)
|
||||
}
|
||||
}
|
||||
case dailyplan.FieldStatus:
|
||||
@@ -178,8 +178,8 @@ func (_m *DailyPlan) String() string {
|
||||
builder.WriteString("completedQty=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.CompletedQty))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("dockCodes=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.DockCodes))
|
||||
builder.WriteString("stationPlanQty=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.StationPlanQty))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("status=")
|
||||
builder.WriteString(_m.Status)
|
||||
|
||||
Reference in New Issue
Block a user