zhangherong
2 天以前 3d63e7c025d5d8164df640d7c947e601c149e951
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package org.jeecg.modules.eam.controller;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.eam.entity.EamEquipmentHistoryLog;
import org.jeecg.modules.eam.entity.EamWeekMaintenanceOrder;
import org.jeecg.modules.eam.service.IEamEquipmentHistoryLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @Description: 设备履历
 * @Author: jeecg-boot
 * @Date: 2025-03-19
 * @Version: V1.0
 */
@Slf4j
@Api(tags = "设备履历")
@RestController
@RequestMapping("/eam/equipmentHistoryLog")
public class EamEquipmentHistoryLogController extends JeecgController<EamEquipmentHistoryLog, IEamEquipmentHistoryLogService> {
    @Autowired
    private IEamEquipmentHistoryLogService eamEquipmentHistoryLogService;
 
    @ApiOperation(value = "设备履历-获取设备最新履历信息", notes = "设备履历-获取设备最新履历信息")
    @GetMapping(value = "/list")
    public Result<?> selectEquipmentHistoryLog(@RequestParam("equipmentId") String equipmentId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
        Page<EamEquipmentHistoryLog> page = new Page<>(pageNo, pageSize);
        LambdaQueryWrapper<EamEquipmentHistoryLog> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(EamEquipmentHistoryLog::getEquipmentId, equipmentId);
        queryWrapper.orderByDesc(EamEquipmentHistoryLog::getCreateTime);
        Page<EamEquipmentHistoryLog> resultPage = eamEquipmentHistoryLogService.page(page, queryWrapper);
        return Result.ok(resultPage);
    }
 
}