提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.fendan.mapper; |
A |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.apache.ibatis.annotations.Delete; |
|
7 |
import org.apache.ibatis.annotations.Insert; |
|
8 |
import org.apache.ibatis.annotations.Param; |
|
9 |
import org.apache.ibatis.annotations.Select; |
|
10 |
import org.apache.ibatis.annotations.Update; |
|
11 |
|
|
12 |
import com.mandi.fendan.persist.Fd_XSTDMX; |
|
13 |
import com.mandi.fendan.util.persist.WaitXSTDMX; |
|
14 |
|
|
15 |
public interface Fd_XSTDMXMapper { |
|
16 |
|
|
17 |
@Insert("insert into fd_xstdmx " |
|
18 |
+ "(tdmx_tdfl,tdmx_tdls,tdmx_pch,tdmx_hj,tdmx_zt,tdmx_mz,tdmx_jz," |
|
19 |
+ "tdmx_ggxh,tdmx_zpbz,tdmx_fdbz,tdmx_zcbz,tdmx_gbbz,tdmx_ck,tdmx_hth,tdmx_ywy,tdmx_ddh,tdmx_hwbh,tdmx_wlbh,tdmx_fhzz,tdmx_wbzcc,tdmx_cc) " |
|
20 |
//tdmx_ttlx |
|
21 |
+ "values " |
|
22 |
+ "(#{tdmx_tdfl},#{tdmx_tdls},#{tdmx_pch}," |
|
23 |
+ "#{tdmx_hj},#{tdmx_zt},#{tdmx_mz},#{tdmx_jz},#{tdmx_ggxh},#{tdmx_zpbz}," |
|
24 |
+ "0,0,0,#{tdmx_ck},#{tdmx_hth},#{tdmx_ywy},#{tdmx_ddh},#{tdmx_hwbh},#{tdmx_wlbh},#{tdmx_fhzz},#{tdmx_wbzcc},#{tdmx_cc})") |
|
25 |
//,#{tdmx_ttlx} |
|
26 |
public int insert(Fd_XSTDMX xstdmx); |
|
27 |
|
|
28 |
@Select("select * from fd_xstdmx where tdmx_tdfl=#{tdmx_tdfl} ") |
|
29 |
public Fd_XSTDMX get(String tdmx_tdfl); |
|
30 |
|
|
31 |
/** |
|
32 |
* 批量获取 |
|
33 |
* @param tdmx_tdfls |
|
34 |
* @return |
|
35 |
*/ |
|
36 |
@Select("select * from fd_xstdmx where tdmx_tdfl in (${tdmx_tdfls}) ") |
|
37 |
public List<Fd_XSTDMX> gets(@Param("tdmx_tdfls") String tdmx_tdfls); |
|
38 |
|
|
39 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_gbbz=0 ") |
|
40 |
public List<Fd_XSTDMX> getListbytdls(String tdmx_tdls); |
|
41 |
|
|
42 |
/** |
|
43 |
* 根据提单分录和车牌号获取提单明细 |
|
44 |
* @param tdmx_tdls |
|
45 |
* @param tdmx_fdcph |
|
46 |
* @return |
|
47 |
*/ |
|
48 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_fdcph=#{tdmx_fdcph} and tdmx_gbbz=0 ") |
|
49 |
public List<Fd_XSTDMX> getListByTdlsAndCph(@Param("tdmx_tdls") String tdmx_tdls,@Param("tdmx_fdcph")String tdmx_fdcph); |
|
50 |
|
|
51 |
/**不要用了可能是两条记录,没有关闭标志**/ |
|
52 |
@Deprecated |
|
53 |
@Select("select * from fd_xstdmx where tdmx_pch=#{tdmx_pch} ") |
|
54 |
public Fd_XSTDMX getbyPCH(String tdmx_pch); |
|
55 |
/**改为 按照批次号和车牌号查找未关闭的明细**/ |
|
56 |
@Select("select top 1 a.* " |
|
57 |
+ "from fd_xstdmx a LEFT JOIN fd_xstd b on a.tdmx_tdls=b.td_tdls " |
|
58 |
+ "LEFT JOIN fd_vehicle_xstd c on b.td_tdbh=c.xstdNo " |
|
59 |
+ "where a.tdmx_pch=#{tdmx_pch} and c.vehicleId=#{vehicleId} and tdmx_gbbz=0") |
|
60 |
public Fd_XSTDMX getbyPCHONE(@Param("tdmx_pch") String tdmx_pch,@Param("vehicleId") String vehicleId); |
|
61 |
/**改为 按照批次号和提单编号查找未关闭的明细**/ |
|
62 |
@Select("select top 1 a.* from fd_xstdmx a LEFT JOIN fd_xstd b on a.tdmx_tdls=b.td_tdls " |
|
63 |
+ "where a.tdmx_pch=#{tdmx_pch} and b.td_tdbh=#{tdNo} and tdmx_gbbz=0 ") |
|
64 |
public Fd_XSTDMX getbyPCHandTDNOONE(@Param("tdmx_pch") String tdmx_pch,@Param("tdNo") String tdNo); |
|
65 |
|
|
66 |
@Delete("delete from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_zcbz=0 ") |
|
67 |
public int delbyTDLS(String tdmx_tdls); |
|
68 |
@Delete("delete from fd_xstdmx where tdmx_tdfl=#{tdmx_tdfl}") |
|
69 |
public int del(String tdmx_tdfl); |
|
70 |
|
|
71 |
@Update("update fd_xstdmx set tdmx_fdcph=#{tdmx_fdcph}," |
|
72 |
+ "tdmx_fdbz=#{tdmx_fdbz},tdmx_fdywbh=#{tdmx_fdywbh},tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} where tdmx_tdfl=#{tdmx_tdfl}") |
|
73 |
public int updateFD(Fd_XSTDMX tdmx); |
|
74 |
|
|
75 |
@Update("update fd_xstdmx set tdmx_fdcph=#{tdmx_fdcph},tdmx_fdbz=#{tdmx_fdbz},tdmx_fdywbh=#{tdmx_fdywbh},tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} where tdmx_tdls=#{tdmx_tdls} and tdmx_gbbz=0 and tdmx_fdbz=0 and tdmx_zcbz=0 ") |
|
76 |
public int updateFDBatch(Fd_XSTDMX tdmx); |
|
77 |
|
|
78 |
@Update("update fd_xstdmx set tdmx_fdcph=null,tdmx_fdbz=0,tdmx_fdywbh=null,tdmx_fdwlgsbh=null where tdmx_tdls=#{tdmx_tdls} and tdmx_fdywbh=#{tdmx_fdywbh} and tdmx_gbbz=0 and tdmx_fdbz!=0 and tdmx_zcbz=0") |
|
79 |
public int cancelFDBatch(@Param("tdmx_tdls") String tdmx_tdls,@Param("tdmx_fdywbh") String tdmx_fdywbh); |
|
80 |
|
|
81 |
|
|
82 |
@Update("update fd_xstdmx set tdmx_zccph=#{tdmx_zccph},tdmx_zcbz=#{tdmx_zcbz}," |
|
83 |
+ "tdmx_zcwlgsName=#{tdmx_zcwlgsName},tdmx_zcdriver=#{tdmx_zcdriver},tdmx_zcphone=#{tdmx_zcphone} " |
|
84 |
+ "where tdmx_tdfl=#{tdmx_tdfl}") |
|
85 |
public int updateZC(Fd_XSTDMX tdmx); |
|
86 |
|
|
87 |
@Update("update fd_xstdmx set tdmx_zccph=#{tdmx_zccph},tdmx_zcbz=#{tdmx_zcbz}," |
|
88 |
+ "tdmx_zcwlgsName=#{tdmx_zcwlgsName},tdmx_zcdriver=#{tdmx_zcdriver},tdmx_zcphone=#{tdmx_zcphone},tdmx_fdbz=0,tdmx_fdcph=null,tdmx_fdwlgsbh=null,tdmx_fdywbh=null " |
|
89 |
+ "where tdmx_tdfl=#{tdmx_tdfl}") |
|
90 |
public int updateZCANDFD(Fd_XSTDMX tdmx); |
|
91 |
|
|
92 |
@Update({ |
|
93 |
"<script>", |
|
94 |
"update fd_xstdmx set tdmx_zccph=#{tdmx_zccph},tdmx_zcbz=#{tdmx_zcbz}," |
|
95 |
+ "tdmx_fdcph=#{tdmx_fdcph},tdmx_fdbz=#{tdmx_fdbz},tdmx_fdywbh=#{tdmx_fdywbh}," |
|
96 |
+ "tdmx_zcwlgsName=#{tdmx_zcwlgsName},tdmx_zcdriver=#{tdmx_zcdriver},tdmx_zcphone=#{tdmx_zcphone},", |
|
97 |
"<if test=\"tdmx_fdwlgsbh !=null and tdmx_fdwlgsbh!='' \"> ", |
|
98 |
"tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} ", |
|
99 |
"</if>", |
|
100 |
"where tdmx_tdfl=#{tdmx_tdfl}", |
|
101 |
"</script>" |
|
102 |
}) |
|
103 |
public int updateZCnoFD(Fd_XSTDMX tdmx); |
|
104 |
|
|
105 |
@Update("update fd_xstdmx set tdmx_gbbz=#{tdmx_gbbz} where tdmx_tdfl=#{tdmx_tdfl}") |
|
106 |
public int updateGB(Fd_XSTDMX tdmx); |
|
107 |
|
|
108 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_gbbz=0 ") |
|
109 |
public List<Fd_XSTDMX> getbytdls(String tdmx_tdls); |
|
110 |
@Select("select * from fd_xstdmx where tdmx_tdfl=#{tdmx_tdfl} and tdmx_tdls=#{tdmx_tdls}") |
|
111 |
public Fd_XSTDMX getbytdflAndtdls(@Param("tdmx_tdfl") String tdmx_tdfl,@Param("tdmx_tdls") String tdmx_tdls); |
|
112 |
|
|
113 |
// @Select("select count(1) from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_gbbz=0 and (tdmx_fdbz!=0 or tdmx_zcbz!=0)") |
|
114 |
@Select("select count(1) from fd_xstdmx a LEFT JOIN fd_bsheet b on a.tdmx_fdywbh=b.bsNo where a.tdmx_tdls=#{tdmx_tdls} and a.tdmx_gbbz=0 and (a.tdmx_fdbz!=0 or a.tdmx_zcbz!=0) and b.status='在办' ") |
|
115 |
public int getbytdlswithZCorFD(String tdmx_tdls); |
|
116 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_gbbz=0 and tdmx_fdbz=0 and tdmx_zcbz=0 ") |
|
117 |
public List<Fd_XSTDMX> getNOZCandFD(String tdmx_tdls); |
|
118 |
|
|
119 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} and tdmx_fdywbh=#{tdmx_fdywbh} and tdmx_gbbz=0 and tdmx_fdbz=1 and tdmx_zcbz=0 ") |
|
120 |
public List<Fd_XSTDMX> getbyBsNoandcmNo(@Param("tdmx_tdls") String tdmx_tdls, |
|
121 |
@Param("tdmx_fdywbh") String tdmx_fdywbh,@Param("tdmx_fdwlgsbh") String tdmx_fdwlgsbh); |
|
122 |
|
|
123 |
@Update("update fd_xstdmx set tdmx_fdcph=null,tdmx_fdbz=0,tdmx_fdywbh=null,tdmx_fdwlgsbh=null where tdmx_tdls=#{tdmx_tdls} and tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} and tdmx_fdywbh=#{tdmx_fdywbh} and tdmx_gbbz=0 and tdmx_fdbz=1 and tdmx_zcbz=0 ") |
|
124 |
public int updatebyBsNoandcmNo(@Param("tdmx_tdls") String tdmx_tdls, |
|
125 |
@Param("tdmx_fdywbh") String tdmx_fdywbh,@Param("tdmx_fdwlgsbh") String tdmx_fdwlgsbh); |
|
126 |
|
|
127 |
@Select("select * from fd_xstdmx where tdmx_fdywbh=#{bsNo} and tdmx_gbbz=0 and tdmx_fdbz=1 and tdmx_zcbz=0 ") |
|
128 |
public List<Fd_XSTDMX> getbybsNoandNOZCandFD(String bsNo); |
|
129 |
@Update("update fd_xstdmx set tdmx_fdcph=null,tdmx_fdbz=0,tdmx_fdywbh=null,tdmx_fdwlgsbh=null where tdmx_fdywbh=#{bsNo} and tdmx_gbbz=0 and tdmx_fdbz=1 and tdmx_zcbz=0 ") |
|
130 |
public int updatebybsNoandNOZCandFD(String bsNo); |
|
131 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdmx_tdls} and tdmx_zcbz=0 ") |
|
132 |
public List<Fd_XSTDMX> getforClose(String tdmx_tdls); |
|
133 |
|
|
134 |
|
|
135 |
public List<Map<String, Object>> getList(Map<String, Object> mp); |
|
136 |
public int countPage(Map<String, Object> mp); |
|
137 |
|
|
138 |
|
|
139 |
@Select("select * from fd_xstdmx where tdmx_tdls=#{tdls} and tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} and tdmx_gbbz=0 and tdmx_fdbz!=0 and tdmx_zcbz=0 ") |
|
140 |
public List<Fd_XSTDMX> getbytdlsandcmNo(@Param("tdls")String tdls,@Param("tdmx_fdwlgsbh")String tdmx_fdwlgsbh); |
|
141 |
@Update("update fd_xstdmx set tdmx_fdcph=null,tdmx_fdbz=0,tdmx_fdywbh=null,tdmx_fdwlgsbh=null where tdmx_tdls=#{tdls} and tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} and tdmx_gbbz=0 and tdmx_fdbz !=0 and tdmx_zcbz=0 ") |
|
142 |
public int updatebytdlsandcmNo(@Param("tdls")String tdls,@Param("tdmx_fdwlgsbh")String tdmx_fdwlgsbh); |
|
143 |
|
|
144 |
@Select("select count(1) from fd_xstdmx where tdmx_fdywbh=#{bsNo} and tdmx_tdls=#{tdls} and tdmx_zcbz=1 and tdmx_gbbz=0 and tdmx_zccph=#{vehicleId} ") |
|
145 |
public int getbyBsNowithZC(@Param("bsNo") String bsNo ,@Param("tdls") String tdls ,@Param("vehicleId") String vehicleId); |
|
146 |
|
|
147 |
@Select("select count(1) from fd_xstdmx where tdmx_fdywbh=#{bsNo} and tdmx_zcbz=1 and tdmx_gbbz=0 and tdmx_zccph=#{vehicleId}") |
|
148 |
public int getbyBsNowith(@Param("bsNo") String bsNo,@Param("vehicleId") String vehicleId); |
|
149 |
|
|
150 |
@Select("select * from xstdmx_view where tdmx_fdywbh=#{bsNo} and tdmx_fdwlgsbh=#{tdmx_fdwlgsbh} and tdmx_sfzc=0 ") |
|
151 |
public List<WaitXSTDMX> getwaitMXbyBsNoandcmNo(@Param("bsNo")String bsNo,@Param("tdmx_fdwlgsbh")String tdmx_fdwlgsbh); |
|
152 |
@Select("select * from xstdmx_view where tdmx_fdywbh=#{bsNo} and tdmx_sfzc=0 ") |
|
153 |
public List<WaitXSTDMX> getwaitMXbyBsNo(@Param("bsNo")String bsNo); |
|
154 |
|
|
155 |
@Select("select * from fd_xstdmx") |
|
156 |
public List<Fd_XSTDMX> getlistA(); |
|
157 |
@Update("update fd_xstdmx set tdmx_ggxh=#{tdmx_ggxh} where tdmx_tdfl=#{tdmx_tdfl}") |
|
158 |
public int updateMXGG(Fd_XSTDMX mx); |
|
159 |
|
63fbfd
|
160 |
//明晟 LED 装车 |
cc0cbf
|
161 |
@Select({"select hw.name tdmx_hwmc,mx.* from fd_xstdmx mx " , |
A |
162 |
" left join nc_hw hw on mx.tdmx_hwbh=hw.pkid and hw.state=1 " , |
63fbfd
|
163 |
" join xs_taskmonitor xt on mx.tdmx_fdywbh = xt.businessNo ", |
A |
164 |
" join fd_bsheet on bsNo=tdmx_fdywbh and status='在办' " , |
eeb08a
|
165 |
" where SdepartNo=#{sdepartNo} and xt.firstgbtime is not null and xt.lastgbtime is null" |
cc0cbf
|
166 |
}) |
4c64dc
|
167 |
public List<Map> getHwList(String sdepartNo); |
cc0cbf
|
168 |
|
bb48ed
|
169 |
/** 义瑞、科技LED显示 序号 车号 装车区 状态 **/ |
63fbfd
|
170 |
@Select({ |
A |
171 |
"select bs.numberplates,businessNo,zcWz,firstzxhtime," , |
|
172 |
"case WHEN EXISTS ( SELECT * FROM bussinessitems WHERE bussinessNo = x.businessNo ) THEN '在装'" , |
|
173 |
" when x.firstgbtime is not null then '待装' else '完成' end zcStatus " , |
|
174 |
" from xs_taskmonitor x" , |
eeb08a
|
175 |
" join bussinesssheet bs on x.businessNo=bs.bussinessNo and bs.sstatus='在办' " , |
975c04
|
176 |
" where sdepartNo=#{sdepartNo} and firstgbtime is not null and x.lastgbtime is null order by jctime" |
63fbfd
|
177 |
}) |
A |
178 |
public List<Map> yRZcList(String sdepartNo); |
cc0cbf
|
179 |
|
58d006
|
180 |
} |