feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -63,6 +63,26 @@ func OutboundType(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOutboundType, v))
|
||||
}
|
||||
|
||||
// OutboundCategory applies equality check predicate on the "outbound_category" field. It's identical to OutboundCategoryEQ.
|
||||
func OutboundCategory(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OwnershipType applies equality check predicate on the "ownership_type" field. It's identical to OwnershipTypeEQ.
|
||||
func OwnershipType(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipNo applies equality check predicate on the "ownership_no" field. It's identical to OwnershipNoEQ.
|
||||
func OwnershipNo(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// TargetStation applies equality check predicate on the "target_station" field. It's identical to TargetStationEQ.
|
||||
func TargetStation(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// OrderNo applies equality check predicate on the "order_no" field. It's identical to OrderNoEQ.
|
||||
func OrderNo(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOrderNo, v))
|
||||
@@ -268,6 +288,306 @@ func OutboundTypeContainsFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContainsFold(FieldOutboundType, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryEQ applies the EQ predicate on the "outbound_category" field.
|
||||
func OutboundCategoryEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryNEQ applies the NEQ predicate on the "outbound_category" field.
|
||||
func OutboundCategoryNEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNEQ(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryIn applies the In predicate on the "outbound_category" field.
|
||||
func OutboundCategoryIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIn(FieldOutboundCategory, vs...))
|
||||
}
|
||||
|
||||
// OutboundCategoryNotIn applies the NotIn predicate on the "outbound_category" field.
|
||||
func OutboundCategoryNotIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotIn(FieldOutboundCategory, vs...))
|
||||
}
|
||||
|
||||
// OutboundCategoryGT applies the GT predicate on the "outbound_category" field.
|
||||
func OutboundCategoryGT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGT(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryGTE applies the GTE predicate on the "outbound_category" field.
|
||||
func OutboundCategoryGTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGTE(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryLT applies the LT predicate on the "outbound_category" field.
|
||||
func OutboundCategoryLT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLT(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryLTE applies the LTE predicate on the "outbound_category" field.
|
||||
func OutboundCategoryLTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLTE(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryContains applies the Contains predicate on the "outbound_category" field.
|
||||
func OutboundCategoryContains(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContains(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryHasPrefix applies the HasPrefix predicate on the "outbound_category" field.
|
||||
func OutboundCategoryHasPrefix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryHasSuffix applies the HasSuffix predicate on the "outbound_category" field.
|
||||
func OutboundCategoryHasSuffix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryIsNil applies the IsNil predicate on the "outbound_category" field.
|
||||
func OutboundCategoryIsNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIsNull(FieldOutboundCategory))
|
||||
}
|
||||
|
||||
// OutboundCategoryNotNil applies the NotNil predicate on the "outbound_category" field.
|
||||
func OutboundCategoryNotNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotNull(FieldOutboundCategory))
|
||||
}
|
||||
|
||||
// OutboundCategoryEqualFold applies the EqualFold predicate on the "outbound_category" field.
|
||||
func OutboundCategoryEqualFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEqualFold(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OutboundCategoryContainsFold applies the ContainsFold predicate on the "outbound_category" field.
|
||||
func OutboundCategoryContainsFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContainsFold(FieldOutboundCategory, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeEQ applies the EQ predicate on the "ownership_type" field.
|
||||
func OwnershipTypeEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeNEQ applies the NEQ predicate on the "ownership_type" field.
|
||||
func OwnershipTypeNEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeIn applies the In predicate on the "ownership_type" field.
|
||||
func OwnershipTypeIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIn(FieldOwnershipType, vs...))
|
||||
}
|
||||
|
||||
// OwnershipTypeNotIn applies the NotIn predicate on the "ownership_type" field.
|
||||
func OwnershipTypeNotIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotIn(FieldOwnershipType, vs...))
|
||||
}
|
||||
|
||||
// OwnershipTypeGT applies the GT predicate on the "ownership_type" field.
|
||||
func OwnershipTypeGT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGT(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeGTE applies the GTE predicate on the "ownership_type" field.
|
||||
func OwnershipTypeGTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGTE(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeLT applies the LT predicate on the "ownership_type" field.
|
||||
func OwnershipTypeLT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLT(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeLTE applies the LTE predicate on the "ownership_type" field.
|
||||
func OwnershipTypeLTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLTE(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeContains applies the Contains predicate on the "ownership_type" field.
|
||||
func OwnershipTypeContains(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContains(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeHasPrefix applies the HasPrefix predicate on the "ownership_type" field.
|
||||
func OwnershipTypeHasPrefix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeHasSuffix applies the HasSuffix predicate on the "ownership_type" field.
|
||||
func OwnershipTypeHasSuffix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeIsNil applies the IsNil predicate on the "ownership_type" field.
|
||||
func OwnershipTypeIsNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIsNull(FieldOwnershipType))
|
||||
}
|
||||
|
||||
// OwnershipTypeNotNil applies the NotNil predicate on the "ownership_type" field.
|
||||
func OwnershipTypeNotNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotNull(FieldOwnershipType))
|
||||
}
|
||||
|
||||
// OwnershipTypeEqualFold applies the EqualFold predicate on the "ownership_type" field.
|
||||
func OwnershipTypeEqualFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEqualFold(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeContainsFold applies the ContainsFold predicate on the "ownership_type" field.
|
||||
func OwnershipTypeContainsFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContainsFold(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipNoEQ applies the EQ predicate on the "ownership_no" field.
|
||||
func OwnershipNoEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoNEQ applies the NEQ predicate on the "ownership_no" field.
|
||||
func OwnershipNoNEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNEQ(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoIn applies the In predicate on the "ownership_no" field.
|
||||
func OwnershipNoIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIn(FieldOwnershipNo, vs...))
|
||||
}
|
||||
|
||||
// OwnershipNoNotIn applies the NotIn predicate on the "ownership_no" field.
|
||||
func OwnershipNoNotIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotIn(FieldOwnershipNo, vs...))
|
||||
}
|
||||
|
||||
// OwnershipNoGT applies the GT predicate on the "ownership_no" field.
|
||||
func OwnershipNoGT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGT(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoGTE applies the GTE predicate on the "ownership_no" field.
|
||||
func OwnershipNoGTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGTE(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoLT applies the LT predicate on the "ownership_no" field.
|
||||
func OwnershipNoLT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLT(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoLTE applies the LTE predicate on the "ownership_no" field.
|
||||
func OwnershipNoLTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLTE(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoContains applies the Contains predicate on the "ownership_no" field.
|
||||
func OwnershipNoContains(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContains(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoHasPrefix applies the HasPrefix predicate on the "ownership_no" field.
|
||||
func OwnershipNoHasPrefix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoHasSuffix applies the HasSuffix predicate on the "ownership_no" field.
|
||||
func OwnershipNoHasSuffix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoIsNil applies the IsNil predicate on the "ownership_no" field.
|
||||
func OwnershipNoIsNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIsNull(FieldOwnershipNo))
|
||||
}
|
||||
|
||||
// OwnershipNoNotNil applies the NotNil predicate on the "ownership_no" field.
|
||||
func OwnershipNoNotNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotNull(FieldOwnershipNo))
|
||||
}
|
||||
|
||||
// OwnershipNoEqualFold applies the EqualFold predicate on the "ownership_no" field.
|
||||
func OwnershipNoEqualFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEqualFold(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// OwnershipNoContainsFold applies the ContainsFold predicate on the "ownership_no" field.
|
||||
func OwnershipNoContainsFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContainsFold(FieldOwnershipNo, v))
|
||||
}
|
||||
|
||||
// TargetStationEQ applies the EQ predicate on the "target_station" field.
|
||||
func TargetStationEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationNEQ applies the NEQ predicate on the "target_station" field.
|
||||
func TargetStationNEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNEQ(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationIn applies the In predicate on the "target_station" field.
|
||||
func TargetStationIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIn(FieldTargetStation, vs...))
|
||||
}
|
||||
|
||||
// TargetStationNotIn applies the NotIn predicate on the "target_station" field.
|
||||
func TargetStationNotIn(vs ...string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotIn(FieldTargetStation, vs...))
|
||||
}
|
||||
|
||||
// TargetStationGT applies the GT predicate on the "target_station" field.
|
||||
func TargetStationGT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGT(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationGTE applies the GTE predicate on the "target_station" field.
|
||||
func TargetStationGTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldGTE(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationLT applies the LT predicate on the "target_station" field.
|
||||
func TargetStationLT(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLT(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationLTE applies the LTE predicate on the "target_station" field.
|
||||
func TargetStationLTE(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldLTE(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationContains applies the Contains predicate on the "target_station" field.
|
||||
func TargetStationContains(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContains(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationHasPrefix applies the HasPrefix predicate on the "target_station" field.
|
||||
func TargetStationHasPrefix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationHasSuffix applies the HasSuffix predicate on the "target_station" field.
|
||||
func TargetStationHasSuffix(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationIsNil applies the IsNil predicate on the "target_station" field.
|
||||
func TargetStationIsNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldIsNull(FieldTargetStation))
|
||||
}
|
||||
|
||||
// TargetStationNotNil applies the NotNil predicate on the "target_station" field.
|
||||
func TargetStationNotNil() predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldNotNull(FieldTargetStation))
|
||||
}
|
||||
|
||||
// TargetStationEqualFold applies the EqualFold predicate on the "target_station" field.
|
||||
func TargetStationEqualFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEqualFold(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// TargetStationContainsFold applies the ContainsFold predicate on the "target_station" field.
|
||||
func TargetStationContainsFold(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldContainsFold(FieldTargetStation, v))
|
||||
}
|
||||
|
||||
// OrderNoEQ applies the EQ predicate on the "order_no" field.
|
||||
func OrderNoEQ(v string) predicate.OutboundOrder {
|
||||
return predicate.OutboundOrder(sql.FieldEQ(FieldOrderNo, v))
|
||||
|
||||
Reference in New Issue
Block a user