feat&refactor: 完成多模块功能迭代与配置优化
本次提交覆盖多个业务模块的功能完善与体验优化:
1. **鉴权与配置调整**:
- 统一JWT滑动续签逻辑,简化Token存储,移除RefreshToken相关冗余代码
- 调整多项目配置文件中JWT过期时间为3600秒,统一会话闲置窗口
- 工位配置放开1~12限制,改为仅校验大于0
2. **术语统一替换**:全链路将"精密件"替换为"电气件",修正物料管理描述
3. **功能新增**:
- 新增工位类型、工艺路线与产线点位台账模块
- 添加工艺PDF预览面板、工位终端代理转发接口
- 新增操作日志按操作人列表筛选、工位登出日志记录
- 新增PLC移料指令与产线点位状态管理
4. **业务流程优化**:
- 调整BOM物料删除校验逻辑,优化工单备料计算
- 补充物料图号、检测单号等追溯字段
- 完善工艺流程图与工位绑定关系说明
- 优化前端页面文案与交互细节
5. **代码规范与维护**:
- 新增通用工具函数与前端静态资源
- 整理路由权限与中间件逻辑
- 修复部分接口与配置的不兼容问题
This commit is contained in:
@@ -69,11 +69,6 @@ func ProductCode(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// BomName applies equality check predicate on the "bomName" field. It's identical to BomNameEQ.
|
||||
func BomName(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldBomName, v))
|
||||
}
|
||||
|
||||
// ProductName applies equality check predicate on the "productName" field. It's identical to ProductNameEQ.
|
||||
func ProductName(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProductName, v))
|
||||
@@ -99,6 +94,11 @@ func ProcessSeq(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// RouteId applies equality check predicate on the "routeId" field. It's identical to RouteIdEQ.
|
||||
func RouteId(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldRouteId, 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))
|
||||
@@ -299,71 +299,6 @@ func ProductCodeContainsFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContainsFold(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// BomNameEQ applies the EQ predicate on the "bomName" field.
|
||||
func BomNameEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameNEQ applies the NEQ predicate on the "bomName" field.
|
||||
func BomNameNEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNEQ(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameIn applies the In predicate on the "bomName" field.
|
||||
func BomNameIn(vs ...string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIn(FieldBomName, vs...))
|
||||
}
|
||||
|
||||
// BomNameNotIn applies the NotIn predicate on the "bomName" field.
|
||||
func BomNameNotIn(vs ...string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotIn(FieldBomName, vs...))
|
||||
}
|
||||
|
||||
// BomNameGT applies the GT predicate on the "bomName" field.
|
||||
func BomNameGT(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGT(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameGTE applies the GTE predicate on the "bomName" field.
|
||||
func BomNameGTE(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGTE(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameLT applies the LT predicate on the "bomName" field.
|
||||
func BomNameLT(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLT(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameLTE applies the LTE predicate on the "bomName" field.
|
||||
func BomNameLTE(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLTE(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameContains applies the Contains predicate on the "bomName" field.
|
||||
func BomNameContains(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContains(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameHasPrefix applies the HasPrefix predicate on the "bomName" field.
|
||||
func BomNameHasPrefix(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldHasPrefix(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameHasSuffix applies the HasSuffix predicate on the "bomName" field.
|
||||
func BomNameHasSuffix(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldHasSuffix(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameEqualFold applies the EqualFold predicate on the "bomName" field.
|
||||
func BomNameEqualFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEqualFold(FieldBomName, v))
|
||||
}
|
||||
|
||||
// BomNameContainsFold applies the ContainsFold predicate on the "bomName" field.
|
||||
func BomNameContainsFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContainsFold(FieldBomName, v))
|
||||
}
|
||||
|
||||
// ProductNameEQ applies the EQ predicate on the "productName" field.
|
||||
func ProductNameEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProductName, v))
|
||||
@@ -614,6 +549,66 @@ func ProcessSeqContainsFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContainsFold(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// RouteIdEQ applies the EQ predicate on the "routeId" field.
|
||||
func RouteIdEQ(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdNEQ applies the NEQ predicate on the "routeId" field.
|
||||
func RouteIdNEQ(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNEQ(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdIn applies the In predicate on the "routeId" field.
|
||||
func RouteIdIn(vs ...int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIn(FieldRouteId, vs...))
|
||||
}
|
||||
|
||||
// RouteIdNotIn applies the NotIn predicate on the "routeId" field.
|
||||
func RouteIdNotIn(vs ...int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotIn(FieldRouteId, vs...))
|
||||
}
|
||||
|
||||
// RouteIdGT applies the GT predicate on the "routeId" field.
|
||||
func RouteIdGT(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGT(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdGTE applies the GTE predicate on the "routeId" field.
|
||||
func RouteIdGTE(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGTE(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdLT applies the LT predicate on the "routeId" field.
|
||||
func RouteIdLT(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLT(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdLTE applies the LTE predicate on the "routeId" field.
|
||||
func RouteIdLTE(v int) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLTE(FieldRouteId, v))
|
||||
}
|
||||
|
||||
// RouteIdIsNil applies the IsNil predicate on the "routeId" field.
|
||||
func RouteIdIsNil() predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIsNull(FieldRouteId))
|
||||
}
|
||||
|
||||
// RouteIdNotNil applies the NotNil predicate on the "routeId" field.
|
||||
func RouteIdNotNil() predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotNull(FieldRouteId))
|
||||
}
|
||||
|
||||
// RouteSnapshotIsNil applies the IsNil predicate on the "routeSnapshot" field.
|
||||
func RouteSnapshotIsNil() predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIsNull(FieldRouteSnapshot))
|
||||
}
|
||||
|
||||
// RouteSnapshotNotNil applies the NotNil predicate on the "routeSnapshot" field.
|
||||
func RouteSnapshotNotNil() predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotNull(FieldRouteSnapshot))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldStatus, v))
|
||||
|
||||
@@ -19,8 +19,6 @@ const (
|
||||
FieldProductTypeId = "product_type_id"
|
||||
// FieldProductCode holds the string denoting the productcode field in the database.
|
||||
FieldProductCode = "product_code"
|
||||
// FieldBomName holds the string denoting the bomname field in the database.
|
||||
FieldBomName = "bom_name"
|
||||
// FieldProductName holds the string denoting the productname field in the database.
|
||||
FieldProductName = "product_name"
|
||||
// FieldQuantity holds the string denoting the quantity field in the database.
|
||||
@@ -31,6 +29,10 @@ const (
|
||||
FieldFailNum = "fail_num"
|
||||
// FieldProcessSeq holds the string denoting the processseq field in the database.
|
||||
FieldProcessSeq = "process_seq"
|
||||
// FieldRouteId holds the string denoting the routeid field in the database.
|
||||
FieldRouteId = "route_id"
|
||||
// FieldRouteSnapshot holds the string denoting the routesnapshot field in the database.
|
||||
FieldRouteSnapshot = "route_snapshot"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldPlanStart holds the string denoting the planstart field in the database.
|
||||
@@ -55,12 +57,13 @@ var Columns = []string{
|
||||
FieldWorkOrderNo,
|
||||
FieldProductTypeId,
|
||||
FieldProductCode,
|
||||
FieldBomName,
|
||||
FieldProductName,
|
||||
FieldQuantity,
|
||||
FieldFinishedNum,
|
||||
FieldFailNum,
|
||||
FieldProcessSeq,
|
||||
FieldRouteId,
|
||||
FieldRouteSnapshot,
|
||||
FieldStatus,
|
||||
FieldPlanStart,
|
||||
FieldPlanEnd,
|
||||
@@ -87,10 +90,6 @@ var (
|
||||
DefaultProductCode string
|
||||
// ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
|
||||
ProductCodeValidator func(string) error
|
||||
// DefaultBomName holds the default value on creation for the "bomName" field.
|
||||
DefaultBomName string
|
||||
// BomNameValidator is a validator for the "bomName" field. It is called by the builders before save.
|
||||
BomNameValidator func(string) error
|
||||
// DefaultProductName holds the default value on creation for the "productName" field.
|
||||
DefaultProductName string
|
||||
// ProductNameValidator is a validator for the "productName" field. It is called by the builders before save.
|
||||
@@ -142,11 +141,6 @@ func ByProductCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProductCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBomName orders the results by the bomName field.
|
||||
func ByBomName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBomName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProductName orders the results by the productName field.
|
||||
func ByProductName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProductName, opts...).ToFunc()
|
||||
@@ -172,6 +166,11 @@ func ByProcessSeq(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProcessSeq, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRouteId orders the results by the routeId field.
|
||||
func ByRouteId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRouteId, 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