feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -151,6 +151,34 @@ func (_c *InboundOrderCreate) SetInspectionNo(v string) *InboundOrderCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (_c *InboundOrderCreate) SetOwnershipType(v string) *InboundOrderCreate {
|
||||
_c.mutation.SetOwnershipType(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOwnershipType sets the "ownership_type" field if the given value is not nil.
|
||||
func (_c *InboundOrderCreate) SetNillableOwnershipType(v *string) *InboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetOwnershipType(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (_c *InboundOrderCreate) SetOwnershipNo(v string) *InboundOrderCreate {
|
||||
_c.mutation.SetOwnershipNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOwnershipNo sets the "ownership_no" field if the given value is not nil.
|
||||
func (_c *InboundOrderCreate) SetNillableOwnershipNo(v *string) *InboundOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetOwnershipNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_c *InboundOrderCreate) SetCreatedAt(v int64) *InboundOrderCreate {
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -212,6 +240,10 @@ func (_c *InboundOrderCreate) defaults() {
|
||||
v := inboundorder.DefaultQuantity
|
||||
_c.mutation.SetQuantity(v)
|
||||
}
|
||||
if _, ok := _c.mutation.OwnershipType(); !ok {
|
||||
v := inboundorder.DefaultOwnershipType
|
||||
_c.mutation.SetOwnershipType(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
v := inboundorder.DefaultCreatedAt()
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -238,6 +270,9 @@ func (_c *InboundOrderCreate) check() error {
|
||||
if _, ok := _c.mutation.InspectionNo(); !ok {
|
||||
return &ValidationError{Name: "inspection_no", err: errors.New(`ent: missing required field "InboundOrder.inspection_no"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.OwnershipType(); !ok {
|
||||
return &ValidationError{Name: "ownership_type", err: errors.New(`ent: missing required field "InboundOrder.ownership_type"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "InboundOrder.created_at"`)}
|
||||
}
|
||||
@@ -312,6 +347,14 @@ func (_c *InboundOrderCreate) createSpec() (*InboundOrder, *sqlgraph.CreateSpec)
|
||||
_spec.SetField(inboundorder.FieldInspectionNo, field.TypeString, value)
|
||||
_node.InspectionNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.OwnershipType(); ok {
|
||||
_spec.SetField(inboundorder.FieldOwnershipType, field.TypeString, value)
|
||||
_node.OwnershipType = value
|
||||
}
|
||||
if value, ok := _c.mutation.OwnershipNo(); ok {
|
||||
_spec.SetField(inboundorder.FieldOwnershipNo, field.TypeString, value)
|
||||
_node.OwnershipNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(inboundorder.FieldCreatedAt, field.TypeInt64, value)
|
||||
_node.CreatedAt = value
|
||||
@@ -542,6 +585,36 @@ func (u *InboundOrderUpsert) UpdateInspectionNo() *InboundOrderUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InboundOrderUpsert) SetOwnershipType(v string) *InboundOrderUpsert {
|
||||
u.Set(inboundorder.FieldOwnershipType, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsert) UpdateOwnershipType() *InboundOrderUpsert {
|
||||
u.SetExcluded(inboundorder.FieldOwnershipType)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InboundOrderUpsert) SetOwnershipNo(v string) *InboundOrderUpsert {
|
||||
u.Set(inboundorder.FieldOwnershipNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsert) UpdateOwnershipNo() *InboundOrderUpsert {
|
||||
u.SetExcluded(inboundorder.FieldOwnershipNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InboundOrderUpsert) ClearOwnershipNo() *InboundOrderUpsert {
|
||||
u.SetNull(inboundorder.FieldOwnershipNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *InboundOrderUpsert) SetCreatedAt(v int64) *InboundOrderUpsert {
|
||||
u.Set(inboundorder.FieldCreatedAt, v)
|
||||
@@ -803,6 +876,41 @@ func (u *InboundOrderUpsertOne) UpdateInspectionNo() *InboundOrderUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InboundOrderUpsertOne) SetOwnershipType(v string) *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.SetOwnershipType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsertOne) UpdateOwnershipType() *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.UpdateOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InboundOrderUpsertOne) SetOwnershipNo(v string) *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.SetOwnershipNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsertOne) UpdateOwnershipNo() *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.UpdateOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InboundOrderUpsertOne) ClearOwnershipNo() *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.ClearOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *InboundOrderUpsertOne) SetCreatedAt(v int64) *InboundOrderUpsertOne {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
@@ -1231,6 +1339,41 @@ func (u *InboundOrderUpsertBulk) UpdateInspectionNo() *InboundOrderUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InboundOrderUpsertBulk) SetOwnershipType(v string) *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.SetOwnershipType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsertBulk) UpdateOwnershipType() *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.UpdateOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InboundOrderUpsertBulk) SetOwnershipNo(v string) *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.SetOwnershipNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InboundOrderUpsertBulk) UpdateOwnershipNo() *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.UpdateOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InboundOrderUpsertBulk) ClearOwnershipNo() *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
s.ClearOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *InboundOrderUpsertBulk) SetCreatedAt(v int64) *InboundOrderUpsertBulk {
|
||||
return u.Update(func(s *InboundOrderUpsert) {
|
||||
|
||||
Reference in New Issue
Block a user