|
|
|
@ -133,26 +133,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
sf1.factory_name carName,
|
|
|
|
|
sf.factory_code machineCode,
|
|
|
|
|
sf.factory_name machineName,
|
|
|
|
|
pow.order_code orderCode,
|
|
|
|
|
pow.product_code productCode,
|
|
|
|
|
pow.product_name productName,
|
|
|
|
|
mrw.product_code productCode,
|
|
|
|
|
mrw.product_name productName,
|
|
|
|
|
mrw.quantity,
|
|
|
|
|
mrw.quantity_feedback quantityFeedback,
|
|
|
|
|
mrw.spec productSpc,
|
|
|
|
|
mrw.unit
|
|
|
|
|
from mes_report_work mrw
|
|
|
|
|
left join pro_order_workorder pow on mrw.workorder_code = pow.workorder_code
|
|
|
|
|
left join sys_factory sf on sf.factory_code = pow.prod_line_code <!--线体-->
|
|
|
|
|
left join sys_factory sf on sf.factory_code = mrw.machine_code <!--线体-->
|
|
|
|
|
left join sys_factory sf1 on sf.parent_id = sf1.factory_id <!--车间-->
|
|
|
|
|
left join sys_factory sf2 on sf1.parent_id = sf2.factory_id <!--工厂-->
|
|
|
|
|
where 1=1
|
|
|
|
|
where
|
|
|
|
|
1=1
|
|
|
|
|
<if test="machineName != null and machineName != ''">and sf.factory_name like concat('%', #{machineName}, '%')</if>
|
|
|
|
|
<if test="carName != null and carName != ''">and sf1.factory_name like concat('%', #{carName}, '%')</if>
|
|
|
|
|
<if test="factoryName != null and factoryName != ''">and sf2.factory_name like concat('%', #{factoryName}, '%')</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="orderCode != null and orderCode != ''">and pow.order_code like concat('%', #{orderCode}, '%')</if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="productDateStart != null "> and CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}</if>
|
|
|
|
|
<if test="productDateEnd != null "> and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)</if>
|
|
|
|
|
</select>
|
|
|
|
|