问题修复13

master
zhaoxiaolin 4 months ago
parent 0284c08961
commit c88726d580

@ -490,19 +490,30 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
dto.setTotalWorkTime(sonMesReport.getTotalWorkTime().toString());
// 标准人均效率 实际产量/标准用人/标准工时
BigDecimal manAvgStandard = new BigDecimal(realQua)
BigDecimal manAvgStandard = null;
if(StringUtils.isNotBlank(dto.getManStandard())){
manAvgStandard = new BigDecimal(realQua)
.divide(new BigDecimal(dto.getManStandard()),4,BigDecimal.ROUND_HALF_UP)
.divide(workTimeStandard,2,BigDecimal.ROUND_HALF_UP);
dto.setManAvgStandard(manAvgStandard.toString());
}else{
dto.setManAvgStandard("0");
}
// 实际人均效率 实际产量/总工时
BigDecimal manAvgActual = new BigDecimal(realQua)
.divide(sonMesReport.getTotalWorkTime(),2,BigDecimal.ROUND_HALF_UP);
dto.setManAvgActual(manAvgActual.toString());
// 人均效率达成率 实际人均效率/标准人均效率
if(manAvgStandard!=null){
BigDecimal manAvgDo = manAvgActual
.multiply(new BigDecimal("100.00"))
.divide(manAvgStandard,2,BigDecimal.ROUND_HALF_UP);
dto.setManAvgDo(manAvgDo.toString()+"%");
}else{
dto.setManAvgDo("0%");
}
}
}

@ -689,9 +689,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bp.report_rate reportRate
from base_equipment be
left join pro_order_workorder pow on be.equipment_code = pow.workorder_name
left join mes_line_product mlp on pow.workorder_name = mlp.line_code and pow.product_code = mlp.product_code
left join mes_line_product mlp on pow.workorder_name = mlp.line_code and pow.product_code = mlp.product_code and mlp.del_flag='0'
left join base_product bp on bp.product_code = pow.product_code
where be.del_flag = '0' and be.sap_code is not null and pow.status = 'w3' and mlp.del_flag='0'
where be.del_flag = '0' and be.sap_code is not null and pow.status in ('w2','w3')
and pow.parent_order = '0' and pow.del_flag='0'
<if test="sapName != null and sapName != ''">and be.sap_name like concat('%', #{sapName}, '%')</if>
<if test="workCenter != null and workCenter != ''">and be.workshop_code = #{workCenter}</if>

Loading…
Cancel
Save