feat&refactor: 完成多模块功能迭代与配置优化
本次提交覆盖多个业务模块的功能完善与体验优化:
1. **鉴权与配置调整**:
- 统一JWT滑动续签逻辑,简化Token存储,移除RefreshToken相关冗余代码
- 调整多项目配置文件中JWT过期时间为3600秒,统一会话闲置窗口
- 工位配置放开1~12限制,改为仅校验大于0
2. **术语统一替换**:全链路将"精密件"替换为"电气件",修正物料管理描述
3. **功能新增**:
- 新增工位类型、工艺路线与产线点位台账模块
- 添加工艺PDF预览面板、工位终端代理转发接口
- 新增操作日志按操作人列表筛选、工位登出日志记录
- 新增PLC移料指令与产线点位状态管理
4. **业务流程优化**:
- 调整BOM物料删除校验逻辑,优化工单备料计算
- 补充物料图号、检测单号等追溯字段
- 完善工艺流程图与工位绑定关系说明
- 优化前端页面文案与交互细节
5. **代码规范与维护**:
- 新增通用工具函数与前端静态资源
- 整理路由权限与中间件逻辑
- 修复部分接口与配置的不兼容问题
This commit is contained in:
@@ -46,20 +46,6 @@ func (_c *WorkOrderCreate) SetNillableProductCode(v *string) *WorkOrderCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetBomName sets the "bomName" field.
|
||||
func (_c *WorkOrderCreate) SetBomName(v string) *WorkOrderCreate {
|
||||
_c.mutation.SetBomName(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableBomName sets the "bomName" field if the given value is not nil.
|
||||
func (_c *WorkOrderCreate) SetNillableBomName(v *string) *WorkOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetBomName(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetProductName sets the "productName" field.
|
||||
func (_c *WorkOrderCreate) SetProductName(v string) *WorkOrderCreate {
|
||||
_c.mutation.SetProductName(v)
|
||||
@@ -130,6 +116,26 @@ func (_c *WorkOrderCreate) SetNillableProcessSeq(v *string) *WorkOrderCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRouteId sets the "routeId" field.
|
||||
func (_c *WorkOrderCreate) SetRouteId(v int) *WorkOrderCreate {
|
||||
_c.mutation.SetRouteId(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableRouteId sets the "routeId" field if the given value is not nil.
|
||||
func (_c *WorkOrderCreate) SetNillableRouteId(v *int) *WorkOrderCreate {
|
||||
if v != nil {
|
||||
_c.SetRouteId(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRouteSnapshot sets the "routeSnapshot" field.
|
||||
func (_c *WorkOrderCreate) SetRouteSnapshot(v []map[string]interface{}) *WorkOrderCreate {
|
||||
_c.mutation.SetRouteSnapshot(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_c *WorkOrderCreate) SetStatus(v string) *WorkOrderCreate {
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -265,10 +271,6 @@ func (_c *WorkOrderCreate) defaults() {
|
||||
v := workorder.DefaultProductCode
|
||||
_c.mutation.SetProductCode(v)
|
||||
}
|
||||
if _, ok := _c.mutation.BomName(); !ok {
|
||||
v := workorder.DefaultBomName
|
||||
_c.mutation.SetBomName(v)
|
||||
}
|
||||
if _, ok := _c.mutation.ProductName(); !ok {
|
||||
v := workorder.DefaultProductName
|
||||
_c.mutation.SetProductName(v)
|
||||
@@ -324,14 +326,6 @@ func (_c *WorkOrderCreate) check() error {
|
||||
return &ValidationError{Name: "productCode", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.productCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.BomName(); !ok {
|
||||
return &ValidationError{Name: "bomName", err: errors.New(`ent: missing required field "WorkOrder.bomName"`)}
|
||||
}
|
||||
if v, ok := _c.mutation.BomName(); ok {
|
||||
if err := workorder.BomNameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "bomName", err: fmt.Errorf(`ent: validator failed for field "WorkOrder.bomName": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.ProductName(); !ok {
|
||||
return &ValidationError{Name: "productName", err: errors.New(`ent: missing required field "WorkOrder.productName"`)}
|
||||
}
|
||||
@@ -417,10 +411,6 @@ func (_c *WorkOrderCreate) createSpec() (*WorkOrder, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(workorder.FieldProductCode, field.TypeString, value)
|
||||
_node.ProductCode = value
|
||||
}
|
||||
if value, ok := _c.mutation.BomName(); ok {
|
||||
_spec.SetField(workorder.FieldBomName, field.TypeString, value)
|
||||
_node.BomName = value
|
||||
}
|
||||
if value, ok := _c.mutation.ProductName(); ok {
|
||||
_spec.SetField(workorder.FieldProductName, field.TypeString, value)
|
||||
_node.ProductName = value
|
||||
@@ -441,6 +431,14 @@ func (_c *WorkOrderCreate) createSpec() (*WorkOrder, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(workorder.FieldProcessSeq, field.TypeString, value)
|
||||
_node.ProcessSeq = value
|
||||
}
|
||||
if value, ok := _c.mutation.RouteId(); ok {
|
||||
_spec.SetField(workorder.FieldRouteId, field.TypeInt, value)
|
||||
_node.RouteId = value
|
||||
}
|
||||
if value, ok := _c.mutation.RouteSnapshot(); ok {
|
||||
_spec.SetField(workorder.FieldRouteSnapshot, field.TypeJSON, value)
|
||||
_node.RouteSnapshot = value
|
||||
}
|
||||
if value, ok := _c.mutation.Status(); ok {
|
||||
_spec.SetField(workorder.FieldStatus, field.TypeString, value)
|
||||
_node.Status = value
|
||||
|
||||
Reference in New Issue
Block a user