36 lines
975 B
Java
36 lines
975 B
Java
package com.zhgd.xmgl.util;
|
|
|
|
import lombok.Data;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* 属性工具类
|
|
*/
|
|
@Component
|
|
public class PropertiesUtil {
|
|
/**
|
|
* 红黄绿码:红 < workerInfoRedScore <= 黄 < workerInfoGreenScore <=绿
|
|
*/
|
|
private static Double workerInfoRedScore;
|
|
private static Double workerInfoGreenScore;
|
|
|
|
@Value("${workerInfoRedScore:60}")
|
|
public void setWorkerInfoRedScore(Double workerInfoRedScore) {
|
|
PropertiesUtil.workerInfoRedScore = workerInfoRedScore;
|
|
}
|
|
|
|
@Value("${workerInfoGreenScore:80}")
|
|
public void setWorkerInfoGreenScore(Double workerInfoGreenScore) {
|
|
PropertiesUtil.workerInfoGreenScore = workerInfoGreenScore;
|
|
}
|
|
|
|
public static Double getWorkerInfoRedScore() {
|
|
return workerInfoRedScore;
|
|
}
|
|
|
|
public static Double getWorkerInfoGreenScore() {
|
|
return workerInfoGreenScore;
|
|
}
|
|
}
|