| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!--
- Copyright 2009-2012 the original author or authors.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.runzhixing.dao.interf.CNGStationInterface">
- <!-- 结果集 -->
- <!-- 查询指定加气站时,需要级联查询该加气站的所有信息(加气机列表、工作人员列表和加气站传输信息) -->
- <resultMap id="stationALL" type="com.runzhixing.bean.CNGStation">
- <result property="id" column="STATIONNO"/>
- <result property="name" column="STATIONNAME"/>
- <result property="placeAB" column="STATIONAB"/>
- <result property="licence" column="LICENCE"/>
- <result property="licenceOrg" column="LICENCEORG"/>
- <result property="licenceDate" column="LICENCEDATE"/>
- <result property="validity" column="VALIDITY"/>
- <result property="stationAddr" column="STATIONADDR"/>
- <result property="manager" column="MANAGER"/>
- <result property="techManager" column="TECHMANA"/>
- <result property="phone" column="PHONE"/>
- <result property="mobile" column="MOBILE"/>
- <result property="fax" column="FAX"/>
- <result property="addr" column="ADDR"/>
- <result property="post" column="POST"/>
- <result property="remark" column="REMARK"/>
- </resultMap>
- <resultMap id="selectALL" type="com.runzhixing.bean.SelectALL">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- </resultMap>
-
- <!-- sql配置文件 -->
- <!-- 查询指定加气站-->
- <select id="getCNGStation" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="stationALL">
- select
- STATIONNO,
- STATIONNAME,
- STATIONAB,
- LICENCE,
- LICENCEORG,
- LICENCEDATE,
- VALIDITY,
- STATIONADDR,
- MANAGER,
- TECHMANA,
- PHONE,
- MOBILE,
- FAX,
- ADDR,
- POST,
- REMARK
- from tb_cngstation t
- <where>
- <if test="cpstring1 != null and !"".equals(cpstring1.trim())">
- and t.stationno like '' || #{cpstring1} || '%'
- </if>
- </where>
- </select>
- <select id="selectALL" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="selectALL">
- (select
- STATIONNO as id,
- STATIONNAME as name
- from tb_cngstation t
- <where>
- <if test="cpstring1 != null and !"".equals(cpstring1.trim())">
- and t.stationno like '' || #{cpstring1} || '%'
- </if>
- </where>
- )
- UNION ALL
- (
- select
- STATIONNO as id,
- STATIONNAME as name
- from tb_checkstation t1
- <where>
- <if test="cpstring1 != null and !"".equals(cpstring1.trim())">
- and t1.stationno like '%' || #{cpstring1} || '%'
- </if>
- </where>
- )
- UNION ALL
- (
- select
- STATIONNO as id,
- STATIONNAME as name
- from tb_installstation t2
- <where>
- <if test="cpstring1 != null and !"".equals(cpstring1.trim())">
- and t2.stationno like '%' || #{cpstring1} || '%'
- </if>
- </where>
- )
-
-
-
- </select>
- <select id="getStationListByType" resultType="com.runzhixing.bean.HiddenCoutry">
- select
- STATIONNO as id,
- STATIONNAME as name
- from tb_cngstation
- <where>
- <if test="regionNo != null and !"".equals(regionNo.trim())">
- and STATIONNO like '' || #{regionNo} || '%'
- </if>
- <if test="type != null">
- and MEDIA = #{type}
- </if>
- </where>
- </select>
- </mapper>
|