zss
3 天以前 996c3fb89b185eedf2fd58a6c5bd5586e04cdccf
inspect-server/src/main/java/com/yuanchu/mom/service/impl/ReportServiceImpl.java
@@ -392,7 +392,10 @@
                .between(AuxiliaryOutputWorkingHours::getCreateTime, start, end));
        double sum = auxiliaryOutputWorkingHours.stream()
                .filter(auxiliaryOutputWorkingHours1 ->
                        insProductMapper.selectById(auxiliaryOutputWorkingHours1.getInsProductId()).getSonLaboratory().equals(sonLaboratory)
                        {
                            InsProduct insProduct = insProductMapper.selectById(auxiliaryOutputWorkingHours1.getInsProductId());
                            return ObjectUtils.isNotNull(insProduct)&&insProduct.getSonLaboratory().equals(sonLaboratory);
                        }
                ).mapToDouble(AuxiliaryOutputWorkingHours::getOutputWorkTime).sum();
        String num = String.format("%.2f", sum);
        return num;
@@ -410,7 +413,10 @@
        //根据检验项查出来的站点进行分类
        List<AuxiliaryOutputWorkingHours> outputWorkingHours = auxiliaryOutputWorkingHours.stream()
                .filter(auxiliaryOutputWorkingHours1 ->
                        insProductMapper.selectById(auxiliaryOutputWorkingHours1.getInsProductId()).getSonLaboratory().equals(sonLaboratory)
                        {
                            InsProduct insProduct = insProductMapper.selectById(auxiliaryOutputWorkingHours1.getInsProductId());
                            return ObjectUtils.isNotNull(insProduct)&&insProduct.getSonLaboratory().equals(sonLaboratory);
                        }
                ).collect(Collectors.toList());
        Map<Object, Double> mapMap = outputWorkingHours.stream()
                .collect(Collectors.groupingBy(
@@ -432,9 +438,11 @@
        }else {
            List<InsOrderState> insOrderStates = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery()
                    .between(InsOrderState::getCreateTime, start, end));
            for (InsOrderState insOrderState : insOrderStates) {
                IPage<InsOrderUserDto> insOrderUserDtoIPage = insOrderUserMapper.selectInsOrderUserDto2(insOrderState.getId(), page);
                map.put(insOrderState.getLaboratory(), insOrderUserDtoIPage);
            Map<String, List<InsOrderState>> listMap = insOrderStates.stream().collect(Collectors.groupingBy(InsOrderState::getLaboratory));
            for (Map.Entry<String, List<InsOrderState>> entry : listMap.entrySet()) {
                List<Integer> ids = entry.getValue().stream().map(InsOrderState::getId).collect(Collectors.toList());
                IPage<InsOrderUserDto> insOrderUserDtoIPage = insOrderUserMapper.selectInsOrderUserDto2(ids, new Page(1,9));
                map.put(entry.getKey(), insOrderUserDtoIPage);
            }
        }
        return map;