refactor: 重构工艺工序相关命名与数据模型
1. 全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2. 重构工单与工件工艺数据模型:
- 新增工艺组合表flow_material作为备料/齐套唯一源头
- 新增工位状态表station_state支持自主停单/恢复接单
- 移除station_process派工表,改用工单工艺组合作为路线唯一源头
- 替换processCode为flowId作为工艺关联标识
- 重构工件当前进度字段为currentStationNo
3. 删除冗余的静态备份资源文件
4. 调整物料选择组件默认启用仅显示激活物料
5. 优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
@@ -69,9 +69,9 @@ func WorkOrderId(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// CurrentProcess applies equality check predicate on the "currentProcess" field. It's identical to CurrentProcessEQ.
|
||||
func CurrentProcess(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentProcess, v))
|
||||
// CurrentStationNo applies equality check predicate on the "currentStationNo" field. It's identical to CurrentStationNoEQ.
|
||||
func CurrentStationNo(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
@@ -279,54 +279,54 @@ func WorkOrderIdNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldWorkOrderId))
|
||||
}
|
||||
|
||||
// CurrentProcessEQ applies the EQ predicate on the "currentProcess" field.
|
||||
func CurrentProcessEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentProcess, v))
|
||||
// CurrentStationNoEQ applies the EQ predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessNEQ applies the NEQ predicate on the "currentProcess" field.
|
||||
func CurrentProcessNEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldCurrentProcess, v))
|
||||
// CurrentStationNoNEQ applies the NEQ predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoNEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessIn applies the In predicate on the "currentProcess" field.
|
||||
func CurrentProcessIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldCurrentProcess, vs...))
|
||||
// CurrentStationNoIn applies the In predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldCurrentStationNo, vs...))
|
||||
}
|
||||
|
||||
// CurrentProcessNotIn applies the NotIn predicate on the "currentProcess" field.
|
||||
func CurrentProcessNotIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldCurrentProcess, vs...))
|
||||
// CurrentStationNoNotIn applies the NotIn predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoNotIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldCurrentStationNo, vs...))
|
||||
}
|
||||
|
||||
// CurrentProcessGT applies the GT predicate on the "currentProcess" field.
|
||||
func CurrentProcessGT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldCurrentProcess, v))
|
||||
// CurrentStationNoGT applies the GT predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoGT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessGTE applies the GTE predicate on the "currentProcess" field.
|
||||
func CurrentProcessGTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldCurrentProcess, v))
|
||||
// CurrentStationNoGTE applies the GTE predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoGTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessLT applies the LT predicate on the "currentProcess" field.
|
||||
func CurrentProcessLT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldCurrentProcess, v))
|
||||
// CurrentStationNoLT applies the LT predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoLT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessLTE applies the LTE predicate on the "currentProcess" field.
|
||||
func CurrentProcessLTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldCurrentProcess, v))
|
||||
// CurrentStationNoLTE applies the LTE predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoLTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldCurrentStationNo, v))
|
||||
}
|
||||
|
||||
// CurrentProcessIsNil applies the IsNil predicate on the "currentProcess" field.
|
||||
func CurrentProcessIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldCurrentProcess))
|
||||
// CurrentStationNoIsNil applies the IsNil predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldCurrentStationNo))
|
||||
}
|
||||
|
||||
// CurrentProcessNotNil applies the NotNil predicate on the "currentProcess" field.
|
||||
func CurrentProcessNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldCurrentProcess))
|
||||
// CurrentStationNoNotNil applies the NotNil predicate on the "currentStationNo" field.
|
||||
func CurrentStationNoNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldCurrentStationNo))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
|
||||
@@ -19,8 +19,8 @@ const (
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldWorkOrderId holds the string denoting the workorderid field in the database.
|
||||
FieldWorkOrderId = "work_order_id"
|
||||
// FieldCurrentProcess holds the string denoting the currentprocess field in the database.
|
||||
FieldCurrentProcess = "current_process"
|
||||
// FieldCurrentStationNo holds the string denoting the currentstationno field in the database.
|
||||
FieldCurrentStationNo = "current_station_no"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldOnlineAt holds the string denoting the onlineat field in the database.
|
||||
@@ -41,7 +41,7 @@ var Columns = []string{
|
||||
FieldSn,
|
||||
FieldOrderNo,
|
||||
FieldWorkOrderId,
|
||||
FieldCurrentProcess,
|
||||
FieldCurrentStationNo,
|
||||
FieldStatus,
|
||||
FieldOnlineAt,
|
||||
FieldDoneAt,
|
||||
@@ -103,9 +103,9 @@ func ByWorkOrderId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWorkOrderId, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCurrentProcess orders the results by the currentProcess field.
|
||||
func ByCurrentProcess(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCurrentProcess, opts...).ToFunc()
|
||||
// ByCurrentStationNo orders the results by the currentStationNo field.
|
||||
func ByCurrentStationNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCurrentStationNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
|
||||
Reference in New Issue
Block a user