refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
This commit is contained in:
@@ -33,6 +33,14 @@ const (
|
||||
FieldStatus = "status"
|
||||
// FieldTargetDock holds the string denoting the targetdock field in the database.
|
||||
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"
|
||||
// FieldSentQty holds the string denoting the sentqty field in the database.
|
||||
FieldSentQty = "sent_qty"
|
||||
// FieldBatchNo holds the string denoting the batchno field in the database.
|
||||
FieldBatchNo = "batch_no"
|
||||
// FieldOperator holds the string denoting the operator field in the database.
|
||||
FieldOperator = "operator"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
@@ -56,6 +64,10 @@ var Columns = []string{
|
||||
FieldReqQty,
|
||||
FieldStatus,
|
||||
FieldTargetDock,
|
||||
FieldStationNo,
|
||||
FieldProcessCode,
|
||||
FieldSentQty,
|
||||
FieldBatchNo,
|
||||
FieldOperator,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
@@ -102,6 +114,16 @@ var (
|
||||
DefaultTargetDock string
|
||||
// TargetDockValidator is a validator for the "targetDock" field. It is called by the builders before save.
|
||||
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
|
||||
// DefaultSentQty holds the default value on creation for the "sentQty" field.
|
||||
DefaultSentQty float64
|
||||
// DefaultBatchNo holds the default value on creation for the "batchNo" field.
|
||||
DefaultBatchNo string
|
||||
// BatchNoValidator is a validator for the "batchNo" field. It is called by the builders before save.
|
||||
BatchNoValidator func(string) error
|
||||
// DefaultOperator holds the default value on creation for the "operator" field.
|
||||
DefaultOperator string
|
||||
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
||||
@@ -174,6 +196,26 @@ func ByTargetDock(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetDock, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStationNo orders the results by the stationNo field.
|
||||
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()
|
||||
}
|
||||
|
||||
// BySentQty orders the results by the sentQty field.
|
||||
func BySentQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSentQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBatchNo orders the results by the batchNo field.
|
||||
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOperator orders the results by the operator field.
|
||||
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||||
|
||||
@@ -104,6 +104,26 @@ func TargetDock(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldTargetDock, v))
|
||||
}
|
||||
|
||||
// StationNo applies equality check predicate on the "stationNo" field. It's identical to StationNoEQ.
|
||||
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))
|
||||
}
|
||||
|
||||
// SentQty applies equality check predicate on the "sentQty" field. It's identical to SentQtyEQ.
|
||||
func SentQty(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// BatchNo applies equality check predicate on the "batchNo" field. It's identical to BatchNoEQ.
|
||||
func BatchNo(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ.
|
||||
func Operator(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldOperator, v))
|
||||
@@ -744,6 +764,191 @@ func TargetDockContainsFold(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldContainsFold(FieldTargetDock, v))
|
||||
}
|
||||
|
||||
// StationNoEQ applies the EQ predicate on the "stationNo" field.
|
||||
func StationNoEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoNEQ applies the NEQ predicate on the "stationNo" field.
|
||||
func StationNoNEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoIn applies the In predicate on the "stationNo" field.
|
||||
func StationNoIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoNotIn applies the NotIn predicate on the "stationNo" field.
|
||||
func StationNoNotIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoGT applies the GT predicate on the "stationNo" field.
|
||||
func StationNoGT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoGTE applies the GTE predicate on the "stationNo" field.
|
||||
func StationNoGTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLT applies the LT predicate on the "stationNo" field.
|
||||
func StationNoLT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLTE applies the LTE predicate on the "stationNo" field.
|
||||
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))
|
||||
}
|
||||
|
||||
// ProcessCodeNEQ applies the NEQ predicate on the "processCode" field.
|
||||
func ProcessCodeNEQ(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeIn applies the In predicate on the "processCode" field.
|
||||
func ProcessCodeIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldProcessCode, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeNotIn applies the NotIn predicate on the "processCode" field.
|
||||
func ProcessCodeNotIn(vs ...int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldProcessCode, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeGT applies the GT predicate on the "processCode" field.
|
||||
func ProcessCodeGT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeGTE applies the GTE predicate on the "processCode" field.
|
||||
func ProcessCodeGTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLT applies the LT predicate on the "processCode" field.
|
||||
func ProcessCodeLT(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLTE applies the LTE predicate on the "processCode" field.
|
||||
func ProcessCodeLTE(v int) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// SentQtyEQ applies the EQ predicate on the "sentQty" field.
|
||||
func SentQtyEQ(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// SentQtyNEQ applies the NEQ predicate on the "sentQty" field.
|
||||
func SentQtyNEQ(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// SentQtyIn applies the In predicate on the "sentQty" field.
|
||||
func SentQtyIn(vs ...float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldSentQty, vs...))
|
||||
}
|
||||
|
||||
// SentQtyNotIn applies the NotIn predicate on the "sentQty" field.
|
||||
func SentQtyNotIn(vs ...float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldSentQty, vs...))
|
||||
}
|
||||
|
||||
// SentQtyGT applies the GT predicate on the "sentQty" field.
|
||||
func SentQtyGT(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// SentQtyGTE applies the GTE predicate on the "sentQty" field.
|
||||
func SentQtyGTE(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// SentQtyLT applies the LT predicate on the "sentQty" field.
|
||||
func SentQtyLT(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// SentQtyLTE applies the LTE predicate on the "sentQty" field.
|
||||
func SentQtyLTE(v float64) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldSentQty, v))
|
||||
}
|
||||
|
||||
// BatchNoEQ applies the EQ predicate on the "batchNo" field.
|
||||
func BatchNoEQ(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoNEQ applies the NEQ predicate on the "batchNo" field.
|
||||
func BatchNoNEQ(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNEQ(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoIn applies the In predicate on the "batchNo" field.
|
||||
func BatchNoIn(vs ...string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldIn(FieldBatchNo, vs...))
|
||||
}
|
||||
|
||||
// BatchNoNotIn applies the NotIn predicate on the "batchNo" field.
|
||||
func BatchNoNotIn(vs ...string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldNotIn(FieldBatchNo, vs...))
|
||||
}
|
||||
|
||||
// BatchNoGT applies the GT predicate on the "batchNo" field.
|
||||
func BatchNoGT(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGT(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoGTE applies the GTE predicate on the "batchNo" field.
|
||||
func BatchNoGTE(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldGTE(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoLT applies the LT predicate on the "batchNo" field.
|
||||
func BatchNoLT(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLT(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoLTE applies the LTE predicate on the "batchNo" field.
|
||||
func BatchNoLTE(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldLTE(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoContains applies the Contains predicate on the "batchNo" field.
|
||||
func BatchNoContains(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldContains(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoHasPrefix applies the HasPrefix predicate on the "batchNo" field.
|
||||
func BatchNoHasPrefix(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldHasPrefix(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoHasSuffix applies the HasSuffix predicate on the "batchNo" field.
|
||||
func BatchNoHasSuffix(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldHasSuffix(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoEqualFold applies the EqualFold predicate on the "batchNo" field.
|
||||
func BatchNoEqualFold(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEqualFold(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// BatchNoContainsFold applies the ContainsFold predicate on the "batchNo" field.
|
||||
func BatchNoContainsFold(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldContainsFold(FieldBatchNo, v))
|
||||
}
|
||||
|
||||
// OperatorEQ applies the EQ predicate on the "operator" field.
|
||||
func OperatorEQ(v string) predicate.MaterialRequest {
|
||||
return predicate.MaterialRequest(sql.FieldEQ(FieldOperator, v))
|
||||
|
||||
Reference in New Issue
Block a user