| | |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 导出家庭设备记录列表 |
| | | // */ |
| | | //// @PreAuthorize("@ss.hasPermi('system:equipment:export')") |
| | | // @Log(title = "家庭设备记录", businessType = BusinessType.EXPORT) |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, ZfEquipment zfEquipment) |
| | | // { |
| | | // List<ZfEquipment> list = zfEquipmentService.selectByCondition(zfEquipment); |
| | | // log.info("导出记录为:{}",list); |
| | | // ExcelUtil<ZfEquipment> util = new ExcelUtil<ZfEquipment>(ZfEquipment.class); |
| | | // util.exportExcel(response, list, "家庭设备记录数据"); |
| | | // } |
| | | /** |
| | | * 导出家庭设备记录列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:equipment:export')") |
| | | @Log(title = "家庭设备记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ZfEquipment zfEquipment) |
| | | { |
| | | List<ZfEquipment> list = zfEquipmentService.selectByCondition(zfEquipment); |
| | | log.info("导出记录为:{}",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) { |
| | | @PostMapping("/export/{ids}") |
| | | public void export(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, "家庭大事件记录数据"); |
| | | util.exportExcel(response, list, "家庭设备数据"); |
| | | |
| | | } |
| | | |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ZfEquipment zfEquipment) |
| | | { |
| | | return zfEquipmentService.addData2(zfEquipment); |
| | | return zfEquipmentService.addData(zfEquipment); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ZfEquipment zfEquipment) |
| | | { |
| | | return toAjax(zfEquipmentService.updateById(zfEquipment)); |
| | | return zfEquipmentService.updateData(zfEquipment); |
| | | } |
| | | // |
| | | /** |
| | |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(zfEquipmentService.removeByIds(Arrays.asList(ids))); |
| | | return zfEquipmentService.deleteData(ids); |
| | | } |
| | | |
| | | } |