123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.ims.eval.dao.EvaluationPortalMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationPortal">
- <id column="id" property="id" />
- <result column="bin_section" property="binSection" />
- <result column="bin_stage" property="binStage" />
- <result column="bin_property" property="binProperty" />
- <result column="company" property="company" />
- <result column="grade" property="grade" />
- <result column="score" property="score" />
- <result column="base_score" property="baseScore" />
- <result column="year" property="year" />
- <result column="season" property="season" />
- <result column="matter_heigh" property="matterHeigh" />
- <result column="matter_low" property="matterLow" />
- <result column="manage_heigh" property="manageHeigh" />
- <result column="manage_low" property="manageLow" />
- <result column="standard_heigh" property="standardHeigh" />
- <result column="standard_low" property="standardLow" />
- <result column="dept_id" property="deptId" />
- <result column="create_time" property="createTime" />
- <result column="memo1" property="memo1" />
- <result column="memo2" property="memo2" />
- <result column="memo3" property="memo3" />
- <result column="memo4" property="memo4" />
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- id, bin_section, bin_stage, bin_property, company, grade, score, base_score, year, season, matter_heigh, matter_low, manage_heigh, manage_low,
- standard_heigh, standard_low, dept_id, create_time, memo1, memo2, memo3, memo4
- </sql>
- <select id="selectPortalList" resultType="java.util.Map">
- SELECT
- ep.*,
- bs.section_name,
- ea.portal_id,
- ea.matter_heigh_note,
- ea.matter_low_note,
- ea.manage_height_note,
- ea.manage_low_note,
- ea.standard_heigh_note,
- ea.standard_low_note
- FROM
- evaluation_portal ep
- LEFT JOIN evaluation_portal_attach ea ON ep.id = ea.portal_id
- LEFT JOIN bin_section bs ON ep.bin_section = bs.section_code
- <where>
- <if test="binSection !=null and binSection !=''">
- AND ep.bin_section = #{binSection}
- </if>
- <if test="year !=null and year !=''">
- AND ep.year = #{year}
- </if>
- <if test="season !=null and season !=''">
- AND ep.season = #{season}
- </if>
- <if test="season ==null">
- AND ep.season is null
- </if>
- </where>
- ORDER BY SCORE DESC
- </select>
- <select id="selectEvaluationPortalList" resultType="com.ims.eval.entity.EvaluationPortal">
- SELECT
- ep.*
- FROM
- evaluation_portal ep
- <where>
- <if test="binSection !=null and binSection !=''">
- AND ep.bin_section = #{binSection}
- </if>
- <if test="year !=null and year !=''">
- AND ep.year = #{year}
- </if>
- <if test="season !=null and season !=''">
- AND ep.season = #{season}
- </if>
- <if test="season ==null or season ==''">
- AND ep.season is null
- </if>
- <if test="memo1 !=null and memo1 !=''">
- AND ep.memo1 = #{memo1}
- </if>
- </where>
- ORDER BY SCORE DESC
- </select>
- </mapper>
|