| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Page; |
| | | import com.whyc.dto.DevInfDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevInf; |
| | | import com.whyc.service.DevInfService; |
| | | import com.whyc.service.UserInfService; |
| | | 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; |
| | | |
| | | @RestController |
| | | @Api(tags = "设备") |
| | |
| | | return service.addDev(devInf); |
| | | } |
| | | |
| | | /* @ApiOperation(value = "获取设备信息") |
| | | @ApiOperation(value = "获取设备信息") |
| | | @PostMapping("getAllInf") |
| | | public Response getAllInf(@RequestBody Page page){ |
| | | return service.getAllInf(101,page); |
| | | }*/ |
| | | public Response getAllInf(@RequestBody DevInfDto devInfDto){ |
| | | return service.getAllInf(101, devInfDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取设备信息(不分页用于包机组)") |
| | | @GetMapping("getDinf") |
| | | public Response getDinf(){ |
| | | return service.getDinf(); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取左侧列表") |
| | | @GetMapping("getDevBytype") |
| | | public Response getDevBytype(@RequestParam(required = false) Integer devType){ |
| | | return service.getDevBytype(devType); |
| | | } |
| | | |
| | | @ApiOperation(value = "新获取左侧列表") |
| | | @GetMapping("getLine") |
| | | public Response getLine(){ |
| | | return service.getDevType(101); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "编辑设备信息") |
| | | @PostMapping("updateInf") |
| | | public Response updateInf(@RequestBody DevInf dinf){ |
| | | return service.updateInf(dinf); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除设备(同时删除实时和包机组信息)") |
| | | @GetMapping("delDinf") |
| | | public Response delDinf( Integer devId){ |
| | | return service.delDinf(devId); |
| | | } |
| | | |
| | | @ApiOperation(value = "强制移除批量设备") |
| | | @PostMapping("cancelContPl") |
| | | public Response cancelContPl(@RequestBody List<Integer> devIds){ |
| | | return service.cancelContPl(devIds); |
| | | } |
| | | } |