12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.steerinfo.dil.mapper.RmsCarDriverMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCarDriver">
- <id column="DRIVER_ID" jdbcType="DECIMAL" property="driverId" />
- <result column="DRIVER_NAME" jdbcType="VARCHAR" property="driverName" />
- <result column="DRIVER_SEX" jdbcType="VARCHAR" property="driverSex" />
- <result column="DRIVER_AGE" jdbcType="DECIMAL" property="driverAge" />
- <result column="DRIVER_PHONE" jdbcType="VARCHAR" property="driverPhone" />
- <result column="DRIVER_IDENTITY_CARD" jdbcType="VARCHAR" property="driverIdentityCard" />
- <result column="TRANSPORT_TYPE_ID" jdbcType="DECIMAL" property="transportTypeId" />
- <result column="DRIVING_LICENCE" jdbcType="VARCHAR" property="drivingLicence" />
- <result column="DRIVER_YEARS" jdbcType="DECIMAL" property="driverYears" />
- <result column="DRIVER_POLICY" jdbcType="VARCHAR" property="driverPolicy" />
- <result column="DRIVING_PERMIT_NO" jdbcType="VARCHAR" property="drivingPermitNo" />
- <result column="DUTY_STATE_STATUS" jdbcType="VARCHAR" property="dutyStateStatus" />
- <result column="DRIVER_EMERGENCY_CONTACTS" jdbcType="VARCHAR" property="driverEmergencyContacts" />
- <result column="DRIVER_EMERGENCY_TEL" jdbcType="VARCHAR" property="driverEmergencyTel" />
- <result column="DRIVER_ADDRESS" jdbcType="VARCHAR" property="driverAddress" />
- <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
- <result column="CLASS_GROUP" jdbcType="VARCHAR" property="classGroup" />
- <result column="DRIVER_BIRTH_DATE" jdbcType="VARCHAR" property="driverBirthDate" />
- <result column="DRIVER_LICENSE_FIRST_DATE" jdbcType="TIMESTAMP" property="driverLicenseFirstDate" />
- <result column="DRIVER_LICENSE_DATE_BEG" jdbcType="TIMESTAMP" property="driverLicenseDateBeg" />
- <result column="DRIVER_LICENSE_DATE_END" jdbcType="TIMESTAMP" property="driverLicenseDateEnd" />
- <result column="DRIVER_LICENSE_TIPS_DATE" jdbcType="TIMESTAMP" property="driverLicenseTipsDate" />
- <result column="DRIVER_CAR_CLASS_NAME" jdbcType="VARCHAR" property="driverCarClassName" />
- <result column="MEMO" jdbcType="VARCHAR" property="memo" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="DRIVER_PHOTO" jdbcType="BLOB" property="driverPhoto" />
- <result column="DRIVER_LISENCE_PHOTO" jdbcType="BLOB" property="driverLisencePhoto" />
- <result column="DRIVER_PERMIT_PHOTO" jdbcType="BLOB" property="driverPermitPhoto" />
- </resultMap>
- <sql id="columns">
- DRIVER_ID, DRIVER_NAME, DRIVER_SEX, DRIVER_AGE, DRIVER_PHONE, DRIVER_IDENTITY_CARD,
- TRANSPORT_TYPE_ID, DRIVING_LICENCE, DRIVER_YEARS, DRIVER_POLICY, DRIVING_PERMIT_NO,
- DUTY_STATE_STATUS, DRIVER_EMERGENCY_CONTACTS, DRIVER_EMERGENCY_TEL, DRIVER_ADDRESS,
- CARRIER_ID, CLASS_GROUP, DRIVER_BIRTH_DATE, DRIVER_LICENSE_FIRST_DATE, DRIVER_LICENSE_DATE_BEG,
- DRIVER_LICENSE_DATE_END, DRIVER_LICENSE_TIPS_DATE, DRIVER_CAR_CLASS_NAME, MEMO, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, DRIVER_PHOTO,
- DRIVER_LISENCE_PHOTO, DRIVER_PERMIT_PHOTO
- </sql>
- <sql id="columns_alias">
- t.DRIVER_ID, t.DRIVER_NAME, t.DRIVER_SEX, t.DRIVER_AGE, t.DRIVER_PHONE, t.DRIVER_IDENTITY_CARD,
- t.TRANSPORT_TYPE_ID, t.DRIVING_LICENCE, t.DRIVER_YEARS, t.DRIVER_POLICY, t.DRIVING_PERMIT_NO,
- t.DUTY_STATE_STATUS, t.DRIVER_EMERGENCY_CONTACTS, t.DRIVER_EMERGENCY_TEL, t.DRIVER_ADDRESS,
- t.CARRIER_ID, t.CLASS_GROUP, t.DRIVER_BIRTH_DATE, t.DRIVER_LICENSE_FIRST_DATE, t.DRIVER_LICENSE_DATE_BEG,
- t.DRIVER_LICENSE_DATE_END, t.DRIVER_LICENSE_TIPS_DATE, t.DRIVER_CAR_CLASS_NAME, t.MEMO,
- t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
- t.DELETED, t.DRIVER_PHOTO, t.DRIVER_LISENCE_PHOTO, t.DRIVER_PERMIT_PHOTO
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM RMS_CAR_DRIVER
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM RMS_CAR_DRIVER t
- </sql>
- <sql id="where">
- <where>
- <if test="driverId != null">
- and DRIVER_ID = #{driverId}
- </if>
- <if test="driverName != null and driverName != ''">
- and DRIVER_NAME = #{driverName}
- </if>
- <if test="driverSex != null and driverSex != ''">
- and DRIVER_SEX = #{driverSex}
- </if>
- <if test="driverAge != null">
- and DRIVER_AGE = #{driverAge}
- </if>
- <if test="driverPhone != null and driverPhone != ''">
- and DRIVER_PHONE = #{driverPhone}
- </if>
- <if test="driverIdentityCard != null and driverIdentityCard != ''">
- and DRIVER_IDENTITY_CARD = #{driverIdentityCard}
- </if>
- <if test="transportTypeId != null">
- and TRANSPORT_TYPE_ID = #{transportTypeId}
- </if>
- <if test="drivingLicence != null and drivingLicence != ''">
- and DRIVING_LICENCE = #{drivingLicence}
- </if>
- <if test="driverYears != null">
- and DRIVER_YEARS = #{driverYears}
- </if>
- <if test="driverPolicy != null and driverPolicy != ''">
- and DRIVER_POLICY = #{driverPolicy}
- </if>
- <if test="drivingPermitNo != null and drivingPermitNo != ''">
- and DRIVING_PERMIT_NO = #{drivingPermitNo}
- </if>
- <if test="dutyStateStatus != null and dutyStateStatus != ''">
- and DUTY_STATE_STATUS = #{dutyStateStatus}
- </if>
- <if test="driverEmergencyContacts != null and driverEmergencyContacts != ''">
- and DRIVER_EMERGENCY_CONTACTS = #{driverEmergencyContacts}
- </if>
- <if test="driverEmergencyTel != null and driverEmergencyTel != ''">
- and DRIVER_EMERGENCY_TEL = #{driverEmergencyTel}
- </if>
- <if test="driverAddress != null and driverAddress != ''">
- and DRIVER_ADDRESS = #{driverAddress}
- </if>
- <if test="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="classGroup != null and classGroup != ''">
- and CLASS_GROUP = #{classGroup}
- </if>
- <if test="driverBirthDate != null and driverBirthDate != ''">
- and DRIVER_BIRTH_DATE = #{driverBirthDate}
- </if>
- <if test="driverLicenseFirstDate != null">
- and TO_CHAR(DRIVER_LICENSE_FIRST_DATE,'yyyy-MM-dd') = #{driverLicenseFirstDate}
- </if>
- <if test="driverLicenseDateBeg != null">
- and TO_CHAR(DRIVER_LICENSE_DATE_BEG,'yyyy-MM-dd') = #{driverLicenseDateBeg}
- </if>
- <if test="driverLicenseDateEnd != null">
- and TO_CHAR(DRIVER_LICENSE_DATE_END,'yyyy-MM-dd') = #{driverLicenseDateEnd}
- </if>
- <if test="driverLicenseTipsDate != null">
- and TO_CHAR(DRIVER_LICENSE_TIPS_DATE,'yyyy-MM-dd') = #{driverLicenseTipsDate}
- </if>
- <if test="driverCarClassName != null and driverCarClassName != ''">
- and DRIVER_CAR_CLASS_NAME = #{driverCarClassName}
- </if>
- <if test="memo != null and memo != ''">
- and MEMO = #{memo}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="driverPhoto != null">
- and DRIVER_PHOTO = #{driverPhoto}
- </if>
- <if test="driverLisencePhoto != null">
- and DRIVER_LISENCE_PHOTO = #{driverLisencePhoto}
- </if>
- <if test="driverPermitPhoto != null">
- and DRIVER_PERMIT_PHOTO = #{driverPermitPhoto}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="driverId != null">
- and DRIVER_ID = #{driverId}
- </if>
- <if test="driverName != null and driverName != ''">
- and DRIVER_NAME LIKE '%${driverName}%'
- </if>
- <if test="driverSex != null and driverSex != ''">
- and DRIVER_SEX LIKE '%${driverSex}%'
- </if>
- <if test="driverAge != null">
- and DRIVER_AGE = #{driverAge}
- </if>
- <if test="driverPhone != null and driverPhone != ''">
- and DRIVER_PHONE LIKE '%${driverPhone}%'
- </if>
- <if test="driverIdentityCard != null and driverIdentityCard != ''">
- and DRIVER_IDENTITY_CARD LIKE '%${driverIdentityCard}%'
- </if>
- <if test="transportTypeId != null">
- and TRANSPORT_TYPE_ID = #{transportTypeId}
- </if>
- <if test="drivingLicence != null and drivingLicence != ''">
- and DRIVING_LICENCE LIKE '%${drivingLicence}%'
- </if>
- <if test="driverYears != null">
- and DRIVER_YEARS = #{driverYears}
- </if>
- <if test="driverPolicy != null and driverPolicy != ''">
- and DRIVER_POLICY LIKE '%${driverPolicy}%'
- </if>
- <if test="drivingPermitNo != null and drivingPermitNo != ''">
- and DRIVING_PERMIT_NO LIKE '%${drivingPermitNo}%'
- </if>
- <if test="dutyStateStatus != null and dutyStateStatus != ''">
- and DUTY_STATE_STATUS LIKE '%${dutyStateStatus}%'
- </if>
- <if test="driverEmergencyContacts != null and driverEmergencyContacts != ''">
- and DRIVER_EMERGENCY_CONTACTS LIKE '%${driverEmergencyContacts}%'
- </if>
- <if test="driverEmergencyTel != null and driverEmergencyTel != ''">
- and DRIVER_EMERGENCY_TEL LIKE '%${driverEmergencyTel}%'
- </if>
- <if test="driverAddress != null and driverAddress != ''">
- and DRIVER_ADDRESS LIKE '%${driverAddress}%'
- </if>
- <if test="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="classGroup != null and classGroup != ''">
- and CLASS_GROUP LIKE '%${classGroup}%'
- </if>
- <if test="driverBirthDate != null and driverBirthDate != ''">
- and DRIVER_BIRTH_DATE LIKE '%${driverBirthDate}%'
- </if>
- <if test="driverLicenseFirstDate != null">
- and TO_CHAR(DRIVER_LICENSE_FIRST_DATE,'yyyy-MM-dd') = #{driverLicenseFirstDate}
- </if>
- <if test="driverLicenseDateBeg != null">
- and TO_CHAR(DRIVER_LICENSE_DATE_BEG,'yyyy-MM-dd') = #{driverLicenseDateBeg}
- </if>
- <if test="driverLicenseDateEnd != null">
- and TO_CHAR(DRIVER_LICENSE_DATE_END,'yyyy-MM-dd') = #{driverLicenseDateEnd}
- </if>
- <if test="driverLicenseTipsDate != null">
- and TO_CHAR(DRIVER_LICENSE_TIPS_DATE,'yyyy-MM-dd') = #{driverLicenseTipsDate}
- </if>
- <if test="driverCarClassName != null and driverCarClassName != ''">
- and DRIVER_CAR_CLASS_NAME LIKE '%${driverCarClassName}%'
- </if>
- <if test="memo != null and memo != ''">
- and MEMO LIKE '%${memo}%'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="driverPhoto != null">
- and DRIVER_PHOTO = #{driverPhoto}
- </if>
- <if test="driverLisencePhoto != null">
- and DRIVER_LISENCE_PHOTO = #{driverLisencePhoto}
- </if>
- <if test="driverPermitPhoto != null">
- and DRIVER_PERMIT_PHOTO = #{driverPermitPhoto}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from RMS_CAR_DRIVER
- where DRIVER_ID = #{driverId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from RMS_CAR_DRIVER
- where 1!=1
- <if test="driverName != null and driverName != ''">
- or DRIVER_NAME = #{driverName}
- </if>
- <if test="driverSex != null and driverSex != ''">
- or DRIVER_SEX = #{driverSex}
- </if>
- <if test="driverAge != null">
- or DRIVER_AGE = #{driverAge}
- </if>
- <if test="driverPhone != null and driverPhone != ''">
- or DRIVER_PHONE = #{driverPhone}
- </if>
- <if test="driverIdentityCard != null and driverIdentityCard != ''">
- or DRIVER_IDENTITY_CARD = #{driverIdentityCard}
- </if>
- <if test="transportTypeId != null">
- or TRANSPORT_TYPE_ID = #{transportTypeId}
- </if>
- <if test="drivingLicence != null and drivingLicence != ''">
- or DRIVING_LICENCE = #{drivingLicence}
- </if>
- <if test="driverYears != null">
- or DRIVER_YEARS = #{driverYears}
- </if>
- <if test="driverPolicy != null and driverPolicy != ''">
- or DRIVER_POLICY = #{driverPolicy}
- </if>
- <if test="drivingPermitNo != null and drivingPermitNo != ''">
- or DRIVING_PERMIT_NO = #{drivingPermitNo}
- </if>
- <if test="dutyStateStatus != null and dutyStateStatus != ''">
- or DUTY_STATE_STATUS = #{dutyStateStatus}
- </if>
- <if test="driverEmergencyContacts != null and driverEmergencyContacts != ''">
- or DRIVER_EMERGENCY_CONTACTS = #{driverEmergencyContacts}
- </if>
- <if test="driverEmergencyTel != null and driverEmergencyTel != ''">
- or DRIVER_EMERGENCY_TEL = #{driverEmergencyTel}
- </if>
- <if test="driverAddress != null and driverAddress != ''">
- or DRIVER_ADDRESS = #{driverAddress}
- </if>
- <if test="carrierId != null">
- or CARRIER_ID = #{carrierId}
- </if>
- <if test="classGroup != null and classGroup != ''">
- or CLASS_GROUP = #{classGroup}
- </if>
- <if test="driverBirthDate != null and driverBirthDate != ''">
- or DRIVER_BIRTH_DATE = #{driverBirthDate}
- </if>
- <if test="driverLicenseFirstDate != null">
- or TO_CHAR(DRIVER_LICENSE_FIRST_DATE,'yyyy-MM-dd') = '#{driverLicenseFirstDate}'
- </if>
- <if test="driverLicenseDateBeg != null">
- or TO_CHAR(DRIVER_LICENSE_DATE_BEG,'yyyy-MM-dd') = '#{driverLicenseDateBeg}'
- </if>
- <if test="driverLicenseDateEnd != null">
- or TO_CHAR(DRIVER_LICENSE_DATE_END,'yyyy-MM-dd') = '#{driverLicenseDateEnd}'
- </if>
- <if test="driverLicenseTipsDate != null">
- or TO_CHAR(DRIVER_LICENSE_TIPS_DATE,'yyyy-MM-dd') = '#{driverLicenseTipsDate}'
- </if>
- <if test="driverCarClassName != null and driverCarClassName != ''">
- or DRIVER_CAR_CLASS_NAME = #{driverCarClassName}
- </if>
- <if test="memo != null and memo != ''">
- or MEMO = #{memo}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="driverPhoto != null">
- or DRIVER_PHOTO = #{driverPhoto}
- </if>
- <if test="driverLisencePhoto != null">
- or DRIVER_LISENCE_PHOTO = #{driverLisencePhoto}
- </if>
- <if test="driverPermitPhoto != null">
- or DRIVER_PERMIT_PHOTO = #{driverPermitPhoto}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCarDriver">
- insert into RMS_CAR_DRIVER (DRIVER_ID, DRIVER_NAME, DRIVER_SEX,
- DRIVER_AGE, DRIVER_PHONE, DRIVER_IDENTITY_CARD,
- TRANSPORT_TYPE_ID, DRIVING_LICENCE, DRIVER_YEARS,
- DRIVER_POLICY, DRIVING_PERMIT_NO, DUTY_STATE_STATUS,
- DRIVER_EMERGENCY_CONTACTS, DRIVER_EMERGENCY_TEL,
- DRIVER_ADDRESS, CARRIER_ID, CLASS_GROUP,
- DRIVER_BIRTH_DATE, DRIVER_LICENSE_FIRST_DATE,
- DRIVER_LICENSE_DATE_BEG, DRIVER_LICENSE_DATE_END,
- DRIVER_LICENSE_TIPS_DATE, DRIVER_CAR_CLASS_NAME,
- MEMO, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, DRIVER_PHOTO, DRIVER_LISENCE_PHOTO,
- DRIVER_PERMIT_PHOTO)
- values (#{driverId,jdbcType=DECIMAL}, #{driverName,jdbcType=VARCHAR}, #{driverSex,jdbcType=VARCHAR},
- #{driverAge,jdbcType=DECIMAL}, #{driverPhone,jdbcType=VARCHAR}, #{driverIdentityCard,jdbcType=VARCHAR},
- #{transportTypeId,jdbcType=DECIMAL}, #{drivingLicence,jdbcType=VARCHAR}, #{driverYears,jdbcType=DECIMAL},
- #{driverPolicy,jdbcType=VARCHAR}, #{drivingPermitNo,jdbcType=VARCHAR}, #{dutyStateStatus,jdbcType=VARCHAR},
- #{driverEmergencyContacts,jdbcType=VARCHAR}, #{driverEmergencyTel,jdbcType=VARCHAR},
- #{driverAddress,jdbcType=VARCHAR}, #{carrierId,jdbcType=DECIMAL}, #{classGroup,jdbcType=VARCHAR},
- #{driverBirthDate,jdbcType=VARCHAR}, #{driverLicenseFirstDate,jdbcType=TIMESTAMP},
- #{driverLicenseDateBeg,jdbcType=TIMESTAMP}, #{driverLicenseDateEnd,jdbcType=TIMESTAMP},
- #{driverLicenseTipsDate,jdbcType=TIMESTAMP}, #{driverCarClassName,jdbcType=VARCHAR},
- #{memo,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleted,jdbcType=DECIMAL}, #{driverPhoto,jdbcType=BLOB}, #{driverLisencePhoto,jdbcType=BLOB},
- #{driverPermitPhoto,jdbcType=BLOB})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCarDriver">
- insert into RMS_CAR_DRIVER
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="driverId != null">
- DRIVER_ID,
- </if>
- <if test="driverName != null">
- DRIVER_NAME,
- </if>
- <if test="driverSex != null">
- DRIVER_SEX,
- </if>
- <if test="driverAge != null">
- DRIVER_AGE,
- </if>
- <if test="driverPhone != null">
- DRIVER_PHONE,
- </if>
- <if test="driverIdentityCard != null">
- DRIVER_IDENTITY_CARD,
- </if>
- <if test="transportTypeId != null">
- TRANSPORT_TYPE_ID,
- </if>
- <if test="drivingLicence != null">
- DRIVING_LICENCE,
- </if>
- <if test="driverYears != null">
- DRIVER_YEARS,
- </if>
- <if test="driverPolicy != null">
- DRIVER_POLICY,
- </if>
- <if test="drivingPermitNo != null">
- DRIVING_PERMIT_NO,
- </if>
- <if test="dutyStateStatus != null">
- DUTY_STATE_STATUS,
- </if>
- <if test="driverEmergencyContacts != null">
- DRIVER_EMERGENCY_CONTACTS,
- </if>
- <if test="driverEmergencyTel != null">
- DRIVER_EMERGENCY_TEL,
- </if>
- <if test="driverAddress != null">
- DRIVER_ADDRESS,
- </if>
- <if test="carrierId != null">
- CARRIER_ID,
- </if>
- <if test="classGroup != null">
- CLASS_GROUP,
- </if>
- <if test="driverBirthDate != null">
- DRIVER_BIRTH_DATE,
- </if>
- <if test="driverLicenseFirstDate != null">
- DRIVER_LICENSE_FIRST_DATE,
- </if>
- <if test="driverLicenseDateBeg != null">
- DRIVER_LICENSE_DATE_BEG,
- </if>
- <if test="driverLicenseDateEnd != null">
- DRIVER_LICENSE_DATE_END,
- </if>
- <if test="driverLicenseTipsDate != null">
- DRIVER_LICENSE_TIPS_DATE,
- </if>
- <if test="driverCarClassName != null">
- DRIVER_CAR_CLASS_NAME,
- </if>
- <if test="memo != null">
- MEMO,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- <if test="driverPhoto != null">
- DRIVER_PHOTO,
- </if>
- <if test="driverLisencePhoto != null">
- DRIVER_LISENCE_PHOTO,
- </if>
- <if test="driverPermitPhoto != null">
- DRIVER_PERMIT_PHOTO,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="driverId != null">
- #{driverId,jdbcType=DECIMAL},
- </if>
- <if test="driverName != null">
- #{driverName,jdbcType=VARCHAR},
- </if>
- <if test="driverSex != null">
- #{driverSex,jdbcType=VARCHAR},
- </if>
- <if test="driverAge != null">
- #{driverAge,jdbcType=DECIMAL},
- </if>
- <if test="driverPhone != null">
- #{driverPhone,jdbcType=VARCHAR},
- </if>
- <if test="driverIdentityCard != null">
- #{driverIdentityCard,jdbcType=VARCHAR},
- </if>
- <if test="transportTypeId != null">
- #{transportTypeId,jdbcType=DECIMAL},
- </if>
- <if test="drivingLicence != null">
- #{drivingLicence,jdbcType=VARCHAR},
- </if>
- <if test="driverYears != null">
- #{driverYears,jdbcType=DECIMAL},
- </if>
- <if test="driverPolicy != null">
- #{driverPolicy,jdbcType=VARCHAR},
- </if>
- <if test="drivingPermitNo != null">
- #{drivingPermitNo,jdbcType=VARCHAR},
- </if>
- <if test="dutyStateStatus != null">
- #{dutyStateStatus,jdbcType=VARCHAR},
- </if>
- <if test="driverEmergencyContacts != null">
- #{driverEmergencyContacts,jdbcType=VARCHAR},
- </if>
- <if test="driverEmergencyTel != null">
- #{driverEmergencyTel,jdbcType=VARCHAR},
- </if>
- <if test="driverAddress != null">
- #{driverAddress,jdbcType=VARCHAR},
- </if>
- <if test="carrierId != null">
- #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="classGroup != null">
- #{classGroup,jdbcType=VARCHAR},
- </if>
- <if test="driverBirthDate != null">
- #{driverBirthDate,jdbcType=VARCHAR},
- </if>
- <if test="driverLicenseFirstDate != null">
- #{driverLicenseFirstDate,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseDateBeg != null">
- #{driverLicenseDateBeg,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseDateEnd != null">
- #{driverLicenseDateEnd,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseTipsDate != null">
- #{driverLicenseTipsDate,jdbcType=TIMESTAMP},
- </if>
- <if test="driverCarClassName != null">
- #{driverCarClassName,jdbcType=VARCHAR},
- </if>
- <if test="memo != null">
- #{memo,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="driverPhoto != null">
- #{driverPhoto,jdbcType=BLOB},
- </if>
- <if test="driverLisencePhoto != null">
- #{driverLisencePhoto,jdbcType=BLOB},
- </if>
- <if test="driverPermitPhoto != null">
- #{driverPermitPhoto,jdbcType=BLOB},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCarDriver">
- update RMS_CAR_DRIVER
- set DRIVER_NAME = #{driverName,jdbcType=VARCHAR},
- DRIVER_SEX = #{driverSex,jdbcType=VARCHAR},
- DRIVER_AGE = #{driverAge,jdbcType=DECIMAL},
- DRIVER_PHONE = #{driverPhone,jdbcType=VARCHAR},
- DRIVER_IDENTITY_CARD = #{driverIdentityCard,jdbcType=VARCHAR},
- TRANSPORT_TYPE_ID = #{transportTypeId,jdbcType=DECIMAL},
- DRIVING_LICENCE = #{drivingLicence,jdbcType=VARCHAR},
- DRIVER_YEARS = #{driverYears,jdbcType=DECIMAL},
- DRIVER_POLICY = #{driverPolicy,jdbcType=VARCHAR},
- DRIVING_PERMIT_NO = #{drivingPermitNo,jdbcType=VARCHAR},
- DUTY_STATE_STATUS = #{dutyStateStatus,jdbcType=VARCHAR},
- DRIVER_EMERGENCY_CONTACTS = #{driverEmergencyContacts,jdbcType=VARCHAR},
- DRIVER_EMERGENCY_TEL = #{driverEmergencyTel,jdbcType=VARCHAR},
- DRIVER_ADDRESS = #{driverAddress,jdbcType=VARCHAR},
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- CLASS_GROUP = #{classGroup,jdbcType=VARCHAR},
- DRIVER_BIRTH_DATE = #{driverBirthDate,jdbcType=VARCHAR},
- DRIVER_LICENSE_FIRST_DATE = #{driverLicenseFirstDate,jdbcType=TIMESTAMP},
- DRIVER_LICENSE_DATE_BEG = #{driverLicenseDateBeg,jdbcType=TIMESTAMP},
- DRIVER_LICENSE_DATE_END = #{driverLicenseDateEnd,jdbcType=TIMESTAMP},
- DRIVER_LICENSE_TIPS_DATE = #{driverLicenseTipsDate,jdbcType=TIMESTAMP},
- DRIVER_CAR_CLASS_NAME = #{driverCarClassName,jdbcType=VARCHAR},
- MEMO = #{memo,jdbcType=VARCHAR},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- DELETED = #{deleted,jdbcType=DECIMAL},
- DRIVER_PHOTO = #{driverPhoto,jdbcType=BLOB},
- DRIVER_LISENCE_PHOTO = #{driverLisencePhoto,jdbcType=BLOB},
- DRIVER_PERMIT_PHOTO = #{driverPermitPhoto,jdbcType=BLOB}
- where DRIVER_ID = #{driverId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCarDriver">
- update RMS_CAR_DRIVER
- <set>
- <if test="driverName != null">
- DRIVER_NAME = #{driverName,jdbcType=VARCHAR},
- </if>
- <if test="driverSex != null">
- DRIVER_SEX = #{driverSex,jdbcType=VARCHAR},
- </if>
- <if test="driverAge != null">
- DRIVER_AGE = #{driverAge,jdbcType=DECIMAL},
- </if>
- <if test="driverPhone != null">
- DRIVER_PHONE = #{driverPhone,jdbcType=VARCHAR},
- </if>
- <if test="driverIdentityCard != null">
- DRIVER_IDENTITY_CARD = #{driverIdentityCard,jdbcType=VARCHAR},
- </if>
- <if test="transportTypeId != null">
- TRANSPORT_TYPE_ID = #{transportTypeId,jdbcType=DECIMAL},
- </if>
- <if test="drivingLicence != null">
- DRIVING_LICENCE = #{drivingLicence,jdbcType=VARCHAR},
- </if>
- <if test="driverYears != null">
- DRIVER_YEARS = #{driverYears,jdbcType=DECIMAL},
- </if>
- <if test="driverPolicy != null">
- DRIVER_POLICY = #{driverPolicy,jdbcType=VARCHAR},
- </if>
- <if test="drivingPermitNo != null">
- DRIVING_PERMIT_NO = #{drivingPermitNo,jdbcType=VARCHAR},
- </if>
- <if test="dutyStateStatus != null">
- DUTY_STATE_STATUS = #{dutyStateStatus,jdbcType=VARCHAR},
- </if>
- <if test="driverEmergencyContacts != null">
- DRIVER_EMERGENCY_CONTACTS = #{driverEmergencyContacts,jdbcType=VARCHAR},
- </if>
- <if test="driverEmergencyTel != null">
- DRIVER_EMERGENCY_TEL = #{driverEmergencyTel,jdbcType=VARCHAR},
- </if>
- <if test="driverAddress != null">
- DRIVER_ADDRESS = #{driverAddress,jdbcType=VARCHAR},
- </if>
- <if test="carrierId != null">
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="classGroup != null">
- CLASS_GROUP = #{classGroup,jdbcType=VARCHAR},
- </if>
- <if test="driverBirthDate != null">
- DRIVER_BIRTH_DATE = #{driverBirthDate,jdbcType=VARCHAR},
- </if>
- <if test="driverLicenseFirstDate != null">
- DRIVER_LICENSE_FIRST_DATE = #{driverLicenseFirstDate,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseDateBeg != null">
- DRIVER_LICENSE_DATE_BEG = #{driverLicenseDateBeg,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseDateEnd != null">
- DRIVER_LICENSE_DATE_END = #{driverLicenseDateEnd,jdbcType=TIMESTAMP},
- </if>
- <if test="driverLicenseTipsDate != null">
- DRIVER_LICENSE_TIPS_DATE = #{driverLicenseTipsDate,jdbcType=TIMESTAMP},
- </if>
- <if test="driverCarClassName != null">
- DRIVER_CAR_CLASS_NAME = #{driverCarClassName,jdbcType=VARCHAR},
- </if>
- <if test="memo != null">
- MEMO = #{memo,jdbcType=VARCHAR},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="driverPhoto != null">
- DRIVER_PHOTO = #{driverPhoto,jdbcType=BLOB},
- </if>
- <if test="driverLisencePhoto != null">
- DRIVER_LISENCE_PHOTO = #{driverLisencePhoto,jdbcType=BLOB},
- </if>
- <if test="driverPermitPhoto != null">
- DRIVER_PERMIT_PHOTO = #{driverPermitPhoto,jdbcType=BLOB},
- </if>
- </set>
- where DRIVER_ID = #{driverId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select" />
- where DRIVER_ID = #{driverId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="where" />
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="whereLike" />
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into RMS_CAR_DRIVER
- (DRIVER_ID,
- DRIVER_NAME, DRIVER_SEX, DRIVER_AGE,
- DRIVER_PHONE, DRIVER_IDENTITY_CARD,
- TRANSPORT_TYPE_ID, DRIVING_LICENCE,
- DRIVER_YEARS, DRIVER_POLICY, DRIVING_PERMIT_NO,
- DUTY_STATE_STATUS, DRIVER_EMERGENCY_CONTACTS,
- DRIVER_EMERGENCY_TEL, DRIVER_ADDRESS,
- CARRIER_ID, CLASS_GROUP, DRIVER_BIRTH_DATE,
- DRIVER_LICENSE_FIRST_DATE, DRIVER_LICENSE_DATE_BEG,
- DRIVER_LICENSE_DATE_END, DRIVER_LICENSE_TIPS_DATE,
- DRIVER_CAR_CLASS_NAME, MEMO, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, DRIVER_PHOTO, DRIVER_LISENCE_PHOTO,
- DRIVER_PERMIT_PHOTO)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.driverId,jdbcType=DECIMAL},
- #{item.driverName,jdbcType=VARCHAR}, #{item.driverSex,jdbcType=VARCHAR}, #{item.driverAge,jdbcType=DECIMAL},
- #{item.driverPhone,jdbcType=VARCHAR}, #{item.driverIdentityCard,jdbcType=VARCHAR},
- #{item.transportTypeId,jdbcType=DECIMAL}, #{item.drivingLicence,jdbcType=VARCHAR},
- #{item.driverYears,jdbcType=DECIMAL}, #{item.driverPolicy,jdbcType=VARCHAR}, #{item.drivingPermitNo,jdbcType=VARCHAR},
- #{item.dutyStateStatus,jdbcType=VARCHAR}, #{item.driverEmergencyContacts,jdbcType=VARCHAR},
- #{item.driverEmergencyTel,jdbcType=VARCHAR}, #{item.driverAddress,jdbcType=VARCHAR},
- #{item.carrierId,jdbcType=DECIMAL}, #{item.classGroup,jdbcType=VARCHAR}, #{item.driverBirthDate,jdbcType=VARCHAR},
- #{item.driverLicenseFirstDate,jdbcType=TIMESTAMP}, #{item.driverLicenseDateBeg,jdbcType=TIMESTAMP},
- #{item.driverLicenseDateEnd,jdbcType=TIMESTAMP}, #{item.driverLicenseTipsDate,jdbcType=TIMESTAMP},
- #{item.driverCarClassName,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
- #{item.deleted,jdbcType=DECIMAL}, #{item.driverPhoto,jdbcType=BLOB}, #{item.driverLisencePhoto,jdbcType=BLOB},
- #{item.driverPermitPhoto,jdbcType=BLOB} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update RMS_CAR_DRIVER
- set
- DRIVER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverId,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverName,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_SEX=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverSex,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_AGE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverAge,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_PHONE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverPhone,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_IDENTITY_CARD=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverIdentityCard,jdbcType=VARCHAR}
- </foreach>
- ,TRANSPORT_TYPE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.transportTypeId,jdbcType=DECIMAL}
- </foreach>
- ,DRIVING_LICENCE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.drivingLicence,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_YEARS=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverYears,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_POLICY=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverPolicy,jdbcType=VARCHAR}
- </foreach>
- ,DRIVING_PERMIT_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.drivingPermitNo,jdbcType=VARCHAR}
- </foreach>
- ,DUTY_STATE_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.dutyStateStatus,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_EMERGENCY_CONTACTS=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverEmergencyContacts,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_EMERGENCY_TEL=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverEmergencyTel,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_ADDRESS=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverAddress,jdbcType=VARCHAR}
- </foreach>
- ,CARRIER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
- </foreach>
- ,CLASS_GROUP=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.classGroup,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_BIRTH_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverBirthDate,jdbcType=VARCHAR}
- </foreach>
- ,DRIVER_LICENSE_FIRST_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverLicenseFirstDate,jdbcType=TIMESTAMP}
- </foreach>
- ,DRIVER_LICENSE_DATE_BEG=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverLicenseDateBeg,jdbcType=TIMESTAMP}
- </foreach>
- ,DRIVER_LICENSE_DATE_END=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverLicenseDateEnd,jdbcType=TIMESTAMP}
- </foreach>
- ,DRIVER_LICENSE_TIPS_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverLicenseTipsDate,jdbcType=TIMESTAMP}
- </foreach>
- ,DRIVER_CAR_CLASS_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverCarClassName,jdbcType=VARCHAR}
- </foreach>
- ,MEMO=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_PHOTO=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverPhoto,jdbcType=BLOB}
- </foreach>
- ,DRIVER_LISENCE_PHOTO=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverLisencePhoto,jdbcType=BLOB}
- </foreach>
- ,DRIVER_PERMIT_PHOTO=
- <foreach close="end" collection="list" index="index" item="item" open="case DRIVER_ID" separator=" ">
- when #{item.driverId,jdbcType=DECIMAL} then #{item.driverPermitPhoto,jdbcType=BLOB}
- </foreach>
- where DRIVER_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.driverId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from RMS_CAR_DRIVER
- where DRIVER_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 司机列表 -->
- <select id="getCarDriverList" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT * FROM
- (
- SELECT
- RCD.DRIVER_ID AS "driverId",
- RCD.DRIVER_NAME AS "driverName",
- RCD.DRIVER_SEX AS "driverSex",
- RCD.DRIVER_AGE AS "driverAge",
- RCD.DRIVER_IDENTITY_CARD AS "driverIdentityCard",
- RCD.DRIVER_PHONE AS "driverPhone",
- RTT.TYPE_NAME AS "typeName",
- RC.CARRIER_NAME AS "carrierName",
- RCD.DRIVING_PERMIT_NO AS "driverPermitNo",
- RCD.DRIVING_LICENCE AS "driverLicence1",
- RCD.DRIVING_LICENCE AS "driverLicence2",
- RCD.DRIVING_LICENCE AS "driverLicence3"
- FROM RMS_CAR_DRIVER RCD
- LEFT JOIN RMS_CARRIER RC
- ON RCD.CARRIER_ID=RC.CARRIER_ID
- LEFT JOIN RMS_TRANSPORT_TYPE RTT
- ON RTT.TRANSPORT_TYPE_ID=RCD.TRANSPORT_TYPE_ID
- WHERE RCD.DELETED !=1
- ORDER BY RCD.INSERT_TIME DESC
- )
- <where>
- <if test="driverId!= null">
- and
- <foreach collection="driverId" item="item" open="(" separator="," close=")">
- "driverId" in #{item}
- </foreach>
- </if>
- <if test="driverName!= null">
- and
- <foreach collection="driverName" item="item" open="(" separator="," close=")">
- "dirverName" in #{item}
- </foreach>
- </if>
- <if test="driverSex!= null">
- and
- <foreach collection="driverSex" item="item" open="(" separator="," close=")">
- "driverSex" in #{item}
- </foreach>
- </if>
- <if test="driverAge!= null">
- and
- <foreach collection="driverAge" item="item" open="(" separator="," close=")">
- "driverAge" in #{item}
- </foreach>
- </if>
- <if test="driverIdentityCard!= null">
- and
- <foreach collection="driverIdentityCard" item="item" open="(" separator="," close=")">
- "driverIdentityCard" in #{item}
- </foreach>
- </if>
- <if test="driverPhone!= null">
- and
- <foreach collection="driverPhone" item="item" open="(" separator="," close=")">
- "driverPhone" in #{item}
- </foreach>
- </if>
- <if test="typeName!= null">
- and
- <foreach collection="typeName" item="item" open="(" separator="," close=")">
- "typeName" in #{item}
- </foreach>
- </if>
- <if test="carrierName!= null">
- and
- <foreach collection="carrierName" item="item" open="(" separator="," close=")">
- "carrierName" in #{item}
- </foreach>
- </if>
- <if test="driverPermitNo!= null">
- and
- <foreach collection="driverPermitNo" item="item" open="(" separator="," close=")">
- "driverPermitNo" in #{item}
- </foreach>
- </if>
- <if test="driverLicence1!= null">
- and
- <foreach collection="driverLicence1" item="item" open="(" separator="," close=")">
- "driverLicence1" in #{item}
- </foreach>
- </if>
- <if test="driverLicence2!= null">
- and
- <foreach collection="driverLicence2" item="item" open="(" separator="," close=")">
- "driverLicence2" in #{item}
- </foreach>
- </if> <if test="driverLicence3!= null">
- and
- <foreach collection="driverLicence3" item="item" open="(" separator="," close=")">
- "driverLicence3" in #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <sql id="orderBy">
- <if test="orderField!=null and orderField !=''">
- order by "${orderField}"
- <if test="orderType !=null and orderType !=''">
- ${orderType}
- </if>
- </if>
- </sql>
- <select id="getCarDriverById" resultType="java.util.LinkedHashMap" >
- SELECT
- RCD.DRIVER_ID AS "driverId",
- RCD.DRIVER_NAME AS "driverName",
- RCD.DRIVER_SEX AS "driverSex",
- RCD.DRIVER_AGE AS "driverAge",
- RCD.DRIVER_IDENTITY_CARD AS "driverIdentityCard",
- RCD.DRIVER_PHONE AS "driverPhone",
- RCD.TRANSPORT_TYPE_ID AS "transportTypeId",
- RCD.CARRIER_ID AS "carrierId",
- RCD.DRIVING_PERMIT_NO AS "driverPermitNo",
- RCD.DRIVING_LICENCE AS "driverLicence1",
- RCD.DRIVING_LICENCE AS "driverLicence2",
- RCD.DRIVING_LICENCE AS "driverLicence3"
- FROM RMS_CAR_DRIVER RCD
- WHERE RCD.DRIVER_ID=#{id}
- </select>
- <select id="getTransportTypeId" resultType="java.util.LinkedHashMap">
- SELECT
- RTT.TRANSPORT_TYPE_ID AS "id",
- RTT.TRANSPORT_TYPE_ID AS "value",
- RTT.TYPE_NAME AS "label"
- FROM RMS_TRANSPORT_TYPE RTT
- </select>
- <select id="getCarrierName" resultType="java.util.Map" parameterType="java.lang.String">
- select RC.CARRIER_NAME as "carrierName",
- RC.CARRIER_ID as "carrierId"
- from RMS_CARRIER RC
- where RC.CARRIER_NAME like #{state}
- </select>
- <select id="selectByIdentityCard" resultType="int" parameterType="java.lang.String">
- select count(*)
- from RMS_CAR_DRIVER RCD
- where RCD.DRIVER_IDENTITY_CARD=#{driverIdentityCardId}
- and RCD.DELETED!=1
- </select>
- </mapper>
|