You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.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="org.dromara.qms.mapper.QcInspectionResultMapper">
<resultMap type="QcInspectionResult" id="QcInspectionResultResult">
<result property="resultId" column="result_id" />
<result property="tenantId" column="tenant_id" />
<result property="inspectionId" column="inspection_id" />
<result property="itemId" column="item_id" />
<result property="detectResult" column="detect_result" />
<result property="detectValue" column="detect_value" />
<result property="specInspection" column="spec_inspection" />
<result property="problemDetail" column="problem_detail" />
<result property="createDept" column="create_dept" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectQcInspectionResultVo">
select result_id, tenant_id, inspection_id, item_id, detect_result, detect_value, spec_inspection, problem_detail, create_dept, create_by, create_time, update_by, update_time, del_flag
from qc_inspection_result
</sql>
<select id="selectQcInspectionResultList" parameterType="QcInspectionResult" resultMap="QcInspectionResultResult">
<include refid="selectQcInspectionResultVo"/>
<where>
<if test="resultId != null "> and result_id = #{resultId}</if>
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
<if test="itemId != null "> and item_id = #{itemId}</if>
<if test="detectResult != null "> and detect_result = #{detectResult}</if>
<if test="detectValue != null "> and detect_value = #{detectValue}</if>
<if test="specInspection != null and specInspection != ''"> and spec_inspection = #{specInspection}</if>
<if test="problemDetail != null and problemDetail != ''"> and problem_detail = #{problemDetail}</if>
</where>
</select>
<select id="selectQcInspectionResultByResultId" parameterType="Long" resultMap="QcInspectionResultResult">
<include refid="selectQcInspectionResultVo"/>
where result_id = #{resultId}
</select>
</mapper>