package com.zcloud.service.bus.impl;

import java.util.List;

import com.zcloud.mapper.dsno1.hidden.HiddenMapper;
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.HiddenService;

/**
 * 说明：隐患
 * 作者：luoxiaobao
 * 时间：2021-01-04
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class HiddenServiceImpl implements HiddenService{

	@Autowired
	private HiddenMapper hiddenMapper;

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

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

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

	/**修改信息
	 * @param pd
	 * @throws Exception
	 */
	public void editInfo(PageData pd)throws Exception{
		hiddenMapper.editInfo(pd);
	}
	public void editISCONFIRM(PageData pd)throws Exception{
		hiddenMapper.editISCONFIRM(pd);
	}
	public void editHIDDENLEVEL(PageData pd)throws Exception{
		hiddenMapper.editHIDDENLEVEL(pd);
	}

	/**提交隐患
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public void submit(PageData pd)throws Exception{
		hiddenMapper.submit(pd);
	}

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

	/**定时修改过期隐患
	 * @param pd
	 * @throws Exception
	 */
	public void editDeadline(PageData pd)throws Exception{
		hiddenMapper.editDeadline(pd);
	}

	/**验收
	 * @param pd
	 * @throws Exception
	 */
	public void check(PageData pd)throws Exception{
		hiddenMapper.check(pd);
	}

	/**复查
	 * @param pd
	 * @throws Exception
	 */
	public void review(PageData pd)throws Exception{
		hiddenMapper.review(pd);
	}

	/**整改
	 * @param pd
	 * @throws Exception
	 */
	public void rectify(PageData pd)throws Exception{
		hiddenMapper.rectify(pd);
	}

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

	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAll(PageData pd)throws Exception{
		return hiddenMapper.listAll(pd);
	}

	/**查询昨日过期隐患。发短信
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> getYestoday(PageData pd)throws Exception{
		return hiddenMapper.getYestoday(pd);
	}
	/**列表(全部,打印使用)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAllToPrint(PageData pd)throws Exception{
		return hiddenMapper.listAllToPrint(pd);
	}
	public List<PageData> listHiddenAll(PageData pd)throws Exception{
		return hiddenMapper.listHiddenAll(pd);
	}

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

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

	/**批量修改
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public void updateAll(PageData hiddens)throws Exception{
		hiddenMapper.updateAll(hiddens);
	}

	/**按日统计
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public List<PageData> hiddenStatisticsByDay(PageData pd)throws Exception{
		return hiddenMapper.hiddenStatisticsByDay(pd);
	}

	/**总数统计
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public List<PageData> hiddenStatisticsAll(PageData pd)throws Exception{
		return hiddenMapper.hiddenStatisticsAll(pd);
	}
	/**
	 *app首页 根据用户ID获取发现隐患信息
	 * @param pd CREATOR
	 * @return
	 * @throws Exception
	 */
	public 	List<PageData> getCountByCreatorId(PageData pd) throws Exception{
		return hiddenMapper.getCountByCreatorId(pd);
	}
	/**
	 *  app首页 根据用户ID获取整改隐患信息
	 * @param pd CREATOR
	 * @return
	 * @throws Exception
	 */
	public 	List<PageData> getCountByRectifiCationorId(PageData pd) throws Exception{
		return hiddenMapper.getCountByRectifiCationorId(pd);
	}

	/**
	 *  app首页根据用户ID获取待验收隐患
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> getCountByCheckorId(PageData pd) throws Exception{
		return hiddenMapper.getCountByCheckorId(pd);
	}

	/**
	 *根据企业ID获取驾驶舱隐患统计信息
	 * @return
	 * @throws Exception
	 */
	public 	List<PageData> getBICount(PageData pd) throws Exception{
		return hiddenMapper.getBICount(pd);
	}

	/**
	 * 清单其他隐患
	 * @return
	 * @throws Exception
	 */
	@Override
	public List<PageData> getOtherHidden(PageData pd) throws Exception {
		return hiddenMapper.getOtherHidden(pd);
	}

	/**
	 * 提交清单(其他)隐患
	 */
	@Override
	public void submitList(PageData pd) throws Exception {
		hiddenMapper.submitList(pd);
	}


	public 	List<PageData> getCountByHiddenType(PageData pd) throws Exception{
		return hiddenMapper.getCountByHiddenType(pd);
	}
	/**按日统计
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public List<PageData> getHiddenNum(PageData pd)throws Exception{
		return hiddenMapper.getHiddenNum(pd);
	}

	/**公司停止试用，删除所有隐患
	 * @param pd
	 * @throws Exception
	 */
	public void hiddenEndTrial(PageData pd)throws Exception{
		hiddenMapper.hiddenEndTrial(pd);
	}

	public List<PageData> getRectifyExamine(PageData pd)throws Exception{
		return hiddenMapper.getRectifyExamine(pd);
	}

	@Override
	public List<PageData> libraryList(Page page) {
		return hiddenMapper.librarylistPage(page);
	}

	@Override
	public void changeLibrary(PageData entity) throws Exception {
		hiddenMapper.changeLibrary(entity);
	}


}

