feat: 大屏多订单改为同屏并列展示,物料申请新增跨工位借料来源并移除工单完成日期
This commit is contained in:
@@ -4,6 +4,7 @@ package ent
|
||||
|
||||
import (
|
||||
"bj_power_wms/ent/outboundorder"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -68,6 +69,8 @@ type OutboundOrder struct {
|
||||
BoxSnList string `json:"boxSnList,omitempty"`
|
||||
// 合同号(装箱选填)
|
||||
ContractNo string `json:"contractNo,omitempty"`
|
||||
// 跨工位借料来源 stationNo→借用量(call 备料出库专用);空=本工位自取
|
||||
BorrowFrom map[string]int `json:"borrowFrom,omitempty"`
|
||||
// 检测单号(溯源关联检验单据)
|
||||
InspectionNo string `json:"inspectionNo,omitempty"`
|
||||
// 产品工号(随库存带入,出库记录展示/筛选)
|
||||
@@ -82,6 +85,8 @@ func (*OutboundOrder) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case outboundorder.FieldBorrowFrom:
|
||||
values[i] = new([]byte)
|
||||
case outboundorder.FieldNeedAgv:
|
||||
values[i] = new(sql.NullBool)
|
||||
case outboundorder.FieldID, outboundorder.FieldManageMode, outboundorder.FieldSnMode, outboundorder.FieldQuantity, outboundorder.FieldCreatedAt:
|
||||
@@ -265,6 +270,14 @@ func (_m *OutboundOrder) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.ContractNo = value.String
|
||||
}
|
||||
case outboundorder.FieldBorrowFrom:
|
||||
if value, ok := values[i].(*[]byte); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field borrowFrom", values[i])
|
||||
} else if value != nil && len(*value) > 0 {
|
||||
if err := json.Unmarshal(*value, &_m.BorrowFrom); err != nil {
|
||||
return fmt.Errorf("unmarshal field borrowFrom: %w", err)
|
||||
}
|
||||
}
|
||||
case outboundorder.FieldInspectionNo:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field inspection_no", values[i])
|
||||
@@ -397,6 +410,9 @@ func (_m *OutboundOrder) String() string {
|
||||
builder.WriteString("contract_no=")
|
||||
builder.WriteString(_m.ContractNo)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("borrowFrom=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.BorrowFrom))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("inspection_no=")
|
||||
builder.WriteString(_m.InspectionNo)
|
||||
builder.WriteString(", ")
|
||||
|
||||
Reference in New Issue
Block a user