package cn.com.ty.lift.batch.applet.util;

import cn.com.ty.lift.batch.applet.constants.DataStatisticsConstants;
import cn.com.ty.lift.batch.applet.dao.model.request.CommonRequest;
import cn.com.ty.lift.batch.applet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author huangyuan
 * @date 2020/2/10
 * @description 数据初始化工具
 */
@Component
@Slf4j
public class DataInitUtil {

    @Resource
    private MaintenanceDataService maintenanceDataService;

    @Resource
    private EmergencyRepairDataService emergencyRepairDataService;

    @Resource
    private PaymentDataService paymentDataService;

    @Resource
    private LiftDataService liftDataService;

    @Resource
    private ContractDataService contractDataService;

    @Resource
    private AnnualInspectionDataService annualInspectionDataService;

    /**
     * @param
     * @return
     * @description 小程序初始化放入缓存中
     * @date 2020/2/10 11:55 上午
     */
    public void initAppletData() {
        //除维保以外其他统计类数据获取数据时间段: 3年前 - 当前时间
        CommonRequest otherCommonRequest = DataStatisticsUtil.initCommonRequest(-3L,
                DataStatisticsConstants.INTERVAL_TYPE_YEAR);
    }

}