RmsCapacityMapper.xml 35 KB

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