| | |
| | | package com.fgkj.controller; |
| | | |
| | | import java.util.List; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.util.*; |
| | | |
| | | import com.fgkj.dto.Batt_discharge; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.services.Batt_dischargeService; |
| | | import com.google.gson.reflect.TypeToken; |
| | | 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 |
| | | @Api(tags = "battDischarge接口 Deprecated") |
| | | @Deprecated |
| | | public class Batt_dischargeController{ |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private Batt_dischargeService service; |
| | | |
| | | |
| | | |
| | | //批量添加 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "[{ \"uid\": 12, \"dev_id\": 91100013, \"record_time\": \"2021-01-28 14:53:21\" }]",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()); |
| | | // User_inf user = (User_inf) ActionUtil.getUser(); |
| | | 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); |
| | |
| | | } |
| | | //根据设备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); |
| | |
| | | } |
| | | //根据省市区县机房信息查询出所有不能放电的站 |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="省市区县机房信息查询出所有不能放电的站") |
| | | public ServiceModel searchAll() { |
| | | ServiceModel model=service.searchAll(); |
| | | |
| | |
| | | } |
| | | //根据省市区县机房信息查询出所有能放电的站 |
| | | @GetMapping("allNotIn") |
| | | @ApiOperation(notes = "",value="省市区县机房信息查询出所有能放电的站") |
| | | public ServiceModel searchAllNotIn() { |
| | | ServiceModel model=service.searchAllNotIn(); |
| | | |