|
|
|
@ -22,32 +22,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="groupId" column="group_id" />
|
|
|
|
|
<result property="materialCode" column="material_code" />
|
|
|
|
|
<result property="sampleNum" column="sample_num" />
|
|
|
|
|
</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 from qc_check_type_project
|
|
|
|
|
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 from qc_check_type_project
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckTypeProjectList" parameterType="QcCheckTypeProject" resultMap="QcCheckTypeProjectResult">
|
|
|
|
|
<include refid="selectQcCheckTypeProjectVo"/>
|
|
|
|
|
SELECT
|
|
|
|
|
ctp.id,
|
|
|
|
|
ctp.project_id,
|
|
|
|
|
cp.rule_name ruleName,
|
|
|
|
|
cp.property_code propertyCode,
|
|
|
|
|
ctp.type_id,
|
|
|
|
|
ctp.standard_value,
|
|
|
|
|
ctp.upper_diff,
|
|
|
|
|
ctp.down_diff,
|
|
|
|
|
ctp.sample,
|
|
|
|
|
ctp.status,
|
|
|
|
|
ctp.create_by,
|
|
|
|
|
ctp.create_time,
|
|
|
|
|
ctp.update_by,
|
|
|
|
|
ctp.update_time,
|
|
|
|
|
ctp.factory_code,
|
|
|
|
|
ctp.del_flag,
|
|
|
|
|
ctp.group_id,
|
|
|
|
|
ctp.material_code,
|
|
|
|
|
ctp.sample_num
|
|
|
|
|
FROM qc_check_type_project ctp
|
|
|
|
|
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id AND cp.del_flag = '0'
|
|
|
|
|
<where>
|
|
|
|
|
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
|
|
|
|
|
<if test="typeId != null and typeId != ''"> and type_id = #{typeId}</if>
|
|
|
|
|
<if test="standardValue != null "> and standard_value = #{standardValue}</if>
|
|
|
|
|
<if test="upperDiff != null "> and upper_diff = #{upperDiff}</if>
|
|
|
|
|
<if test="downDiff != null "> and down_diff = #{downDiff}</if>
|
|
|
|
|
<if test="sample != null "> and sample = #{sample}</if>
|
|
|
|
|
AND ctp.del_flag = '0'
|
|
|
|
|
<if test="projectId != null and projectId != ''"> and ctp.project_id = #{projectId}</if>
|
|
|
|
|
<if test="typeId != null and typeId != ''"> and ctp.type_id = #{typeId}</if>
|
|
|
|
|
<if test="standardValue != null "> and ctp.standard_value = #{standardValue}</if>
|
|
|
|
|
<if test="upperDiff != null "> and ctp.upper_diff = #{upperDiff}</if>
|
|
|
|
|
<if test="downDiff != null "> and ctp.down_diff = #{downDiff}</if>
|
|
|
|
|
<if test="sample != null "> and ctp.sample = #{sample}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
|
|
|
<if test="sampleNum != null and sampleNum != ''"> and sample_num = #{sampleNum}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckTypeProjectById" parameterType="String" resultMap="QcCheckTypeProjectResult">
|
|
|
|
|
<include refid="selectQcCheckTypeProjectVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
SELECT
|
|
|
|
|
ctp.id,
|
|
|
|
|
ctp.project_id,
|
|
|
|
|
cp.rule_name ruleName,
|
|
|
|
|
cp.property_code propertyCode,
|
|
|
|
|
ctp.type_id,
|
|
|
|
|
ctp.standard_value,
|
|
|
|
|
ctp.upper_diff,
|
|
|
|
|
ctp.down_diff,
|
|
|
|
|
ctp.sample,
|
|
|
|
|
ctp.status,
|
|
|
|
|
ctp.create_by,
|
|
|
|
|
ctp.create_time,
|
|
|
|
|
ctp.update_by,
|
|
|
|
|
ctp.update_time,
|
|
|
|
|
ctp.factory_code,
|
|
|
|
|
ctp.del_flag,
|
|
|
|
|
ctp.group_id,
|
|
|
|
|
ctp.material_code,
|
|
|
|
|
ctp.sample_num
|
|
|
|
|
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}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getTPByTypeMaterial" resultType="com.op.quality.domain.QcCheckTaskDetail">
|
|
|
|
|
select qctp.project_id projectId,
|
|
|
|
@ -110,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
|
<if test="groupId != null">group_id,</if>
|
|
|
|
|
<if test="materialCode != null">material_code,</if>
|
|
|
|
|
<if test="sampleNum != null">sample_num</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
@ -129,6 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
<if test="groupId != null">#{groupId},</if>
|
|
|
|
|
<if test="materialCode != null">#{materialCode},</if>
|
|
|
|
|
<if test="sampleNum != null">#{sampleNum}</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -151,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="groupId != null">group_id = #{groupId},</if>
|
|
|
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
|
|
|
<if test="sampleNum != null">sample_num = #{sampleNum}</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|