| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | |
| | | return update ? AjaxResult.success("检定成功") : AjaxResult.error("检定失败"); |
| | | } |
| | | |
| | | @PostMapping("/downloadTemplate") |
| | | @Operation(summary = "下载计量器具台账导入模板") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | measuringInstrumentLedgerService.downloadTemplate(response); |
| | | } |
| | | |
| | | @PostMapping("/import") |
| | | @Operation(summary = "批量导入计量器具台账") |
| | | @Log(title = "批量导入计量器具台账", businessType = BusinessType.IMPORT) |
| | | public AjaxResult importData(@RequestParam("file") MultipartFile file) { |
| | | return measuringInstrumentLedgerService.importData(file); |
| | | } |
| | | |
| | | /** |
| | | * 导出计量器具台账 |
| | | */ |