Browse Source

#站点设备查询

zhongwei
yang_shj 9 months ago
parent
commit
baf9649cbd
  1. 6
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java
  2. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

6
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java

@ -1003,12 +1003,10 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
@Override @Override
public List<EmInfoEntity> select(Long deptId) { public List<EmInfoEntity> select(Long deptId) {
if(ObjectUtil.isEmpty(deptId)){ if(ObjectUtil.isEmpty(deptId)){
return this.list(Wrappers.<EmInfoEntity>lambdaQuery() return this.list();
.in(EmInfoEntity::getEmType, "2"));
} }
return this.list(Wrappers.<EmInfoEntity>lambdaQuery() return this.list(Wrappers.<EmInfoEntity>lambdaQuery()
.eq(EmInfoEntity::getDepartment,deptId) .like(EmInfoEntity::getDepartment,deptId)
.eq(EmInfoEntity::getEmType, "2")
); );
} }

9
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

@ -1061,15 +1061,12 @@ public class WaterServiceImpl implements IWaterService {
if(MapUtils.isEmpty(rainMap)){ if(MapUtils.isEmpty(rainMap)){
return new ArrayList<>(); return new ArrayList<>();
} }
R<List<Dept>> depts = sysClient.getDeptChild(deptId); R<List<Dept>> R = sysClient.getDeptByCurrentUser();
if (!depts.isSuccess() || ObjectUtil.isEmpty(depts.getData())) { if (!R.isSuccess() || ObjectUtil.isEmpty(R.getData())) {
return new ArrayList<>(); return new ArrayList<>();
} }
// 获取水利站点 // 获取水利站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery() List<StationEntity> stations = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,false);
.in(StationEntity::getRefDept,depts.getData().stream().map(Dept::getId).collect(Collectors.toList()))
.in(StationEntity::getType,HomePageConstant.waterList)
.eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE));
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return new ArrayList<>(); return new ArrayList<>();
} }

Loading…
Cancel
Save