mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update
This commit is contained in:
@@ -13,6 +13,7 @@ import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.EBikeStartChargingCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.ReservationChargingCommand;
|
||||
@@ -22,6 +23,7 @@ import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
||||
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
||||
import com.jsowell.pile.vo.uniapp.customer.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.web.MerchantOrderReportExportVO;
|
||||
import com.jsowell.pile.vo.web.OrderCountByTimeVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.service.OrderService;
|
||||
@@ -36,7 +38,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -1016,4 +1021,19 @@ public class TempController extends BaseController {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出财务中心
|
||||
* @param response
|
||||
* @param dto
|
||||
* @throws IOException
|
||||
*/
|
||||
@PostMapping("/exportFinanceCenter")
|
||||
public void exportFinanceCenter(HttpServletResponse response, @RequestBody MerchantOrderReportDTO dto) throws IOException {
|
||||
MerchantOrderReportExportVO vo = tempService.exportFinanceCenter(dto);
|
||||
List<MerchantOrderReportExportVO> list = Collections.singletonList(vo);
|
||||
ExcelUtil<MerchantOrderReportExportVO> util = new ExcelUtil<>(MerchantOrderReportExportVO.class);
|
||||
util.exportExcel(response, list, "某运营商财务报表");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
||||
@@ -1429,5 +1430,26 @@ public class TempService {
|
||||
public List<StationSplitConfig> queryOrderSplitConfigList(String orderCode) {
|
||||
return orderBasicInfoService.queryOrderSplitConfigList(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出财务中心报表以下字段
|
||||
* 日期 总结算金额(元) 电费金额(元) 服务费金额(元) 交易金额(元) 交易手续费(元)
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public MerchantOrderReportExportVO exportFinanceCenter(MerchantOrderReportDTO dto) {
|
||||
MerchantOrderReportVO reportVO = settleOrderReportService.getMerchantOrderReportV2(dto);
|
||||
MerchantOrderReportExportVO exportVO = new MerchantOrderReportExportVO();
|
||||
|
||||
if (reportVO != null) {
|
||||
OrderReportDetail detail = reportVO.getMerchantOrderReport();
|
||||
if (detail != null) {
|
||||
BeanUtils.copyProperties(detail, exportVO);
|
||||
}
|
||||
}
|
||||
|
||||
return exportVO;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MerchantOrderReportExportVO {
|
||||
|
||||
@Excel(name = "日期")
|
||||
private Date tradeTime;
|
||||
|
||||
// 用电度数
|
||||
@Excel(name = "用电度数")
|
||||
private BigDecimal useElectricity;
|
||||
|
||||
// 充电次数
|
||||
@Excel(name = "充电次数")
|
||||
private BigDecimal chargeNum;
|
||||
|
||||
// 充电时长
|
||||
@Excel(name = "充电时长")
|
||||
private BigDecimal chargeTime;
|
||||
|
||||
// 电费金额
|
||||
@Excel(name = "电费金额")
|
||||
private BigDecimal electricityAmount;
|
||||
|
||||
// 服务费金额
|
||||
@Excel(name = "服务费金额")
|
||||
private BigDecimal serviceAmount;
|
||||
|
||||
// 收入金额
|
||||
@Excel(name = "收入金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
// 交易金额
|
||||
@Excel(name = "交易金额")
|
||||
private BigDecimal tradeAmount;
|
||||
|
||||
// 交易手续费
|
||||
@Excel(name = "交易手续费")
|
||||
private BigDecimal tradeFee;
|
||||
|
||||
// 虚拟金额
|
||||
@Excel(name = "虚拟金额")
|
||||
private BigDecimal virtualAmount;
|
||||
|
||||
// 白名单支付次数
|
||||
private BigDecimal whitelistPaymentsNum;
|
||||
|
||||
// 他人分账金额
|
||||
private BigDecimal otherSplitAmount;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user