From c9199b79bd709fcbe2f763acabc40527987c1488 Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Wed, 15 Jun 2022 15:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BF=9C=E7=A8=8B=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=A1=A9=E7=A8=8B=E5=BA=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XhpcChargingPileController.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java index abfd0ed0..56c38842 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java @@ -13,10 +13,16 @@ import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.redis.service.RedisService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; @@ -165,6 +171,21 @@ public class XhpcChargingPileController extends BaseController { return AjaxResult.success(r.getMsg()); } + // 更新桩程序 + @GetMapping("/softwareUpgrade") + public AjaxResult softwareUpgrade(String serialNumber) { + + if(serialNumber==null || "".equals(serialNumber)){ + return AjaxResult.error("桩号为空"); + } + R r = powerPileService.pileSoftwareUpgrade(serialNumber); + if(r.getCode() !=200){ + return AjaxResult.error(r.getMsg()); + } + return AjaxResult.success(r.getMsg()); + } + + @GetMapping("/configRmReplyMessage") public AjaxResult configRmReplyMessage(String serialNumber) { if(serialNumber==null || "".equals(serialNumber)){