| | |
| | | import com.sinata.common.core.domain.entity.SysDictData; |
| | | import com.sinata.common.utils.CollUtils; |
| | | import com.sinata.common.utils.DateUtils; |
| | | import com.sinata.system.config.AutoColumnWidthStrategy; |
| | | import com.sinata.system.domain.MwCollectRecord; |
| | | import com.sinata.system.domain.MwWarningRecord; |
| | | import com.sinata.system.domain.SysDepartment; |
| | |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.SysDictDataVO; |
| | | import com.sinata.system.domain.vo.TransformVO; |
| | | import com.sinata.system.enums.DepartmentEnum; |
| | | import com.sinata.system.enums.MedicalWasteStatusEnum; |
| | | import com.sinata.system.service.ISysDictDataService; |
| | | import com.sinata.system.service.MwCheckoutRecordService; |
| | | import com.sinata.system.service.MwCollectRecordService; |
| | |
| | | } |
| | | vo.setLegend(wasteTypeList.stream().map(SysDictDataVO::getDictLabel).collect(Collectors.toList())); |
| | | vo.getLegend().add("小计"); |
| | | List<MwCollectRecord> collectRecordList = mwCollectRecordService.lambdaQuery().eq(query.getReportType().equals(1), MwCollectRecord::getStatus, MedicalWasteStatusEnum.TEMPORARILY_STORED.getCode()) |
| | | .ne(query.getReportType().equals(2), MwCollectRecord::getStatus, MedicalWasteStatusEnum.TEMPORARILY_STORED.getCode()) |
| | | List<MwCollectRecord> collectRecordList = mwCollectRecordService.lambdaQuery()/*.eq(query.getReportType().equals(1), MwCollectRecord::getStatus, MedicalWasteStatusEnum.TEMPORARILY_STORED.getCode()) |
| | | .ne(query.getReportType().equals(2), MwCollectRecord::getStatus, MedicalWasteStatusEnum.TEMPORARILY_STORED.getCode())*/ |
| | | .eq(MwCollectRecord::getDepartmentId, query.getDepartmentId()) |
| | | .between(query.getReportType().equals(1), MwCollectRecord::getCollectTime, query.getStartTime(), query.getEndTime()) |
| | | .between(query.getReportType().equals(2), MwCollectRecord::getCheckoutTime, query.getStartTime(), query.getEndTime()) |
| | |
| | | FastExcel.write(response.getOutputStream()) |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("医院报表") |
| | | .doWrite(getHospitalReportStaticsData(query)); |
| | | } |
| | |
| | | vo.setDepartmentName(department.getDepartmentName()); |
| | | } |
| | | SysDepartment region = sysDepartmentService.getDepartmentByParentId(department.getParentId()); |
| | | List<SysDepartment> hospitalList = sysDepartmentService.lambdaQuery().likeRight(SysDepartment::getTreeCode, region.getTreeCode()).eq(SysDepartment::getOrgType, DepartmentEnum.MEDICAL_INSTITUTION.getCode()).list(); |
| | | if (CollUtils.isNotEmpty(hospitalList)) { |
| | | //List<SysDepartment> hospitalList = sysDepartmentService.lambdaQuery().likeRight(SysDepartment::getTreeCode, region.getTreeCode()).eq(SysDepartment::getOrgType, DepartmentEnum.MEDICAL_INSTITUTION.getCode()).list(); |
| | | List<TransformVO> checkoutRecordVOList = mwCheckoutRecordService.getCheckoutRecordList(query, region.getTreeCode()); |
| | | if (CollUtils.isNotEmpty(checkoutRecordVOList)) { |
| | | //查询医废类型 |
| | | List<SysDictData> wasteTypeList = sysDictDataService.lambdaQuery().in(SysDictData::getDictCode, query.getWasteTypeCodeList()).orderByDesc(SysDictData::getDictCode).list(); |
| | | if (CollUtils.isNotEmpty(wasteTypeList)) { |
| | |
| | | } |
| | | vo.setList(list); |
| | | } |
| | | } |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | |
| | | FastExcel.write(response.getOutputStream()) |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("转运联单") |
| | | .doWrite(getTransformReportStaticsData(query)); |
| | | } |
| | |
| | | FastExcel.write(response.getOutputStream()) |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("处置报表") |
| | | .doWrite(getDisposalReportStaticsData(query)); |
| | | } |
| | |
| | | FastExcel.write(response.getOutputStream()) |
| | | .head(head) |
| | | .autoCloseStream(Boolean.TRUE) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("监管报表") |
| | | .doWrite(getRegulationReportStaticsData(query)); |
| | | } |