嘉兴 看板小数产量 是要时间长度计算

tags/yfai-mes-ext-v1.0
王杰 1 year ago
parent d70c927c07
commit 35ffbaaa1c

@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -96,8 +97,11 @@ public class JxCenterWorkingBoardCenterOneService implements IJxCenterWorkingBoa
}
private List<MesShiftProdCenterRecord> getUnnormalStopCenterData(List<MesShiftProdCenterRecord> shiftProdCenterRecordList, String curTime) {
return CollectionUtils.isEmpty(shiftProdCenterRecordList) ? null :
List<MesShiftProdCenterRecord> filterList = CollectionUtils.isEmpty(shiftProdCenterRecordList) ? null :
shiftProdCenterRecordList.stream().filter(o -> (null != o && MesExtEnumUtil.SHIFT_PROD_TYPE.UNNORMAL_STOP_CENTER.getValue() == o.getProdType() && o.getStartTime().compareTo(curTime) <= 0)).collect(Collectors.toList());
filterList = CollectionUtils.isEmpty(filterList) ? null : filterList.stream().filter(o -> null != o).sorted(Comparator.comparing(MesShiftProdCenterRecord::getStartTime).reversed()).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(filterList) && filterList.size() > 3) filterList = filterList.subList(0, 3);
return filterList;
}
private List<MesFourMDetail> getFourMChangeData(MesWorkCenterExt workCenterExtDb, String curTime) {

Loading…
Cancel
Save