feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -18,7 +18,7 @@ type InboundOrder struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
// 入库单号
|
||||
InboundNo string `json:"inboundNo,omitempty"`
|
||||
// 入库类型
|
||||
// 入库类型 purchase/semi/finished/return/other
|
||||
InboundType string `json:"inboundType,omitempty"`
|
||||
// 物料编码
|
||||
MaterialCode string `json:"materialCode,omitempty"`
|
||||
@@ -38,6 +38,10 @@ type InboundOrder struct {
|
||||
Remark string `json:"remark,omitempty"`
|
||||
// 检测单号(入库检报告单号)
|
||||
InspectionNo string `json:"inspectionNo,omitempty"`
|
||||
// 归属类型 workorder/project/none
|
||||
OwnershipType string `json:"ownershipType,omitempty"`
|
||||
// 归属编号(工单号/科技项目号)
|
||||
OwnershipNo string `json:"ownershipNo,omitempty"`
|
||||
// 创建时间
|
||||
CreatedAt int64 `json:"createdAt,omitempty"`
|
||||
selectValues sql.SelectValues
|
||||
@@ -50,7 +54,7 @@ func (*InboundOrder) scanValues(columns []string) ([]any, error) {
|
||||
switch columns[i] {
|
||||
case inboundorder.FieldID, inboundorder.FieldManageMode, inboundorder.FieldQuantity, inboundorder.FieldCreatedAt:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case inboundorder.FieldInboundNo, inboundorder.FieldInboundType, inboundorder.FieldMaterialCode, inboundorder.FieldMaterialName, inboundorder.FieldBatchNo, inboundorder.FieldZoneCode, inboundorder.FieldOperator, inboundorder.FieldRemark, inboundorder.FieldInspectionNo:
|
||||
case inboundorder.FieldInboundNo, inboundorder.FieldInboundType, inboundorder.FieldMaterialCode, inboundorder.FieldMaterialName, inboundorder.FieldBatchNo, inboundorder.FieldZoneCode, inboundorder.FieldOperator, inboundorder.FieldRemark, inboundorder.FieldInspectionNo, inboundorder.FieldOwnershipType, inboundorder.FieldOwnershipNo:
|
||||
values[i] = new(sql.NullString)
|
||||
default:
|
||||
values[i] = new(sql.UnknownType)
|
||||
@@ -139,6 +143,18 @@ func (_m *InboundOrder) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.InspectionNo = value.String
|
||||
}
|
||||
case inboundorder.FieldOwnershipType:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field ownership_type", values[i])
|
||||
} else if value.Valid {
|
||||
_m.OwnershipType = value.String
|
||||
}
|
||||
case inboundorder.FieldOwnershipNo:
|
||||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field ownership_no", values[i])
|
||||
} else if value.Valid {
|
||||
_m.OwnershipNo = value.String
|
||||
}
|
||||
case inboundorder.FieldCreatedAt:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
||||
@@ -214,6 +230,12 @@ func (_m *InboundOrder) String() string {
|
||||
builder.WriteString("inspection_no=")
|
||||
builder.WriteString(_m.InspectionNo)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("ownership_type=")
|
||||
builder.WriteString(_m.OwnershipType)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("ownership_no=")
|
||||
builder.WriteString(_m.OwnershipNo)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("created_at=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.CreatedAt))
|
||||
builder.WriteByte(')')
|
||||
|
||||
Reference in New Issue
Block a user