|
|
@ -187,7 +187,20 @@
|
|
|
|
and mrwc.workorder_code = #{workorderCode}
|
|
|
|
and mrwc.workorder_code = #{workorderCode}
|
|
|
|
and mrw.machine_code = #{machineCode} and mrwc.recoil = #{recoil}
|
|
|
|
and mrw.machine_code = #{machineCode} and mrwc.recoil = #{recoil}
|
|
|
|
) t group by t.materialCode,t.rspos
|
|
|
|
) t group by t.materialCode,t.rspos
|
|
|
|
order by t.rspos desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getSumConsumeListNum" resultType="java.lang.Integer">
|
|
|
|
|
|
|
|
select count(0)+1 from(
|
|
|
|
|
|
|
|
select DISTINCT
|
|
|
|
|
|
|
|
mrwc.material_code materialCode,
|
|
|
|
|
|
|
|
mrwc.quantity,
|
|
|
|
|
|
|
|
mrwc.rspos
|
|
|
|
|
|
|
|
from mes_report_work_consume mrwc
|
|
|
|
|
|
|
|
left join mes_report_work mrw on mrw.report_code = mrwc.report_code
|
|
|
|
|
|
|
|
left join pro_order_workorder pow on mrwc.workorder_code = pow.workorder_code
|
|
|
|
|
|
|
|
where mrwc.del_flag = '0' and pow.del_flag = '0'
|
|
|
|
|
|
|
|
and mrwc.workorder_code = #{workorderCode} and mrwc.rspos is not null
|
|
|
|
|
|
|
|
and mrw.machine_code = #{machineCode}
|
|
|
|
|
|
|
|
)t
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume">
|
|
|
|
<insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume">
|
|
|
|