Administrator
2022-09-14 58d006e05dcf2a20d0ec5367dd03d66a61db6849
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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<Map<String, Object>> getlist(Map<String, Object> mp);
    public int count(Map<String, Object> mp);
 
    @Select("select * from fd_wlgs_fhdq where fhdqNo=#{fhdqNo}")
    public List<Fd_wlgs_fhdq> 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<Fd_Company> 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<Fd_Company> 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<Ncfhdq> 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<String, Object> getKH(String code);
 
}