Commit 8a73bc9c04260a31a6604e941ba12016ec7d4b91
Merge branch 'branch_0808' of http://192.168.1.195:9998/ZTEITS-Developers/zteits…
…-bcp-portal.git into branch_0808
Showing
7 changed files
with
426 additions
and
233 deletions
.gitignore
1 | 1 | # Created by .ignore support plugin (hsz.mobi) |
2 | +### JetBrains template | |
3 | +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | |
4 | +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | |
5 | + | |
6 | +# User-specific stuff: | |
7 | +.idea/**/workspace.xml | |
8 | +.idea/**/tasks.xml | |
9 | +.idea/dictionaries | |
10 | + | |
11 | +# Sensitive or high-churn files: | |
12 | +.idea/**/dataSources/ | |
13 | +.idea/**/dataSources.ids | |
14 | +.idea/**/dataSources.xml | |
15 | +.idea/**/dataSources.local.xml | |
16 | +.idea/**/sqlDataSources.xml | |
17 | +.idea/**/dynamic.xml | |
18 | +.idea/**/uiDesigner.xml | |
19 | + | |
20 | +# Gradle: | |
21 | +.idea/**/gradle.xml | |
22 | +.idea/**/libraries | |
23 | + | |
24 | +# Mongo Explorer plugin: | |
25 | +.idea/**/mongoSettings.xml | |
26 | + | |
27 | +## File-based project format: | |
28 | +*.iws | |
29 | + | |
30 | +## Plugin-specific files: | |
31 | + | |
32 | +# IntelliJ | |
33 | +/out/ | |
34 | + | |
35 | +# mpeltonen/sbt-idea plugin | |
36 | +.idea_modules/ | |
37 | + | |
38 | +# JIRA plugin | |
39 | +atlassian-ide-plugin.xml | |
40 | + | |
41 | +# Crashlytics plugin (for Android Studio and IntelliJ) | |
42 | +com_crashlytics_export_strings.xml | |
43 | +crashlytics.properties | |
44 | +crashlytics-build.properties | |
45 | +fabric.properties | |
46 | +### Maven template | |
47 | +target/ | |
48 | +pom.xml.tag | |
49 | +pom.xml.releaseBackup | |
50 | +pom.xml.versionsBackup | |
51 | +pom.xml.next | |
52 | +release.properties | |
53 | +dependency-reduced-pom.xml | |
54 | +buildNumber.properties | |
55 | +.mvn/timing.properties | |
56 | + | |
57 | +# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored) | |
58 | +!/.mvn/wrapper/maven-wrapper.jar | |
2 | 59 | ### macOS template |
3 | 60 | *.DS_Store |
4 | 61 | .AppleDouble |
... | ... | @@ -26,75 +83,5 @@ Icon |
26 | 83 | Network Trash Folder |
27 | 84 | Temporary Items |
28 | 85 | .apdisk |
29 | -### Maven template | |
30 | -target/ | |
31 | -pom.xml.tag | |
32 | -pom.xml.releaseBackup | |
33 | -pom.xml.versionsBackup | |
34 | -pom.xml.next | |
35 | -release.properties | |
36 | -dependency-reduced-pom.xml | |
37 | -buildNumber.properties | |
38 | -.mvn/timing.properties | |
39 | - | |
40 | -# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored) | |
41 | -!/.mvn/wrapper/maven-wrapper.jar | |
42 | -### Eclipse template | |
43 | - | |
44 | -.metadata | |
45 | -bin/ | |
46 | -tmp/ | |
47 | -*.tmp | |
48 | -*.bak | |
49 | -*.swp | |
50 | -*~.nib | |
51 | -local.properties | |
52 | -.settings/ | |
53 | -.loadpath | |
54 | -.recommenders | |
55 | - | |
56 | -# Eclipse Core | |
57 | -.project | |
58 | - | |
59 | -# External tool builders | |
60 | -.externalToolBuilders/ | |
61 | - | |
62 | -# Locally stored "Eclipse launch configurations" | |
63 | -*.launch | |
64 | - | |
65 | -# PyDev specific (Python IDE for Eclipse) | |
66 | -*.pydevproject | |
67 | - | |
68 | -# CDT-specific (C/C++ Development Tooling) | |
69 | -.cproject | |
70 | - | |
71 | -# JDT-specific (Eclipse Java Development Tools) | |
72 | -.classpath | |
73 | - | |
74 | -# Java annotation processor (APT) | |
75 | -.factorypath | |
76 | - | |
77 | -# PDT-specific (PHP Development Tools) | |
78 | -.buildpath | |
79 | - | |
80 | -# sbteclipse plugin | |
81 | -.target | |
82 | - | |
83 | -# Tern plugin | |
84 | -.tern-project | |
85 | - | |
86 | -# TeXlipse plugin | |
87 | -.texlipse | |
88 | - | |
89 | -# STS (Spring Tool Suite) | |
90 | -.springBeans | |
91 | - | |
92 | -# Code Recommenders | |
93 | -.recommenders/ | |
94 | 86 | |
95 | -# Scala IDE specific (Scala & Java development for Eclipse) | |
96 | -.cache-main | |
97 | -.scala_dependencies | |
98 | -.worksheet | |
99 | -.idea | |
100 | 87 | *.iml | ... | ... |
src/main/java/com/zteits/irain/portal/vo/fangle/BerthStateRequest.java
0 → 100644
1 | +package com.zteits.irain.portal.vo.fangle; | |
2 | + | |
3 | +import com.zteits.clouds.api.apibase.bean.BaseRequest; | |
4 | + | |
5 | +public class BerthStateRequest extends BaseRequest{ | |
6 | + | |
7 | + private static final long serialVersionUID = 1L; | |
8 | + | |
9 | + /**记录编号*/ | |
10 | + private String log_id; | |
11 | + | |
12 | + /**泊位编码*/ | |
13 | + private String berthcode; | |
14 | + | |
15 | + /**状态变更时间*/ | |
16 | + private String changetime; | |
17 | + | |
18 | + /**泊位状态*/ | |
19 | + private String berthstatus; | |
20 | + | |
21 | + /**电量*/ | |
22 | + private String electricity; | |
23 | + | |
24 | + /**电压值*/ | |
25 | + private String voltage; | |
26 | + | |
27 | + public String getLog_id() { | |
28 | + return log_id; | |
29 | + } | |
30 | + | |
31 | + public void setLog_id(String log_id) { | |
32 | + this.log_id = log_id; | |
33 | + } | |
34 | + | |
35 | + public String getBerthcode() { | |
36 | + return berthcode; | |
37 | + } | |
38 | + | |
39 | + public void setBerthcode(String berthcode) { | |
40 | + this.berthcode = berthcode; | |
41 | + } | |
42 | + | |
43 | + public String getChangetime() { | |
44 | + return changetime; | |
45 | + } | |
46 | + | |
47 | + public void setChangetime(String changetime) { | |
48 | + this.changetime = changetime; | |
49 | + } | |
50 | + | |
51 | + public String getBerthstatus() { | |
52 | + return berthstatus; | |
53 | + } | |
54 | + | |
55 | + public void setBerthstatus(String berthstatus) { | |
56 | + this.berthstatus = berthstatus; | |
57 | + } | |
58 | + | |
59 | + public String getElectricity() { | |
60 | + return electricity; | |
61 | + } | |
62 | + | |
63 | + public void setElectricity(String electricity) { | |
64 | + this.electricity = electricity; | |
65 | + } | |
66 | + | |
67 | + public String getVoltage() { | |
68 | + return voltage; | |
69 | + } | |
70 | + | |
71 | + public void setVoltage(String voltage) { | |
72 | + this.voltage = voltage; | |
73 | + } | |
74 | + | |
75 | + @Override | |
76 | + public String toString() { | |
77 | + return "BerthStateRequest [log_id=" + log_id + ", berthcode=" + berthcode + ", changetime=" + changetime | |
78 | + + ", berthstatus=" + berthstatus + ", electricity=" + electricity + ", voltage=" + voltage + "]"; | |
79 | + } | |
80 | + | |
81 | + | |
82 | +} | ... | ... |
src/main/java/com/zteits/irain/portal/vo/fangle/EqpHeartBeatRequest.java
0 → 100644
1 | +package com.zteits.irain.portal.vo.fangle; | |
2 | + | |
3 | +import com.zteits.clouds.api.apibase.bean.BaseRequest; | |
4 | + | |
5 | +public class EqpHeartBeatRequest extends BaseRequest{ | |
6 | + | |
7 | + private static final long serialVersionUID = 1L; | |
8 | + | |
9 | + /**设备类型*/ | |
10 | + private String EquipmentType; | |
11 | + | |
12 | + /**设备编号*/ | |
13 | + private String EquipmentCode; | |
14 | + | |
15 | + /**设备状态*/ | |
16 | + private String EquipmentStatus; | |
17 | + | |
18 | + /**推送时间*/ | |
19 | + private String PushTime; | |
20 | + | |
21 | + public String getEquipmentType() { | |
22 | + return EquipmentType; | |
23 | + } | |
24 | + | |
25 | + public void setEquipmentType(String equipmentType) { | |
26 | + EquipmentType = equipmentType; | |
27 | + } | |
28 | + | |
29 | + public String getEquipmentCode() { | |
30 | + return EquipmentCode; | |
31 | + } | |
32 | + | |
33 | + public void setEquipmentCode(String equipmentCode) { | |
34 | + EquipmentCode = equipmentCode; | |
35 | + } | |
36 | + | |
37 | + public String getEquipmentStatus() { | |
38 | + return EquipmentStatus; | |
39 | + } | |
40 | + | |
41 | + public void setEquipmentStatus(String equipmentStatus) { | |
42 | + EquipmentStatus = equipmentStatus; | |
43 | + } | |
44 | + | |
45 | + public String getPushTime() { | |
46 | + return PushTime; | |
47 | + } | |
48 | + | |
49 | + public void setPushTime(String pushTime) { | |
50 | + PushTime = pushTime; | |
51 | + } | |
52 | + | |
53 | + @Override | |
54 | + public String toString() { | |
55 | + return "EqpHeartBeatRequest [EquipmentType=" + EquipmentType + ", EquipmentCode=" + EquipmentCode | |
56 | + + ", EquipmentStatus=" + EquipmentStatus + ", PushTime=" + PushTime + "]"; | |
57 | + } | |
58 | + | |
59 | + | |
60 | +} | ... | ... |
src/main/java/com/zteits/irain/portal/web/fangle/FangleEqpController.java
... | ... | @@ -3,9 +3,7 @@ package com.zteits.irain.portal.web.fangle; |
3 | 3 | import java.text.ParseException; |
4 | 4 | import java.text.SimpleDateFormat; |
5 | 5 | import java.util.Date; |
6 | -import java.util.HashMap; | |
7 | 6 | import java.util.Map; |
8 | -import java.util.Map.Entry; | |
9 | 7 | |
10 | 8 | import org.slf4j.Logger; |
11 | 9 | import org.slf4j.LoggerFactory; |
... | ... | @@ -15,35 +13,18 @@ import org.springframework.beans.factory.annotation.Value; |
15 | 13 | import org.springframework.web.bind.annotation.RequestBody; |
16 | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | 15 | import org.springframework.web.bind.annotation.RequestMethod; |
18 | -import org.springframework.web.bind.annotation.RequestParam; | |
19 | 16 | import org.springframework.web.bind.annotation.RestController; |
20 | 17 | |
21 | -import com.alibaba.dubbo.common.utils.StringUtils; | |
22 | 18 | import com.alibaba.fastjson.JSON; |
23 | 19 | import com.alibaba.fastjson.JSONArray; |
24 | 20 | import com.alibaba.fastjson.JSONObject; |
25 | -import com.clouds.common.utils.ExceptionUtil; | |
26 | 21 | import com.clouds.common.web.BizController; |
27 | 22 | import com.zteits.clouds.api.apibase.bean.BaseInfo; |
28 | 23 | import com.zteits.clouds.api.apibase.bean.BizResult; |
29 | -import com.zteits.clouds.api.apibase.constants.ErrorType; | |
30 | -import com.zteits.clouds.api.apibase.exception.BizException; | |
31 | -import com.zteits.clouds.api.dto.park.param.BerthStateRequest; | |
32 | -import com.zteits.clouds.api.dto.park.param.EqpHeartBeatRequest; | |
33 | 24 | import com.zteits.clouds.api.dto.park.param.EqpLogRequest; |
34 | -import com.zteits.clouds.api.dto.park.param.InParkingRequest; | |
35 | -import com.zteits.clouds.api.dto.park.param.OutParkingRequest; | |
36 | -import com.zteits.clouds.api.dto.park.param.InterfaceLogSaveRequest; | |
37 | 25 | import com.zteits.clouds.api.service.park.EqpBerthsService; |
38 | -import com.zteits.clouds.api.service.park.InterfaceLogService; | |
39 | -import com.zteits.irain.portal.common.AESPlus; | |
40 | -import com.zteits.irain.portal.common.HttpClientTutorial; | |
41 | -import com.zteits.irain.portal.constant.IRainResultEnum; | |
42 | -import com.zteits.irain.portal.constant.ParkConstant.InterfaceLog; | |
43 | -import com.zteits.irain.portal.service.interfaces.inoutparklot.InOutParkLotReportService; | |
44 | -import com.zteits.irain.portal.service.interfaces.inoutparklot.param.RecordInParkLotRequest; | |
45 | -import com.zteits.irain.portal.service.interfaces.inoutparklot.param.RecordOutParkLotRequest; | |
46 | -import com.zteits.irain.portal.vo.irain.IRainResponseVO; | |
26 | +import com.zteits.irain.portal.vo.fangle.BerthStateRequest; | |
27 | +import com.zteits.irain.portal.vo.fangle.EqpHeartBeatRequest; | |
47 | 28 | |
48 | 29 | import io.swagger.annotations.Api; |
49 | 30 | import io.swagger.annotations.ApiOperation; |
... | ... | @@ -105,7 +86,7 @@ public class FangleEqpController extends BizController{ |
105 | 86 | eqpLogRequest.setElectricity(request.getElectricity()); |
106 | 87 | eqpLogRequest.setVoltag(request.getVoltage()); |
107 | 88 | |
108 | - BizResult<Map<String, String>> result = eqpBerthsService.synBerthState(eqpLogRequest); | |
89 | + BizResult<Map<String, String>> result = eqpBerthsService.synEqpInfo(eqpLogRequest); | |
109 | 90 | return result; |
110 | 91 | } |
111 | 92 | |
... | ... | @@ -149,7 +130,7 @@ public class FangleEqpController extends BizController{ |
149 | 130 | } catch (ParseException e) { |
150 | 131 | e.printStackTrace(); |
151 | 132 | } |
152 | - BizResult<Map<String, String>> result = eqpBerthsService.synBerthState(eqpLogRequest); | |
133 | + BizResult<Map<String, String>> result = eqpBerthsService.synEqpInfo(eqpLogRequest); | |
153 | 134 | return result; |
154 | 135 | } |
155 | 136 | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/BillManageController.java
... | ... | @@ -83,21 +83,17 @@ 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 | -// } | |
97 | - // 2.调用接口查询当前登录人管辖的停车场名称 | |
98 | - UserInfo userInfo = sessionCommUtil.getUserInfo(); | |
99 | - List<String> plNos = userInfo.getOrgIds(); | |
100 | - billQueryRequest.setParkIdList(plNos); | |
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(userInfo.getOrgIds()); | |
96 | + } | |
101 | 97 | |
102 | 98 | BizResult<PageBean<BillManageDTO>> result = billManageForDayService.queryBillforDayTotalForPage(billQueryRequest); |
103 | 99 | result.setErrMsg(billQueryRequest.getParkIdList().toString()); |
... | ... | @@ -119,25 +115,18 @@ public class BillManageController extends BizController { |
119 | 115 | HttpServletResponse response) throws Exception { |
120 | 116 | BizResult<PageBean<BillManageDTO>> result = new BizResult<PageBean<BillManageDTO>>(); |
121 | 117 | logger.info("---begin---日账单查看调用后场dubbo服务,入参={}", JSONObject.toJSONString(billQueryRequest)); |
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 | - | |
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 | + } | |
141 | 130 | result = billManageForDayService.queryBillforDayDeatilPage(billQueryRequest); |
142 | 131 | logger.info("---end---日账单查看调用后场dubbo服务,结果={}", JSONObject.toJSON(result)); |
143 | 132 | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/IndexPageStatisticController.java
... | ... | @@ -2,28 +2,21 @@ package com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic; |
2 | 2 | |
3 | 3 | import java.math.BigDecimal; |
4 | 4 | import java.math.RoundingMode; |
5 | +import java.text.DecimalFormat; | |
5 | 6 | import java.util.ArrayList; |
6 | 7 | import java.util.Calendar; |
7 | 8 | import java.util.Date; |
9 | +import java.util.HashMap; | |
8 | 10 | import java.util.List; |
9 | 11 | import java.util.Map; |
10 | 12 | import java.util.Map.Entry; |
11 | 13 | |
12 | 14 | import javax.validation.Valid; |
13 | 15 | |
14 | -import org.slf4j.Logger; | |
15 | -import org.slf4j.LoggerFactory; | |
16 | -import org.springframework.beans.BeanUtils; | |
17 | -import org.springframework.beans.factory.annotation.Autowired; | |
18 | -import org.springframework.web.bind.annotation.PostMapping; | |
19 | -import org.springframework.web.bind.annotation.RequestBody; | |
20 | -import org.springframework.web.bind.annotation.RequestMapping; | |
21 | -import org.springframework.web.bind.annotation.ResponseBody; | |
22 | -import org.springframework.web.bind.annotation.RestController; | |
23 | - | |
24 | 16 | import com.alibaba.dubbo.common.utils.CollectionUtils; |
25 | 17 | import com.alibaba.fastjson.JSON; |
26 | 18 | import com.alibaba.fastjson.JSONObject; |
19 | + | |
27 | 20 | import com.clouds.common.cache.park.ParkingLotCacheUtil; |
28 | 21 | import com.clouds.common.utils.DateUtil; |
29 | 22 | import com.clouds.common.utils.ResultUtils; |
... | ... | @@ -37,16 +30,21 @@ import com.zteits.clouds.api.apibase.bean.PageBean; |
37 | 30 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeForPayTypeDTO; |
38 | 31 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalDTO; |
39 | 32 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalParkDTO; |
33 | +import com.zteits.clouds.api.dto.clouds.dto.ParkingCountDTO; | |
40 | 34 | import com.zteits.clouds.api.dto.clouds.param.CustIncomeTotalQueryRequset; |
41 | 35 | import com.zteits.clouds.api.dto.park.dto.ParkLotEqpTypeCountStatisticByCountryDTO; |
42 | 36 | import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO; |
43 | 37 | import com.zteits.clouds.api.dto.park.dto.ParkingLotUseStatisticDTO; |
38 | +import com.zteits.clouds.api.dto.park.dto.TodayVehicleFlowOccupyRateAndTurnOverDTO; | |
39 | +import com.zteits.clouds.api.dto.park.param.CommonPlnosQueryRequest; | |
44 | 40 | import com.zteits.clouds.api.dto.park.param.EqpTypeQueryByPlNosRequest; |
45 | 41 | import com.zteits.clouds.api.dto.park.param.ParkingLotUseStatisticForPageRequest; |
46 | 42 | import com.zteits.clouds.api.dto.park.param.RealTimeVehicleFlowQueryRequest; |
47 | 43 | import com.zteits.clouds.api.service.clouds.CustIncomeService; |
48 | 44 | import com.zteits.clouds.api.service.park.IInOutParkingService; |
45 | +import com.zteits.clouds.api.service.park.ParkingLotBerthsService; | |
49 | 46 | import com.zteits.clouds.api.service.park.ParkingLotEqpService; |
47 | +import com.zteits.clouds.api.service.park.ParkingLotQueryService; | |
50 | 48 | import com.zteits.clouds.api.service.park.ParkingLotUseStatisticService; |
51 | 49 | import com.zteits.irain.portal.constant.ParkConstant; |
52 | 50 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.BerthsAndFlowLineChartVO; |
... | ... | @@ -56,8 +54,16 @@ import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustInco |
56 | 54 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.LineChartVO; |
57 | 55 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.LineChartVO.SerieVO; |
58 | 56 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.ParkLotEqpTypeCountVO; |
59 | - | |
60 | 57 | import io.swagger.annotations.ApiOperation; |
58 | +import org.slf4j.Logger; | |
59 | +import org.slf4j.LoggerFactory; | |
60 | +import org.springframework.beans.BeanUtils; | |
61 | +import org.springframework.beans.factory.annotation.Autowired; | |
62 | +import org.springframework.web.bind.annotation.PostMapping; | |
63 | +import org.springframework.web.bind.annotation.RequestBody; | |
64 | +import org.springframework.web.bind.annotation.RequestMapping; | |
65 | +import org.springframework.web.bind.annotation.ResponseBody; | |
66 | +import org.springframework.web.bind.annotation.RestController; | |
61 | 67 | |
62 | 68 | /** |
63 | 69 | * Copyright: Copyright (c) 2017 zteits |
... | ... | @@ -89,7 +95,13 @@ public class IndexPageStatisticController extends BizController { |
89 | 95 | private ParkingLotUseStatisticService parkingLotStatisticService; |
90 | 96 | @Autowired |
91 | 97 | private ParkingLotEqpService parkingLotEqpService; |
92 | - | |
98 | + | |
99 | + @Autowired | |
100 | + private ParkingLotQueryService parkingLotQueryService; | |
101 | + | |
102 | + @Autowired | |
103 | + private ParkingLotBerthsService parkingLotBerthsService; | |
104 | + | |
93 | 105 | /** |
94 | 106 | * 云平台首页->企业客户负责所有的停车场汇总.<br/> |
95 | 107 | * |
... | ... | @@ -101,7 +113,7 @@ public class IndexPageStatisticController extends BizController { |
101 | 113 | public BizResultVO<CustIncomeTotalVO> queryCustIncomeTotal( |
102 | 114 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) |
103 | 115 | throws Exception { |
104 | - | |
116 | + logger.info("---begin企业云平台首页-实际收入查询,入参={}",JSONObject.toJSON(custIncomeTotalQueryRequset)); | |
105 | 117 | BizResultVO<CustIncomeTotalVO> bizResultVO = new BizResultVO<>(); |
106 | 118 | |
107 | 119 | BizResult<CustIncomeTotalDTO> result = cusIncomeService.queryCustIncomeTotal(custIncomeTotalQueryRequset); |
... | ... | @@ -118,13 +130,13 @@ public class IndexPageStatisticController extends BizController { |
118 | 130 | vo.setPayedTotalAmount(result.getData().getPayedTotalAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString()); |
119 | 131 | |
120 | 132 | bizResultVO.setData(vo); |
121 | - | |
133 | + logger.info("---end企业云平台首页-实际收入查询"); | |
122 | 134 | return bizResultVO; |
123 | 135 | } |
124 | 136 | |
125 | 137 | /** |
126 | 138 | * 云平台首页->企业客户负责某个停车收入情况.<br/> |
127 | - * | |
139 | + * | |
128 | 140 | * @return |
129 | 141 | * @throws Exception |
130 | 142 | */ |
... | ... | @@ -150,8 +162,6 @@ public class IndexPageStatisticController extends BizController { |
150 | 162 | BigDecimal escapeAmount = dto.getEscapeAmount(); |
151 | 163 | BigDecimal payedTotalAmount = dto.getPayedTotalAmount(); |
152 | 164 | |
153 | - | |
154 | - | |
155 | 165 | CustIncomeTotalParkVO vo = new CustIncomeTotalParkVO(); |
156 | 166 | |
157 | 167 | //金额为分 |
... | ... | @@ -160,13 +170,14 @@ public class IndexPageStatisticController extends BizController { |
160 | 170 | vo.setPayedTotalAmount(payedTotalAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toString()); |
161 | 171 | //占比乘以100取两位小数 |
162 | 172 | //应收 |
163 | - if (null == amountDueTotal || amountDueTotal.doubleValue()==0) { | |
173 | + if (null == amountDueTotal || amountDueTotal.doubleValue() == 0) { | |
164 | 174 | vo.setLoopData(1, "00.00"); |
165 | 175 | vo.setLoopData(2, "00.00"); |
166 | 176 | |
167 | 177 | } else { |
168 | 178 | //实收 |
169 | - vo.setLoopData(1, payedTotalAmount.divide(amountDueTotal, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100.00")) | |
179 | + vo.setLoopData(1, payedTotalAmount.divide(amountDueTotal, 4, BigDecimal.ROUND_HALF_UP).multiply( | |
180 | + new BigDecimal("100.00")) | |
170 | 181 | .setScale(2, BigDecimal.ROUND_HALF_UP).toString()); |
171 | 182 | //逃逸 |
172 | 183 | vo.setLoopData(2, escapeAmount.divide(amountDueTotal, 4, BigDecimal.ROUND_HALF_UP).multiply( |
... | ... | @@ -180,57 +191,31 @@ public class IndexPageStatisticController extends BizController { |
180 | 191 | |
181 | 192 | /** |
182 | 193 | * 云平台首页->企业客户负责某个停车不同的支付方式收入情况.<br/> |
183 | - * | |
194 | + * 说明: | |
195 | + * 1.2017-08-22将支付方式更改为饼图.<br/> | |
184 | 196 | * @return |
185 | 197 | * @throws Exception |
186 | 198 | */ |
199 | + | |
187 | 200 | @ApiOperation("企业客户负责某个停车不同的支付方式收入情况") |
188 | 201 | @PostMapping("/queryCustIncomeForPayType") |
189 | - public BizResultVO<CustIncomeForPayTypeResVO> queryCustIncomeForPayType( | |
202 | + public BizResultVO<List<CustIncomeForPayTypeDTO>> queryCustIncomeForPayType( | |
190 | 203 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { |
191 | - logger.info("调用后场dubbo服务,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
204 | + logger.info("...begin企业客户负责某个停车不同的支付方式收入情况,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
192 | 205 | BizResult<List<CustIncomeForPayTypeDTO>> result = cusIncomeService.queryCustIncomeForPayType( |
193 | 206 | custIncomeTotalQueryRequset); |
207 | + logger.info("...end企业客户负责某个停车不同的支付方式收入情况,响应为: result={}", JSONObject.toJSONString(result)); | |
208 | + return new BizResultVO<List<CustIncomeForPayTypeDTO>>(result); | |
209 | + } | |
194 | 210 | |
195 | - logger.info("调用后场dubbo服务,响应为: result={}", JSONObject.toJSONString(result)); | |
196 | - //如果不成功 | |
197 | - if (!ResultUtils.isSuccess(result)) { | |
198 | - return new BizResultVO<>(result.getErrCode(), result.getErrMsg()); | |
199 | - } | |
200 | - List<CustIncomeForPayTypeDTO> data = result.getData(); | |
201 | - | |
202 | - CustIncomeForPayTypeResVO res = new CustIncomeForPayTypeResVO(); | |
203 | - res.addLegendData("费用", "占比"); | |
204 | - | |
205 | - BigDecimal total = BigDecimal.ZERO; | |
206 | - List<String> amount = new ArrayList<>(); | |
207 | - for (CustIncomeForPayTypeDTO dto : data) { | |
208 | - //添加X轴数据 | |
209 | - res.addXAxisData(dto.getPayTypeName()); | |
210 | - total = total.add(dto.getPayedTotalAmount()); | |
211 | - logger.info("返回的类型 和 数据为: payTypeName={},payedTotalAmount={},total={}", dto.getPayTypeName(), | |
212 | - dto.getPayedTotalAmount().toString(), total.toString()); | |
213 | - amount.add(dto.getPayedTotalAmount().setScale(2, BigDecimal.ROUND_HALF_UP) | |
214 | - .doubleValue() + ""); | |
215 | - } | |
216 | - //计算占比 | |
217 | - List<String> zb = new ArrayList<>(); | |
218 | - for (CustIncomeForPayTypeDTO dto : data) { | |
219 | - logger.info("计算占比 total={}", total.toString()); | |
220 | - if (BigDecimal.ZERO.equals(total) || total.doubleValue() == 0.00) { | |
221 | - zb.add("0.00"); | |
222 | - } else { | |
223 | - zb.add(dto.getPayedTotalAmount().divide(total, 4, RoundingMode.HALF_UP) | |
224 | - .multiply(new BigDecimal("100.00")).doubleValue() + ""); | |
225 | - } | |
211 | + @ApiOperation("查询今日车流量占用率周转率") | |
212 | + @PostMapping("/queryTodayVehicleFlowOccupyRateAndTurnOver") | |
213 | + public BizResultVO<List<TodayVehicleFlowOccupyRateAndTurnOverDTO>> queryTodayVehicleFlowOccupyRateAndTurnOver( | |
214 | + @RequestBody CommonPlnosQueryRequest request) { | |
215 | + BizResult<List<TodayVehicleFlowOccupyRateAndTurnOverDTO>> bizResult = parkingLotStatisticService | |
216 | + .queryTodayVehicleFlowOccupyRateAndTurnOver(request); | |
217 | + return new BizResultVO<>(bizResult); | |
226 | 218 | |
227 | - } | |
228 | - res.addChildData("费用", amount); | |
229 | - res.addChildData("占比", zb); | |
230 | - BizResultVO<CustIncomeForPayTypeResVO> resResult = new BizResultVO<>(); | |
231 | - resResult.setData(res); | |
232 | - logger.info("返回到前台的数据为: res={}", JSONObject.toJSONString(res)); | |
233 | - return resResult; | |
234 | 219 | } |
235 | 220 | |
236 | 221 | /** |
... | ... | @@ -240,10 +225,11 @@ public class IndexPageStatisticController extends BizController { |
240 | 225 | * @return 2017年6月19日 zhaowg |
241 | 226 | */ |
242 | 227 | @ApiOperation("根据停车场编号获取该停车场今日车流量和车位折线图") |
243 | - @PostMapping("getTodayVehicleFlowForLineChart") | |
228 | + @PostMapping("/getTodayVehicleFlowForLineChart") | |
229 | + @Deprecated | |
244 | 230 | public BizResultVO<BerthsAndFlowLineChartVO> getTodayVehicleFlowForLineChart( |
245 | 231 | @RequestBody @Valid ParkingLotUseStatisticForPageRequest request) { |
246 | - logger.info("根据停车场编号获取该停车场今日车流量和车位折线图"); | |
232 | + logger.info("根据停车场编号获取该停车场今日车流量和车位折线图"); | |
247 | 233 | //开始时间 今日0点开始 |
248 | 234 | Calendar beginTime = Calendar.getInstance(); |
249 | 235 | beginTime.set(Calendar.HOUR_OF_DAY, 0); |
... | ... | @@ -280,7 +266,7 @@ public class IndexPageStatisticController extends BizController { |
280 | 266 | //每20分钟统计一次 |
281 | 267 | request.setQueryKind(ParkConstant.ParkingLotUseStatistic.StatisticType.PER20MINUTE); |
282 | 268 | request.setBaseRequest(new BaseInfo(1, 0)); |
283 | - logger.info("调用DUBBO服务入参:"+JSON.toJSONString(request)); | |
269 | + logger.info("调用DUBBO服务入参:" + JSON.toJSONString(request)); | |
284 | 270 | BizResult<PageBean<ParkingLotUseStatisticDTO>> bizResult = parkingLotStatisticService |
285 | 271 | .queryParkingLotUseStatisticForPage(request); |
286 | 272 | PageBean<ParkingLotUseStatisticDTO> pageBean = ResultUtils.getBizResultData(bizResult); |
... | ... | @@ -312,19 +298,21 @@ public class IndexPageStatisticController extends BizController { |
312 | 298 | } |
313 | 299 | |
314 | 300 | //保存固定车流量和临时车流量 |
315 | - fixVehicleFlowMap.put(statisBeginTime, (fixVehicleFlowMap.get(statisBeginTime)==null?0:fixVehicleFlowMap.get(statisBeginTime))+statisticDTO.getFixVehicleFlow()); | |
316 | - tmpVehicleFlowMap.put(statisBeginTime, (tmpVehicleFlowMap.get(statisBeginTime)==null?0:tmpVehicleFlowMap.get(statisBeginTime))+statisticDTO.getTmpVehicleFlow()); | |
301 | + fixVehicleFlowMap.put(statisBeginTime, (fixVehicleFlowMap.get(statisBeginTime) == null ? 0 | |
302 | + : fixVehicleFlowMap.get(statisBeginTime)) + statisticDTO.getFixVehicleFlow()); | |
303 | + tmpVehicleFlowMap.put(statisBeginTime, (tmpVehicleFlowMap.get(statisBeginTime) == null ? 0 | |
304 | + : tmpVehicleFlowMap.get(statisBeginTime)) + statisticDTO.getTmpVehicleFlow()); | |
305 | + } | |
306 | + } | |
307 | + //判断是否包含所有待查询的停车场信息 | |
308 | + if (request.getPlNos().size() > parkLotMap.size()) { | |
309 | + for (String plNo : request.getPlNos()) { | |
310 | + if (!parkLotMap.containsKey(plNo)) { | |
311 | + ParkingLotDTO parkingLotDTO = ParkingLotCacheUtil.getParkLotByPlNo(plNo); | |
312 | + parkNameMap.put(plNo, parkingLotDTO.getPlName()); | |
313 | + parkLotMap.put(plNo, Maps.newHashMap()); | |
314 | + } | |
317 | 315 | } |
318 | - } | |
319 | - //判断是否包含所有待查询的停车场信息 | |
320 | - if(request.getPlNos().size()>parkLotMap.size()){ | |
321 | - for (String plNo:request.getPlNos()) { | |
322 | - if(!parkLotMap.containsKey(plNo)){ | |
323 | - ParkingLotDTO parkingLotDTO=ParkingLotCacheUtil.getParkLotByPlNo(plNo); | |
324 | - parkNameMap.put(plNo, parkingLotDTO.getPlName()); | |
325 | - parkLotMap.put(plNo, Maps.newHashMap()); | |
326 | - } | |
327 | - } | |
328 | 316 | } |
329 | 317 | //封装车位统计信息 |
330 | 318 | LineChartVO freeBerthRatios = new LineChartVO(); |
... | ... | @@ -348,8 +336,8 @@ public class IndexPageStatisticController extends BizController { |
348 | 336 | for (String timestamp : xAxisData) { |
349 | 337 | if (freeRatioMaps.containsKey(timestamp)) { |
350 | 338 | lastFreeRatio = freeRatioMaps.get(timestamp).intValue(); |
351 | - }else{ | |
352 | - lastFreeRatio = 0; | |
339 | + } else { | |
340 | + lastFreeRatio = 0; | |
353 | 341 | } |
354 | 342 | freeRations.add(lastFreeRatio); |
355 | 343 | } |
... | ... | @@ -381,15 +369,15 @@ public class IndexPageStatisticController extends BizController { |
381 | 369 | for (String timestamp : xAxisData) { |
382 | 370 | if (fixVehicleFlowMap.containsKey(timestamp)) { |
383 | 371 | lastfixFlow = fixVehicleFlowMap.get(timestamp).intValue(); |
384 | - }else{ | |
385 | - lastfixFlow = 0; | |
372 | + } else { | |
373 | + lastfixFlow = 0; | |
386 | 374 | } |
387 | 375 | fixSerieVoData.add(lastfixFlow); |
388 | 376 | |
389 | 377 | if (tmpVehicleFlowMap.containsKey(timestamp)) { |
390 | 378 | lasttmpFlow = tmpVehicleFlowMap.get(timestamp).intValue(); |
391 | - }else{ | |
392 | - lasttmpFlow = 0; | |
379 | + } else { | |
380 | + lasttmpFlow = 0; | |
393 | 381 | } |
394 | 382 | tmpSerieVoData.add(lasttmpFlow); |
395 | 383 | } |
... | ... | @@ -417,6 +405,102 @@ public class IndexPageStatisticController extends BizController { |
417 | 405 | } |
418 | 406 | |
419 | 407 | /** |
408 | + * 实时统计今日停车次数,停车次数以出场时间进行统计 | |
409 | + * | |
410 | + * @return | |
411 | + */ | |
412 | + @ApiOperation("实时查询当前停车次数") | |
413 | + @PostMapping("/realtimeParkingOutNum") | |
414 | + public BizResultVO<Long> realtimeParkingOutNum(@RequestBody CommonPlnosQueryRequest request) { | |
415 | + BizResult<Long> bizResult = iInOutParkingService.queryRealTimeOutParkNumOfPlNos(request); | |
416 | + return new BizResultVO<>(bizResult); | |
417 | + } | |
418 | + | |
419 | + /** | |
420 | + * 今日实时周转率 | |
421 | + * | |
422 | + * @param request | |
423 | + * @return | |
424 | + * @desc 今日实时进场次数/总车位数 | |
425 | + */ | |
426 | + @ApiOperation("实时查询当前周转率") | |
427 | + @PostMapping("/realtimeTurnoverRate") | |
428 | + public BizResultVO<Map<String,Object>> realtimeTurnoverRate(@RequestBody CommonPlnosQueryRequest request) { | |
429 | + BizResultVO<Map<String,Object>> res = new BizResultVO<>(); | |
430 | + Map<String,Object> resMap = new HashMap<>(); | |
431 | + //1、查询截止当前进场停车次数 | |
432 | + BizResult<Long> bizResult = iInOutParkingService.queryRealTimeInParkNumOfPlNos(request); | |
433 | + if(ResultUtils.isError(bizResult)){ | |
434 | + res.setCode(bizResult.getErrCode().getCode()); | |
435 | + res.setMsg(bizResult.getErrMsg()); | |
436 | + return res; | |
437 | + } | |
438 | + //2、根据停车场编号查询停车场总车位数 | |
439 | + BizResult<Long> berthResult = parkingLotQueryService.queryBerthNumByPlNos(request); | |
440 | + if(ResultUtils.isError(berthResult)){ | |
441 | + res.setCode(berthResult.getErrCode().getCode()); | |
442 | + res.setMsg(berthResult.getErrMsg()); | |
443 | + return res; | |
444 | + } | |
445 | + | |
446 | + //停车次数 | |
447 | + resMap.put("parkNum",bizResult.getData()); | |
448 | + //总车位数 | |
449 | + resMap.put("allBerthNum",berthResult.getData()); | |
450 | + double rate = bizResult.getData() * 1.0 / berthResult.getData() * 100; | |
451 | + String rateStr = new DecimalFormat("#.00").format(rate); | |
452 | + if(rate == 0){ | |
453 | + rateStr = "0.00"; | |
454 | + } | |
455 | + resMap.put("rate",rateStr); | |
456 | + res.setData(resMap); | |
457 | + return res; | |
458 | + } | |
459 | + | |
460 | + /** | |
461 | + * 今日实时占用率 | |
462 | + * | |
463 | + * @param request | |
464 | + * @return | |
465 | + * @desc 1-(今日实时空余车位数/总车位数) | |
466 | + */ | |
467 | + @ApiOperation("实时查询当前占用率") | |
468 | + @PostMapping("/realtimeoccupationRate") | |
469 | + public BizResultVO<Map<String,Object>> realtimeoccupationRate(@RequestBody CommonPlnosQueryRequest request) { | |
470 | + BizResultVO<Map<String,Object>> res = new BizResultVO<>(); | |
471 | + Map<String,Object> resMap = new HashMap<>(); | |
472 | + | |
473 | + //1、查询截止当前空余车位数 | |
474 | + BizResult<Long> bizResult = parkingLotBerthsService.queryAllFreeBerthNum(request); | |
475 | + if(ResultUtils.isError(bizResult)){ | |
476 | + res.setCode(bizResult.getErrCode().getCode()); | |
477 | + res.setMsg(bizResult.getErrMsg()); | |
478 | + return res; | |
479 | + } | |
480 | + //2、根据停车场编号查询停车场总车位数 | |
481 | + BizResult<Long> berthResult = parkingLotQueryService.queryBerthNumByPlNos(request); | |
482 | + if(ResultUtils.isError(berthResult)){ | |
483 | + res.setCode(berthResult.getErrCode().getCode()); | |
484 | + res.setMsg(berthResult.getErrMsg()); | |
485 | + return res; | |
486 | + } | |
487 | + //空余车位数 | |
488 | + resMap.put("freeBerthNum",bizResult.getData()); | |
489 | + //总车位数 | |
490 | + resMap.put("allBerthNum",berthResult.getData()); | |
491 | + | |
492 | + double rate = (1-bizResult.getData() * 1.0 / berthResult.getData()) * 100; | |
493 | + String rateStr = new DecimalFormat("#.00").format(rate); | |
494 | + if(rate == 0){ | |
495 | + rateStr = "0.00"; | |
496 | + } | |
497 | + resMap.put("rate",rateStr); | |
498 | + res.setData(resMap); | |
499 | + return res; | |
500 | + | |
501 | + } | |
502 | + | |
503 | + /** | |
420 | 504 | * 实时查询今日空置率<br> |
421 | 505 | * 今日空置率:当天0:00到操作时间的每个时间戳的空置率做加权算法,<br> |
422 | 506 | * 0:00-7:00加权10%,7:00-9:00加权40%,9:00-17:00加权15%,17:00-21:00加权25%,21:00-24:00加权10%,加权后的空置率之和除以时间戳数,得到“今日空置率” |
... | ... | @@ -447,13 +531,13 @@ public class IndexPageStatisticController extends BizController { |
447 | 531 | Double totalfreeRatio = 0.00; |
448 | 532 | for (ParkingLotUseStatisticDTO statisticDTO : pageBean.getDataList()) { |
449 | 533 | totalfreeRatio += statisticDTO.getFreeRatio(); |
450 | - //暂时不加权 | |
451 | - //this.weightForFreeRation(statisticDTO.getStatisticBeginTime(), | |
452 | - //statisticDTO.getFreeRatio(), statisticDTO.getPlNo()); | |
534 | + //暂时不加权 | |
535 | + //this.weightForFreeRation(statisticDTO.getStatisticBeginTime(), | |
536 | + //statisticDTO.getFreeRatio(), statisticDTO.getPlNo()); | |
453 | 537 | } |
454 | 538 | logger.info("加权后的空置率之和:" + totalfreeRatio + " 时间戳个数:" + pageBean.getDataList().size()); |
455 | 539 | Double avgFreeRation = totalfreeRatio / pageBean.getDataList().size(); |
456 | - String result = String.format("%.2f", avgFreeRation*100); | |
540 | + String result = String.format("%.2f", avgFreeRation * 100); | |
457 | 541 | return new BizResultVO<String>().setData(result); |
458 | 542 | } |
459 | 543 | |
... | ... | @@ -485,33 +569,42 @@ public class IndexPageStatisticController extends BizController { |
485 | 569 | } |
486 | 570 | } |
487 | 571 | |
488 | - public static void main(String[] args) { | |
489 | - BigDecimal m = BigDecimal.ZERO; | |
490 | - BigDecimal n = m.add(BigDecimal.TEN); | |
491 | - System.out.println(new BigDecimal("00.0").doubleValue() == 0); | |
492 | - } | |
493 | - | |
494 | 572 | /** |
495 | - * @param request | |
573 | + * 企业云平台首页-->停车次数统计(饼图).<br/> | |
574 | + * 说明:从订单表中统计(逃逸,免费,月卡年卡,临时)停车次数.<br/> | |
575 | + * @param custIncomeTotalQueryRequset | |
496 | 576 | * @return |
497 | - * 2017年8月18日 wangfei | |
577 | + * @throws Exception | |
498 | 578 | */ |
499 | - @ApiOperation(value="根据停车场编号统计设备数量") | |
500 | - @PostMapping("statisticParkLotEqpCountByPlNos") | |
501 | - @ResponseBody | |
502 | - public BizResult<List<ParkLotEqpTypeCountVO>> statisticParkLotEqpCountByPlNos(@RequestBody | |
503 | - EqpTypeQueryByPlNosRequest request){ | |
504 | - logger.info("停车场编号:"+request.getPlNos()+" 统计设备数量等信息"); | |
505 | - List<ParkLotEqpTypeCountVO> resultList = new ArrayList<>(); | |
579 | + @ApiOperation("企业云平台首页-->停车次数统计(饼图)") | |
580 | + @PostMapping("/queryParingCount") | |
581 | + public BizResultVO<List<ParkingCountDTO>> queryParingCount(@RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception{ | |
582 | + logger.info("...begin停车次数统计->调用后场dubbo服务,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
583 | + BizResult<List<ParkingCountDTO>> result =cusIncomeService.queryParingCount(custIncomeTotalQueryRequset); | |
584 | + logger.info("...end停车次数统计->调用后场dubbo服务..."); | |
585 | + return new BizResultVO<List<ParkingCountDTO>>(result); | |
586 | + } | |
587 | + | |
588 | + /** | |
589 | + * @param request | |
590 | + * @return 2017年8月18日 wangfei | |
591 | + */ | |
592 | + @ApiOperation(value = "根据停车场编号统计设备数量") | |
593 | + @PostMapping("statisticParkLotEqpCountByPlNos") | |
594 | + @ResponseBody | |
595 | + public BizResult<List<ParkLotEqpTypeCountVO>> statisticParkLotEqpCountByPlNos(@RequestBody | |
596 | + EqpTypeQueryByPlNosRequest request) { | |
597 | + logger.info("停车场编号:" + request.getPlNos() + " 统计设备数量等信息"); | |
598 | + List<ParkLotEqpTypeCountVO> resultList = new ArrayList<>(); | |
506 | 599 | BizResult<List<ParkLotEqpTypeCountStatisticByCountryDTO>> result = parkingLotEqpService |
507 | - .StatisticParkLotEqpCountByPlNos(request); | |
600 | + .StatisticParkLotEqpCountByPlNos(request); | |
508 | 601 | if (!CollectionUtils.isEmpty(result.getData())) { |
509 | - for (ParkLotEqpTypeCountStatisticByCountryDTO i :result.getData()) { | |
510 | - ParkLotEqpTypeCountVO vo = new ParkLotEqpTypeCountVO(); | |
602 | + for (ParkLotEqpTypeCountStatisticByCountryDTO i : result.getData()) { | |
603 | + ParkLotEqpTypeCountVO vo = new ParkLotEqpTypeCountVO(); | |
511 | 604 | BeanUtils.copyProperties(i, vo); |
512 | 605 | resultList.add(vo); |
513 | 606 | } |
514 | 607 | } |
515 | 608 | return new BizResult<>(resultList); |
516 | - } | |
609 | + } | |
517 | 610 | } | ... | ... |
src/main/resources/application.properties
1 | -project.syscode=zteits-park-portal | |
2 | -spring.application.name=zteits-park-portal | |
1 | +project.syscode=zteits-bcp-portal | |
2 | +spring.application.name=zteits-bcp-portal | |
3 | 3 | server.port=8099 |
4 | 4 | |
5 | 5 | # logging |
... | ... | @@ -7,6 +7,7 @@ logging.level.root=info |
7 | 7 | #logging.level.org.springframework.web=DEBUG |
8 | 8 | logging.level.com.zteits.irain.portal=debug |
9 | 9 | #logging.path=${user.home}/logs |
10 | +logging.path=./logs/${spring.application.name} | |
10 | 11 | logging.file=${spring.application.name}.log |
11 | 12 | logging.config=classpath:logback-spring.xml |
12 | 13 | ... | ... |