|
|
@ -110,33 +110,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
where type_code = #{typeCode} and del_flag='0'
|
|
|
|
where type_code = #{typeCode} and del_flag='0'
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="getOrderWorks" resultType="com.op.quality.domain.QcCheckTaskProduce">
|
|
|
|
<select id="getOrderWorks" resultType="com.op.quality.domain.QcCheckTaskProduce">
|
|
|
|
select pow.factory_code factoryCode,
|
|
|
|
select qct.factory_code factoryCode,
|
|
|
|
powb.batch_code incomeBatchNo,
|
|
|
|
qct.order_no workorderCode,
|
|
|
|
powb.qc_status,
|
|
|
|
qct.material_code materialCode,
|
|
|
|
pow.workorder_code workorderCode,
|
|
|
|
qct.material_name materialName,
|
|
|
|
pow.product_code materialCode,
|
|
|
|
qct.quality,
|
|
|
|
pow.product_name materialName,
|
|
|
|
qct.unit,
|
|
|
|
pow.quantity_split quality,
|
|
|
|
qct.supplier_code supplierCode,
|
|
|
|
pow.unit,
|
|
|
|
qct.supplier_name supplierName,
|
|
|
|
e.workshop_code supplierCode,
|
|
|
|
qct.income_time incomeTime,
|
|
|
|
e.workshop_name supplierName,
|
|
|
|
max(qct.create_time) createTime,
|
|
|
|
pow.product_date incomeTime,
|
|
|
|
qct.check_loc checkLoc
|
|
|
|
task.createTime,
|
|
|
|
from qc_check_task qct
|
|
|
|
task.order_no orderNo,
|
|
|
|
left join pro_order_workorder pow on qct.order_no = pow.workorder_code
|
|
|
|
task.check_loc checkLoc
|
|
|
|
where check_type = 'checkTypeSCXJ'
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
|
|
|
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
|
|
|
|
|
|
|
|
left join base_equipment e on e.equipment_code = pow.workorder_name
|
|
|
|
|
|
|
|
left join (
|
|
|
|
|
|
|
|
select max(create_time) createTime,income_batch_no,order_no,check_loc
|
|
|
|
|
|
|
|
from qc_check_task
|
|
|
|
|
|
|
|
where type_code = 'produce'
|
|
|
|
|
|
|
|
and CONVERT(varchar(10),income_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
|
|
|
|
and CONVERT(varchar(10),income_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
|
|
|
|
GROUP BY income_batch_no,order_no,check_loc
|
|
|
|
and pow.status = 'w2'
|
|
|
|
) task on task.income_batch_no = powb.batch_code
|
|
|
|
group by qct.factory_code,
|
|
|
|
where pow.status = 'w2' and pow.parent_order = '0' and pow.del_flag ='0'
|
|
|
|
qct.order_no,qct.material_code,qct.material_name,
|
|
|
|
and powb.del_flag = '0' and pow.product_date >= '2023-12-22'
|
|
|
|
qct.quality,qct.unit,qct.supplier_code,qct.supplier_name,
|
|
|
|
and task.createTime is not null
|
|
|
|
qct.income_time,qct.check_loc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcCheckTaskProduce" parameterType="QcCheckTaskProduce">
|
|
|
|
<insert id="insertQcCheckTaskProduce" parameterType="QcCheckTaskProduce">
|
|
|
|