|
|
|
@ -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.HqlPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
@ -32,6 +33,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
* @USER: xinwang.yi
|
|
|
|
|
* @DATE: 2023-12-05 14:21
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Service
|
|
|
|
|
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());
|
|
|
|
|
for (MesWorkCell workCell : workCellList) {
|
|
|
|
|
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();
|
|
|
|
|
JxCellTaktReportModel result = new JxCellTaktReportModel(model.getOrganizeCode(), model.getWorkCenterCode(), workCell.getWorkCellCode());
|
|
|
|
|
result.setCreateDatetimeStart(model.getCreateDatetimeStart());
|
|
|
|
|