zhuo
2025-04-23 234b0ac195934b34c06045b2d2ef0f10e239dd8e
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java
@@ -34,7 +34,7 @@
     */
    @ApiOperation(value = "新增设备档案")
    @PostMapping("/addDocument")
    public Result addDocument(DeviceDocuments document) {
    public Result addDocument(@RequestBody DeviceDocuments document) {
        if (document.getDeviceId() == null) {
            throw new RuntimeException("设备id为空");
        }
@@ -48,7 +48,7 @@
     * @return
     */
    @ApiOperation(value = "查询设备档案信息")
    @GetMapping("/id")
    @GetMapping("/getDocumentById")
    public Result getDocumentById(Integer id) {
        return Result.success(deviceDocumentsService.getById(id));
    }
@@ -77,14 +77,14 @@
    /**
     * 查询设备档案列表
     * @param id
     * @param deviceId
     * @return
     */
    @ApiOperation(value = "查询设备档案列表")
    @GetMapping("/getAllDocuments")
    public Result getAllDocuments(Integer id) {
    public Result getAllDocuments(Integer deviceId) {
        LambdaQueryWrapper<DeviceDocuments> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(DeviceDocuments::getDeviceId, id);
        lambdaQueryWrapper.eq(DeviceDocuments::getDeviceId, deviceId);
        return Result.success(deviceDocumentsService.list(lambdaQueryWrapper));
    }