|
@@ -92,27 +92,25 @@ public class AdmBuildingController {
|
|
|
filters+= "]";
|
|
|
|
|
|
admQueryCriteria.setFilters(filters);
|
|
|
- admQueryCriteria.setOnlyCount(true);
|
|
|
-
|
|
|
admQueryCriteria.setName("floor");
|
|
|
AdmResponse admResponseF = floorService.doQuery(context, admQueryCriteria, AdmFloor.class);
|
|
|
- if(DmpResult.SUCCESS.equals(admResponseF.getResult()) && admResponseF.getTotal() > 0){
|
|
|
+ if(DmpResult.SUCCESS.equals(admResponseF.getResult()) && CollUtil.isNotEmpty(admResponseF.getContent())){
|
|
|
return AdmResponse.failure(msg);
|
|
|
}
|
|
|
admQueryCriteria.setName("space");
|
|
|
AdmResponse admResponseSpace = spaceService.doQuery(context, admQueryCriteria, AdmSpace.class);
|
|
|
- if(admResponseSpace.getResult().equals(DmpResult.SUCCESS) && admResponseSpace.getTotal() > 0){
|
|
|
+ if(admResponseSpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseSpace.getContent())){
|
|
|
return AdmResponse.failure(msg);
|
|
|
}
|
|
|
admQueryCriteria.setName("ispace");
|
|
|
AdmResponse admResponseISpace = iAdmISpaceService.doQuery(context, admQueryCriteria, AdmISpace.class);
|
|
|
- if(admResponseISpace.getResult().equals(DmpResult.SUCCESS) && admResponseISpace.getTotal() > 0){
|
|
|
+ if(admResponseISpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseISpace.getContent())){
|
|
|
return AdmResponse.failure(msg);
|
|
|
}
|
|
|
|
|
|
admQueryCriteria.setName("equipment");
|
|
|
AdmResponse admResponseEuip = equipmentService.doQuery(context, admQueryCriteria, AdmEquipment.class);
|
|
|
- if(admResponseEuip.getResult().equals(DmpResult.SUCCESS) && admResponseEuip.getTotal() > 0){
|
|
|
+ if(admResponseEuip.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseEuip.getContent())){
|
|
|
return AdmResponse.failure(msg);
|
|
|
}
|
|
|
service.doDelete(context, vos);
|