package com.zcloud.service.bus.impl;

import java.util.List;

import com.zcloud.mapper.dsno2.check.CheckRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CheckRecordService;

/**
 * 说明：清单检查记录
 * 作者：luoxiaobao
 * 时间：2021-01-04
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class CheckRecordServiceImpl implements CheckRecordService{

	@Autowired
	private CheckRecordMapper checkrecordMapper;

	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void save(PageData pd)throws Exception{
		checkrecordMapper.save(pd);
	}

	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void delete(PageData pd)throws Exception{
		checkrecordMapper.delete(pd);
	}

	/**修改
	 * @param pd
	 * @throws Exception
	 */
	public void edit(PageData pd)throws Exception{
		checkrecordMapper.edit(pd);
	}

	/**清单逾期检查记录数
	 * @param pd
	 * @throws Exception
	 */
	public int countOverTime(PageData pd)throws Exception{
		return checkrecordMapper.countOverTime(pd);
	}

	/**列表
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> list(Page page)throws Exception{
		return checkrecordMapper.datalistPage(page);
	}


	/**节假日分页
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> listAllList(Page page)throws Exception{
		return checkrecordMapper.listlistPage(page);
	}
	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAll(PageData pd)throws Exception{
		return checkrecordMapper.listAll(pd);
	}

	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAllUnfinished(PageData pd)throws Exception{
		return checkrecordMapper.listAllUnfinished(pd);
	}
	/**通过清单ID获取风险点数据
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> findRiskPointByLId(PageData pd)throws Exception{
		return checkrecordMapper.findRiskPointByLId(pd);
	}

	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return checkrecordMapper.findById(pd);
	}

	/**批量删除
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		checkrecordMapper.deleteAll(ArrayDATA_IDS);
	}


	/* 统计功能 */
	@Override
	public List<PageData> listCountDay(PageData pd) throws Exception {
		return checkrecordMapper.listCountDay(pd);
	}

	@Override
	public List<PageData> listCountWeek(PageData pd) throws Exception {
		return checkrecordMapper.listCountWeek(pd);
	}

	@Override
	public List<PageData> listCountTenDays(PageData pd) throws Exception {
		return checkrecordMapper.listCountTenDays(pd);
	}

	@Override
	public List<PageData> listCountMonth(PageData pd) throws Exception {
		return checkrecordMapper.listCountMonth(pd);
	}

	@Override
	public List<PageData> listCountQuarter(PageData pd) throws Exception {
		return checkrecordMapper.listCountQuarter(pd);
	}

	@Override
	public List<PageData> listCountHalfYear(PageData pd) throws Exception {
		return checkrecordMapper.listCountHalfYear(pd);
	}

	@Override
	public List<PageData> listCountYear(PageData pd) throws Exception {
		return checkrecordMapper.listCountYear(pd);
	}

	@Override
	public Integer listCountJjr(PageData pd) throws Exception {
		return checkrecordMapper.listCountJjr(pd);
	}

	/**修改统计状态
	 * @param pd
	 * @throws Exception
	 */
	public void editStatistics(PageData pd)throws Exception{
		checkrecordMapper.editStatistics(pd);
	}

	/**
	 * 查询辨识部位检查记录
	 * @param pd
	 * @return
	 */
	public List<PageData> listLogByIde(PageData pd)throws Exception{
		return checkrecordMapper.listLogByIde(pd);
	}

	/**
	 * 指定辨识部位检查记录
	 * @param pd
	 * @return
	 */
	public List<PageData> recordByIde(PageData pd)throws Exception{
		return checkrecordMapper.recordByIde(pd);
	}

	/**补录
	 * @param pd
	 * @throws Exception
	 */
	public void recording(PageData pd)throws Exception{
		checkrecordMapper.recording(pd);
	}

	/**APP清单检查记录
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> appdatalist(PageData pd)throws Exception{
		return checkrecordMapper.appdatalist(pd);
	}

	/**删除清单检查记录（公司试用结束时使用）
	 * @param pd
	 * @throws Exception
	 */
	public void deleteByCorp(PageData pd)throws Exception{
		checkrecordMapper.deleteByCorp(pd);
	}

	public List<PageData> getCheckExamine(PageData pd)throws Exception{
		return checkrecordMapper.getCheckExamine(pd);
	}
}

