|
@@ -61,7 +61,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区统计接口
|
|
|
|
|
|
|
+ * 园区统计接口
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@@ -91,20 +91,20 @@ public class StatisticsController extends BladeController {
|
|
|
private final ITemperatureRecordClient temperatureRecordClient;
|
|
private final ITemperatureRecordClient temperatureRecordClient;
|
|
|
private final IAccessRecordClient accessRecordClient;
|
|
private final IAccessRecordClient accessRecordClient;
|
|
|
/**
|
|
/**
|
|
|
- * 社区全景页面统计
|
|
|
|
|
|
|
+ * 园区全景页面统计
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/community")
|
|
@GetMapping("/community")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
|
- @ApiOperation(value = "社区全景页面统计")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区全景页面统计")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public CommunityStatistics community(BladeUser bladeUser){
|
|
public CommunityStatistics community(BladeUser bladeUser){
|
|
|
CommunityStatistics communityStatistics = new CommunityStatistics();
|
|
CommunityStatistics communityStatistics = new CommunityStatistics();
|
|
|
- //社区
|
|
|
|
|
|
|
+ //园区
|
|
|
LambdaQueryWrapper<Agency> agencyLambdaQueryWrapper = new QueryWrapperUtil<Agency>().getBasicQueryWrapper(Agency::getOrgPosition,new Agency(),bladeUser,orgPositionClient);
|
|
LambdaQueryWrapper<Agency> agencyLambdaQueryWrapper = new QueryWrapperUtil<Agency>().getBasicQueryWrapper(Agency::getOrgPosition,new Agency(),bladeUser,orgPositionClient);
|
|
|
- //社区列表
|
|
|
|
|
|
|
+ //园区列表
|
|
|
communityStatistics.setAgencies(this.agencyService.list(agencyLambdaQueryWrapper));
|
|
communityStatistics.setAgencies(this.agencyService.list(agencyLambdaQueryWrapper));
|
|
|
- //社区统计
|
|
|
|
|
|
|
+ //园区统计
|
|
|
communityStatistics.setAgencyCount(this.agencyService.count(agencyLambdaQueryWrapper));
|
|
communityStatistics.setAgencyCount(this.agencyService.count(agencyLambdaQueryWrapper));
|
|
|
//小区
|
|
//小区
|
|
|
LambdaQueryWrapper<Residential> residentialLambdaQueryWrapper = new QueryWrapperUtil<Residential>().getBasicQueryWrapper(Residential::getOrgPosition,new Residential(),bladeUser,orgPositionClient);
|
|
LambdaQueryWrapper<Residential> residentialLambdaQueryWrapper = new QueryWrapperUtil<Residential>().getBasicQueryWrapper(Residential::getOrgPosition,new Residential(),bladeUser,orgPositionClient);
|
|
@@ -136,18 +136,18 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势页面统计
|
|
|
|
|
|
|
+ * 园区态势页面统计
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/agency")
|
|
@GetMapping("/agency")
|
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperationSupport(order = 2)
|
|
|
- @ApiOperation(value = "社区态势统计")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区态势统计")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public AgencyStatistics agency(Agency agency, BladeUser bladeUser){
|
|
public AgencyStatistics agency(Agency agency, BladeUser bladeUser){
|
|
|
// String redisKey ="screen:"+ RedisConstant.AGENCY+":"+agency.getId();
|
|
// String redisKey ="screen:"+ RedisConstant.AGENCY+":"+agency.getId();
|
|
|
|
|
|
|
|
Agency agencyById = this.agencyService.getById(agency.getId());
|
|
Agency agencyById = this.agencyService.getById(agency.getId());
|
|
|
- Assert.notNull(agencyById,"该社区不存在");
|
|
|
|
|
|
|
+ Assert.notNull(agencyById,"该园区不存在");
|
|
|
AgencyStatistics agencyStatistics = new AgencyStatistics();
|
|
AgencyStatistics agencyStatistics = new AgencyStatistics();
|
|
|
List<Residential> residentials = this.residentialService.list(Condition.getQueryWrapper(new Residential()).lambda().eq(Residential::getAgencyId, agencyById.getId()));
|
|
List<Residential> residentials = this.residentialService.list(Condition.getQueryWrapper(new Residential()).lambda().eq(Residential::getAgencyId, agencyById.getId()));
|
|
|
agencyStatistics.setResidentials(residentials);
|
|
agencyStatistics.setResidentials(residentials);
|
|
@@ -170,13 +170,13 @@ public class StatisticsController extends BladeController {
|
|
|
// 停车位数
|
|
// 停车位数
|
|
|
agencyStatistics.setParkingSpaceCount(StringUtils.isEmpty(parkSpaceCount + "") ? 0 : parkSpaceCount);
|
|
agencyStatistics.setParkingSpaceCount(StringUtils.isEmpty(parkSpaceCount + "") ? 0 : parkSpaceCount);
|
|
|
|
|
|
|
|
- //社区户数
|
|
|
|
|
|
|
+ //园区户数
|
|
|
LambdaQueryWrapper<Room> roomLambdaQueryWrapper = new QueryWrapperUtil<Room>().getBasicQueryWrapper(Room::getOrgPosition,new Room(),bladeUser,orgPositionClient);
|
|
LambdaQueryWrapper<Room> roomLambdaQueryWrapper = new QueryWrapperUtil<Room>().getBasicQueryWrapper(Room::getOrgPosition,new Room(),bladeUser,orgPositionClient);
|
|
|
roomLambdaQueryWrapper.eq(Room::getAgencyId,agencyById.getId());
|
|
roomLambdaQueryWrapper.eq(Room::getAgencyId,agencyById.getId());
|
|
|
Integer roomCount = this.roomService.count(roomLambdaQueryWrapper);
|
|
Integer roomCount = this.roomService.count(roomLambdaQueryWrapper);
|
|
|
agencyStatistics.setRoomCount(roomCount);
|
|
agencyStatistics.setRoomCount(roomCount);
|
|
|
|
|
|
|
|
- //社区人口
|
|
|
|
|
|
|
+ //园区人口
|
|
|
HouseUser searchHU = new HouseUser();
|
|
HouseUser searchHU = new HouseUser();
|
|
|
searchHU.setAgencyId(agencyById.getId());
|
|
searchHU.setAgencyId(agencyById.getId());
|
|
|
Integer personCount = this.houseUserClient.list(searchHU).size();
|
|
Integer personCount = this.houseUserClient.list(searchHU).size();
|
|
@@ -257,7 +257,7 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势页面统计
|
|
|
|
|
|
|
+ * 园区态势页面统计
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/residential/index")
|
|
@GetMapping("/residential/index")
|
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
@@ -334,11 +334,11 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势人员管理
|
|
|
|
|
|
|
+ * 园区态势人员管理
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/residential/person")
|
|
@GetMapping("/residential/person")
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
|
- @ApiOperation(value = "社区态势人员管理")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区态势人员管理")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public ResidentialStatistics personsByResidential(Residential residential){
|
|
public ResidentialStatistics personsByResidential(Residential residential){
|
|
@@ -347,11 +347,11 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势车辆管理
|
|
|
|
|
|
|
+ * 园区态势车辆管理
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/residential/car")
|
|
@GetMapping("/residential/car")
|
|
|
@ApiOperationSupport(order = 5)
|
|
@ApiOperationSupport(order = 5)
|
|
|
- @ApiOperation(value = "社区态势车辆管理")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区态势车辆管理")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public CarStatistics carByResidential(Residential residential){
|
|
public CarStatistics carByResidential(Residential residential){
|
|
@@ -375,11 +375,11 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势房屋管理
|
|
|
|
|
|
|
+ * 园区态势房屋管理
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/residential/room")
|
|
@GetMapping("/residential/room")
|
|
|
@ApiOperationSupport(order = 6)
|
|
@ApiOperationSupport(order = 6)
|
|
|
- @ApiOperation(value = "社区态势房屋管理")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区态势房屋管理")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public CarStatistics roomByResidential(Residential residential){
|
|
public CarStatistics roomByResidential(Residential residential){
|
|
@@ -388,11 +388,11 @@ public class StatisticsController extends BladeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 社区态势设备管理
|
|
|
|
|
|
|
+ * 园区态势设备管理
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/residential/device")
|
|
@GetMapping("/residential/device")
|
|
|
@ApiOperationSupport(order = 7)
|
|
@ApiOperationSupport(order = 7)
|
|
|
- @ApiOperation(value = "社区态势设备管理")
|
|
|
|
|
|
|
+ @ApiOperation(value = "园区态势设备管理")
|
|
|
@Transactional
|
|
@Transactional
|
|
|
@ApiIgnore
|
|
@ApiIgnore
|
|
|
public DeviceStatistics deviceByResidential(Residential residential, Long deviceType){
|
|
public DeviceStatistics deviceByResidential(Residential residential, Long deviceType){
|
|
@@ -494,7 +494,7 @@ public class StatisticsController extends BladeController {
|
|
|
EstateStaticVO estateStaticVO = new EstateStaticVO();
|
|
EstateStaticVO estateStaticVO = new EstateStaticVO();
|
|
|
|
|
|
|
|
//*************************物业统计**************************//
|
|
//*************************物业统计**************************//
|
|
|
- //社区总数
|
|
|
|
|
|
|
+ //园区总数
|
|
|
LambdaQueryWrapper<Agency> agencyLambdaQueryWrapper = new QueryWrapperUtil<Agency>().getBasicQueryWrapper(Agency::getOrgPosition,new Agency(),bladeUser,orgPositionClient);
|
|
LambdaQueryWrapper<Agency> agencyLambdaQueryWrapper = new QueryWrapperUtil<Agency>().getBasicQueryWrapper(Agency::getOrgPosition,new Agency(),bladeUser,orgPositionClient);
|
|
|
agencyLambdaQueryWrapper.like(Agency::getOrgPosition,codeOrgPosition);
|
|
agencyLambdaQueryWrapper.like(Agency::getOrgPosition,codeOrgPosition);
|
|
|
List<Agency> agencies = agencyService.getBaseMapper().selectList(agencyLambdaQueryWrapper);
|
|
List<Agency> agencies = agencyService.getBaseMapper().selectList(agencyLambdaQueryWrapper);
|
|
@@ -696,7 +696,7 @@ public class StatisticsController extends BladeController {
|
|
|
//地磁总数100007
|
|
//地磁总数100007
|
|
|
|
|
|
|
|
IotDevice iotDevice = new IotDevice();
|
|
IotDevice iotDevice = new IotDevice();
|
|
|
- iotDevice.setDeviceType(100007);
|
|
|
|
|
|
|
+ iotDevice.setDeviceType("100007");
|
|
|
int parkingDeviceCount = this.iotDeviceClient.list(iotDevice).size();
|
|
int parkingDeviceCount = this.iotDeviceClient.list(iotDevice).size();
|
|
|
|
|
|
|
|
//停车抓拍数
|
|
//停车抓拍数
|