|
@@ -6,10 +6,10 @@
|
|
|
<resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationWarningRule">
|
|
|
<id column="id" property="id" />
|
|
|
<result column="bin_section" property="binSection" />
|
|
|
- <result column="indicator_id" property="binStage" />
|
|
|
+ <result column="indicator_code" property="indicatorCode" />
|
|
|
<result column="indicator_info" property="indicatorInfo" />
|
|
|
<result column="bin_stage" property="binStage" />
|
|
|
- <result column="rule" property="rule" />
|
|
|
+ <result column="expression" property="expression" />
|
|
|
<result column="grade" property="grade" />
|
|
|
<result column="rule_name" property="ruleName" />
|
|
|
<result column="rule_des" property="ruleDes" />
|
|
@@ -18,38 +18,33 @@
|
|
|
<result column="create_time" property="createTime" />
|
|
|
<result column="update_time" property="updateTime" />
|
|
|
<result column="enable" property="enable" />
|
|
|
+ <result column="type" property="type" />
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
<select id="selectWarningRule" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
er.*,
|
|
|
-
|
|
|
+ bs.section_name,
|
|
|
+ bs.section_code,
|
|
|
+ s.stage_name,
|
|
|
+ s.stage_code
|
|
|
FROM
|
|
|
evaluation_warning_rule er
|
|
|
- LEFT JOIN evaluation_portal_attach ea ON ep.id = ea.portal_id
|
|
|
- LEFT JOIN bin_section bs ON ep.bin_section = bs.section_code
|
|
|
+ LEFT JOIN bin_section bs ON bs.id = er.bin_section
|
|
|
+ LEFT JOIN bin_stage s ON s.id = er.bin_stage
|
|
|
+ LEFT JOIN indicator i ON i.id = er.indicator_id
|
|
|
<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}
|
|
|
+ AND er.bin_section = #{binSection}
|
|
|
</if>
|
|
|
-
|
|
|
- <if test="season ==null">
|
|
|
- AND ep.season is null
|
|
|
+ <if test="ruleName !=null and ruleName !=''">
|
|
|
+ AND er.rule_name like concat('%',#{ruleName},'%');
|
|
|
</if>
|
|
|
|
|
|
</where>
|
|
|
|
|
|
- ORDER BY SCORE DESC
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
|