TAddressMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.shipping.mapper.TAddressMapper">
  6. <resultMap type="TAddress" id="TAddressResult">
  7. <result property="fId" column="f_id"/>
  8. <result property="fTypes" column="f_types"/>
  9. <result property="fNo" column="f_no"/>
  10. <result property="fName" column="f_name"/>
  11. <result property="fEname" column="f_ename"/>
  12. <result property="fLaneid" column="f_laneid"/>
  13. <result property="fPortid" column="f_portid"/>
  14. <result property="fCountry" column="f_country"/>
  15. <result property="fProvince" column="f_province"/>
  16. <result property="fCity" column="f_city"/>
  17. <result property="fTel" column="f_tel"/>
  18. <result property="fEmail" column="f_email"/>
  19. <result property="fManagerid" column="f_managerid"/>
  20. <result property="fUncode" column="f_uncode"/>
  21. <result property="fPort" column="f_port"/>
  22. <result property="fStatus" column="f_status"/>
  23. <result property="createBy" column="create_by"/>
  24. <result property="createTime" column="create_time"/>
  25. <result property="updateBy" column="update_by"/>
  26. <result property="updateTime" column="update_time"/>
  27. <result property="remark" column="remark"/>
  28. </resultMap>
  29. <sql id="selectTAddressVo">
  30. select f_id, f_types, f_no, f_name, f_ename, f_laneid, f_portid, f_country, f_province, f_city, f_tel, f_email, f_managerid, f_uncode, f_port, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark from t_address
  31. </sql>
  32. <select id="selectTAddressList" parameterType="TAddress" resultMap="TAddressResult">
  33. SELECT
  34. f_id,
  35. f_types,
  36. f_no,
  37. f_name,
  38. f_ename,
  39. f_laneid,
  40. f_portid,
  41. f_country,
  42. f_province,
  43. f_city,
  44. f_tel,
  45. f_email,
  46. f_managerid,
  47. f_uncode,
  48. f_port,
  49. CASE
  50. WHEN f_status = 'T' THEN
  51. '正常' ELSE '停用'
  52. END AS f_status,
  53. create_by,
  54. create_time,
  55. update_by,
  56. update_time,
  57. remark
  58. FROM
  59. t_address t
  60. LEFT JOIN ( SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'f_types' ) s ON t.f_types =
  61. s.dict_value
  62. WHERE
  63. t.f_status = 'T'
  64. AND s.dict_label = '航线'
  65. <if test="fTypes != null and fTypes != ''">and t.f_types = #{fTypes}</if>
  66. <if test="fNo != null and fNo != ''">and t.f_no = #{fNo}</if>
  67. <if test="fName != null and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
  68. <if test="fEname != null and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
  69. <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
  70. <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
  71. <if test="fCountry != null and fCountry != ''">and t.f_country = #{fCountry}</if>
  72. <if test="fProvince != null and fProvince != ''">and t.f_province = #{fProvince}</if>
  73. <if test="fCity != null and fCity != ''">and t.f_city = #{fCity}</if>
  74. <if test="fTel != null and fTel != ''">and t.f_tel = #{fTel}</if>
  75. <if test="fEmail != null and fEmail != ''">and t.f_email = #{fEmail}</if>
  76. <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
  77. <if test="fUncode != null and fUncode != ''">and t.f_uncode = #{fUncode}</if>
  78. <if test="fPort != null and fPort != ''">and t.f_port = #{fPort}</if>
  79. <if test="fStatus != null and fStatus != ''">and t.f_status = #{fStatus}</if>
  80. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  81. and t.create_time &gt;= #{cLoadDate[0]}
  82. </if>
  83. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  84. and t.create_time &lt;= #{cLoadDate[1]}
  85. </if>
  86. ORDER BY CONVERT(t.f_name USING gbk) asc
  87. </select>
  88. <select id="selectTAddressBasicList" parameterType="TAddress" resultMap="TAddressResult">
  89. select f_id, f_types, f_no, f_name from t_address
  90. <where>
  91. <if test="fTypes != null and fTypes != ''"> and f_types = #{fTypes}</if>
  92. <if test="fNo != null and fNo != ''"> and f_no = #{fNo}</if>
  93. <if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
  94. <if test="fEname != null and fEname != ''"> and f_ename like concat('%', #{fEname}, '%')</if>
  95. <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
  96. <if test="fPortid != null "> and f_portid = #{fPortid}</if>
  97. <if test="fCountry != null and fCountry != ''"> and f_country = #{fCountry}</if>
  98. <if test="fProvince != null and fProvince != ''"> and f_province = #{fProvince}</if>
  99. <if test="fCity != null and fCity != ''"> and f_city = #{fCity}</if>
  100. <if test="fTel != null and fTel != ''"> and f_tel = #{fTel}</if>
  101. <if test="fEmail != null and fEmail != ''"> and f_email = #{fEmail}</if>
  102. <if test="fManagerid != null "> and f_managerid = #{fManagerid}</if>
  103. <if test="fUncode != null and fUncode != ''"> and f_uncode = #{fUncode}</if>
  104. <if test="fPort != null and fPort != ''"> and f_port = #{fPort}</if>
  105. <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
  106. </where>
  107. </select>
  108. <select id="selectTAddressById" parameterType="Long" resultMap="TAddressResult">
  109. <include refid="selectTAddressVo"/>
  110. where f_id = #{fId}
  111. </select>
  112. <select id="selectTAddressListMap" resultType="java.util.Map">
  113. <where>
  114. <if test="fTypes != null and fTypes != ''">and f_types = #{fTypes}</if>
  115. <if test="fNo != null and fNo != ''">and f_no = #{fNo}</if>
  116. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  117. <if test="fEname != null and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
  118. <if test="fLaneid != null ">and f_laneid = #{fLaneid}</if>
  119. <if test="fPortid != null ">and f_portid = #{fPortid}</if>
  120. <if test="fCountry != null and fCountry != ''">and f_country = #{fCountry}</if>
  121. <if test="fProvince != null and fProvince != ''">and f_province = #{fProvince}</if>
  122. <if test="fCity != null and fCity != ''">and f_city = #{fCity}</if>
  123. <if test="fTel != null and fTel != ''">and f_tel = #{fTel}</if>
  124. <if test="fEmail != null and fEmail != ''">and f_email = #{fEmail}</if>
  125. <if test="fManagerid != null ">and f_managerid = #{fManagerid}</if>
  126. <if test="fUncode != null and fUncode != ''">and f_uncode = #{fUncode}</if>
  127. <if test="fPort != null and fPort != ''">and f_port = #{fPort}</if>
  128. <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
  129. </where>
  130. </select>
  131. <insert id="insertTAddress" parameterType="TAddress">
  132. insert into t_address
  133. <trim prefix="(" suffix=")" suffixOverrides=",">
  134. <if test="fId != null">f_id,</if>
  135. <if test="fTypes != null and fTypes != ''">f_types,</if>
  136. <if test="fNo != null and fNo != ''">f_no,</if>
  137. <if test="fName != null">f_name,</if>
  138. <if test="fEname != null">f_ename,</if>
  139. <if test="fLaneid != null">f_laneid,</if>
  140. <if test="fPortid != null">f_portid,</if>
  141. <if test="fCountry != null">f_country,</if>
  142. <if test="fProvince != null">f_province,</if>
  143. <if test="fCity != null">f_city,</if>
  144. <if test="fTel != null">f_tel,</if>
  145. <if test="fEmail != null">f_email,</if>
  146. <if test="fManagerid != null">f_managerid,</if>
  147. <if test="fUncode != null">f_uncode,</if>
  148. <if test="fPort != null">f_port,</if>
  149. <if test="fStatus != null">f_status,</if>
  150. <if test="createBy != null">create_by,</if>
  151. <if test="createTime != null">create_time,</if>
  152. <if test="updateBy != null">update_by,</if>
  153. <if test="updateTime != null">update_time,</if>
  154. <if test="remark != null">remark,</if>
  155. </trim>
  156. <trim prefix="values (" suffix=")" suffixOverrides=",">
  157. <if test="fId != null">#{fId},</if>
  158. <if test="fTypes != null and fTypes != ''">#{fTypes},</if>
  159. <if test="fNo != null and fNo != ''">#{fNo},</if>
  160. <if test="fName != null">#{fName},</if>
  161. <if test="fEname != null">#{fEname},</if>
  162. <if test="fLaneid != null">#{fLaneid},</if>
  163. <if test="fPortid != null">#{fPortid},</if>
  164. <if test="fCountry != null">#{fCountry},</if>
  165. <if test="fProvince != null">#{fProvince},</if>
  166. <if test="fCity != null">#{fCity},</if>
  167. <if test="fTel != null">#{fTel},</if>
  168. <if test="fEmail != null">#{fEmail},</if>
  169. <if test="fManagerid != null">#{fManagerid},</if>
  170. <if test="fUncode != null">#{fUncode},</if>
  171. <if test="fPort != null">#{fPort},</if>
  172. <if test="fStatus != null">#{fStatus},</if>
  173. <if test="createBy != null">#{createBy},</if>
  174. <if test="createTime != null">#{createTime},</if>
  175. <if test="updateBy != null">#{updateBy},</if>
  176. <if test="updateTime != null">#{updateTime},</if>
  177. <if test="remark != null">#{remark},</if>
  178. </trim>
  179. </insert>
  180. <update id="updateTAddress" parameterType="TAddress">
  181. update t_address
  182. <trim prefix="SET" suffixOverrides=",">
  183. <if test="fTypes != null and fTypes != ''">f_types = #{fTypes},</if>
  184. <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
  185. <if test="fName != null">f_name = #{fName},</if>
  186. <if test="fEname != null">f_ename = #{fEname},</if>
  187. <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
  188. <if test="fPortid != null">f_portid = #{fPortid},</if>
  189. <if test="fCountry != null">f_country = #{fCountry},</if>
  190. <if test="fProvince != null">f_province = #{fProvince},</if>
  191. <if test="fCity != null">f_city = #{fCity},</if>
  192. <if test="fTel != null">f_tel = #{fTel},</if>
  193. <if test="fEmail != null">f_email = #{fEmail},</if>
  194. <if test="fManagerid != null">f_managerid = #{fManagerid},</if>
  195. <if test="fUncode != null">f_uncode = #{fUncode},</if>
  196. <if test="fPort != null">f_port = #{fPort},</if>
  197. <if test="fStatus != null">f_status = #{fStatus},</if>
  198. <if test="createBy != null">create_by = #{createBy},</if>
  199. <if test="createTime != null">create_time = #{createTime},</if>
  200. <if test="updateBy != null">update_by = #{updateBy},</if>
  201. <if test="updateTime != null">update_time = #{updateTime},</if>
  202. <if test="remark != null">remark = #{remark},</if>
  203. </trim>
  204. where f_id = #{fId}
  205. </update>
  206. <delete id="deleteTAddressById" parameterType="Long">
  207. delete from t_address where f_id = #{fId}
  208. </delete>
  209. <delete id="deleteTAddressByIds" parameterType="String">
  210. delete from t_address where f_id in
  211. <foreach item="fId" collection="array" open="(" separator="," close=")">
  212. #{fId}
  213. </foreach>
  214. </delete>
  215. <!--批量更新数据状态-->
  216. <update id="updateTAddressStatus" parameterType="string">
  217. update t_address
  218. set f_status = 'F'
  219. where f_id in
  220. <foreach item="fId" collection="array" open="(" separator="," close=")">
  221. #{fId}
  222. </foreach>
  223. </update>
  224. <!--查询堆场信息-->
  225. <select id="selectStockDump" parameterType="TAddress" resultMap="TAddressResult">
  226. SELECT
  227. t.f_id,
  228. t.f_types,
  229. pro.dict_label a,
  230. t.f_no,
  231. t.f_name,
  232. t.f_ename,
  233. t.f_laneid,
  234. t.f_portid,
  235. t.f_country,
  236. t.f_province,
  237. t.f_city,
  238. t.f_tel,
  239. t.f_email,
  240. t.f_managerid,
  241. t.f_uncode,
  242. t.f_port,
  243. pros.dict_label b,
  244. CASE
  245. WHEN t.f_status = 'T' THEN
  246. '正常使用' ELSE '停用'
  247. END AS f_status,
  248. t.create_by,
  249. t.create_time,
  250. t.update_by,
  251. t.update_time,
  252. t.remark,
  253. d.f_name portName,
  254. d.f_ename portEnglish
  255. FROM
  256. t_address t
  257. LEFT JOIN t_address d ON t.f_portid = d.f_id
  258. LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
  259. LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_port and pros.dict_type = 'f_port'
  260. <where>
  261. t.f_status = 'T'
  262. and pro.dict_label = '堆场'
  263. <if test="fTypes != null and fTypes != ''">and t.f_types = #{fTypes}</if>
  264. <if test="portName != null and portName != ''">and d.f_name like concat('%', #{portName}, '%')</if>
  265. <if test="fNo != null and fNo != ''">and t.f_no = #{fNo}</if>
  266. <if test="fName != null and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
  267. <if test="fEname != null and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
  268. <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
  269. <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
  270. <if test="fCountry != null and fCountry != ''">and t.f_country = #{fCountry}</if>
  271. <if test="fProvince != null and fProvince != ''">and t.f_province = #{fProvince}</if>
  272. <if test="fCity != null and fCity != ''">and t.f_city = #{fCity}</if>
  273. <if test="fTel != null and fTel != ''">and t.f_tel = #{fTel}</if>
  274. <if test="fEmail != null and fEmail != ''">and t.f_email = #{fEmail}</if>
  275. <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
  276. <if test="fUncode != null and fUncode != ''">and t.f_uncode = #{fUncode}</if>
  277. <if test="fPort != null and fPort != ''">and t.f_port = #{fPort}</if>
  278. <if test="fStatus != null and fStatus != ''">and t.f_status = #{fStatus}</if>
  279. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  280. and t.create_time &gt;= #{cLoadDate[0]}
  281. </if>
  282. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  283. and t.create_time &lt;= #{cLoadDate[1]}
  284. </if>
  285. </where>
  286. ORDER BY CONVERT(t.f_name USING gbk) asc
  287. </select>
  288. <!--查询码头信息-->
  289. <select id="selectWarfDump" parameterType="TAddress" resultMap="TAddressResult">
  290. SELECT
  291. t.f_id,
  292. t.f_types,
  293. pro.dict_label a,
  294. t.f_no,
  295. t.f_name,
  296. t.f_ename,
  297. t.f_laneid,
  298. t.f_portid,
  299. t.f_country,
  300. t.f_province,
  301. t.f_city,
  302. t.f_tel,
  303. t.f_email,
  304. t.f_managerid,
  305. t.f_uncode,
  306. t.f_port,
  307. pros.dict_label b,
  308. CASE
  309. WHEN t.f_status = 'T' THEN
  310. '正常使用' ELSE '停用'
  311. END AS f_status,
  312. t.create_by,
  313. t.create_time,
  314. t.update_by,
  315. t.update_time,
  316. t.remark,
  317. d.f_name portName,
  318. d.f_ename portEnglish
  319. FROM
  320. t_address t
  321. LEFT JOIN t_address d ON t.f_portid = d.f_id
  322. LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
  323. LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_port and pros.dict_type = 'f_port'
  324. <where>
  325. t.f_status = 'T'
  326. and pro.dict_label = '码头'
  327. <if test="fTypes != null and fTypes != ''">and t.f_types = #{fTypes}</if>
  328. <if test="portName != null and portName != ''">and d.f_name like concat('%', #{portName}, '%')</if>
  329. <if test="fNo != null and fNo != ''">and t.f_no = #{fNo}</if>
  330. <if test="fName != null and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
  331. <if test="fEname != null and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
  332. <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
  333. <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
  334. <if test="fCountry != null and fCountry != ''">and t.f_country = #{fCountry}</if>
  335. <if test="fProvince != null and fProvince != ''">and t.f_province = #{fProvince}</if>
  336. <if test="fCity != null and fCity != ''">and t.f_city = #{fCity}</if>
  337. <if test="fTel != null and fTel != ''">and t.f_tel = #{fTel}</if>
  338. <if test="fEmail != null and fEmail != ''">and t.f_email = #{fEmail}</if>
  339. <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
  340. <if test="fUncode != null and fUncode != ''">and t.f_uncode = #{fUncode}</if>
  341. <if test="fPort != null and fPort != ''">and t.f_port = #{fPort}</if>
  342. <if test="fStatus != null and fStatus != ''">and t.f_status = #{fStatus}</if>
  343. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  344. and t.create_time &gt;= #{cLoadDate[0]}
  345. </if>
  346. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  347. and t.create_time &lt;= #{cLoadDate[1]}
  348. </if>
  349. </where>
  350. ORDER BY CONVERT(t.f_name USING gbk) asc
  351. </select>
  352. <!--查看港口名称-->
  353. <select id="selectPortName" parameterType="TAddress" resultType="map">
  354. SELECT
  355. f_id as fId,
  356. f_name as fName
  357. FROM
  358. t_address t
  359. LEFT JOIN
  360. (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
  361. ON t.f_types = s.dict_value
  362. WHERE t.f_status = 'T'
  363. AND s.dict_label = '港口'
  364. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  365. ORDER BY CONVERT(t.f_name USING gbk) asc
  366. </select>
  367. <!--查看航线名称-->
  368. <select id="selectAirLineName" parameterType="TAddress" resultType="map">
  369. SELECT
  370. f_id as fId,
  371. f_name as fName
  372. FROM
  373. t_address t
  374. LEFT JOIN
  375. (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
  376. ON t.f_types = s.dict_value
  377. WHERE t.f_status = 'T'
  378. AND s.dict_label = '航线'
  379. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  380. ORDER BY CONVERT(t.f_name USING gbk) asc
  381. </select>
  382. <!--查看堆场名称-->
  383. <select id="selectStorageName" parameterType="TAddress" resultType="map">
  384. SELECT
  385. f_id as fId,
  386. f_name as fName
  387. FROM
  388. t_address t
  389. LEFT JOIN
  390. (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
  391. ON t.f_types = s.dict_value
  392. WHERE t.f_status = 'T'
  393. AND s.dict_label = '堆场'
  394. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  395. ORDER BY CONVERT(t.f_name USING gbk) asc
  396. </select>
  397. <!--查看堆场名称-->
  398. <select id="selectWharfName" parameterType="TAddress" resultType="map">
  399. SELECT
  400. f_id as fId,
  401. f_name as fName
  402. FROM
  403. t_address t
  404. LEFT JOIN
  405. (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
  406. ON t.f_types = s.dict_value
  407. WHERE t.f_status = 'T'
  408. AND s.dict_label = '码头'
  409. <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
  410. ORDER BY CONVERT(t.f_name USING gbk) asc
  411. </select>
  412. <!--查询港口信息-->
  413. <select id="selectPortDump" parameterType="TAddress" resultMap="TAddressResult">
  414. SELECT
  415. t.f_id,
  416. t.f_types,
  417. pro.dict_label typesName,
  418. t.f_no ,
  419. t.f_name ,
  420. t.f_ename ,
  421. t.f_laneid,
  422. t.f_portid ,
  423. t.f_country ,
  424. t.f_province ,
  425. t.f_city ,
  426. t.f_tel ,
  427. t.f_email ,
  428. t.f_managerid ,
  429. t.f_uncode ,
  430. t.f_port ,
  431. pros.dict_label havenName,
  432. t.create_by,
  433. t.create_time,
  434. t.update_by,
  435. t.update_time,
  436. t.remark,
  437. CASE
  438. WHEN t.f_status = 'T' THEN
  439. '正常使用' ELSE '停用'
  440. END AS f_status,
  441. d.f_name portName,
  442. d.f_ename portEnglish
  443. FROM
  444. t_address t
  445. LEFT JOIN t_address d ON t.f_laneid = d.f_id
  446. LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
  447. LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_port and pros.dict_type = 'f_port'
  448. <where>
  449. t.f_status = 'T'
  450. and pro.dict_label = '港口'
  451. <if test="fTypes != null and fTypes != ''">and t.f_types = #{fTypes}</if>
  452. <if test="portName != null and portName != ''">and d.f_name like concat('%', #{portName}, '%')</if>
  453. <if test="fNo != null and fNo != ''">and t.f_no = #{fNo}</if>
  454. <if test="fName != null and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
  455. <if test="fEname != null and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
  456. <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
  457. <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
  458. <if test="fCountry != null and fCountry != ''">and t.f_country = #{fCountry}</if>
  459. <if test="fProvince != null and fProvince != ''">and t.f_province = #{fProvince}</if>
  460. <if test="fCity != null and fCity != ''">and t.f_city = #{fCity}</if>
  461. <if test="fTel != null and fTel != ''">and t.f_tel = #{fTel}</if>
  462. <if test="fEmail != null and fEmail != ''">and t.f_email = #{fEmail}</if>
  463. <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
  464. <if test="fUncode != null and fUncode != ''">and t.f_uncode = #{fUncode}</if>
  465. <if test="fPort != null and fPort != ''">and t.f_port = #{fPort}</if>
  466. <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
  467. and t.create_time &gt;= #{cLoadDate[0]}
  468. </if>
  469. <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
  470. and t.create_time &lt;= #{cLoadDate[1]}
  471. </if>
  472. </where>
  473. ORDER BY CONVERT(t.f_name USING gbk) asc
  474. </select>
  475. <select id="selectAddressFno" parameterType="TAddress" resultType="string">
  476. SELECT
  477. f_no
  478. FROM
  479. t_address
  480. WHERE
  481. f_types = #{fTypes}
  482. and f_no = #{fNo}
  483. ORDER BY CONVERT(f_name USING gbk) asc
  484. </select>
  485. <select id="selectAddressFName" parameterType="TAddress" resultType="string">
  486. SELECT
  487. f_no
  488. FROM
  489. t_address
  490. WHERE
  491. f_types = #{fTypes}
  492. and f_name = #{fName}
  493. ORDER BY CONVERT(f_name USING gbk) asc
  494. </select>
  495. <select id="selectadress" parameterType="TAddress" resultMap="TAddressResult">
  496. SELECT
  497. t.f_id,
  498. t.f_name ,
  499. pro.dict_label typesName
  500. FROM
  501. t_address t
  502. LEFT JOIN
  503. sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
  504. ORDER BY CONVERT(t.f_name USING gbk) asc
  505. </select>
  506. </mapper>