getcheckinfo.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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.runzhixing.dao.interf.GetCheckInfoInterface">
  6. <resultMap id="cylinder" type="com.runzhixing.bean.Cylinder1011">
  7. <result column="cylinderType" property="CYLINDERTYPE"/>
  8. <result column="productNo" property="PRODUCTNO"/>
  9. <result column="productDate" property="PRODUCTDATE"/>
  10. <result column="yearLimit" property="YEARLIMIT"/>
  11. <result column="startUseDate" property="STARTUSEDATE"/>
  12. <result column="checkDate" property="CHECKDATE"/>
  13. <result column="checkState" property="CHECKSTATE"/>
  14. <result column="nextCheckDate" property="NEXTCHECKDATE"/>
  15. <result column="weight" property="WEIGHT"/>
  16. <result column="vol" property="VOL"/>
  17. <result column="thickNess" property="THICKNESS"/>
  18. <result column="press" property="PRESS"/>
  19. <result column="tagNo" property="TAGNO"/>
  20. <result column="tagUid" property="TAGUID"/>
  21. <result column="car_guid" property="carGuid"/>
  22. <result column="cylinderNo" property="cylinderNo"/>
  23. </resultMap>
  24. <resultMap id="car" type="com.runzhixing.bean.Car1011">
  25. <result column="DISTRICTNO" property="DISTRICTNO"/>
  26. <result column="REGNO" property="REGNO"/>
  27. <result column="CARNO" property="CARNO"/>
  28. <result column="PLATETYPE" property="PLATETYPE"/>
  29. <result column="APPTYPE" property="APPTYPE"/>
  30. <result column="CARUNIT" property="CARUNIT"/>
  31. <result column="ADDR" property="ADDR"/>
  32. </resultMap>
  33. <select id="getCylinder" parameterType="com.runzhixing.bean.Cylinder1014" resultMap="cylinder">
  34. select
  35. t.cylinderType,
  36. t.productNo,
  37. t.productDate,
  38. t.yearLimit,
  39. t.startUseDate,
  40. t.checkDate,
  41. t.checkState,
  42. t.nextCheckDate,
  43. t.weight,
  44. t.vol,
  45. t.thickNess,
  46. t.press,
  47. t.tagNo,
  48. t.tagUid,
  49. t.car_guid,
  50. t.cylinderNo
  51. from
  52. tb_cylinder t
  53. join tb_car t1 on t1.car_guid = t.car_guid
  54. <where>
  55. <if test="priCode != null and !&quot;&quot;.equals(priCode.trim())">
  56. and substr(t1.DISTRICTNO,1,length(#{priCode})) = #{priCode}
  57. </if>
  58. <if test="uid != null and !&quot;&quot;.equals(uid.trim())">
  59. and t.tagUid = #{uid}
  60. </if>
  61. <if test="carno != null and !&quot;&quot;.equals(carno.trim())">
  62. and t1.carNo = #{carno}
  63. </if>
  64. <if test="PLATETYPE != -1">
  65. and t1.platetype = #{PLATETYPE}
  66. </if>
  67. </where>
  68. order by t.installDate DESC
  69. </select>
  70. <select id="getCar" parameterType="String" resultMap="car">
  71. select
  72. t.DISTRICTNO,
  73. t.REGNO,
  74. t.CARNO,
  75. t.PLATETYPE,
  76. t.APPTYPE,
  77. t.CARUNIT,
  78. t.ADDR
  79. from
  80. tb_car t
  81. <where>
  82. t.car_guid = #{carGuid}
  83. </where>
  84. </select>
  85. <select id="getCarByCarNo" parameterType="com.runzhixing.bean.Car1011" resultMap="car">
  86. select
  87. t.DISTRICTNO,
  88. t.REGNO,
  89. t.CARNO,
  90. t.PLATETYPE,
  91. t.APPTYPE,
  92. t.CARUNIT,
  93. t.ADDR
  94. from
  95. tb_car t
  96. <where>
  97. t.CARNO = #{CARNO} and t.platetype = #{PLATETYPE}
  98. <if test="REGNO != null and !&quot;&quot;.equals(REGNO.trim())">
  99. and t.REGNO = #{REGNO}
  100. </if>
  101. </where>
  102. </select>
  103. </mapper>