CNGStation.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
  3. "http://ibatis.apache.org/dtd/sql-map-2.dtd">
  4. <sqlMap namespace="com.runzhixing.util.interf.PlaceLoader">
  5. <!--模块配置-->
  6. <typeAlias alias="station" type="com.runzhixing.util.bean.CNGStation"/>
  7. <typeAlias alias="machine" type="com.runzhixing.util.bean.CNGMachine"/>
  8. <!-- 查询指定加气站时,需要级联查询该加气站的所有信息(加气机列表、工作人员列表和加气站传输信息) -->
  9. <resultMap id="stationALL" class="station">
  10. <result property="id" column="STATIONNO"/>
  11. <result property="name" column="STATIONNAME"/>
  12. <result property="placeAB" column="STATIONAB"/>
  13. <result property="licence" column="LICENCE"/>
  14. <result property="licenceOrg" column="LICENCEORG"/>
  15. <result property="licenceDate" column="LICENCEDATE"/>
  16. <result property="validity" column="VALIDITY"/>
  17. <result property="stationAddr" column="STATIONADDR"/>
  18. <result property="manager" column="MANAGER"/>
  19. <result property="techManager" column="TECHMANA"/>
  20. <result property="phone" column="PHONE"/>
  21. <result property="mobile" column="MOBILE"/>
  22. <result property="fax" column="FAX"/>
  23. <result property="addr" column="ADDR"/>
  24. <result property="post" column="POST"/>
  25. <result property="remark" column="REMARK"/>
  26. <!-- 级联查询(CNGMachine.xml)该加气站的加气机列表 -->
  27. <result property="machines" column="stationno"
  28. select="getCNGMachineListByStationId" />
  29. <!-- 级联查询(CNGOperator.xml)该加气站的工作人员列表 -->
  30. <result property="operators" column="stationno"
  31. select="getOperatorListByStationId" />
  32. </resultMap>
  33. <!-- 缓存 -->
  34. <cacheModel id="cache" type ="LRU" readOnly="true" serialize="false">
  35. <flushInterval hours="24"/>
  36. <property name="cache-size" value="500" />
  37. </cacheModel>
  38. <!--Statement配置-->
  39. <!-- 查询指定加气站-->
  40. <select id="getCNGStationById" parameterClass="station" resultMap="stationALL" cacheModel="cache">
  41. <![CDATA[
  42. select
  43. STATIONNO,
  44. STATIONNAME,
  45. STATIONAB,
  46. LICENCE,
  47. LICENCEORG,
  48. LICENCEDATE,
  49. VALIDITY,
  50. STATIONADDR,
  51. MANAGER,
  52. TECHMANA,
  53. PHONE,
  54. MOBILE,
  55. FAX,
  56. ADDR,
  57. POST,
  58. REMARK
  59. from tb_cngstation
  60. where stationno = #id#
  61. ]]>
  62. </select>
  63. <!-- 查询List -->
  64. <select id="getCNGStationList" parameterClass="string" resultMap="stationALL" cacheModel="cache">
  65. <![CDATA[
  66. select
  67. STATIONNO,
  68. STATIONNAME,
  69. STATIONAB,
  70. LICENCE,
  71. LICENCEORG,
  72. LICENCEDATE,
  73. VALIDITY,
  74. STATIONADDR,
  75. MANAGER,
  76. TECHMANA,
  77. PHONE,
  78. MOBILE,
  79. FAX,
  80. ADDR,
  81. POST,
  82. REMARK
  83. from tb_cngstation
  84. where stationno like '$id$%'
  85. ]]>
  86. </select>
  87. </sqlMap>