From 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4 Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期二, 23 二月 2021 17:19:23 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/Batt_rtstateController.java |   56 +++++++++++++++++++++++++++++++-------------------------
 1 files changed, 31 insertions(+), 25 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/Batt_rtstateController.java b/src/main/java/com/fgkj/controller/Batt_rtstateController.java
index 77ee4d3..adb5b96 100644
--- a/src/main/java/com/fgkj/controller/Batt_rtstateController.java
+++ b/src/main/java/com/fgkj/controller/Batt_rtstateController.java
@@ -4,47 +4,46 @@
 import com.fgkj.services.Batt_rtstateService;
 import com.fgkj.util.ActionUtil;
 import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
 @RequestMapping("battRtState")
 @RestController
-@Api
+@Api(tags = "battRtState鎺ュ彛")
 public class Batt_rtstateController{
 
 	@Resource
 	private Batt_rtstateService service;
 
-	ServiceModel model = new ServiceModel();
-
-	// private Batt_rtstate rtstate;
-
 	//瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅
-	@GetMapping("byCondition")
-	public ServiceModel serchByCondition(@RequestBody Batt_rtstate rtstate){
-		//System.out.println("寮�濮嬫煡璇tstate");
+	@PostMapping("byCondition")
+	@ApiOperation(notes = "",value="瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅")
+	public ServiceModel serchByCondition(@RequestParam Integer battGroupId) {
+		Batt_rtstate rtstate= new Batt_rtstate();
+		rtstate.setBattGroupId(battGroupId);
 		ServiceModel model=service.serchByCondition(rtstate);
-		//System.out.println(model);
-		// result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
 		return model;
 	}
 	
 	//9.1鏍规嵁鏌ヨ鐢垫睜缁勫崟浣撶殑瀹炴椂鏁版嵁(鐢垫睜鍗曚綋瀹炴椂淇℃伅)
-	@GetMapping("byMons")
-	public ServiceModel serchByMons(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
+	@PostMapping("byMons")
+	@ApiOperation(notes = "",value="鏌ヨ鐢垫睜缁勫崟浣撶殑瀹炴椂鏁版嵁(鐢垫睜鍗曚綋瀹炴椂淇℃伅)")
+	public ServiceModel serchByMons(@RequestParam Integer battGroupId,@RequestParam Integer monNum) {
+		BattInf binf = new BattInf();
+		binf.setBattGroupId(battGroupId);
+		binf.setMonNum(monNum);
 		ServiceModel model = service.serchByMons(binf);
 		return model;
 	}
 	
 	//鏍规嵁鐢垫睜缁刬d鏌ヨ璇ョ數姹犵粍/鍗曚綋鐨勫疄鏃舵儏鍐�(鐢垫睜缁埅鑳藉姏)
-	@GetMapping("byInfo")
-	public ServiceModel serchByInfo(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
+	@PostMapping("byInfo")
+	@ApiOperation(notes = "",value="鐢垫睜缁刬d鏌ヨ璇ョ數姹犵粍/鍗曚綋鐨勫疄鏃舵儏鍐�(鐢垫睜缁埅鑳藉姏)")
+	public ServiceModel serchByInfo(@RequestParam Integer battGroupId) {
+		BattInf binf = new BattInf();
+		binf.setBattGroupId(battGroupId);
 		ServiceModel model = service.serchByInfo(binf);
 		return model;
 	}
@@ -58,17 +57,18 @@
 //	}
 	//棣栭〉涓婇ゼ鐘跺浘鐢垫睜鐘舵�佹瘮渚�
 	@GetMapping("battStateRate")
+	@ApiOperation(notes = "",value="棣栭〉涓婇ゼ鐘跺浘鐢垫睜鐘舵�佹瘮渚�")
 	public ServiceModel serchBattStateRate(){
 		User_inf uinf=(User_inf) ActionUtil.getUser();
 		ServiceModel model = service.serchBattStateRate(uinf);
 		return model;
 	}
-	
+
 	//鐢垫睜缁勫疄鏃舵儏鍐�+瀹炴椂鐢垫睜缁埅鑳藉姏鏌ヨ
-	@GetMapping("battLife")
+	@PostMapping("battLife")
+	@ApiOperation(notes = "{ \"binf\": { \"num\": 1, \"stationId\": \"\", \"stationName\": \"\", \"stationName1\": \"\", \"battGroupId\": 0 },\"pageBean\": { \"pageNum\": 0, \"pageSize\": 22 } }",value="鐢垫睜缁勫疄鏃舵儏鍐�+瀹炴椂鐢垫睜缁埅鑳藉姏鏌ヨ")
 	public ServiceModel serchBattLife(@RequestBody Batt_Maint_Dealarm bmd){
 		System.out.println("bmd = " + bmd);
-		// Batt_Maint_Dealarm bmd = ActionUtil.getGson().fromJson(json, Batt_Maint_Dealarm.class);
 		User_inf uinf=(User_inf) ActionUtil.getUser();
 		bmd.setUinf(uinf);
 		ServiceModel model = service.serchBattLife(bmd);
@@ -77,6 +77,8 @@
 	
 	//娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鏃�)
 	@GetMapping("disOrCharge")
+	@Deprecated
+	@ApiOperation(notes = "Deprecated",value="娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鏃�)")
 	public ServiceModel serchDisOrChargr(){
 		ServiceModel model = service.serchDisOrChargr();
 		return model;
@@ -84,14 +86,18 @@
 	
 	//娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鐢ㄦ埛绠$悊鐨勬満鎴�)
 	@GetMapping("disOrCharge2")
+	@ApiOperation(notes = "",value="娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鐢ㄦ埛绠$悊鐨勬満鎴�)")
 	public ServiceModel serchDisOrChargrNew(){
 		User_inf uinf=(User_inf) ActionUtil.getUser();
 		ServiceModel model = service.serchDisOrChargrNew(uinf);
 		return model;
 	}
 	//瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅		<!--   璺ㄥ煙璁块棶 --->
-	@GetMapping("byCondition_ky")
-	public ServiceModel serchByCondition_ky(@RequestBody Batt_rtstate rtstate){
+	@PostMapping("byCondition_ky")
+	@ApiOperation(tags = "璺ㄥ煙", notes = "",value="瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅 璺ㄥ煙璁块棶")
+	public ServiceModel serchByCondition_ky(@RequestParam Integer battGroupId){
+		Batt_rtstate rtstate= new Batt_rtstate();
+		rtstate.setBattGroupId(battGroupId);
 		//ActionUtil.isAllowHeaders();				//鍏佽璺ㄥ煙璁块棶
 		// rtstate = ActionUtil.getGson().fromJson(json, Batt_rtstate.class);
 		ServiceModel model=service.serchByCondition_ky(rtstate);

--
Gitblit v1.9.1