package com.slcf.dao;
|
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Delete;
|
import org.apache.ibatis.annotations.Insert;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Update;
|
import org.springframework.stereotype.Repository;
|
|
import com.slcf.pojo.IoTypeBean;
|
|
@Repository
|
public interface IoTypeDao {
|
|
// /**
|
// *根据名称或id验证是否唯一
|
// * @param map
|
// * @return
|
// */
|
// public List<IoTypeBean> getIoTypeByCon(Map<String,Object>map);
|
|
/**
|
* 添加工作状态
|
* @param IoType
|
* @return
|
*/
|
@Insert("insert into asr_bas_wrk_iotype(io_type,io_desc,modi_user,modi_time) values(#{io_type},#{io_desc},#{modi_user},getdate())")
|
public int insertIoType(IoTypeBean ioType);
|
|
|
//分页查询所有工作状态信息
|
// @Select("select * from tb_dept ORDER BY dept_id desc LIMIT #{spage},#{epage}")
|
@Select("select top (#{epage}) * from asr_bas_wrk_iotype where io_type not in "
|
+ "(select top (#{spage}) io_type from asr_bas_wrk_iotype order by io_type asc) order by io_type asc")
|
public List<IoTypeBean> queryIoTypeList(@Param("spage")int spage,@Param("epage")int epage);
|
|
//统计所有数据总数量
|
@Select("select count(*) from asr_bas_wrk_iotype")
|
public int getIoTypeCount();
|
|
/**
|
* 查询所有
|
* @return
|
*/
|
@Select("select * from asr_bas_wrk_iotype order by io_type asc")
|
public List<IoTypeBean> getIoTypeList();
|
|
/**
|
* 根据id查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from asr_bas_wrk_iotype where io_type=#{id}")
|
public IoTypeBean getIoTypeById(int id);
|
|
//更新
|
@Update("update asr_bas_wrk_iotype set wrk_desc=#{wrk_desc},modi_user=#{modi_user},modi_time=getdate() where io_type=#{io_type}")
|
public int upIoType(IoTypeBean ioType);
|
|
//根据id删除工作信息
|
@Delete("delete from asr_bas_wrk_iotype where io_type=#{id}")
|
public int delIoTypeById(int id);
|
|
}
|