RmsCapacityMapper.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  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.RmsCapacityMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCapacity">
  5. <id column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
  6. <result column="CAPACITY_NUMBER" jdbcType="VARCHAR" property="capacityNumber" />
  7. <result column="CAPACITY_MAX_LOAD" jdbcType="DECIMAL" property="capacityMaxLoad" />
  8. <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
  9. <result column="CAPACITY_STATUS" jdbcType="DECIMAL" property="capacityStatus" />
  10. <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
  11. <result column="CAPACITY_ENERGY_ID" jdbcType="VARCHAR" property="capacityEnergyId" />
  12. <result column="CAPACITY_LEN_VAL" jdbcType="DECIMAL" property="capacityLenVal" />
  13. <result column="CAPACITY_WID_VAL" jdbcType="DECIMAL" property="capacityWidVal" />
  14. <result column="CAPACITY_HIG_VAL" jdbcType="DECIMAL" property="capacityHigVal" />
  15. <result column="CAPACITY_OIL_ID" jdbcType="DECIMAL" property="capacityOilId" />
  16. <result column="CAPACITY_FUEL_CONSUMPTION" jdbcType="VARCHAR" property="capacityFuelConsumption" />
  17. <result column="CAPACITY_OWNERIS" jdbcType="VARCHAR" property="capacityOwneris" />
  18. <result column="CAPACITY_BLACKLIST" jdbcType="VARCHAR" property="capacityBlacklist" />
  19. <result column="MEMO" jdbcType="VARCHAR" property="memo" />
  20. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  21. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  22. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  23. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  24. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
  25. <result column="CAPACITY_CORLOR" jdbcType="VARCHAR" property="capacityCorlor" />
  26. <result column="CAPACITY_VIP" jdbcType="VARCHAR" property="capacityVip" />
  27. <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
  28. </resultMap>
  29. <sql id="columns">
  30. CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, CAPACITY_TYPE_ID, CAPACITY_STATUS,
  31. CARRIER_ID, CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL, CAPACITY_HIG_VAL,
  32. CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS, CAPACITY_BLACKLIST,
  33. MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
  34. CAPACITY_CORLOR, CAPACITY_VIP, DELETED
  35. </sql>
  36. <sql id="columns_alias">
  37. t.CAPACITY_ID, t.CAPACITY_NUMBER, t.CAPACITY_MAX_LOAD, t.CAPACITY_TYPE_ID, t.CAPACITY_STATUS,
  38. t.CARRIER_ID, t.CAPACITY_ENERGY_ID, t.CAPACITY_LEN_VAL, t.CAPACITY_WID_VAL, t.CAPACITY_HIG_VAL,
  39. t.CAPACITY_OIL_ID, t.CAPACITY_FUEL_CONSUMPTION, t.CAPACITY_OWNERIS, t.CAPACITY_BLACKLIST,
  40. t.MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
  41. t.CAPACITY_CORLOR, t.CAPACITY_VIP, t.DELETED
  42. </sql>
  43. <sql id="select">
  44. SELECT <include refid="columns" /> FROM RMS_CAPACITY
  45. </sql>
  46. <sql id="select_alias">
  47. SELECT <include refid="columns_alias" /> FROM RMS_CAPACITY t
  48. </sql>
  49. <sql id="where">
  50. <where>
  51. <if test="capacityId != null">
  52. and CAPACITY_ID = #{capacityId}
  53. </if>
  54. <if test="capacityNumber != null and capacityNumber != ''">
  55. and CAPACITY_NUMBER = #{capacityNumber}
  56. </if>
  57. <if test="capacityMaxLoad != null">
  58. and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
  59. </if>
  60. <if test="capacityTypeId != null">
  61. and CAPACITY_TYPE_ID = #{capacityTypeId}
  62. </if>
  63. <if test="capacityStatus != null and capacityStatus != ''">
  64. and CAPACITY_STATUS = #{capacityStatus}
  65. </if>
  66. <if test="carrierId != null">
  67. and CARRIER_ID = #{carrierId}
  68. </if>
  69. <if test="capacityEnergyId != null and capacityEnergyId != ''">
  70. and CAPACITY_ENERGY_ID = #{capacityEnergyId}
  71. </if>
  72. <if test="capacityLenVal != null">
  73. and CAPACITY_LEN_VAL = #{capacityLenVal}
  74. </if>
  75. <if test="capacityWidVal != null">
  76. and CAPACITY_WID_VAL = #{capacityWidVal}
  77. </if>
  78. <if test="capacityHigVal != null">
  79. and CAPACITY_HIG_VAL = #{capacityHigVal}
  80. </if>
  81. <if test="capacityOilId != null">
  82. and CAPACITY_OIL_ID = #{capacityOilId}
  83. </if>
  84. <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
  85. and CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
  86. </if>
  87. <if test="capacityOwneris != null and capacityOwneris != ''">
  88. and CAPACITY_OWNERIS = #{capacityOwneris}
  89. </if>
  90. <if test="capacityBlacklist != null and capacityBlacklist != ''">
  91. and CAPACITY_BLACKLIST = #{capacityBlacklist}
  92. </if>
  93. <if test="memo != null and memo != ''">
  94. and MEMO = #{memo}
  95. </if>
  96. <if test="insertUsername != null and insertUsername != ''">
  97. and INSERT_USERNAME = #{insertUsername}
  98. </if>
  99. <if test="insertTime != null">
  100. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  101. </if>
  102. <if test="updateUsername != null and updateUsername != ''">
  103. and UPDATE_USERNAME = #{updateUsername}
  104. </if>
  105. <if test="updateTime != null">
  106. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  107. </if>
  108. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  109. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  110. </if>
  111. <if test="capacityCorlor != null and capacityCorlor != ''">
  112. and CAPACITY_CORLOR = #{capacityCorlor}
  113. </if>
  114. <if test="capacityVip != null and capacityVip != ''">
  115. and CAPACITY_VIP = #{capacityVip}
  116. </if>
  117. <if test="deleted != null">
  118. and DELETED = #{deleted}
  119. </if>
  120. </where>
  121. </sql>
  122. <sql id="whereLike">
  123. <where>
  124. <if test="capacityId != null">
  125. and CAPACITY_ID = #{capacityId}
  126. </if>
  127. <if test="capacityNumber != null and capacityNumber != ''">
  128. and CAPACITY_NUMBER LIKE '%${capacityNumber}%'
  129. </if>
  130. <if test="capacityMaxLoad != null">
  131. and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
  132. </if>
  133. <if test="capacityTypeId != null">
  134. and CAPACITY_TYPE_ID = #{capacityTypeId}
  135. </if>
  136. <if test="capacityStatus != null and capacityStatus != ''">
  137. and CAPACITY_STATUS LIKE '%${capacityStatus}%'
  138. </if>
  139. <if test="carrierId != null">
  140. and CARRIER_ID = #{carrierId}
  141. </if>
  142. <if test="capacityEnergyId != null and capacityEnergyId != ''">
  143. and CAPACITY_ENERGY_ID LIKE '%${capacityEnergyId}%'
  144. </if>
  145. <if test="capacityLenVal != null">
  146. and CAPACITY_LEN_VAL = #{capacityLenVal}
  147. </if>
  148. <if test="capacityWidVal != null">
  149. and CAPACITY_WID_VAL = #{capacityWidVal}
  150. </if>
  151. <if test="capacityHigVal != null">
  152. and CAPACITY_HIG_VAL = #{capacityHigVal}
  153. </if>
  154. <if test="capacityOilId != null">
  155. and CAPACITY_OIL_ID = #{capacityOilId}
  156. </if>
  157. <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
  158. and CAPACITY_FUEL_CONSUMPTION LIKE '%${capacityFuelConsumption}%'
  159. </if>
  160. <if test="capacityOwneris != null and capacityOwneris != ''">
  161. and CAPACITY_OWNERIS LIKE '%${capacityOwneris}%'
  162. </if>
  163. <if test="capacityBlacklist != null and capacityBlacklist != ''">
  164. and CAPACITY_BLACKLIST LIKE '%${capacityBlacklist}%'
  165. </if>
  166. <if test="memo != null and memo != ''">
  167. and MEMO LIKE '%${memo}%'
  168. </if>
  169. <if test="insertUsername != null and insertUsername != ''">
  170. and INSERT_USERNAME LIKE '%${insertUsername}%'
  171. </if>
  172. <if test="insertTime != null">
  173. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  174. </if>
  175. <if test="updateUsername != null and updateUsername != ''">
  176. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  177. </if>
  178. <if test="updateTime != null">
  179. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  180. </if>
  181. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  182. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  183. </if>
  184. <if test="capacityCorlor != null and capacityCorlor != ''">
  185. and CAPACITY_CORLOR LIKE '%${capacityCorlor}%'
  186. </if>
  187. <if test="capacityVip != null and capacityVip != ''">
  188. and CAPACITY_VIP LIKE '%${capacityVip}%'
  189. </if>
  190. <if test="deleted != null">
  191. and DELETED = #{deleted}
  192. </if>
  193. </where>
  194. </sql>
  195. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  196. delete from RMS_CAPACITY
  197. where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
  198. </delete>
  199. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  200. delete from RMS_CAPACITY
  201. where 1!=1
  202. <if test="capacityNumber != null and capacityNumber != ''">
  203. or CAPACITY_NUMBER = #{capacityNumber}
  204. </if>
  205. <if test="capacityMaxLoad != null">
  206. or CAPACITY_MAX_LOAD = #{capacityMaxLoad}
  207. </if>
  208. <if test="capacityTypeId != null">
  209. or CAPACITY_TYPE_ID = #{capacityTypeId}
  210. </if>
  211. <if test="capacityStatus != null and capacityStatus != ''">
  212. or CAPACITY_STATUS = #{capacityStatus}
  213. </if>
  214. <if test="carrierId != null">
  215. or CARRIER_ID = #{carrierId}
  216. </if>
  217. <if test="capacityEnergyId != null and capacityEnergyId != ''">
  218. or CAPACITY_ENERGY_ID = #{capacityEnergyId}
  219. </if>
  220. <if test="capacityLenVal != null">
  221. or CAPACITY_LEN_VAL = #{capacityLenVal}
  222. </if>
  223. <if test="capacityWidVal != null">
  224. or CAPACITY_WID_VAL = #{capacityWidVal}
  225. </if>
  226. <if test="capacityHigVal != null">
  227. or CAPACITY_HIG_VAL = #{capacityHigVal}
  228. </if>
  229. <if test="capacityOilId != null">
  230. or CAPACITY_OIL_ID = #{capacityOilId}
  231. </if>
  232. <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
  233. or CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
  234. </if>
  235. <if test="capacityOwneris != null and capacityOwneris != ''">
  236. or CAPACITY_OWNERIS = #{capacityOwneris}
  237. </if>
  238. <if test="capacityBlacklist != null and capacityBlacklist != ''">
  239. or CAPACITY_BLACKLIST = #{capacityBlacklist}
  240. </if>
  241. <if test="memo != null and memo != ''">
  242. or MEMO = #{memo}
  243. </if>
  244. <if test="insertUsername != null and insertUsername != ''">
  245. or INSERT_USERNAME = #{insertUsername}
  246. </if>
  247. <if test="insertTime != null">
  248. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  249. </if>
  250. <if test="updateUsername != null and updateUsername != ''">
  251. or UPDATE_USERNAME = #{updateUsername}
  252. </if>
  253. <if test="updateTime != null">
  254. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  255. </if>
  256. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  257. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  258. </if>
  259. <if test="capacityCorlor != null and capacityCorlor != ''">
  260. or CAPACITY_CORLOR = #{capacityCorlor}
  261. </if>
  262. <if test="capacityVip != null and capacityVip != ''">
  263. or CAPACITY_VIP = #{capacityVip}
  264. </if>
  265. <if test="deleted != null">
  266. or DELETED = #{deleted}
  267. </if>
  268. </delete>
  269. <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacity">
  270. insert into RMS_CAPACITY (CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD,
  271. CAPACITY_TYPE_ID, CAPACITY_STATUS, CARRIER_ID,
  272. CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL,
  273. CAPACITY_HIG_VAL, CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION,
  274. CAPACITY_OWNERIS, CAPACITY_BLACKLIST, MEMO,
  275. INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
  276. UPDATE_TIME, INSERT_UPDATE_REMARK, CAPACITY_CORLOR,
  277. CAPACITY_VIP, DELETED)
  278. values (#{capacityId,jdbcType=DECIMAL}, #{capacityNumber,jdbcType=VARCHAR}, #{capacityMaxLoad,jdbcType=DECIMAL},
  279. #{capacityTypeId,jdbcType=DECIMAL}, #{capacityStatus,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
  280. #{capacityEnergyId,jdbcType=VARCHAR}, #{capacityLenVal,jdbcType=DECIMAL}, #{capacityWidVal,jdbcType=DECIMAL},
  281. #{capacityHigVal,jdbcType=DECIMAL}, #{capacityOilId,jdbcType=DECIMAL}, #{capacityFuelConsumption,jdbcType=VARCHAR},
  282. #{capacityOwneris,jdbcType=VARCHAR}, #{capacityBlacklist,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR},
  283. #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
  284. #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{capacityCorlor,jdbcType=VARCHAR},
  285. #{capacityVip,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
  286. </insert>
  287. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
  288. insert into RMS_CAPACITY
  289. <trim prefix="(" suffix=")" suffixOverrides=",">
  290. <if test="capacityId != null">
  291. CAPACITY_ID,
  292. </if>
  293. <if test="capacityNumber != null">
  294. CAPACITY_NUMBER,
  295. </if>
  296. <if test="capacityMaxLoad != null">
  297. CAPACITY_MAX_LOAD,
  298. </if>
  299. <if test="capacityTypeId != null">
  300. CAPACITY_TYPE_ID,
  301. </if>
  302. <if test="capacityStatus != null">
  303. CAPACITY_STATUS,
  304. </if>
  305. <if test="carrierId != null">
  306. CARRIER_ID,
  307. </if>
  308. <if test="capacityEnergyId != null">
  309. CAPACITY_ENERGY_ID,
  310. </if>
  311. <if test="capacityLenVal != null">
  312. CAPACITY_LEN_VAL,
  313. </if>
  314. <if test="capacityWidVal != null">
  315. CAPACITY_WID_VAL,
  316. </if>
  317. <if test="capacityHigVal != null">
  318. CAPACITY_HIG_VAL,
  319. </if>
  320. <if test="capacityOilId != null">
  321. CAPACITY_OIL_ID,
  322. </if>
  323. <if test="capacityFuelConsumption != null">
  324. CAPACITY_FUEL_CONSUMPTION,
  325. </if>
  326. <if test="capacityOwneris != null">
  327. CAPACITY_OWNERIS,
  328. </if>
  329. <if test="capacityBlacklist != null">
  330. CAPACITY_BLACKLIST,
  331. </if>
  332. <if test="memo != null">
  333. MEMO,
  334. </if>
  335. <if test="insertUsername != null">
  336. INSERT_USERNAME,
  337. </if>
  338. <if test="insertTime != null">
  339. INSERT_TIME,
  340. </if>
  341. <if test="updateUsername != null">
  342. UPDATE_USERNAME,
  343. </if>
  344. <if test="updateTime != null">
  345. UPDATE_TIME,
  346. </if>
  347. <if test="insertUpdateRemark != null">
  348. INSERT_UPDATE_REMARK,
  349. </if>
  350. <if test="capacityCorlor != null">
  351. CAPACITY_CORLOR,
  352. </if>
  353. <if test="capacityVip != null">
  354. CAPACITY_VIP,
  355. </if>
  356. <if test="deleted != null">
  357. DELETED,
  358. </if>
  359. </trim>
  360. <trim prefix="values (" suffix=")" suffixOverrides=",">
  361. <if test="capacityId != null">
  362. #{capacityId,jdbcType=DECIMAL},
  363. </if>
  364. <if test="capacityNumber != null">
  365. #{capacityNumber,jdbcType=VARCHAR},
  366. </if>
  367. <if test="capacityMaxLoad != null">
  368. #{capacityMaxLoad,jdbcType=DECIMAL},
  369. </if>
  370. <if test="capacityTypeId != null">
  371. #{capacityTypeId,jdbcType=DECIMAL},
  372. </if>
  373. <if test="capacityStatus != null">
  374. #{capacityStatus,jdbcType=DECIMAL},
  375. </if>
  376. <if test="carrierId != null">
  377. #{carrierId,jdbcType=DECIMAL},
  378. </if>
  379. <if test="capacityEnergyId != null">
  380. #{capacityEnergyId,jdbcType=VARCHAR},
  381. </if>
  382. <if test="capacityLenVal != null">
  383. #{capacityLenVal,jdbcType=DECIMAL},
  384. </if>
  385. <if test="capacityWidVal != null">
  386. #{capacityWidVal,jdbcType=DECIMAL},
  387. </if>
  388. <if test="capacityHigVal != null">
  389. #{capacityHigVal,jdbcType=DECIMAL},
  390. </if>
  391. <if test="capacityOilId != null">
  392. #{capacityOilId,jdbcType=DECIMAL},
  393. </if>
  394. <if test="capacityFuelConsumption != null">
  395. #{capacityFuelConsumption,jdbcType=VARCHAR},
  396. </if>
  397. <if test="capacityOwneris != null">
  398. #{capacityOwneris,jdbcType=VARCHAR},
  399. </if>
  400. <if test="capacityBlacklist != null">
  401. #{capacityBlacklist,jdbcType=VARCHAR},
  402. </if>
  403. <if test="memo != null">
  404. #{memo,jdbcType=VARCHAR},
  405. </if>
  406. <if test="insertUsername != null">
  407. #{insertUsername,jdbcType=VARCHAR},
  408. </if>
  409. <if test="insertTime != null">
  410. #{insertTime,jdbcType=TIMESTAMP},
  411. </if>
  412. <if test="updateUsername != null">
  413. #{updateUsername,jdbcType=VARCHAR},
  414. </if>
  415. <if test="updateTime != null">
  416. #{updateTime,jdbcType=TIMESTAMP},
  417. </if>
  418. <if test="insertUpdateRemark != null">
  419. #{insertUpdateRemark,jdbcType=VARCHAR},
  420. </if>
  421. <if test="capacityCorlor != null">
  422. #{capacityCorlor,jdbcType=VARCHAR},
  423. </if>
  424. <if test="capacityVip != null">
  425. #{capacityVip,jdbcType=VARCHAR},
  426. </if>
  427. <if test="deleted != null">
  428. #{deleted,jdbcType=DECIMAL},
  429. </if>
  430. </trim>
  431. </insert>
  432. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacity">
  433. update RMS_CAPACITY
  434. set CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
  435. CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
  436. CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
  437. CAPACITY_STATUS = #{capacityStatus,jdbcType=DECIMAL},
  438. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  439. CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
  440. CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
  441. CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
  442. CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
  443. CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
  444. CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
  445. CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=VARCHAR},
  446. CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=VARCHAR},
  447. MEMO = #{memo,jdbcType=VARCHAR},
  448. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  449. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  450. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  451. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  452. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  453. CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
  454. CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
  455. DELETED = #{deleted,jdbcType=DECIMAL}
  456. where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
  457. </update>
  458. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
  459. update RMS_CAPACITY
  460. <set>
  461. <if test="capacityNumber != null">
  462. CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
  463. </if>
  464. <if test="capacityMaxLoad != null">
  465. CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
  466. </if>
  467. <if test="capacityTypeId != null">
  468. CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
  469. </if>
  470. <if test="capacityStatus != null">
  471. CAPACITY_STATUS = #{capacityStatus,jdbcType=DECIMAL},
  472. </if>
  473. <if test="carrierId != null">
  474. CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
  475. </if>
  476. <if test="capacityEnergyId != null">
  477. CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
  478. </if>
  479. <if test="capacityLenVal != null">
  480. CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
  481. </if>
  482. <if test="capacityWidVal != null">
  483. CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
  484. </if>
  485. <if test="capacityHigVal != null">
  486. CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
  487. </if>
  488. <if test="capacityOilId != null">
  489. CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
  490. </if>
  491. <if test="capacityFuelConsumption != null">
  492. CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
  493. </if>
  494. <if test="capacityOwneris != null">
  495. CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=VARCHAR},
  496. </if>
  497. <if test="capacityBlacklist != null">
  498. CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=VARCHAR},
  499. </if>
  500. <if test="memo != null">
  501. MEMO = #{memo,jdbcType=VARCHAR},
  502. </if>
  503. <if test="insertUsername != null">
  504. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  505. </if>
  506. <if test="insertTime != null">
  507. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  508. </if>
  509. <if test="updateUsername != null">
  510. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  511. </if>
  512. <if test="updateTime != null">
  513. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  514. </if>
  515. <if test="insertUpdateRemark != null">
  516. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  517. </if>
  518. <if test="capacityCorlor != null">
  519. CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
  520. </if>
  521. <if test="capacityVip != null">
  522. CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
  523. </if>
  524. <if test="deleted != null">
  525. DELETED = #{deleted,jdbcType=DECIMAL},
  526. </if>
  527. </set>
  528. where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
  529. </update>
  530. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  531. <include refid="select" />
  532. where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
  533. </select>
  534. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  535. <include refid="select" />
  536. <include refid="where" />
  537. </select>
  538. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  539. <include refid="select" />
  540. <include refid="whereLike" />
  541. </select>
  542. <insert id="batchInsert" parameterType="java.util.List">
  543. insert into RMS_CAPACITY
  544. (CAPACITY_ID,
  545. CAPACITY_NUMBER, CAPACITY_MAX_LOAD,
  546. CAPACITY_TYPE_ID, CAPACITY_STATUS,
  547. CARRIER_ID, CAPACITY_ENERGY_ID,
  548. CAPACITY_LEN_VAL, CAPACITY_WID_VAL,
  549. CAPACITY_HIG_VAL, CAPACITY_OIL_ID,
  550. CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS,
  551. CAPACITY_BLACKLIST, MEMO, INSERT_USERNAME,
  552. INSERT_TIME, UPDATE_USERNAME,
  553. UPDATE_TIME, INSERT_UPDATE_REMARK,
  554. CAPACITY_CORLOR, CAPACITY_VIP,
  555. DELETED)
  556. ( <foreach collection="list" item="item" separator="union all">
  557. select
  558. #{item.capacityId,jdbcType=DECIMAL},
  559. #{item.capacityNumber,jdbcType=VARCHAR}, #{item.capacityMaxLoad,jdbcType=DECIMAL},
  560. #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.capacityStatus,jdbcType=DECIMAL},
  561. #{item.carrierId,jdbcType=DECIMAL}, #{item.capacityEnergyId,jdbcType=VARCHAR},
  562. #{item.capacityLenVal,jdbcType=DECIMAL}, #{item.capacityWidVal,jdbcType=DECIMAL},
  563. #{item.capacityHigVal,jdbcType=DECIMAL}, #{item.capacityOilId,jdbcType=DECIMAL},
  564. #{item.capacityFuelConsumption,jdbcType=VARCHAR}, #{item.capacityOwneris,jdbcType=VARCHAR},
  565. #{item.capacityBlacklist,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
  566. #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  567. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
  568. #{item.capacityCorlor,jdbcType=VARCHAR}, #{item.capacityVip,jdbcType=VARCHAR},
  569. #{item.deleted,jdbcType=DECIMAL} from dual
  570. </foreach> )
  571. </insert>
  572. <update id="batchUpdate" parameterType="java.util.List">
  573. update RMS_CAPACITY
  574. set
  575. CAPACITY_ID=
  576. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  577. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
  578. </foreach>
  579. ,CAPACITY_NUMBER=
  580. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  581. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityNumber,jdbcType=VARCHAR}
  582. </foreach>
  583. ,CAPACITY_MAX_LOAD=
  584. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  585. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityMaxLoad,jdbcType=DECIMAL}
  586. </foreach>
  587. ,CAPACITY_TYPE_ID=
  588. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  589. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
  590. </foreach>
  591. ,CAPACITY_STATUS=
  592. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  593. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityStatus,jdbcType=DECIMAL}
  594. </foreach>
  595. ,CARRIER_ID=
  596. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  597. when #{item.capacityId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
  598. </foreach>
  599. ,CAPACITY_ENERGY_ID=
  600. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  601. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityEnergyId,jdbcType=VARCHAR}
  602. </foreach>
  603. ,CAPACITY_LEN_VAL=
  604. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  605. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityLenVal,jdbcType=DECIMAL}
  606. </foreach>
  607. ,CAPACITY_WID_VAL=
  608. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  609. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityWidVal,jdbcType=DECIMAL}
  610. </foreach>
  611. ,CAPACITY_HIG_VAL=
  612. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  613. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityHigVal,jdbcType=DECIMAL}
  614. </foreach>
  615. ,CAPACITY_OIL_ID=
  616. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  617. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOilId,jdbcType=DECIMAL}
  618. </foreach>
  619. ,CAPACITY_FUEL_CONSUMPTION=
  620. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  621. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityFuelConsumption,jdbcType=VARCHAR}
  622. </foreach>
  623. ,CAPACITY_OWNERIS=
  624. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  625. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOwneris,jdbcType=VARCHAR}
  626. </foreach>
  627. ,CAPACITY_BLACKLIST=
  628. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  629. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityBlacklist,jdbcType=VARCHAR}
  630. </foreach>
  631. ,MEMO=
  632. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  633. when #{item.capacityId,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
  634. </foreach>
  635. ,INSERT_USERNAME=
  636. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  637. when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  638. </foreach>
  639. ,INSERT_TIME=
  640. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  641. when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  642. </foreach>
  643. ,UPDATE_USERNAME=
  644. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  645. when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  646. </foreach>
  647. ,UPDATE_TIME=
  648. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  649. when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  650. </foreach>
  651. ,INSERT_UPDATE_REMARK=
  652. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  653. when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  654. </foreach>
  655. ,CAPACITY_CORLOR=
  656. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  657. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityCorlor,jdbcType=VARCHAR}
  658. </foreach>
  659. ,CAPACITY_VIP=
  660. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  661. when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityVip,jdbcType=VARCHAR}
  662. </foreach>
  663. ,DELETED=
  664. <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
  665. when #{item.capacityId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  666. </foreach>
  667. where CAPACITY_ID in
  668. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  669. #{item.capacityId,jdbcType=DECIMAL}
  670. </foreach>
  671. </update>
  672. <delete id="batchDelete" parameterType="java.util.List">
  673. delete from RMS_CAPACITY
  674. where CAPACITY_ID in
  675. <foreach close=")" collection="list" item="id" open="(" separator=",">
  676. #{id}
  677. </foreach>
  678. </delete>
  679. <!-- 友情提示!!!-->
  680. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  681. <select id="getCapacityList" parameterType="java.util.Map" resultType="java.util.Map">
  682. SELECT * FROM
  683. (
  684. SELECT
  685. RC.CAPACITY_ID AS "capacityId",
  686. RCT.CAPACITY_TYPE_NAME AS "capacityTypeName",
  687. RC.CAPACITY_NUMBER AS "capacityNumber",
  688. RC.CAPACITY_CORLOR AS "capacityCorlor",
  689. RC.CAPACITY_OWNERIS AS "capacityOwneris",
  690. RC.CAPACITY_VIP AS "capacityVip",
  691. RC.CAPACITY_BLACKLIST AS "capacityBlacklist",
  692. RCA.CARRIER_NAME AS "carrierName"
  693. FROM RMS_CAPACITY RC
  694. LEFT JOIN
  695. RMS_CAPACITY_TYPE RCT
  696. ON RC.CAPACITY_TYPE_ID=RCT.CAPACITY_TYPE_ID
  697. LEFT JOIN
  698. RMS_CARRIER RCA
  699. ON RCA.CARRIER_ID=RC.CARRIER_ID
  700. WHERE RC.DELETED!=1
  701. ORDER BY RC.INSERT_TIME DESC
  702. )
  703. <where>
  704. <if test="capacityId!= null">
  705. and
  706. <foreach collection="capacityId" item="item" open="(" separator="," close=")">
  707. "capacityId" in #{item}
  708. </foreach>
  709. </if>
  710. <if test="capacityTypeName!= null">
  711. and
  712. <foreach collection="capacityTypeName" item="item" open="(" separator="," close=")">
  713. "capacityTypeName" in #{item}
  714. </foreach>
  715. </if>
  716. <if test="capacityNumber!= null">
  717. and
  718. <foreach collection="capacityNumber" item="item" open="(" separator="," close=")">
  719. "capacityNumber" in #{item}
  720. </foreach>
  721. </if>
  722. <if test="capacityCorlor!= null">
  723. and
  724. <foreach collection="capacityCorlor" item="item" open="(" separator="," close=")">
  725. "capacityCorlor" in #{item}
  726. </foreach>
  727. </if>
  728. <if test="capacityOwneris!= null">
  729. and
  730. <foreach collection="capacityOwneris" item="item" open="(" separator="," close=")">
  731. "capacityOwneris" in #{item}
  732. </foreach>
  733. </if>
  734. <if test="capacityVip!= null">
  735. and
  736. <foreach collection="capacityVip" item="item" open="(" separator="," close=")">
  737. "capacityVip" in #{item}
  738. </foreach>
  739. </if>
  740. <if test="capacityBlacklist!= null">
  741. and
  742. <foreach collection="capacityBlacklist" item="item" open="(" separator="," close=")">
  743. "capacityBlacklist" in #{item}
  744. </foreach>
  745. </if>
  746. <if test="carrierName!= null">
  747. and
  748. <foreach collection="carrierName" item="item" open="(" separator="," close=")">
  749. "carrierName" in #{item}
  750. </foreach>
  751. </if>
  752. </where>
  753. </select>
  754. <select id="getCapacityById" resultType="java.util.LinkedHashMap" >
  755. SELECT
  756. RC.CAPACITY_ID AS "capacityId",
  757. RC.CAPACITY_TYPE_ID AS "capacityTypeId",
  758. RC.CAPACITY_NUMBER AS "capacityNumber",
  759. RC.CAPACITY_CORLOR AS "capacityCorlor",
  760. RC.CAPACITY_OWNERIS AS "capacityOwneris",
  761. RC.CAPACITY_VIP AS "capacityVip",
  762. RC.CAPACITY_BLACKLIST AS "capacityBlacklist",
  763. RC.CARRIER_ID AS "carrierId"
  764. FROM RMS_CAPACITY RC
  765. WHERE RC.CAPACITY_ID=#{id}
  766. </select>
  767. <select id="getCapacityTypeId" resultType="java.util.LinkedHashMap">
  768. SELECT
  769. RCT.CAPACITY_TYPE_ID AS "id",
  770. RCT.CAPACITY_TYPE_ID AS "value",
  771. RCT.CAPACITY_TYPE_NAME AS "label"
  772. FROM RMS_CAPACITY_TYPE RCT
  773. </select>
  774. <select id="getCarrierId" resultType="java.util.LinkedHashMap">
  775. SELECT
  776. RC.CARRIER_ID AS "id",
  777. RC.CARRIER_ID AS "value",
  778. RC.CARRIER_NAME AS "label"
  779. FROM RMS_CARRIER RC
  780. WHERE RC.DELETED!=1
  781. </select>
  782. </mapper>