|
|
@@ -83,12 +83,20 @@ public class IotHomeServiceImpl implements IIotHomeService {
|
|
|
devtypeBidList = Arrays.asList(devtypeBids);
|
|
|
}
|
|
|
Integer distance = reqVo.getDistance();
|
|
|
+ String devStatus = reqVo.getDevStatus();
|
|
|
+ List<String> devStatusList = new ArrayList<>();
|
|
|
+ if(devStatus!= null) {
|
|
|
+ devStatusList.add(devStatus);
|
|
|
+ if("0".equals(devStatus)) {
|
|
|
+ devStatusList.add("3");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
IotDeviceListReqVo req = new IotDeviceListReqVo();
|
|
|
req.setTid(tid);
|
|
|
req.setDevQuery(devQery);
|
|
|
req.setDevtypeBidList(devtypeBidList);
|
|
|
- req.setDevStatus(reqVo.getDevStatus());
|
|
|
+ req.setDevStatusList(devStatusList);
|
|
|
|
|
|
List<IotDeviceListResVo> iotDeviceList = iIotDeviceService.selectIotDeviceListByType(req);
|
|
|
Map<String, IotDeviceListResVo> deviceMap = new HashMap<>();
|
|
|
@@ -129,18 +137,16 @@ public class IotHomeServiceImpl implements IIotHomeService {
|
|
|
List<IotHomeDeviceListResVo> resultList = new ArrayList<>();
|
|
|
for(IotHomeDeviceListResVo item : dataList) {
|
|
|
IotDeviceListResVo deviceInfo = deviceMap.get(item.getDevBid());
|
|
|
- if(deviceInfo == null){
|
|
|
+ if (deviceInfo == null) {
|
|
|
continue;
|
|
|
}
|
|
|
String address = "";
|
|
|
- try{
|
|
|
- address = deviceInfo.getDevProvince() + deviceInfo.getDevCity() + deviceInfo.getDevDistrict();
|
|
|
- }catch (Exception e){
|
|
|
+ if (!StringUtils.isEmpty(deviceInfo.getDevProvincealign()) && !StringUtils.isEmpty(deviceInfo.getDevCityalign()) && !StringUtils.isEmpty(deviceInfo.getDevDistrictalign())){
|
|
|
+ address = deviceInfo.getDevProvincealign() + deviceInfo.getDevCityalign() + deviceInfo.getDevDistrictalign();
|
|
|
}
|
|
|
- if(StringUtils.isEmpty(address)){
|
|
|
- try{
|
|
|
- address = deviceInfo.getDevProvincealign() + deviceInfo.getDevCityalign() + deviceInfo.getDevDistrictalign();
|
|
|
- }catch (Exception e){
|
|
|
+ if (StringUtils.isEmpty(address)){
|
|
|
+ if (!StringUtils.isEmpty(deviceInfo.getDevProvince()) &&!StringUtils.isEmpty(deviceInfo.getDevCity()) &&!StringUtils.isEmpty(deviceInfo.getDevDistrict())){
|
|
|
+ address = deviceInfo.getDevProvince() + deviceInfo.getDevCity() + deviceInfo.getDevDistrict();
|
|
|
}
|
|
|
}
|
|
|
|