生产日报表优化2

master
杨万里 2 months ago
parent 6bc5a28923
commit 3f40e94671

@ -470,6 +470,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
BigDecimal useMan = BigDecimal.ZERO; BigDecimal useMan = BigDecimal.ZERO;
BigDecimal totalWorkTime = BigDecimal.ZERO; BigDecimal totalWorkTime = BigDecimal.ZERO;
//单层订单 //单层订单
if (parentMesReport !=null){
if ("1".equals(parentMesReport.getCegci())){ if ("1".equals(parentMesReport.getCegci())){
sumQua = parentMesReport.getQuantityFeedbackSum(); sumQua = parentMesReport.getQuantityFeedbackSum();
realQua = parentMesReport.getQuantityFeedbackSum(); realQua = parentMesReport.getQuantityFeedbackSum();
@ -552,6 +553,8 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
}else{ }else{
dto.setManAvgDo("0%"); dto.setManAvgDo("0%");
} }
}
// QuantityDto sonMesReport = mesReportWorkMapper.getSumQuantity(quantityDto); // QuantityDto sonMesReport = mesReportWorkMapper.getSumQuantity(quantityDto);
// if(sonMesReport == null){//单层工单的情况 // if(sonMesReport == null){//单层工单的情况

@ -878,15 +878,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getRealQuantity" resultType="com.op.mes.domain.dto.QuantityDto"> <select id="getRealQuantity" resultType="com.op.mes.domain.dto.QuantityDto">
select select
mrw.workorder_code, mrw.workorder_code workorderCode,
sum(quantity_feedback) quantityFeedbackSum, sum(quantity_feedback) quantityFeedbackSum,
ROUND(sum(work_time*use_man)/sum(work_time), 2) useMan, ROUND(sum(work_time*use_man)/sum(work_time), 2) useMan,
SUM(work_time) workTime, SUM(work_time) workTime,
SUM ( work_time * use_man ) totalWorkTime, SUM ( work_time * use_man ) totalWorkTime,
cegci cegci cegci
from mes_report_work mrw from mes_report_work mrw
LEFT JOIN pro_order po ON LEFT(mrw.workorder_code, 12) = po.order_code LEFT JOIN pro_order po ON LEFT(mrw.workorder_code, 12) = po.order_code
where mrw.workorder_code = #{workorderCode} and mrw.del_flag = '0' and machine_code = #{machineCode} where mrw.workorder_code = #{workorderCode}
and mrw.del_flag = '0'
and mrw.machine_code = #{machineCode}
<if test="board == null"> <if test="board == null">
and mrw.upload_status = '1' and mrw.upload_status = '1'
</if> </if>

Loading…
Cancel
Save