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

master
zhaoxiaolin 7 months ago
parent c97e3fc817
commit c4d7d1cb2b

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

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

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

Loading…
Cancel
Save