jx mes 节拍报表 bug

tags/yfai-mes-ext-v1.0
王杰 1 year ago
parent ae4e5682bb
commit 6c5f9e5300

@ -18,6 +18,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.base.tool.HqlPack; import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell; import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -32,6 +33,7 @@ import java.util.stream.Collectors;
* @USER: xinwang.yi * @USER: xinwang.yi
* @DATE: 2023-12-05 14:21 * @DATE: 2023-12-05 14:21
*/ */
@Slf4j
@Service @Service
public class SxWorkCellTaktCollectRecordService implements ISxWorkCellTaktCollectRecordService { public class SxWorkCellTaktCollectRecordService implements ISxWorkCellTaktCollectRecordService {
@ -111,8 +113,7 @@ public class SxWorkCellTaktCollectRecordService implements ISxWorkCellTaktCollec
workCellList = workCellList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getSeq()))).sorted(Comparator.comparing(MesWorkCell::getSeq).thenComparing(MesWorkCell::getWorkCellCode)).collect(Collectors.toList()); workCellList = workCellList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getSeq()))).sorted(Comparator.comparing(MesWorkCell::getSeq).thenComparing(MesWorkCell::getWorkCellCode)).collect(Collectors.toList());
for (MesWorkCell workCell : workCellList) { for (MesWorkCell workCell : workCellList) {
List<SxWorkCellTaktCollectRecord> recordDbList2Cell = recordDbMap2Cell.get(workCell); List<SxWorkCellTaktCollectRecord> recordDbList2Cell = recordDbMap2Cell.get(workCell);
if (CollectionUtils.isEmpty(recordDbMap2Cell)) continue; if (CollectionUtils.isEmpty(recordDbList2Cell)) continue;
statistics = recordDbList2Cell.stream().filter(o -> null != o).mapToDouble(o -> new Double(o.getWorkTakt())).summaryStatistics(); statistics = recordDbList2Cell.stream().filter(o -> null != o).mapToDouble(o -> new Double(o.getWorkTakt())).summaryStatistics();
JxCellTaktReportModel result = new JxCellTaktReportModel(model.getOrganizeCode(), model.getWorkCenterCode(), workCell.getWorkCellCode()); JxCellTaktReportModel result = new JxCellTaktReportModel(model.getOrganizeCode(), model.getWorkCenterCode(), workCell.getWorkCellCode());
result.setCreateDatetimeStart(model.getCreateDatetimeStart()); result.setCreateDatetimeStart(model.getCreateDatetimeStart());

Loading…
Cancel
Save