package com.saye.hospitalgd.service.quartz.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.saye.hospitalgd.mapper.quzrtz.BaseQuartzConfigMapper;
import com.saye.hospitalgd.model.BaseQuartzConfigEntity;
import com.saye.hospitalgd.service.quartz.BaseQuartzConfigService;

@Service
@Transactional
public class BaseQuartzConfigServiceImpl implements BaseQuartzConfigService{

	@Autowired
	private BaseQuartzConfigMapper baseQuartzConfigMapper;
	
	@Override
	public List<BaseQuartzConfigEntity> findAll(HashMap<Object, Object> map) throws Exception {
		
		return this.baseQuartzConfigMapper.findAll(map);
	}

	@Override
	public BaseQuartzConfigEntity get(String id) throws Exception {
		
		return this.baseQuartzConfigMapper.findEntityById(id);
	}

	@Override
	public void updateQuartzConfig(BaseQuartzConfigEntity quartzConfigEntity) throws Exception {
		
		this.baseQuartzConfigMapper.updateQuartzConfigByEntity(quartzConfigEntity);
	}

	@Override
	public List<HashMap<Object, Object>> findMaxId() throws Exception {
		
		return this.baseQuartzConfigMapper.findMaxId();
	}

	
	@Override
	public void addQuartz(HashMap<Object, Object> addMap) throws Exception {
		this.baseQuartzConfigMapper.addQuartz(addMap);
	}

	/**
	 * 查询采购任务类型
	 */
	@Override
	public List<HashMap<Object, Object>> findOrderProjectList() throws Exception {
		
		return this.baseQuartzConfigMapper.findOrderProjectList();
	}

	/**
	 * 删除定时任务
	 */
	@Override
	public void deleteQuartzConfigById(String id) throws Exception {
		this.baseQuartzConfigMapper.deleteQuartzConfigById(id);
	}

	/**
	 * 修改定时任务
	 */
	@Override
	public void updateQuartzConfigById(HashMap<Object, Object> updateMap) throws Exception {
		this.baseQuartzConfigMapper.updateQuartzConfigById(updateMap);
	}



}
