package cn.iocoder.yudao.module.qcreport.engine.rule; /** * 规则作用域。 */ public enum RuleScope { /** 逐项判定:对每一行检验项分别求值 */ ITEM("item"), /** 报告级汇总判定 */ REPORT("report"); private final String label; RuleScope(String label) { this.label = label; } public String label() { return label; } /** 落库/前端取值 → 枚举,识别不出按逐项处理 */ public static RuleScope of(String value) { return REPORT.label.equalsIgnoreCase(value == null ? "" : value.trim()) ? REPORT : ITEM; } }