feat&refactor: 2026-09-22 半成品业务模型重构与功能完善
- 重构半成品流转逻辑:进度权威源改为 workpiece.currentStationNo,新增 completedText 快照字段,废除 doneProcessCodes - 清理物料品类中半成品类型,存量数据幂等清理,调整物料管理方式文案为批次/序列号 - 新增日排产状态专用更新接口,修复工单工艺校验逻辑 - 新增物料档案代理接口、深路径文件下载接口 - 优化前端界面文案与工位选择逻辑,补充追溯页半成品流转展示 - 调整WMS端物料品类校验与入库接口契约 - 新增/更新数据库表结构与实体类代码
This commit is contained in:
@@ -19,6 +19,8 @@ const (
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldDoneProcessCodes holds the string denoting the doneprocesscodes field in the database.
|
||||
FieldDoneProcessCodes = "done_process_codes"
|
||||
// FieldCompletedText holds the string denoting the completedtext field in the database.
|
||||
FieldCompletedText = "completed_text"
|
||||
// FieldAction holds the string denoting the action field in the database.
|
||||
FieldAction = "action"
|
||||
// FieldTargetDock holds the string denoting the targetdock field in the database.
|
||||
@@ -37,6 +39,7 @@ var Columns = []string{
|
||||
FieldSn,
|
||||
FieldOrderNo,
|
||||
FieldDoneProcessCodes,
|
||||
FieldCompletedText,
|
||||
FieldAction,
|
||||
FieldTargetDock,
|
||||
FieldOperator,
|
||||
@@ -60,6 +63,10 @@ var (
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultCompletedText holds the default value on creation for the "completedText" field.
|
||||
DefaultCompletedText string
|
||||
// CompletedTextValidator is a validator for the "completedText" field. It is called by the builders before save.
|
||||
CompletedTextValidator func(string) error
|
||||
// DefaultAction holds the default value on creation for the "action" field.
|
||||
DefaultAction string
|
||||
// ActionValidator is a validator for the "action" field. It is called by the builders before save.
|
||||
@@ -96,6 +103,11 @@ func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCompletedText orders the results by the completedText field.
|
||||
func ByCompletedText(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCompletedText, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAction orders the results by the action field.
|
||||
func ByAction(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAction, opts...).ToFunc()
|
||||
|
||||
@@ -64,6 +64,11 @@ func OrderNo(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// CompletedText applies equality check predicate on the "completedText" field. It's identical to CompletedTextEQ.
|
||||
func CompletedText(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEQ(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// Action applies equality check predicate on the "action" field. It's identical to ActionEQ.
|
||||
func Action(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEQ(FieldAction, v))
|
||||
@@ -224,6 +229,71 @@ func DoneProcessCodesNotNil() predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldNotNull(FieldDoneProcessCodes))
|
||||
}
|
||||
|
||||
// CompletedTextEQ applies the EQ predicate on the "completedText" field.
|
||||
func CompletedTextEQ(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEQ(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextNEQ applies the NEQ predicate on the "completedText" field.
|
||||
func CompletedTextNEQ(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldNEQ(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextIn applies the In predicate on the "completedText" field.
|
||||
func CompletedTextIn(vs ...string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldIn(FieldCompletedText, vs...))
|
||||
}
|
||||
|
||||
// CompletedTextNotIn applies the NotIn predicate on the "completedText" field.
|
||||
func CompletedTextNotIn(vs ...string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldNotIn(FieldCompletedText, vs...))
|
||||
}
|
||||
|
||||
// CompletedTextGT applies the GT predicate on the "completedText" field.
|
||||
func CompletedTextGT(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldGT(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextGTE applies the GTE predicate on the "completedText" field.
|
||||
func CompletedTextGTE(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldGTE(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextLT applies the LT predicate on the "completedText" field.
|
||||
func CompletedTextLT(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldLT(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextLTE applies the LTE predicate on the "completedText" field.
|
||||
func CompletedTextLTE(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldLTE(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextContains applies the Contains predicate on the "completedText" field.
|
||||
func CompletedTextContains(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldContains(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextHasPrefix applies the HasPrefix predicate on the "completedText" field.
|
||||
func CompletedTextHasPrefix(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldHasPrefix(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextHasSuffix applies the HasSuffix predicate on the "completedText" field.
|
||||
func CompletedTextHasSuffix(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldHasSuffix(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextEqualFold applies the EqualFold predicate on the "completedText" field.
|
||||
func CompletedTextEqualFold(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEqualFold(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// CompletedTextContainsFold applies the ContainsFold predicate on the "completedText" field.
|
||||
func CompletedTextContainsFold(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldContainsFold(FieldCompletedText, v))
|
||||
}
|
||||
|
||||
// ActionEQ applies the EQ predicate on the "action" field.
|
||||
func ActionEQ(v string) predicate.SemiFlow {
|
||||
return predicate.SemiFlow(sql.FieldEQ(FieldAction, v))
|
||||
|
||||
Reference in New Issue
Block a user