Commit eef4c9c875df85b7edfb22e9b196193ee0336556

Authored by atao
2 parents ed98b3d9 6937be2b

Merge remote-tracking branch 'origin/branch_0808' into branch_0808

src/main/java/com/zteits/irain/portal/vo/fangle/BerthStateRequest.java deleted
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 deleted
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 deleted
1   -package com.zteits.irain.portal.web.fangle;
2   -
3   -import java.text.ParseException;
4   -import java.text.SimpleDateFormat;
5   -import java.util.Date;
6   -import java.util.Map;
7   -
8   -import org.slf4j.Logger;
9   -import org.slf4j.LoggerFactory;
10   -import org.springframework.beans.BeanUtils;
11   -import org.springframework.beans.factory.annotation.Autowired;
12   -import org.springframework.beans.factory.annotation.Value;
13   -import org.springframework.web.bind.annotation.RequestBody;
14   -import org.springframework.web.bind.annotation.RequestMapping;
15   -import org.springframework.web.bind.annotation.RequestMethod;
16   -import org.springframework.web.bind.annotation.RestController;
17   -
18   -import com.alibaba.fastjson.JSON;
19   -import com.alibaba.fastjson.JSONArray;
20   -import com.alibaba.fastjson.JSONObject;
21   -import com.clouds.common.web.BizController;
22   -import com.zteits.clouds.api.apibase.bean.BaseInfo;
23   -import com.zteits.clouds.api.apibase.bean.BizResult;
24   -import com.zteits.clouds.api.dto.park.param.EqpLogRequest;
25   -import com.zteits.clouds.api.service.park.EqpBerthsService;
26   -import com.zteits.irain.portal.vo.fangle.BerthStateRequest;
27   -import com.zteits.irain.portal.vo.fangle.EqpHeartBeatRequest;
28   -
29   -import io.swagger.annotations.Api;
30   -import io.swagger.annotations.ApiOperation;
31   -
32   -/**
33   - * Copyright: Copyright (c) 2017 ZTE-ITS
34   - *
35   - * @ClassName: FangleEqpController.java
36   - * @Description:方格尔设备同步
37   - * @version: v1.0.0
38   - * @author: wangfei
39   - * @date: 2017年4月20日 下午17:51:45
40   - * Modification History:
41   - * Date Author Version Description
42   - *---------------------------------------------------------*
43   - * 2017年8月21日 wangfei v1.0.0 创建
44   - */
45   -@Api(value="方格尔设备同步",description="方格尔设备同步")
46   -@RestController
47   -@RequestMapping("/fangle")
48   -public class FangleEqpController extends BizController{
49   -
50   -
51   - private static final Logger logger = LoggerFactory.getLogger(FangleEqpController.class);
52   - @Value("${project.syscode}")
53   - private String sysCode;
54   - @Autowired
55   - private EqpBerthsService eqpBerthsService;
56   -
57   - @ApiOperation("泊位信息同步")
58   - @RequestMapping(value = "/synBerthInfo",method = RequestMethod.POST)
59   - public BizResult<Map<String, String>> synBerthInfo(@RequestBody String param){
60   - logger.info("同步入参:" + param);
61   -
62   - JSONObject jsonObject = JSONObject.parseObject(param);
63   - String reqList = jsonObject.getString("pushdata");
64   - JSONArray jsonArray = JSON.parseArray(reqList);
65   - BerthStateRequest request = JSON.parseObject(jsonArray.getString(0),BerthStateRequest.class);
66   - BaseInfo info = new BaseInfo();
67   - request.setBaseRequest(info);
68   - request.setSysCode(sysCode);
69   - //数据转换
70   - EqpLogRequest eqpLogRequest = new EqpLogRequest();
71   - BeanUtils.copyProperties(request, eqpLogRequest);
72   - eqpLogRequest.setBerthOutNo(request.getBerthcode());
73   - eqpLogRequest.setEqpType(1);//地磁
74   - if(request.getBerthstatus().equals("1") || request.getBerthstatus().equals("2")){
75   - eqpLogRequest.setEqpStatus("1");//设备状态 1-正常
76   - }
77   - if(request.getBerthstatus().equals("3")){
78   - eqpLogRequest.setEqpStatus("0");//设备状态 0-故障
79   - }
80   - if(request.getBerthstatus().equals("2")){
81   - eqpLogRequest.setBerthState("0");//泊位状态 0-空闲
82   - }
83   - if(request.getBerthstatus().equals("1")){
84   - eqpLogRequest.setBerthState("1");//泊位状态 1- 占用
85   - }
86   - eqpLogRequest.setElectricity(request.getElectricity());
87   - eqpLogRequest.setVoltag(request.getVoltage());
88   -
89   - BizResult<Map<String, String>> result = eqpBerthsService.synEqpInfo(eqpLogRequest);
90   - return result;
91   - }
92   -
93   - @ApiOperation("设备心跳信息同步")
94   - @RequestMapping(value = "/synEqpHeartBeatInfo",method = RequestMethod.POST)
95   - public BizResult<Map<String, String>> synEqpHeartBeatInfo(@RequestBody String param){
96   - logger.info("同步入参:" + param);
97   -
98   - JSONObject jsonObject = JSONObject.parseObject(param);
99   - String reqList = jsonObject.getString("pushdata");
100   - JSONArray jsonArray = JSON.parseArray(reqList);
101   - EqpHeartBeatRequest request = JSON.parseObject(jsonArray.getString(0),EqpHeartBeatRequest.class);
102   - BaseInfo info = new BaseInfo();
103   - request.setBaseRequest(info);
104   - request.setSysCode(sysCode);
105   -
106   - //数据转换
107   - EqpLogRequest eqpLogRequest = new EqpLogRequest();
108   - BeanUtils.copyProperties(request, eqpLogRequest);
109   - eqpLogRequest.setEqpNo(request.getEquipmentCode());
110   - if(request.getEquipmentType().equals("1")){
111   - eqpLogRequest.setEqpType(4);//设备类型 4-车检器
112   - }
113   - if(request.getEquipmentType().equals("2")){
114   - eqpLogRequest.setEqpType(5);//设备类型 5-网关
115   - }
116   - if(request.getEquipmentType().equals("3")){
117   - eqpLogRequest.setEqpType(6);//设备类型 6-中继器
118   - }
119   - if(request.getEquipmentStatus().equals("1")){
120   - eqpLogRequest.setEqpStatus("1");//设备状态 1-正常
121   - }
122   - if(request.getEquipmentStatus().equals("2")){
123   - eqpLogRequest.setEqpStatus("0");//设备状态 0-故障
124   - }
125   - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
126   - Date date;
127   - try {
128   - date = sdf.parse(request.getPushTime());
129   - eqpLogRequest.setHeartbeatTime(date);
130   - } catch (ParseException e) {
131   - e.printStackTrace();
132   - }
133   - BizResult<Map<String, String>> result = eqpBerthsService.synEqpInfo(eqpLogRequest);
134   - return result;
135   - }
136   -
137   -}
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java
... ... @@ -355,7 +355,7 @@ public class MonthBillManagementController extends BizController {
355 355 yearMonthCardStatisticRequest.setSysCode(sysCode);
356 356 yearMonthCardStatisticRequest.setBeginTime(DateUtil.to_date(beginTime, DateUtil.DATETIME_FORMAT));
357 357 yearMonthCardStatisticRequest.setEndTime(DateUtil.to_date(endTime, DateUtil.DATETIME_FORMAT));
358   - yearMonthCardStatisticRequest.setParkIdList(parkIdList);
  358 + yearMonthCardStatisticRequest.setPlNos(parkIdList);
359 359 yearMonthCardStatisticRequest.setBaseRequest(new BaseInfo(1, 0));
360 360 /** 查询月账单年卡月卡. */
361 361 result = yearMonthCardStatisticService.queryYearMonthCardStatistic(yearMonthCardStatisticRequest);
... ... @@ -377,43 +377,43 @@ public class MonthBillManagementController extends BizController {
377 377 if (CollectionUtils.isNotEmpty(result.getData().getDataList())) {
378 378 list = result.getData().getDataList();
379 379 }
380   - for (YearMonthCardStatisticDTO e : list) {
381   - Object[] obj = new Object[title.length];
382   - int index = 0;
383   - obj[index++] = StringUtils.isNotEmpty(e.getOrderId()) ? e.getOrderId() : "";
384   - obj[index++] = e.getPayFinishTime() != null
385   - ? DateUtil.getDateString(e.getPayFinishTime(), DateUtil.DATETIME_FORMAT) : "";
386   - String yearOrMonthCard = "";
387   - if (null != e.getOrderType()) {
388   - if (2 == e.getOrderType()) {
389   - yearOrMonthCard = "年卡";
390   - obj[index++] = yearOrMonthCard;
391   - } else if (3 == e.getOrderType()) {
392   - yearOrMonthCard = "月卡";
393   - obj[index++] = yearOrMonthCard;
394   - }
395   - } else {
396   - obj[index++] = "";
397   - }
398   - obj[index++] = StringUtils.isNotEmpty(e.getParkName()) ? e.getParkName() + yearOrMonthCard : "";
399   -
400   - obj[index++] = StringUtils.isNotEmpty(e.getCarNumber()) ? e.getCarNumber() : "";
401   -
402   - obj[index++] = e.getAmount() != null ? AmountUtils.changeF2Y(e.getAmount().longValue()) : "0.00";
403   - String effDate = "";
404   - String expDate = "";
405   - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
406   - if (null != e.getEffDate()) {
407   - effDate = format.format(e.getEffDate());
408   - }
409   - if (null != e.getExpDate()) {
410   - expDate = format.format(e.getExpDate());
411   - }
412   -
413   - obj[index++] = effDate + " - " + expDate;
414   -
415   - contentList.add(obj);
416   - }
  380 +// for (YearMonthCardStatisticDTO e : list) {
  381 +// Object[] obj = new Object[title.length];
  382 +// int index = 0;
  383 +// obj[index++] = StringUtils.isNotEmpty(e.getOrderId()) ? e.getOrderId() : "";
  384 +// obj[index++] = e.getPayFinishTime() != null
  385 +// ? DateUtil.getDateString(e.getPayFinishTime(), DateUtil.DATETIME_FORMAT) : "";
  386 +// String yearOrMonthCard = "";
  387 +// if (null != e.getOrderType()) {
  388 +// if (2 == e.getOrderType()) {
  389 +// yearOrMonthCard = "年卡";
  390 +// obj[index++] = yearOrMonthCard;
  391 +// } else if (3 == e.getOrderType()) {
  392 +// yearOrMonthCard = "月卡";
  393 +// obj[index++] = yearOrMonthCard;
  394 +// }
  395 +// } else {
  396 +// obj[index++] = "";
  397 +// }
  398 +// obj[index++] = StringUtils.isNotEmpty(e.getParkName()) ? e.getParkName() + yearOrMonthCard : "";
  399 +//
  400 +// obj[index++] = StringUtils.isNotEmpty(e.getCarNumber()) ? e.getCarNumber() : "";
  401 +//
  402 +// obj[index++] = e.getAmount() != null ? AmountUtils.changeF2Y(e.getAmount().longValue()) : "0.00";
  403 +// String effDate = "";
  404 +// String expDate = "";
  405 +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  406 +// if (null != e.getEffDate()) {
  407 +// effDate = format.format(e.getEffDate());
  408 +// }
  409 +// if (null != e.getExpDate()) {
  410 +// expDate = format.format(e.getExpDate());
  411 +// }
  412 +//
  413 +// obj[index++] = effDate + " - " + expDate;
  414 +//
  415 +// contentList.add(obj);
  416 +// }
417 417  
418 418 ExcleFillDateManager fillUserManager = new ExcleFillDateManager();
419 419 fillUserManager.fillSalesOrga(workSheet, title, contentList, 2);
... ...
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java
... ... @@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
9 9 import javax.servlet.http.HttpServletResponse;
10 10  
11 11 import com.alibaba.dubbo.common.utils.CollectionUtils;
  12 +import com.alibaba.dubbo.common.utils.StringUtils;
12 13 import com.alibaba.fastjson.JSON;
13 14  
14 15 import com.clouds.common.utils.excle.ExcelUtil;
... ... @@ -100,8 +101,8 @@ public class YearMonthCardStatisticController extends BizController {
100 101 @ApiOperation("导出年卡月卡统计excel")
101 102 @GetMapping("exportYearMonthStatisticExcel")
102 103 public void exportYearMonthStatisticExcel(@RequestParam Long beginTime, @RequestParam Long endTime,
103   - @RequestParam List<String> parkIdList, @RequestParam String parkNames,
104   - Integer orderType, Integer payType, Integer dataState,
  104 + @RequestParam List<String> plNos,
  105 + Integer orderType, Integer dataState,
105 106 HttpServletRequest requests, HttpServletResponse response) throws Exception {
106 107  
107 108 YearMonthCardStatisticRequest request = new YearMonthCardStatisticRequest();
... ... @@ -109,20 +110,19 @@ public class YearMonthCardStatisticController extends BizController {
109 110 request.setBeginTime(new Date(beginTime));
110 111 request.setEndTime(new Date(endTime));
111 112  
112   - request.setParkIdList(parkIdList);
  113 + request.setPlNos(plNos);
113 114 request.setBaseRequest(new BaseInfo(1, 0));
114 115 request.setOrderType(orderType);
115   - request.setPayType(payType);
116 116 request.setDataState(dataState);
117 117  
118 118 BizResult<PageBean<YearMonthCardStatisticDTO>> bizResult = yearMonthCardStatisticService
119 119 .queryYearMonthCardStatistic(request);
120   - BizResult<List<YearMonthCardStatisticSumDTO>> bizResultSum = yearMonthCardStatisticService
121   - .queryYearMonthCardStatisticSum(request);
  120 +// BizResult<List<YearMonthCardStatisticSumDTO>> bizResultSum = yearMonthCardStatisticService
  121 +// .queryYearMonthCardStatisticSum(request);
122 122  
123 123 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
124 124 SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd");
125   - String[] title = new String[] {"交易时间", "停车场", "类型", "车牌号", "支付方式", "支付金额", "有效期", "状态"};
  125 + String[] title = new String[] {"购买日期", "类型", "车牌号", "停车场", "车主","手机号", "金额", "有效期", "状态"};
126 126 String sheetName = "年卡月卡统计";
127 127 String fileName = "年卡月卡统计" + format2.format(new Date());
128 128  
... ... @@ -187,39 +187,21 @@ public class YearMonthCardStatisticController extends BizController {
187 187 for (YearMonthCardStatisticDTO e : list) {
188 188 Object[] obj = new Object[title.length];
189 189 int index = 0;
190   - obj[index++] = e.getPayFinishTime() != null ? format.format(e.getPayFinishTime()) : "";
191   - obj[index++] = e.getParkName();
  190 + obj[index++] = e.getCreateTime() != null ? format.format(e.getCreateTime()) : "";
192 191 String cardType="";
193 192 if (null != e.getOrderType()) {
194   - if (2 == e.getOrderType()) {
195   - cardType = "年卡";
196   - }else{
197   - cardType = "月卡";
198   - }
  193 + if (2 == e.getOrderType()) {
  194 + cardType = "年卡";
  195 + }else{
  196 + cardType = "月卡";
  197 + }
199 198 }
200 199 obj[index++]=cardType;
201 200 obj[index++] = e.getCarNumber();
202   - if (e.getPayType() != null) {
203   - switch (e.getPayType()) {
204   - case 1:
205   - obj[index++] = "支付宝";
206   - break;
207   - case 2:
208   - obj[index++] = "微信";
209   - break;
210   - case 3:
211   - obj[index++] = "银联";
212   - break;
213   - case 4:
214   - obj[index++] = "微信";
215   - break;
216   - default:
217   - obj[index++] = "现金";
218   - break;
219   - }
220   - } else {
221   - obj[index++] = "";
222   - }
  201 + obj[index++] = e.getParkName();
  202 + obj[index++] = StringUtils.isEmpty(e.getCustName())?"":e.getCustName();
  203 + obj[index++] = StringUtils.isEmpty(e.getUserPhone())?"":e.getUserPhone();
  204 +
223 205 obj[index++] = e.getAmount() != null ? e.getAmount() : "0.00";
224 206 obj[index++] = e.getEffDate() != null ? format.format(e.getEffDate())
225 207 : "" + "-" + e.getExpDate() != null ? format.format(e.getExpDate()) : "";
... ...