|
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.op.quality.mapper.QcCheckTypeProjectMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="QcCheckTypeProject" id="QcCheckTypeProjectResult">
|
|
|
|
|
<resultMap type="com.op.quality.domain.QcCheckTypeProject" id="QcCheckTypeProjectResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="projectId" column="project_id" />
|
|
|
|
|
<result property="typeId" column="type_id" />
|
|
|
|
@ -23,11 +23,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="groupId" column="group_id" />
|
|
|
|
|
<result property="materialCode" column="material_code" />
|
|
|
|
|
<result property="sampleNum" column="sample_num" />
|
|
|
|
|
<result property="unit" column="unit" />
|
|
|
|
|
<result property="propertyCode" column="property_code" />
|
|
|
|
|
<result property="ruleName" column="rule_name" />
|
|
|
|
|
<result property="sort" column="sort" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectQcCheckTypeProjectVo">
|
|
|
|
|
select id, project_id, type_id, standard_value, upper_diff, down_diff, sample, status, attr1,
|
|
|
|
|
create_by, create_time, update_by, update_time, factory_code, del_flag, group_id, material_code, sample_num
|
|
|
|
|
create_by, create_time, update_by, update_time, factory_code, del_flag, group_id,
|
|
|
|
|
material_code, sample_num,unit,sort
|
|
|
|
|
from qc_check_type_project
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
@ -35,8 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
SELECT
|
|
|
|
|
ctp.id,
|
|
|
|
|
ctp.project_id,
|
|
|
|
|
cp.rule_name ruleName,
|
|
|
|
|
cp.property_code propertyCode,
|
|
|
|
|
cp.rule_name,
|
|
|
|
|
cp.property_code,
|
|
|
|
|
cp.unit_code unit,
|
|
|
|
|
ctp.type_id,
|
|
|
|
|
ctp.standard_value,
|
|
|
|
|
ctp.upper_diff,
|
|
|
|
@ -51,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
ctp.del_flag,
|
|
|
|
|
ctp.group_id,
|
|
|
|
|
ctp.material_code,
|
|
|
|
|
ctp.sample_num
|
|
|
|
|
ctp.sample_num,
|
|
|
|
|
ctp.sort
|
|
|
|
|
FROM qc_check_type_project ctp
|
|
|
|
|
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id AND cp.del_flag = '0'
|
|
|
|
|
<where>
|
|
|
|
@ -68,14 +75,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="sampleNum != null and sampleNum != ''"> and ctp.sample_num = #{sampleNum}</if>
|
|
|
|
|
<if test="ruleName != null and ruleName != ''"> and cp.rule_name like concat('%', #{ruleName}, '%')</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by ctp.sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckTypeProjectById" parameterType="String" resultMap="QcCheckTypeProjectResult">
|
|
|
|
|
SELECT
|
|
|
|
|
ctp.id,
|
|
|
|
|
ctp.project_id,
|
|
|
|
|
cp.rule_name ruleName,
|
|
|
|
|
cp.property_code propertyCode,
|
|
|
|
|
cp.rule_name,
|
|
|
|
|
cp.property_code,
|
|
|
|
|
ctp.type_id,
|
|
|
|
|
ctp.standard_value,
|
|
|
|
|
ctp.upper_diff,
|
|
|
|
@ -90,7 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
ctp.del_flag,
|
|
|
|
|
ctp.group_id,
|
|
|
|
|
ctp.material_code,
|
|
|
|
|
ctp.sample_num
|
|
|
|
|
ctp.sample_num,
|
|
|
|
|
ctp.sort
|
|
|
|
|
FROM qc_check_type_project ctp
|
|
|
|
|
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id AND cp.del_flag = '0'
|
|
|
|
|
WHERE ctp.del_flag ='0' AND ctp.id = #{id}
|
|
|
|
@ -192,7 +201,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="groupId != null">group_id,</if>
|
|
|
|
|
<if test="materialCode != null">material_code,</if>
|
|
|
|
|
<if test="sampleNum != null">sample_num,</if>
|
|
|
|
|
<if test="projectNo != null">project_no</if>
|
|
|
|
|
<if test="projectNo != null">project_no,</if>
|
|
|
|
|
<if test="unit != null">unit,</if>
|
|
|
|
|
<if test="propertyCode != null">property_code,</if>
|
|
|
|
|
<if test="sort != null">sort,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
@ -213,7 +225,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="groupId != null">#{groupId},</if>
|
|
|
|
|
<if test="materialCode != null">#{materialCode},</if>
|
|
|
|
|
<if test="sampleNum != null">#{sampleNum},</if>
|
|
|
|
|
<if test="projectNo != null">#{projectNo}</if>
|
|
|
|
|
<if test="projectNo != null">#{projectNo},</if>
|
|
|
|
|
<if test="unit != null">#{unit},</if>
|
|
|
|
|
<if test="propertyCode != null">#{propertyCode},</if>
|
|
|
|
|
<if test="sort != null">#{sort},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -238,6 +253,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
|
|
|
<if test="sampleNum != null">sample_num = #{sampleNum},</if>
|
|
|
|
|
<if test="projectNo != null">project_no = #{projectNo}</if>
|
|
|
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
|
|
|
<if test="propertyCode != null">property_code = #{propertyCode},</if>
|
|
|
|
|
<if test="sort != null">sort = #{sort},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|