| | |
| | | import com.ruoyi.basic.mapper.SupplyMapper; |
| | | import com.ruoyi.basic.service.SupplyService; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void supplyExport(HttpServletResponse response, SupplyDto supplyDto) { |
| | | List<Long> ids = supplyDto.getIds(); |
| | | List<Supply> list; |
| | | if (ids != null && ids.size() > 0) { |
| | | list = supplyMapper.selectByIds(ids); |
| | | } else { |
| | | list = supplyMapper.selectList(null); |
| | | } |
| | | ExcelUtil<Supply> util = new ExcelUtil<>(Supply.class); |
| | | util.exportExcel(response, list, "供应商数据"); |
| | | } |
| | | |
| | | @Override |
| | | public List<Supply> supplyList() { |
| | | return supplyMapper.selectList(null); |
| | | } |