InstallStation.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Copyright 2009-2012 the original author or authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!DOCTYPE mapper
  15. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  16. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  17. <mapper namespace="com.runzhixing.dao.interf.StationInterface">
  18. <!-- 结果集 -->
  19. <!-- 查询指定加气站时,需要级联查询该加气站的所有信息(加气机列表、工作人员列表和加气站传输信息) -->
  20. <resultMap id="stationMap" type="com.runzhixing.bean.InstallStation">
  21. <result property="id" column="STATIONNO"/>
  22. <result property="name" column="STATIONNAME"/>
  23. <result property="licence" column="LICENCE"/>
  24. <result property="licenceOrg" column="LICENCEORG"/>
  25. <result property="licenceDate" column="LICENCEDATE"/>
  26. <result property="validity" column="VALIDITY"/>
  27. <result property="manager" column="MANAGER"/>
  28. <result property="phone" column="PHONE"/>
  29. <result property="mobile" column="MOBILE"/>
  30. <result property="fax" column="FAX"/>
  31. <result property="addr" column="ADDR"/>
  32. <result property="post" column="POST"/>
  33. <result property="remark" column="REMARK"/>
  34. </resultMap>
  35. <resultMap id="resultMap" type="com.runzhixing.bean.InstallStationOperator">
  36. <result property="operatorNo" column="operatorno"/>
  37. <result property="name" column="name"/>
  38. <result property="idNo" column="idno"/>
  39. <result property="licence" column="licence"/>
  40. <result property="licenceOrg" column="licenceorg"/>
  41. <result property="licenceDate" column="licencedate"/>
  42. <result property="validity" column="validity"/>
  43. <result property="sex" column="sex"/>
  44. </resultMap>
  45. <!-- sql配置文件 -->
  46. <!-- 查询指定加气站-->
  47. <select id="getInstallStationById" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="stationMap">
  48. select
  49. STATIONNO,
  50. STATIONNAME,
  51. LICENCE,
  52. LICENCEORG,
  53. LICENCEDATE,
  54. VALIDITY,
  55. MANAGER,
  56. PHONE,
  57. MOBILE,
  58. FAX,
  59. ADDR,
  60. POST,
  61. REMARK
  62. from tb_installstation t
  63. <where>
  64. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  65. and t.stationno like '%' || #{cpstring1} || '%'
  66. </if>
  67. </where>
  68. </select>
  69. <select id="getInstallOperatorListByStationId" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="resultMap">
  70. select
  71. t.operatorno,
  72. t.name,
  73. t.idno,
  74. t.licence,
  75. t.licenceorg,
  76. t.licencedate,
  77. t.validity,
  78. t.sex
  79. from tb_installoperator t
  80. <where>
  81. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  82. and t.stationno = #{cpstring1}
  83. </if>
  84. </where>
  85. </select>
  86. </mapper>