Merge remote-tracking branch 'origin/master'

master
mengjiao 2 months ago
commit 3bde27ba19

@ -250,7 +250,7 @@ public class MesReportWorkController extends BaseController {
@RequiresPermissions("mes:dailyReport:list")
@GetMapping("/getDailyReportNew")
@Log(title = "生日报表查询", businessType = BusinessType.QUERY)
@Log(title = "生日报表查询", businessType = BusinessType.QUERY)
public TableDataInfo getDailyReportNew(MesDailyReportVo mesDailyReportVo) {
startPage();
List<MesDailyReportVo> list = mesReportWorkService.getDailyReportNew(mesDailyReportVo);

@ -455,6 +455,14 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
if(sonMesReport == null){//单层工单的情况
sonMesReport = mesReportWorkMapper.getSumQuantityOne(quantityDto);
}
//三层订单
QuantityDto threeMesReport =new QuantityDto();
if (sonMesReport != null ){
QuantityDto quantityDtothree = new QuantityDto();
quantityDtothree.setWorkorderCode(sonMesReport.getWorkorderCode());
quantityDtothree.setMachineCode(machineCode);
threeMesReport = mesReportWorkMapper.getSumQuantity(quantityDtothree);
}
// 产量
Long sumQua = 0L;
@ -469,6 +477,10 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
realQua = parentMesReport.getQuantityFeedbackSum();
workTime = sonMesReport.getWorkTime();
useMan = sonMesReport.getUseMan().add(parentMesReport.getUseMan());
// 若 threeMesReport 不为空,则叠加其 useMan 值
if (threeMesReport != null && threeMesReport.getUseMan() != null) {
useMan = useMan.add(threeMesReport.getUseMan());
}
dto.setQuantityAct(String.valueOf(sumQua));
dto.setQuantityFeedback(String.valueOf(realQua));
dto.setWorkTime(workTime);

@ -863,6 +863,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSumQuantity" resultType="com.op.mes.domain.dto.QuantityDto">
select
workorder_code as workorderCode,
sum(quantity_feedback) quantityFeedbackSum,
sum(work_time) workTime,
ROUND(sum(work_time*use_man)/sum(work_time), 2) useMan,
@ -872,6 +873,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="board == null">
and upload_status = '1'
</if>
group by workorder_code
</select>
<select id="getSumQuantityOne" resultType="com.op.mes.domain.dto.QuantityDto">

Loading…
Cancel
Save