| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?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.cbgl.mapper.ZnbZlLogMapper">
- <sql id="querySql">
- SELECT a.*, d.yhxm, d.yhdz, g.cbpqmc AS sscbpqmc, f.cbbmc AS sscbbbm, e.name AS sccjmc
- FROM znb_zl_log a
- LEFT JOIN yh_khjbxx d on a.yhbh = d.yhbh
- LEFT JOIN bm_sbsccj e on a.sccj = e.code
- LEFT JOIN bm_cbb f on d.sscbb = f.cbbbm
- LEFT JOIN bm_cbpq g on d.sscbpq = g.cbpqbm
- WHERE 1=1
- <!--模糊查询 -->
- <if test="filter.searchText!=null">
- AND (a.yhbh like '%${filter.searchText}%'
- OR d.yhxm like '%${filter.searchText}%'
- OR d.yhdz like '%${filter.searchText}%')
- </if>
- <!--所属公司-->
- <if test="filter.ssgs!=null">
- AND d.ssgs=#{filter.ssgs}
- </if>
- <!--所属片区-->
- <if test="filter.sscbpq!=null">
- AND d.sscbpq=#{filter.sscbpq}
- </if>
- <!--所属抄表本-->
- <if test="filter.sscbb!=null">
- <choose>
- <when test="filter.sscbb.indexOf(',')!=-1">
- AND d.sscbb in
- <foreach item="item" index="index" collection="filter.sscbb.split(',')" open="(" separator=","
- close=")">
- #{item}
- </foreach>
- </when>
- <otherwise>
- AND d.sscbb=#{filter.sscbb}
- </otherwise>
- </choose>
- </if>
- <!--生产厂家-->
- <if test="filter.sscj!=null">
- AND a.sscj=#{filter.sscj}
- </if>
- <!-- 操作时间-->
- <if test="filter.czsjStart!=null and filter.czsjEnd!=null">
- AND a.czsj BETWEEN #{filter.czsjStart} AND
- #{filter.czsjEnd}
- </if>
- <!--处理结果-->
- <if test="filter.clCljg!=null">
- AND a.cl_cljg=#{filter.clCljg}
- </if>
- <!--锁定标志-->
- <if test="filter.clLock!=null">
- AND a.cl_lock=#{filter.clLock}
- </if>
- <!--指令类型编码-->
- <if test="filter.zltype!=null">
- AND a.zltype=#{filter.zlType}
- </if>
- </sql>
- <select id="getPage" resultType="com.tofly.feesapi.cbgl.entity.vo.ZnbZlLogSelect">
- <include refid="querySql"></include>
- </select>
- <select id="getList" resultType="com.tofly.feesapi.cbgl.entity.vo.ZnbZlLogSelect">
- <include refid="querySql"></include>
- </select>
- </mapper>
|