Commit 3168235ed782b035c944d839ae818cc556d80f1c
1 parent
b316410d
提交年卡月卡portal
Showing
2 changed files
with
53 additions
and
71 deletions
src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java
| @@ -355,7 +355,7 @@ public class MonthBillManagementController extends BizController { | @@ -355,7 +355,7 @@ public class MonthBillManagementController extends BizController { | ||
| 355 | yearMonthCardStatisticRequest.setSysCode(sysCode); | 355 | yearMonthCardStatisticRequest.setSysCode(sysCode); |
| 356 | yearMonthCardStatisticRequest.setBeginTime(DateUtil.to_date(beginTime, DateUtil.DATETIME_FORMAT)); | 356 | yearMonthCardStatisticRequest.setBeginTime(DateUtil.to_date(beginTime, DateUtil.DATETIME_FORMAT)); |
| 357 | yearMonthCardStatisticRequest.setEndTime(DateUtil.to_date(endTime, DateUtil.DATETIME_FORMAT)); | 357 | yearMonthCardStatisticRequest.setEndTime(DateUtil.to_date(endTime, DateUtil.DATETIME_FORMAT)); |
| 358 | - yearMonthCardStatisticRequest.setParkIdList(parkIdList); | 358 | + yearMonthCardStatisticRequest.setPlNos(parkIdList); |
| 359 | yearMonthCardStatisticRequest.setBaseRequest(new BaseInfo(1, 0)); | 359 | yearMonthCardStatisticRequest.setBaseRequest(new BaseInfo(1, 0)); |
| 360 | /** 查询月账单年卡月卡. */ | 360 | /** 查询月账单年卡月卡. */ |
| 361 | result = yearMonthCardStatisticService.queryYearMonthCardStatistic(yearMonthCardStatisticRequest); | 361 | result = yearMonthCardStatisticService.queryYearMonthCardStatistic(yearMonthCardStatisticRequest); |
| @@ -377,43 +377,43 @@ public class MonthBillManagementController extends BizController { | @@ -377,43 +377,43 @@ public class MonthBillManagementController extends BizController { | ||
| 377 | if (CollectionUtils.isNotEmpty(result.getData().getDataList())) { | 377 | if (CollectionUtils.isNotEmpty(result.getData().getDataList())) { |
| 378 | list = result.getData().getDataList(); | 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 | ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); | 418 | ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); |
| 419 | fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); | 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,6 +9,7 @@ import javax.servlet.http.HttpServletRequest; | ||
| 9 | import javax.servlet.http.HttpServletResponse; | 9 | import javax.servlet.http.HttpServletResponse; |
| 10 | 10 | ||
| 11 | import com.alibaba.dubbo.common.utils.CollectionUtils; | 11 | import com.alibaba.dubbo.common.utils.CollectionUtils; |
| 12 | +import com.alibaba.dubbo.common.utils.StringUtils; | ||
| 12 | import com.alibaba.fastjson.JSON; | 13 | import com.alibaba.fastjson.JSON; |
| 13 | 14 | ||
| 14 | import com.clouds.common.utils.excle.ExcelUtil; | 15 | import com.clouds.common.utils.excle.ExcelUtil; |
| @@ -100,8 +101,8 @@ public class YearMonthCardStatisticController extends BizController { | @@ -100,8 +101,8 @@ public class YearMonthCardStatisticController extends BizController { | ||
| 100 | @ApiOperation("导出年卡月卡统计excel") | 101 | @ApiOperation("导出年卡月卡统计excel") |
| 101 | @GetMapping("exportYearMonthStatisticExcel") | 102 | @GetMapping("exportYearMonthStatisticExcel") |
| 102 | public void exportYearMonthStatisticExcel(@RequestParam Long beginTime, @RequestParam Long endTime, | 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, @RequestParam String parkNames, |
| 105 | + Integer orderType, Integer dataState, | ||
| 105 | HttpServletRequest requests, HttpServletResponse response) throws Exception { | 106 | HttpServletRequest requests, HttpServletResponse response) throws Exception { |
| 106 | 107 | ||
| 107 | YearMonthCardStatisticRequest request = new YearMonthCardStatisticRequest(); | 108 | YearMonthCardStatisticRequest request = new YearMonthCardStatisticRequest(); |
| @@ -109,10 +110,9 @@ public class YearMonthCardStatisticController extends BizController { | @@ -109,10 +110,9 @@ public class YearMonthCardStatisticController extends BizController { | ||
| 109 | request.setBeginTime(new Date(beginTime)); | 110 | request.setBeginTime(new Date(beginTime)); |
| 110 | request.setEndTime(new Date(endTime)); | 111 | request.setEndTime(new Date(endTime)); |
| 111 | 112 | ||
| 112 | - request.setParkIdList(parkIdList); | 113 | + request.setPlNos(plNos); |
| 113 | request.setBaseRequest(new BaseInfo(1, 0)); | 114 | request.setBaseRequest(new BaseInfo(1, 0)); |
| 114 | request.setOrderType(orderType); | 115 | request.setOrderType(orderType); |
| 115 | - request.setPayType(payType); | ||
| 116 | request.setDataState(dataState); | 116 | request.setDataState(dataState); |
| 117 | 117 | ||
| 118 | BizResult<PageBean<YearMonthCardStatisticDTO>> bizResult = yearMonthCardStatisticService | 118 | BizResult<PageBean<YearMonthCardStatisticDTO>> bizResult = yearMonthCardStatisticService |
| @@ -122,7 +122,7 @@ public class YearMonthCardStatisticController extends BizController { | @@ -122,7 +122,7 @@ public class YearMonthCardStatisticController extends BizController { | ||
| 122 | 122 | ||
| 123 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 123 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 124 | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); | 124 | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| 125 | - String[] title = new String[] {"交易时间", "停车场", "类型", "车牌号", "支付方式", "支付金额", "有效期", "状态"}; | 125 | + String[] title = new String[] {"购买日期", "类型", "车牌号", "停车场", "车主","手机号", "金额", "有效期", "状态"}; |
| 126 | String sheetName = "年卡月卡统计"; | 126 | String sheetName = "年卡月卡统计"; |
| 127 | String fileName = "年卡月卡统计" + format2.format(new Date()); | 127 | String fileName = "年卡月卡统计" + format2.format(new Date()); |
| 128 | 128 | ||
| @@ -187,39 +187,21 @@ public class YearMonthCardStatisticController extends BizController { | @@ -187,39 +187,21 @@ public class YearMonthCardStatisticController extends BizController { | ||
| 187 | for (YearMonthCardStatisticDTO e : list) { | 187 | for (YearMonthCardStatisticDTO e : list) { |
| 188 | Object[] obj = new Object[title.length]; | 188 | Object[] obj = new Object[title.length]; |
| 189 | int index = 0; | 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 | String cardType=""; | 191 | String cardType=""; |
| 193 | if (null != e.getOrderType()) { | 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 | obj[index++]=cardType; | 199 | obj[index++]=cardType; |
| 201 | obj[index++] = e.getCarNumber(); | 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.getParkName())?"":e.getParkName(); | ||
| 204 | + | ||
| 223 | obj[index++] = e.getAmount() != null ? e.getAmount() : "0.00"; | 205 | obj[index++] = e.getAmount() != null ? e.getAmount() : "0.00"; |
| 224 | obj[index++] = e.getEffDate() != null ? format.format(e.getEffDate()) | 206 | obj[index++] = e.getEffDate() != null ? format.format(e.getEffDate()) |
| 225 | : "" + "-" + e.getExpDate() != null ? format.format(e.getExpDate()) : ""; | 207 | : "" + "-" + e.getExpDate() != null ? format.format(e.getExpDate()) : ""; |