package com.zfire.jiasm.syncdata.download.other.accessories;

import lombok.extern.slf4j.Slf4j;

/** 未上线 新做的接口
 * 配件查询接口
 * 根据原件配件编码查询通用配件、适用机型
 */
@Slf4j
// @Component
public class AccessoriesQuery {
    /*
    @Value("${pjcxc}")
    private String pjcxc = "";

    @Resource
    TableDataQueryTimeService tableDataQueryTimeService;
    @Resource
    OtherDownService otherDownService;

    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Scheduled(fixedDelayString = "${pjcx}")
    public void getInfo(){
        if (pjcxc.equals(TaskConfigEnum.FALSE.getCode())){
            return;
        }

        // 提取数据
        List<TableDataQueryTime> tdqts = tableDataQueryTimeService.lambdaQuery()
                .eq(TableDataQueryTime::getType,4)
                .eq(TableDataQueryTime::getSynStatus,0)
                .eq(TableDataQueryTime::getNeedDown,1)
                .list();
        log.info("开始配件查询下载: \uF0B7{}",sdf.format(new Date()));

        for (TableDataQueryTime item:tdqts){
            try{
                // 配件查询
                otherDownService.accessories(item);
            } catch (Exception ex) {
                ex.printStackTrace();
                log.info("配件查询下载数据失败");
            }
        }
        log.info("配件查询下载结束: \uF0B7{}",sdf.format(new Date()));
    }*/

}
