|
|
|
@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
product_date incomeTime,
|
|
|
|
|
status
|
|
|
|
|
from pro_order_workorder
|
|
|
|
|
where status != 'w5' and parent_order != '0' and workorder_code_sap is not null
|
|
|
|
|
where status != 'w5' and parent_order = '0' and workorder_code_sap is not null
|
|
|
|
|
<if test="orderNo != null">and workorder_code_sap like concat ('%',#{orderNo},'%')</if>
|
|
|
|
|
order by product_date desc
|
|
|
|
|
</select>
|
|
|
|
@ -178,6 +178,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="requestid != null">#{requestid},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="repeatCheckTask">
|
|
|
|
|
insert into qc_check_task(
|
|
|
|
|
record_id,check_no,income_batch_no,order_no,
|
|
|
|
|
material_code,material_name,quality,unit,
|
|
|
|
|
supplier_code,supplier_name,income_time,
|
|
|
|
|
check_status,
|
|
|
|
|
create_by,create_time,factory_code,del_flag,
|
|
|
|
|
check_type,noOk_quality,sample_quality,type_code,order_type
|
|
|
|
|
)
|
|
|
|
|
select
|
|
|
|
|
#{recordId},check_no,income_batch_no ,order_no ,
|
|
|
|
|
material_code,material_name,quality ,unit ,
|
|
|
|
|
supplier_code,supplier_name,income_time,
|
|
|
|
|
'0',
|
|
|
|
|
#{createBy},#{createTime},factory_code,del_flag,
|
|
|
|
|
check_type,noOk_quality,sample_quality,type_code ,'reCheckCS'
|
|
|
|
|
from qc_check_task where record_id = #{oldBelongTo} and del_flag = '0'
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="repeatCheckTaskDefect">
|
|
|
|
|
insert qc_check_task_defect(
|
|
|
|
|
record_id,
|
|
|
|
|
defect_code,defect_subclass,
|
|
|
|
|
create_by,create_time,
|
|
|
|
|
factory_code,del_flag,
|
|
|
|
|
belong_to,noOk_quality)
|
|
|
|
|
select
|
|
|
|
|
REPLACE(NEWID(), '-',''),
|
|
|
|
|
defect_code,defect_subclass,
|
|
|
|
|
#{createBy},#{createTime},
|
|
|
|
|
factory_code,del_flag,
|
|
|
|
|
#{belongTo},noOk_quality
|
|
|
|
|
from qc_check_task_defect where belong_to = #{oldBelongTo} and del_flag = '0'
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="repeatCheckTaskDetail">
|
|
|
|
|
insert into qc_check_task_detail(
|
|
|
|
|
record_id,belong_to,order_num,rule_name,property_code,
|
|
|
|
|
check_mode,check_tool,unit_code,check_standard,actual_value,
|
|
|
|
|
create_by,create_time,factory_code,del_flag,
|
|
|
|
|
project_id,project_no,type_project_id,defect_code
|
|
|
|
|
)
|
|
|
|
|
select
|
|
|
|
|
REPLACE(NEWID(), '-',''),#{belongTo},order_num,rule_name,property_code,
|
|
|
|
|
check_mode,check_tool,unit_code,check_standard,actual_value,
|
|
|
|
|
#{createBy},#{createTime},factory_code,del_flag,
|
|
|
|
|
project_id,project_no,type_project_id,defect_code
|
|
|
|
|
from qc_check_task_detail where belong_to = #{oldBelongTo} and del_flag = '0'
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="repeatCheckTaskUser">
|
|
|
|
|
insert into qc_check_task_user(
|
|
|
|
|
record_id,check_no,
|
|
|
|
|
check_man_code,check_man_name,
|
|
|
|
|
create_by,create_time,
|
|
|
|
|
factory_code,del_flag,belong_to
|
|
|
|
|
)
|
|
|
|
|
select
|
|
|
|
|
REPLACE(NEWID(), '-',''),check_no,
|
|
|
|
|
check_man_code,check_man_name,
|
|
|
|
|
#{createBy},#{createTime},
|
|
|
|
|
factory_code,del_flag,#{belongTo}
|
|
|
|
|
from qc_check_task_user where belong_to = #{oldBelongTo} and del_flag = '0'
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateQcCheckUnqualified" parameterType="QcCheckUnqualified">
|
|
|
|
|
update qc_check_unqualified
|
|
|
|
|