From 10de85f85ad0874b2d93c851bb4d3eacab24a183 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 21 八月 2024 14:45:25 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
index 011fff5..480995c 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -88,7 +88,7 @@
 			// 当前时间属于那个阶段 取哪个阶段的电价
 			if(LocalTime.now().isAfter(LocalTime.parse(tAccountingStrategyDetail.getStartTime())) && LocalTime.now().isBefore(LocalTime.parse(tAccountingStrategyDetail.getEndTime()))){
 				siteInfoVO.setElectrovalence(tAccountingStrategyDetail.getElectrovalence());
-				siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().multiply(byId1.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
+				siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().multiply(byId1.getDiscount()).setScale(4, BigDecimal.ROUND_HALF_UP));
 			}
 		}
 		siteInfoVO.setName(byId.getName());
@@ -156,11 +156,23 @@
 
 	
 	@ResponseBody
-	@PostMapping("/getSiteList")
+	@PostMapping("/addSite")
 	@ApiOperation(value = "添加站点", tags = {"管理后台-站点管理"})
 	public AjaxResult addSite(@RequestBody Site site){
 		return siteService.addSite(site);
 	}
+	
+	
+	
+	@ResponseBody
+	@PostMapping("/getSiteInfo/{id}")
+	@ApiOperation(value = "获取站点详情", tags = {"管理后台-站点管理"})
+	public AjaxResult<Site> getSiteInfo(@PathVariable Integer id){
+		Site site = siteService.getById(id);
+		return AjaxResult.success(site);
+	}
+	
+	
 	
 	@ResponseBody
 	@PostMapping("/editSite")
@@ -170,12 +182,12 @@
 	}
 	
 	@ResponseBody
-	@DeleteMapping("/delSite/{id}")
+	@DeleteMapping("/delSite")
 	@ApiOperation(value = "删除站点", tags = {"管理后台-站点管理"})
 	@ApiImplicitParams({
 			@ApiImplicitParam(value = "站点id", name = "id", dataTypeClass = Integer.class, required = true)
 	})
-	public AjaxResult delSite(@PathVariable Integer[] id){
+	public AjaxResult delSite(@RequestParam("id") Integer[] id){
 		return siteService.delSite(id);
 	}
 	

--
Gitblit v1.7.1