| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.tofly.feesapi.yhgl.mapper.YhBtLogMapper">
- <!--获取用户最大ID -->
- <select id="selectMaxId" resultType="int">
- select nvl(max(to_number(bh)), 0) bh
- from yh_bt_log
- </select>
- <select id="selectDaCustomerBtPage" resultType="com.tofly.feesapi.yhgl.entity.vo.YhBtLogSelect">
- select * from (
- select a.*,
- cbpq.cbpqmc as sscbpqname,
- cbb.cbbmc as sscbbname,
- (select LISTAGG(File_NEW_FN,',') WITHIN GROUP (ORDER BY TABLE_BH) from sys_upfiles files where files.table_bh=a.bh ) as fileurl
- from yh_bt_log a
- left join bm_cbpq cbpq on a.sscbpq=cbpq.cbpqbm
- left join bm_cbb cbb on a.sscbb=cbb.cbbbm
- where 1=1
- <!--模糊查询 -->
- <if test="filter.searchText != null and filter.searchText != ''">
- and ( a.yhbh like '%${filter.searchText}%' or
- a.yhxm like '%${filter.searchText}%' or
- a.yhdz like '%${filter.searchText}%' or
- a.btdh like '%${filter.searchText}%' )
- </if>
- <!--公司 -->
- <if test="filter.ssgs !=null and filter.ssgs!='' and filter.ssgs!='all'">
- and a.ssgs=#{filter.ssgs}
- </if>
- <!--片区 -->
- <if test="filter.sscbpq !=null and filter.sscbpq!='' and filter.sscbpq!='all' ">
- and a.sscbpq=#{filter.sscbpq}
- </if>
- <!--抄表本 -->
- <if test="filter.sscbb !=null and filter.sscbb!='' and filter.sscbb!='all'">
- and a.sscbb=#{filter.sscbb}
- </if>
- <if test="filter.qyfzr!=null">
- and a.sscbb in(select cbbbm from bm_cbb where qyfzr=#{filter.qyfzr})
- </if>
- <!--报停时间-->
- <if test="filter.ksrq!=null and filter.ksrq!='' and filter.jsrq!=null and filter.jsrq!='' ">
- and a.btsj between to_date(#{filter.ksrq},'yyyy-mm-dd hh24:mi:ss') and
- to_date(#{filter.jsrq},'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="filter.czry!=null and filter.czry!=''">
- and a.czrybm=#{filter.czry}
- </if>
- )
- </select>
- <resultMap id="yhBtLogMap" type="com.tofly.feesapi.yhgl.entity.YhBtLog">
- <id property="bh" column="BH"/>
- <result property="ssgs" column="SSGS"/>
- <result property="sscbpq" column="SSCBPQ"/>
- <result property="sscbb" column="SSCBB"/>
- <result property="czrq" column="CZRQ"/>
- <result property="yhbh" column="YHBH"/>
- <result property="yhdz" column="YHDZ"/>
- <result property="yhxm" column="YHXM"/>
- <result property="btsqr" column="BTSQR"/>
- <result property="btdh" column="BTDH"/>
- <result property="btsj" column="BTSJ"/>
- <result property="bz" column="BZ"/>
- <result property="czrybm" column="CZRYBM"/>
- <result property="czryxm" column="CZRYXM"/>
- <result property="hfysbz" column="HFYSBZ"/>
- <result property="hfbtsj" column="HFBTSJ"/>
- </resultMap>
- </mapper>
|