package com.zcloud.service.bus.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.video.AIWarningMapper;
import com.zcloud.service.bus.AIWarningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：AI报警
 * 作者：luoxiaobao
 * 时间：2022-09-21
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class AIWarningServiceImpl implements AIWarningService {

	@Autowired
	private AIWarningMapper aiwarningMapper;

	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void save(PageData pd)throws Exception{
		aiwarningMapper.save(pd);
	}
	/**新增
	 * @param pd
	 * @throws Exception
	 */
	public void addPeople(PageData pd)throws Exception{
		aiwarningMapper.addPeople(pd);
	}
	/**
	 * 获取该相关方名称是否重复
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByName(PageData pd) throws Exception {
		return aiwarningMapper.findByName(pd);
	}
	/**删除
	 * @param pd
	 * @throws Exception
	 */
	public void delete(PageData pd)throws Exception{
		aiwarningMapper.delete(pd);
	}

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

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

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

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

	/**批量删除
	 * @param ArrayDATA_IDS
	 * @throws Exception
	 */
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		aiwarningMapper.deleteAll(ArrayDATA_IDS);
	}
	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> getPeopleListByIds(PageData pd)throws Exception{
		return aiwarningMapper.getPeopleListByIds(pd);
	}

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

	/**查询处置人列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> getDisposerList(PageData pd)throws Exception{
		return aiwarningMapper.getDisposerList(pd);
	}

	/**删除报警处置人
	 * @param pd
	 * @throws Exception
	 */
	public void updateByDisposer(PageData pd)throws Exception{
		aiwarningMapper.updateByDisposer(pd);
	}
}

