feat: 完成客户第12条需求+多系统改造
1. 新增预警表添加工单号字段,支持按工单号检索预警 2. 添加工单过滤在制品/绩效报表/预警中心查询 3. 补全WMS台账字段口径与权限配置 4. 修复备料单与数量不符处理流程 5. 新增配送进度/库位联动/自动出库功能 6. 修复AGV配送状态更新逻辑 7. 优化退料与库存管理细节
This commit is contained in:
@@ -41,6 +41,34 @@ func (_c *OutboundOrderCreate) SetNillableOutboundType(v *string) *OutboundOrder
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_c *OutboundOrderCreate) SetStatus(v string) *OutboundOrderCreate {
|
||||
_c.mutation.SetStatus(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableStatus sets the "status" field if the given value is not nil.
|
||||
func (_c *OutboundOrderCreate) SetNillableStatus(v *string) *OutboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetStatus(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNeedAgv sets the "need_agv" field.
|
||||
func (_c *OutboundOrderCreate) SetNeedAgv(v bool) *OutboundOrderCreate {
|
||||
_c.mutation.SetNeedAgv(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableNeedAgv sets the "need_agv" field if the given value is not nil.
|
||||
func (_c *OutboundOrderCreate) SetNillableNeedAgv(v *bool) *OutboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetNeedAgv(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOutboundCategory sets the "outbound_category" field.
|
||||
func (_c *OutboundOrderCreate) SetOutboundCategory(v string) *OutboundOrderCreate {
|
||||
_c.mutation.SetOutboundCategory(v)
|
||||
@@ -173,6 +201,48 @@ func (_c *OutboundOrderCreate) SetNillableZoneCode(v *string) *OutboundOrderCrea
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (_c *OutboundOrderCreate) SetShelfNo(v string) *OutboundOrderCreate {
|
||||
_c.mutation.SetShelfNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
|
||||
func (_c *OutboundOrderCreate) SetNillableShelfNo(v *string) *OutboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetShelfNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (_c *OutboundOrderCreate) SetLayerNo(v string) *OutboundOrderCreate {
|
||||
_c.mutation.SetLayerNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
|
||||
func (_c *OutboundOrderCreate) SetNillableLayerNo(v *string) *OutboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetLayerNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (_c *OutboundOrderCreate) SetPositionNo(v string) *OutboundOrderCreate {
|
||||
_c.mutation.SetPositionNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
|
||||
func (_c *OutboundOrderCreate) SetNillablePositionNo(v *string) *OutboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetPositionNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetQuantity sets the "quantity" field.
|
||||
func (_c *OutboundOrderCreate) SetQuantity(v int) *OutboundOrderCreate {
|
||||
_c.mutation.SetQuantity(v)
|
||||
@@ -338,6 +408,14 @@ func (_c *OutboundOrderCreate) defaults() {
|
||||
v := outboundorder.DefaultOutboundType
|
||||
_c.mutation.SetOutboundType(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Status(); !ok {
|
||||
v := outboundorder.DefaultStatus
|
||||
_c.mutation.SetStatus(v)
|
||||
}
|
||||
if _, ok := _c.mutation.NeedAgv(); !ok {
|
||||
v := outboundorder.DefaultNeedAgv
|
||||
_c.mutation.SetNeedAgv(v)
|
||||
}
|
||||
if _, ok := _c.mutation.ManageMode(); !ok {
|
||||
v := outboundorder.DefaultManageMode
|
||||
_c.mutation.SetManageMode(v)
|
||||
@@ -360,6 +438,12 @@ func (_c *OutboundOrderCreate) check() error {
|
||||
if _, ok := _c.mutation.OutboundType(); !ok {
|
||||
return &ValidationError{Name: "outbound_type", err: errors.New(`ent: missing required field "OutboundOrder.outbound_type"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.Status(); !ok {
|
||||
return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "OutboundOrder.status"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.NeedAgv(); !ok {
|
||||
return &ValidationError{Name: "need_agv", err: errors.New(`ent: missing required field "OutboundOrder.need_agv"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.MaterialCode(); !ok {
|
||||
return &ValidationError{Name: "material_code", err: errors.New(`ent: missing required field "OutboundOrder.material_code"`)}
|
||||
}
|
||||
@@ -407,6 +491,14 @@ func (_c *OutboundOrderCreate) createSpec() (*OutboundOrder, *sqlgraph.CreateSpe
|
||||
_spec.SetField(outboundorder.FieldOutboundType, field.TypeString, value)
|
||||
_node.OutboundType = value
|
||||
}
|
||||
if value, ok := _c.mutation.Status(); ok {
|
||||
_spec.SetField(outboundorder.FieldStatus, field.TypeString, value)
|
||||
_node.Status = value
|
||||
}
|
||||
if value, ok := _c.mutation.NeedAgv(); ok {
|
||||
_spec.SetField(outboundorder.FieldNeedAgv, field.TypeBool, value)
|
||||
_node.NeedAgv = value
|
||||
}
|
||||
if value, ok := _c.mutation.OutboundCategory(); ok {
|
||||
_spec.SetField(outboundorder.FieldOutboundCategory, field.TypeString, value)
|
||||
_node.OutboundCategory = value
|
||||
@@ -447,6 +539,18 @@ func (_c *OutboundOrderCreate) createSpec() (*OutboundOrder, *sqlgraph.CreateSpe
|
||||
_spec.SetField(outboundorder.FieldZoneCode, field.TypeString, value)
|
||||
_node.ZoneCode = value
|
||||
}
|
||||
if value, ok := _c.mutation.ShelfNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldShelfNo, field.TypeString, value)
|
||||
_node.ShelfNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.LayerNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldLayerNo, field.TypeString, value)
|
||||
_node.LayerNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.PositionNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldPositionNo, field.TypeString, value)
|
||||
_node.PositionNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.Quantity(); ok {
|
||||
_spec.SetField(outboundorder.FieldQuantity, field.TypeInt, value)
|
||||
_node.Quantity = value
|
||||
@@ -559,6 +663,30 @@ func (u *OutboundOrderUpsert) UpdateOutboundType() *OutboundOrderUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *OutboundOrderUpsert) SetStatus(v string) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldStatus, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateStatus sets the "status" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsert) UpdateStatus() *OutboundOrderUpsert {
|
||||
u.SetExcluded(outboundorder.FieldStatus)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetNeedAgv sets the "need_agv" field.
|
||||
func (u *OutboundOrderUpsert) SetNeedAgv(v bool) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldNeedAgv, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateNeedAgv sets the "need_agv" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsert) UpdateNeedAgv() *OutboundOrderUpsert {
|
||||
u.SetExcluded(outboundorder.FieldNeedAgv)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOutboundCategory sets the "outbound_category" field.
|
||||
func (u *OutboundOrderUpsert) SetOutboundCategory(v string) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldOutboundCategory, v)
|
||||
@@ -733,6 +861,60 @@ func (u *OutboundOrderUpsert) ClearZoneCode() *OutboundOrderUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsert) SetShelfNo(v string) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldShelfNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsert) UpdateShelfNo() *OutboundOrderUpsert {
|
||||
u.SetExcluded(outboundorder.FieldShelfNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsert) ClearShelfNo() *OutboundOrderUpsert {
|
||||
u.SetNull(outboundorder.FieldShelfNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *OutboundOrderUpsert) SetLayerNo(v string) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldLayerNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsert) UpdateLayerNo() *OutboundOrderUpsert {
|
||||
u.SetExcluded(outboundorder.FieldLayerNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *OutboundOrderUpsert) ClearLayerNo() *OutboundOrderUpsert {
|
||||
u.SetNull(outboundorder.FieldLayerNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *OutboundOrderUpsert) SetPositionNo(v string) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldPositionNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsert) UpdatePositionNo() *OutboundOrderUpsert {
|
||||
u.SetExcluded(outboundorder.FieldPositionNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *OutboundOrderUpsert) ClearPositionNo() *OutboundOrderUpsert {
|
||||
u.SetNull(outboundorder.FieldPositionNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetQuantity sets the "quantity" field.
|
||||
func (u *OutboundOrderUpsert) SetQuantity(v int) *OutboundOrderUpsert {
|
||||
u.Set(outboundorder.FieldQuantity, v)
|
||||
@@ -963,6 +1145,34 @@ func (u *OutboundOrderUpsertOne) UpdateOutboundType() *OutboundOrderUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *OutboundOrderUpsertOne) SetStatus(v string) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetStatus(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateStatus sets the "status" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertOne) UpdateStatus() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// SetNeedAgv sets the "need_agv" field.
|
||||
func (u *OutboundOrderUpsertOne) SetNeedAgv(v bool) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetNeedAgv(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateNeedAgv sets the "need_agv" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertOne) UpdateNeedAgv() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateNeedAgv()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOutboundCategory sets the "outbound_category" field.
|
||||
func (u *OutboundOrderUpsertOne) SetOutboundCategory(v string) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
@@ -1166,6 +1376,69 @@ func (u *OutboundOrderUpsertOne) ClearZoneCode() *OutboundOrderUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsertOne) SetShelfNo(v string) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetShelfNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertOne) UpdateShelfNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsertOne) ClearShelfNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *OutboundOrderUpsertOne) SetLayerNo(v string) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetLayerNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertOne) UpdateLayerNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *OutboundOrderUpsertOne) ClearLayerNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *OutboundOrderUpsertOne) SetPositionNo(v string) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetPositionNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertOne) UpdatePositionNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdatePositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *OutboundOrderUpsertOne) ClearPositionNo() *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearPositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetQuantity sets the "quantity" field.
|
||||
func (u *OutboundOrderUpsertOne) SetQuantity(v int) *OutboundOrderUpsertOne {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
@@ -1587,6 +1860,34 @@ func (u *OutboundOrderUpsertBulk) UpdateOutboundType() *OutboundOrderUpsertBulk
|
||||
})
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetStatus(v string) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetStatus(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateStatus sets the "status" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertBulk) UpdateStatus() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// SetNeedAgv sets the "need_agv" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetNeedAgv(v bool) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetNeedAgv(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateNeedAgv sets the "need_agv" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertBulk) UpdateNeedAgv() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateNeedAgv()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOutboundCategory sets the "outbound_category" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetOutboundCategory(v string) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
@@ -1790,6 +2091,69 @@ func (u *OutboundOrderUpsertBulk) ClearZoneCode() *OutboundOrderUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetShelfNo(v string) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetShelfNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertBulk) UpdateShelfNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) ClearShelfNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetLayerNo(v string) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetLayerNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertBulk) UpdateLayerNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdateLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) ClearLayerNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetPositionNo(v string) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.SetPositionNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *OutboundOrderUpsertBulk) UpdatePositionNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.UpdatePositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *OutboundOrderUpsertBulk) ClearPositionNo() *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
s.ClearPositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetQuantity sets the "quantity" field.
|
||||
func (u *OutboundOrderUpsertBulk) SetQuantity(v int) *OutboundOrderUpsertBulk {
|
||||
return u.Update(func(s *OutboundOrderUpsert) {
|
||||
|
||||
Reference in New Issue
Block a user