自动化立体仓库 - WMS系统
lty
16 小时以前 9905847295d326134d50fe7f005522cdfafe2763
src/main/java/com/zy/asrs/task/kingdee/LoginAuthenticationScheduler.java
@@ -1,9 +1,12 @@
package com.zy.asrs.task.kingdee;
import com.core.common.Cools;
import com.zy.asrs.task.kingdee.handler.LoginAuthenticationHandler;
import com.zy.common.entity.Parameter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Slf4j
@@ -15,11 +18,14 @@
    @Value("${erp.switch.LoginAuthenticationSwitch}")
    private boolean LoginAuthenticationSwitch;
    //@Scheduled(cron = "0/3 * * * * ? ")
//    @Scheduled(cron = "0/3 * * * * ? ")
    void login(){
        if(!LoginAuthenticationSwitch){
            return;
        }
        loginAuthenticationHandler.start();
        String erpReport = Parameter.get().getErpReport();
        if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) {
            loginAuthenticationHandler.start();
        }
    }
}