zhuo
2025-02-15 74205424049d169a8d3bbabb74b4c8c9adf1ec99
cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
@@ -20,6 +20,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@@ -150,10 +151,10 @@
    }
    @ApiOperation(value = "通过设备编号获取设备列表")
    @PostMapping("/selectDeviceByCode")
    @GetMapping("/selectDeviceByCode")
    @ValueAuth
    public Result selectDeviceByCode(String code) {
        return Result.success(deviceService.selectDeviceByCode(code));
    public Result selectDeviceByCode(Integer id) {
        return Result.success(deviceService.selectDeviceByCode(id));
    }
    @ValueAuth
@@ -216,4 +217,18 @@
        return Result.success(deviceService.treeDevice(deviceName));
    }
}
    @ApiOperation(value = "设备档案导出")
    @GetMapping("/exportDeviceFile")
    @ValueAuth
    public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response) throws Exception {
        deviceService.exportDeviceFile(deviceId,response);
    }
    @ApiOperation(value = "仪器设备一览表导出")
    @GetMapping("/exportEquipmentDetails")
    @ValueAuth
    public void exportEquipmentDetails(HttpServletResponse response) throws Exception {
        deviceService.exportEquipmentDetails(response);
    }
}