|
@@ -6,6 +6,7 @@ import com.jpsoft.smart.modules.common.dto.Sort;
|
|
|
import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.smart.modules.base.entity.DeviceInfo;
|
|
|
import com.jpsoft.smart.modules.base.service.DeviceInfoService;
|
|
|
+import com.jpsoft.smart.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -29,6 +30,9 @@ public class DeviceInfoController {
|
|
|
@Autowired
|
|
|
private DeviceInfoService deviceInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
+
|
|
|
@ApiOperation(value="添加设备")
|
|
|
@PostMapping("add")
|
|
|
public MessageResult<DeviceInfo> add(@RequestBody DeviceInfo deviceInfo,@RequestAttribute String subject){
|
|
@@ -217,6 +221,11 @@ public class DeviceInfoController {
|
|
|
|
|
|
Page<DeviceInfo> page = deviceInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
|
+ for (DeviceInfo deviceInfo:page) {
|
|
|
+ String typeN = dataDictionaryService.findParentId("ddf2ecbe-84a6-4f0d-a84f-2fc6917f5856",deviceInfo.getType());
|
|
|
+ deviceInfo.setTypeN(typeN);
|
|
|
+ }
|
|
|
+
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
|