feat: 新增产品工艺管理与工序审核功能
- 新增产品工艺(product_process)及明细(product_process_item)数据模型 - 新增工序审核开关(need_audit)与审核角色(audit_role)字段 - 新增待审核签字页面与路由 - 优化 WMS/MES 接口交互,增加业务错误处理与友好提示 - 补充库存过滤逻辑,避免返回已出库 SN 数据 - 调整默认查询时间范围为近一个月,优化用户体验
This commit is contained in:
@@ -119,6 +119,11 @@ func DueDate(v time.Time) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldDueDate, v))
|
||||
}
|
||||
|
||||
// ProductProcessId applies equality check predicate on the "productProcessId" field. It's identical to ProductProcessIdEQ.
|
||||
func ProductProcessId(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldStatus, v))
|
||||
@@ -889,6 +894,46 @@ func FlowCombinationNotNil() predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotNull(FieldFlowCombination))
|
||||
}
|
||||
|
||||
// ProductProcessIdEQ applies the EQ predicate on the "productProcessId" field.
|
||||
func ProductProcessIdEQ(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// ProductProcessIdNEQ applies the NEQ predicate on the "productProcessId" field.
|
||||
func ProductProcessIdNEQ(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNEQ(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// ProductProcessIdIn applies the In predicate on the "productProcessId" field.
|
||||
func ProductProcessIdIn(vs ...int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIn(FieldProductProcessId, vs...))
|
||||
}
|
||||
|
||||
// ProductProcessIdNotIn applies the NotIn predicate on the "productProcessId" field.
|
||||
func ProductProcessIdNotIn(vs ...int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotIn(FieldProductProcessId, vs...))
|
||||
}
|
||||
|
||||
// ProductProcessIdGT applies the GT predicate on the "productProcessId" field.
|
||||
func ProductProcessIdGT(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGT(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// ProductProcessIdGTE applies the GTE predicate on the "productProcessId" field.
|
||||
func ProductProcessIdGTE(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGTE(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// ProductProcessIdLT applies the LT predicate on the "productProcessId" field.
|
||||
func ProductProcessIdLT(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLT(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// ProductProcessIdLTE applies the LTE predicate on the "productProcessId" field.
|
||||
func ProductProcessIdLTE(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLTE(FieldProductProcessId, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldStatus, v))
|
||||
|
||||
@@ -41,6 +41,8 @@ const (
|
||||
FieldDueDate = "due_date"
|
||||
// FieldFlowCombination holds the string denoting the flowcombination field in the database.
|
||||
FieldFlowCombination = "flow_combination"
|
||||
// FieldProductProcessId holds the string denoting the productprocessid field in the database.
|
||||
FieldProductProcessId = "product_process_id"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldPlanStart holds the string denoting the planstart field in the database.
|
||||
@@ -76,6 +78,7 @@ var Columns = []string{
|
||||
FieldCreatedBy,
|
||||
FieldDueDate,
|
||||
FieldFlowCombination,
|
||||
FieldProductProcessId,
|
||||
FieldStatus,
|
||||
FieldPlanStart,
|
||||
FieldPlanEnd,
|
||||
@@ -132,6 +135,8 @@ var (
|
||||
DefaultCreatedBy string
|
||||
// CreatedByValidator is a validator for the "createdBy" field. It is called by the builders before save.
|
||||
CreatedByValidator func(string) error
|
||||
// DefaultProductProcessId holds the default value on creation for the "productProcessId" field.
|
||||
DefaultProductProcessId int
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
@@ -219,6 +224,11 @@ func ByDueDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDueDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProductProcessId orders the results by the productProcessId field.
|
||||
func ByProductProcessId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProductProcessId, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user