feat: 新增检测单关联、基础数据优化与入库单升级
1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题
This commit is contained in:
@@ -499,6 +499,26 @@ func (_u *OutboundOrderUpdate) ClearContractNo() *OutboundOrderUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetInspectionNo sets the "inspection_no" field.
|
||||
func (_u *OutboundOrderUpdate) SetInspectionNo(v string) *OutboundOrderUpdate {
|
||||
_u.mutation.SetInspectionNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil.
|
||||
func (_u *OutboundOrderUpdate) SetNillableInspectionNo(v *string) *OutboundOrderUpdate {
|
||||
if v != nil {
|
||||
_u.SetInspectionNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearInspectionNo clears the value of the "inspection_no" field.
|
||||
func (_u *OutboundOrderUpdate) ClearInspectionNo() *OutboundOrderUpdate {
|
||||
_u.mutation.ClearInspectionNo()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *OutboundOrderUpdate) SetCreatedAt(v int64) *OutboundOrderUpdate {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -696,6 +716,12 @@ func (_u *OutboundOrderUpdate) sqlSave(ctx context.Context) (_node int, err erro
|
||||
if _u.mutation.ContractNoCleared() {
|
||||
_spec.ClearField(outboundorder.FieldContractNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.InspectionNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.InspectionNoCleared() {
|
||||
_spec.ClearField(outboundorder.FieldInspectionNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
@@ -1194,6 +1220,26 @@ func (_u *OutboundOrderUpdateOne) ClearContractNo() *OutboundOrderUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetInspectionNo sets the "inspection_no" field.
|
||||
func (_u *OutboundOrderUpdateOne) SetInspectionNo(v string) *OutboundOrderUpdateOne {
|
||||
_u.mutation.SetInspectionNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil.
|
||||
func (_u *OutboundOrderUpdateOne) SetNillableInspectionNo(v *string) *OutboundOrderUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetInspectionNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearInspectionNo clears the value of the "inspection_no" field.
|
||||
func (_u *OutboundOrderUpdateOne) ClearInspectionNo() *OutboundOrderUpdateOne {
|
||||
_u.mutation.ClearInspectionNo()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *OutboundOrderUpdateOne) SetCreatedAt(v int64) *OutboundOrderUpdateOne {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -1421,6 +1467,12 @@ func (_u *OutboundOrderUpdateOne) sqlSave(ctx context.Context) (_node *OutboundO
|
||||
if _u.mutation.ContractNoCleared() {
|
||||
_spec.ClearField(outboundorder.FieldContractNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.InspectionNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.InspectionNoCleared() {
|
||||
_spec.ClearField(outboundorder.FieldInspectionNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user