| | |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.services.BattPower_offService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @RequestMapping("battPowerOff") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "battPowerOff接口") |
| | | public class BattPower_offController{ |
| | | |
| | | @Resource |
| | | private BattPower_offService service; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="新增") |
| | | public ServiceModel add(@RequestBody BattPower_off bpo) { |
| | | // BattPower_off bpo = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattPower_off.class); |
| | | ServiceModel model = service.add(bpo); |
| | |
| | | } |
| | | |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改") |
| | | public ServiceModel update(@RequestBody BattPower_off bpo) { |
| | | // BattPower_off bpo = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattPower_off.class); |
| | | ServiceModel model = service.update(bpo); |
| | |
| | | return model; |
| | | } |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody BattPower_off bpo) { |
| | | // BattPower_off bpo = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattPower_off.class); |
| | | ServiceModel model = service.delete(bpo); |
| | |
| | | /* |
| | | * 时间段选择放在:binf的battproductdate*/ |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "时间段选择放在:binf的battproductdate",value="机房断电统计查询") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd){ |
| | | // Batt_Maint_Dealarm bmd = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_Maint_Dealarm.class); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | |
| | | |
| | | //机房断电统计(首页上的饼状图) |
| | | @GetMapping("powerOff") |
| | | @ApiOperation(notes = "",value="机房断电统计(首页上的饼状图)") |
| | | public ServiceModel serchPowerOff(){ |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | ServiceModel model = service.serchPowerOff(uinf); |
| | |
| | | return model; |
| | | } |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="all") |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model = service.searchAll(); |
| | | |