RmsCarDriverMapper.xml 47 KB

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