refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
This commit is contained in:
@@ -155,20 +155,6 @@ func (_u *WorkOrderUpdate) AddFailNum(v int) *WorkOrderUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetProcessSeq sets the "processSeq" field.
|
||||
func (_u *WorkOrderUpdate) SetProcessSeq(v string) *WorkOrderUpdate {
|
||||
_u.mutation.SetProcessSeq(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableProcessSeq sets the "processSeq" field if the given value is not nil.
|
||||
func (_u *WorkOrderUpdate) SetNillableProcessSeq(v *string) *WorkOrderUpdate {
|
||||
if v != nil {
|
||||
_u.SetProcessSeq(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetContractNo sets the "contractNo" field.
|
||||
func (_u *WorkOrderUpdate) SetContractNo(v string) *WorkOrderUpdate {
|
||||
_u.mutation.SetContractNo(v)
|
||||
@@ -401,11 +387,6 @@ func (_u *WorkOrderUpdate) check() error {
|
||||
return &ValidationError{Name: "productName", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.productName": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ProcessSeq(); ok {
|
||||
if err := workorder.ProcessSeqValidator(v); err != nil {
|
||||
return &ValidationError{Name: "processSeq", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.processSeq": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ContractNo(); ok {
|
||||
if err := workorder.ContractNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "contractNo", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.contractNo": %w`, err)}
|
||||
@@ -485,9 +466,6 @@ func (_u *WorkOrderUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.AddedFailNum(); ok {
|
||||
_spec.AddField(workorder.FieldFailNum, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ProcessSeq(); ok {
|
||||
_spec.SetField(workorder.FieldProcessSeq, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ContractNo(); ok {
|
||||
_spec.SetField(workorder.FieldContractNo, field.TypeString, value)
|
||||
}
|
||||
@@ -687,20 +665,6 @@ func (_u *WorkOrderUpdateOne) AddFailNum(v int) *WorkOrderUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetProcessSeq sets the "processSeq" field.
|
||||
func (_u *WorkOrderUpdateOne) SetProcessSeq(v string) *WorkOrderUpdateOne {
|
||||
_u.mutation.SetProcessSeq(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableProcessSeq sets the "processSeq" field if the given value is not nil.
|
||||
func (_u *WorkOrderUpdateOne) SetNillableProcessSeq(v *string) *WorkOrderUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetProcessSeq(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetContractNo sets the "contractNo" field.
|
||||
func (_u *WorkOrderUpdateOne) SetContractNo(v string) *WorkOrderUpdateOne {
|
||||
_u.mutation.SetContractNo(v)
|
||||
@@ -946,11 +910,6 @@ func (_u *WorkOrderUpdateOne) check() error {
|
||||
return &ValidationError{Name: "productName", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.productName": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ProcessSeq(); ok {
|
||||
if err := workorder.ProcessSeqValidator(v); err != nil {
|
||||
return &ValidationError{Name: "processSeq", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.processSeq": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.ContractNo(); ok {
|
||||
if err := workorder.ContractNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "contractNo", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.contractNo": %w`, err)}
|
||||
@@ -1047,9 +1006,6 @@ func (_u *WorkOrderUpdateOne) sqlSave(ctx context.Context) (_node *WorkOrder, er
|
||||
if value, ok := _u.mutation.AddedFailNum(); ok {
|
||||
_spec.AddField(workorder.FieldFailNum, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ProcessSeq(); ok {
|
||||
_spec.SetField(workorder.FieldProcessSeq, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ContractNo(); ok {
|
||||
_spec.SetField(workorder.FieldContractNo, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user