|
@@ -23,6 +23,7 @@ import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
import com.persagy.proxy.adm.service.IAdmRelationService;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
+import com.persagy.proxy.adm.utils.AdmEntityTransferUtil;
|
|
|
import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
|
|
|
import com.persagy.proxy.adm.utils.ObjectNameUtil;
|
|
|
import com.persagy.proxy.common.entity.DmpResult;
|
|
@@ -358,9 +359,9 @@ public class AdmSystemController {
|
|
|
rwdQueryCriteria.setCriteria(criteria);
|
|
|
syses = service.doQuery(AdmContextUtil.toDmpContext(), rwdQueryCriteria, AdmSystem.class);
|
|
|
}else if("1".equals(buildingId)){
|
|
|
-
|
|
|
- syses = queryNotSureObj(buildingId, rwdQueryCriteria);
|
|
|
+ syses = queryNotSureObj(null, rwdQueryCriteria);
|
|
|
}
|
|
|
+ admSystemList = (List<AdmSystem>) syses.getContent();
|
|
|
if(CollUtil.isNotEmpty(admSystemList)){
|
|
|
|
|
|
admSystemList = dealBdFlInfo(floorId,buildingId,admSystemList);
|
|
@@ -371,6 +372,7 @@ public class AdmSystemController {
|
|
|
if(StrUtil.isNotEmpty(buildingId) && buildingId.equals("1")){
|
|
|
|
|
|
syses = queryNotSureObj(null, rwdQueryCriteria);
|
|
|
+ admSystemList = (List<AdmSystem>) syses.getContent();
|
|
|
if(CollUtil.isNotEmpty(admSystemList)){
|
|
|
|
|
|
admSystemList = dealBdFlInfo(null,null, admSystemList);
|
|
@@ -404,6 +406,8 @@ public class AdmSystemController {
|
|
|
if(StrUtil.isNotEmpty(buildingId)){
|
|
|
requestData.setBuildingId(buildingId);
|
|
|
}
|
|
|
+ requestData.setProjectId(AdmContextUtil.toDmpContext().getProjectId());
|
|
|
+ requestData.setGraphCode(AdmContextUtil.toDmpContext().getGroupCode());
|
|
|
requestData.setObjType(AdmSystem.OBJ_TYPE);
|
|
|
requestData.setPage(rwdQueryCriteria.getPage());
|
|
|
requestData.setSize(rwdQueryCriteria.getSize());
|
|
@@ -413,7 +417,7 @@ public class AdmSystemController {
|
|
|
response.setPageSize(Integer.parseInt(String.valueOf(result.getSize())));
|
|
|
response.setPageNumber(Integer.parseInt(String.valueOf(result.getCurrent())));
|
|
|
response.setResult(DmpResult.SUCCESS);
|
|
|
- response.setContent(result.getRecords());
|
|
|
+ response.setContent(AdmEntityTransferUtil.toAdmMultiEntity(result.getRecords(),null,AdmSystem.class));
|
|
|
response.setTotal(result.getTotal());
|
|
|
return response;
|
|
|
}else{
|
|
@@ -463,6 +467,12 @@ public class AdmSystemController {
|
|
|
buildingFloorInfoFl.put("FloorID",floor.getId());
|
|
|
buildingFloorInfoFl.put("FloorName",floor.getLocalName());
|
|
|
}
|
|
|
+ if(JSONUtil.isNull(buildingFloorInfo) || buildingFloorInfo.isNull() || !buildingFloorInfo.fieldNames().hasNext()){
|
|
|
+ admSystemList.stream().forEach(admSystem -> {
|
|
|
+ admSystem.setBuildingFloorInfoList(new ArrayList<>(1));
|
|
|
+ });
|
|
|
+ return admSystemList;
|
|
|
+ }
|
|
|
admSystemList.stream().forEach(admSystem -> {
|
|
|
admSystem.setBuildingFloorInfoList(Arrays.asList(buildingFloorInfo));
|
|
|
});
|