Commit 378c1c5cfa77dc36ace88e6bad796419032c3087

Authored by 王飞
1 parent 767214e2

commit 统计设备数量

src/main/java/com/zteits/irain/portal/vo/parkinglotcloudplatform/datastatistic/ParkLotEqpTypeCountVO.java 0 → 100644
  1 +package com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic;
  2 +
  3 +/**
  4 + * 通过停车场编号统计设备类型数量
  5 + *
  6 + * Copyright: Copyright (c) 2017 zteits
  7 + *
  8 + * @ClassName: ParkLotEqpTypeCountVO.java
  9 + * @Description:
  10 + * @version: v1.0.0
  11 + * @author: wangfei
  12 + * @date: 2017年8月18日 下午2:31:24
  13 + * Modification History:
  14 + * Date Author Version Description
  15 + *---------------------------------------------------------*
  16 + * 2017年6月29日 wangfei v1.0.0 创建
  17 + */
  18 +public class ParkLotEqpTypeCountVO {
  19 +
  20 +
  21 + /**设备类型:1-地磁*/
  22 + private Integer eqpType;
  23 + /**设备状态:1-未安装,2-使用中,3-损坏*/
  24 + private Integer eqpState;
  25 + /**个数*/
  26 + private Integer eqpNum;
  27 +
  28 + public Integer getEqpState() {
  29 + return eqpState;
  30 + }
  31 + public void setEqpState(Integer eqpState) {
  32 + this.eqpState = eqpState;
  33 + }
  34 +
  35 + public Integer getEqpType() {
  36 + return eqpType;
  37 + }
  38 + public void setEqpType(Integer eqpType) {
  39 + this.eqpType = eqpType;
  40 + }
  41 + public Integer getEqpNum() {
  42 + return eqpNum;
  43 + }
  44 + public void setEqpNum(Integer eqpNum) {
  45 + this.eqpNum = eqpNum;
  46 + }
  47 +
  48 +}
... ...
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/IndexPageStatisticController.java
... ... @@ -13,10 +13,12 @@ import javax.validation.Valid;
13 13  
14 14 import org.slf4j.Logger;
15 15 import org.slf4j.LoggerFactory;
  16 +import org.springframework.beans.BeanUtils;
16 17 import org.springframework.beans.factory.annotation.Autowired;
17 18 import org.springframework.web.bind.annotation.PostMapping;
18 19 import org.springframework.web.bind.annotation.RequestBody;
19 20 import org.springframework.web.bind.annotation.RequestMapping;
  21 +import org.springframework.web.bind.annotation.ResponseBody;
20 22 import org.springframework.web.bind.annotation.RestController;
21 23  
22 24 import com.alibaba.dubbo.common.utils.CollectionUtils;
... ... @@ -36,12 +38,15 @@ import com.zteits.clouds.api.dto.clouds.dto.CustIncomeForPayTypeDTO;
36 38 import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalDTO;
37 39 import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalParkDTO;
38 40 import com.zteits.clouds.api.dto.clouds.param.CustIncomeTotalQueryRequset;
  41 +import com.zteits.clouds.api.dto.park.dto.ParkLotEqpTypeCountStatisticByCountryDTO;
39 42 import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO;
40 43 import com.zteits.clouds.api.dto.park.dto.ParkingLotUseStatisticDTO;
  44 +import com.zteits.clouds.api.dto.park.param.EqpTypeQueryByPlNosRequest;
41 45 import com.zteits.clouds.api.dto.park.param.ParkingLotUseStatisticForPageRequest;
42 46 import com.zteits.clouds.api.dto.park.param.RealTimeVehicleFlowQueryRequest;
43 47 import com.zteits.clouds.api.service.clouds.CustIncomeService;
44 48 import com.zteits.clouds.api.service.park.IInOutParkingService;
  49 +import com.zteits.clouds.api.service.park.ParkingLotEqpService;
45 50 import com.zteits.clouds.api.service.park.ParkingLotUseStatisticService;
46 51 import com.zteits.irain.portal.constant.ParkConstant;
47 52 import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.BerthsAndFlowLineChartVO;
... ... @@ -50,6 +55,7 @@ import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustInco
50 55 import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustIncomeTotalVO;
51 56 import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.LineChartVO;
52 57 import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.LineChartVO.SerieVO;
  58 +import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.ParkLotEqpTypeCountVO;
53 59  
54 60 import io.swagger.annotations.ApiOperation;
55 61  
... ... @@ -81,6 +87,8 @@ public class IndexPageStatisticController extends BizController {
81 87 private IInOutParkingService iInOutParkingService;
82 88 @Autowired
83 89 private ParkingLotUseStatisticService parkingLotStatisticService;
  90 + @Autowired
  91 + private ParkingLotEqpService parkingLotEqpService;
84 92  
85 93 /**
86 94 * 云平台首页->企业客户负责所有的停车场汇总.<br/>
... ... @@ -481,4 +489,27 @@ public class IndexPageStatisticController extends BizController {
481 489 System.out.println(new BigDecimal("00.0").doubleValue() == 0);
482 490 }
483 491  
  492 + /**
  493 + * @param request
  494 + * @return
  495 + * 2017年8月18日 wangfei
  496 + */
  497 + @ApiOperation(value="根据停车场编号统计设备数量")
  498 + @PostMapping("statisticParkLotEqpCountByPlNos")
  499 + @ResponseBody
  500 + public BizResult<List<ParkLotEqpTypeCountVO>> statisticParkLotEqpCountByPlNos(@RequestBody
  501 + EqpTypeQueryByPlNosRequest request){
  502 + logger.info("停车场编号:"+request.getPlNos()+" 统计设备数量等信息");
  503 + List<ParkLotEqpTypeCountVO> resultList = new ArrayList<>();
  504 + BizResult<List<ParkLotEqpTypeCountStatisticByCountryDTO>> result = parkingLotEqpService
  505 + .StatisticParkLotEqpCountByPlNos(request);
  506 + if (!CollectionUtils.isEmpty(result.getData())) {
  507 + for (ParkLotEqpTypeCountStatisticByCountryDTO i :result.getData()) {
  508 + ParkLotEqpTypeCountVO vo = new ParkLotEqpTypeCountVO();
  509 + BeanUtils.copyProperties(i, vo);
  510 + resultList.add(vo);
  511 + }
  512 + }
  513 + return new BizResult<>(resultList);
  514 + }
484 515 }
... ...