From e16302f9d475c7cc4dd18c5abf1a23cb5502e362 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 28 五月 2025 14:57:56 +0800 Subject: [PATCH] 密码验证加- --- src/main/java/com/whyc/controller/PowerInfController.java | 50 +++++++++++++++++++++++++++++++++++--------------- 1 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/whyc/controller/PowerInfController.java b/src/main/java/com/whyc/controller/PowerInfController.java index 528123c..c69744e 100644 --- a/src/main/java/com/whyc/controller/PowerInfController.java +++ b/src/main/java/com/whyc/controller/PowerInfController.java @@ -1,6 +1,7 @@ package com.whyc.controller; import com.whyc.dto.Response; +import com.whyc.dto.paramter.PowerInfPar; import com.whyc.factory.BattinfGroupFactory; import com.whyc.pojo.Battinf; import com.whyc.pojo.PowerInf; @@ -18,10 +19,12 @@ import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; +import java.util.List; + @RequestMapping("powerInf") @RestController @Api(tags = "鏁版嵁绠$悊-鐢垫簮淇℃伅") -public class PowerInfController { +public class PowerInfController extends BaseController{ @Autowired private PowerInfService service; @Autowired @@ -47,11 +50,11 @@ String nextStationId = battInfService.getNextStationId(); StationInf station = new StationInf(); station.setStationId(nextStationId); - station.setStationName(battinf.getStationName()); - station.setStationName1(battinf.getStationName1()); - station.setStationName2(battinf.getStationName2()); - station.setStationName3(battinf.getStationName3()); - station.setStationName5(battinf.getStationName5()); + station.setStationName(powerInf.getStationName()); + station.setStationName1(powerInf.getStationName1()); + station.setStationName2(powerInf.getStationName2()); + station.setStationName3(powerInf.getStationName3()); + station.setStationName5(powerInf.getStationName5()); stationInfService.insertStation(station); //powerInf.setStationId(String.valueOf(battInfService.searchMaxId_zj())); powerInf.setStationId(nextStationId); @@ -82,19 +85,25 @@ return res; } - @PutMapping + @PostMapping("update") @ApiOperation(value = "鏇存柊鐢垫簮") public Response update(@RequestBody PowerInf powerInf){ service.updateByPowerDeviceId(powerInf); return new Response().set(1,true,"鏇存柊鎴愬姛"); } - @DeleteMapping + @PostMapping("delete") @ApiOperation(value = "鍒犻櫎鐢垫簮") public Response delete(@RequestParam Integer powerDeviceId){ service.deleteByPowerDeviceId(powerDeviceId); return new Response().set(1,true,"鍒犻櫎鎴愬姛"); } + @GetMapping("updateSwtichNum") + @ApiOperation(value = "鏇存柊寮�鍏宠矾鏁�") + public Response updateSwtichNum(@RequestParam int swtichNum,@RequestParam int powerId){ + service.updateSwtichNum(swtichNum,powerId); + return new Response().set(1,true,"鏇存柊鎴愬姛"); + } @GetMapping("getProvincesContainBatt") @@ -148,14 +157,12 @@ return service.getStations(userInf.getUId(),stationName5); } - @GetMapping("getPowerDevicesPage") + @PostMapping("getPowerDevicesPage") @ApiOperation(value = "鐢ㄦ埛绠$悊鐨勭數婧愪俊鎭垎椤�") public Response getPowerDevicesPage(@RequestParam int pageNum, @RequestParam int pageSize - , @RequestParam(required = false) String stationId, @RequestParam(required = false) String stationName1 - , @RequestParam(required = false) String stationName2, @RequestParam(required = false) String stationName5 - , @RequestParam(required = false) String powerProducer) { + , @RequestBody PowerInfPar powerInfPar) { UserInf userInf = (UserInf) ActionUtil.getUser(); - return service.getPowerDevicesPage(pageNum, pageSize, userInf.getUId(), stationId, stationName1, stationName2, stationName5, powerProducer); + return service.getPowerDevicesPage(pageNum, pageSize, userInf.getUId(), powerInfPar); } @@ -179,13 +186,13 @@ }*/ @ApiOperation(value = "濉啓寮傚父鍘熷洜",notes = "浼犲叆瀛楁 num,exceptionCause,exceptionCauseAnalysis") - @PutMapping("exceptionCause") + @PostMapping("exceptionCause") public Response updateExceptionCause(@RequestBody PowerInf powerInf){ return service.updateExceptionCause(powerInf); } @ApiOperation(value = "鍙栨秷寮傚父鍘熷洜", notes = "浼犲叆瀛楁 num") - @PutMapping("cancelExceptionCause") + @PostMapping("cancelExceptionCause") public Response updateCancelExceptionCause(@RequestParam int num) { return service.updateCancelExceptionCause(num); } @@ -209,4 +216,17 @@ public Response getPwrProducer() { return service.getPwrProducer(); } + + @GetMapping("modelList") + @ApiOperation(value = "鑾峰彇鎵�鏈夌殑鍨嬪彿") + public Response getModelList() { + return service.getModelList(); + } + + @PostMapping("getModelListByPwrProducer") + @ApiOperation(value = "鏍规嵁鍝佺墝鏌ヨ鍨嬪彿") + public Response getModelListByPwrProducer(@RequestBody List<String> producer) { + return service.getModelListByPwrProducer(producer); + } + } -- Gitblit v1.9.1