| | |
| | | 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 |
| | | * @Date: 2025-03-19 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="设备履历") |
| | | @Api(tags = "设备履历") |
| | | @RestController |
| | | @RequestMapping("/eam/equipmentHistoryLog") |
| | | public class EamEquipmentHistoryLogController extends JeecgController<EamEquipmentHistoryLog, IEamEquipmentHistoryLogService> { |
| | | @Autowired |
| | | private IEamEquipmentHistoryLogService eamEquipmentHistoryLogService; |
| | | @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); |
| | | } |
| | | |
| | | } |