gongchunyi
5 天以前 e7a970151c40925eefa1fe837ac06e93594fcf82
src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java
@@ -12,6 +12,8 @@
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;
@@ -41,6 +43,7 @@
        return AjaxResult.success(deviceLedgerService.queryPage(page, deviceLedger));
    }
    @Log(title = "新增设备台账", businessType = BusinessType.INSERT)
    @PostMapping()
    @Operation(summary = "添加设备台账")
    public AjaxResult add(@RequestBody DeviceLedgerDto deviceLedgerDto) {
@@ -54,12 +57,14 @@
        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) {
@@ -70,12 +75,14 @@
        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) {
@@ -83,6 +90,7 @@
        util.importTemplateExcel(response, "设备导入模板");
    }
    @Log(title = "导入设备台账", businessType = BusinessType.IMPORT)
    @PostMapping("/import")
    @Operation(summary = "导入设备台账")
    public AjaxResult importData(MultipartFile file) throws IOException {