|
|
|
@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import io.swagger.annotations.ApiResponse;
|
|
|
|
|
import io.swagger.annotations.ApiResponses;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
@ -257,8 +258,8 @@ public class TerminalController extends BaseController {
|
|
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
|
|
|
|
@RequestMapping("/getOnlineTerminalList")
|
|
|
|
|
@Log(title = "获取设备列表", type = "查询")
|
|
|
|
|
public ResponseReult<List<TerminalAndLastPicListExcelModel>> getOnlineTerminalList() {
|
|
|
|
|
ServiceBody<List<TerminalAndLastPicListExcelModel>> serviceBody = terminalService.getOnlineTerminalList();
|
|
|
|
|
public ResponseReult<List<TerminalAndLastPicListExcelModel>> getOnlineTerminalList(@Param("type") Integer type) {
|
|
|
|
|
ServiceBody<List<TerminalAndLastPicListExcelModel>> serviceBody = terminalService.getOnlineTerminalList(type);
|
|
|
|
|
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
|
|
|
|
return ResponseReult.success(serviceBody.getData());
|
|
|
|
|
} else {
|
|
|
|
@ -270,8 +271,8 @@ public class TerminalController extends BaseController {
|
|
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
|
|
|
|
@RequestMapping("/getOnlineTerminalListExcel")
|
|
|
|
|
@Log(title = "导出设备在线和心跳时间和照片时间列表Excel", type = "查询")
|
|
|
|
|
public void getOnlineTerminalListExcel(HttpServletResponse response) throws IOException {
|
|
|
|
|
ServiceBody<List<TerminalAndLastPicListExcelModel>> serviceBody = terminalService.getOnlineTerminalList();
|
|
|
|
|
public void getOnlineTerminalListExcel(HttpServletResponse response,@Param("type") Integer type) throws IOException {
|
|
|
|
|
ServiceBody<List<TerminalAndLastPicListExcelModel>> serviceBody = terminalService.getOnlineTerminalList(type);
|
|
|
|
|
EasyExcelUtil.createExcel(response,"设备在线表",serviceBody.getData(), TerminalAndLastPicListExcelModel.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|