Commit 9a3635de44e3a8e2267054324d0bddbff17c2653
Merge remote-tracking branch 'origin/branch_0808' into branch_0808
Showing
6 changed files
with
117 additions
and
27 deletions
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/BerthsStatisticController.java
| ... | ... | @@ -237,7 +237,7 @@ public class BerthsStatisticController extends BizController { |
| 237 | 237 | // 1个小时为一个时间戳 |
| 238 | 238 | request.setQueryKind(ParkConstant.ParkingLotUseStatistic.StatisticType.PER1HOUR); |
| 239 | 239 | int totaltimestampCount = endTime.get(Calendar.HOUR_OF_DAY); |
| 240 | - for (int j = 0; j <= totaltimestampCount; j++) { | |
| 240 | + for (int j = 0; j <= totaltimestampCount+1; j++) { | |
| 241 | 241 | String hour = String.format("%02d", (j)); |
| 242 | 242 | xAxisData.add(hour+":00"); |
| 243 | 243 | } |
| ... | ... | @@ -321,7 +321,7 @@ public class BerthsStatisticController extends BizController { |
| 321 | 321 | // 1个小时为一个时间戳 |
| 322 | 322 | request.setQueryKind(ParkConstant.ParkingLotUseStatistic.StatisticType.PER1HOUR); |
| 323 | 323 | int totaltimestampCount = endTime.get(Calendar.HOUR_OF_DAY); |
| 324 | - for (int j = 0; j <= totaltimestampCount; j++) { | |
| 324 | + for (int j = 0; j <= totaltimestampCount+1; j++) { | |
| 325 | 325 | String hour = String.format("%02d", (j)); |
| 326 | 326 | xAxisData.add(hour+":00"); |
| 327 | 327 | } | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/BillManageController.java
| ... | ... | @@ -83,17 +83,21 @@ public class BillManageController extends BizController { |
| 83 | 83 | HttpServletResponse response) throws Exception { |
| 84 | 84 | TdCustCompanyService sert = map.get("tdCustCompanyService"); |
| 85 | 85 | logger.info("---begin--日账汇总单查询调用后场dubbo服务,入参={}", JSONObject.toJSON(billQueryRequest)); |
| 86 | - System.out.println("seesionId="+request.getSession().getId()); | |
| 87 | - UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
| 88 | - logger.info("从session中获取的用户信息={}" + JSONObject.toJSONString(userInfo)); | |
| 89 | - TdCompanyParkQueryRequest tdCompanyParkQueryRequest = new TdCompanyParkQueryRequest(); | |
| 90 | - if (userInfo != null) { | |
| 91 | - | |
| 92 | - tdCompanyParkQueryRequest.setSysCode(billQueryRequest.getSysCode()); | |
| 93 | - tdCompanyParkQueryRequest.setCustIdList(userInfo.getOrgIds()); | |
| 94 | - tdCompanyParkQueryRequest.setSessionId(request.getSession().getId()); | |
| 95 | - billQueryRequest.setParkIdList(this.queryParkNoByCustIds(tdCompanyParkQueryRequest)); | |
| 96 | - } | |
| 86 | +// System.out.println("seesionId="+request.getSession().getId()); | |
| 87 | +// UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
| 88 | +// logger.info("从session中获取的用户信息={}" + JSONObject.toJSONString(userInfo)); | |
| 89 | +// TdCompanyParkQueryRequest tdCompanyParkQueryRequest = new TdCompanyParkQueryRequest(); | |
| 90 | +// if (userInfo != null) { | |
| 91 | +// | |
| 92 | +// tdCompanyParkQueryRequest.setSysCode(billQueryRequest.getSysCode()); | |
| 93 | +// tdCompanyParkQueryRequest.setCustIdList(userInfo.getOrgIds()); | |
| 94 | +// tdCompanyParkQueryRequest.setSessionId(request.getSession().getId()); | |
| 95 | +// billQueryRequest.setParkIdList(this.queryParkNoByCustIds(tdCompanyParkQueryRequest)); | |
| 96 | +// } | |
| 97 | + // 2.调用接口查询当前登录人管辖的停车场名称 | |
| 98 | + UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
| 99 | + List<String> plNos = userInfo.getOrgIds(); | |
| 100 | + billQueryRequest.setParkIdList(plNos); | |
| 97 | 101 | |
| 98 | 102 | BizResult<PageBean<BillManageDTO>> result = billManageForDayService.queryBillforDayTotalForPage(billQueryRequest); |
| 99 | 103 | result.setErrMsg(billQueryRequest.getParkIdList().toString()); |
| ... | ... | @@ -115,18 +119,25 @@ public class BillManageController extends BizController { |
| 115 | 119 | HttpServletResponse response) throws Exception { |
| 116 | 120 | BizResult<PageBean<BillManageDTO>> result = new BizResult<PageBean<BillManageDTO>>(); |
| 117 | 121 | logger.info("---begin---日账单查看调用后场dubbo服务,入参={}", JSONObject.toJSONString(billQueryRequest)); |
| 118 | - TdCompanyParkQueryRequest tdCompanyParkQueryRequest = new TdCompanyParkQueryRequest(); | |
| 119 | - UserInfo userInfo = (UserInfo) request.getSession().getAttribute(SessionEnum.USER_INFO.key()); | |
| 120 | - logger.info("从session中获取的用户信息={}" + JSONObject.toJSONString(userInfo)); | |
| 121 | - if (userInfo != null) { | |
| 122 | - | |
| 123 | - tdCompanyParkQueryRequest.setSysCode(billQueryRequest.getSysCode()); | |
| 124 | - tdCompanyParkQueryRequest.setCustIdList(userInfo.getOrgIds()); | |
| 125 | - tdCompanyParkQueryRequest.setSessionId(request.getSession().getId()); | |
| 126 | - billQueryRequest.setUserName(userInfo.getName()); | |
| 127 | - billQueryRequest.setParkIdList(this.queryParkNoByCustIds(tdCompanyParkQueryRequest)); | |
| 128 | - | |
| 129 | - } | |
| 122 | +// TdCompanyParkQueryRequest tdCompanyParkQueryRequest = new TdCompanyParkQueryRequest(); | |
| 123 | +// UserInfo userInfo = (UserInfo) request.getSession().getAttribute(SessionEnum.USER_INFO.key()); | |
| 124 | +// logger.info("从session中获取的用户信息={}" + JSONObject.toJSONString(userInfo)); | |
| 125 | +// if (userInfo != null) { | |
| 126 | +// | |
| 127 | +// tdCompanyParkQueryRequest.setSysCode(billQueryRequest.getSysCode()); | |
| 128 | +// tdCompanyParkQueryRequest.setCustIdList(userInfo.getOrgIds()); | |
| 129 | +// tdCompanyParkQueryRequest.setSessionId(request.getSession().getId()); | |
| 130 | +// billQueryRequest.setUserName(userInfo.getName()); | |
| 131 | +// billQueryRequest.setParkIdList(this.queryParkNoByCustIds(tdCompanyParkQueryRequest)); | |
| 132 | +// | |
| 133 | +// } | |
| 134 | + | |
| 135 | + // 2.调用接口查询当前登录人管辖的停车场名称 | |
| 136 | + UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
| 137 | + List<String> plNos = userInfo.getOrgIds(); | |
| 138 | + billQueryRequest.setParkIdList(plNos); | |
| 139 | + billQueryRequest.setUserName(userInfo.getName()); | |
| 140 | + | |
| 130 | 141 | result = billManageForDayService.queryBillforDayDeatilPage(billQueryRequest); |
| 131 | 142 | logger.info("---end---日账单查看调用后场dubbo服务,结果={}", JSONObject.toJSON(result)); |
| 132 | 143 | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/InOutParkStatisticController.java
| ... | ... | @@ -126,7 +126,7 @@ public class InOutParkStatisticController extends BizController { |
| 126 | 126 | // 1个小时为一个时间戳 |
| 127 | 127 | UseStatisticRequest.setQueryKind(ParkConstant.ParkingLotUseStatistic.StatisticType.PER1HOUR); |
| 128 | 128 | int totaltimestampCount = endTime.get(Calendar.HOUR_OF_DAY); |
| 129 | - for (int j = 0; j <= totaltimestampCount; j++) { | |
| 129 | + for (int j = 0; j <= totaltimestampCount+1; j++) { | |
| 130 | 130 | String hour = String.format("%02d", (j)); |
| 131 | 131 | xAxisData.add(hour + ":00"); |
| 132 | 132 | } | ... | ... |
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 | } | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/VehicleFlowStatisticController.java
| ... | ... | @@ -246,7 +246,7 @@ public class VehicleFlowStatisticController extends BizController { |
| 246 | 246 | request.setQueryKind(ParkConstant.ParkingLotUseStatistic.StatisticType.PER1HOUR); |
| 247 | 247 | int totaltimestampCount = endTime.get(Calendar.HOUR_OF_DAY); |
| 248 | 248 | |
| 249 | - for (int j = 0; j <= totaltimestampCount; j++) { | |
| 249 | + for (int j = 0; j <= totaltimestampCount+1; j++) { | |
| 250 | 250 | String hour = String.format("%02d", (j)); |
| 251 | 251 | xAxisData.add(hour+":00"); |
| 252 | 252 | } | ... | ... |