| | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZfEquipment; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.domain.excel.ZfEconomyExcelBean; |
| | | import com.ruoyi.domain.excel.ZfEquipmentExcelBean; |
| | | import com.ruoyi.service.ZfEquipmentService; |
| | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @GetMapping("/model") |
| | | @PostMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ZfEquipmentExcelBean> list = Collections.singletonList(new ZfEquipmentExcelBean()); |
| | | ExcelUtil<ZfEquipmentExcelBean> util = new ExcelUtil<>(ZfEquipmentExcelBean.class); |
| | | util.exportExcel(response,list,"家庭设备记录数据"); |
| | | util.exportExcel(response,list,"家庭设备导入模板"); |
| | | } |
| | | |
| | | |
| | |
| | | ExcelUtil<ZfEquipment> util = new ExcelUtil<ZfEquipment>(ZfEquipment.class); |
| | | util.exportExcel(response, list, "家庭设备记录数据"); |
| | | } |
| | | /** |
| | | * 导出家庭设备记录列表 |
| | | */ |
| | | @Log(title = "家庭大事件记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export1/{ids}") |
| | | public void export1(HttpServletResponse response, @PathVariable Long[] ids) { |
| | | List<ZfEquipment> list = zfEquipmentService.selectByIds(ids); |
| | | log.info("导出记录为:{}", list); |
| | | ExcelUtil<ZfEquipment> util = new ExcelUtil<ZfEquipment>(ZfEquipment.class); |
| | | util.exportExcel(response, list, "家庭大事件记录数据"); |
| | | |
| | | } |
| | | |
| | | // |
| | | |
| | | /** |