|
|
@@ -1,7 +1,9 @@
|
|
|
package com.xunmei.system.controller;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
+import com.xunmei.common.core.vo.IdNameVo;
|
|
|
import com.xunmei.common.security.annotation.InnerAuth;
|
|
|
import com.xunmei.system.api.domain.SysDevice;
|
|
|
import com.xunmei.system.api.domain.SysOrg;
|
|
|
@@ -49,6 +51,19 @@ public class SysDeviceController extends BaseController {
|
|
|
return sysDeviceService.selectPage(sysDevice);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "按条件返回当前机构设备id+name")
|
|
|
+ @GetMapping("/listidname")
|
|
|
+ public AjaxResult listIdName(SysDevice sysDevice) {
|
|
|
+ sysDevice.setPageNum(1L);
|
|
|
+ sysDevice.setPageSize(99999L);
|
|
|
+
|
|
|
+ List<?> table = sysDeviceService.selectPage(sysDevice).getRows();
|
|
|
+ List<IdNameVo> voList = table.stream().map(r -> {
|
|
|
+ return new IdNameVo(((SysDevice) r).getId(), ((SysDevice) r).getDeviceName(), "");
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ return success(voList);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 获取【请填写功能名称】详细信息
|
|
|
@@ -111,6 +126,7 @@ public class SysDeviceController extends BaseController {
|
|
|
public SysDevice getInfoById(Long id) {
|
|
|
return sysDeviceService.getById(id);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 修改【请填写功能名称】
|
|
|
*/
|