Commit 7eb5213c4916c162e402441d720adf16982b1976
Merge branch 'branch_0808' of http://192.168.1.195:9998/ZTEITS-Developers/zteits…
…-bcp-portal.git into branch_0808
Showing
5 changed files
with
242 additions
and
16 deletions
src/main/java/com/zteits/irain/portal/web/govclouds/TbAreaController.java
@@ -7,33 +7,38 @@ import java.util.Map; | @@ -7,33 +7,38 @@ import java.util.Map; | ||
7 | 7 | ||
8 | import org.slf4j.Logger; | 8 | import org.slf4j.Logger; |
9 | import org.slf4j.LoggerFactory; | 9 | import org.slf4j.LoggerFactory; |
10 | +import org.springframework.beans.BeanUtils; | ||
10 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.beans.factory.annotation.Value; | 12 | import org.springframework.beans.factory.annotation.Value; |
12 | import org.springframework.util.CollectionUtils; | 13 | import org.springframework.util.CollectionUtils; |
13 | -import org.springframework.web.bind.annotation.GetMapping; | ||
14 | import org.springframework.web.bind.annotation.PostMapping; | 14 | import org.springframework.web.bind.annotation.PostMapping; |
15 | import org.springframework.web.bind.annotation.RequestBody; | 15 | import org.springframework.web.bind.annotation.RequestBody; |
16 | import org.springframework.web.bind.annotation.RequestMapping; | 16 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | -import org.springframework.web.bind.annotation.RequestParam; | ||
18 | import org.springframework.web.bind.annotation.RestController; | 17 | import org.springframework.web.bind.annotation.RestController; |
19 | 18 | ||
20 | import com.alibaba.fastjson.JSONObject; | 19 | import com.alibaba.fastjson.JSONObject; |
21 | import com.clouds.common.cache.sys.SysCodeValueCacheUtil; | 20 | import com.clouds.common.cache.sys.SysCodeValueCacheUtil; |
22 | import com.clouds.common.constants.CodeValKindEnum; | 21 | import com.clouds.common.constants.CodeValKindEnum; |
22 | +import com.clouds.common.entity.UserInfo; | ||
23 | +import com.clouds.common.web.SessionCommUtil; | ||
23 | import com.clouds.common.web.vo.BizResultVO; | 24 | import com.clouds.common.web.vo.BizResultVO; |
24 | -import com.google.common.collect.Lists; | ||
25 | import com.zteits.clouds.api.apibase.bean.BizResult; | 25 | import com.zteits.clouds.api.apibase.bean.BizResult; |
26 | import com.zteits.clouds.api.apibase.bean.PageBean; | 26 | import com.zteits.clouds.api.apibase.bean.PageBean; |
27 | +import com.zteits.clouds.api.apibase.constants.AreaTypeEnum; | ||
28 | +import com.zteits.clouds.api.apibase.constants.BasicEnum; | ||
27 | import com.zteits.clouds.api.apibase.constants.ErrorType; | 29 | import com.zteits.clouds.api.apibase.constants.ErrorType; |
28 | import com.zteits.clouds.api.apibase.exception.BizException; | 30 | import com.zteits.clouds.api.apibase.exception.BizException; |
31 | +import com.zteits.clouds.api.dto.park.dto.TpPRegionAreaDTO; | ||
32 | +import com.zteits.clouds.api.dto.park.param.ParkInfoByAreaBlockIdsRequest; | ||
33 | +import com.zteits.clouds.api.dto.park.param.QueryTpPRegionAreaForPageRequest; | ||
29 | import com.zteits.clouds.api.dto.park.param.StatisticParkLotCountByCountryRequest; | 34 | import com.zteits.clouds.api.dto.park.param.StatisticParkLotCountByCountryRequest; |
30 | -import com.zteits.clouds.api.dto.park.param.UpdateFreeBerthRequest; | ||
31 | -import com.zteits.clouds.api.dto.sys.SysRoleDTO; | ||
32 | -import com.zteits.clouds.api.dto.sys.TbAreaDTO; | ||
33 | -import com.zteits.clouds.api.dto.sys.param.TbAreaQueryRequest; | 35 | +import com.zteits.clouds.api.dto.sys.AreaTreeDTO; |
36 | +import com.zteits.clouds.api.dto.sys.param.AreaBlockByOrgIdQueryRequest; | ||
37 | +import com.zteits.clouds.api.service.park.ParkingLotService; | ||
38 | +import com.zteits.clouds.api.service.park.TpPRegionAreaService; | ||
34 | import com.zteits.clouds.api.service.sys.TbAreaService; | 39 | import com.zteits.clouds.api.service.sys.TbAreaService; |
35 | -import com.zteits.irain.portal.web.irain.UpdateFreeBerthController; | ||
36 | 40 | ||
41 | +import io.jsonwebtoken.lang.Collections; | ||
37 | import io.swagger.annotations.Api; | 42 | import io.swagger.annotations.Api; |
38 | import io.swagger.annotations.ApiOperation; | 43 | import io.swagger.annotations.ApiOperation; |
39 | 44 | ||
@@ -60,6 +65,13 @@ public class TbAreaController { | @@ -60,6 +65,13 @@ public class TbAreaController { | ||
60 | private String sysCode; | 65 | private String sysCode; |
61 | @Autowired | 66 | @Autowired |
62 | private TbAreaService tbAreaService; | 67 | private TbAreaService tbAreaService; |
68 | + @Autowired | ||
69 | + private SessionCommUtil sessionCommUtil; | ||
70 | + @Autowired | ||
71 | + private ParkingLotService parkingLotService; | ||
72 | + | ||
73 | + @Autowired | ||
74 | + private TpPRegionAreaService tpPRegionAreaService; | ||
63 | 75 | ||
64 | @ApiOperation("查询区域下一级") | 76 | @ApiOperation("查询区域下一级") |
65 | @PostMapping("queryNextLowerLeverById") | 77 | @PostMapping("queryNextLowerLeverById") |
@@ -80,4 +92,102 @@ public class TbAreaController { | @@ -80,4 +92,102 @@ public class TbAreaController { | ||
80 | return new BizResultVO<List<Map<String, String>>>().setData(list); | 92 | return new BizResultVO<List<Map<String, String>>>().setData(list); |
81 | } | 93 | } |
82 | 94 | ||
95 | + /** | ||
96 | + * 获取泊位区间tree | ||
97 | + * @param request | ||
98 | + * @return | ||
99 | + * @throws Exception | ||
100 | + */ | ||
101 | + @ApiOperation("获取泊位区间tree") | ||
102 | + @PostMapping("/getBerthAreatree") | ||
103 | + public BizResultVO<List<AreaTreeDTO>> getBerthAreatree(@RequestBody AreaBlockByOrgIdQueryRequest | ||
104 | + request) throws Exception { | ||
105 | + logger.info("---begin加载泊位区间tree.."); | ||
106 | + | ||
107 | + UserInfo userInfo = sessionCommUtil.getUserInfo(); | ||
108 | + request.setOrgId(userInfo.getOrgId()); | ||
109 | + BizResult<List<AreaTreeDTO>> result = tbAreaService.queryAreaBlockByOrgId(request); | ||
110 | + //2.获取块id列表 | ||
111 | + List<Long> areaBlockIdList = this.getAreaBlockIds(result); | ||
112 | + //3.通过块Ids查询块下面得停车场 | ||
113 | + List<AreaTreeDTO> parklist = this.queryParkInfoByAreaBlockIds(areaBlockIdList); | ||
114 | + if (result != null && !CollectionUtils.isEmpty(result.getData())) { | ||
115 | + if (!CollectionUtils.isEmpty(parklist)) { | ||
116 | + result.getData().addAll(parklist); | ||
117 | + | ||
118 | + //4.通过停车场编号查询停车场下的泊位区间 | ||
119 | + List<AreaTreeDTO> berthArealist = new ArrayList<>(); | ||
120 | + List<String> plNos = new ArrayList<>(); | ||
121 | + for (AreaTreeDTO a : parklist) { | ||
122 | + plNos.add(a.getPlNo()); | ||
123 | + } | ||
124 | + QueryTpPRegionAreaForPageRequest areaRequest = new QueryTpPRegionAreaForPageRequest(); | ||
125 | + BeanUtils.copyProperties(request, areaRequest); | ||
126 | + areaRequest.setPlNos(plNos); | ||
127 | + BizResult<PageBean<TpPRegionAreaDTO>> arearesult = tpPRegionAreaService.queryTpPRegionAreaForPage(areaRequest); | ||
128 | + if (!(arearesult.isSuccess())) { | ||
129 | + throw new BizException(arearesult.getErrCode(),arearesult.getErrMsg()); | ||
130 | + } | ||
131 | + if(!(CollectionUtils.isEmpty(arearesult.getData().getDataList()))){ | ||
132 | + for (TpPRegionAreaDTO t : arearesult.getData().getDataList()) { | ||
133 | + AreaTreeDTO area = new AreaTreeDTO(); | ||
134 | + area.setAreaName(t.getParkAreaName()); | ||
135 | + area.setAreaType(AreaTypeEnum.Area.code()); | ||
136 | + area.setPlNo(t.getPlNo()); | ||
137 | + area.setIdCode(t.getParkAreaCode()); | ||
138 | + area.setParentCode(t.getPlNo()); | ||
139 | + area.setAreaRangeCode(t.getParkAreaCode()); | ||
140 | + berthArealist.add(area); | ||
141 | + } | ||
142 | + if(!(CollectionUtils.isEmpty(berthArealist))){ | ||
143 | + result.getData().addAll(berthArealist); | ||
144 | + | ||
145 | + } | ||
146 | + } | ||
147 | + } | ||
148 | + } | ||
149 | + | ||
150 | + | ||
151 | + logger.info("---end加载泊位区间tree.."); | ||
152 | + return new BizResultVO<List<AreaTreeDTO>>(result); | ||
153 | + } | ||
154 | + /** | ||
155 | + * 通过块Ids查询块下面得停车场.<br/> | ||
156 | + * | ||
157 | + * @param areaBlockIdList | ||
158 | + * @return | ||
159 | + */ | ||
160 | + private List<AreaTreeDTO> queryParkInfoByAreaBlockIds(List<Long> areaBlockIdList) { | ||
161 | + List<AreaTreeDTO> list = new ArrayList<AreaTreeDTO>(); | ||
162 | + ParkInfoByAreaBlockIdsRequest blockIdRequest = new ParkInfoByAreaBlockIdsRequest(); | ||
163 | + if (!CollectionUtils.isEmpty(areaBlockIdList)) { | ||
164 | + blockIdRequest.setAreaBlockIds(areaBlockIdList); | ||
165 | + blockIdRequest.setSysCode(BasicEnum.SYS_CODE.getValue()); | ||
166 | + BizResult<List<AreaTreeDTO>> result = parkingLotService.queryParkInfoByAreaBlockIds(blockIdRequest); | ||
167 | + if (result != null && !Collections.isEmpty(result.getData())) { | ||
168 | + for (AreaTreeDTO a : result.getData()) { | ||
169 | + a.setAreaType(AreaTypeEnum.PARK.code()); | ||
170 | + } | ||
171 | + list.addAll(result.getData()); | ||
172 | + } | ||
173 | + } | ||
174 | + return list; | ||
175 | + } | ||
176 | + | ||
177 | + /** | ||
178 | + * 获取块ids列表.<br/> | ||
179 | + * | ||
180 | + * @return | ||
181 | + */ | ||
182 | + private List<Long> getAreaBlockIds(BizResult<List<AreaTreeDTO>> result) { | ||
183 | + List<Long> areaBlockIdList = new ArrayList<Long>(); | ||
184 | + if (result != null && !CollectionUtils.isEmpty(result.getData())) { | ||
185 | + for (AreaTreeDTO e : result.getData()) { | ||
186 | + if (e != null && AreaTypeEnum.BLOCK.code().equals(e.getAreaType())) { | ||
187 | + areaBlockIdList.add(e.getId()); | ||
188 | + } | ||
189 | + } | ||
190 | + } | ||
191 | + return areaBlockIdList; | ||
192 | + } | ||
83 | } | 193 | } |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/areamanage/RegionAreaController.java
1 | package com.zteits.irain.portal.web.parkinglotcloudplatform.areamanage; | 1 | package com.zteits.irain.portal.web.parkinglotcloudplatform.areamanage; |
2 | 2 | ||
3 | +import java.text.SimpleDateFormat; | ||
4 | +import java.util.ArrayList; | ||
5 | +import java.util.Date; | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +import javax.servlet.http.HttpServletRequest; | ||
9 | +import javax.servlet.http.HttpServletResponse; | ||
3 | import javax.validation.Valid; | 10 | import javax.validation.Valid; |
4 | 11 | ||
12 | +import org.apache.poi.xssf.usermodel.XSSFSheet; | ||
5 | import org.slf4j.Logger; | 13 | import org.slf4j.Logger; |
6 | import org.slf4j.LoggerFactory; | 14 | import org.slf4j.LoggerFactory; |
7 | import org.springframework.beans.factory.annotation.Autowired; | 15 | import org.springframework.beans.factory.annotation.Autowired; |
8 | import org.springframework.beans.factory.annotation.Value; | 16 | import org.springframework.beans.factory.annotation.Value; |
9 | import org.springframework.stereotype.Controller; | 17 | import org.springframework.stereotype.Controller; |
10 | import org.springframework.util.StringUtils; | 18 | import org.springframework.util.StringUtils; |
19 | +import org.springframework.web.bind.annotation.GetMapping; | ||
11 | import org.springframework.web.bind.annotation.PostMapping; | 20 | import org.springframework.web.bind.annotation.PostMapping; |
12 | import org.springframework.web.bind.annotation.RequestBody; | 21 | import org.springframework.web.bind.annotation.RequestBody; |
13 | import org.springframework.web.bind.annotation.RequestMapping; | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
23 | +import org.springframework.web.bind.annotation.RequestParam; | ||
14 | import org.springframework.web.bind.annotation.ResponseBody; | 24 | import org.springframework.web.bind.annotation.ResponseBody; |
15 | 25 | ||
16 | import com.alibaba.dubbo.common.utils.CollectionUtils; | 26 | import com.alibaba.dubbo.common.utils.CollectionUtils; |
17 | import com.alibaba.fastjson.JSONObject; | 27 | import com.alibaba.fastjson.JSONObject; |
28 | +import com.clouds.common.utils.excle.ExcelUtil; | ||
29 | +import com.clouds.common.utils.excle.ExcleFillDateManager; | ||
30 | +import com.clouds.common.utils.excle.Layouter; | ||
18 | import com.clouds.common.web.BizController; | 31 | import com.clouds.common.web.BizController; |
19 | import com.clouds.common.web.vo.BizResultVO; | 32 | import com.clouds.common.web.vo.BizResultVO; |
20 | import com.clouds.common.web.vo.EasyUIDataGridVO; | 33 | import com.clouds.common.web.vo.EasyUIDataGridVO; |
34 | +import com.zteits.clouds.api.apibase.bean.BaseInfo; | ||
21 | import com.zteits.clouds.api.apibase.bean.BizResult; | 35 | import com.zteits.clouds.api.apibase.bean.BizResult; |
22 | import com.zteits.clouds.api.apibase.bean.PageBean; | 36 | import com.zteits.clouds.api.apibase.bean.PageBean; |
23 | import com.zteits.clouds.api.apibase.constants.ErrorType; | 37 | import com.zteits.clouds.api.apibase.constants.ErrorType; |
24 | import com.zteits.clouds.api.apibase.exception.BizException; | 38 | import com.zteits.clouds.api.apibase.exception.BizException; |
39 | +import com.zteits.clouds.api.dto.clouds.dto.YearMonthCardStatisticDTO; | ||
25 | import com.zteits.clouds.api.dto.park.dto.TpPRegionAreaDTO; | 40 | import com.zteits.clouds.api.dto.park.dto.TpPRegionAreaDTO; |
26 | import com.zteits.clouds.api.dto.park.param.DeleteTpPRegionAreaRequest; | 41 | import com.zteits.clouds.api.dto.park.param.DeleteTpPRegionAreaRequest; |
27 | import com.zteits.clouds.api.dto.park.param.QueryTpPRegionAreaForPageRequest; | 42 | import com.zteits.clouds.api.dto.park.param.QueryTpPRegionAreaForPageRequest; |
28 | import com.zteits.clouds.api.dto.park.param.SaveOrUpdateTpPRegionAreaRequest; | 43 | import com.zteits.clouds.api.dto.park.param.SaveOrUpdateTpPRegionAreaRequest; |
29 | -import com.zteits.clouds.api.dto.sys.SysOpDTO; | ||
30 | -import com.zteits.clouds.api.dto.sys.param.SysOpDeleteRequest; | ||
31 | -import com.zteits.clouds.api.dto.sys.param.SysOpForPageRequest; | ||
32 | -import com.zteits.clouds.api.dto.sys.param.SysOpSaveOrModfiyRequest; | 44 | +import com.zteits.clouds.api.dto.pay.param.YearMonthCardStatisticRequest; |
33 | import com.zteits.clouds.api.service.park.TpPRegionAreaService; | 45 | import com.zteits.clouds.api.service.park.TpPRegionAreaService; |
34 | -import com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic.RealTimeMonitorController; | ||
35 | 46 | ||
36 | import io.swagger.annotations.Api; | 47 | import io.swagger.annotations.Api; |
37 | import io.swagger.annotations.ApiOperation; | 48 | import io.swagger.annotations.ApiOperation; |
@@ -121,5 +132,57 @@ public class RegionAreaController extends BizController { | @@ -121,5 +132,57 @@ public class RegionAreaController extends BizController { | ||
121 | logger.info("调用分页查询泊位区间信息dubbo服务返回信息:response={}"+JSONObject.toJSONString(result)); | 132 | logger.info("调用分页查询泊位区间信息dubbo服务返回信息:response={}"+JSONObject.toJSONString(result)); |
122 | return returnJqGridData(result, TpPRegionAreaDTO.class); | 133 | return returnJqGridData(result, TpPRegionAreaDTO.class); |
123 | } | 134 | } |
135 | + | ||
136 | + | ||
137 | + | ||
138 | + @ApiOperation("导出泊位区间管理excel") | ||
139 | + @GetMapping("exportTpPRegionAreaExcel") | ||
140 | + public void exportYearMonthStatisticExcel( | ||
141 | + @RequestParam List<String> plNos, String parkAreaCode, | ||
142 | + HttpServletRequest requests, HttpServletResponse response) throws Exception { | ||
143 | + | ||
144 | + QueryTpPRegionAreaForPageRequest request= new QueryTpPRegionAreaForPageRequest(); | ||
145 | + request.setSysCode(sysCode); | ||
146 | + request.setPlNos(plNos); | ||
147 | + request.setBaseRequest(new BaseInfo(1, 0)); | ||
148 | + request.setParkAreaCode(parkAreaCode); | ||
149 | + | ||
150 | + BizResult<PageBean<TpPRegionAreaDTO>> result = tpPRegionAreaService.queryTpPRegionAreaForPage(request); | ||
151 | + | ||
152 | + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
153 | + SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); | ||
154 | + String[] title = new String[] {"泊位区间名称", "泊位区间编号", "停车场名称", "泊位数"}; | ||
155 | + String sheetName = "泊位区间管理"; | ||
156 | + String fileName = "泊位区间管理" + format2.format(new Date()); | ||
157 | + | ||
158 | +// String[] billTitle = new String[9]; | ||
159 | +// billTitle = new String[2]; | ||
160 | +// billTitle[0] = "年卡月卡统计"; | ||
161 | + | ||
162 | + | ||
163 | + // 1.创建excel信息 | ||
164 | + XSSFSheet workSheet = ExcelUtil.createExcel(sheetName); | ||
165 | + // 2.设置excel表头和表体 | ||
166 | + Layouter.buildReport(workSheet, title,0,0); | ||
167 | + // 3.填充数据 | ||
168 | + List<Object[]> contentList = new ArrayList<Object[]>(); | ||
169 | + List<TpPRegionAreaDTO> list = new ArrayList<>(); | ||
170 | + if (CollectionUtils.isNotEmpty(result.getData().getDataList())) { | ||
171 | + list = result.getData().getDataList(); | ||
172 | + } | ||
173 | + for (TpPRegionAreaDTO e : list) { | ||
174 | + Object[] obj = new Object[title.length]; | ||
175 | + int index = 0; | ||
176 | + obj[index++] = e.getParkAreaName() != null ? e.getParkAreaName() : ""; | ||
177 | + obj[index++] = e.getParkAreaCode() != null ? e.getParkAreaCode() : ""; | ||
178 | + obj[index++] = e.getPlName() != null ? e.getPlName() : ""; | ||
179 | + obj[index++] = e.getBerthNum(); | ||
180 | + contentList.add(obj); | ||
181 | + } | ||
182 | + ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | ||
183 | + fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); | ||
184 | + // 4.excel输出配置 | ||
185 | + ExcelUtil.write(response, workSheet, fileName); | ||
186 | + } | ||
124 | 187 | ||
125 | } | 188 | } |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/RealTimeMonitorController.java
@@ -30,8 +30,10 @@ import com.zteits.clouds.api.apibase.exception.BizException; | @@ -30,8 +30,10 @@ import com.zteits.clouds.api.apibase.exception.BizException; | ||
30 | import com.zteits.clouds.api.dto.clouds.param.RealTimeMonitoringRequest; | 30 | import com.zteits.clouds.api.dto.clouds.param.RealTimeMonitoringRequest; |
31 | import com.zteits.clouds.api.dto.park.dto.BerthsDTO; | 31 | import com.zteits.clouds.api.dto.park.dto.BerthsDTO; |
32 | import com.zteits.clouds.api.dto.park.dto.ParkOccupancyRateDTO; | 32 | import com.zteits.clouds.api.dto.park.dto.ParkOccupancyRateDTO; |
33 | +import com.zteits.clouds.api.dto.park.dto.ParkingLotDTO; | ||
33 | import com.zteits.clouds.api.dto.park.dto.TpPEqpLogDTO; | 34 | import com.zteits.clouds.api.dto.park.dto.TpPEqpLogDTO; |
34 | import com.zteits.clouds.api.dto.park.param.QueryBerthForPageRequest; | 35 | import com.zteits.clouds.api.dto.park.param.QueryBerthForPageRequest; |
36 | +import com.zteits.clouds.api.dto.park.param.QueryParkingLotByParkRequest; | ||
35 | import com.zteits.clouds.api.dto.sys.SysOpDTO; | 37 | import com.zteits.clouds.api.dto.sys.SysOpDTO; |
36 | import com.zteits.clouds.api.dto.sys.SysOrgDTO; | 38 | import com.zteits.clouds.api.dto.sys.SysOrgDTO; |
37 | import com.zteits.clouds.api.dto.sys.SysRoleDTO; | 39 | import com.zteits.clouds.api.dto.sys.SysRoleDTO; |
@@ -42,6 +44,7 @@ import com.zteits.clouds.api.dto.sys.param.SysOrgPageQueryRequest; | @@ -42,6 +44,7 @@ import com.zteits.clouds.api.dto.sys.param.SysOrgPageQueryRequest; | ||
42 | import com.zteits.clouds.api.dto.sys.param.SysRolePageQueryRequest; | 44 | import com.zteits.clouds.api.dto.sys.param.SysRolePageQueryRequest; |
43 | import com.zteits.clouds.api.service.park.BerthManageService; | 45 | import com.zteits.clouds.api.service.park.BerthManageService; |
44 | import com.zteits.clouds.api.service.park.EqpBerthsService; | 46 | import com.zteits.clouds.api.service.park.EqpBerthsService; |
47 | +import com.zteits.clouds.api.service.park.ParkingLotQueryService; | ||
45 | 48 | ||
46 | import io.swagger.annotations.Api; | 49 | import io.swagger.annotations.Api; |
47 | import io.swagger.annotations.ApiOperation; | 50 | import io.swagger.annotations.ApiOperation; |
@@ -72,6 +75,8 @@ public class RealTimeMonitorController extends BizController { | @@ -72,6 +75,8 @@ public class RealTimeMonitorController extends BizController { | ||
72 | private EqpBerthsService eqpBerthsService; | 75 | private EqpBerthsService eqpBerthsService; |
73 | @Autowired | 76 | @Autowired |
74 | private BerthManageService berthManageService; | 77 | private BerthManageService berthManageService; |
78 | + @Autowired | ||
79 | + private ParkingLotQueryService parkingLotQueryService; | ||
75 | 80 | ||
76 | 81 | ||
77 | /** | 82 | /** |
@@ -111,7 +116,7 @@ public class RealTimeMonitorController extends BizController { | @@ -111,7 +116,7 @@ public class RealTimeMonitorController extends BizController { | ||
111 | } | 116 | } |
112 | logger.info("调用分组查询停车场占用率dubbo服务入参:request={}"+JSONObject.toJSONString(request)); | 117 | logger.info("调用分组查询停车场占用率dubbo服务入参:request={}"+JSONObject.toJSONString(request)); |
113 | BizResult<List<ParkOccupancyRateDTO>> result = eqpBerthsService.queryParkOccupancyRate(request); | 118 | BizResult<List<ParkOccupancyRateDTO>> result = eqpBerthsService.queryParkOccupancyRate(request); |
114 | - logger.info("调用分组查询停车场占用率dubbo服务返回信息:request={}"+JSONObject.toJSONString(result)); | 119 | + logger.info("调用分组查询停车场占用率dubbo服务返回信息:response={}"+JSONObject.toJSONString(result)); |
115 | return new BizResultVO<List<ParkOccupancyRateDTO>>(result); | 120 | return new BizResultVO<List<ParkOccupancyRateDTO>>(result); |
116 | } | 121 | } |
117 | 122 | ||
@@ -151,7 +156,26 @@ public class RealTimeMonitorController extends BizController { | @@ -151,7 +156,26 @@ public class RealTimeMonitorController extends BizController { | ||
151 | throws Exception { | 156 | throws Exception { |
152 | logger.info("调用分组查询停车场占用率dubbo服务入参:request={}"+JSONObject.toJSONString(request)); | 157 | logger.info("调用分组查询停车场占用率dubbo服务入参:request={}"+JSONObject.toJSONString(request)); |
153 | BizResult<List<ParkOccupancyRateDTO>> result = berthManageService.queryParkOccupancyRate(request); | 158 | BizResult<List<ParkOccupancyRateDTO>> result = berthManageService.queryParkOccupancyRate(request); |
154 | - logger.info("调用分组查询停车场占用率dubbo服务返回信息:request={}"+JSONObject.toJSONString(result)); | 159 | + logger.info("调用分组查询停车场占用率dubbo服务返回信息:response={}"+JSONObject.toJSONString(result)); |
155 | return new BizResultVO<List<ParkOccupancyRateDTO>>(result); | 160 | return new BizResultVO<List<ParkOccupancyRateDTO>>(result); |
156 | } | 161 | } |
162 | + | ||
163 | + /** | ||
164 | + * 通过停车场集合查询停车场信息 | ||
165 | + * | ||
166 | + * @param request | ||
167 | + * @return | ||
168 | + * @throws Exception | ||
169 | + * langlw 2017-9-1 | ||
170 | + */ | ||
171 | + @ApiOperation("通过停车场集合查询停车场信息") | ||
172 | + @PostMapping("/queryParkingLotGeoByPlNos") | ||
173 | + public BizResultVO<List<ParkingLotDTO>> queryParkingLotGeoByPlNos( | ||
174 | + @RequestBody QueryParkingLotByParkRequest request) | ||
175 | + throws Exception { | ||
176 | + logger.info("通过停车场集合查询停车场信息dubbo服务入参:request={}"+JSONObject.toJSONString(request)); | ||
177 | + BizResult<List<ParkingLotDTO>> result = parkingLotQueryService.queryParkingLotGeoByPlNos(request); | ||
178 | + logger.info("通过停车场集合查询停车场信息dubbo服务返回信息:response={}"+JSONObject.toJSONString(result)); | ||
179 | + return new BizResultVO<List<ParkingLotDTO>>(result); | ||
180 | + } | ||
157 | } | 181 | } |
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/devicemanagement/PdaController.java
@@ -34,9 +34,12 @@ import com.zteits.clouds.api.apibase.bean.PageBean; | @@ -34,9 +34,12 @@ import com.zteits.clouds.api.apibase.bean.PageBean; | ||
34 | import com.zteits.clouds.api.apibase.constants.ErrorType; | 34 | import com.zteits.clouds.api.apibase.constants.ErrorType; |
35 | import com.zteits.clouds.api.apibase.exception.BizException; | 35 | import com.zteits.clouds.api.apibase.exception.BizException; |
36 | import com.zteits.clouds.api.dto.park.dto.TpPPdaDTO; | 36 | import com.zteits.clouds.api.dto.park.dto.TpPPdaDTO; |
37 | +import com.zteits.clouds.api.dto.park.dto.TpPTgsPassedcarDTO; | ||
37 | import com.zteits.clouds.api.dto.park.param.TpPPdaRequest; | 38 | import com.zteits.clouds.api.dto.park.param.TpPPdaRequest; |
38 | import com.zteits.clouds.api.dto.park.param.TpPPdaSRequest; | 39 | import com.zteits.clouds.api.dto.park.param.TpPPdaSRequest; |
40 | +import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; | ||
39 | import com.zteits.clouds.api.service.park.TpPPdaService; | 41 | import com.zteits.clouds.api.service.park.TpPPdaService; |
42 | +import com.zteits.clouds.api.service.park.TpPTgsPassedcarService; | ||
40 | import com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic.InOutParkStatisticController; | 43 | import com.zteits.irain.portal.web.parkinglotcloudplatform.datastatistic.InOutParkStatisticController; |
41 | 44 | ||
42 | import io.swagger.annotations.ApiOperation; | 45 | import io.swagger.annotations.ApiOperation; |
@@ -63,10 +66,31 @@ public class PdaController extends BizController { | @@ -63,10 +66,31 @@ public class PdaController extends BizController { | ||
63 | 66 | ||
64 | @Autowired | 67 | @Autowired |
65 | private TpPPdaService tpPPdaService; | 68 | private TpPPdaService tpPPdaService; |
69 | + @Autowired | ||
70 | + private TpPTgsPassedcarService tpPTgsPassedcarService; | ||
66 | 71 | ||
67 | @Value("${project.syscode}") | 72 | @Value("${project.syscode}") |
68 | private String sysCode; | 73 | private String sysCode; |
69 | 74 | ||
75 | + | ||
76 | + | ||
77 | + @ApiOperation("PDA信息信息") | ||
78 | + @PostMapping("/queryPassedca4pabe") | ||
79 | + public BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>> queryPassedca4pabe(@RequestBody TpPTgsPassedcarRequest tpPTgsPassedcarRequest, HttpServletRequest request, | ||
80 | + HttpServletResponse response){ | ||
81 | + BizResult<PageBean<TpPTgsPassedcarDTO>> bizResult = new BizResult<PageBean<TpPTgsPassedcarDTO>>(); | ||
82 | + try { | ||
83 | + tpPTgsPassedcarRequest.setSysCode(sysCode); | ||
84 | + bizResult = tpPTgsPassedcarService.queryPassedcar4Page(tpPTgsPassedcarRequest); | ||
85 | + if(bizResult.isSuccess()){ | ||
86 | + return returnJqGridData(bizResult, TpPTgsPassedcarDTO.class); | ||
87 | + } | ||
88 | + } catch (Exception e) { | ||
89 | + logger.debug("分页查询过车信息异常:{}",bizResult.getErrMsg()); | ||
90 | + } | ||
91 | + return new BizResultVO<EasyUIDataGridVO<TpPTgsPassedcarDTO>>(); | ||
92 | + } | ||
93 | + | ||
70 | @ApiOperation("PDA信息信息") | 94 | @ApiOperation("PDA信息信息") |
71 | @PostMapping("/queryPdaInfo4pabe") | 95 | @PostMapping("/queryPdaInfo4pabe") |
72 | public BizResultVO<EasyUIDataGridVO<TpPPdaDTO>> queryPdaInfo4pabe(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest request, | 96 | public BizResultVO<EasyUIDataGridVO<TpPPdaDTO>> queryPdaInfo4pabe(@RequestBody TpPPdaRequest tpPPdaRequest, HttpServletRequest request, |
@@ -202,7 +226,7 @@ public class PdaController extends BizController { | @@ -202,7 +226,7 @@ public class PdaController extends BizController { | ||
202 | Layouter.buildReport(workSheet, title, 0, 0); | 226 | Layouter.buildReport(workSheet, title, 0, 0); |
203 | // 3.填充数据 | 227 | // 3.填充数据 |
204 | ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | 228 | ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); |
205 | - fillUserManager.fillSalesOrga(workSheet, title, null, 2); | 229 | + fillUserManager.fillSalesOrga(workSheet, title, Lists.newArrayList(), 2); |
206 | // 4.excel输出配置 | 230 | // 4.excel输出配置 |
207 | ExcelUtil.write(response, workSheet, fileName); | 231 | ExcelUtil.write(response, workSheet, fileName); |
208 | } | 232 | } |
src/main/resources/dubbo/dubbo-park-consumer.xml
@@ -162,4 +162,9 @@ | @@ -162,4 +162,9 @@ | ||
162 | <dubbo:reference id="tpPPdaService" interface="com.zteits.clouds.api.service.park.TpPPdaService" | 162 | <dubbo:reference id="tpPPdaService" interface="com.zteits.clouds.api.service.park.TpPPdaService" |
163 | version="${spring.dubbo.provider.version}" | 163 | version="${spring.dubbo.provider.version}" |
164 | timeout="30000"/> | 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 | + | ||
165 | </beans> | 170 | </beans> |
166 | \ No newline at end of file | 171 | \ No newline at end of file |