111 lines
4.7 KiB
XML
111 lines
4.7 KiB
XML
<?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.rzyc.mapper.ex.ExStandardMapper">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.ex.ExStandard">
|
|
<id column="standard_id" property="standardId" />
|
|
<result column="examine_id" property="examineId" />
|
|
<result column="title" property="title" />
|
|
<result column="score" property="score" />
|
|
<result column="item_id" property="itemId" />
|
|
<result column="item_path" property="itemPath" />
|
|
<result column="perform_id" property="performId" />
|
|
<result column="PerformClassName" property="performName" />
|
|
<result column="examine_state" property="examineState" />
|
|
<result column="item_type" property="itemType" />
|
|
<result column="sort_id" property="sortId" />
|
|
<result column="del_state" property="delState" />
|
|
<result column="create_time" property="createTime" />
|
|
<result column="create_by" property="createBy" />
|
|
<result column="modify_time" property="modifyTime" />
|
|
<result column="modify_by" property="modifyBy" />
|
|
</resultMap>
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
standard_id, examine_id,title, score, item_id, item_path, perform_id, examine_state,
|
|
item_type, sort_id, del_state, create_time, create_by, modify_time, modify_by
|
|
</sql>
|
|
|
|
<!--普通评分标准-->
|
|
<select id="standardList" resultMap="BaseResultMap">
|
|
SELECT es.* FROM ex_standard es
|
|
WHERE es.`item_type` = #{itemType}
|
|
AND es.`examine_state` = #{examineState}
|
|
AND es.`examine_id` = #{examineId}
|
|
ORDER BY es.`sort_id` ASC
|
|
|
|
</select>
|
|
|
|
<!--部门普通评分标准-->
|
|
<select id="unitStandardList" resultMap="BaseResultMap">
|
|
|
|
SELECT
|
|
es.*,sc.`socre_id`,sc.`socre_num`,sc.`opinion`,
|
|
sf.`file_id`,sf.`file_name`,sf.`file_path`,sf.`remarks`
|
|
FROM ex_standard es
|
|
LEFT JOIN `ex_score` sc ON es.`standard_id` = sc.`standard_id`
|
|
AND sc.`perform_id` = #{performId}
|
|
LEFT JOIN `ex_score_file` sf ON sc.`socre_id` = sf.`socre_id`
|
|
WHERE es.`item_type` = #{itemType}
|
|
AND es.`examine_state` = #{examineState}
|
|
AND es.`examine_id` = #{examineId}
|
|
AND (es.`perform_id` = #{performId} OR es.`perform_id` IS NULL OR es.`perform_id` = '')
|
|
ORDER BY es.`sort_id` ASC;
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="UnitStandardResultMap" type="com.rzyc.bean.ex.vo.StandardInfo">
|
|
<id column="standard_id" property="standardId" />
|
|
<result column="examine_id" property="examineId" />
|
|
<result column="title" property="title" />
|
|
<result column="score" property="score" />
|
|
<result column="item_id" property="itemId" />
|
|
<result column="item_path" property="itemPath" />
|
|
<result column="perform_id" property="performId" />
|
|
<result column="PerformClassName" property="performName" />
|
|
<result column="examine_state" property="examineState" />
|
|
<result column="item_type" property="itemType" />
|
|
<result column="sort_id" property="sortId" />
|
|
<result column="del_state" property="delState" />
|
|
<result column="socre_id" property="socreId" />
|
|
<result column="socre_num" property="socreNum" />
|
|
<result column="opinion" property="opinion" />
|
|
<collection property="scoreFiles" ofType="com.rzyc.model.ex.ExScoreFile" column="socre_id">
|
|
<result column="file_id" property="fileId" />
|
|
<result column="file_name" property="fileName" />
|
|
<result column="file_path" property="filePath" />
|
|
<result column="remarks" property="remarks" />
|
|
<result column="socre_id" property="socreId" />
|
|
</collection>
|
|
</resultMap>
|
|
|
|
<!--标准评分信息-->
|
|
<select id="standardScoreList" resultMap="UnitStandardResultMap">
|
|
SELECT
|
|
es.*,sc.`socre_id`,sc.`socre_num`,sc.`opinion`,
|
|
sf.`file_id`,sf.`file_name`,sf.`file_path`,sf.`remarks`
|
|
FROM ex_standard es
|
|
LEFT JOIN `ex_score` sc ON es.`standard_id` = sc.`standard_id`
|
|
AND sc.`perform_id` = #{performId}
|
|
LEFT JOIN `ex_score_file` sf ON sc.`socre_id` = sf.`socre_id`
|
|
WHERE es.`examine_state` = #{examineState}
|
|
<if test="null != itemType">
|
|
AND es.`item_type` = #{itemType}
|
|
</if>
|
|
AND es.`examine_id` = #{examineId}
|
|
AND (es.`perform_id` = #{performId} OR es.`perform_id` IS NULL OR es.`perform_id` = '')
|
|
ORDER BY es.`sort_id` ASC;
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|