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.
72 lines
4.9 KiB
XML
72 lines
4.9 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.QcInspectionItemMapper">
|
|
|
|
<resultMap type="QcInspectionItem" id="QcInspectionItemResult">
|
|
<result property="itemId" column="item_id" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
<result property="itemCode" column="item_code" />
|
|
<result property="itemName" column="item_name" />
|
|
<result property="inspectionPosition" column="inspection_position" />
|
|
<result property="categoryId" column="category_id" />
|
|
<result property="inspectionType" column="inspection_type" />
|
|
<result property="method" column="method" />
|
|
<result property="detectType" column="detect_type" />
|
|
<result property="controlType" column="control_type" />
|
|
<result property="standardValue" column="standard_value" />
|
|
<result property="upperLimit" column="upper_limit" />
|
|
<result property="lowerLimit" column="lower_limit" />
|
|
<result property="specName" column="spec_name" />
|
|
<result property="specUpper" column="spec_upper" />
|
|
<result property="specLower" column="spec_lower" />
|
|
<result property="description" column="description" />
|
|
<result property="optionCode" column="option_code" />
|
|
<result property="optionName" column="option_name" />
|
|
<result property="isDefault" column="is_default" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createDept" column="create_dept" />
|
|
<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="selectQcInspectionItemVo">
|
|
select item_id, tenant_id, item_code, item_name, inspection_position, category_id, inspection_type, method, detect_type, control_type, standard_value, upper_limit, lower_limit, spec_name, spec_upper, spec_lower, description, option_code, option_name, is_default, create_by, create_dept, create_time, update_by, update_time, del_flag
|
|
from qc_inspection_item
|
|
</sql>
|
|
|
|
<select id="selectQcInspectionItemList" parameterType="QcInspectionItem" resultMap="QcInspectionItemResult">
|
|
<include refid="selectQcInspectionItemVo"/>
|
|
<where>
|
|
<if test="itemId != null "> and item_id = #{itemId}</if>
|
|
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
|
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
|
<if test="inspectionPosition != null and inspectionPosition != ''"> and inspection_position = #{inspectionPosition}</if>
|
|
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
|
<if test="inspectionType != null "> and inspection_type = #{inspectionType}</if>
|
|
<if test="method != null "> and method = #{method}</if>
|
|
<if test="detectType != null "> and detect_type = #{detectType}</if>
|
|
<if test="controlType != null "> and control_type = #{controlType}</if>
|
|
<if test="standardValue != null "> and standard_value = #{standardValue}</if>
|
|
<if test="upperLimit != null "> and upper_limit = #{upperLimit}</if>
|
|
<if test="lowerLimit != null "> and lower_limit = #{lowerLimit}</if>
|
|
<if test="specName != null and specName != ''"> and spec_name like concat('%', #{specName}, '%')</if>
|
|
<if test="specUpper != null "> and spec_upper = #{specUpper}</if>
|
|
<if test="specLower != null "> and spec_lower = #{specLower}</if>
|
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
<if test="optionCode != null and optionCode != ''"> and option_code = #{optionCode}</if>
|
|
<if test="optionName != null and optionName != ''"> and option_name like concat('%', #{optionName}, '%')</if>
|
|
<if test="isDefault != null and isDefault != ''"> and is_default = #{isDefault}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectQcInspectionItemByItemId" parameterType="Long" resultMap="QcInspectionItemResult">
|
|
<include refid="selectQcInspectionItemVo"/>
|
|
where item_id = #{itemId}
|
|
</select>
|
|
|
|
</mapper>
|