RmsCapacityMapper.xml 43 KB

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