|
|
@@ -1,18 +1,21 @@
|
|
|
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;
|
|
|
import com.ktg.common.enums.BusinessType;
|
|
|
import com.ktg.common.pojo.CommonResult;
|
|
|
+import com.ktg.common.utils.obj.BeanUtils;
|
|
|
import com.ktg.common.utils.poi.ExcelUtil;
|
|
|
import com.ktg.iscs.domain.IsHardwareType;
|
|
|
+import com.ktg.iscs.domain.dto.hardware.GetListDTO;
|
|
|
+import com.ktg.iscs.domain.vo.hardware.IsHardwareTypeVO;
|
|
|
import com.ktg.iscs.service.IIsHardwareTypeService;
|
|
|
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.*;
|
|
|
@@ -28,27 +31,24 @@ import java.util.List;
|
|
|
*/
|
|
|
@Api(tags = "硬件类型")
|
|
|
@RestController
|
|
|
-@RequestMapping("/is/type")
|
|
|
+@RequestMapping("/iscs/type")
|
|
|
public class IsHardwareTypeController extends BaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
private IIsHardwareTypeService isHardwareTypeService;
|
|
|
|
|
|
- /**
|
|
|
- * 查询硬件类型分页
|
|
|
- */
|
|
|
- @ApiOperation("查询硬件类型-分页")
|
|
|
+ @ApiOperation("查询硬件类型-列表")
|
|
|
@Parameters({
|
|
|
- @Parameter(name = "page", description = "Page"),
|
|
|
- @Parameter(name = "sysTeam", description = "实体参数")
|
|
|
+ @Parameter(name = "hardwareTypeName", description = "类型名称"),
|
|
|
+ @Parameter(name = "enableFlag", description = "是否启用(Y-N)")
|
|
|
})
|
|
|
- @PreAuthorize("@ss.hasPermi('is:type:list')")
|
|
|
- @GetMapping("/getIsHardwareTypePage")
|
|
|
- public CommonResult<Page<IsHardwareType>> getIsHardwareTypePage(Page<IsHardwareType> page, IsHardwareType isHardwareType)
|
|
|
+ @GetMapping("/getIsHardwareTypeList")
|
|
|
+ public CommonResult<List<IsHardwareTypeVO>> list(GetListDTO getListDTO)
|
|
|
{
|
|
|
- Page<IsHardwareType> result = isHardwareTypeService.page(page, Wrappers.<IsHardwareType>lambdaQuery()
|
|
|
- .orderByDesc(IsHardwareType::getId));
|
|
|
- return CommonResult.success(result);
|
|
|
+ List<IsHardwareType> list = isHardwareTypeService.list(Wrappers.<IsHardwareType>lambdaQuery()
|
|
|
+ .like(StringUtils.isNotBlank(getListDTO.getHardwareTypeName()), IsHardwareType::getHardwareTypeName, getListDTO.getHardwareTypeName())
|
|
|
+ .eq(StringUtils.isNotBlank(getListDTO.getEnableFlag()), IsHardwareType::getEnableFlag, getListDTO.getEnableFlag()));
|
|
|
+ return CommonResult.success(BeanUtils.toBean(list, IsHardwareTypeVO.class));
|
|
|
}
|
|
|
|
|
|
/**
|