add:新增页面
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
package org.nl.b_lms.pdm.error.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.pdm.error.service.DeviceFaultService;
|
||||||
|
import org.nl.common.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-02-26
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/deviceFault")
|
||||||
|
public class DeviceFalutController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeviceFaultService deviceFaultService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询故障设备时长记录")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(deviceFaultService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||||
|
deviceFaultService.download(map, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user