Commit 3757560e2b12aea0065f88724c053d2b518521d0
Merge branch 'branch_0808' of http://192.168.1.195:9998/ZTEITS-Developers/zteits…
…-bcp-portal into branch_0808
Showing
3 changed files
with
105 additions
and
154 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/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
... | ... | @@ -30,6 +30,7 @@ import com.zteits.clouds.api.apibase.bean.PageBean; |
30 | 30 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeForPayTypeDTO; |
31 | 31 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalDTO; |
32 | 32 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalParkDTO; |
33 | +import com.zteits.clouds.api.dto.clouds.dto.ParkingCountDTO; | |
33 | 34 | import com.zteits.clouds.api.dto.clouds.param.CustIncomeTotalQueryRequset; |
34 | 35 | import com.zteits.clouds.api.dto.park.dto.ParkLotEqpTypeCountStatisticByCountryDTO; |
35 | 36 | import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO; |
... | ... | @@ -112,7 +113,7 @@ public class IndexPageStatisticController extends BizController { |
112 | 113 | public BizResultVO<CustIncomeTotalVO> queryCustIncomeTotal( |
113 | 114 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) |
114 | 115 | throws Exception { |
115 | - | |
116 | + logger.info("---begin企业云平台首页-实际收入查询,入参={}",JSONObject.toJSON(custIncomeTotalQueryRequset)); | |
116 | 117 | BizResultVO<CustIncomeTotalVO> bizResultVO = new BizResultVO<>(); |
117 | 118 | |
118 | 119 | BizResult<CustIncomeTotalDTO> result = cusIncomeService.queryCustIncomeTotal(custIncomeTotalQueryRequset); |
... | ... | @@ -129,13 +130,13 @@ public class IndexPageStatisticController extends BizController { |
129 | 130 | vo.setPayedTotalAmount(result.getData().getPayedTotalAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString()); |
130 | 131 | |
131 | 132 | bizResultVO.setData(vo); |
132 | - | |
133 | + logger.info("---end企业云平台首页-实际收入查询"); | |
133 | 134 | return bizResultVO; |
134 | 135 | } |
135 | 136 | |
136 | 137 | /** |
137 | 138 | * 云平台首页->企业客户负责某个停车收入情况.<br/> |
138 | - * | |
139 | + * | |
139 | 140 | * @return |
140 | 141 | * @throws Exception |
141 | 142 | */ |
... | ... | @@ -190,57 +191,21 @@ public class IndexPageStatisticController extends BizController { |
190 | 191 | |
191 | 192 | /** |
192 | 193 | * 云平台首页->企业客户负责某个停车不同的支付方式收入情况.<br/> |
193 | - * | |
194 | + * 说明: | |
195 | + * 1.2017-08-22将支付方式更改为饼图.<br/> | |
194 | 196 | * @return |
195 | 197 | * @throws Exception |
196 | 198 | */ |
199 | + | |
197 | 200 | @ApiOperation("企业客户负责某个停车不同的支付方式收入情况") |
198 | 201 | @PostMapping("/queryCustIncomeForPayType") |
199 | - public BizResultVO<CustIncomeForPayTypeResVO> queryCustIncomeForPayType( | |
202 | + public BizResultVO<List<CustIncomeForPayTypeDTO>> queryCustIncomeForPayType( | |
200 | 203 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { |
201 | - logger.info("调用后场dubbo服务,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
204 | + logger.info("...begin企业客户负责某个停车不同的支付方式收入情况,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
202 | 205 | BizResult<List<CustIncomeForPayTypeDTO>> result = cusIncomeService.queryCustIncomeForPayType( |
203 | 206 | custIncomeTotalQueryRequset); |
204 | - | |
205 | - logger.info("调用后场dubbo服务,响应为: result={}", JSONObject.toJSONString(result)); | |
206 | - //如果不成功 | |
207 | - if (!ResultUtils.isSuccess(result)) { | |
208 | - return new BizResultVO<>(result.getErrCode(), result.getErrMsg()); | |
209 | - } | |
210 | - List<CustIncomeForPayTypeDTO> data = result.getData(); | |
211 | - | |
212 | - CustIncomeForPayTypeResVO res = new CustIncomeForPayTypeResVO(); | |
213 | - res.addLegendData("费用", "占比"); | |
214 | - | |
215 | - BigDecimal total = BigDecimal.ZERO; | |
216 | - List<String> amount = new ArrayList<>(); | |
217 | - for (CustIncomeForPayTypeDTO dto : data) { | |
218 | - //添加X轴数据 | |
219 | - res.addXAxisData(dto.getPayTypeName()); | |
220 | - total = total.add(dto.getPayedTotalAmount()); | |
221 | - logger.info("返回的类型 和 数据为: payTypeName={},payedTotalAmount={},total={}", dto.getPayTypeName(), | |
222 | - dto.getPayedTotalAmount().toString(), total.toString()); | |
223 | - amount.add(dto.getPayedTotalAmount().setScale(2, BigDecimal.ROUND_HALF_UP) | |
224 | - .doubleValue() + ""); | |
225 | - } | |
226 | - //计算占比 | |
227 | - List<String> zb = new ArrayList<>(); | |
228 | - for (CustIncomeForPayTypeDTO dto : data) { | |
229 | - logger.info("计算占比 total={}", total.toString()); | |
230 | - if (BigDecimal.ZERO.equals(total) || total.doubleValue() == 0.00) { | |
231 | - zb.add("0.00"); | |
232 | - } else { | |
233 | - zb.add(dto.getPayedTotalAmount().divide(total, 4, RoundingMode.HALF_UP) | |
234 | - .multiply(new BigDecimal("100.00")).doubleValue() + ""); | |
235 | - } | |
236 | - | |
237 | - } | |
238 | - res.addChildData("费用", amount); | |
239 | - res.addChildData("占比", zb); | |
240 | - BizResultVO<CustIncomeForPayTypeResVO> resResult = new BizResultVO<>(); | |
241 | - resResult.setData(res); | |
242 | - logger.info("返回到前台的数据为: res={}", JSONObject.toJSONString(res)); | |
243 | - return resResult; | |
207 | + logger.info("...end企业客户负责某个停车不同的支付方式收入情况,响应为: result={}", JSONObject.toJSONString(result)); | |
208 | + return new BizResultVO<List<CustIncomeForPayTypeDTO>>(result); | |
244 | 209 | } |
245 | 210 | |
246 | 211 | @ApiOperation("查询今日车流量占用率周转率") |
... | ... | @@ -604,10 +569,20 @@ public class IndexPageStatisticController extends BizController { |
604 | 569 | } |
605 | 570 | } |
606 | 571 | |
607 | - public static void main(String[] args) { | |
608 | - BigDecimal m = BigDecimal.ZERO; | |
609 | - BigDecimal n = m.add(BigDecimal.TEN); | |
610 | - System.out.println(new BigDecimal("00.0").doubleValue() == 0); | |
572 | + /** | |
573 | + * 企业云平台首页-->停车次数统计(饼图).<br/> | |
574 | + * 说明:从订单表中统计(逃逸,免费,月卡年卡,临时)停车次数.<br/> | |
575 | + * @param custIncomeTotalQueryRequset | |
576 | + * @return | |
577 | + * @throws Exception | |
578 | + */ | |
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); | |
611 | 586 | } |
612 | 587 | |
613 | 588 | /** | ... | ... |