feat: 完成客户第12条需求+多系统改造

1. 新增预警表添加工单号字段,支持按工单号检索预警
2. 添加工单过滤在制品/绩效报表/预警中心查询
3. 补全WMS台账字段口径与权限配置
4. 修复备料单与数量不符处理流程
5. 新增配送进度/库位联动/自动出库功能
6. 修复AGV配送状态更新逻辑
7. 优化退料与库存管理细节
This commit is contained in:
SunYF
2026-09-19 17:04:58 +08:00
parent 62e45b7379
commit 05b0b8a909
89 changed files with 7912 additions and 429 deletions
+224
View File
@@ -55,6 +55,34 @@ func (_u *OutboundOrderUpdate) SetNillableOutboundType(v *string) *OutboundOrder
return _u
}
// SetStatus sets the "status" field.
func (_u *OutboundOrderUpdate) SetStatus(v string) *OutboundOrderUpdate {
_u.mutation.SetStatus(v)
return _u
}
// SetNillableStatus sets the "status" field if the given value is not nil.
func (_u *OutboundOrderUpdate) SetNillableStatus(v *string) *OutboundOrderUpdate {
if v != nil {
_u.SetStatus(*v)
}
return _u
}
// SetNeedAgv sets the "need_agv" field.
func (_u *OutboundOrderUpdate) SetNeedAgv(v bool) *OutboundOrderUpdate {
_u.mutation.SetNeedAgv(v)
return _u
}
// SetNillableNeedAgv sets the "need_agv" field if the given value is not nil.
func (_u *OutboundOrderUpdate) SetNillableNeedAgv(v *bool) *OutboundOrderUpdate {
if v != nil {
_u.SetNeedAgv(*v)
}
return _u
}
// SetOutboundCategory sets the "outbound_category" field.
func (_u *OutboundOrderUpdate) SetOutboundCategory(v string) *OutboundOrderUpdate {
_u.mutation.SetOutboundCategory(v)
@@ -250,6 +278,66 @@ func (_u *OutboundOrderUpdate) ClearZoneCode() *OutboundOrderUpdate {
return _u
}
// SetShelfNo sets the "shelf_no" field.
func (_u *OutboundOrderUpdate) SetShelfNo(v string) *OutboundOrderUpdate {
_u.mutation.SetShelfNo(v)
return _u
}
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
func (_u *OutboundOrderUpdate) SetNillableShelfNo(v *string) *OutboundOrderUpdate {
if v != nil {
_u.SetShelfNo(*v)
}
return _u
}
// ClearShelfNo clears the value of the "shelf_no" field.
func (_u *OutboundOrderUpdate) ClearShelfNo() *OutboundOrderUpdate {
_u.mutation.ClearShelfNo()
return _u
}
// SetLayerNo sets the "layer_no" field.
func (_u *OutboundOrderUpdate) SetLayerNo(v string) *OutboundOrderUpdate {
_u.mutation.SetLayerNo(v)
return _u
}
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
func (_u *OutboundOrderUpdate) SetNillableLayerNo(v *string) *OutboundOrderUpdate {
if v != nil {
_u.SetLayerNo(*v)
}
return _u
}
// ClearLayerNo clears the value of the "layer_no" field.
func (_u *OutboundOrderUpdate) ClearLayerNo() *OutboundOrderUpdate {
_u.mutation.ClearLayerNo()
return _u
}
// SetPositionNo sets the "position_no" field.
func (_u *OutboundOrderUpdate) SetPositionNo(v string) *OutboundOrderUpdate {
_u.mutation.SetPositionNo(v)
return _u
}
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
func (_u *OutboundOrderUpdate) SetNillablePositionNo(v *string) *OutboundOrderUpdate {
if v != nil {
_u.SetPositionNo(*v)
}
return _u
}
// ClearPositionNo clears the value of the "position_no" field.
func (_u *OutboundOrderUpdate) ClearPositionNo() *OutboundOrderUpdate {
_u.mutation.ClearPositionNo()
return _u
}
// SetQuantity sets the "quantity" field.
func (_u *OutboundOrderUpdate) SetQuantity(v int) *OutboundOrderUpdate {
_u.mutation.ResetQuantity()
@@ -479,6 +567,12 @@ func (_u *OutboundOrderUpdate) sqlSave(ctx context.Context) (_node int, err erro
if value, ok := _u.mutation.OutboundType(); ok {
_spec.SetField(outboundorder.FieldOutboundType, field.TypeString, value)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(outboundorder.FieldStatus, field.TypeString, value)
}
if value, ok := _u.mutation.NeedAgv(); ok {
_spec.SetField(outboundorder.FieldNeedAgv, field.TypeBool, value)
}
if value, ok := _u.mutation.OutboundCategory(); ok {
_spec.SetField(outboundorder.FieldOutboundCategory, field.TypeString, value)
}
@@ -536,6 +630,24 @@ func (_u *OutboundOrderUpdate) sqlSave(ctx context.Context) (_node int, err erro
if _u.mutation.ZoneCodeCleared() {
_spec.ClearField(outboundorder.FieldZoneCode, field.TypeString)
}
if value, ok := _u.mutation.ShelfNo(); ok {
_spec.SetField(outboundorder.FieldShelfNo, field.TypeString, value)
}
if _u.mutation.ShelfNoCleared() {
_spec.ClearField(outboundorder.FieldShelfNo, field.TypeString)
}
if value, ok := _u.mutation.LayerNo(); ok {
_spec.SetField(outboundorder.FieldLayerNo, field.TypeString, value)
}
if _u.mutation.LayerNoCleared() {
_spec.ClearField(outboundorder.FieldLayerNo, field.TypeString)
}
if value, ok := _u.mutation.PositionNo(); ok {
_spec.SetField(outboundorder.FieldPositionNo, field.TypeString, value)
}
if _u.mutation.PositionNoCleared() {
_spec.ClearField(outboundorder.FieldPositionNo, field.TypeString)
}
if value, ok := _u.mutation.Quantity(); ok {
_spec.SetField(outboundorder.FieldQuantity, field.TypeInt, value)
}
@@ -638,6 +750,34 @@ func (_u *OutboundOrderUpdateOne) SetNillableOutboundType(v *string) *OutboundOr
return _u
}
// SetStatus sets the "status" field.
func (_u *OutboundOrderUpdateOne) SetStatus(v string) *OutboundOrderUpdateOne {
_u.mutation.SetStatus(v)
return _u
}
// SetNillableStatus sets the "status" field if the given value is not nil.
func (_u *OutboundOrderUpdateOne) SetNillableStatus(v *string) *OutboundOrderUpdateOne {
if v != nil {
_u.SetStatus(*v)
}
return _u
}
// SetNeedAgv sets the "need_agv" field.
func (_u *OutboundOrderUpdateOne) SetNeedAgv(v bool) *OutboundOrderUpdateOne {
_u.mutation.SetNeedAgv(v)
return _u
}
// SetNillableNeedAgv sets the "need_agv" field if the given value is not nil.
func (_u *OutboundOrderUpdateOne) SetNillableNeedAgv(v *bool) *OutboundOrderUpdateOne {
if v != nil {
_u.SetNeedAgv(*v)
}
return _u
}
// SetOutboundCategory sets the "outbound_category" field.
func (_u *OutboundOrderUpdateOne) SetOutboundCategory(v string) *OutboundOrderUpdateOne {
_u.mutation.SetOutboundCategory(v)
@@ -833,6 +973,66 @@ func (_u *OutboundOrderUpdateOne) ClearZoneCode() *OutboundOrderUpdateOne {
return _u
}
// SetShelfNo sets the "shelf_no" field.
func (_u *OutboundOrderUpdateOne) SetShelfNo(v string) *OutboundOrderUpdateOne {
_u.mutation.SetShelfNo(v)
return _u
}
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
func (_u *OutboundOrderUpdateOne) SetNillableShelfNo(v *string) *OutboundOrderUpdateOne {
if v != nil {
_u.SetShelfNo(*v)
}
return _u
}
// ClearShelfNo clears the value of the "shelf_no" field.
func (_u *OutboundOrderUpdateOne) ClearShelfNo() *OutboundOrderUpdateOne {
_u.mutation.ClearShelfNo()
return _u
}
// SetLayerNo sets the "layer_no" field.
func (_u *OutboundOrderUpdateOne) SetLayerNo(v string) *OutboundOrderUpdateOne {
_u.mutation.SetLayerNo(v)
return _u
}
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
func (_u *OutboundOrderUpdateOne) SetNillableLayerNo(v *string) *OutboundOrderUpdateOne {
if v != nil {
_u.SetLayerNo(*v)
}
return _u
}
// ClearLayerNo clears the value of the "layer_no" field.
func (_u *OutboundOrderUpdateOne) ClearLayerNo() *OutboundOrderUpdateOne {
_u.mutation.ClearLayerNo()
return _u
}
// SetPositionNo sets the "position_no" field.
func (_u *OutboundOrderUpdateOne) SetPositionNo(v string) *OutboundOrderUpdateOne {
_u.mutation.SetPositionNo(v)
return _u
}
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
func (_u *OutboundOrderUpdateOne) SetNillablePositionNo(v *string) *OutboundOrderUpdateOne {
if v != nil {
_u.SetPositionNo(*v)
}
return _u
}
// ClearPositionNo clears the value of the "position_no" field.
func (_u *OutboundOrderUpdateOne) ClearPositionNo() *OutboundOrderUpdateOne {
_u.mutation.ClearPositionNo()
return _u
}
// SetQuantity sets the "quantity" field.
func (_u *OutboundOrderUpdateOne) SetQuantity(v int) *OutboundOrderUpdateOne {
_u.mutation.ResetQuantity()
@@ -1092,6 +1292,12 @@ func (_u *OutboundOrderUpdateOne) sqlSave(ctx context.Context) (_node *OutboundO
if value, ok := _u.mutation.OutboundType(); ok {
_spec.SetField(outboundorder.FieldOutboundType, field.TypeString, value)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(outboundorder.FieldStatus, field.TypeString, value)
}
if value, ok := _u.mutation.NeedAgv(); ok {
_spec.SetField(outboundorder.FieldNeedAgv, field.TypeBool, value)
}
if value, ok := _u.mutation.OutboundCategory(); ok {
_spec.SetField(outboundorder.FieldOutboundCategory, field.TypeString, value)
}
@@ -1149,6 +1355,24 @@ func (_u *OutboundOrderUpdateOne) sqlSave(ctx context.Context) (_node *OutboundO
if _u.mutation.ZoneCodeCleared() {
_spec.ClearField(outboundorder.FieldZoneCode, field.TypeString)
}
if value, ok := _u.mutation.ShelfNo(); ok {
_spec.SetField(outboundorder.FieldShelfNo, field.TypeString, value)
}
if _u.mutation.ShelfNoCleared() {
_spec.ClearField(outboundorder.FieldShelfNo, field.TypeString)
}
if value, ok := _u.mutation.LayerNo(); ok {
_spec.SetField(outboundorder.FieldLayerNo, field.TypeString, value)
}
if _u.mutation.LayerNoCleared() {
_spec.ClearField(outboundorder.FieldLayerNo, field.TypeString)
}
if value, ok := _u.mutation.PositionNo(); ok {
_spec.SetField(outboundorder.FieldPositionNo, field.TypeString, value)
}
if _u.mutation.PositionNoCleared() {
_spec.ClearField(outboundorder.FieldPositionNo, field.TypeString)
}
if value, ok := _u.mutation.Quantity(); ok {
_spec.SetField(outboundorder.FieldQuantity, field.TypeInt, value)
}