Commit f1fc791e authored by KeYong's avatar KeYong

修改中心级人员展示及去掉错误冗余代码

parent 54a5fdf7
......@@ -35,6 +35,7 @@ import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDataSyncService;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
......@@ -767,8 +768,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Map<String, AgencyUserModel> collect = new HashMap<>();
if (CollectionUtils.isNotEmpty(amosIds)) {
String join = String.join(",", amosIds);
try {
List<AgencyUserModel> amosUser = Privilege.agencyUserClient.queryByIds(join, false).getResult();
collect = amosUser.stream().collect(Collectors.toMap(AgencyUserModel::getUserId, t -> t));
} catch (InnerInvokException e) {
throw new RuntimeException("未查询到人员信息,请检查!");
}
}
Map<String, AgencyUserModel> finalCollect = collect;
list.forEach(t -> {
......
......@@ -864,6 +864,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
public Page buildingList(Page page, BuildSearchDTO dto) {
Optional.ofNullable(dto.getInstanceId()).orElseThrow(() -> new BadRequest("instanceId参数不能为空"));
Optional.ofNullable(dto.getGroupType()).orElseThrow(() -> new BadRequest("groupType参数不能为空"));
// 由于前端并未使用分页组件,导致展示不全,所以未免产生歧义此处展示所有
if ("allBuilding".equalsIgnoreCase(dto.getGroupType())) {
page.setSize(1000);
}
// 根据不同的groupType 查询分页
PageOperation targetOperation = PageOperatorFactory
.getOperation(dto.getGroupType())
......
......@@ -6100,7 +6100,7 @@
) AS total,
(select
count(sequence_nbr)fire-resource-superv
count(sequence_nbr)
from
cb_water_resource
<where>
......
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