/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2021 . All rights reserved.
 *
 */
package net.northking.cctp.dw.db.impl;

import net.northking.cctp.common.db.PaginationService;
import net.northking.cctp.dw.db.dao.ProgressChartPrepareDao;
import net.northking.cctp.dw.db.entity.MidProjectInfo;
import net.northking.cctp.dw.db.service.ProgressChartPrepareService;
import net.northking.cctp.dw.db.entity.ProgressChartPrepare;

import net.northking.cctp.common.db.BasicDao;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


/**
 * 进度图数据准备
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2021-12-30 16:06:16  <br>
 *
 * @author: maven-cctp-plugin  <br>
 * @since: 1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "ProgressChartPrepareServiceImpl")
public class ProgressChartPrepareServiceImpl extends PaginationService<ProgressChartPrepare> implements ProgressChartPrepareService {
    private static final Logger logger = LoggerFactory.getLogger(ProgressChartPrepareServiceImpl.class);

    private final ProgressChartPrepareDao progressChartPrepareDao;

    public ProgressChartPrepareServiceImpl(ProgressChartPrepareDao progressChartPrepareDao) {
        this.progressChartPrepareDao = progressChartPrepareDao;
    }

    public BasicDao<ProgressChartPrepare> getDao() {
        return progressChartPrepareDao;
    }

    public ProgressChartPrepare createEntity() {
        return new ProgressChartPrepare();
    }

    @Override
    protected void beforeInsert(ProgressChartPrepare progressChartPrepare) {
        progressChartPrepare.setCreatedTime(new Date());
    }

    @Override
    protected void beforeUpdate(ProgressChartPrepare progressChartPrepare) {

    }

    @Override
    public List<ProgressChartPrepare> queryToday(List<MidProjectInfo> midProjectInfos) {
        return progressChartPrepareDao.queryToday(midProjectInfos);
    }

    @Override
    public Integer queryTodayDeleted(List<MidProjectInfo> dataList) {
        return progressChartPrepareDao.queryTodayDeleted(dataList);
    }

}

