feat: 新增检测单关联、基础数据优化与入库单升级

1. 新增出库单检测单号字段并添加索引支持溯源
2. 优化基础数据页面物料类型展示与选择逻辑
3. 升级入库单导入功能,支持自动生成单号并返回导入结果
4. 优化接驳台查询排序方式
5. 修复字符串拼接空格问题
This commit is contained in:
SunYF
2026-09-21 15:28:14 +08:00
parent 0e769f3813
commit 12ca493c61
70 changed files with 25782 additions and 119 deletions
+78
View File
@@ -355,6 +355,20 @@ func (_c *OutboundOrderCreate) SetNillableContractNo(v *string) *OutboundOrderCr
return _c
}
// SetInspectionNo sets the "inspection_no" field.
func (_c *OutboundOrderCreate) SetInspectionNo(v string) *OutboundOrderCreate {
_c.mutation.SetInspectionNo(v)
return _c
}
// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil.
func (_c *OutboundOrderCreate) SetNillableInspectionNo(v *string) *OutboundOrderCreate {
if v != nil {
_c.SetInspectionNo(*v)
}
return _c
}
// SetCreatedAt sets the "created_at" field.
func (_c *OutboundOrderCreate) SetCreatedAt(v int64) *OutboundOrderCreate {
_c.mutation.SetCreatedAt(v)
@@ -583,6 +597,10 @@ func (_c *OutboundOrderCreate) createSpec() (*OutboundOrder, *sqlgraph.CreateSpe
_spec.SetField(outboundorder.FieldContractNo, field.TypeString, value)
_node.ContractNo = value
}
if value, ok := _c.mutation.InspectionNo(); ok {
_spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value)
_node.InspectionNo = value
}
if value, ok := _c.mutation.CreatedAt(); ok {
_spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value)
_node.CreatedAt = value
@@ -1059,6 +1077,24 @@ func (u *OutboundOrderUpsert) ClearContractNo() *OutboundOrderUpsert {
return u
}
// SetInspectionNo sets the "inspection_no" field.
func (u *OutboundOrderUpsert) SetInspectionNo(v string) *OutboundOrderUpsert {
u.Set(outboundorder.FieldInspectionNo, v)
return u
}
// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create.
func (u *OutboundOrderUpsert) UpdateInspectionNo() *OutboundOrderUpsert {
u.SetExcluded(outboundorder.FieldInspectionNo)
return u
}
// ClearInspectionNo clears the value of the "inspection_no" field.
func (u *OutboundOrderUpsert) ClearInspectionNo() *OutboundOrderUpsert {
u.SetNull(outboundorder.FieldInspectionNo)
return u
}
// SetCreatedAt sets the "created_at" field.
func (u *OutboundOrderUpsert) SetCreatedAt(v int64) *OutboundOrderUpsert {
u.Set(outboundorder.FieldCreatedAt, v)
@@ -1607,6 +1643,27 @@ func (u *OutboundOrderUpsertOne) ClearContractNo() *OutboundOrderUpsertOne {
})
}
// SetInspectionNo sets the "inspection_no" field.
func (u *OutboundOrderUpsertOne) SetInspectionNo(v string) *OutboundOrderUpsertOne {
return u.Update(func(s *OutboundOrderUpsert) {
s.SetInspectionNo(v)
})
}
// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create.
func (u *OutboundOrderUpsertOne) UpdateInspectionNo() *OutboundOrderUpsertOne {
return u.Update(func(s *OutboundOrderUpsert) {
s.UpdateInspectionNo()
})
}
// ClearInspectionNo clears the value of the "inspection_no" field.
func (u *OutboundOrderUpsertOne) ClearInspectionNo() *OutboundOrderUpsertOne {
return u.Update(func(s *OutboundOrderUpsert) {
s.ClearInspectionNo()
})
}
// SetCreatedAt sets the "created_at" field.
func (u *OutboundOrderUpsertOne) SetCreatedAt(v int64) *OutboundOrderUpsertOne {
return u.Update(func(s *OutboundOrderUpsert) {
@@ -2322,6 +2379,27 @@ func (u *OutboundOrderUpsertBulk) ClearContractNo() *OutboundOrderUpsertBulk {
})
}
// SetInspectionNo sets the "inspection_no" field.
func (u *OutboundOrderUpsertBulk) SetInspectionNo(v string) *OutboundOrderUpsertBulk {
return u.Update(func(s *OutboundOrderUpsert) {
s.SetInspectionNo(v)
})
}
// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create.
func (u *OutboundOrderUpsertBulk) UpdateInspectionNo() *OutboundOrderUpsertBulk {
return u.Update(func(s *OutboundOrderUpsert) {
s.UpdateInspectionNo()
})
}
// ClearInspectionNo clears the value of the "inspection_no" field.
func (u *OutboundOrderUpsertBulk) ClearInspectionNo() *OutboundOrderUpsertBulk {
return u.Update(func(s *OutboundOrderUpsert) {
s.ClearInspectionNo()
})
}
// SetCreatedAt sets the "created_at" field.
func (u *OutboundOrderUpsertBulk) SetCreatedAt(v int64) *OutboundOrderUpsertBulk {
return u.Update(func(s *OutboundOrderUpsert) {