|
|
|
@ -89,48 +89,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select
|
|
|
|
|
pow.product_date productDate,
|
|
|
|
|
pow.order_code orderCode,
|
|
|
|
|
pow.quantity_split quantity,
|
|
|
|
|
pow.quantity_split quantity,
|
|
|
|
|
pow.product_code productCode,
|
|
|
|
|
pow.product_name productName,
|
|
|
|
|
pow.product_spc productSpc,
|
|
|
|
|
prpd.workorder_code workorderCode,
|
|
|
|
|
ps.process_code processCode,
|
|
|
|
|
pow.workorder_code workorderCode,
|
|
|
|
|
ps.process_code processCode,
|
|
|
|
|
ps.process_name processName,
|
|
|
|
|
count(0) quantityFeedback,
|
|
|
|
|
'车' unit
|
|
|
|
|
from pro_rfid_process_detail prpd
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_code = prpd.workorder_code
|
|
|
|
|
left join pro_process ps on ps.process_id = prpd.now_process_id
|
|
|
|
|
'车' unit,
|
|
|
|
|
mt.equipmentCode equCode,
|
|
|
|
|
equ.equipment_name equName
|
|
|
|
|
from mes_material_transfer_result mt
|
|
|
|
|
left join base_equipment equ on mt.equipmentCode = equ.equipment_code
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_id = mt.OrderCode
|
|
|
|
|
left join pro_process ps on ps.process_id = mt.now_process_id
|
|
|
|
|
where pow.order_code is not null
|
|
|
|
|
<if test="orderCode != null and orderCode != ''">
|
|
|
|
|
and pow.order_code like concat('%', #{orderCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''">
|
|
|
|
|
and pow.product_code like concat('%', #{productCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productName != null and productName != ''">
|
|
|
|
|
and pow.product_name like concat('%', #{productName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workorderCode != null and workorderCode != ''">
|
|
|
|
|
and pow.workorder_code like concat('%', #{workorderCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productSpc != null and productSpc != ''">
|
|
|
|
|
and pow.product_spc like concat('%', #{productSpc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productDateStart != null "> and CONVERT(varchar(10),prpd.create_time, 120) >= #{productDateStart}</if>
|
|
|
|
|
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),prpd.create_time, 120)</if>
|
|
|
|
|
<if test="orderCode != null and orderCode != ''">
|
|
|
|
|
and pow.order_code like concat('%', #{orderCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productCode != null and productCode != ''">
|
|
|
|
|
and pow.product_code like concat('%', #{productCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productName != null and productName != ''">
|
|
|
|
|
and pow.product_name like concat('%', #{productName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workorderCode != null and workorderCode != ''">
|
|
|
|
|
and pow.workorder_code like concat('%', #{workorderCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equName != null and equName != ''">
|
|
|
|
|
and equ.equipment_name like concat('%', #{equName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="productDateStart != null "> and CONVERT(varchar(10),mt.create_time, 120) >= #{productDateStart}</if>
|
|
|
|
|
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mt.create_time, 120)</if>
|
|
|
|
|
group by
|
|
|
|
|
pow.order_code,
|
|
|
|
|
pow.product_date,
|
|
|
|
|
pow.product_code,
|
|
|
|
|
pow.product_name,
|
|
|
|
|
pow.product_spc,
|
|
|
|
|
pow.quantity_split,
|
|
|
|
|
prpd.workorder_code,
|
|
|
|
|
prpd.now_process_id,
|
|
|
|
|
ps.process_name,
|
|
|
|
|
ps.process_code
|
|
|
|
|
order by pow.product_date desc,prpd.workorder_code
|
|
|
|
|
pow.order_code,
|
|
|
|
|
pow.product_date,
|
|
|
|
|
pow.product_code,
|
|
|
|
|
pow.product_name,
|
|
|
|
|
pow.product_spc,
|
|
|
|
|
pow.quantity_split,
|
|
|
|
|
pow.workorder_code,
|
|
|
|
|
mt.now_process_id,
|
|
|
|
|
ps.process_name,
|
|
|
|
|
ps.process_code,
|
|
|
|
|
mt.equipmentCode,
|
|
|
|
|
equ.equipment_name
|
|
|
|
|
order by pow.product_date desc,pow.workorder_code
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getProductionList" resultType="com.op.mes.domain.MesReportProduction">
|
|
|
|
|
select sf2.factory_code factoryCode,
|
|
|
|
|