From 3168235ed782b035c944d839ae818cc556d80f1c Mon Sep 17 00:00:00 2001 From: llw <18235445130@163.com> Date: Thu, 24 Aug 2017 08:42:30 +0800 Subject: [PATCH] 提交年卡月卡portal --- src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java | 76 ++++++++++++++++++++++++++++++++++++++-------------------------------------- src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java | 48 +++++++++++++++--------------------------------- 2 files changed, 53 insertions(+), 71 deletions(-) diff --git a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java index 9cb8c58..d4c0d1c 100644 --- a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java +++ b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/MonthBillManagementController.java @@ -355,7 +355,7 @@ public class MonthBillManagementController extends BizController { yearMonthCardStatisticRequest.setSysCode(sysCode); yearMonthCardStatisticRequest.setBeginTime(DateUtil.to_date(beginTime, DateUtil.DATETIME_FORMAT)); yearMonthCardStatisticRequest.setEndTime(DateUtil.to_date(endTime, DateUtil.DATETIME_FORMAT)); - yearMonthCardStatisticRequest.setParkIdList(parkIdList); + yearMonthCardStatisticRequest.setPlNos(parkIdList); yearMonthCardStatisticRequest.setBaseRequest(new BaseInfo(1, 0)); /** 查询月账单年卡月卡. */ result = yearMonthCardStatisticService.queryYearMonthCardStatistic(yearMonthCardStatisticRequest); @@ -377,43 +377,43 @@ public class MonthBillManagementController extends BizController { if (CollectionUtils.isNotEmpty(result.getData().getDataList())) { list = result.getData().getDataList(); } - for (YearMonthCardStatisticDTO e : list) { - Object[] obj = new Object[title.length]; - int index = 0; - obj[index++] = StringUtils.isNotEmpty(e.getOrderId()) ? e.getOrderId() : ""; - obj[index++] = e.getPayFinishTime() != null - ? DateUtil.getDateString(e.getPayFinishTime(), DateUtil.DATETIME_FORMAT) : ""; - String yearOrMonthCard = ""; - if (null != e.getOrderType()) { - if (2 == e.getOrderType()) { - yearOrMonthCard = "年卡"; - obj[index++] = yearOrMonthCard; - } else if (3 == e.getOrderType()) { - yearOrMonthCard = "月卡"; - obj[index++] = yearOrMonthCard; - } - } else { - obj[index++] = ""; - } - obj[index++] = StringUtils.isNotEmpty(e.getParkName()) ? e.getParkName() + yearOrMonthCard : ""; - - obj[index++] = StringUtils.isNotEmpty(e.getCarNumber()) ? e.getCarNumber() : ""; - - obj[index++] = e.getAmount() != null ? AmountUtils.changeF2Y(e.getAmount().longValue()) : "0.00"; - String effDate = ""; - String expDate = ""; - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); - if (null != e.getEffDate()) { - effDate = format.format(e.getEffDate()); - } - if (null != e.getExpDate()) { - expDate = format.format(e.getExpDate()); - } - - obj[index++] = effDate + " - " + expDate; - - contentList.add(obj); - } +// for (YearMonthCardStatisticDTO e : list) { +// Object[] obj = new Object[title.length]; +// int index = 0; +// obj[index++] = StringUtils.isNotEmpty(e.getOrderId()) ? e.getOrderId() : ""; +// obj[index++] = e.getPayFinishTime() != null +// ? DateUtil.getDateString(e.getPayFinishTime(), DateUtil.DATETIME_FORMAT) : ""; +// String yearOrMonthCard = ""; +// if (null != e.getOrderType()) { +// if (2 == e.getOrderType()) { +// yearOrMonthCard = "年卡"; +// obj[index++] = yearOrMonthCard; +// } else if (3 == e.getOrderType()) { +// yearOrMonthCard = "月卡"; +// obj[index++] = yearOrMonthCard; +// } +// } else { +// obj[index++] = ""; +// } +// obj[index++] = StringUtils.isNotEmpty(e.getParkName()) ? e.getParkName() + yearOrMonthCard : ""; +// +// obj[index++] = StringUtils.isNotEmpty(e.getCarNumber()) ? e.getCarNumber() : ""; +// +// obj[index++] = e.getAmount() != null ? AmountUtils.changeF2Y(e.getAmount().longValue()) : "0.00"; +// String effDate = ""; +// String expDate = ""; +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); +// if (null != e.getEffDate()) { +// effDate = format.format(e.getEffDate()); +// } +// if (null != e.getExpDate()) { +// expDate = format.format(e.getExpDate()); +// } +// +// obj[index++] = effDate + " - " + expDate; +// +// contentList.add(obj); +// } ExcleFillDateManager fillUserManager = new ExcleFillDateManager(); fillUserManager.fillSalesOrga(workSheet, title, contentList, 2); diff --git a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java index 6e5b2ec..465e4b2 100644 --- a/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java +++ b/src/main/java/com/zteits/irain/portal/web/parkinglotcloudplatform/datastatistic/YearMonthCardStatisticController.java @@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.alibaba.dubbo.common.utils.CollectionUtils; +import com.alibaba.dubbo.common.utils.StringUtils; import com.alibaba.fastjson.JSON; import com.clouds.common.utils.excle.ExcelUtil; @@ -100,8 +101,8 @@ public class YearMonthCardStatisticController extends BizController { @ApiOperation("导出年卡月卡统计excel") @GetMapping("exportYearMonthStatisticExcel") public void exportYearMonthStatisticExcel(@RequestParam Long beginTime, @RequestParam Long endTime, - @RequestParam List parkIdList, @RequestParam String parkNames, - Integer orderType, Integer payType, Integer dataState, + @RequestParam List plNos, @RequestParam String parkNames, + Integer orderType, Integer dataState, HttpServletRequest requests, HttpServletResponse response) throws Exception { YearMonthCardStatisticRequest request = new YearMonthCardStatisticRequest(); @@ -109,10 +110,9 @@ public class YearMonthCardStatisticController extends BizController { request.setBeginTime(new Date(beginTime)); request.setEndTime(new Date(endTime)); - request.setParkIdList(parkIdList); + request.setPlNos(plNos); request.setBaseRequest(new BaseInfo(1, 0)); request.setOrderType(orderType); - request.setPayType(payType); request.setDataState(dataState); BizResult> bizResult = yearMonthCardStatisticService @@ -122,7 +122,7 @@ public class YearMonthCardStatisticController extends BizController { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); - String[] title = new String[] {"交易时间", "停车场", "类型", "车牌号", "支付方式", "支付金额", "有效期", "状态"}; + String[] title = new String[] {"购买日期", "类型", "车牌号", "停车场", "车主","手机号", "金额", "有效期", "状态"}; String sheetName = "年卡月卡统计"; String fileName = "年卡月卡统计" + format2.format(new Date()); @@ -187,39 +187,21 @@ public class YearMonthCardStatisticController extends BizController { for (YearMonthCardStatisticDTO e : list) { Object[] obj = new Object[title.length]; int index = 0; - obj[index++] = e.getPayFinishTime() != null ? format.format(e.getPayFinishTime()) : ""; - obj[index++] = e.getParkName(); + obj[index++] = e.getCreateTime() != null ? format.format(e.getCreateTime()) : ""; String cardType=""; if (null != e.getOrderType()) { - if (2 == e.getOrderType()) { - cardType = "年卡"; - }else{ - cardType = "月卡"; - } + if (2 == e.getOrderType()) { + cardType = "年卡"; + }else{ + cardType = "月卡"; + } } obj[index++]=cardType; obj[index++] = e.getCarNumber(); - if (e.getPayType() != null) { - switch (e.getPayType()) { - case 1: - obj[index++] = "支付宝"; - break; - case 2: - obj[index++] = "微信"; - break; - case 3: - obj[index++] = "银联"; - break; - case 4: - obj[index++] = "微信"; - break; - default: - obj[index++] = "现金"; - break; - } - } else { - obj[index++] = ""; - } + obj[index++] = e.getParkName(); + obj[index++] = StringUtils.isEmpty(e.getCustName())?"":e.getCustName(); + obj[index++] = StringUtils.isEmpty(e.getParkName())?"":e.getParkName(); + obj[index++] = e.getAmount() != null ? e.getAmount() : "0.00"; obj[index++] = e.getEffDate() != null ? format.format(e.getEffDate()) : "" + "-" + e.getExpDate() != null ? format.format(e.getExpDate()) : ""; -- libgit2 0.21.4