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.WaitPakOutCondition;
|
import com.slcf.pojo.WaitPakOutBean;
|
|
@Repository
|
public interface WaitPakOutDao {
|
|
/**
|
* 添加
|
* @param waitPakOut
|
* @return
|
*/
|
@Insert("insert into cust_wait_pakout(lgnum,tanum,tapos,matnr,maktx,werks,memo,modi_user,modi_time, "
|
+ " vsolm,meins,vltyp,vlpla,nltyp,nlpla,bname) "
|
+ " values(#{lgnum},#{tanum},#{tapos},#{matnr},#{maktx},#{werks},#{memo},#{modi_user},getdate(), "
|
+ " #{vsolm},#{meins},#{vltyp},#{vlpla},#{nltyp},#{nlpla},#{bname})")
|
public int insertWaitPakOut(WaitPakOutBean waitPakOut);
|
|
//分页查询所有信息
|
// @Select("select top (#{epage}) * from cust_wait_pakout where loc_no not in "
|
// @Select("select top (#{epage}) a.*,b.loc_desc loc_sts_name from cust_wait_pakout a,asr_bas_loc_type b where a.loc_sts=b.loc_sts and loc_no not in "
|
// + " (select top (#{spage}) loc_no from cust_wait_pakout order by loc_no asc) order by loc_no asc")
|
public List<WaitPakOutBean> queryWaitPakOutList(WaitPakOutCondition waitPakOutCon);
|
|
// //统计所有数据总数量
|
// @Select("select count(*) from cust_wait_pakout")
|
// public int getLocationCount();
|
|
//根据过滤条件统计总数量
|
public int getWaitPakOutCount(WaitPakOutCondition waitPakOutCon);
|
|
/**
|
* 查询所有
|
* @return
|
*/
|
@Select("select * from cust_wait_pakout order by sheet_no,mat_no desc")
|
public List<WaitPakOutBean> getWaitPakOutList();
|
|
/**
|
* 查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from cust_wait_pakout a left join bas_mat_code b on a.mat_no=b.mat_no where sheet_no=#{sheet_no} and a.mat_no=#{mat_no}")
|
public WaitPakOutBean getWaitPakOutById(@Param("sheet_no")String sheet_no,@Param("mat_no")String mat_no);
|
|
/**
|
* 根据物料号查询信息
|
* @param mat_no
|
* @return
|
*/
|
@Select("select * from cust_wait_pakout a left join bas_mat_code b on a.mat_no=b.mat_no where a.mat_no=#{mat_no}")
|
public WaitPakOutBean getWaitPakOutByMatNo(@Param("mat_no")String mat_no);
|
|
|
/**
|
* 根据库位号查询信息
|
* @param loc_no
|
* @return
|
*/
|
@Select("select * from cust_wait_pakout a left join bas_mat_code b on a.mat_no=b.mat_no where loc_no=#{loc_no}")
|
public WaitPakOutBean getWaitPakOutByLocNo(@Param("loc_no")String loc_no);
|
|
//更新
|
@Update("update cust_wait_pakout set io_status=#{io_status},memo=#{memo},nista=#{nista},action=#{action},prnstatus=#{prnstatus},modi_time=getdate() "
|
+ " where lgnum=#{lgnum} and tanum=#{tanum} and tapos=#{tapos}")
|
public int upWaitPakOut(WaitPakOutBean WaitPakOut);
|
|
//根据库位信息更新
|
@Update("update cust_wait_pakout set io_status=#{io_status},memo=#{memo},modi_user=#{modi_user},modi_time=getdate() "
|
+ " where lgnum=#{lgnum} and tanum=#{tanum} and tapos=#{tapos} and matnr=#{matnr}")
|
public int upWaitPakOutByLocNo(WaitPakOutBean WaitPakOut);
|
|
//根据id删除工作信息
|
@Delete("delete from cust_wait_pakout where lgnum=#{lgnum} and tanum=#{tanum} and tapos=#{tapos}")
|
public int delWaitPakOutById(WaitPakOutBean WaitPakOut);
|
|
//待删除资料,先插入日志档
|
@Insert("insert into cust_wait_pakout_log select * from cust_wait_pakout where lgnum=#{lgnum} and tanum=#{tanum} and tapos=#{tapos} and matnr=#{matnr}")
|
public int insertLog(WaitPakOutBean WaitPakOut);
|
|
/**
|
* 查询所有单号
|
* @return
|
*/
|
@Select("select distinct sheet_no from cust_wait_pakout group by sheet_no")
|
public List<WaitPakOutBean> getSheetNoList();
|
|
//根据库位号删除通知档信息
|
@Delete("delete from cust_wait_pakout where loc_no=#{loc_no}")
|
public int delWaitPakOutByLocNo(@Param("loc_no")String loc_no);
|
|
/**
|
* 查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from cust_wait_pakout where lgnum=#{lgnum} and tanum=#{tanum} and tapos=#{tapos}")
|
public WaitPakOutBean getWaitPakOutByNum(WaitPakOutBean waitPakOut);
|
|
/**
|
* 查询最早一笔待反馈SAP数据
|
* @return
|
*/
|
@Select("select top 1 * from cust_wait_pakout where io_status='Y' or io_status='X' order by io_status desc,modi_time asc")
|
public WaitPakOutBean getWaitPakOutFnh();
|
|
/**
|
* 查询最早一笔待打印标签数据,action=2单独打印模式,prnstatus=1需求打印状态
|
* @return
|
*/
|
@Select("select top 1 * from cust_wait_pakout where status='Y' and io_status='N' and action=2 and prnstatus=1 order by io_status desc,modi_time asc")
|
public WaitPakOutBean getWaitPakOutPrint();
|
}
|