feat: 新增拧紧待签任务集中签字功能

新增了巡检终端的拧紧待签任务聚合查询和批量审核签字接口,支持检验员对拧紧任务进行第二签;在权限系统中新增对应按钮权限,前端页面新增指标选择下拉和绩效报表的上机记录页签,同时完善相关帮助文档和配置项。
This commit is contained in:
SunYF
2026-09-29 17:37:45 +08:00
parent 76c9b6a7e2
commit 58f67240d7
67 changed files with 939 additions and 86 deletions
+11 -15
View File
@@ -817,25 +817,21 @@ func (s *Service) countWorkpieceDoneByOrder(ctx context.Context, today time.Time
// loadTorqueCriterion 取工艺指标中的扭矩规格(上下限/目标值/单位),用于绘制控制图规格线。
// 取不到时返回 ok=false,前端不画控制线(不臆造规格值)。
// 与 evaluateTorqueCriterion 统一口径:取「isTorque 步骤 + RANGE 逻辑」的标准,不依赖指标名(如「扭矩」)。
func (s *Service) loadTorqueCriterion(ctx context.Context) (lo, hi, target float64, unit string, ok bool) {
crits, err := s.ctx.EntClient.StepCriterion.Query().All(ctx)
if err != nil {
crits, err := s.torqueRangeCriteria(ctx, 0)
if err != nil || len(crits) == 0 {
return 0, 0, 0, "", false
}
for _, c := range crits {
if !strings.Contains(c.Name, "扭矩") && !strings.Contains(c.Name, "扭力") {
continue
}
lo, hi = 0, 0
if c.Min != nil {
lo = *c.Min
}
if c.Max != nil {
hi = *c.Max
}
return lo, hi, c.Target, c.Unit, true
c := crits[0]
lo, hi = 0, 0
if c.Min != nil {
lo = *c.Min
}
return 0, 0, 0, "", false
if c.Max != nil {
hi = *c.Max
}
return lo, hi, c.Target, c.Unit, true
}
// mockAgvProgress 模拟 AGV 任务进度:任务创建后 60 秒线性走完全程。