whycrzh
2021-01-28 c8332186836b3dfe1fbd32d7bec7cd29a57e1888
src/main/java/com/fgkj/controller/Batt_electricityController.java
@@ -8,6 +8,7 @@
import com.fgkj.services.Batt_electricityService;
import com.fgkj.services.User_logService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -15,7 +16,7 @@
@RequestMapping("battElectricity")
@RestController
@Api
@Api(tags = "battElectricity接口")
public class Batt_electricityController{
   @Resource
@@ -24,6 +25,7 @@
   private User_logService uservice;
   @PostMapping("/")
   @ApiOperation(notes = "",value="新增")
   public ServiceModel add(@RequestBody Batt_electricity be){
      // Batt_electricity be = getGson().fromJson(json, Batt_electricity.class);
      ServiceModel model = service.add(be);
@@ -35,6 +37,7 @@
      return model;
   }
   @PutMapping("/")
   @ApiOperation(notes = "",value="修改")
   public ServiceModel update(@RequestBody Batt_electricity be){
      // Batt_electricity be = getGson().fromJson(json, Batt_electricity.class);
      ServiceModel model  = service.update(be);
@@ -42,6 +45,7 @@
      return model;
   }
   @DeleteMapping("/")
   @ApiOperation(notes = "",value="删除")
   public ServiceModel del(@RequestBody Batt_electricity be){
      // Batt_electricity be = getGson().fromJson(json, Batt_electricity.class);
      ServiceModel model = service.del(be);
@@ -49,6 +53,7 @@
      return model;
   }
   @GetMapping("all")
   @ApiOperation(notes = "",value="all")
   public ServiceModel searchAll(){
      ServiceModel model = service.searchAll();
@@ -62,6 +67,7 @@
    * 统计方式放在battinf  的signalname  中       1 - 月       2-季度    3-年份
    * */
   @GetMapping("byCondition")
   @ApiOperation(notes = "根据设备id连battinf和batt_devdischarge表",value="查询电度")
   public List serchByCondition(@RequestBody BattInf binf){
      // BattInf binf = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
      List list = service.serchByCondition(binf);
@@ -71,6 +77,7 @@
   
   //9.1机房主控中用电量的统计的折线图
   @GetMapping("byInfo")
   @ApiOperation(notes = "",value="机房主控中用电量的统计的折线图")
   public ServiceModel  serchByInfo(@RequestBody BattInf binf){
      // BattInf binf = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
      //System.out.println(binf);