RmsConsigneeMapper.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.steerinfo.dil.mapper.RmsConsigneeMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsConsignee">
  5. <id column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
  6. <result column="CONSIGNEE_COMPANY_NAME" jdbcType="VARCHAR" property="consigneeCompanyName" />
  7. <result column="CONSIGNEE_ABBREVIATION" jdbcType="VARCHAR" property="consigneeAbbreviation" />
  8. <result column="CONSIGNEE_REGISTERED_ADDRESS" jdbcType="VARCHAR" property="consigneeRegisteredAddress" />
  9. <result column="CONSIGNEE_RECEIVE_ADDRESS" jdbcType="VARCHAR" property="consigneeReceiveAddress" />
  10. <result column="CONSIGNEE_REGISTRATION_TIME" jdbcType="TIMESTAMP" property="consigneeRegistrationTime" />
  11. <result column="CONSIGNEE_CONTACT_NAME" jdbcType="VARCHAR" property="consigneeContactName" />
  12. <result column="CONSIGNEE_WARRANTY_AMOUNT" jdbcType="DECIMAL" property="consigneeWarrantyAmount" />
  13. <result column="CONSIGNEE_WARRANTY_WEIGHT" jdbcType="VARCHAR" property="consigneeWarrantyWeight" />
  14. <result column="CONSIGNEE_CONTACT_TEL" jdbcType="VARCHAR" property="consigneeContactTel" />
  15. <result column="CONSIGNEE_EXCHANGE_DELIVERY" jdbcType="DECIMAL" property="consigneeExchangeDelivery" />
  16. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  17. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  18. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  19. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  20. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  21. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  22. <result column="EAS_CONSIGNEE_ID" jdbcType="VARCHAR" property="easConsigneeId" />
  23. <result column="CONSIGNEE_CODE" jdbcType="VARCHAR" property="consigneeCode" />
  24. </resultMap>
  25. <sql id="columns">
  26. CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
  27. CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
  28. CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
  29. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
  30. CONSIGNEE_CODE
  31. </sql>
  32. <sql id="columns_alias">
  33. t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS,
  34. t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME,
  35. t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL,
  36. t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  37. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE
  38. </sql>
  39. <sql id="select">
  40. SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
  41. </sql>
  42. <sql id="select_alias">
  43. SELECT <include refid="columns_alias" /> FROM RMS_CONSIGNEE t
  44. </sql>
  45. <sql id="where">
  46. <where>
  47. <if test="consigneeId != null">
  48. and CONSIGNEE_ID = #{consigneeId}
  49. </if>
  50. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  51. and CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
  52. </if>
  53. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  54. and CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
  55. </if>
  56. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  57. and CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
  58. </if>
  59. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  60. and CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
  61. </if>
  62. <if test="consigneeRegistrationTime != null">
  63. and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
  64. </if>
  65. <if test="consigneeContactName != null and consigneeContactName != ''">
  66. and CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
  67. </if>
  68. <if test="consigneeWarrantyAmount != null">
  69. and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  70. </if>
  71. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  72. and CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
  73. </if>
  74. <if test="consigneeContactTel != null and consigneeContactTel != ''">
  75. and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
  76. </if>
  77. <if test="consigneeExchangeDelivery != null">
  78. and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  79. </if>
  80. <if test="insertUsername != null and insertUsername != ''">
  81. and INSERT_USERNAME = #{insertUsername}
  82. </if>
  83. <if test="insertTime != null">
  84. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  85. </if>
  86. <if test="updateUsername != null and updateUsername != ''">
  87. and UPDATE_USERNAME = #{updateUsername}
  88. </if>
  89. <if test="updateTime != null">
  90. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  91. </if>
  92. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  93. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  94. </if>
  95. <if test="deleted != null">
  96. and DELETED = #{deleted}
  97. </if>
  98. <if test="easConsigneeId != null and easConsigneeId != ''">
  99. and EAS_CONSIGNEE_ID = #{easConsigneeId}
  100. </if>
  101. <if test="consigneeCode != null and consigneeCode != ''">
  102. and CONSIGNEE_CODE = #{consigneeCode}
  103. </if>
  104. </where>
  105. </sql>
  106. <sql id="whereLike">
  107. <where>
  108. <if test="consigneeId != null">
  109. and CONSIGNEE_ID = #{consigneeId}
  110. </if>
  111. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  112. and CONSIGNEE_COMPANY_NAME LIKE '%${consigneeCompanyName}%'
  113. </if>
  114. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  115. and CONSIGNEE_ABBREVIATION LIKE '%${consigneeAbbreviation}%'
  116. </if>
  117. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  118. and CONSIGNEE_REGISTERED_ADDRESS LIKE '%${consigneeRegisteredAddress}%'
  119. </if>
  120. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  121. and CONSIGNEE_RECEIVE_ADDRESS LIKE '%${consigneeReceiveAddress}%'
  122. </if>
  123. <if test="consigneeRegistrationTime != null">
  124. and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
  125. </if>
  126. <if test="consigneeContactName != null and consigneeContactName != ''">
  127. and CONSIGNEE_CONTACT_NAME LIKE '%${consigneeContactName}%'
  128. </if>
  129. <if test="consigneeWarrantyAmount != null">
  130. and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  131. </if>
  132. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  133. and CONSIGNEE_WARRANTY_WEIGHT LIKE '%${consigneeWarrantyWeight}%'
  134. </if>
  135. <if test="consigneeContactTel != null and consigneeContactTel != ''">
  136. and CONSIGNEE_CONTACT_TEL LIKE '%${consigneeContactTel}%'
  137. </if>
  138. <if test="consigneeExchangeDelivery != null">
  139. and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  140. </if>
  141. <if test="insertUsername != null and insertUsername != ''">
  142. and INSERT_USERNAME LIKE '%${insertUsername}%'
  143. </if>
  144. <if test="insertTime != null">
  145. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  146. </if>
  147. <if test="updateUsername != null and updateUsername != ''">
  148. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  149. </if>
  150. <if test="updateTime != null">
  151. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  152. </if>
  153. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  154. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  155. </if>
  156. <if test="deleted != null">
  157. and DELETED = #{deleted}
  158. </if>
  159. <if test="easConsigneeId != null and easConsigneeId != ''">
  160. and EAS_CONSIGNEE_ID LIKE '%${easConsigneeId}%'
  161. </if>
  162. <if test="consigneeCode != null and consigneeCode != ''">
  163. and CONSIGNEE_CODE LIKE '%${consigneeCode}%'
  164. </if>
  165. </where>
  166. </sql>
  167. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  168. delete from RMS_CONSIGNEE
  169. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  170. </delete>
  171. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  172. delete from RMS_CONSIGNEE
  173. where 1!=1
  174. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  175. or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
  176. </if>
  177. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  178. or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
  179. </if>
  180. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  181. or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
  182. </if>
  183. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  184. or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
  185. </if>
  186. <if test="consigneeRegistrationTime != null">
  187. or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
  188. </if>
  189. <if test="consigneeContactName != null and consigneeContactName != ''">
  190. or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
  191. </if>
  192. <if test="consigneeWarrantyAmount != null">
  193. or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  194. </if>
  195. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  196. or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
  197. </if>
  198. <if test="consigneeContactTel != null and consigneeContactTel != ''">
  199. or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
  200. </if>
  201. <if test="consigneeExchangeDelivery != null">
  202. or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  203. </if>
  204. <if test="insertUsername != null and insertUsername != ''">
  205. or INSERT_USERNAME = #{insertUsername}
  206. </if>
  207. <if test="insertTime != null">
  208. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  209. </if>
  210. <if test="updateUsername != null and updateUsername != ''">
  211. or UPDATE_USERNAME = #{updateUsername}
  212. </if>
  213. <if test="updateTime != null">
  214. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  215. </if>
  216. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  217. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  218. </if>
  219. <if test="deleted != null">
  220. or DELETED = #{deleted}
  221. </if>
  222. <if test="easConsigneeId != null and easConsigneeId != ''">
  223. or EAS_CONSIGNEE_ID = #{easConsigneeId}
  224. </if>
  225. <if test="consigneeCode != null and consigneeCode != ''">
  226. or CONSIGNEE_CODE = #{consigneeCode}
  227. </if>
  228. </delete>
  229. <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
  230. insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME,
  231. CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
  232. CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME,
  233. CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
  234. CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL,
  235. CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
  236. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  237. INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID,
  238. CONSIGNEE_CODE)
  239. values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
  240. #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  241. #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  242. #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  243. #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=VARCHAR},
  244. #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
  245. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  246. #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=VARCHAR},
  247. #{consigneeCode,jdbcType=VARCHAR})
  248. </insert>
  249. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
  250. insert into RMS_CONSIGNEE
  251. <trim prefix="(" suffix=")" suffixOverrides=",">
  252. <if test="consigneeId != null">
  253. CONSIGNEE_ID,
  254. </if>
  255. <if test="consigneeCompanyName != null">
  256. CONSIGNEE_COMPANY_NAME,
  257. </if>
  258. <if test="consigneeAbbreviation != null">
  259. CONSIGNEE_ABBREVIATION,
  260. </if>
  261. <if test="consigneeRegisteredAddress != null">
  262. CONSIGNEE_REGISTERED_ADDRESS,
  263. </if>
  264. <if test="consigneeReceiveAddress != null">
  265. CONSIGNEE_RECEIVE_ADDRESS,
  266. </if>
  267. <if test="consigneeRegistrationTime != null">
  268. CONSIGNEE_REGISTRATION_TIME,
  269. </if>
  270. <if test="consigneeContactName != null">
  271. CONSIGNEE_CONTACT_NAME,
  272. </if>
  273. <if test="consigneeWarrantyAmount != null">
  274. CONSIGNEE_WARRANTY_AMOUNT,
  275. </if>
  276. <if test="consigneeWarrantyWeight != null">
  277. CONSIGNEE_WARRANTY_WEIGHT,
  278. </if>
  279. <if test="consigneeContactTel != null">
  280. CONSIGNEE_CONTACT_TEL,
  281. </if>
  282. <if test="consigneeExchangeDelivery != null">
  283. CONSIGNEE_EXCHANGE_DELIVERY,
  284. </if>
  285. <if test="insertUsername != null">
  286. INSERT_USERNAME,
  287. </if>
  288. <if test="insertTime != null">
  289. INSERT_TIME,
  290. </if>
  291. <if test="updateUsername != null">
  292. UPDATE_USERNAME,
  293. </if>
  294. <if test="updateTime != null">
  295. UPDATE_TIME,
  296. </if>
  297. <if test="insertUpdateRemark != null">
  298. INSERT_UPDATE_REMARK,
  299. </if>
  300. <if test="deleted != null">
  301. DELETED,
  302. </if>
  303. <if test="easConsigneeId != null">
  304. EAS_CONSIGNEE_ID,
  305. </if>
  306. <if test="consigneeCode != null">
  307. CONSIGNEE_CODE,
  308. </if>
  309. </trim>
  310. <trim prefix="values (" suffix=")" suffixOverrides=",">
  311. <if test="consigneeId != null">
  312. #{consigneeId,jdbcType=DECIMAL},
  313. </if>
  314. <if test="consigneeCompanyName != null">
  315. #{consigneeCompanyName,jdbcType=VARCHAR},
  316. </if>
  317. <if test="consigneeAbbreviation != null">
  318. #{consigneeAbbreviation,jdbcType=VARCHAR},
  319. </if>
  320. <if test="consigneeRegisteredAddress != null">
  321. #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  322. </if>
  323. <if test="consigneeReceiveAddress != null">
  324. #{consigneeReceiveAddress,jdbcType=VARCHAR},
  325. </if>
  326. <if test="consigneeRegistrationTime != null">
  327. #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  328. </if>
  329. <if test="consigneeContactName != null">
  330. #{consigneeContactName,jdbcType=VARCHAR},
  331. </if>
  332. <if test="consigneeWarrantyAmount != null">
  333. #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  334. </if>
  335. <if test="consigneeWarrantyWeight != null">
  336. #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  337. </if>
  338. <if test="consigneeContactTel != null">
  339. #{consigneeContactTel,jdbcType=VARCHAR},
  340. </if>
  341. <if test="consigneeExchangeDelivery != null">
  342. #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  343. </if>
  344. <if test="insertUsername != null">
  345. #{insertUsername,jdbcType=VARCHAR},
  346. </if>
  347. <if test="insertTime != null">
  348. #{insertTime,jdbcType=TIMESTAMP},
  349. </if>
  350. <if test="updateUsername != null">
  351. #{updateUsername,jdbcType=VARCHAR},
  352. </if>
  353. <if test="updateTime != null">
  354. #{updateTime,jdbcType=TIMESTAMP},
  355. </if>
  356. <if test="insertUpdateRemark != null">
  357. #{insertUpdateRemark,jdbcType=VARCHAR},
  358. </if>
  359. <if test="deleted != null">
  360. #{deleted,jdbcType=DECIMAL},
  361. </if>
  362. <if test="easConsigneeId != null">
  363. #{easConsigneeId,jdbcType=VARCHAR},
  364. </if>
  365. <if test="consigneeCode != null">
  366. #{consigneeCode,jdbcType=VARCHAR},
  367. </if>
  368. </trim>
  369. </insert>
  370. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
  371. update RMS_CONSIGNEE
  372. set CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
  373. CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
  374. CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  375. CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
  376. CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  377. CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
  378. CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  379. CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  380. CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
  381. CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  382. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  383. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  384. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  385. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  386. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  387. DELETED = #{deleted,jdbcType=DECIMAL},
  388. EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
  389. CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR}
  390. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  391. </update>
  392. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
  393. update RMS_CONSIGNEE
  394. <set>
  395. <if test="consigneeCompanyName != null">
  396. CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
  397. </if>
  398. <if test="consigneeAbbreviation != null">
  399. CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
  400. </if>
  401. <if test="consigneeRegisteredAddress != null">
  402. CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  403. </if>
  404. <if test="consigneeReceiveAddress != null">
  405. CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
  406. </if>
  407. <if test="consigneeRegistrationTime != null">
  408. CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  409. </if>
  410. <if test="consigneeContactName != null">
  411. CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
  412. </if>
  413. <if test="consigneeWarrantyAmount != null">
  414. CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  415. </if>
  416. <if test="consigneeWarrantyWeight != null">
  417. CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  418. </if>
  419. <if test="consigneeContactTel != null">
  420. CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
  421. </if>
  422. <if test="consigneeExchangeDelivery != null">
  423. CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  424. </if>
  425. <if test="insertUsername != null">
  426. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  427. </if>
  428. <if test="insertTime != null">
  429. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  430. </if>
  431. <if test="updateUsername != null">
  432. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  433. </if>
  434. <if test="updateTime != null">
  435. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  436. </if>
  437. <if test="insertUpdateRemark != null">
  438. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  439. </if>
  440. <if test="deleted != null">
  441. DELETED = #{deleted,jdbcType=DECIMAL},
  442. </if>
  443. <if test="easConsigneeId != null">
  444. EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
  445. </if>
  446. <if test="consigneeCode != null">
  447. CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
  448. </if>
  449. </set>
  450. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  451. </update>
  452. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  453. <include refid="select" />
  454. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  455. </select>
  456. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  457. <include refid="select" />
  458. <include refid="where" />
  459. </select>
  460. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  461. <include refid="select" />
  462. <include refid="whereLike" />
  463. </select>
  464. <insert id="batchInsert" parameterType="java.util.List">
  465. insert into RMS_CONSIGNEE
  466. (CONSIGNEE_ID,
  467. CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION,
  468. CONSIGNEE_REGISTERED_ADDRESS, CONSIGNEE_RECEIVE_ADDRESS,
  469. CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME,
  470. CONSIGNEE_WARRANTY_AMOUNT, CONSIGNEE_WARRANTY_WEIGHT,
  471. CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY,
  472. INSERT_USERNAME, INSERT_TIME,
  473. UPDATE_USERNAME, UPDATE_TIME,
  474. INSERT_UPDATE_REMARK, DELETED,
  475. EAS_CONSIGNEE_ID, CONSIGNEE_CODE
  476. )
  477. ( <foreach collection="list" item="item" separator="union all">
  478. select
  479. #{item.consigneeId,jdbcType=DECIMAL},
  480. #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR},
  481. #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR},
  482. #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR},
  483. #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR},
  484. #{item.consigneeContactTel,jdbcType=VARCHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL},
  485. #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  486. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  487. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
  488. #{item.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR}
  489. from dual
  490. </foreach> )
  491. </insert>
  492. <update id="batchUpdate" parameterType="java.util.List">
  493. update RMS_CONSIGNEE
  494. set
  495. CONSIGNEE_ID=
  496. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  497. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
  498. </foreach>
  499. ,CONSIGNEE_COMPANY_NAME=
  500. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  501. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
  502. </foreach>
  503. ,CONSIGNEE_ABBREVIATION=
  504. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  505. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
  506. </foreach>
  507. ,CONSIGNEE_REGISTERED_ADDRESS=
  508. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  509. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
  510. </foreach>
  511. ,CONSIGNEE_RECEIVE_ADDRESS=
  512. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  513. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
  514. </foreach>
  515. ,CONSIGNEE_REGISTRATION_TIME=
  516. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  517. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
  518. </foreach>
  519. ,CONSIGNEE_CONTACT_NAME=
  520. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  521. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
  522. </foreach>
  523. ,CONSIGNEE_WARRANTY_AMOUNT=
  524. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  525. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
  526. </foreach>
  527. ,CONSIGNEE_WARRANTY_WEIGHT=
  528. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  529. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
  530. </foreach>
  531. ,CONSIGNEE_CONTACT_TEL=
  532. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  533. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=VARCHAR}
  534. </foreach>
  535. ,CONSIGNEE_EXCHANGE_DELIVERY=
  536. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  537. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
  538. </foreach>
  539. ,INSERT_USERNAME=
  540. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  541. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  542. </foreach>
  543. ,INSERT_TIME=
  544. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  545. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  546. </foreach>
  547. ,UPDATE_USERNAME=
  548. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  549. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  550. </foreach>
  551. ,UPDATE_TIME=
  552. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  553. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  554. </foreach>
  555. ,INSERT_UPDATE_REMARK=
  556. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  557. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  558. </foreach>
  559. ,DELETED=
  560. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  561. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  562. </foreach>
  563. ,EAS_CONSIGNEE_ID=
  564. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  565. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
  566. </foreach>
  567. ,CONSIGNEE_CODE=
  568. <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
  569. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCode,jdbcType=VARCHAR}
  570. </foreach>
  571. where CONSIGNEE_ID in
  572. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  573. #{item.consigneeId,jdbcType=DECIMAL}
  574. </foreach>
  575. </update>
  576. <delete id="batchDelete" parameterType="java.util.List">
  577. delete from RMS_CONSIGNEE
  578. where CONSIGNEE_ID in
  579. <foreach close=")" collection="list" item="id" open="(" separator=",">
  580. #{id}
  581. </foreach>
  582. </delete>
  583. <!-- 友情提示!!!-->
  584. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  585. <select id="getConsigneeList" parameterType="java.util.Map" resultType="java.util.Map">
  586. SELECT *
  587. FROM (
  588. SELECT
  589. RC.CONSIGNEE_ID AS "consigneeId",
  590. RC.CONSIGNEE_COMPANY_NAME AS "companyName",
  591. RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
  592. RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
  593. RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
  594. RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
  595. RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
  596. RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
  597. FROM RMS_CONSIGNEE RC
  598. WHERE RC.DELETED!=1
  599. ORDER BY RC.INSERT_TIME DESC
  600. )
  601. WHERE rownum &lt; 100
  602. <where>
  603. <if test="companyName!= null">
  604. and
  605. <foreach collection="companyName" item="item" open="(" separator="," close=")">
  606. "companyName" in #{item}
  607. </foreach>
  608. </if>
  609. <if test="consigneeAbbreviation!= null">
  610. and
  611. <foreach collection="consigneeAbbreviation" item="item" open="(" separator="," close=")">
  612. "consigneeAbbreviation" in #{item}
  613. </foreach>
  614. </if>
  615. <if test="consigneeRegisteredAddress!= null">
  616. and
  617. <foreach collection="consigneeRegisteredAddress" item="item" open="(" separator="," close=")">
  618. "consigneeRegisteredAddress" in #{item}
  619. </foreach>
  620. </if>
  621. <if test="consigneeReceiveAddress= null">
  622. and
  623. <foreach collection="consigneeReceiveAddress" item="item" open="(" separator="," close=")">
  624. "consigneeReceiveAddress" in #{item}
  625. </foreach>
  626. </if>
  627. <if test="consigneeRegistrationTime!= null">
  628. and
  629. <foreach collection="consigneeRegistrationTime" item="item" open="(" separator="," close=")">
  630. "consigneeRegistrationTime" in #{item}
  631. </foreach>
  632. </if>
  633. <if test="consigneeContactName!= null">
  634. and
  635. <foreach collection="consigneeContactName" item="item" open="(" separator="," close=")">
  636. "consigneeContactName" in #{item}
  637. </foreach>
  638. </if>
  639. <if test="consigneeContactTel!= null">
  640. and
  641. <foreach collection="consigneeContactTel" item="item" open="(" separator="," close=")">
  642. "consigneeContactTel" in #{item}
  643. </foreach>
  644. </if>
  645. </where>
  646. <include refid="orderBy"></include>
  647. </select>
  648. <sql id="orderBy">
  649. <if test="orderField!=null and orderField !=''">
  650. order by "${orderField}"
  651. <if test="orderType !=null and orderType !=''">
  652. ${orderType}
  653. </if>
  654. </if>
  655. </sql>
  656. <select id="getConsigneeById" resultType="java.util.LinkedHashMap">
  657. SELECT
  658. RC.CONSIGNEE_ID AS "consigneeId",
  659. RC.CONSIGNEE_COMPANY_NAME AS "companyName",
  660. RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
  661. RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
  662. RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
  663. RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
  664. RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
  665. RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
  666. FROM RMS_CONSIGNEE RC
  667. WHERE RC.CONSIGNEE_ID = #{id}
  668. </select>
  669. <select id="selectConsigneeId" resultType="DECIMAL" >
  670. select max(RC.CONSIGNEE_ID+1) from RMS_CONSIGNEE RC
  671. </select>
  672. <select id="getConsigneeByCompanyName" parameterType="java.lang.String" resultType="int">
  673. select count(*)
  674. from RMS_CONSIGNEE RC
  675. where RC.CONSIGNEE_COMPANY_NAME=#{companyName}
  676. and RC.DELETED!=1
  677. </select>
  678. </mapper>