feat: 完成产线与仓储系统多模块迭代升级
本次迭代覆盖MES与WMS核心业务: 1. 新增接驳台托盘传感器读取与AGV对接能力 2. 完善工单排产、备料流程与权限体系拆分 3. 优化看板接口与前端路由、样式 4. 新增操作日志、库存盘点与角色保护逻辑 5. 修复代理地址、BOM保存等已知问题
This commit is contained in:
@@ -4,6 +4,7 @@ package ent
|
||||
|
||||
import (
|
||||
"bj_power_mes/ent/dailyplan"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -25,6 +26,8 @@ type DailyPlan struct {
|
||||
PlanQty int `json:"planQty,omitempty"`
|
||||
// 已完成数量
|
||||
CompletedQty int `json:"completedQty,omitempty"`
|
||||
// 送达接驳台列表 DOCK01..20
|
||||
DockCodes []string `json:"dockCodes,omitempty"`
|
||||
// Status holds the value of the "status" field.
|
||||
Status string `json:"status,omitempty"`
|
||||
// Operator holds the value of the "operator" field.
|
||||
@@ -41,6 +44,8 @@ func (*DailyPlan) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case dailyplan.FieldDockCodes:
|
||||
values[i] = new([]byte)
|
||||
case dailyplan.FieldID, dailyplan.FieldPlanQty, dailyplan.FieldCompletedQty:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case dailyplan.FieldOrderNo, dailyplan.FieldPlanDate, dailyplan.FieldStatus, dailyplan.FieldOperator:
|
||||
@@ -92,6 +97,14 @@ func (_m *DailyPlan) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.CompletedQty = int(value.Int64)
|
||||
}
|
||||
case dailyplan.FieldDockCodes:
|
||||
if value, ok := values[i].(*[]byte); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field dockCodes", 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)
|
||||
}
|
||||
}
|
||||
case dailyplan.FieldStatus:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field status", values[i])
|
||||
@@ -165,6 +178,9 @@ 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(", ")
|
||||
builder.WriteString("status=")
|
||||
builder.WriteString(_m.Status)
|
||||
builder.WriteString(", ")
|
||||
|
||||
Reference in New Issue
Block a user