From 45fa0764c539a1164affc0937a6870fe988bf2c8 Mon Sep 17 00:00:00 2001 From: lishenao <3065849776@qq.com> Date: 星期三, 25 六月 2025 14:22:35 +0800 Subject: [PATCH] 包名优化 --- src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java b/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java index e39c658..b3f283a 100644 --- a/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java +++ b/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java @@ -12,6 +12,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; @@ -66,6 +67,17 @@ deviceLedgerService.export(response, ids); } + @PostMapping("import") + @ApiModelProperty("瀵煎叆璁惧鍙拌处") + public AjaxResult importData(MultipartFile file) { + Boolean b = deviceLedgerService.importData(file); + if (b) { + return AjaxResult.success("瀵煎叆鎴愬姛"); + } + return AjaxResult.error("瀵煎叆澶辫触"); + } + + @GetMapping("getDeviceLedger") @ApiModelProperty("鑾峰彇璁惧鍙拌处") public AjaxResult getDeviceLedger( ) { -- Gitblit v1.9.3