|
|
|
@ -56,16 +56,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
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="standardValue != null and standardValue != ''"> and ctp.standard_value like concat('%', #{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>
|
|
|
|
|
<if test="status != null and status != ''"> and ctp.status = #{status}</if>
|
|
|
|
|
<if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and ctp.material_code = #{materialCode}</if>
|
|
|
|
|
<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>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -95,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
WHERE ctp.del_flag ='0' AND ctp.id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getTPByTypeMaterial" resultType="com.op.quality.domain.QcCheckTaskDetail">
|
|
|
|
|
select qctp.project_id projectId,
|
|
|
|
|
select qctp.id typeProjectId,
|
|
|
|
|
qctp.project_id projectId,
|
|
|
|
|
qctp.project_no projectNo,
|
|
|
|
|
qctp.standard_value standardValue,
|
|
|
|
|
qctp.upper_diff upperDiff,
|
|
|
|
@ -106,16 +106,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
qcp.property_code propertyCode,
|
|
|
|
|
qcp.check_tool checkTool,
|
|
|
|
|
qcp.unit_code unitCode,
|
|
|
|
|
qcp.check_mode checkMode,
|
|
|
|
|
qcp.check_standard checkStandard
|
|
|
|
|
qcp.check_mode checkMode
|
|
|
|
|
<!--,qcp.check_standard checkStandard-->
|
|
|
|
|
from qc_check_type_project qctp
|
|
|
|
|
left join qc_check_project qcp on qcp.id = qctp.project_id
|
|
|
|
|
where qctp.del_flag = '0' and qctp.status = '0'
|
|
|
|
|
and qctp.material_code = #{materialCode}
|
|
|
|
|
and qctp.type_id = #{typeId}
|
|
|
|
|
order by qctp.sort
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getTPByTypeGroup" resultType="com.op.quality.domain.QcCheckTaskDetail">
|
|
|
|
|
select qctp.project_id projectId,
|
|
|
|
|
select qctp.id typeProjectId,
|
|
|
|
|
qctp.project_id projectId,
|
|
|
|
|
qctp.project_no projectNo,
|
|
|
|
|
qctp.standard_value standardValue,
|
|
|
|
|
qctp.upper_diff upperDiff,
|
|
|
|
@ -126,12 +128,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
qcp.property_code propertyCode,
|
|
|
|
|
qcp.check_tool checkTool,
|
|
|
|
|
qcp.unit_code unitCode,
|
|
|
|
|
qcp.check_mode checkMode,
|
|
|
|
|
qcp.check_standard checkStandard
|
|
|
|
|
qcp.check_mode checkMode
|
|
|
|
|
<!--,qcp.check_standard checkStandard-->
|
|
|
|
|
from qc_check_type_project qctp
|
|
|
|
|
left join qc_check_project qcp on qcp.id = qctp.project_id
|
|
|
|
|
where qctp.del_flag = '0' and qctp.status = '0'
|
|
|
|
|
and qctp.group_id = #{groupId}
|
|
|
|
|
and qctp.type_id = #{typeId}
|
|
|
|
|
order by qctp.sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -155,7 +158,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>
|
|
|
|
|
<if test="sampleNum != null">sample_num,</if>
|
|
|
|
|
<if test="projectNo != null">project_no</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
@ -176,6 +179,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>
|
|
|
|
|
<if test="projectNo != null">#{projectNo}</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
@ -199,7 +203,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>
|
|
|
|
|
<if test="sampleNum != null">sample_num = #{sampleNum},</if>
|
|
|
|
|
<if test="projectNo != null">project_no = #{projectNo}</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|