package com.mandi.fendan.mapper; import java.util.List; import java.util.Map; 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 com.mandi.basicconfig.persist.Ncfhdq; import com.mandi.fendan.persist.Fd_Company; import com.mandi.fendan.persist.Fd_wlgs_fhdq; /** * 发货地区 * */ public interface Fd_fhdqMapper { //分页 public List> getlist(Map mp); public int count(Map mp); @Select("select * from fd_wlgs_fhdq where fhdqNo=#{fhdqNo}") public List getbydqNo(String fhdqNo); @Select("select b.* from fd_wlgs_fhdq a left join fd_company b on a.wlgsNo=b.companyNo where a.fhdqNo=#{fhdqNo} and a.ywdyNo=#{ywdyNo} ") public List getCbyNo(@Param("fhdqNo")String fhdqNo,@Param("ywdyNo") String ywdyNo); @Select("select b.* from fd_wlgs_fhdq a left join fd_company b on a.wlgsNo=b.companyNo where a.fhdqNo=#{fhdqNo} and a.ywdyNo=#{ywddNo} " + "and EXISTS (SELECT 1 from fd_company_ywdy c where b.companyNo=c.companyNo and c.ywdyNo=#{ywdyNo} ) ") public List getCbyNoandsNo(@Param("fhdqNo") String fhdqNo,@Param("ywdyNo") String ywdyNo,@Param("ywddNo") String ywddNo); @Select("SELECT * from nc_dq where code=#{code} ") public Ncfhdq getbyCode(String code); @Select("select * from nc_dq where code like #{fhdqNo}+'%' ") public List getLikebydqNo(String fhdqNo); @Delete("delete from fd_wlgs_fhdq where fhdqNo=#{fhdqNo} and ywdyNo=#{ywdyNo} ") public int delbyCode(@Param("fhdqNo") String fhdqNo,@Param("ywdyNo")String ywdyNo); @Delete("delete from fd_wlgs_fhdq where wlgsNo=#{wlgsNo} ") public int delbywlgsCode(String wlsgNo); @Delete("delete from fd_wlgs_fhdq where wlsgNo=#{wlsgNo} and fhdqNo=#{fhdqNo} ") public int delbyCodes(@Param("wlsgNo")String wlsgNo,@Param("fhdqNo")String fhdqNo); @Insert("insert into fd_wlgs_fhdq (wlgsNo,fhdqNo,ywdyNo) values (#{wlgsNo},#{fhdqNo},#{ywdyNo}) ") public int insertWlsg_fhdq(Fd_wlgs_fhdq wldq); @Select("select * from fd_wlgs_fhdq where wlgsNo=#{wlgsNo} and fhdqNo=#{fhdqNo} and ywdyNo=#{ywdyNo} ") public Fd_wlgs_fhdq getbyNos(@Param("wlgsNo") String wlgsNo,@Param("fhdqNo") String fhdqNo,@Param("ywdyNo") String ywdyNo); // 判断提单权限 @Select("select * from fd_wlgs_fhdq where wlgsNo=#{wlgsNo} and fhdqNo=#{fhdqNo} and ywdyNo=#{ywdyNo} ") public Fd_wlgs_fhdq getbyNos1(@Param("wlgsNo") String wlgsNo,@Param("fhdqNo") String fhdqNo,@Param("ywdyNo") String ywdyNo); @Select("select name,companyNo from company where companyNo=#{code}") public Map getKH(String code); }