|
|
|
@ -2,6 +2,7 @@ package com.inspect.metadata.prodevmnt.controller; |
|
|
|
|
|
|
|
import com.inspect.metadata.prodevmnt.domain.BasedataDevice; |
|
|
|
import com.inspect.metadata.prodevmnt.domain.BasedataDeviceType; |
|
|
|
import com.inspect.metadata.prodevmnt.domain.BasedataDeviceTypeEx; |
|
|
|
import com.inspect.metadata.prodevmnt.domain.vo.ProDeviceTypeTreeSelectVO; |
|
|
|
import com.inspect.metadata.prodevmnt.service.IBasedataDeviceService; |
|
|
|
import com.inspect.metadata.prodevmnt.service.IBasedataDeviceTypeService; |
|
|
|
@ -18,6 +19,7 @@ import com.inspect.common.security.utils.SecurityUtils; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
@ -54,7 +56,29 @@ public class BasedataDeviceTypeController extends BaseController { |
|
|
|
@GetMapping({"/list"}) |
|
|
|
public AjaxResult list(BasedataDeviceType basedataDevicetype) { |
|
|
|
List<BasedataDeviceType> list = this.basedataDeviceTypeService.selectBasedataDeviceTypeList(basedataDevicetype); |
|
|
|
return AjaxResult.success(list); |
|
|
|
List<BasedataDeviceTypeEx> listEx = new ArrayList<>(); |
|
|
|
for(int i = 0; i < list.size(); i++) { |
|
|
|
BasedataDeviceType basedataDeviceType = list.get(i); |
|
|
|
BasedataDeviceTypeEx basedataDeviceTypeEx = new BasedataDeviceTypeEx(); |
|
|
|
basedataDeviceTypeEx.setParentName(basedataDeviceType.getParentName()); |
|
|
|
basedataDeviceTypeEx.setParentId(basedataDeviceType.getParentId()); |
|
|
|
basedataDeviceTypeEx.setOrderNum(basedataDeviceType.getOrderNum()); |
|
|
|
basedataDeviceTypeEx.setAncestors(basedataDeviceType.getAncestors()); |
|
|
|
basedataDeviceTypeEx.setChildren(basedataDeviceType.getChildren()); |
|
|
|
basedataDeviceTypeEx.setDevicetypeId(basedataDeviceType.getDeviceTypeId()); |
|
|
|
basedataDeviceTypeEx.setAncestorsAddr(basedataDeviceType.getAncestorsAddr()); |
|
|
|
basedataDeviceTypeEx.setPowerMainEquFlag(basedataDeviceType.getPowerMainEquFlag()); |
|
|
|
basedataDeviceTypeEx.setDevicetypeName(basedataDeviceType.getDeviceTypeName()); |
|
|
|
basedataDeviceTypeEx.setDevicetypeCode(basedataDeviceType.getDeviceTypeCode()); |
|
|
|
basedataDeviceTypeEx.setPhaseNum(basedataDeviceType.getPhaseNum()); |
|
|
|
basedataDeviceTypeEx.setPhase(basedataDeviceType.getPhase()); |
|
|
|
basedataDeviceTypeEx.setStatus(basedataDeviceType.getStatus()); |
|
|
|
basedataDeviceTypeEx.setDelFlag(basedataDeviceType.getDelFlag()); |
|
|
|
basedataDeviceTypeEx.setProfessionType(basedataDeviceType.getProfessionType()); |
|
|
|
basedataDeviceTypeEx.setLevel(basedataDeviceType.getLevel()); |
|
|
|
listEx.add(basedataDeviceTypeEx); |
|
|
|
} |
|
|
|
return AjaxResult.success(listEx); |
|
|
|
} |
|
|
|
|
|
|
|
@RequiresPermissions({"basedata:devicetype:export"}) |
|
|
|
|