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.RowNoBean;
|
|
@Repository
|
public interface RowNoDao {
|
|
/**
|
* 添加
|
* @param rowNo
|
* @return
|
*/
|
@Insert("insert into asr_row_lastno(whs_type,wrk_mk,current_row,s_row,e_row,crn_qty,memo,modi_user,modi_time) "
|
+ " values(#{whs_type},#{wrk_mk},#{current_row},#{s_row},#{e_row},#{crn_qty},#{memo},#{modi_user},getdate())")
|
public int insertRowNo(RowNoBean rowNo);
|
|
|
//分页查询所有信息
|
// @Select("select * from tb_dept ORDER BY dept_id desc LIMIT #{spage},#{epage}")
|
@Select("select top (#{epage}) * from asr_row_lastno where whs_type not in "
|
+ " (select top (#{spage}) whs_type from asr_row_lastno order by whs_type asc) order by whs_type asc")
|
public List<RowNoBean> queryRowNoList(@Param("spage")int spage,@Param("epage")int epage);
|
|
//统计所有数据总数量
|
@Select("select count(*) from asr_row_lastno")
|
public int getRowNoCount();
|
|
/**
|
* 查询所有
|
* @return
|
*/
|
@Select("select * from asr_row_lastno order by whs_type asc")
|
public List<RowNoBean> getRowNoList();
|
|
/**
|
* 根据id查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from asr_row_lastno where whs_type=#{id}")
|
public RowNoBean getRowNoById(int id);
|
|
//更新
|
@Update("update asr_row_lastno set wrk_mk=#{wrk_mk},current_row=#{current_row},s_row=#{s_row},e_row=#{e_row},"
|
+ " crn_qty=#{crn_qty},memo=#{memo},modi_user=#{modi_user},modi_time=getdate() "
|
+ " where whs_type=#{whs_type}")
|
public int upRowNo(RowNoBean rowNo);
|
|
//根据id删除工作信息
|
@Delete("delete from asr_row_lastno where whs_type=#{id}")
|
public int delRowNoById(int id);
|
|
}
|