|
|
|
@ -152,8 +152,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
SELECT
|
|
|
|
|
ctp.id,
|
|
|
|
|
ctp.project_id projectId,
|
|
|
|
|
cp.rule_name ruleName,
|
|
|
|
|
cp.property_code propertyCode,
|
|
|
|
|
qcp.rule_name ruleName,
|
|
|
|
|
qcp.property_code propertyCode,
|
|
|
|
|
ctp.type_id typeId,
|
|
|
|
|
ct.check_name,
|
|
|
|
|
ctp.standard_value standardValue,
|
|
|
|
@ -166,11 +166,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
qcp.check_tool checkTool,
|
|
|
|
|
qcp.check_mode checkMode
|
|
|
|
|
FROM qc_check_type_project ctp
|
|
|
|
|
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id
|
|
|
|
|
LEFT JOIN qc_check_project qcp ON ctp.project_id = qcp.id
|
|
|
|
|
left join qc_check_type ct on ct.id = ctp.type_id
|
|
|
|
|
left join base_product p on p.product_code = ctp.material_code
|
|
|
|
|
<where>
|
|
|
|
|
AND ctp.del_flag = '0' AND cp.del_flag = '0'
|
|
|
|
|
AND ctp.del_flag = '0' AND qcp.del_flag = '0'
|
|
|
|
|
<if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by ctp.type_id
|
|
|
|
@ -231,6 +231,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="sort != null">#{sort},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertQcCheckTypeProjects">
|
|
|
|
|
insert into qc_check_type_project(
|
|
|
|
|
id,project_id,project_no,type_id,
|
|
|
|
|
standard_value,upper_diff,down_diff,unit,
|
|
|
|
|
sample,sort,
|
|
|
|
|
create_by,create_time,
|
|
|
|
|
group_id,material_code,property_code
|
|
|
|
|
)values
|
|
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
|
|
(
|
|
|
|
|
#{item.id},#{item.projectId},#{item.projectNo},#{item.typeId},
|
|
|
|
|
#{item.standardValue},#{item.upperDiff},#{item.downDiff},#{item.unit},
|
|
|
|
|
#{item.sample},#{item.sort},
|
|
|
|
|
#{item.createBy},#{item.createTime},
|
|
|
|
|
#{item.groupId},#{item.materialCode},#{item.propertyCode}
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateQcCheckTypeProject" parameterType="QcCheckTypeProject">
|
|
|
|
|
update qc_check_type_project
|
|
|
|
@ -270,4 +288,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
<select id="getProjectInfoList" resultType="com.op.quality.domain.QcCheckProject">
|
|
|
|
|
select
|
|
|
|
|
id,
|
|
|
|
|
order_num orderNum,
|
|
|
|
|
rule_name ruleName,
|
|
|
|
|
property_code propertyCode,
|
|
|
|
|
check_mode checkMode,
|
|
|
|
|
check_tool checkTool,
|
|
|
|
|
unit_code unitCode,
|
|
|
|
|
check_standard checkStandard,
|
|
|
|
|
sample_plan samplePlan,
|
|
|
|
|
judge ,
|
|
|
|
|
defect_level defectLevel
|
|
|
|
|
from qc_check_project
|
|
|
|
|
where del_flag = '0'
|
|
|
|
|
<if test="ruleName != null">and rule_name like concat('%',#{ruleName},'%') </if>
|
|
|
|
|
and id not in(
|
|
|
|
|
select project_id from qc_check_type_project
|
|
|
|
|
where type_id = #{typeCode}
|
|
|
|
|
<if test="samplePlan != null">and sample_plan = #{samplePlan}</if>
|
|
|
|
|
<if test="materialCode != null">and material_code = #{materialCode} </if>
|
|
|
|
|
)
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|