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.bean.WaitCheckCondition;
|
import com.slcf.pojo.WaitCheckBean;
|
|
@Repository
|
public interface WaitCheckDao {
|
|
/**
|
* 添加
|
* @param waitCheck
|
* @return
|
*/
|
@Insert("insert into cust_wait_check(lgnum,ivnum,ivpos,lqnum,matnr,maktx,werks,lgtyp,lgpla, "
|
+ " memo,modi_time) "
|
+ " values(#{lgnum},#{ivnum},#{ivpos},#{lqnum},#{matnr},#{maktx},#{werks},#{lgtyp},#{lgpla}, "
|
+ " #{memo},getdate())")
|
public int insertWaitCheck(WaitCheckBean waitCheck);
|
|
//分页查询所有信息
|
public List<WaitCheckBean> queryWaitCheckList(WaitCheckCondition waitCheckCon);
|
|
// //统计所有数据总数量
|
// @Select("select count(*) from cust_wait_check")
|
// public int getLocationCount();
|
|
//根据过滤条件统计总数量
|
public int getWaitCheckCount(WaitCheckCondition waitCheckCon);
|
|
/**
|
* 查询所有
|
* @return
|
*/
|
@Select("select * from cust_wait_check order by sheet_no,mat_no desc")
|
public List<WaitCheckBean> getWaitCheckList();
|
|
/**
|
* 查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from cust_wait_check where lgnum=#{lgnum} and tbnum=#{tbnum} and tbpos=#{tbpos} and zmatid=#{zmatid}")
|
public WaitCheckBean getWaitCheckById(WaitCheckBean waitCheck);
|
|
//更新
|
@Update("update cust_wait_check set qty=#{qty},ctns=#{ctns},wt=#{wt},memo=#{memo},modi_user=#{modi_user},modi_time=getdate(), "
|
+ " loc_no=#{loc_no}, sta_no=#{sta_no},type=#{type},in_qty=#{in_qty},barcode=#{barcode} "
|
+ " where sheet_no=#{sheet_no} and mat_no=#{mat_no}")
|
public int upWaitCheck(WaitCheckBean waitCheck);
|
|
//根据id删除工作信息
|
@Delete("delete from cust_wait_check where lgnum=#{lgnum} and ivnum=#{ivnum} and ivpos=#{ivpos}")
|
public int delWaitCheckById(WaitCheckBean waitCheckBean);
|
|
//待删除资料,先插入日志档
|
@Insert("insert into cust_wait_check_log select * from cust_wait_check where lgnum=#{lgnum} and ivnum=#{ivnum} and ivpos=#{ivpos}")
|
public int insertLog(WaitCheckBean waitCheckBean);
|
|
/**
|
* 根据条码查询通知档
|
* @return
|
*/
|
@Select("select * from cust_wait_check a left join bas_mat_code b on a.mat_no=b.mat_no "
|
+ "where barcode=#{barcode} order by sheet_no,a.mat_no desc")
|
public List<WaitCheckBean> getApiWaitCheckList(@Param("barcode")String barcode);
|
}
|