From 0f24731e84183146193ed19d1a51f7f63a98cd1a Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期五, 29 一月 2021 10:25:00 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/Batt_rtstateController.java |   49 +++++++++++++++++++++++--------------------------
 1 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/Batt_rtstateController.java b/src/main/java/com/fgkj/controller/Batt_rtstateController.java
index 89801dd..adb5b96 100644
--- a/src/main/java/com/fgkj/controller/Batt_rtstateController.java
+++ b/src/main/java/com/fgkj/controller/Batt_rtstateController.java
@@ -5,10 +5,7 @@
 import com.fgkj.util.ActionUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-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 org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
@@ -20,35 +17,33 @@
 	@Resource
 	private Batt_rtstateService service;
 
-	ServiceModel model = new ServiceModel();
-
-	// private Batt_rtstate rtstate;
-
 	//瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅
-	@GetMapping("byCondition")
+	@PostMapping("byCondition")
 	@ApiOperation(notes = "",value="瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅")
-	public ServiceModel serchByCondition(@RequestBody Batt_rtstate rtstate){
-		//System.out.println("寮�濮嬫煡璇tstate");
+	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")
+	@PostMapping("byMons")
 	@ApiOperation(notes = "",value="鏌ヨ鐢垫睜缁勫崟浣撶殑瀹炴椂鏁版嵁(鐢垫睜鍗曚綋瀹炴椂淇℃伅)")
-	public ServiceModel serchByMons(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
+	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")
+	@PostMapping("byInfo")
 	@ApiOperation(notes = "",value="鐢垫睜缁刬d鏌ヨ璇ョ數姹犵粍/鍗曚綋鐨勫疄鏃舵儏鍐�(鐢垫睜缁埅鑳藉姏)")
-	public ServiceModel serchByInfo(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
+	public ServiceModel serchByInfo(@RequestParam Integer battGroupId) {
+		BattInf binf = new BattInf();
+		binf.setBattGroupId(battGroupId);
 		ServiceModel model = service.serchByInfo(binf);
 		return model;
 	}
@@ -68,13 +63,12 @@
 		ServiceModel model = service.serchBattStateRate(uinf);
 		return model;
 	}
-	
+
 	//鐢垫睜缁勫疄鏃舵儏鍐�+瀹炴椂鐢垫睜缁埅鑳藉姏鏌ヨ
-	@GetMapping("battLife")
-	@ApiOperation(notes = "",value="鐢垫睜缁勫疄鏃舵儏鍐�+瀹炴椂鐢垫睜缁埅鑳藉姏鏌ヨ")
+	@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);
@@ -83,7 +77,8 @@
 	
 	//娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鏃�)
 	@GetMapping("disOrCharge")
-	@ApiOperation(notes = "",value="娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鏃�)")
+	@Deprecated
+	@ApiOperation(notes = "Deprecated",value="娴嬭瘯鏁版嵁鈥斺�斿疄鏃舵煡璇腑宸︿笅瑙掔殑鍏呮斁鐢电粺璁�(鏃�)")
 	public ServiceModel serchDisOrChargr(){
 		ServiceModel model = service.serchDisOrChargr();
 		return model;
@@ -98,9 +93,11 @@
 		return model;
 	}
 	//瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅		<!--   璺ㄥ煙璁块棶 --->
-	@GetMapping("byCondition_ky")
+	@PostMapping("byCondition_ky")
 	@ApiOperation(tags = "璺ㄥ煙", notes = "",value="瀹炴椂鐩戞祴涓殑鏌ヨ瀹炴椂缁勭淇℃伅 璺ㄥ煙璁块棶")
-	public ServiceModel serchByCondition_ky(@RequestBody Batt_rtstate rtstate){
+	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