| | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZfEquipment; |
| | | import com.ruoyi.domain.excel.ZfEconomyExcelBean; |
| | | import com.ruoyi.domain.excel.ZfEquipmentExcelBean; |
| | | import com.ruoyi.service.ZfEquipmentService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | |
| | | |
| | | @GetMapping("/all") |
| | | public AjaxResult listAll(ZfEquipment zfEquipment){ |
| | | |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return zfEquipmentService.selectDataList(zfEquipment, pageNum, pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 获取导入模板 |
| | | */ |
| | | @GetMapping("/model") |
| | | public void getExportModel(HttpServletResponse response){ |
| | | List<ZfEquipmentExcelBean> list = Collections.singletonList(new ZfEquipmentExcelBean()); |
| | | ExcelUtil<ZfEquipmentExcelBean> util = new ExcelUtil<>(ZfEquipmentExcelBean.class); |
| | | util.exportExcel(response,list,"家庭设备记录数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出家庭设备记录列表 |