FleetCarManageMapper.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.basicData.mapper.FleetCarManageMapper">
  6. <resultMap type="FleetCarManage" id="FleetCarManageResult">
  7. <result property="id" column="id" />
  8. <result property="fleetCompanyId" column="fleet_company_id" />
  9. <result property="carNum" column="car_num" />
  10. <result property="driverId" column="driver_id" />
  11. <result property="driverName" column="driver_name" />
  12. <result property="driverTel" column="driver_tel" />
  13. <result property="hangNum" column="hang_num" />
  14. <result property="fuelType" column="fuel_type" />
  15. <result property="carType" column="car_type" />
  16. <result property="carName" column="car_name" />
  17. <result property="carBrand" column="car_brand" />
  18. <result property="manufactureUnit" column="manufacture_unit" />
  19. <result property="officeOfCertificate" column="office_of_certificate" />
  20. <result property="pullCarType" column="pull_car_type" />
  21. <result property="pullCarShelfNum" column="pull_car_shelf_num" />
  22. <result property="mountCarType" column="mount_car_type" />
  23. <result property="mountCarNum" column="mount_car_num" />
  24. <result property="engine" column="engine" />
  25. <result property="carLoadPersion" column="car_load_persion" />
  26. <result property="buyCarDate" column="buy_car_date" />
  27. <result property="regiestDate" column="regiest_date" />
  28. <result property="abandonDate" column="abandon_date" />
  29. <result property="outerSize" column="outer_size" />
  30. <result property="sumWeight" column="sum_weight" />
  31. <result property="vouchWeight" column="vouch_weight" />
  32. <result property="equipWeight" column="equip_weight" />
  33. <result property="drivingLicenseSrc" column="driving_license_src" />
  34. <result property="drivingPendantSrc" column="driving_pendant_src" />
  35. <result property="operationLicenseSrc" column="operation_license_src" />
  36. <result property="technologySrc" column="technology_src" />
  37. <result property="drivingLoadSrc" column="driving_load_src" />
  38. <result property="secondLvMaintainSrc" column="second_lv_maintain_src" />
  39. <result property="tafficConstranintInsuranceSrc" column="taffic_constranint_insurance_src" />
  40. <result property="businessInsuranceSrc" column="business_insurance_src" />
  41. <result property="accpetCarrageInsuranceSrc" column="accpet_carrage_insurance_src" />
  42. <result property="creatTime" column="creat_time" />
  43. <result property="modificationTime" column="modification_time" />
  44. <result property="billStatus" column="bill_status" />
  45. <result property="delFlag" column="del_flag" />
  46. <result property="createBy" column="create_by" />
  47. <result property="updateBy" column="update_by" />
  48. <result property="updateTime" column="update_time" />
  49. <result property="remarks" column="remarks" />
  50. </resultMap>
  51. <sql id="selectFleetCarManageVo">
  52. 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
  53. </sql>
  54. <select id="selectFleetCarManageList" parameterType="FleetCarManage" resultMap="FleetCarManageResult">
  55. <include refid="selectFleetCarManageVo"/>
  56. <where>
  57. <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
  58. <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
  59. <if test="driverId != null "> and driver_id = #{driverId}</if>
  60. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  61. <if test="driverTel != null "> and driver_tel like concat('%', #{driverTel}, '%')</if>
  62. <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
  63. <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
  64. <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
  65. <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
  66. <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
  67. <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
  68. <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
  69. <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
  70. <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
  71. <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
  72. <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
  73. <if test="engine != null and engine != ''"> and engine = #{engine}</if>
  74. <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
  75. <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
  76. <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
  77. <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
  78. <if test="outerSize != null "> and outer_size = #{outerSize}</if>
  79. <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
  80. <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
  81. <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
  82. <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
  83. <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
  84. <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
  85. <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
  86. <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
  87. <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
  88. <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
  89. <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
  90. <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
  91. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  92. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  93. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  94. <if test="delFlag != null "> and del_flag = #{delFlag}</if>
  95. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  96. </where>
  97. </select>
  98. <select id="selectFleetCarManageCount" parameterType="FleetCarManage" resultType="Integer">
  99. select COUNT(id) from fleet_car_manage
  100. <where>
  101. <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
  102. <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
  103. <if test="driverId != null "> and driver_id = #{driverId}</if>
  104. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  105. <if test="driverTel != null "> and driver_tel like concat('%', #{driverTel}, '%')</if>
  106. <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
  107. <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
  108. <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
  109. <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
  110. <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
  111. <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
  112. <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
  113. <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
  114. <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
  115. <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
  116. <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
  117. <if test="engine != null and engine != ''"> and engine = #{engine}</if>
  118. <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
  119. <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
  120. <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
  121. <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
  122. <if test="outerSize != null "> and outer_size = #{outerSize}</if>
  123. <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
  124. <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
  125. <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
  126. <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
  127. <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
  128. <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
  129. <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
  130. <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
  131. <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
  132. <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
  133. <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
  134. <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
  135. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  136. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  137. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  138. <if test="delFlag != null "> and del_flag = #{delFlag}</if>
  139. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  140. </where>
  141. </select>
  142. <select id="selectFleetCarManageIdNameList" resultType="FleetCarManage" resultMap="FleetCarManageResult">
  143. select id, fleet_company_id, car_num, car_name, driver_id, driver_name, driver_tel from fleet_car_manage
  144. <where>
  145. <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
  146. <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
  147. <if test="driverId != null "> and driver_id = #{driverId}</if>
  148. <if test="driverName != null and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
  149. <if test="driverTel != null and driverTel != ''"> and driver_tel like concat('%', #{driverTel}, '%')</if>
  150. <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
  151. <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
  152. <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
  153. <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
  154. <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
  155. <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
  156. <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
  157. <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
  158. <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
  159. <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
  160. <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
  161. <if test="engine != null and engine != ''"> and engine = #{engine}</if>
  162. <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
  163. <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
  164. <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
  165. <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
  166. <if test="outerSize != null "> and outer_size = #{outerSize}</if>
  167. <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
  168. <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
  169. <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
  170. <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
  171. <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
  172. <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
  173. <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
  174. <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
  175. <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
  176. <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
  177. <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
  178. <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
  179. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  180. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  181. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  182. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  183. </where>
  184. </select>
  185. <select id="selectFleetCarManageById" parameterType="Long" resultMap="FleetCarManageResult">
  186. <include refid="selectFleetCarManageVo"/>
  187. where id = #{id}
  188. </select>
  189. <select id="selectManageCount" parameterType="ftmsorderbills" resultType="int">
  190. SELECT
  191. COUNT( f.id )
  192. FROM
  193. fleet_car_manage f
  194. LEFT JOIN t_corps fleet ON fleet.f_id = f.fleet_company_id
  195. WHERE
  196. f.bill_status = 6
  197. AND f.del_flag = '0'
  198. <if test="isFleet != null and isFleet == 1">
  199. AND fleet.f_id = #{fleetId}
  200. </if>
  201. </select>
  202. <insert id="insertFleetCarManage" parameterType="FleetCarManage" useGeneratedKeys="true" keyProperty="id">
  203. insert into fleet_car_manage
  204. <trim prefix="(" suffix=")" suffixOverrides=",">
  205. <if test="fleetCompanyId != null">fleet_company_id,</if>
  206. <if test="carNum != null">car_num,</if>
  207. <if test="driverId != null">driver_id,</if>
  208. <if test="driverName != null">driver_name,</if>
  209. <if test="driverTel != null">driver_tel ,</if>
  210. <if test="hangNum != null">hang_num,</if>
  211. <if test="fuelType != null">fuel_type,</if>
  212. <if test="carType != null">car_type,</if>
  213. <if test="carName != null">car_name,</if>
  214. <if test="carBrand != null">car_brand,</if>
  215. <if test="manufactureUnit != null">manufacture_unit,</if>
  216. <if test="officeOfCertificate != null">office_of_certificate,</if>
  217. <if test="pullCarType != null">pull_car_type,</if>
  218. <if test="pullCarShelfNum != null">pull_car_shelf_num,</if>
  219. <if test="mountCarType != null">mount_car_type,</if>
  220. <if test="mountCarNum != null">mount_car_num,</if>
  221. <if test="engine != null">engine,</if>
  222. <if test="carLoadPersion != null">car_load_persion,</if>
  223. <if test="buyCarDate != null">buy_car_date,</if>
  224. <if test="regiestDate != null">regiest_date,</if>
  225. <if test="abandonDate != null">abandon_date,</if>
  226. <if test="outerSize != null">outer_size,</if>
  227. <if test="sumWeight != null">sum_weight,</if>
  228. <if test="vouchWeight != null">vouch_weight,</if>
  229. <if test="equipWeight != null">equip_weight,</if>
  230. <if test="drivingLicenseSrc != null">driving_license_src,</if>
  231. <if test="drivingPendantSrc != null">driving_pendant_src,</if>
  232. <if test="operationLicenseSrc != null">operation_license_src,</if>
  233. <if test="technologySrc != null">technology_src,</if>
  234. <if test="drivingLoadSrc != null">driving_load_src,</if>
  235. <if test="secondLvMaintainSrc != null">second_lv_maintain_src,</if>
  236. <if test="tafficConstranintInsuranceSrc != null">taffic_constranint_insurance_src,</if>
  237. <if test="businessInsuranceSrc != null">business_insurance_src,</if>
  238. <if test="accpetCarrageInsuranceSrc != null">accpet_carrage_insurance_src,</if>
  239. <if test="creatTime != null">creat_time,</if>
  240. <if test="modificationTime != null">modification_time,</if>
  241. <if test="billStatus != null">bill_status,</if>
  242. <if test="delFlag != null">del_flag,</if>
  243. <if test="createBy != null">create_by,</if>
  244. <if test="updateBy != null">update_by,</if>
  245. <if test="updateTime != null">update_time,</if>
  246. <if test="remarks != null">remarks,</if>
  247. </trim>
  248. <trim prefix="values (" suffix=")" suffixOverrides=",">
  249. <if test="fleetCompanyId != null">#{fleetCompanyId},</if>
  250. <if test="carNum != null">#{carNum},</if>
  251. <if test="driverId != null">#{driverId},</if>
  252. <if test="driverName != null">#{driverName},</if>
  253. <if test="driverTel != null">#{driverTel},</if>
  254. <if test="hangNum != null">#{hangNum},</if>
  255. <if test="fuelType != null">#{fuelType},</if>
  256. <if test="carType != null">#{carType},</if>
  257. <if test="carName != null">#{carName},</if>
  258. <if test="carBrand != null">#{carBrand},</if>
  259. <if test="manufactureUnit != null">#{manufactureUnit},</if>
  260. <if test="officeOfCertificate != null">#{officeOfCertificate},</if>
  261. <if test="pullCarType != null">#{pullCarType},</if>
  262. <if test="pullCarShelfNum != null">#{pullCarShelfNum},</if>
  263. <if test="mountCarType != null">#{mountCarType},</if>
  264. <if test="mountCarNum != null">#{mountCarNum},</if>
  265. <if test="engine != null">#{engine},</if>
  266. <if test="carLoadPersion != null">#{carLoadPersion},</if>
  267. <if test="buyCarDate != null">#{buyCarDate},</if>
  268. <if test="regiestDate != null">#{regiestDate},</if>
  269. <if test="abandonDate != null">#{abandonDate},</if>
  270. <if test="outerSize != null">#{outerSize},</if>
  271. <if test="sumWeight != null">#{sumWeight},</if>
  272. <if test="vouchWeight != null">#{vouchWeight},</if>
  273. <if test="equipWeight != null">#{equipWeight},</if>
  274. <if test="drivingLicenseSrc != null">#{drivingLicenseSrc},</if>
  275. <if test="drivingPendantSrc != null">#{drivingPendantSrc},</if>
  276. <if test="operationLicenseSrc != null">#{operationLicenseSrc},</if>
  277. <if test="technologySrc != null">#{technologySrc},</if>
  278. <if test="drivingLoadSrc != null">#{drivingLoadSrc},</if>
  279. <if test="secondLvMaintainSrc != null">#{secondLvMaintainSrc},</if>
  280. <if test="tafficConstranintInsuranceSrc != null">#{tafficConstranintInsuranceSrc},</if>
  281. <if test="businessInsuranceSrc != null">#{businessInsuranceSrc},</if>
  282. <if test="accpetCarrageInsuranceSrc != null">#{accpetCarrageInsuranceSrc},</if>
  283. <if test="creatTime != null">#{creatTime},</if>
  284. <if test="modificationTime != null">#{modificationTime},</if>
  285. <if test="billStatus != null">#{billStatus},</if>
  286. <if test="delFlag != null">#{delFlag},</if>
  287. <if test="createBy != null">#{createBy},</if>
  288. <if test="updateBy != null">#{updateBy},</if>
  289. <if test="updateTime != null">#{updateTime},</if>
  290. <if test="remarks != null">#{remarks},</if>
  291. </trim>
  292. </insert>
  293. <update id="updateFleetCarManage" parameterType="FleetCarManage">
  294. update fleet_car_manage
  295. <trim prefix="SET" suffixOverrides=",">
  296. <if test="fleetCompanyId != null">fleet_company_id = #{fleetCompanyId},</if>
  297. <if test="carNum != null">car_num = #{carNum},</if>
  298. <if test="driverId != null">driver_id = #{driverId},</if>
  299. <if test="driverName != null">driver_name = #{driverName},</if>
  300. <if test="driverTel != null">driver_tel = #{driverTel},</if>
  301. <if test="hangNum != null">hang_num = #{hangNum},</if>
  302. <if test="fuelType != null">fuel_type = #{fuelType},</if>
  303. <if test="carType != null">car_type = #{carType},</if>
  304. <if test="carName != null">car_name = #{carName},</if>
  305. <if test="carBrand != null">car_brand = #{carBrand},</if>
  306. <if test="manufactureUnit != null">manufacture_unit = #{manufactureUnit},</if>
  307. <if test="officeOfCertificate != null">office_of_certificate = #{officeOfCertificate},</if>
  308. <if test="pullCarType != null">pull_car_type = #{pullCarType},</if>
  309. <if test="pullCarShelfNum != null">pull_car_shelf_num = #{pullCarShelfNum},</if>
  310. <if test="mountCarType != null">mount_car_type = #{mountCarType},</if>
  311. <if test="mountCarNum != null">mount_car_num = #{mountCarNum},</if>
  312. <if test="engine != null">engine = #{engine},</if>
  313. <if test="carLoadPersion != null">car_load_persion = #{carLoadPersion},</if>
  314. <if test="buyCarDate != null">buy_car_date = #{buyCarDate},</if>
  315. <if test="regiestDate != null">regiest_date = #{regiestDate},</if>
  316. <if test="abandonDate != null">abandon_date = #{abandonDate},</if>
  317. <if test="outerSize != null">outer_size = #{outerSize},</if>
  318. <if test="sumWeight != null">sum_weight = #{sumWeight},</if>
  319. <if test="vouchWeight != null">vouch_weight = #{vouchWeight},</if>
  320. <if test="equipWeight != null">equip_weight = #{equipWeight},</if>
  321. <if test="drivingLicenseSrc != null">driving_license_src = #{drivingLicenseSrc},</if>
  322. <if test="drivingPendantSrc != null">driving_pendant_src = #{drivingPendantSrc},</if>
  323. <if test="operationLicenseSrc != null">operation_license_src = #{operationLicenseSrc},</if>
  324. <if test="technologySrc != null">technology_src = #{technologySrc},</if>
  325. <if test="drivingLoadSrc != null">driving_load_src = #{drivingLoadSrc},</if>
  326. <if test="secondLvMaintainSrc != null">second_lv_maintain_src = #{secondLvMaintainSrc},</if>
  327. <if test="tafficConstranintInsuranceSrc != null">taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc},</if>
  328. <if test="businessInsuranceSrc != null">business_insurance_src = #{businessInsuranceSrc},</if>
  329. <if test="accpetCarrageInsuranceSrc != null">accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc},</if>
  330. <if test="creatTime != null">creat_time = #{creatTime},</if>
  331. <if test="modificationTime != null">modification_time = #{modificationTime},</if>
  332. <if test="billStatus != null">bill_status = #{billStatus},</if>
  333. <if test="delFlag != null">del_flag = #{delFlag},</if>
  334. <if test="createBy != null">create_by = #{createBy},</if>
  335. <if test="updateBy != null">update_by = #{updateBy},</if>
  336. <if test="updateTime != null">update_time = #{updateTime},</if>
  337. <if test="remarks != null">remarks = #{remarks},</if>
  338. </trim>
  339. where id = #{id}
  340. </update>
  341. <update id="updateFleetCarManageByDriverId" parameterType="FleetCarManage">
  342. update fleet_car_manage
  343. set driver_tel = #{driverTel}, driver_name = #{driverName}
  344. where driver_id = #{driverId}
  345. </update>
  346. <delete id="deleteFleetCarManageById" parameterType="Long">
  347. delete from fleet_car_manage where id = #{id}
  348. </delete>
  349. <delete id="deleteFleetCarManageByIds" parameterType="String">
  350. delete from fleet_car_manage where id in
  351. <foreach item="id" collection="array" open="(" separator="," close=")">
  352. #{id}
  353. </foreach>
  354. </delete>
  355. <select id="selectFleetCarManageListMap" parameterType="FleetCarManage" resultType="Map">
  356. SELECT
  357. car.id AS Id,
  358. com.f_name AS fleetCompanyName,
  359. car.car_num AS carNum,
  360. car.driver_name AS driverName,
  361. car.hang_num AS hangNum,
  362. car.fuel_type AS fuelType,
  363. car.car_type AS carType,
  364. car.car_name AS carName,
  365. car.manufacture_unit AS carBrand,
  366. car.car_brand AS manufactureUnit,
  367. car.office_of_certificate AS officeOfCertificate,
  368. car.pull_car_type AS pullCarType,
  369. car.pull_car_shelf_num AS pullCarShelfNum,
  370. car.mount_car_type AS mountCarType,
  371. car.mount_car_num AS mountCarNum,
  372. car.`engine` AS `engine`,
  373. car.car_load_persion AS carLoadPersion,
  374. car.buy_car_date AS buyCarDate,
  375. car.regiest_date AS regiestDate,
  376. car.abandon_date AS abandonDate,
  377. car.outer_size AS outerSize,
  378. car.sum_weight AS sumWeight,
  379. car.vouch_weight AS vouchWeight,
  380. car.equip_weight AS equipWeight,
  381. car.driving_license_src AS drivingLicenseSrc,
  382. car.driving_pendant_src AS drivingPendantSrc,
  383. car.operation_license_src AS operationLicenseSrc,
  384. car.technology_src AS technologySrc,
  385. car.driving_load_src AS drivingLoadSrc,
  386. car.second_lv_maintain_src AS secondLvMaintainSrc,
  387. car.taffic_constranint_insurance_src AS tafficConstranintInsuranceSrc,
  388. car.business_insurance_src AS businessInsuranceSrc,
  389. car.accpet_carrage_insurance_src AS accpetCarrageInsuranceSrc,
  390. car.creat_time AS creatTime,
  391. car.modification_time AS modificationTime,
  392. car.bill_status AS billStatus,
  393. car.del_flag AS delFlag,
  394. car.create_by AS createBy,
  395. car.update_by AS updateBy,
  396. car.update_time AS updateTime,
  397. car.remarks AS remarks
  398. FROM
  399. fleet_car_manage AS car
  400. LEFT JOIN t_corps AS com ON com.f_id = car.fleet_company_id
  401. <where>
  402. <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
  403. <if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
  404. <if test="driverName != null and driverName != ''"> and driver_name = #{driverName}</if>
  405. <if test="hangNum != null and hangNum != ''"> and hang_num = #{hangNum}</if>
  406. <if test="fuelType != null and fuelType != ''"> and fuel_type = #{fuelType}</if>
  407. <if test="carType != null and carType != ''"> and car_type = #{carType}</if>
  408. <if test="carName != null and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
  409. <if test="carBrand != null and carBrand != ''"> and car_brand = #{carBrand}</if>
  410. <if test="manufactureUnit != null and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
  411. <if test="officeOfCertificate != null and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
  412. <if test="pullCarType != null and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
  413. <if test="pullCarShelfNum != null and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
  414. <if test="mountCarType != null and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
  415. <if test="mountCarNum != null and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
  416. <if test="engine != null and engine != ''"> and engine = #{engine}</if>
  417. <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
  418. <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
  419. <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
  420. <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
  421. <if test="outerSize != null "> and outer_size = #{outerSize}</if>
  422. <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
  423. <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
  424. <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
  425. <if test="drivingLicenseSrc != null and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
  426. <if test="drivingPendantSrc != null and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
  427. <if test="operationLicenseSrc != null and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
  428. <if test="technologySrc != null and technologySrc != ''"> and technology_src = #{technologySrc}</if>
  429. <if test="drivingLoadSrc != null and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
  430. <if test="secondLvMaintainSrc != null and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
  431. <if test="tafficConstranintInsuranceSrc != null and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
  432. <if test="businessInsuranceSrc != null and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
  433. <if test="accpetCarrageInsuranceSrc != null and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
  434. <if test="creatTime != null "> and creat_time = #{creatTime}</if>
  435. <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
  436. <if test="billStatus != null "> and bill_status = #{billStatus}</if>
  437. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  438. </where>
  439. </select>
  440. <select id="checkCarNumUnique" parameterType="String" resultType="int">
  441. select count(1) from fleet_car_manage where car_num = #{carNum} limit 1
  442. </select>
  443. </mapper>