Commit 661fb412b30560fc2ff617bf592e5b8f3fb61f4b
Merge branch 'branch_0808' of
http://192.168.1.195:9998/ZTEITS-Developers/zteits-bcp-portal.git into branch_0808 Conflicts: src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java
Showing
4 changed files
with
291 additions
and
160 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/berthmanage/BerthManageController.java
... | ... | @@ -3,12 +3,15 @@ package com.zteits.irain.portal.web.parkinglotcloudplatform.berthmanage; |
3 | 3 | import java.text.SimpleDateFormat; |
4 | 4 | import java.util.ArrayList; |
5 | 5 | import java.util.Date; |
6 | +import java.util.HashMap; | |
6 | 7 | import java.util.List; |
8 | +import java.util.Map; | |
7 | 9 | |
8 | 10 | import javax.servlet.http.HttpServletRequest; |
9 | 11 | import javax.servlet.http.HttpServletResponse; |
10 | 12 | |
11 | 13 | import org.apache.poi.xssf.usermodel.XSSFSheet; |
14 | +import org.springframework.beans.BeanUtils; | |
12 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
13 | 16 | import org.springframework.stereotype.Controller; |
14 | 17 | import org.springframework.web.bind.annotation.GetMapping; |
... | ... | @@ -31,7 +34,10 @@ import com.zteits.clouds.api.apibase.bean.PageBean; |
31 | 34 | import com.zteits.clouds.api.apibase.exception.BizException; |
32 | 35 | import com.zteits.clouds.api.dto.park.dto.BerthsDTO; |
33 | 36 | import com.zteits.clouds.api.dto.park.param.BerthManageRequest; |
37 | +import com.zteits.clouds.api.dto.sys.SysCodeValueDTO; | |
38 | +import com.zteits.clouds.api.dto.sys.param.SysCodeValueByKindQueryRequest; | |
34 | 39 | import com.zteits.clouds.api.service.park.BerthManageService; |
40 | +import com.zteits.clouds.api.service.sys.SysCommonService; | |
35 | 41 | |
36 | 42 | import io.swagger.annotations.Api; |
37 | 43 | import io.swagger.annotations.ApiOperation; |
... | ... | @@ -57,6 +63,8 @@ import io.swagger.annotations.ApiOperation; |
57 | 63 | public class BerthManageController extends BizController { |
58 | 64 | @Autowired |
59 | 65 | private BerthManageService berthManageService; |
66 | + @Autowired | |
67 | + private SysCommonService sysCommonService; | |
60 | 68 | |
61 | 69 | |
62 | 70 | /** |
... | ... | @@ -125,6 +133,18 @@ public class BerthManageController extends BizController { |
125 | 133 | request.setBaseRequest(new BaseInfo(1, 1000)); |
126 | 134 | request.setSysCode(sysCode); |
127 | 135 | |
136 | + //查询字典值 | |
137 | + Map<String,String> codes = new HashMap<>(); | |
138 | + SysCodeValueByKindQueryRequest codeValueRequest = new SysCodeValueByKindQueryRequest(); | |
139 | + BeanUtils.copyProperties(request, codeValueRequest); | |
140 | + codeValueRequest.setSysCodeKind("SYS_CODE_PARK_STYLE"); | |
141 | + BizResult<List<SysCodeValueDTO>> codeValueDTO = sysCommonService.querySysCodeValueByKind(codeValueRequest); | |
142 | + if(CollectionUtils.isNotEmpty(codeValueDTO.getData())){ | |
143 | + for (SysCodeValueDTO dto : codeValueDTO.getData()) { | |
144 | + codes.put(dto.getCodeValue(), dto.getCodeValueName()); | |
145 | + } | |
146 | + } | |
147 | + | |
128 | 148 | BizResult<PageBean<BerthsDTO>> bizResult = berthManageService.queryBerthByCondition(request); |
129 | 149 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
130 | 150 | String[] title = new String[] { "序号","泊位编号", "所属停车场", "所属泊位区间", "停车方式" }; |
... | ... | @@ -148,7 +168,7 @@ public class BerthManageController extends BizController { |
148 | 168 | obj[index++] = b.getBerthNo(); |
149 | 169 | obj[index++] = b.getPlName(); |
150 | 170 | obj[index++] = b.getParkAreaName(); |
151 | - obj[index++] = b.getParkType(); | |
171 | + obj[index++] = codes.get(b.getParkType()); | |
152 | 172 | contentList.add(obj); |
153 | 173 | } |
154 | 174 | ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/IndexPageStatisticController.java
1 | 1 | package com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic; |
2 | 2 | |
3 | 3 | import java.math.BigDecimal; |
4 | -import java.math.RoundingMode; | |
5 | 4 | import java.text.DecimalFormat; |
6 | 5 | import java.util.ArrayList; |
7 | 6 | import java.util.Calendar; |
... | ... | @@ -32,12 +31,14 @@ import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalDTO; |
32 | 31 | import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalParkDTO; |
33 | 32 | import com.zteits.clouds.api.dto.clouds.dto.ParkingCountDTO; |
34 | 33 | import com.zteits.clouds.api.dto.clouds.param.CustIncomeTotalQueryRequset; |
34 | +import com.zteits.clouds.api.dto.park.dto.IndexSignRecordDTO; | |
35 | 35 | import com.zteits.clouds.api.dto.park.dto.ParkLotEqpTypeCountStatisticByCountryDTO; |
36 | 36 | import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO; |
37 | 37 | import com.zteits.clouds.api.dto.park.dto.ParkingLotUseStatisticDTO; |
38 | 38 | import com.zteits.clouds.api.dto.park.dto.TodayVehicleFlowOccupyRateAndTurnOverDTO; |
39 | 39 | import com.zteits.clouds.api.dto.park.param.CommonPlnosQueryRequest; |
40 | 40 | import com.zteits.clouds.api.dto.park.param.EqpTypeQueryByPlNosRequest; |
41 | +import com.zteits.clouds.api.dto.park.param.IndexSignRecordQueryRequest; | |
41 | 42 | import com.zteits.clouds.api.dto.park.param.ParkingLotUseStatisticForPageRequest; |
42 | 43 | import com.zteits.clouds.api.dto.park.param.RealTimeVehicleFlowQueryRequest; |
43 | 44 | import com.zteits.clouds.api.service.clouds.CustIncomeService; |
... | ... | @@ -46,9 +47,9 @@ import com.zteits.clouds.api.service.park.ParkingLotBerthsService; |
46 | 47 | import com.zteits.clouds.api.service.park.ParkingLotEqpService; |
47 | 48 | import com.zteits.clouds.api.service.park.ParkingLotQueryService; |
48 | 49 | import com.zteits.clouds.api.service.park.ParkingLotUseStatisticService; |
50 | +import com.zteits.clouds.api.service.park.SignRecordService; | |
49 | 51 | import com.zteits.irain.portal.constant.ParkConstant; |
50 | 52 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.BerthsAndFlowLineChartVO; |
51 | -import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustIncomeForPayTypeResVO; | |
52 | 53 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustIncomeTotalParkVO; |
53 | 54 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.CustIncomeTotalVO; |
54 | 55 | import com.zteits.irain.portal.vo.parkinglotcloudplatform.datastatistic.LineChartVO; |
... | ... | @@ -102,6 +103,9 @@ public class IndexPageStatisticController extends BizController { |
102 | 103 | @Autowired |
103 | 104 | private ParkingLotBerthsService parkingLotBerthsService; |
104 | 105 | |
106 | + @Autowired | |
107 | + private SignRecordService signRecordService; | |
108 | + | |
105 | 109 | /** |
106 | 110 | * 云平台首页->企业客户负责所有的停车场汇总.<br/> |
107 | 111 | * |
... | ... | @@ -113,7 +117,7 @@ public class IndexPageStatisticController extends BizController { |
113 | 117 | public BizResultVO<CustIncomeTotalVO> queryCustIncomeTotal( |
114 | 118 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) |
115 | 119 | throws Exception { |
116 | - logger.info("---begin企业云平台首页-实际收入查询,入参={}",JSONObject.toJSON(custIncomeTotalQueryRequset)); | |
120 | + logger.info("---begin企业云平台首页-实际收入查询,入参={}", JSONObject.toJSON(custIncomeTotalQueryRequset)); | |
117 | 121 | BizResultVO<CustIncomeTotalVO> bizResultVO = new BizResultVO<>(); |
118 | 122 | |
119 | 123 | BizResult<CustIncomeTotalDTO> result = cusIncomeService.queryCustIncomeTotal(custIncomeTotalQueryRequset); |
... | ... | @@ -136,7 +140,7 @@ public class IndexPageStatisticController extends BizController { |
136 | 140 | |
137 | 141 | /** |
138 | 142 | * 云平台首页->企业客户负责某个停车收入情况.<br/> |
139 | - * | |
143 | + * | |
140 | 144 | * @return |
141 | 145 | * @throws Exception |
142 | 146 | */ |
... | ... | @@ -192,16 +196,18 @@ public class IndexPageStatisticController extends BizController { |
192 | 196 | /** |
193 | 197 | * 云平台首页->企业客户负责某个停车不同的支付方式收入情况.<br/> |
194 | 198 | * 说明: |
195 | - * 1.2017-08-22将支付方式更改为饼图.<br/> | |
199 | + * 1.2017-08-22将支付方式更改为饼图.<br/> | |
200 | + * | |
196 | 201 | * @return |
197 | 202 | * @throws Exception |
198 | 203 | */ |
199 | - | |
204 | + | |
200 | 205 | @ApiOperation("企业客户负责某个停车不同的支付方式收入情况") |
201 | 206 | @PostMapping("/queryCustIncomeForPayType") |
202 | 207 | public BizResultVO<List<CustIncomeForPayTypeDTO>> queryCustIncomeForPayType( |
203 | 208 | @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { |
204 | - logger.info("...begin企业客户负责某个停车不同的支付方式收入情况,入参为: request={}", JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
209 | + logger.info("...begin企业客户负责某个停车不同的支付方式收入情况,入参为: request={}", | |
210 | + JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
205 | 211 | BizResult<List<CustIncomeForPayTypeDTO>> result = cusIncomeService.queryCustIncomeForPayType( |
206 | 212 | custIncomeTotalQueryRequset); |
207 | 213 | logger.info("...end企业客户负责某个停车不同的支付方式收入情况,响应为: result={}", JSONObject.toJSONString(result)); |
... | ... | @@ -425,34 +431,34 @@ public class IndexPageStatisticController extends BizController { |
425 | 431 | */ |
426 | 432 | @ApiOperation("实时查询当前周转率") |
427 | 433 | @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<>(); | |
434 | + public BizResultVO<Map<String, Object>> realtimeTurnoverRate(@RequestBody CommonPlnosQueryRequest request) { | |
435 | + BizResultVO<Map<String, Object>> res = new BizResultVO<>(); | |
436 | + Map<String, Object> resMap = new HashMap<>(); | |
431 | 437 | //1、查询截止当前进场停车次数 |
432 | 438 | BizResult<Long> bizResult = iInOutParkingService.queryRealTimeInParkNumOfPlNos(request); |
433 | - if(ResultUtils.isError(bizResult)){ | |
439 | + if (ResultUtils.isError(bizResult)) { | |
434 | 440 | res.setCode(bizResult.getErrCode().getCode()); |
435 | 441 | res.setMsg(bizResult.getErrMsg()); |
436 | 442 | return res; |
437 | 443 | } |
438 | 444 | //2、根据停车场编号查询停车场总车位数 |
439 | 445 | BizResult<Long> berthResult = parkingLotQueryService.queryBerthNumByPlNos(request); |
440 | - if(ResultUtils.isError(berthResult)){ | |
446 | + if (ResultUtils.isError(berthResult)) { | |
441 | 447 | res.setCode(berthResult.getErrCode().getCode()); |
442 | 448 | res.setMsg(berthResult.getErrMsg()); |
443 | 449 | return res; |
444 | 450 | } |
445 | 451 | |
446 | 452 | //停车次数 |
447 | - resMap.put("parkNum",bizResult.getData()); | |
453 | + resMap.put("parkNum", bizResult.getData()); | |
448 | 454 | //总车位数 |
449 | - resMap.put("allBerthNum",berthResult.getData()); | |
455 | + resMap.put("allBerthNum", berthResult.getData()); | |
450 | 456 | double rate = bizResult.getData() * 1.0 / berthResult.getData() * 100; |
451 | 457 | String rateStr = new DecimalFormat("#.00").format(rate); |
452 | - if(rate == 0){ | |
458 | + if (rate == 0) { | |
453 | 459 | rateStr = "0.00"; |
454 | 460 | } |
455 | - resMap.put("rate",rateStr); | |
461 | + resMap.put("rate", rateStr); | |
456 | 462 | res.setData(resMap); |
457 | 463 | return res; |
458 | 464 | } |
... | ... | @@ -466,35 +472,35 @@ public class IndexPageStatisticController extends BizController { |
466 | 472 | */ |
467 | 473 | @ApiOperation("实时查询当前占用率") |
468 | 474 | @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<>(); | |
475 | + public BizResultVO<Map<String, Object>> realtimeoccupationRate(@RequestBody CommonPlnosQueryRequest request) { | |
476 | + BizResultVO<Map<String, Object>> res = new BizResultVO<>(); | |
477 | + Map<String, Object> resMap = new HashMap<>(); | |
472 | 478 | |
473 | 479 | //1、查询截止当前空余车位数 |
474 | 480 | BizResult<Long> bizResult = parkingLotBerthsService.queryAllFreeBerthNum(request); |
475 | - if(ResultUtils.isError(bizResult)){ | |
481 | + if (ResultUtils.isError(bizResult)) { | |
476 | 482 | res.setCode(bizResult.getErrCode().getCode()); |
477 | 483 | res.setMsg(bizResult.getErrMsg()); |
478 | 484 | return res; |
479 | 485 | } |
480 | 486 | //2、根据停车场编号查询停车场总车位数 |
481 | 487 | BizResult<Long> berthResult = parkingLotQueryService.queryBerthNumByPlNos(request); |
482 | - if(ResultUtils.isError(berthResult)){ | |
488 | + if (ResultUtils.isError(berthResult)) { | |
483 | 489 | res.setCode(berthResult.getErrCode().getCode()); |
484 | 490 | res.setMsg(berthResult.getErrMsg()); |
485 | 491 | return res; |
486 | 492 | } |
487 | 493 | //空余车位数 |
488 | - resMap.put("freeBerthNum",bizResult.getData()); | |
494 | + resMap.put("freeBerthNum", bizResult.getData()); | |
489 | 495 | //总车位数 |
490 | - resMap.put("allBerthNum",berthResult.getData()); | |
496 | + resMap.put("allBerthNum", berthResult.getData()); | |
491 | 497 | |
492 | - double rate = (1-bizResult.getData() * 1.0 / berthResult.getData()) * 100; | |
498 | + double rate = (1 - bizResult.getData() * 1.0 / berthResult.getData()) * 100; | |
493 | 499 | String rateStr = new DecimalFormat("#.00").format(rate); |
494 | - if(rate == 0){ | |
500 | + if (rate == 0) { | |
495 | 501 | rateStr = "0.00"; |
496 | 502 | } |
497 | - resMap.put("rate",rateStr); | |
503 | + resMap.put("rate", rateStr); | |
498 | 504 | res.setData(resMap); |
499 | 505 | return res; |
500 | 506 | |
... | ... | @@ -570,19 +576,22 @@ public class IndexPageStatisticController extends BizController { |
570 | 576 | } |
571 | 577 | |
572 | 578 | /** |
573 | - * 企业云平台首页-->停车次数统计(饼图).<br/> | |
574 | - * 说明:从订单表中统计(逃逸,免费,月卡年卡,临时)停车次数.<br/> | |
575 | - * @param custIncomeTotalQueryRequset | |
576 | - * @return | |
577 | - * @throws Exception | |
578 | - */ | |
579 | + * 企业云平台首页-->停车次数统计(饼图).<br/> | |
580 | + * 说明:从订单表中统计(逃逸,免费,月卡年卡,临时)停车次数.<br/> | |
581 | + * | |
582 | + * @param custIncomeTotalQueryRequset | |
583 | + * @return | |
584 | + * @throws Exception | |
585 | + */ | |
579 | 586 | @ApiOperation("企业云平台首页-->停车次数统计(饼图)") |
580 | 587 | @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); | |
588 | + public BizResultVO<List<ParkingCountDTO>> queryParingCount( | |
589 | + @RequestBody CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { | |
590 | + logger.info("...begin停车次数统计->调用后场dubbo服务,入参为: request={}", | |
591 | + JSONObject.toJSONString(custIncomeTotalQueryRequset)); | |
592 | + BizResult<List<ParkingCountDTO>> result = cusIncomeService.queryParingCount(custIncomeTotalQueryRequset); | |
593 | + logger.info("...end停车次数统计->调用后场dubbo服务..."); | |
594 | + return new BizResultVO<List<ParkingCountDTO>>(result); | |
586 | 595 | } |
587 | 596 | |
588 | 597 | /** |
... | ... | @@ -607,4 +616,20 @@ public class IndexPageStatisticController extends BizController { |
607 | 616 | } |
608 | 617 | return new BizResult<>(resultList); |
609 | 618 | } |
619 | + | |
620 | + /** | |
621 | + * 查询首页签到记录 | |
622 | + * | |
623 | + * @param request | |
624 | + * @return | |
625 | + */ | |
626 | + @ApiOperation(value = "首页签到记录") | |
627 | + @PostMapping("/queryIndexSignRecord") | |
628 | + @ResponseBody | |
629 | + public BizResultVO<List<IndexSignRecordDTO>> queryIndexSignRecord( | |
630 | + @RequestBody IndexSignRecordQueryRequest request) { | |
631 | + BizResult<List<IndexSignRecordDTO>> dtos = signRecordService.queryIndexSignRecord(request); | |
632 | + return new BizResultVO<>(dtos); | |
633 | + } | |
634 | + | |
610 | 635 | } | ... | ... |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java
... | ... | @@ -2,25 +2,16 @@ package com.zteits.irain.portal.web.parkinglotcloudplatform.devicemanagement; |
2 | 2 | |
3 | 3 | import java.io.IOException; |
4 | 4 | import java.util.ArrayList; |
5 | +import java.util.Date; | |
5 | 6 | import java.util.List; |
6 | 7 | |
7 | 8 | import javax.servlet.http.HttpServletRequest; |
8 | 9 | import javax.servlet.http.HttpServletResponse; |
9 | 10 | |
10 | -import org.apache.poi.xssf.usermodel.XSSFSheet; | |
11 | -import org.slf4j.Logger; | |
12 | -import org.slf4j.LoggerFactory; | |
13 | -import org.springframework.beans.factory.annotation.Autowired; | |
14 | -import org.springframework.beans.factory.annotation.Value; | |
15 | -import org.springframework.web.bind.annotation.GetMapping; | |
16 | -import org.springframework.web.bind.annotation.PostMapping; | |
17 | -import org.springframework.web.bind.annotation.RequestBody; | |
18 | -import org.springframework.web.bind.annotation.RequestMapping; | |
19 | -import org.springframework.web.bind.annotation.RequestParam; | |
20 | -import org.springframework.web.bind.annotation.RestController; | |
21 | -import org.springframework.web.multipart.MultipartFile; | |
11 | +import com.alibaba.fastjson.JSONObject; | |
22 | 12 | |
23 | 13 | import com.clouds.common.utils.DateUtil; |
14 | +import com.clouds.common.utils.ResultUtils; | |
24 | 15 | import com.clouds.common.utils.excle.ExcelReadUtil; |
25 | 16 | import com.clouds.common.utils.excle.ExcelUtil; |
26 | 17 | import com.clouds.common.utils.excle.ExcleFillDateManager; |
... | ... | @@ -43,56 +34,132 @@ import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; |
43 | 34 | import com.zteits.clouds.api.service.park.TpPPdaService; |
44 | 35 | import com.zteits.clouds.api.service.park.TpPTgsPassedcarService; |
45 | 36 | import com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic.InOutParkStatisticController; |
46 | - | |
47 | 37 | import io.swagger.annotations.ApiOperation; |
38 | +import org.apache.poi.xssf.usermodel.XSSFSheet; | |
39 | +import org.slf4j.Logger; | |
40 | +import org.slf4j.LoggerFactory; | |
41 | +import org.springframework.beans.factory.annotation.Autowired; | |
42 | +import org.springframework.beans.factory.annotation.Value; | |
43 | +import org.springframework.format.annotation.DateTimeFormat; | |
44 | +import org.springframework.web.bind.annotation.GetMapping; | |
45 | +import org.springframework.web.bind.annotation.PostMapping; | |
46 | +import org.springframework.web.bind.annotation.RequestBody; | |
47 | +import org.springframework.web.bind.annotation.RequestMapping; | |
48 | +import org.springframework.web.bind.annotation.RequestParam; | |
49 | +import org.springframework.web.bind.annotation.RestController; | |
50 | +import org.springframework.web.multipart.MultipartFile; | |
48 | 51 | |
49 | 52 | /** |
50 | 53 | * PDA管理控制器 |
51 | - * | |
54 | + * | |
52 | 55 | * Copyright: Copyright (c) 2017 ZTE-ITS |
53 | - * | |
56 | + * | |
54 | 57 | * @ClassName: PdaController.java |
55 | - * @Description: | |
58 | + * @Description: | |
56 | 59 | * @version: v1.0.0 |
57 | 60 | * @author: wangbiao |
58 | - * @date: 2017年8月31日 下午3:05:03 | |
61 | + * @date: 2017年8月31日 下午3:05:03 | |
59 | 62 | * Modification History: |
60 | 63 | * Date Author Version Description |
61 | - *---------------------------------------------------------* | |
64 | + * ---------------------------------------------------------* | |
62 | 65 | * 2017年8月31日 wangbiao v1.0.0 创建 |
63 | 66 | */ |
64 | 67 | @RestController |
65 | 68 | @RequestMapping("/padinfo") |
66 | 69 | public class PdaController extends BizController { |
67 | - | |
68 | - private static final Logger logger = LoggerFactory.getLogger(InOutParkStatisticController.class); | |
69 | - | |
70 | - @Autowired | |
71 | - private TpPPdaService tpPPdaService; | |
72 | - @Autowired | |
73 | - private TpPTgsPassedcarService tpPTgsPassedcarService; | |
74 | - | |
75 | - @Value("${project.syscode}") | |
70 | + | |
71 | + private static final Logger logger = LoggerFactory.getLogger(InOutParkStatisticController.class); | |
72 | + | |
73 | + @Autowired | |
74 | + private TpPPdaService tpPPdaService; | |
75 | + @Autowired | |
76 | + private TpPTgsPassedcarService tpPTgsPassedcarService; | |
77 | + | |
78 | + @Value("${project.syscode}") | |
76 | 79 | private String sysCode; |
77 | 80 | |
78 | 81 | |
79 | 82 | |
80 | - @ApiOperation("过车查询") | |
81 | - @PostMapping("/queryPassedca4pabe") | |
82 | - public BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>> queryPassedca4pabe(@RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, | |
83 | - HttpServletResponse response){ | |
84 | - BizResult<PageBean<TpPTgsPassedcarDTO>> bizResult = new BizResult<PageBean<TpPTgsPassedcarDTO>>(); | |
85 | - try { | |
86 | - tpPTgsPassedcarRequest.setSysCode(sysCode); | |
87 | - bizResult = tpPTgsPassedcarService.queryPassedcar4Page(tpPTgsPassedcarRequest); | |
88 | - if(bizResult.isSuccess()){ | |
89 | - return returnJqGridData(bizResult, TpPTgsPassedcarDTO.class); | |
90 | - } | |
91 | - } catch (Exception e) { | |
92 | - logger.debug("分页查询过车信息异常:{}",bizResult.getErrMsg()); | |
93 | - } | |
94 | - return new BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>>(); | |
95 | - } | |
83 | + @ApiOperation("过车查询") | |
84 | + @PostMapping("/queryPassedca4pabe") | |
85 | + public BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>> queryPassedca4pabe( | |
86 | + @RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, | |
87 | + HttpServletResponse response) { | |
88 | + BizResult<PageBean<TpPTgsPassedcarDTO>> bizResult = new BizResult<PageBean<TpPTgsPassedcarDTO>>(); | |
89 | + try { | |
90 | + tpPTgsPassedcarRequest.setSysCode(sysCode); | |
91 | + bizResult = tpPTgsPassedcarService.queryPassedcar4Page(tpPTgsPassedcarRequest); | |
92 | + if (bizResult.isSuccess()) { | |
93 | + return returnJqGridData(bizResult, TpPTgsPassedcarDTO.class); | |
94 | + } | |
95 | + } catch (Exception e) { | |
96 | + logger.debug("分页查询过车信息异常:{}", bizResult.getErrMsg()); | |
97 | + } | |
98 | + return new BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>>(); | |
99 | + } | |
100 | + | |
101 | + @ApiOperation("过车信息下载") | |
102 | + @GetMapping("/exportPassCarInfoExcel") | |
103 | + public void exportPassCarInfoExcel(@RequestParam String clicensetype, @RequestParam String ccarnumber, | |
104 | + @RequestParam String s_dcollectiondate, @DateTimeFormat | |
105 | + @RequestParam String e_dcollectiondate, @RequestParam String cdevicecodes, HttpServletRequest request, | |
106 | + HttpServletResponse response) { | |
107 | + TpPTgsPassedcarRequest req = new TpPTgsPassedcarRequest(); | |
108 | + req.setCcarnumber(ccarnumber); | |
109 | + if(null !=cdevicecodes){ | |
110 | + List<String> data = JSONObject.parseArray(cdevicecodes,String.class); | |
111 | + req.setCdevicecodes(data); | |
112 | + } | |
113 | + req.setClicensetype(clicensetype); | |
114 | + if(null != s_dcollectiondate){ | |
115 | + req.setS_dcollectiondate(new Date(Long.parseLong(s_dcollectiondate))); | |
116 | + } | |
117 | + | |
118 | + if(null != e_dcollectiondate){ | |
119 | + req.setE_dcollectiondate(new Date(Long.parseLong(e_dcollectiondate))); | |
120 | + } | |
121 | + | |
122 | + //设置导出信息 | |
123 | + req.getBaseRequest().setPageNum(1); | |
124 | + req.getBaseRequest().setPageSize(0); | |
125 | + req.setSysCode(sysCode); | |
126 | + BizResult<PageBean<TpPTgsPassedcarDTO>> bizResult = tpPTgsPassedcarService.queryPassedcar4Page(req); | |
127 | + if (ResultUtils.isError(bizResult)) { | |
128 | + return; | |
129 | + } | |
130 | + List<TpPTgsPassedcarDTO> listData = bizResult.getData().getDataList(); | |
131 | + | |
132 | + String[] title = new String[] {"车牌号", "停车点", "车辆类型", "采集时间", "车道", "车速", "行驶方向"}; | |
133 | + String sheetName = "过车信息"; | |
134 | + String fileName = sheetName + com.xiaoleilu.hutool.date.DateUtil.format(new Date(), | |
135 | + com.xiaoleilu.hutool.date.DateUtil.NORM_DATETIME_PATTERN); | |
136 | + // 1.创建excel信息 | |
137 | + XSSFSheet workSheet = ExcelUtil.createExcel(sheetName); | |
138 | + // 2.设置excel表头和表体 | |
139 | + Layouter.buildReport(workSheet, title, 0, 0); | |
140 | + // 3.填充数据 | |
141 | + List<Object[]> contentList = new ArrayList<Object[]>(); | |
142 | + int number = 1; | |
143 | + for (TpPTgsPassedcarDTO b : listData) { | |
144 | + Object[] obj = new Object[title.length]; | |
145 | + int index = 0; | |
146 | + obj[index++] = b.getCcarnumber(); | |
147 | + obj[index++] = b.getCdevicecode(); | |
148 | + obj[index++] = b.getClicensetype(); | |
149 | + obj[index++] = b.getDcollectiondate() == null ? "" : com.xiaoleilu.hutool.date.DateUtil.format( | |
150 | + b.getDcollectiondate(), com.xiaoleilu.hutool.date.DateUtil.NORM_DATETIME_PATTERN); | |
151 | + obj[index++] = b.getClanenumber(); | |
152 | + obj[index++] = b.getNvehiclespeed(); | |
153 | + obj[index++] = b.getNderictrion(); | |
154 | + contentList.add(obj); | |
155 | + } | |
156 | + ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | |
157 | + fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); | |
158 | + // 4.excel输出配置 | |
159 | + ExcelUtil.write(response, workSheet, fileName); | |
160 | + | |
161 | + } | |
162 | + | |
96 | 163 | |
97 | 164 | @ApiOperation("PDA分页查询信息") |
98 | 165 | @PostMapping("/queryPdaInfo4pabe") |
... | ... | @@ -234,25 +301,28 @@ public class PdaController extends BizController { |
234 | 301 | } |
235 | 302 | |
236 | 303 | |
237 | - @PostMapping("/importPda") | |
238 | - public BizResultVO<Integer> importPda(@RequestParam(value="excelFile") MultipartFile file,HttpServletRequest request) throws IOException{ | |
239 | - if(file==null){ | |
240 | - throw new BizException(ErrorType.PARAMM_NULL, "导入文件不能为空"); | |
241 | - } | |
304 | + @PostMapping("/importPda") | |
305 | + public BizResultVO<Integer> importPda(@RequestParam(value = "excelFile") MultipartFile file, | |
306 | + HttpServletRequest request) throws IOException { | |
307 | + if (file == null) { | |
308 | + throw new BizException(ErrorType.PARAMM_NULL, "导入文件不能为空"); | |
309 | + } | |
242 | 310 | //读取Excel数据到List中 |
243 | - List<ArrayList<String>> list = ExcelReadUtil.readExcel(file); | |
311 | + List<ArrayList<String>> list = ExcelReadUtil.readExcel(file); | |
244 | 312 | //list中存的就是excel中的数据,可以根据excel中每一列的值转换成你所需要的值(从0开始),如: |
245 | - TpPPdaRequest tpPPdaRequest = null; | |
246 | - List<TpPPdaRequest> padList = Lists.newArrayList(); | |
247 | - for(ArrayList<String> arr:list){ | |
248 | - tpPPdaRequest= new TpPPdaRequest(); | |
249 | - tpPPdaRequest.setPdaNo(arr.get(0)); | |
250 | - padList.add(tpPPdaRequest); | |
313 | + TpPPdaRequest tpPPdaRequest = null; | |
314 | + List<TpPPdaRequest> padList = Lists.newArrayList(); | |
315 | + for (ArrayList<String> arr : list) { | |
316 | + tpPPdaRequest = new TpPPdaRequest(); | |
317 | + tpPPdaRequest.setPdaNo(arr.get(0)); | |
318 | + padList.add(tpPPdaRequest); | |
251 | 319 | } |
252 | - TpPPdaSRequest TpPPdaSRequest = new TpPPdaSRequest(); | |
320 | + TpPPdaSRequest TpPPdaSRequest = new TpPPdaSRequest(); | |
253 | 321 | TpPPdaSRequest.setPadList(padList); |
254 | 322 | BizResult<Integer> rsInteger = tpPPdaService.insertBatchPda(TpPPdaSRequest); |
255 | 323 | return new BizResultVO<Integer>(rsInteger); |
256 | - } | |
257 | - | |
324 | + } | |
325 | + | |
326 | + | |
327 | + | |
258 | 328 | } | ... | ... |
src/main/resources/dubbo/dubbo-park-consumer.xml
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 | <dubbo:reference interface="com.zteits.clouds.api.service.park.RefreshParkCacheService" |
82 | 82 | version="${spring.dubbo.provider.version}" |
83 | 83 | id="refreshSysCacheService" timeout="30000"/> |
84 | - <!-- 刷新Sys缓存 --> | |
84 | + <!-- 刷新Sys缓存 --> | |
85 | 85 | <dubbo:reference interface="com.zteits.clouds.api.service.sys.RefreshSysCacheService" |
86 | 86 | version="${spring.dubbo.provider.version}" |
87 | 87 | id="refreshParkCacheService" timeout="30000"/> |
... | ... | @@ -89,17 +89,18 @@ |
89 | 89 | <!-- 通过企业客户Ids查询停车场编码 --> |
90 | 90 | <dubbo:reference id="tdCustCompanyService" interface="com.zteits.clouds.api.service.pay.TdCustCompanyService" |
91 | 91 | version="${spring.dubbo.provider.version}" timeout="30000"/> |
92 | - | |
93 | - <!--#########################政府云平台#################################################--> | |
92 | + | |
93 | + <!--#########################政府云平台#################################################--> | |
94 | 94 | |
95 | 95 | <!-- 诱导屏dubbo接口--> |
96 | 96 | <dubbo:reference id="guideScreenService" interface="com.zteits.clouds.api.service.park.GuideScreenService" |
97 | 97 | version="${spring.dubbo.provider.version}" timeout="30000"/> |
98 | 98 | |
99 | - | |
99 | + | |
100 | 100 | <!-- 政府云平台->停车线上线下排行service --> |
101 | - <dubbo:reference id="parkTransactionService" interface="com.zteits.clouds.api.service.govclouds.ParkTransactionService" | |
102 | - version="${spring.dubbo.provider.version}" timeout="30000"/> | |
101 | + <dubbo:reference id="parkTransactionService" | |
102 | + interface="com.zteits.clouds.api.service.govclouds.ParkTransactionService" | |
103 | + version="${spring.dubbo.provider.version}" timeout="30000"/> | |
103 | 104 | <dubbo:reference id="guideParkRelService" interface="com.zteits.clouds.api.service.park.GuideParkRelService" |
104 | 105 | version="${spring.dubbo.provider.version}" timeout="30000"/> |
105 | 106 | <!-- 停车场LBS-查询停车场经纬度 --> |
... | ... | @@ -109,64 +110,79 @@ |
109 | 110 | <dubbo:reference id="tdCFileService" interface="com.zteits.clouds.api.service.pay.TdCFileService" |
110 | 111 | version="${spring.dubbo.provider.version}" |
111 | 112 | timeout="30000"/> |
112 | - <!-- 停车轨迹 --> | |
113 | - <dubbo:reference id="parkPreferenceService" interface="com.zteits.clouds.api.service.govclouds.ParkPreferenceService" | |
113 | + <!-- 停车轨迹 --> | |
114 | + <dubbo:reference id="parkPreferenceService" | |
115 | + interface="com.zteits.clouds.api.service.govclouds.ParkPreferenceService" | |
116 | + version="${spring.dubbo.provider.version}" | |
117 | + timeout="30000"/> | |
118 | + <!-- 热点区域 --> | |
119 | + <dubbo:reference id="hotSpotAreaService" interface="com.zteits.clouds.api.service.govclouds.HotSpotAreaService" | |
120 | + version="${spring.dubbo.provider.version}" | |
121 | + timeout="30000"/> | |
122 | + | |
123 | + <!-- sys区域查询 --> | |
124 | + <dubbo:reference id="tbAreaService" interface="com.zteits.clouds.api.service.sys.TbAreaService" | |
125 | + version="${spring.dubbo.provider.version}" | |
126 | + timeout="30000"/> | |
127 | + <!-- 企业云平台->数据统计->进出场上报 --> | |
128 | + <dubbo:reference id="inOutParkStatisticService" | |
129 | + interface="com.zteits.clouds.api.service.clouds.InOutParkStatisticService" | |
130 | + version="${spring.dubbo.provider.version}" | |
131 | + timeout="30000"/> | |
132 | + | |
133 | + | |
134 | + <!-- 企业云平台->数据统计->年卡月卡统计 --> | |
135 | + <dubbo:reference id="yearMonthCardStatisticService" | |
136 | + interface="com.zteits.clouds.api.service.clouds.YearMonthCardStatisticService" | |
137 | + version="${spring.dubbo.provider.version}" | |
138 | + timeout="30000"/> | |
139 | + | |
140 | + <!-- 结算管理 账单管理 月账单管理统计汇总查询 --> | |
141 | + <dubbo:reference id="monthBillManagementService" | |
142 | + interface="com.zteits.clouds.api.service.clouds.MonthBillManagementService" | |
143 | + version="${spring.dubbo.provider.version}" | |
144 | + timeout="30000"/> | |
145 | + | |
146 | + <!-- 泊位状态同步 --> | |
147 | + <dubbo:reference id="eqpBerthsService" interface="com.zteits.clouds.api.service.park.EqpBerthsService" | |
148 | + version="${spring.dubbo.provider.version}" | |
149 | + timeout="30000"/> | |
150 | + | |
151 | + <!--企业云平台-停车时长统计 --> | |
152 | + <dubbo:reference id="cloudsParDurationService" | |
153 | + interface="com.zteits.clouds.api.service.clouds.CloudsParDurationService" | |
154 | + version="${spring.dubbo.provider.version}" | |
155 | + timeout="30000"/> | |
156 | + | |
157 | + <!--企业云平台->基础信息->泊位区间管理 --> | |
158 | + <dubbo:reference id="tpPRegionAreaService" interface="com.zteits.clouds.api.service.park.TpPRegionAreaService" | |
159 | + version="${spring.dubbo.provider.version}" | |
160 | + timeout="30000"/> | |
161 | + | |
162 | + <!--企业云平台-基础信息-泊位管理 --> | |
163 | + <dubbo:reference id="berthManageService" interface="com.zteits.clouds.api.service.park.BerthManageService" | |
164 | + version="${spring.dubbo.provider.version}" | |
165 | + timeout="30000"/> | |
166 | + | |
167 | + <!--企业云平台-设备管理 -pda管理--> | |
168 | + <dubbo:reference id="tpPPdaService" interface="com.zteits.clouds.api.service.park.TpPPdaService" | |
169 | + version="${spring.dubbo.provider.version}" | |
170 | + timeout="30000"/> | |
171 | + | |
172 | + <dubbo:reference id="tpPTgsPassedcarService" interface="com.zteits.clouds.api.service.park.TpPTgsPassedcarService" | |
173 | + version="${spring.dubbo.provider.version}" | |
174 | + timeout="30000"/> | |
175 | + <!-- 地磁管理 --> | |
176 | + <dubbo:reference id="geomagneticManagementService" | |
177 | + interface="com.zteits.clouds.api.service.park.GeomagneticManagementService" | |
178 | + version="${spring.dubbo.provider.version}" timeout="30000"/> | |
179 | + | |
180 | + <!-- sys 字典获取 --> | |
181 | + <dubbo:reference id="sysCommonService" interface="com.zteits.clouds.api.service.sys.SysCommonService" | |
182 | + version="${spring.dubbo.provider.version}" | |
183 | + timeout="30000"/> | |
184 | + <!--签到记录服务--> | |
185 | + <dubbo:reference id="signRecordService" interface="com.zteits.clouds.api.service.park.SignRecordService" | |
114 | 186 | version="${spring.dubbo.provider.version}" |
115 | 187 | timeout="30000"/> |
116 | - <!-- 热点区域 --> | |
117 | - <dubbo:reference id="hotSpotAreaService" interface="com.zteits.clouds.api.service.govclouds.HotSpotAreaService" | |
118 | - version="${spring.dubbo.provider.version}" | |
119 | - timeout="30000"/> | |
120 | - | |
121 | - <!-- sys区域查询 --> | |
122 | - <dubbo:reference id="tbAreaService" interface="com.zteits.clouds.api.service.sys.TbAreaService" | |
123 | - version="${spring.dubbo.provider.version}" | |
124 | - timeout="30000"/> | |
125 | - <!-- 企业云平台->数据统计->进出场上报 --> | |
126 | - <dubbo:reference id="inOutParkStatisticService" interface="com.zteits.clouds.api.service.clouds.InOutParkStatisticService" | |
127 | - version="${spring.dubbo.provider.version}" | |
128 | - timeout="30000"/> | |
129 | - | |
130 | - | |
131 | - <!-- 企业云平台->数据统计->年卡月卡统计 --> | |
132 | - <dubbo:reference id="yearMonthCardStatisticService" interface="com.zteits.clouds.api.service.clouds.YearMonthCardStatisticService" | |
133 | - version="${spring.dubbo.provider.version}" | |
134 | - timeout="30000"/> | |
135 | - | |
136 | - <!-- 结算管理 账单管理 月账单管理统计汇总查询 --> | |
137 | - <dubbo:reference id="monthBillManagementService" interface="com.zteits.clouds.api.service.clouds.MonthBillManagementService" | |
138 | - version="${spring.dubbo.provider.version}" | |
139 | - timeout="30000"/> | |
140 | - | |
141 | - <!-- 泊位状态同步 --> | |
142 | - <dubbo:reference id="eqpBerthsService" interface="com.zteits.clouds.api.service.park.EqpBerthsService" | |
143 | - version="${spring.dubbo.provider.version}" | |
144 | - timeout="30000"/> | |
145 | - | |
146 | - <!--企业云平台-停车时长统计 --> | |
147 | - <dubbo:reference id="cloudsParDurationService" interface="com.zteits.clouds.api.service.clouds.CloudsParDurationService" | |
148 | - version="${spring.dubbo.provider.version}" | |
149 | - timeout="30000"/> | |
150 | - | |
151 | - <!--企业云平台->基础信息->泊位区间管理 --> | |
152 | - <dubbo:reference id="tpPRegionAreaService" interface="com.zteits.clouds.api.service.park.TpPRegionAreaService" | |
153 | - version="${spring.dubbo.provider.version}" | |
154 | - timeout="30000"/> | |
155 | - | |
156 | - <!--企业云平台-基础信息-泊位管理 --> | |
157 | - <dubbo:reference id="berthManageService" interface="com.zteits.clouds.api.service.park.BerthManageService" | |
158 | - version="${spring.dubbo.provider.version}" | |
159 | - timeout="30000"/> | |
160 | - | |
161 | - <!--企业云平台-设备管理 -pda管理--> | |
162 | - <dubbo:reference id="tpPPdaService" interface="com.zteits.clouds.api.service.park.TpPPdaService" | |
163 | - version="${spring.dubbo.provider.version}" | |
164 | - timeout="30000"/> | |
165 | - | |
166 | - <dubbo:reference id="tpPTgsPassedcarService" interface="com.zteits.clouds.api.service.park.TpPTgsPassedcarService" | |
167 | - version="${spring.dubbo.provider.version}" | |
168 | - timeout="30000"/> | |
169 | - <!-- 地磁管理 --> | |
170 | - <dubbo:reference id="geomagneticManagementService" interface="com.zteits.clouds.api.service.park.GeomagneticManagementService" | |
171 | - version="${spring.dubbo.provider.version}" timeout="30000"/> | |
172 | 188 | </beans> |
173 | 189 | \ No newline at end of file | ... | ... |