123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101 |
- <?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>
- <select id="getMaxDriveId" resultType="DECIMAL">
- select max(RCD.DRIVER_ID+1) from RMS_CAR_DRIVER RCD
- </select>
- </mapper>
|