1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075 |
- <?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>
- </select>
- <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>
- </mapper>
|