refactor: 重构工艺工序相关命名与数据模型
1. 全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2. 重构工单与工件工艺数据模型:
- 新增工艺组合表flow_material作为备料/齐套唯一源头
- 新增工位状态表station_state支持自主停单/恢复接单
- 移除station_process派工表,改用工单工艺组合作为路线唯一源头
- 替换processCode为flowId作为工艺关联标识
- 重构工件当前进度字段为currentStationNo
3. 删除冗余的静态备份资源文件
4. 调整物料选择组件默认启用仅显示激活物料
5. 优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
@@ -35,8 +35,8 @@ const (
|
||||
FieldTargetDock = "target_dock"
|
||||
// FieldStationNo holds the string denoting the stationno field in the database.
|
||||
FieldStationNo = "station_no"
|
||||
// FieldProcessCode holds the string denoting the processcode field in the database.
|
||||
FieldProcessCode = "process_code"
|
||||
// FieldFlowId holds the string denoting the flowid field in the database.
|
||||
FieldFlowId = "flow_id"
|
||||
// FieldSentQty holds the string denoting the sentqty field in the database.
|
||||
FieldSentQty = "sent_qty"
|
||||
// FieldReceivedQty holds the string denoting the receivedqty field in the database.
|
||||
@@ -81,7 +81,7 @@ var Columns = []string{
|
||||
FieldStatus,
|
||||
FieldTargetDock,
|
||||
FieldStationNo,
|
||||
FieldProcessCode,
|
||||
FieldFlowId,
|
||||
FieldSentQty,
|
||||
FieldReceivedQty,
|
||||
FieldReceivedAt,
|
||||
@@ -140,8 +140,8 @@ var (
|
||||
TargetDockValidator func(string) error
|
||||
// DefaultStationNo holds the default value on creation for the "stationNo" field.
|
||||
DefaultStationNo int
|
||||
// DefaultProcessCode holds the default value on creation for the "processCode" field.
|
||||
DefaultProcessCode int
|
||||
// DefaultFlowId holds the default value on creation for the "flowId" field.
|
||||
DefaultFlowId int
|
||||
// DefaultSentQty holds the default value on creation for the "sentQty" field.
|
||||
DefaultSentQty float64
|
||||
// DefaultReceivedQty holds the default value on creation for the "receivedQty" field.
|
||||
@@ -249,9 +249,9 @@ func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProcessCode orders the results by the processCode field.
|
||||
func ByProcessCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProcessCode, opts...).ToFunc()
|
||||
// ByFlowId orders the results by the flowId field.
|
||||
func ByFlowId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlowId, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySentQty orders the results by the sentQty field.
|
||||
|
||||
@@ -109,9 +109,9 @@ func StationNo(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// ProcessCode applies equality check predicate on the "processCode" field. It's identical to ProcessCodeEQ.
|
||||
func ProcessCode(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldProcessCode, v))
|
||||
// FlowId applies equality check predicate on the "flowId" field. It's identical to FlowIdEQ.
|
||||
func FlowId(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// SentQty applies equality check predicate on the "sentQty" field. It's identical to SentQtyEQ.
|
||||
@@ -844,44 +844,44 @@ func StationNoLTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// ProcessCodeEQ applies the EQ predicate on the "processCode" field.
|
||||
func ProcessCodeEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldProcessCode, v))
|
||||
// FlowIdEQ applies the EQ predicate on the "flowId" field.
|
||||
func FlowIdEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// ProcessCodeNEQ applies the NEQ predicate on the "processCode" field.
|
||||
func ProcessCodeNEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldProcessCode, v))
|
||||
// FlowIdNEQ applies the NEQ predicate on the "flowId" field.
|
||||
func FlowIdNEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// ProcessCodeIn applies the In predicate on the "processCode" field.
|
||||
func ProcessCodeIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldProcessCode, vs...))
|
||||
// FlowIdIn applies the In predicate on the "flowId" field.
|
||||
func FlowIdIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeNotIn applies the NotIn predicate on the "processCode" field.
|
||||
func ProcessCodeNotIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldProcessCode, vs...))
|
||||
// FlowIdNotIn applies the NotIn predicate on the "flowId" field.
|
||||
func FlowIdNotIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeGT applies the GT predicate on the "processCode" field.
|
||||
func ProcessCodeGT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldProcessCode, v))
|
||||
// FlowIdGT applies the GT predicate on the "flowId" field.
|
||||
func FlowIdGT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// ProcessCodeGTE applies the GTE predicate on the "processCode" field.
|
||||
func ProcessCodeGTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldProcessCode, v))
|
||||
// FlowIdGTE applies the GTE predicate on the "flowId" field.
|
||||
func FlowIdGTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLT applies the LT predicate on the "processCode" field.
|
||||
func ProcessCodeLT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldProcessCode, v))
|
||||
// FlowIdLT applies the LT predicate on the "flowId" field.
|
||||
func FlowIdLT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLTE applies the LTE predicate on the "processCode" field.
|
||||
func ProcessCodeLTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldProcessCode, v))
|
||||
// FlowIdLTE applies the LTE predicate on the "flowId" field.
|
||||
func FlowIdLTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// SentQtyEQ applies the EQ predicate on the "sentQty" field.
|
||||
|
||||
Reference in New Issue
Block a user