|
@@ -3,6 +3,7 @@ package thyyxxk.webserver.scheduled;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.logging.log4j.util.PropertiesUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -33,14 +34,9 @@ public class FetchClockinDataTask {
|
|
|
|
|
|
@Scheduled(cron = "0 0 8 ? * *")
|
|
|
public void queryClockInData() {
|
|
|
- try {
|
|
|
- InetAddress addr = InetAddress.getLocalHost();
|
|
|
- String address=addr.getHostName();
|
|
|
- if ("THYYXXK-DJ".equals(address)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ String osName = PropertiesUtil.getSystemProperties().getProperty("os.name");
|
|
|
+ if ("Windows 10".equals(osName)) {
|
|
|
+ return;
|
|
|
}
|
|
|
final String yesterday = getYesterdayDate();
|
|
|
ClockinPojo param = new ClockinPojo();
|