package cn.yw.zxld.dao;

import cn.base.dao.BaseSqlMapDAO;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Repository("zxldDao")
public class ZxldDao extends BaseSqlMapDAO {


    /**
     * 增加记录
     */
    public void insert_Zxld(Map map) throws SQLException {
        this.insert("insert_Zxld", map);
    }

    /**
     * 批处理增加记录
     */
    public void batch_insert_Zxld(List batch) throws SQLException {
        this.insert("batch_insert_Zxld", batch);
    }

    /**
     * 修改记录
     */
    public Integer update_Zxld(Map map) throws SQLException {
        return this.update("update_Zxld", map);
    }
    /**
     * 修改备注和维修状态记录
     */
    public Integer update_ZxldRemarks(Map map) throws SQLException {
        return this.update("update_ZxldRemarks", map);
    }

    public Integer delete_channelset_Zxld(Map map) throws SQLException {
        return this.delete("delete_channelset_Zxld", map);
    }

    /**
     * 删除记录
     */
    public Integer delete_Zxld(Map map) throws SQLException {
        return this.delete("delete_Zxld", map);
    }

    /**
     * 批处理删除记录
     */

    public Integer batch_delete_Zxld(Map m) throws SQLException {
        return this.delete("batch_delete_Zxld", m);
    }

    public Integer batch_update_Zxld(Map m) throws SQLException {
        return this.update("batch_update_Zxld", m);
    }

    /**
     * 查询总数
     */
    public Integer count_Zxld(Map map) throws SQLException {
        return (Integer) this.queryForObject("count_Zxld", map);
    }

    /**
     * 查询列表记录
     */

    public List<Map> query_Zxld(Map map) throws SQLException {
        return this.queryForPage("query_Zxld", map);
    }

    public List<Map> query_Zxld_children(Map map) throws SQLException {
        return this.queryForList("query_Zxld_children", map);
    }

    public List<Map> getApproveUser(Map map) throws SQLException {
        return this.queryForList("getApproveUser", map);
    }

    /**
     * 查询列表记录
     */
    public Map get_Zxld(Map map) throws SQLException {
        return (Map) this.queryForObject("get_Zxld", map);
    }

    public List<Map> query_ZxldtaskByPage(Map map) throws SQLException {
        return this.queryForPage("query_Zxldtask", map);
    }

    public Integer count_Zxldtask(Map map) throws SQLException {
        return (Integer) this.queryForObject("count_Zxldtask", map);
    }

    public List<Map> query_ZxldNotaskByPage(Map map) throws SQLException {
        return this.queryForPage("query_ZxldNotask", map);
    }

    public Integer count_ZxldNotask(Map map) throws SQLException {
        return (Integer) this.queryForObject("count_ZxldNotask", map);
    }

    public Integer batchdelete_Zxld(Map map) throws SQLException {
        return this.delete("batchdelete_Zxld", map);
    }

    public void batchinsert_Zxld(List map) throws SQLException {
        this.insert("batchinsert_Zxld", map);
    }

    // 更新
    public Integer edit_Zxld(Map map) throws SQLException {
        return this.update("edit_Zxld", map);
    }

    public Map statisticsZxldRate() throws SQLException {
        return (Map) this.queryForObject("statisticsZxldRate", null);
    }

    public List<Map> query_ZxldcurrentstateByPage(Map map) throws SQLException {
        return (List<Map>) this.queryForPage("query_Zxldcurrentstate", map);
    }

    public List<Map> query_Zxldcurrentstate(Map map) throws SQLException {
        return (List<Map>) this.queryForList("query_Zxldcurrentstate", map);
    }

    public Integer count_currentstate(Map map) throws SQLException {
        return (Integer) this.queryForObject("count_currentstate", map);
    }

    public List<Map> listZxldHistoryStateByPage(Map map) throws SQLException {
        return (List<Map>) this.queryForPage("query_ZxldHistoryState", map);
    }

    public Integer count_ZxldHistoryState(Map map) throws SQLException {
        return (Integer) this.queryForObject("count_Zxldhistorystate", map);
    }

    public Integer updateZxldByXh(Map map) throws SQLException {
        return this.update("updateZxldByXh", map);
    }

    public Integer update_ZxldCurrentState(Map map) throws SQLException {
        return this.update("update_ZxldCurrentState", map);
    }

}
