| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceLedgerService.queryPage(page, deviceLedger)); |
| | | } |
| | | |
| | | @Log(title = "新增设备台账", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "添加设备台账") |
| | | public AjaxResult add(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | |
| | | return AjaxResult.success(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "修改设备台账", businessType = BusinessType.UPDATE) |
| | | @PutMapping() |
| | | @Operation(summary = "修改设备台账") |
| | | public AjaxResult update(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "删除设备台账", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "删除设备台账") |
| | | public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导出设备台账", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导出设备台账") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceLedgerService.export(response, ids); |
| | | } |
| | | |
| | | @Log(title = "下载设备台账模板", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "下载模板") |
| | | @PostMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | |
| | | util.importTemplateExcel(response, "设备导入模板"); |
| | | } |
| | | |
| | | @Log(title = "导入设备台账", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/import") |
| | | @Operation(summary = "导入设备台账") |
| | | public AjaxResult importData(MultipartFile file) throws IOException { |