Commit 1fed98b3 authored by “yiyousong”'s avatar “yiyousong”
parents 528a22ed ce2c084c
...@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -261,14 +262,23 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -261,14 +262,23 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String busiDesc = "查询" + this.getModuleDesc(); String busiDesc = "查询" + this.getModuleDesc();
int code = 1; int code = 1;
try { try {
if (CollectionUtils.isNotEmpty(query.getAreaCodeList())) { if(this.getCurUser().getId()==1){
List<SiteEntity> siteEntityList = query.getAreaCodeList().parallelStream().flatMap(areaId -> List<SiteEntity> siteEntityList = new ArrayList<>();
this.service.getFlatSitesByAreaCode(areaId, getContext()).stream() SiteEntity siteEntity = new SiteEntity();
).distinct().collect(Collectors.toList()); siteEntity.setId(0l);
siteEntity.setSiteName("无站点");
siteEntityList.add(siteEntity);
model.put("data", siteEntityList); model.put("data", siteEntityList);
} else { }else {
List<SiteEntity> result = this.getService().find(query, context); if (CollectionUtils.isNotEmpty(query.getAreaCodeList())) {
model.put("data", result); List<SiteEntity> siteEntityList = query.getAreaCodeList().parallelStream().flatMap(areaId ->
this.service.getFlatSitesByAreaCode(areaId, getContext()).stream()
).distinct().collect(Collectors.toList());
model.put("data", siteEntityList);
} else {
List<SiteEntity> result = this.getService().find(query, context);
model.put("data", result);
}
} }
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】"); this.recordSysLog(this.request, busiDesc + " 【成功】");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment