增加长期监测设备接口
This commit is contained in:
parent
9822118086
commit
ef0af0b2da
|
|
@ -92,7 +92,7 @@ public class SurvDeviceDeployController {
|
||||||
// deployTypes.add(PollutionConstants.CAMERA);
|
// deployTypes.add(PollutionConstants.CAMERA);
|
||||||
deployTypes.add(PollutionConstants.AIR_SURV);
|
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||||
deployTypes.add(PollutionConstants.SOIL_SURV);
|
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||||
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(stationCode,deployTypes);
|
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(stationCode,deployTypes,null);
|
||||||
|
|
||||||
return R.ok(deploys);
|
return R.ok(deploys);
|
||||||
}
|
}
|
||||||
|
|
@ -131,7 +131,7 @@ public class SurvDeviceDeployController {
|
||||||
deployTypes.add(PollutionConstants.WATER_QULITY);
|
deployTypes.add(PollutionConstants.WATER_QULITY);
|
||||||
deployTypes.add(PollutionConstants.WATER_ORIENT);
|
deployTypes.add(PollutionConstants.WATER_ORIENT);
|
||||||
deployTypes.add(PollutionConstants.WATER_LIVE);
|
deployTypes.add(PollutionConstants.WATER_LIVE);
|
||||||
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(stationCode,deployTypes);
|
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(stationCode,deployTypes,null);
|
||||||
return R.ok(deploys);
|
return R.ok(deploys);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,32 @@ public class SurvStationInfoController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各站点设备查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value="非站点监测设备查询", notes="各站点设备查询")
|
||||||
|
@GetMapping(value = "/fdeviceList")
|
||||||
|
@ApiLogin
|
||||||
|
public R fdeviceList(@RequestParam(required = false) String stationCode,@RequestParam(required = false) String stationFilter) {
|
||||||
|
|
||||||
|
JSONArray joa = new JSONArray();
|
||||||
|
List<String> deployTypes = new ArrayList<>();
|
||||||
|
// deployTypes.add(PollutionConstants.CAMERA);
|
||||||
|
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||||
|
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||||
|
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(stationCode,deployTypes,stationFilter);
|
||||||
|
List<SurvDeviceDeploy> adds = new ArrayList<>();
|
||||||
|
if(!deploys.isEmpty()){
|
||||||
|
for (SurvDeviceDeploy deploy : deploys) {
|
||||||
|
deploy.setStationName("长期定位监测点位");
|
||||||
|
}
|
||||||
|
adds = iotutils.addOnlineStatus(deploys);
|
||||||
|
}
|
||||||
|
joa.add(adds);
|
||||||
|
return R.ok(joa);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -482,7 +507,7 @@ public class SurvStationInfoController {
|
||||||
// deployTypes.add(PollutionConstants.CAMERA);
|
// deployTypes.add(PollutionConstants.CAMERA);
|
||||||
deployTypes.add(PollutionConstants.AIR_SURV);
|
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||||
deployTypes.add(PollutionConstants.SOIL_SURV);
|
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||||
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(null,deployTypes);
|
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(null,deployTypes,null);
|
||||||
if(!deploys.isEmpty()){
|
if(!deploys.isEmpty()){
|
||||||
for (SurvDeviceDeploy deploy : deploys) {
|
for (SurvDeviceDeploy deploy : deploys) {
|
||||||
CommonLocationTrans ent = new CommonLocationTrans();
|
CommonLocationTrans ent = new CommonLocationTrans();
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,7 @@ public class UserInfoController {
|
||||||
userInfoService.updateProCity(request, userInfo.getId());
|
userInfoService.updateProCity(request, userInfo.getId());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(userInfo);
|
return R.ok(userInfo);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public interface SurvDeviceDeployMapper extends BaseMapper<SurvDeviceDeploy> {
|
||||||
|
|
||||||
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
||||||
|
|
||||||
List<SurvDeviceDeploy> getDeviceListByStations(@Param("stationCode")String stationCode,@Param("deployTypeList") List<String> deployTypeList);
|
List<SurvDeviceDeploy> getDeviceListByStations(@Param("stationCode")String stationCode,@Param("deployTypeList") List<String> deployTypeList,@Param("stationFilter")String stationFilter);
|
||||||
|
|
||||||
SurvDeviceDeploy getDeployZhibiao(@Param("deployId") String deployId);
|
SurvDeviceDeploy getDeployZhibiao(@Param("deployId") String deployId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,12 @@
|
||||||
<if test="stationCode != null and stationCode != ''">
|
<if test="stationCode != null and stationCode != ''">
|
||||||
and STATION_CODE = #{stationCode}
|
and STATION_CODE = #{stationCode}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="stationFilter != null and stationFilter == '1'">
|
||||||
|
and STATION_CODE <> ''
|
||||||
|
</if>
|
||||||
|
<if test="stationFilter != null and stationFilter == '0'">
|
||||||
|
and (STATION_CODE is null or STATION_CODE = '')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by SORT_NO,CREATE_TIME desc
|
order by SORT_NO,CREATE_TIME desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public interface ISurvDeviceDeployService extends IService<SurvDeviceDeploy> {
|
||||||
|
|
||||||
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
||||||
|
|
||||||
List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes);
|
List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes,String stationFilter);
|
||||||
|
|
||||||
SurvDeviceDeploy getDeployZhibiao(String deployId);
|
SurvDeviceDeploy getDeployZhibiao(String deployId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ public class SurvDeviceDeployServiceImpl extends ServiceImpl<SurvDeviceDeployMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes) {
|
public List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes,String stationFilter) {
|
||||||
return baseMapper.getDeviceListByStations(stationCode,deployTypes);
|
return baseMapper.getDeviceListByStations(stationCode,deployTypes,stationFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue