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/BattInfController.java |   85 +++++++++++++++++++++++++++---------------
 1 files changed, 54 insertions(+), 31 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/BattInfController.java b/src/main/java/com/fgkj/controller/BattInfController.java
index 686dedd..355b07a 100644
--- a/src/main/java/com/fgkj/controller/BattInfController.java
+++ b/src/main/java/com/fgkj/controller/BattInfController.java
@@ -96,7 +96,7 @@
 	}
 
 	@GetMapping("all")
-	@ApiOperation(notes = "",value="all")
+	@ApiOperation(notes = "鏌ユ墍鏈夌殑鐢垫睜缁�",value="all")
 	public ServiceModel searchAll() {
 		return service.searchAll();
 	}
@@ -155,14 +155,14 @@
 	//----------鏍规嵁StationName1锛堢淮鎶ゅ尯锛� 鏌ヤ笉閲嶅鐨凷tationName锛堢珯鐐癸級涓嶅寘鍚�91000000涓�鏈熻澶�
 	@PostMapping("byStationNameWithout91")
 	@ApiOperation(notes = "",value="StationName1锛堢淮鎶ゅ尯锛� 鏌ヤ笉閲嶅鐨凷tationName锛堢珯鐐癸級涓嶅寘鍚�91000000涓�鏈熻澶�")
-	public ServiceModelOnce serchByStationNameNot91(@RequestParam String stationName1) {
+	public ServiceModelOnce serchByStationNameNot91(@ApiParam(value = "鐪�",required = true) @RequestParam String stationName1) {
 		BattInf bif = new BattInf();
 		bif.setStationName1(stationName1);
 		return service.serchByStationNameNot91(bif);
 	}
 //--鏌ヤ笉閲嶅鐨凷tationName1锛堢淮鎶ゅ尯锛�
 	@GetMapping("byStation")
-	@ApiOperation(notes = "",value="鏌ヤ笉閲嶅鐨凷tationName1锛堢淮鎶ゅ尯锛�")
+	@ApiOperation(notes = "sum 闆嗗悎闀垮害",value="鏌ヤ笉閲嶅鐨凷tationName1锛堢淮鎶ゅ尯锛�")
 	public ServiceModelOnce serchByStation(){
 		return service.serchByStation();
 	}
@@ -181,8 +181,8 @@
 	}
 	// ----------鏌ヨ鎵�鏈夌殑甯�
 	@PostMapping("allStationName2")
-	@ApiOperation(notes = "",value="鏌ヨ鎵�鏈夌殑甯�")
-	public ServiceModel serchAllStationName2(@RequestParam String stationName1) {
+	@ApiOperation(notes = "妯$硦鏌ヨ",value="鏌ヨ鎵�鏈夌殑甯�")
+	public ServiceModel serchAllStationName2(@ApiParam(value = "鐪�",required = true) @RequestParam String stationName1) {
 		BattInf binf = new BattInf();
 		User_inf uinf=(User_inf) ActionUtil.getUser();
 		binf.setNum(uinf.getuId());
@@ -202,7 +202,7 @@
 	}
 	//--鏌ヨ鎵�鏈夌殑鏈烘埧
 	@PostMapping("allStationName")
-	@ApiOperation(notes = "",value="鏌ヨ鎵�鏈夌殑鏈烘埧")
+	@ApiOperation(notes = "",value="鏌ヨ鎵�鏈夌殑鏈烘埧鈥斿甫鍙�")
 	public ServiceModel serchAllStationName(@ApiParam(value = "鐪�",required = true) @RequestParam String stationName1,@ApiParam(value = "甯�",required = true) @RequestParam String stationName2,@ApiParam(value = "鍖�",required = true) @RequestParam String stationName5) {
 		BattInf binf = new BattInf();
 		User_inf uinf = (User_inf) ActionUtil.getUser();
@@ -267,7 +267,7 @@
 	//鍒ゆ柇鏂板鐨勭數姹犵粍鏄惁瀛樺湪
 	@PostMapping("judgeBatt")
 	@ApiOperation(notes = "",value="鍒ゆ柇鏂板鐨勭數姹犵粍鏄惁瀛樺湪")
-	public ServiceModel judgeBatt(@RequestParam String stationName) {
+	public ServiceModel judgeBatt(@ApiParam(value = "绔欑偣",required = true) @RequestParam String stationName) {
 		BattInf binf = new BattInf();
 		binf.setStationName(stationName);
 		return service.judgeBatt(binf);
@@ -420,47 +420,70 @@
 
 		return service.serchAllStation(u);
 	}
-	
-	//鎼滅储鏈烘埧鎴栫數姹犵粍
-	@GetMapping("stationOrBattGroup")
-	@ApiOperation(notes = "",value="鎼滅储鏈烘埧鎴栫數姹犵粍")
-	public ServiceModel serchStationOrBattgroup(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
 
+	//鎼滅储鏈烘埧鎴栫數姹犵粍
+	@PostMapping("stationOrBattGroup")
+	@ApiOperation(notes = "num:1 鏈烘埧;0鐢垫睜缁� 涓ょ鐘舵�� stationName9 妯$硦鏌ヨ鏉′欢", value = "鎼滅储鏈烘埧鎴栫數姹犵粍")
+	public ServiceModel serchStationOrBattgroup(@ApiParam(value = "1 鏈烘埧;0 鐢垫睜缁�",required = true) @RequestParam Integer num,@RequestParam String stationName9) {
+		BattInf binf = new BattInf();
+		binf.setNum(num);
+		binf.setStationName9(stationName9);
 		return service.serchStationOrBattgroup(binf);
 	}
+
 	//鏍规嵁鏈烘埧id鏌ヨ鏈烘埧涓嬬殑鐢垫睜缁勪俊鎭�
-	@GetMapping("battByStationId")
+	@PostMapping("battByStationId")
 	@ApiOperation(notes = "",value="鏈烘埧id鏌ヨ鏈烘埧涓嬬殑鐢垫睜缁勪俊鎭�")
-	public ServiceModel serchBattByStation(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
-		// result = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").toJson(model);
+	public ServiceModel serchBattByStation(@RequestParam String stationId){
+		ServiceModel model = new ServiceModel();
+		BattInf binf = new BattInf();
+		try {
+			Integer.parseInt(stationId);
+		} catch (NumberFormatException e) {
+			e.printStackTrace();
+			model.setMsg("鍙傛暟涓嶅悎娉�");
+			return model;
+		}
+		binf.setStationId(stationId);
 		return service.serchBattByStation(binf);
 	}
 	
 	//鏌ヨ鎵�鏈夌殑鐢垫睜缁勬暟
 	@GetMapping("battCount")
 	@ApiOperation(notes = "",value="鏌ヨ鎵�鏈夌殑鐢垫睜缁勬暟")
-	public ServiceModel serchAllBatt(){
+	public ServiceModelOnce serchAllBatt(){
 		User_inf u = (User_inf)ActionUtil.getUser();
 
 		return service.serchAllBatt(u);
 	}
-	//鏌ョ珯鐐逛笅鐨勬墍鏈夎澶囧悕绉�
-	@GetMapping("devNameByStationName3")
-	@ApiOperation(notes = "",value="鏌ョ珯鐐逛笅鐨勬墍鏈夎澶囧悕绉�")
-	public ServiceModel searchDevByStationName3(@RequestBody BattInf binf){
-		// BattInf binf = ActionUtil.getGson().fromJson(json, BattInf.class);
 
+	//鏌ョ珯鐐逛笅鐨勬墍鏈夎澶囧悕绉�
+	@PostMapping("devNameByStationName3")
+	@ApiOperation(notes = "妯$硦鏌ヨ", value = "鏌ョ珯鐐逛笅鐨勬墍鏈夎澶囧悕绉�")
+	public ServiceModel searchDevByStationName3(@ApiParam(value = "鐪�", required = true) @RequestParam String stationName1, @ApiParam(value = "甯�", required = true) @RequestParam String stationName2,
+												@ApiParam(value = "鏈烘埧", required = true) @RequestParam String stationName3, @ApiParam(value = "鍖�", required = true) @RequestParam String stationName5) {
+		BattInf binf = new BattInf();
+		binf.setStationName1(stationName1);
+		binf.setStationName2(stationName2);
+		binf.setStationName3(stationName3);
+		binf.setStationName5(stationName5);
 		return service.searchDevByStationName3(binf);
 	}
 	
 	//棣栭〉涓婃牴鎹畇tationid鏌ヨ鐢垫睜缁勭殑鏈哄巻鍗�
-	@GetMapping("battAllInfoByStationId")
+	@PostMapping("battAllInfoByStationId")
 	@ApiOperation(notes = "",value="棣栭〉涓婃牴鎹畇tationid鏌ヨ鐢垫睜缁勭殑鏈哄巻鍗�")
-	public ServiceModel serchBattAllInfoByStationId(@RequestBody BattInf binf){
-		// BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
-
+	public ServiceModel serchBattAllInfoByStationId(@RequestParam String stationId){
+		ServiceModel model = new ServiceModel();
+		BattInf binf = new BattInf();
+		try {
+			Integer.parseInt(stationId);
+		} catch (NumberFormatException e) {
+			e.printStackTrace();
+			model.setMsg("鍙傛暟涓嶅悎娉�");
+			return model;
+		}
+		binf.setStationId(stationId);
 		return service.serchBattAllInfoByStationId(binf);
 	}
 	//璺ㄥ煙璁块棶鑾峰彇鎵�鏈夌數姹犵粍鐨勪俊鎭�<-------璺ㄥ煙----------->
@@ -473,7 +496,7 @@
 	}
 	//娣诲姞鏂扮殑鐢垫睜缁�
 	@PostMapping("ky")
-	@ApiOperation(notes = "",value="娣诲姞鏂扮殑鐢垫睜缁�")
+	@ApiOperation(notes = "TODO",value="娣诲姞鏂扮殑鐢垫睜缁凾ODO")
 	public ServiceModel add_ky(@RequestBody List<BattInf> list) {
 		// List<BattInf> list= getGson("yyyy-MM-dd").fromJson(json, new TypeToken<List<BattInf>>(){}.getType());
 
@@ -498,10 +521,10 @@
 	
 	//鏌ヨ鐢垫睜缁勪俊鎭�<澶у睆鏄剧ず>
 	@GetMapping("battOnBigScreen")
-	@ApiOperation(notes = "",value="鏌ヨ鐢垫睜缁勪俊鎭�<澶у睆鏄剧ず>")
-	public ServiceModel serchBatt_DP(@RequestBody BattInf binf){
-		// BattInf binf= getGson("yyyy-MM-dd").fromJson(json, BattInf.class);
+	@ApiOperation(notes = "鏈娇鐢ㄥ弬鏁版煡璇�",value="鏌ヨ鐢垫睜缁勪俊鎭�<澶у睆鏄剧ず>")
+	public ServiceModel serchBatt_DP(){
 
+		BattInf binf= new BattInf();
 		return service.serchBatt_DP(binf);
 	}
 	//绱櫠灞辫タ鈥斺��---鏈烘埧鍒楄〃

--
Gitblit v1.9.1