zhuo
2025-02-15 4e4047e9b523e37fd4d83cbf9fdd5abe201ba278
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;
@@ -59,10 +60,10 @@
    @ValueClassify("设备")
    @ApiOperation(value = "查询设备详情列表")
    @PostMapping("/selectDeviceParameter")
    public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception {
    public Result selectDeviceParameter(@RequestBody Map<String, Object> data,@RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull) throws Exception {
        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
        DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class);
        return Result.success(deviceService.selectDeviceParameter(page, itemParameter));
        return Result.success(deviceService.selectDeviceParameter(page, itemParameter,laboratoryNameIsNull));
    }
    @ValueClassify("设备")
@@ -150,7 +151,7 @@
    }
    @ApiOperation(value = "通过设备编号获取设备列表")
    @PostMapping("/selectDeviceByCode")
    @GetMapping("/selectDeviceByCode")
    @ValueAuth
    public Result selectDeviceByCode(String code) {
        return Result.success(deviceService.selectDeviceByCode(code));
@@ -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);
    }
}