生产日报表人员调动--取最大人数

master
zhaoxiaolin 7 months ago
parent c97e3fc817
commit c4d7d1cb2b

@ -180,7 +180,7 @@ public interface MesReportWorkMapper {
QuantityDto getRealQuantity(QuantityDto quantityDto);
List<QuantityDto> getSumQuantity(QuantityDto quantityDto);
QuantityDto getSumQuantity(QuantityDto quantityDto);
List<Map> getmonthProductionSut(MesMonthReportVo mesMonthReportVo);
}

@ -425,8 +425,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
quantityDto.setWorkorderCode(workorderCode);
quantityDto.setMachineCode(machineCode);
QuantityDto parentMesReport = mesReportWorkMapper.getRealQuantity(quantityDto);
List<QuantityDto> sonMesReportList = mesReportWorkMapper.getSumQuantity(quantityDto);
QuantityDto sonMesReport = sonMesReportList.stream().max(Comparator.comparingLong(QuantityDto::getUseMan)).orElse(null);
QuantityDto sonMesReport = mesReportWorkMapper.getSumQuantity(quantityDto);
// 产量
Long sumQua = 0L;

@ -715,10 +715,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
sum(quantity_feedback) quantityFeedbackSum,
sum(work_time) workTime,
use_man useMan
max(use_man) useMan
from mes_report_work
where parent_order = #{workorderCode} and del_flag = '0' and machine_code = #{machineCode}
group by use_man
</select>
<select id="selectMesReportWorkList_S" parameterType="MesReportWork" resultMap="MesReportWorkResult">

Loading…
Cancel
Save