package com.artfess.yhxt.schedule;

import com.artfess.base.util.JsonUtil;
import com.artfess.yhxt.push.HttpUtil;
import com.artfess.yhxt.yjjy.service.YjjyyManagerService;
import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.HashMap;

/**
 * @author zhx
 * @create 2022/4/11
 * 救援同步
 */
@Component
@EnableScheduling
public class RescueSchedule {
    //获取巡查记录列表url
    private String urlRoadCheckWork = "http://10.5.1.48:16001/zdpm/extapi/getRoadCheckWorkList";
    //获取巡查点记录
    private String urlRoadCheckWorkDetail = "http://10.5.1.48:16001/zdpm/extapi/getRoadCheckWorkList";
    //sQueryKey：t8m5py6eKdqpAi7lQBIbNQ==
    private String sQueryKey = "t8m5py6eKdqpAi7lQBIbNQ==";

    @Resource
    YjjyyManagerService yjjyyManagerService;

    @Scheduled(cron = "0 0 3 * * ?")
    private void siteSchedule() {
        try {
            yjjyyManagerService.synchronizationYjjy();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
