ganzi-api/inventory-dao/src/main/resources/mapper/ex/ExStandardMapper.xml

57 lines
2.4 KiB
XML
Raw Normal View History

2024-04-01 16:01:32 +08:00
<?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" />
2024-04-01 17:30:43 +08:00
<result column="PerformClassName" property="performName" />
2024-04-01 16:01:32 +08:00
<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>
2024-04-01 17:30:43 +08:00
<!--普通评分标准-->
<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 lf.`PerformClassName`, es.*
FROM ex_standard es
LEFT JOIN `listperform` lf ON es.`perform_id` = lf.`ListPerformId`
WHERE es.`item_type` = #{itemType}
AND es.`examine_state` = #{examineState}
AND es.`examine_id` = #{examineId}
<if test="null != performId and '' != performId">
AND es.`perform_id` = #{performId}
</if>
ORDER BY es.`sort_id` ASC
</select>
2024-04-01 16:01:32 +08:00
</mapper>