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/Battresdata_infController.java |   65 ++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/Battresdata_infController.java b/src/main/java/com/fgkj/controller/Battresdata_infController.java
index a967624..faddd54 100644
--- a/src/main/java/com/fgkj/controller/Battresdata_infController.java
+++ b/src/main/java/com/fgkj/controller/Battresdata_infController.java
@@ -1,76 +1,83 @@
 package com.fgkj.controller;
 
-import com.fgkj.util.*;
-
 import com.fgkj.dto.Battresdata_inf;
 import com.fgkj.dto.ServiceModel;
 import com.fgkj.services.Battresdata_infService;
 import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
 
 @RequestMapping("battResDataInf")
 @RestController
-@Api
+@Api(tags = "battResDataInf鎺ュ彛")
 public class Battresdata_infController{
 
-	@Autowired
+	@Resource
 	private Battresdata_infService service;
 
-	private ServiceModel model;
-	// private Battresdata_inf brdi;
-
 	@PostMapping("/")
-	public ServiceModel add(@RequestBody Battresdata_inf brdi) {
-		model = service.add(brdi);
+	@ApiOperation(value="鏂板")
+	public ServiceModel add(@RequestBody Battresdata_inf dataInf) {
+		ServiceModel model = service.add(dataInf);
 		return model;
 	}
 
 	@PutMapping("/")
-	public ServiceModel update(@RequestBody Battresdata_inf brdi) {
-		model = service.update(brdi);
-		
-		//System.out.println(result);
+	@ApiOperation(value="淇敼")
+	public ServiceModel update(@RequestBody Battresdata_inf dataInf) {
+		ServiceModel model = service.update(dataInf);
 		return model;
 	}
 
 	@DeleteMapping("/")
-	public ServiceModel delete(@RequestBody Battresdata_inf brdi) {
-		model = service.delete(brdi);
-		
-		//System.out.println(result);
+	@ApiOperation(value="鍒犻櫎")
+	public ServiceModel delete(@RequestParam int num) {
+		ServiceModel model = service.delete(num);
 		return model;
 	}
 
 	@GetMapping("byCondition")
-	public ServiceModel serchByCondition(@RequestBody Battresdata_inf brdi) {
-		model = service.serchByCondition(brdi);
-		
-		//System.out.println(result);
+	@ApiOperation(value="绛涢�夊瓨鍦╞attresdata_inf琛ㄤ腑鐨勬暟鎹�")
+	public ServiceModel serchByCondition(@RequestBody Battresdata_inf dataInf) {
+		ServiceModel model = service.serchByCondition(dataInf);
 		return model;
 	}
 
 	@GetMapping("all")
+	@ApiOperation(value="all")
 	public ServiceModel searchAll() {
-		model = service.searchAll();
-		
-		//System.out.println(result);
+		ServiceModel model = service.searchAll();
 		return model;
 	}
 	
 	//6.4.1鏍规嵁鏉′欢鏌ヨ绗﹀悎鏉′欢鐨勬祴璇曞畬鎴愮殑鐢垫睜缁�(钃勭數姹犵數瀵兼祴璇曞畬鎴愮巼)
 	@GetMapping("complete")
-	public ServiceModel serchComplete(@RequestBody Battresdata_inf b){
+	@ApiOperation(value="鏉′欢鏌ヨ绗﹀悎鏉′欢鐨勬祴璇曞畬鎴愮殑鐢垫睜缁�(钃勭數姹犵數瀵兼祴璇曞畬鎴愮巼)")
+	public ServiceModel serchComplete(@RequestBody Battresdata_inf dataInf){
 		// Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class);
-		ServiceModel model=service.serchComplete(b);
+		ServiceModel model=service.serchComplete(dataInf);
 		return model;
 	}
 
 	//6.4.3鏍规嵁鏉′欢鏌ヨ绗﹀悎鏉′欢鐨勬祴璇曞畬鎴愮殑鐢垫睜缁�(钃勭數姹犵數瀵煎悎鏍肩巼)
 	@GetMapping("serRate")
-	public ServiceModel serchSer(@RequestBody Battresdata_inf b){
+	@ApiOperation(notes = "",value="鏉′欢鏌ヨ绗﹀悎鏉′欢鐨勬祴璇曞畬鎴愮殑鐢垫睜缁�(钃勭數姹犵數瀵煎悎鏍肩巼)")
+	public ServiceModel serchSer(@RequestBody Battresdata_inf dataInf){
 		// Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class);
-		ServiceModel model=service.serchSer(b);
+		ServiceModel model=service.serchSer(dataInf);
+		return model;
+	}
+
+	//6.4.3鏍规嵁鏉′欢鏌ヨ绗﹀悎鏉′欢鐨勬祴璇曞畬鎴愮殑鐢垫睜缁�(钃勭數姹犵數瀵煎悎鏍肩巼)
+	@GetMapping("judge")
+	@ApiOperation(value="judge璋冭瘯")
+	public ServiceModel judge(@RequestParam int battGroupId){
+		// Battresdata_inf b=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Battresdata_inf.class);
+		Battresdata_inf battresdata_inf = new Battresdata_inf();
+		battresdata_inf.setBattGroupId(battGroupId);
+		ServiceModel model=service.judge(battresdata_inf);
 		return model;
 	}
 

--
Gitblit v1.9.1