7 小时以前 9bad721754fe8bbe2e5f459d0706e0fefac569f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
    }
 
}