| | |
| | | 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; |
| | |
| | | |
| | | @RequestMapping("battElectricity") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "battElectricity接口") |
| | | public class Batt_electricityController{ |
| | | |
| | | @Resource |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | return model; |
| | | } |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="all") |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model = service.searchAll(); |
| | | |
| | |
| | | * 统计方式放在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); |
| | |
| | | |
| | | //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); |