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.Select;
|
import org.apache.ibatis.annotations.Update;
|
import org.springframework.stereotype.Repository;
|
|
import com.slcf.bean.MatCodeCondition;
|
import com.slcf.pojo.LocDetailBean;
|
import com.slcf.pojo.MatCodeBean;
|
import com.slcf.pojo.WorkDetailBean;
|
|
@Repository
|
public interface MatCodeDao {
|
|
/**
|
* 添加
|
* @param matCode
|
* @return
|
*/
|
@Insert("insert into bas_mat_code(mat_no,mat_name,str1,str2,str3,str4,str5,"
|
+ " str6,str7,str8,str9,str10,str11,str12,str13,str14,str15, "
|
+ " str16,str17,str18,str19,str20,str21,str22,str23, "
|
+ " num1,num2,num3,num4,num5,num6,date1,barcode) "
|
+ " values(#{mat_no},#{mat_name},#{str1},#{str2},#{str3},#{str4},#{str5},"
|
+ " #{str6},#{str7},#{str8},#{str9},#{str10},#{str11},#{str12},#{str13},#{str14},#{str15}, "
|
+ " #{str16},#{str17},#{str18},#{str19},#{str20},#{str21},#{str22},#{str23},"
|
+ " #{num1},#{num2},#{num3},#{num4},#{num5},#{num6},#{date1},#{barcode})")
|
public int insertMatCode(MatCodeBean MatCode);
|
|
/**
|
* 分页查询所有信息
|
* @param matCodeCon
|
* @return
|
*/
|
public List<MatCodeBean> queryMatCodeList(MatCodeCondition matCodeCon);
|
|
/**
|
* 根据箱号查询
|
* @param matCodeCon
|
* @return
|
*/
|
@Select("select * from bas_mat_code where mat_no=#{mat_no}")
|
public List<MatCodeBean> queryMatCodeByNo(MatCodeCondition matCodeCon);
|
|
@Select("select count(*) from bas_mat_code where mat_no=#{mat_no}")
|
public int getMatCountByNo(MatCodeCondition matCodeCon);
|
|
/**
|
* 不分页查询所有信息,用于excel导出
|
* @param matCodeCon
|
* @return
|
*/
|
public List<MatCodeBean> getMatCodeAll(MatCodeCondition matCodeCon);
|
|
// //统计所有数据总数量
|
// @Select("select count(*) from bas_mat_code")
|
// public int getMatCodeCount();
|
|
//根据过滤条件统计总数量
|
public int getMatCodeCount(MatCodeCondition matCodeCon);
|
|
/**
|
* 查询所有
|
* @return
|
*/
|
@Select("select * from bas_mat_code order by mat_no asc")
|
public List<MatCodeBean> getMatCodeList();
|
|
/**
|
* 根据id查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from bas_mat_code where mat_no=#{id}")
|
public MatCodeBean getMatCodeById(String id);
|
|
/**
|
* 根据barcode查询信息
|
* @param id
|
* @return
|
*/
|
@Select("select * from bas_mat_code where barcode=#{id}")
|
public MatCodeBean getMatCodeByBarcode(String id);
|
|
//更新
|
@Update("update bas_mat_code set mat_name=#{mat_name},str1=#{str1},str2=#{str2},str3=#{str3}, "
|
+ " str4=#{str4},str5=#{str5},str6=#{str6},str7=#{str7},str8=#{str8},str9=#{str9}, "
|
+ " str10=#{str10},num1=#{num1},num2=#{num2},num3=#{num3},num4=#{num4},num5=#{num5}, "
|
+ " modi_user=#{modi_user},modi_time=getdate() where mat_no=#{mat_no}")
|
public int upMatCode(MatCodeBean MatCode);
|
|
//组托,更新条码
|
@Update("update bas_mat_code set barcode=#{barcode},modi_time=getdate() where mat_no=#{mat_no}")
|
public int upMatBarcode(MatCodeBean MatCode);
|
|
//根据id删除工作信息
|
@Delete("delete from bas_mat_code where mat_no=#{id}")
|
public int delMatCodeById(String id);
|
|
//根据id删除工作信息
|
@Delete("delete from bas_mat_code where mat_no in (#{id})")
|
public int delMatCodesById(String id);
|
|
/**
|
* 查询库存中物料号是否存在
|
* @return
|
*/
|
@Select("select * from asr_loc_detl where mat_no=#{mat_no}")
|
public List<LocDetailBean> getLocMatNoList(String mat_no);
|
|
/**
|
* 查询工作档中物料号是否存在
|
* @return
|
*/
|
@Select("select * from asr_wrk_detl where mat_no=#{mat_no}")
|
public List<WorkDetailBean> getWrkMatNoList(String mat_no);
|
}
|