Browse Source

管网区分压力流量和水质

wangyangyang 3 years ago
parent
commit
e17c327df6

+ 2 - 2
sms_water/src/main/java/com/huaxu/controller/AppReportMonitorController.java

@@ -58,9 +58,9 @@ public class AppReportMonitorController {
     @RequestMapping(value = "getDeviceCompanyBySearchForPipeNetwork",method = RequestMethod.GET)
     @ApiOperation(value = "App报表展示——公司管网设备查询(条件查询)")
     public AjaxMessage<CompanySceneInfoDto> getDeviceCompanyBySearchForPipeNetwork(
-
+            @ApiParam(value = "场景类型名称:压力、流量、水质") @RequestParam(required = false)  String typeName,
             @ApiParam(value = "查询条件") @RequestParam(required = false) String condition){
-        return new AjaxMessage<>(ResultStatus.OK,appReportMonitorService.getDeviceByCompanyBySearch(condition));
+        return new AjaxMessage<>(ResultStatus.OK,appReportMonitorService.getDeviceByCompanyBySearch(typeName,condition));
     }
 
     @RequestMapping(value = "getDeviceByCompanyForPipeNetwork",method = RequestMethod.GET)

+ 1 - 1
sms_water/src/main/java/com/huaxu/service/AppReportMonitorService.java

@@ -26,7 +26,7 @@ public interface AppReportMonitorService {
 
     List<DeviceEntity> getDeviceByCompany(String typeName,Integer companyOrgId);
 
-    CompanySceneInfoDto getDeviceByCompanyBySearch( String condition);
+    CompanySceneInfoDto getDeviceByCompanyBySearch(String typeName, String condition);
 
     List<WaterSupplyChart> waterEnergyConsumption(Integer sceneId );
 

+ 2 - 2
sms_water/src/main/java/com/huaxu/service/impl/AppReportMonitorServiceImpl.java

@@ -76,7 +76,7 @@ public class AppReportMonitorServiceImpl  implements AppReportMonitorService {
     }
 
     @Override
-    public CompanySceneInfoDto getDeviceByCompanyBySearch(String condition) {
+    public CompanySceneInfoDto getDeviceByCompanyBySearch(String typeName,String condition) {
         LoginUser loginUser = UserUtil.getCurrentUser();
         //模糊查询设备所属公司id
         List<Integer> companyIds = appReportMonitorMapper.getCompanyByDeviceCondition(condition,loginUser.getTenantId(),loginUser.getType(),loginUser.getPermissonType(),loginUser.getProgramItemList());
@@ -84,7 +84,7 @@ public class AppReportMonitorServiceImpl  implements AppReportMonitorService {
         List<OrgBaseTreeInfoDto> orgBaseTreeInfoDtos = userCenterClient.getCompanyByUser(condition,companyIds);
         //有公司的展示第一个公司信息
         if(orgBaseTreeInfoDtos.size() > 0) {
-            List<DeviceEntity> deviceEntities = appReportMonitorMapper.getDeviceByCompany(null, orgBaseTreeInfoDtos.get(0).getId(), loginUser.getTenantId(), loginUser.getType(), loginUser.getPermissonType(), loginUser.getProgramItemList());
+            List<DeviceEntity> deviceEntities = appReportMonitorMapper.getDeviceByCompany(typeName, orgBaseTreeInfoDtos.get(0).getId(), loginUser.getTenantId(), loginUser.getType(), loginUser.getPermissonType(), loginUser.getProgramItemList());
             return new CompanySceneInfoDto(orgBaseTreeInfoDtos, null, deviceEntities);
         }