#
Junjie
昨天 5e644156839fbb018fe63972ee74be550540a06a
src/main/java/com/zy/asrs/utils/Utils.java
@@ -7,6 +7,7 @@
import com.core.common.Arith;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasCrnp;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.BasCrnpService;
@@ -32,6 +33,8 @@
    private static final String LOC_NO_FLAG = "-";
    private static final DecimalFormat fmt = new DecimalFormat("##0.00");
    private static Integer defaultDeviceLogCollectTime = 200;
    private static Long lastUpdateDeviceLogCollectTime = -1L;
    public static float scale(Float f){
        if (f == null || f == 0f || Float.isNaN(f)) {
@@ -105,9 +108,16 @@
    //获取设备日志采集时间
    public static int getDeviceLogCollectTime() {
        if (defaultDeviceLogCollectTime == null || System.currentTimeMillis() - lastUpdateDeviceLogCollectTime > 60 * 1000) {
        int defaultTime = 200;
            lastUpdateDeviceLogCollectTime = System.currentTimeMillis();
        try {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
                RedisUtil redisUtil = null;
                try {
                    redisUtil = SpringUtils.getBean(RedisUtil.class);
                } catch (CoolException coolException) {
                }
            if (redisUtil == null) {
                return defaultTime;
            }
@@ -127,7 +137,8 @@
        }catch (Exception e){
            e.printStackTrace();
        }
        return defaultTime;
        }
        return defaultDeviceLogCollectTime;
    }
    //获取入库任务可用排