123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <?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.ruoyi.basicData.mapper.FleetCarManageMapper">
- <resultMap type="FleetCarManage" id="FleetCarManageResult">
- <result property="id" column="id" />
- <result property="fleetCompanyId" column="fleet_company_id" />
- <result property="carNum" column="car_num" />
- <result property="driverId" column="driver_id" />
- <result property="driverName" column="driver_name" />
- <result property="driverTel" column="driver_tel" />
- <result property="hangNum" column="hang_num" />
- <result property="fuelType" column="fuel_type" />
- <result property="carType" column="car_type" />
- <result property="carName" column="car_name" />
- <result property="carBrand" column="car_brand" />
- <result property="manufactureUnit" column="manufacture_unit" />
- <result property="officeOfCertificate" column="office_of_certificate" />
- <result property="pullCarType" column="pull_car_type" />
- <result property="pullCarShelfNum" column="pull_car_shelf_num" />
- <result property="mountCarType" column="mount_car_type" />
- <result property="mountCarNum" column="mount_car_num" />
- <result property="engine" column="engine" />
- <result property="carLoadPersion" column="car_load_persion" />
- <result property="buyCarDate" column="buy_car_date" />
- <result property="regiestDate" column="regiest_date" />
- <result property="abandonDate" column="abandon_date" />
- <result property="outerSize" column="outer_size" />
- <result property="sumWeight" column="sum_weight" />
- <result property="vouchWeight" column="vouch_weight" />
- <result property="equipWeight" column="equip_weight" />
- <result property="drivingLicenseSrc" column="driving_license_src" />
- <result property="drivingPendantSrc" column="driving_pendant_src" />
- <result property="operationLicenseSrc" column="operation_license_src" />
- <result property="technologySrc" column="technology_src" />
- <result property="drivingLoadSrc" column="driving_load_src" />
- <result property="secondLvMaintainSrc" column="second_lv_maintain_src" />
- <result property="tafficConstranintInsuranceSrc" column="taffic_constranint_insurance_src" />
- <result property="businessInsuranceSrc" column="business_insurance_src" />
- <result property="accpetCarrageInsuranceSrc" column="accpet_carrage_insurance_src" />
- <result property="creatTime" column="creat_time" />
- <result property="modificationTime" column="modification_time" />
- <result property="billStatus" column="bill_status" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remarks" column="remarks" />
- </resultMap>
- <sql id="selectFleetCarManageVo">
- select id, fleet_company_id, car_num, driver_id, driver_name,driver_tel, hang_num, fuel_type, car_type, car_name, car_brand, manufacture_unit, office_of_certificate, pull_car_type, pull_car_shelf_num, mount_car_type, mount_car_num, engine, car_load_persion, buy_car_date, regiest_date, abandon_date, outer_size, sum_weight, vouch_weight, equip_weight, driving_license_src, driving_pendant_src, operation_license_src, technology_src, driving_load_src, second_lv_maintain_src, taffic_constranint_insurance_src, business_insurance_src, accpet_carrage_insurance_src, creat_time, modification_time, bill_status, del_flag, create_by, update_by, update_time, remarks from fleet_car_manage
- </sql>
- <select id="selectFleetCarManageList" parameterType="FleetCarManage" resultMap="FleetCarManageResult">
- <include refid="selectFleetCarManageVo"/>
- <where>
- <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
- <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
- <if test="driverId != null "> and driver_id = #{driverId}</if>
- <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
- <if test="driverTel != null "> and driver_tel like concat('%', #{driverTel}, '%')</if>
- <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
- <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
- <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
- <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
- <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
- <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
- <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
- <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
- <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
- <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
- <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
- <if test="engine != null and engine != ''"> and engine = #{engine}</if>
- <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
- <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
- <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
- <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
- <if test="outerSize != null "> and outer_size = #{outerSize}</if>
- <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
- <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
- <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
- <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
- <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
- <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
- <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
- <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
- <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
- <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
- <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
- <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
- <if test="creatTime != null "> and creat_time = #{creatTime}</if>
- <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
- <if test="billStatus != null "> and bill_status = #{billStatus}</if>
- <if test="delFlag != null "> and del_flag = #{delFlag}</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- </where>
- </select>
- <select id="selectFleetCarManageCount" parameterType="FleetCarManage" resultType="Integer">
- select COUNT(id) from fleet_car_manage
- <where>
- <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
- <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
- <if test="driverId != null "> and driver_id = #{driverId}</if>
- <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
- <if test="driverTel != null "> and driver_tel like concat('%', #{driverTel}, '%')</if>
- <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
- <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
- <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
- <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
- <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
- <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
- <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
- <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
- <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
- <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
- <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
- <if test="engine != null and engine != ''"> and engine = #{engine}</if>
- <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
- <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
- <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
- <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
- <if test="outerSize != null "> and outer_size = #{outerSize}</if>
- <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
- <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
- <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
- <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
- <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
- <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
- <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
- <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
- <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
- <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
- <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
- <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
- <if test="creatTime != null "> and creat_time = #{creatTime}</if>
- <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
- <if test="billStatus != null "> and bill_status = #{billStatus}</if>
- <if test="delFlag != null "> and del_flag = #{delFlag}</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- </where>
- </select>
- <select id="selectFleetCarManageIdNameList" resultType="FleetCarManage" resultMap="FleetCarManageResult">
- select id, fleet_company_id, car_num, car_name, driver_id, driver_name, driver_tel from fleet_car_manage
- <where>
- <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
- <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
- <if test="driverId != null "> and driver_id = #{driverId}</if>
- <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
- <if test="driverTel != null and driverTel != ''"> and driver_tel like concat('%', #{driverTel}, '%')</if>
- <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
- <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
- <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
- <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
- <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
- <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
- <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
- <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
- <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
- <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
- <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
- <if test="engine != null and engine != ''"> and engine = #{engine}</if>
- <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
- <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
- <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
- <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
- <if test="outerSize != null "> and outer_size = #{outerSize}</if>
- <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
- <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
- <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
- <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
- <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
- <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
- <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
- <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
- <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
- <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
- <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
- <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
- <if test="creatTime != null "> and creat_time = #{creatTime}</if>
- <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
- <if test="billStatus != null "> and bill_status = #{billStatus}</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- </where>
- </select>
- <select id="selectFleetCarManageById" parameterType="Long" resultMap="FleetCarManageResult">
- <include refid="selectFleetCarManageVo"/>
- where id = #{id}
- </select>
- <select id="selectManageCount" parameterType="ftmsorderbills" resultType="int">
- SELECT
- COUNT( f.id )
- FROM
- fleet_car_manage f
- LEFT JOIN t_corps fleet ON fleet.f_id = f.fleet_company_id
- WHERE
- f.bill_status = 6
- AND f.del_flag = '0'
- <if test="isFleet != null and isFleet == 1">
- AND fleet.f_id = #{fleetId}
- </if>
- </select>
- <insert id="insertFleetCarManage" parameterType="FleetCarManage" useGeneratedKeys="true" keyProperty="id">
- insert into fleet_car_manage
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fleetCompanyId != null">fleet_company_id,</if>
- <if test="carNum != null">car_num,</if>
- <if test="driverId != null">driver_id,</if>
- <if test="driverName != null">driver_name,</if>
- <if test="driverTel != null">driver_tel ,</if>
- <if test="hangNum != null">hang_num,</if>
- <if test="fuelType != null">fuel_type,</if>
- <if test="carType != null">car_type,</if>
- <if test="carName != null">car_name,</if>
- <if test="carBrand != null">car_brand,</if>
- <if test="manufactureUnit != null">manufacture_unit,</if>
- <if test="officeOfCertificate != null">office_of_certificate,</if>
- <if test="pullCarType != null">pull_car_type,</if>
- <if test="pullCarShelfNum != null">pull_car_shelf_num,</if>
- <if test="mountCarType != null">mount_car_type,</if>
- <if test="mountCarNum != null">mount_car_num,</if>
- <if test="engine != null">engine,</if>
- <if test="carLoadPersion != null">car_load_persion,</if>
- <if test="buyCarDate != null">buy_car_date,</if>
- <if test="regiestDate != null">regiest_date,</if>
- <if test="abandonDate != null">abandon_date,</if>
- <if test="outerSize != null">outer_size,</if>
- <if test="sumWeight != null">sum_weight,</if>
- <if test="vouchWeight != null">vouch_weight,</if>
- <if test="equipWeight != null">equip_weight,</if>
- <if test="drivingLicenseSrc != null">driving_license_src,</if>
- <if test="drivingPendantSrc != null">driving_pendant_src,</if>
- <if test="operationLicenseSrc != null">operation_license_src,</if>
- <if test="technologySrc != null">technology_src,</if>
- <if test="drivingLoadSrc != null">driving_load_src,</if>
- <if test="secondLvMaintainSrc != null">second_lv_maintain_src,</if>
- <if test="tafficConstranintInsuranceSrc != null">taffic_constranint_insurance_src,</if>
- <if test="businessInsuranceSrc != null">business_insurance_src,</if>
- <if test="accpetCarrageInsuranceSrc != null">accpet_carrage_insurance_src,</if>
- <if test="creatTime != null">creat_time,</if>
- <if test="modificationTime != null">modification_time,</if>
- <if test="billStatus != null">bill_status,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remarks != null">remarks,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fleetCompanyId != null">#{fleetCompanyId},</if>
- <if test="carNum != null">#{carNum},</if>
- <if test="driverId != null">#{driverId},</if>
- <if test="driverName != null">#{driverName},</if>
- <if test="driverTel != null">#{driverTel},</if>
- <if test="hangNum != null">#{hangNum},</if>
- <if test="fuelType != null">#{fuelType},</if>
- <if test="carType != null">#{carType},</if>
- <if test="carName != null">#{carName},</if>
- <if test="carBrand != null">#{carBrand},</if>
- <if test="manufactureUnit != null">#{manufactureUnit},</if>
- <if test="officeOfCertificate != null">#{officeOfCertificate},</if>
- <if test="pullCarType != null">#{pullCarType},</if>
- <if test="pullCarShelfNum != null">#{pullCarShelfNum},</if>
- <if test="mountCarType != null">#{mountCarType},</if>
- <if test="mountCarNum != null">#{mountCarNum},</if>
- <if test="engine != null">#{engine},</if>
- <if test="carLoadPersion != null">#{carLoadPersion},</if>
- <if test="buyCarDate != null">#{buyCarDate},</if>
- <if test="regiestDate != null">#{regiestDate},</if>
- <if test="abandonDate != null">#{abandonDate},</if>
- <if test="outerSize != null">#{outerSize},</if>
- <if test="sumWeight != null">#{sumWeight},</if>
- <if test="vouchWeight != null">#{vouchWeight},</if>
- <if test="equipWeight != null">#{equipWeight},</if>
- <if test="drivingLicenseSrc != null">#{drivingLicenseSrc},</if>
- <if test="drivingPendantSrc != null">#{drivingPendantSrc},</if>
- <if test="operationLicenseSrc != null">#{operationLicenseSrc},</if>
- <if test="technologySrc != null">#{technologySrc},</if>
- <if test="drivingLoadSrc != null">#{drivingLoadSrc},</if>
- <if test="secondLvMaintainSrc != null">#{secondLvMaintainSrc},</if>
- <if test="tafficConstranintInsuranceSrc != null">#{tafficConstranintInsuranceSrc},</if>
- <if test="businessInsuranceSrc != null">#{businessInsuranceSrc},</if>
- <if test="accpetCarrageInsuranceSrc != null">#{accpetCarrageInsuranceSrc},</if>
- <if test="creatTime != null">#{creatTime},</if>
- <if test="modificationTime != null">#{modificationTime},</if>
- <if test="billStatus != null">#{billStatus},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remarks != null">#{remarks},</if>
- </trim>
- </insert>
- <update id="updateFleetCarManage" parameterType="FleetCarManage">
- update fleet_car_manage
- <trim prefix="SET" suffixOverrides=",">
- <if test="fleetCompanyId != null">fleet_company_id = #{fleetCompanyId},</if>
- <if test="carNum != null">car_num = #{carNum},</if>
- <if test="driverId != null">driver_id = #{driverId},</if>
- <if test="driverName != null">driver_name = #{driverName},</if>
- <if test="driverTel != null">driver_tel = #{driverTel},</if>
- <if test="hangNum != null">hang_num = #{hangNum},</if>
- <if test="fuelType != null">fuel_type = #{fuelType},</if>
- <if test="carType != null">car_type = #{carType},</if>
- <if test="carName != null">car_name = #{carName},</if>
- <if test="carBrand != null">car_brand = #{carBrand},</if>
- <if test="manufactureUnit != null">manufacture_unit = #{manufactureUnit},</if>
- <if test="officeOfCertificate != null">office_of_certificate = #{officeOfCertificate},</if>
- <if test="pullCarType != null">pull_car_type = #{pullCarType},</if>
- <if test="pullCarShelfNum != null">pull_car_shelf_num = #{pullCarShelfNum},</if>
- <if test="mountCarType != null">mount_car_type = #{mountCarType},</if>
- <if test="mountCarNum != null">mount_car_num = #{mountCarNum},</if>
- <if test="engine != null">engine = #{engine},</if>
- <if test="carLoadPersion != null">car_load_persion = #{carLoadPersion},</if>
- <if test="buyCarDate != null">buy_car_date = #{buyCarDate},</if>
- <if test="regiestDate != null">regiest_date = #{regiestDate},</if>
- <if test="abandonDate != null">abandon_date = #{abandonDate},</if>
- <if test="outerSize != null">outer_size = #{outerSize},</if>
- <if test="sumWeight != null">sum_weight = #{sumWeight},</if>
- <if test="vouchWeight != null">vouch_weight = #{vouchWeight},</if>
- <if test="equipWeight != null">equip_weight = #{equipWeight},</if>
- <if test="drivingLicenseSrc != null">driving_license_src = #{drivingLicenseSrc},</if>
- <if test="drivingPendantSrc != null">driving_pendant_src = #{drivingPendantSrc},</if>
- <if test="operationLicenseSrc != null">operation_license_src = #{operationLicenseSrc},</if>
- <if test="technologySrc != null">technology_src = #{technologySrc},</if>
- <if test="drivingLoadSrc != null">driving_load_src = #{drivingLoadSrc},</if>
- <if test="secondLvMaintainSrc != null">second_lv_maintain_src = #{secondLvMaintainSrc},</if>
- <if test="tafficConstranintInsuranceSrc != null">taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc},</if>
- <if test="businessInsuranceSrc != null">business_insurance_src = #{businessInsuranceSrc},</if>
- <if test="accpetCarrageInsuranceSrc != null">accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc},</if>
- <if test="creatTime != null">creat_time = #{creatTime},</if>
- <if test="modificationTime != null">modification_time = #{modificationTime},</if>
- <if test="billStatus != null">bill_status = #{billStatus},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remarks != null">remarks = #{remarks},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="updateFleetCarManageByDriverId" parameterType="FleetCarManage">
- update fleet_car_manage
- set driver_tel = #{driverTel}, driver_name = #{driverName}
- where driver_id = #{driverId}
- </update>
- <delete id="deleteFleetCarManageById" parameterType="Long">
- delete from fleet_car_manage where id = #{id}
- </delete>
- <delete id="deleteFleetCarManageByIds" parameterType="String">
- delete from fleet_car_manage where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <select id="selectFleetCarManageListMap" parameterType="FleetCarManage" resultType="Map">
- SELECT
- car.id AS Id,
- com.f_name AS fleetCompanyName,
- car.car_num AS carNum,
- car.driver_name AS driverName,
- car.hang_num AS hangNum,
- car.fuel_type AS fuelType,
- car.car_type AS carType,
- car.car_name AS carName,
- car.manufacture_unit AS carBrand,
- car.car_brand AS manufactureUnit,
- car.office_of_certificate AS officeOfCertificate,
- car.pull_car_type AS pullCarType,
- car.pull_car_shelf_num AS pullCarShelfNum,
- car.mount_car_type AS mountCarType,
- car.mount_car_num AS mountCarNum,
- car.`engine` AS `engine`,
- car.car_load_persion AS carLoadPersion,
- car.buy_car_date AS buyCarDate,
- car.regiest_date AS regiestDate,
- car.abandon_date AS abandonDate,
- car.outer_size AS outerSize,
- car.sum_weight AS sumWeight,
- car.vouch_weight AS vouchWeight,
- car.equip_weight AS equipWeight,
- car.driving_license_src AS drivingLicenseSrc,
- car.driving_pendant_src AS drivingPendantSrc,
- car.operation_license_src AS operationLicenseSrc,
- car.technology_src AS technologySrc,
- car.driving_load_src AS drivingLoadSrc,
- car.second_lv_maintain_src AS secondLvMaintainSrc,
- car.taffic_constranint_insurance_src AS tafficConstranintInsuranceSrc,
- car.business_insurance_src AS businessInsuranceSrc,
- car.accpet_carrage_insurance_src AS accpetCarrageInsuranceSrc,
- car.creat_time AS creatTime,
- car.modification_time AS modificationTime,
- car.bill_status AS billStatus,
- car.del_flag AS delFlag,
- car.create_by AS createBy,
- car.update_by AS updateBy,
- car.update_time AS updateTime,
- car.remarks AS remarks
- FROM
- fleet_car_manage AS car
- LEFT JOIN t_corps AS com ON com.f_id = car.fleet_company_id
- <where>
- <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
- <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
- <if test="driverName != null and driverName != ''"> and driver_name = #{driverName}</if>
- <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
- <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
- <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
- <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
- <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
- <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
- <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
- <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
- <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
- <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
- <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
- <if test="engine != null and engine != ''"> and engine = #{engine}</if>
- <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
- <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
- <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
- <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
- <if test="outerSize != null "> and outer_size = #{outerSize}</if>
- <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
- <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
- <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
- <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
- <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
- <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
- <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
- <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
- <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
- <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
- <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
- <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
- <if test="creatTime != null "> and creat_time = #{creatTime}</if>
- <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
- <if test="billStatus != null "> and bill_status = #{billStatus}</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- </where>
- </select>
- <select id="checkCarNumUnique" parameterType="String" resultType="int">
- select count(1) from fleet_car_manage where car_num = #{carNum} limit 1
- </select>
- </mapper>
|