RmsConsigneeMapper.xml 33 KB

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