|
|
@@ -1,6 +1,5 @@
|
|
|
package com.ktg.iscs.controller;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ktg.common.annotation.Log;
|
|
|
import com.ktg.common.core.controller.BaseController;
|
|
|
@@ -15,7 +14,6 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.Parameters;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -50,17 +48,8 @@ public class IsHardwareController extends BaseController
|
|
|
@GetMapping("/getIsHardwarePage")
|
|
|
public CommonResult<Page<IsHardware>> getIsHardwarePage(Page page, HardwarePageDTO dto)
|
|
|
{
|
|
|
- Page<IsHardware> result = isHardwareService.page(page, Wrappers.<IsHardware>lambdaQuery()
|
|
|
- .like(StringUtils.isNotBlank(dto.getHardwareCode()), IsHardware::getHardwareCode, dto.getHardwareCode())
|
|
|
- .like(StringUtils.isNotBlank(dto.getHardwareName()), IsHardware::getHardwareName, dto.getHardwareName())
|
|
|
- .eq(StringUtils.isNotBlank(dto.getStatus()), IsHardware::getStatus, dto.getStatus())
|
|
|
- .eq(dto.getHardwareTypeId() != null, IsHardware::getHardwareTypeId, dto.getHardwareTypeId())
|
|
|
- .like(StringUtils.isNotBlank(dto.getHardwareSpec()), IsHardware::getHardwareSpec, dto.getHardwareSpec())
|
|
|
- .ge(StringUtils.isNotBlank(dto.getStartTime()), IsHardware::getCreateTime, dto.getStartTime())
|
|
|
- .le(StringUtils.isNotBlank(dto.getEndTime()), IsHardware::getCreateTime, dto.getEndTime())
|
|
|
- .eq(dto.getWorkshopId() != null, IsHardware::getWorkshopId, dto.getWorkshopId())
|
|
|
- .orderByDesc(IsHardware::getId));
|
|
|
- return CommonResult.success(result);
|
|
|
+ Page<IsHardware> isHardwarePage = isHardwareService.getIsHardwarePage(page, dto);
|
|
|
+ return CommonResult.success(isHardwarePage);
|
|
|
}
|
|
|
|
|
|
/**
|