whycrzh
2021-01-28 c8332186836b3dfe1fbd32d7bec7cd29a57e1888
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.fgkj.controller;
 
import com.fgkj.util.*;
 
import com.fgkj.dto.Batt_discharge;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Batt_dischargeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
import javax.annotation.Resource;
 
@RequestMapping("battDischarge")
@RestController
@Api(tags = "battDischarge接口")
public class Batt_dischargeController{
 
    @Resource
    private Batt_dischargeService service;
 
    
     //批量添加
    @PostMapping("/")
    @ApiOperation(notes = "",value="批量添加")
    public ServiceModel  add(@RequestBody List<Batt_discharge> list) {
        // List<Batt_discharge> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, new TypeToken<List<Batt_discharge>>(){}.getType());
        ServiceModel model=service.add(list);
 
        return model;
    }
    //移除黑名单
    @DeleteMapping("/")
    @ApiOperation(notes = "",value="移除黑名单")
    public ServiceModel  del(@RequestBody List<Batt_discharge> list) {
        // List<Batt_discharge> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, new TypeToken<List<Batt_discharge>>(){}.getType());
        ServiceModel model=service.del(list);
 
        return model;
    }
     //根据设备id查询改设备是否被加入至黑名单
    @GetMapping("byCondition")
    @ApiOperation(notes = "",value="设备id查询改设备是否被加入至黑名单")
    public ServiceModel  serchByCondition(@RequestBody Batt_discharge bd) {
        // Batt_discharge bd=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_discharge.class);
        ServiceModel model=service.serchByCondition(bd);
 
        return model;
    }
    //根据省市区县机房信息查询出所有不能放电的站
    @GetMapping("all")
    @ApiOperation(notes = "",value="省市区县机房信息查询出所有不能放电的站")
    public ServiceModel  searchAll() {
        ServiceModel model=service.searchAll();
 
        return model;
    }
    //根据省市区县机房信息查询出所有能放电的站
    @GetMapping("allNotIn")
    @ApiOperation(notes = "",value="省市区县机房信息查询出所有能放电的站")
    public ServiceModel  searchAllNotIn() {
        ServiceModel model=service.searchAllNotIn();
 
        return model;
    }
 
    
    
 
}