Lius
2024-10-31 7d8887e36acb71ee20bf2f55170571b3fa7621b7
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOeeInfoServiceImpl.java
@@ -109,18 +109,15 @@
            List<MdcOeeInfo> oeeList = this.baseMapper.oeeList(vo);
            //数据处理
            String shiftSubName = "全部";
            if (!StringUtils.isBlank(vo.getShiftId())) {
                List<MdcShiftSub> mdcShiftSubList = new ArrayList<>();
                if (StringUtils.isNotBlank(vo.getShiftSubId())) {
                    mdcShiftSubList = mdcShiftSubService.list(new LambdaQueryWrapper<MdcShiftSub>().eq(MdcShiftSub::getId, vo.getShiftSubId()).eq(MdcShiftSub::getShiftSubStatus, "1"));
                    oeeList = oeeList.stream().filter(mdcOeeInfo -> mdcOeeInfo.getShiftId().equals(vo.getShiftId()) && mdcOeeInfo.getShiftSubId().equals(vo.getShiftSubId())).collect(Collectors.toList());
                } else {
                    mdcShiftSubList = mdcShiftSubService.list(new LambdaQueryWrapper<MdcShiftSub>().eq(MdcShiftSub::getShiftId, vo.getShiftId()).eq(MdcShiftSub::getShiftSubStatus, "1"));
                    oeeList = oeeList.stream().filter(mdcOeeInfo -> mdcOeeInfo.getShiftId().equals(vo.getShiftId())).collect(Collectors.toList());
                }
            List<MdcShiftSub> mdcShiftSubList = new ArrayList<>();
            if (StringUtils.isNotBlank(vo.getShiftSubId())) {
                mdcShiftSubList = mdcShiftSubService.list(new LambdaQueryWrapper<MdcShiftSub>().eq(MdcShiftSub::getId, vo.getShiftSubId()).eq(MdcShiftSub::getShiftSubStatus, "1"));
                //oeeList = oeeList.stream().filter(mdcOeeInfo -> mdcOeeInfo.getShiftId().equals(vo.getShiftId()) && mdcOeeInfo.getShiftSubId().equals(vo.getShiftSubId())).collect(Collectors.toList());
                List<String> shiftSubNames = mdcShiftSubList.stream().map(MdcShiftSub::getShiftSubName).collect(Collectors.toList());
                shiftSubName = String.join(",", shiftSubNames);
            }
            for (MdcEquipment mdcEquipment : equipmentList) {
                MdcOeeListDto mdcOeeListDto = new MdcOeeListDto();
                mdcOeeListDto.setEquipmentId(mdcEquipment.getEquipmentId());
@@ -207,7 +204,7 @@
                        //获取设备运行数据
                        MdcEquipmentStatisticalShiftInfo mdcEquipmentStatisticalShiftInfo = mdcEquipmentStatisticalShiftInfoService.getOne(new LambdaQueryWrapper<MdcEquipmentStatisticalShiftInfo>()
                                .eq(MdcEquipmentStatisticalShiftInfo::getEquipmentId, equipment.getEquipmentid())
                                .eq(MdcEquipmentStatisticalShiftInfo::getTheDate, validDate)
                                .eq(MdcEquipmentStatisticalShiftInfo::getTheDate, validDate.replaceAll("-", ""))
                                .eq(MdcEquipmentStatisticalShiftInfo::getShiftSubId, id));
                        if (mdcEquipmentStatisticalShiftInfo == null) {
                            continue;