EngVehicleNoNumMapper.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.zhgd.scs.mapper.EngVehicleNoNumMapper">
  6. <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.EngVehicleNoNum">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="name" column="name" jdbcType="VARCHAR"/>
  9. <result property="idCard" column="id_card" jdbcType="VARCHAR"/>
  10. <result property="phone" column="phone" jdbcType="VARCHAR"/>
  11. <result property="vehicleTypeId" column="vehicle_type_id" jdbcType="BIGINT"/>
  12. <result property="vehicleNum" column="vehicle_num" jdbcType="VARCHAR"/>
  13. <result property="userId" column="user_id" jdbcType="BIGINT"/>
  14. <result property="carImgX" column="car_img_x" jdbcType="VARCHAR"/>
  15. <result property="carImgY" column="car_img_y" jdbcType="VARCHAR"/>
  16. <result property="state" column="state" jdbcType="INTEGER"/>
  17. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  18. <result property="remark" column="remark" jdbcType="VARCHAR"/>
  19. <result property="deleted" column="deleted" jdbcType="INTEGER"/>
  20. <result property="gender" column="gender" jdbcType="INTEGER"/>
  21. <result property="inOut" column="in_out" jdbcType="INTEGER"/>
  22. <result property="inDateTime" column="in_date_time" jdbcType="TIMESTAMP"/>
  23. <result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
  24. <result property="personId" column="person_id" jdbcType="BIGINT"/>
  25. <result property="unitId" column="unit_id" jdbcType="BIGINT"/>
  26. <result property="projectId" column="project_id" jdbcType="BIGINT"/>
  27. </resultMap>
  28. <select id="pagelist" resultType="com.zhgd.scs.domain.vo.EngVehicleNoNumVo">
  29. SELECT v.*,t.type typeName
  30. FROM eng_vehicle_no_num v
  31. left join eng_vehicle_type t on t.id=v.vehicle_type_id
  32. WHERE v.project_id=#{projectId} and v.deleted=1 and v.state=1
  33. <if test="vehicleTypeId!=null">
  34. AND v.vehicle_type_id = #{vehicleTypeId}
  35. </if>
  36. <if test="vehicleNum!=null and vehicleNum!= ''">
  37. AND v.vehicle_num LIKE concat('%',#{vehicleNum},'%')
  38. </if>
  39. </select>
  40. <select id="pageInOut" resultType="com.zhgd.scs.domain.vo.EngVehicleNoNumVo">
  41. SELECT v.*,t.type typeName
  42. FROM eng_vehicle_no_num v
  43. left join eng_vehicle_type t on t.id=v.vehicle_type_id
  44. WHERE v.project_id=#{projectId} and v.deleted=1 and v.state=1 and v.in_out=#{inOut}
  45. <if test="name!=null and name!= ''">
  46. AND v.name LIKE concat('%',#{name},'%')
  47. </if>
  48. <if test="vehicleNum!=null and vehicleNum!= ''">
  49. AND v.vehicle_num LIKE concat('%',#{vehicleNum},'%')
  50. </if>
  51. <if test="vehicleTypeId!=null">
  52. AND v.vehicle_type_id = #{vehicleTypeId}
  53. </if>
  54. </select>
  55. </mapper>