refactor: 重构工艺工序相关命名与数据模型
1. 全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2. 重构工单与工件工艺数据模型:
- 新增工艺组合表flow_material作为备料/齐套唯一源头
- 新增工位状态表station_state支持自主停单/恢复接单
- 移除station_process派工表,改用工单工艺组合作为路线唯一源头
- 替换processCode为flowId作为工艺关联标识
- 重构工件当前进度字段为currentStationNo
3. 删除冗余的静态备份资源文件
4. 调整物料选择组件默认启用仅显示激活物料
5. 优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
@@ -15,7 +15,6 @@ import (
|
||||
"bj_power_mes/ent/torqueauditlog"
|
||||
"bj_power_mes/ent/torquerecord"
|
||||
"bj_power_mes/ent/workpiece"
|
||||
"bj_power_mes/ent/workpieceprocess"
|
||||
)
|
||||
|
||||
type TorqueReq struct {
|
||||
@@ -285,14 +284,6 @@ func (s *Service) ListTorqueAuditLog(ctx context.Context, recordId int) ([]*ent.
|
||||
Order(ent.Desc(torqueauditlog.FieldCreatedAt)).All(ctx)
|
||||
}
|
||||
|
||||
|
||||
// 计算一块工件某工序的扭矩步骤是否已报
|
||||
func (s *Service) hasWorkpieceProcess(ctx context.Context, sn string, processCode int) bool {
|
||||
cnt, _ := s.ctx.EntClient.WorkpieceProcess.Query().
|
||||
Where(workpieceprocess.Sn(sn), workpieceprocess.ProcessCode(processCode)).Count(ctx)
|
||||
return cnt > 0
|
||||
}
|
||||
|
||||
// ProcessStepTemplate 下发给前端渲染的参数采集模板
|
||||
type ProcessStepTemplate struct {
|
||||
ID int `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user