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

import net.northking.cctp.dw.db.dao.MidTestPointDao;
import net.northking.cctp.dw.db.entity.MidProjectInfo;
import net.northking.cctp.dw.db.entity.MtTestChart;
import net.northking.cctp.dw.db.service.MidTestPointService;
import net.northking.cctp.dw.db.entity.MidTestPoint;

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

import net.northking.cctp.dw.dto.MidTestPointDetailDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 测试点中间表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2021-12-14 18:32:57  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "MidTestPointServiceImpl")
public class MidTestPointServiceImpl extends PaginationService<MidTestPoint> implements MidTestPointService
{
private static final Logger logger = LoggerFactory.getLogger(MidTestPointServiceImpl.class);

  private final MidTestPointDao midTestPointDao;

  public MidTestPointServiceImpl(MidTestPointDao midTestPointDao) {this.midTestPointDao = midTestPointDao;}

  public BasicDao<MidTestPoint> getDao() {return midTestPointDao;}

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

  @Override
  protected void beforeInsert(MidTestPoint midTestPoint) {

  }

  @Override
  protected void beforeUpdate(MidTestPoint midTestPoint) {

  }

  @Override
  public List<MtTestChart> createTestPointProgress(String tenantId) {
    return midTestPointDao.createTestPointProgress(tenantId);
  }

  @Override
  public List<MidTestPointDetailDto> testPointPie(String projectId) {
    return midTestPointDao.testPointPie(projectId);
  }

  @Override
  public Integer countTestPointData(List<MidProjectInfo> midProjectInfos,String tenantId) {
    return midTestPointDao.countTestPointData(midProjectInfos,tenantId);
  }

  @Override
  public List<MidTestPoint> findByTenantId(List<MidProjectInfo> midProjectInfos) {
    return midTestPointDao.findByTenantId(midProjectInfos);
  }

  @Override
  public void deleteByData(List<MidProjectInfo> midProjectInfos) {
    midTestPointDao.deleteByData(midProjectInfos);
  }

}

