|
|
|
@ -303,10 +303,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where
|
|
|
|
|
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
|
|
|
|
|
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
|
|
|
|
|
and parent_order = '0'
|
|
|
|
|
and parent_order = '0' and del_flag = '0'
|
|
|
|
|
)mrw
|
|
|
|
|
group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getDayOfMonthDatas" resultType="com.op.mes.domain.MesReportProduction">
|
|
|
|
|
select mrw.nameDate,
|
|
|
|
|
mrw.feedbackTime,
|
|
|
|
|
sum(mrw.quantity) quantity
|
|
|
|
|
from(
|
|
|
|
|
select
|
|
|
|
|
CONVERT(varchar(10),feedback_time, 120) nameDate,
|
|
|
|
|
CONVERT(varchar(10),feedback_time, 120) feedbackTime,
|
|
|
|
|
quantity_feedback quantity
|
|
|
|
|
from mes_report_work
|
|
|
|
|
where
|
|
|
|
|
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
|
|
|
|
|
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
|
|
|
|
|
and parent_order = '0' and del_flag = '0'
|
|
|
|
|
)mrw
|
|
|
|
|
group by mrw.nameDate,mrw.feedbackTime
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getLineChartsNames" resultType="java.lang.String">
|
|
|
|
|
select
|
|
|
|
|
distinct mrw.product_name productName
|
|
|
|
@ -702,6 +719,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where product_code = #{productCode}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getLineProData" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
|
select * from(
|
|
|
|
|
select pow.workorder_name,
|
|
|
|
|
sum(pow.quantity_split) quantitySplit,
|
|
|
|
|
be.equipment_name machineName
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
left join base_equipment be on be.equipment_code = pow.workorder_name
|
|
|
|
|
where pow.product_date = #{productDate} and pow.parent_order = '0' and pow.del_flag='0' and pow.workorder_name is not null
|
|
|
|
|
GROUP BY pow.workorder_name,be.equipment_name
|
|
|
|
|
) t
|
|
|
|
|
order by t.quantitySplit desc
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getProductProData" resultType="com.op.mes.domain.MesReportWork">
|
|
|
|
|
select pow.product_code productCode,
|
|
|
|
|
sum(pow.quantity_split) quantitySplit,
|
|
|
|
|
pow.product_name productName
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
where pow.product_date = CONVERT(DATE, GETDATE()) and pow.parent_order = '0' and pow.del_flag='0'
|
|
|
|
|
GROUP BY pow.product_code,pow.product_name
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertMesReportWork" parameterType="MesReportWork">
|
|
|
|
|
insert into mes_report_work
|
|
|
|
|