| | |
| | | package com.sinata.system.service.impl; |
| | | |
| | | import cn.idev.excel.EasyExcel; |
| | | import cn.idev.excel.FastExcel; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.sinata.common.entity.PageDTO; |
| | |
| | | if (Objects.isNull(dto.getId())) { |
| | | throw new ServiceException("暂存间id不能为空"); |
| | | } |
| | | MwStagingRoom mwStagingRoom = BeanUtils.copyBean(dto, MwStagingRoom.class); |
| | | updateById(mwStagingRoom); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("暂存间入库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), MwStorageRecordVO.class).sheet("暂存间入库记录").doWrite(list); |
| | | FastExcel.write(response.getOutputStream(), MwStorageRecordVO.class).sheet("暂存间入库记录").doWrite(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("暂存间出库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), MwCheckoutRecordVO.class).sheet("暂存间出库记录").doWrite(list); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordVO.class).sheet("暂存间出库记录").doWrite(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<MwStagingRoomVO> queryStagingRoomList() { |
| | | return baseMapper.queryStagingRoomList(); |
| | | } |
| | | |
| | | /** |
| | | * 暂存间待处理医废分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageDTO<MwStorageRecordVO> temporarilyStoredMedicalWaste(StorageRecordQuery query) { |
| | | return PageDTO.of(baseMapper.temporarilyStoredMedicalWaste(query)); |
| | | } |
| | | |
| | | /** |
| | | * 根据医废查询使用列表 |
| | | * |
| | | * @param id 微波设备id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MwStorageRecordVO> queryMedicalWasteList(Long id) { |
| | | return baseMapper.queryMedicalWasteList(id); |
| | | } |
| | | } |