You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.4 KiB
65 lines
2.4 KiB
<?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.kms.yg.sz.mapper.BsSgcSzDsjMapper">
|
|
|
|
<sql id="info">
|
|
select sd.id,sd. waga_code,sd. waga_name,sd.year,sd. highest_level, sd.discharge_volume,
|
|
sd.abnormal_condition, sd.conclusion, sd.Supervise,
|
|
sj.adcd
|
|
from bs_sgc_sz_dsj sd
|
|
left join att_waga_base sj on sd.waga_code = sj.WAGA_CODE
|
|
|
|
</sql>
|
|
|
|
<resultMap id="col" type="BsSgcSzDsj">
|
|
<id property="id" column="id"/>
|
|
<result property="wagaCode" column="waga_code"/>
|
|
<result property="wagaName" column="waga_name"/>
|
|
<result property="year" column="year"/>
|
|
<result property="adcd" column="adcd"/>
|
|
<result property="highestLevel" column="highest_level"/>
|
|
<result property="dischargeVolume" column="discharge_volume"/>
|
|
<result property="abnormalCondition" column="abnormal_condition"/>
|
|
<result property="conclusion" column="conclusion"/>
|
|
<result property="Supervise" column="Supervise"/>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="getList" resultMap="col">
|
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
|
|
<include refid="info"></include>
|
|
<where>
|
|
<if test="wagaName!=null and wagaName!=''">
|
|
and sj.WAGA_NAME LIKE concat('%',#{wagaName},'%')
|
|
</if>
|
|
<if test="wagaCode != null and wagaCode != ''">
|
|
and sj.WAGA_CODE = #{wagaCode}
|
|
</if>
|
|
<if test="adcd!=null and adcd !=''">
|
|
and sj.adcd like concat(#{adcd},'%')
|
|
</if>
|
|
and sj.EXPR_DATE is null
|
|
</where>
|
|
order by sd.create_time desc LIMIT #{pageNum},#{pageSize};
|
|
</select>
|
|
|
|
<select id="getCount" resultMap="col">
|
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
|
|
<include refid="info"></include>
|
|
<where>
|
|
<if test="wagaName!=null and wagaName!=''">
|
|
and sj.WAGA_NAME LIKE concat('%',#{wagaName},'%')
|
|
</if>
|
|
<if test="wagaCode != null and wagaCode != ''">
|
|
and sj.WAGA_CODE = #{wagaCode}
|
|
</if>
|
|
<if test="adcd!=null and adcd !=''">
|
|
and sj.adcd like concat(#{adcd},'%')
|
|
</if>
|
|
and sj.EXPR_DATE is null
|
|
</where>
|
|
</select>
|
|
</mapper>
|
|
|