|
@@ -14,6 +14,7 @@ import com.storlead.centre.service.HrmschedulesignService;
|
|
|
import com.storlead.centre.service.SystemConfigItemService;
|
|
import com.storlead.centre.service.SystemConfigItemService;
|
|
|
import com.storlead.centre.vo.SignDataConvert;
|
|
import com.storlead.centre.vo.SignDataConvert;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -44,9 +45,16 @@ public class SyncAttendanceSignToOaTask {
|
|
|
@Resource
|
|
@Resource
|
|
|
private SystemConfigItemService systemConfigItemService;
|
|
private SystemConfigItemService systemConfigItemService;
|
|
|
|
|
|
|
|
|
|
+ @Value("${environment}")
|
|
|
|
|
+ private String environment;
|
|
|
|
|
+
|
|
|
@Scheduled(cron ="0 * * * * ? ")
|
|
@Scheduled(cron ="0 * * * * ? ")
|
|
|
public void syncSignData() throws ParseException {
|
|
public void syncSignData() throws ParseException {
|
|
|
|
|
|
|
|
|
|
+ if(!"prod".equals(environment)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
LocalTime now = LocalTime.now();
|
|
LocalTime now = LocalTime.now();
|
|
|
// ===== 总时间窗:06:00 – 22:30 =====
|
|
// ===== 总时间窗:06:00 – 22:30 =====
|
|
|
if (now.isBefore(LocalTime.of(6, 0))
|
|
if (now.isBefore(LocalTime.of(6, 0))
|