From 67d06a785d5fc4524639ace27651c01ff05a4b58 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期四, 29 五月 2025 22:31:33 +0800 Subject: [PATCH] 修改bug --- ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/ChargingGunClient.java | 88 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 85 insertions(+), 3 deletions(-) diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/ChargingGunClient.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/ChargingGunClient.java index 149625a..a1a1779 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/ChargingGunClient.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/ChargingGunClient.java @@ -2,12 +2,15 @@ import com.ruoyi.chargingPile.api.factory.ChargingGunFallbackFactory; import com.ruoyi.chargingPile.api.model.TChargingGun; +import com.ruoyi.chargingPile.api.model.TChargingPile; +import com.ruoyi.chargingPile.api.vo.GetChargingGunByCode; +import com.ruoyi.chargingPile.api.vo.SiteNameVO; import com.ruoyi.common.core.constant.ServiceNameConstants; import com.ruoyi.common.core.domain.R; import org.springframework.cloud.openfeign.FeignClient; -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.*; + +import java.util.List; /** * @author zhibing.pu @@ -15,6 +18,18 @@ */ @FeignClient(contextId = "ChargingGunClient", value = ServiceNameConstants.CHARGINGPILE_SERVICE, fallbackFactory = ChargingGunFallbackFactory.class) public interface ChargingGunClient { + /** + * 获取所有枪 + * @return + */ + @PostMapping("/t-charging-gun/getAllGun") + R<List<TChargingGun>> getAllGun(); + /** + * 获取所有桩 + * @return + */ + @PostMapping("/t-charging-gun/getAllPile") + R<List<TChargingPile>> getAllPile(); /** * 根据id获取充电枪完整名称 @@ -32,4 +47,71 @@ */ @PostMapping("/t-charging-gun/getChargingGunById/{id}") R<TChargingGun> getChargingGunById(@PathVariable("id") Integer id); + + + /** + * 通过枪id获取站点、桩、枪的名称VO + * @param id + * @return + */ + @PostMapping("/t-charging-gun/getAllInfoById/{id}") + R<SiteNameVO> getAllInfoById(@PathVariable("id") Integer id); + /** + * 根据枪编号获取充电枪 + * @param code + * @return + */ + @PostMapping("/t-charging-gun/getChargingGunByCode") + R<TChargingGun> getChargingGunByCode(@RequestBody GetChargingGunByCode code); + /** + * 编辑充电枪 + * @param chargingGun + * @return + */ + @PostMapping("/t-charging-gun/updateChargingGunById") + R<String> updateChargingGunById(@RequestBody TChargingGun chargingGun); + + + /** + * 根据充电桩id获取枪 + * @param chargingPileId + * @return + */ + @PostMapping("/t-charging-gun/getChargingGunByChargingPileId") + R<List<TChargingGun>> getChargingGunByChargingPileId(@RequestParam("chargingPileId") Integer chargingPileId); + + + /** + * 根据充电桩ids获取枪 + * @param chargingPileIds + * @return + */ + @PostMapping("/t-charging-gun/getChargingGunByChargingPileIds") + R<List<TChargingGun>> getChargingGunByChargingPileIds(@RequestParam("chargingPileIds") List<Integer> chargingPileIds); + + + + /** + * 接口状态变化后推送给第三方 + * @param id + * @param status + * @return + */ + @PostMapping("/t-charging-gun/pushChargingGunStatus") + R pushChargingGunStatus(@RequestParam("id") Integer id, @RequestParam("status") Integer status); + + + + /** + * 根据枪唯一码查询信息 + * @return + */ + @PostMapping("/t-charging-gun/getChargingGunByFullNumber") + R<TChargingGun> getChargingGunByFullNumber(@RequestParam("fullNumber") String fullNumber); + + /** + * 大屏 根据站点ids和充电模式集合查询充电枪集合 + */ + @GetMapping("/t-charging-gun/getGunIdsBySiteIdsAndChargeModels") + R<List<Integer>> getGunIdsBySiteIdsAndChargeModels(@RequestParam("siteIds") List<Integer> siteIds ,@RequestParam("chargeModels") List<Integer> chargeModels); } -- Gitblit v1.7.1