package com.ruoyi.benyun.utils.statistics;

import com.ruoyi.benyun.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Together {
    @Autowired
    StoreWdOpcloseStat opcloseStat;
    @Autowired
    StoreWdOpcloseDao opcloseDao;
    @Autowired
    BrandZoneStat zoneStat;
    @Autowired
    BrandZoneDao zoneDao;
    @Autowired
    BrandCityStat cityStat;
    @Autowired
    BrandCityDao cityDao;
    @Autowired
    BrandProvinceStat provinceStat;
    @Autowired
    BrandProvinceDao provinceDao;
    @Autowired
    BrandBusinessStat businessStat;
    @Autowired
    BrandBusinessDao businessDao;
    @Autowired
    BrandStat stat;
    @Autowired
    BrandStatisticsDao statisticsDao;

    public void start(){
        System.out.println("开关时间统计开始······");
        opcloseDao.delete(null);
        opcloseStat.continueInsertAll();
        System.out.println("开关时间统计结束······");
        System.out.println("品牌区统计开始······");
        zoneDao.delete(null);
        zoneStat.continueQuicklyInsert();
        System.out.println("品牌区统计结束······");
        System.out.println("品牌市统计开始······");
        cityDao.delete(null);
        cityStat.continueInsert();
        System.out.println("品牌市统计结束······");
        System.out.println("品牌省统计开始······");
        provinceDao.delete(null);
        provinceStat.continueInsert();
        System.out.println("品牌省统计结束······");
        System.out.println("品牌营业状态统计开始······");
        businessDao.delete(null);
        businessStat.continueInsert();
        System.out.println("品牌营业状态统计结束······");
        System.out.println("品牌总体统计开始······");
        statisticsDao.delete(null);
        stat.continueInsertPlus2();
        System.out.println("品牌总体统计结束······");
    }
}
