Przeglądaj źródła

[卡消费订单][修改][导出数据]

release_toaliyun_real
gongbiao 7 lat temu
rodzic
commit
55f0223289
4 zmienionych plików z 50 dodań i 19 usunięć
  1. +24
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCardPayController.java
  2. +21
    -11
      mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java
  3. +4
    -7
      mallinkService/src/main/java/com/iformall/domain/vo/WxCardSpendVo.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java

+ 24
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCardPayController.java Wyświetl plik

@@ -202,4 +202,28 @@ public class WxCardPayController extends BaseController {
wxCardInfoService.exportData(wxCardVo, request, response);
}

@ApiOperation("卡消费订单-导出数据")
@GetMapping("exportCardSpend")
@SystemControllerLog(description = "卡消费订单-导出数据")
public void exportCardSpend(@ModelAttribute WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) {
String ipStr = getIpAddr();
logger.info("cardPay/exportCardSpend: " + ipStr);
if (wxCardSpendVo == null) {
wxCardSpendVo = new WxCardSpendVo();
}
wxCardSpendVo.setTenantId(getTenantId());
if (StringUtils.isNotBlank(wxCardSpendVo.getPayStatusStr())) {
String[] statusAttr = wxCardSpendVo.getPayStatusStr().split(",");
List<Integer> tmpList = new ArrayList<Integer>();
for (String status : statusAttr) {
tmpList.add(Integer.valueOf(status));
}
if (!tmpList.isEmpty()) {
wxCardSpendVo.setPayStatusS(tmpList);
}
}
wxCardSpendService.exportData(wxCardSpendVo, request, response);

}

}

+ 21
- 11
mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java Wyświetl plik

@@ -1,15 +1,15 @@
package com.iformall.domain.po;

import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.models.auth.In;
import lombok.Data;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Table(name = "wx_card_spend")
@Data
@@ -17,7 +17,6 @@ public class WxCardSpend implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Excel(name="交易编号",width = 20,orderNum = "1")
protected Long id;
@Transient
@@ -33,6 +32,8 @@ public class WxCardSpend implements Serializable {
private Long ownerId;
@io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId")
private Long merchantId;

@Excel(name = "订单号", width = 20, orderNum = "5")
@io.swagger.annotations.ApiModelProperty(value="订单账号",name="orderId")
private Long orderId;
@io.swagger.annotations.ApiModelProperty(value="ip地址",name="ip")
@@ -43,6 +44,7 @@ public class WxCardSpend implements Serializable {
private Integer payment;
@io.swagger.annotations.ApiModelProperty(value="实收金额(不包含通道费)",name="realPayment")
private Integer realPayment;

@io.swagger.annotations.ApiModelProperty(value="卡剩余总金额",name="cardRemainAmount")
private Integer cardRemainAmount;
@io.swagger.annotations.ApiModelProperty(value="卡支付前总金额",name="cardBeforeAmount")
@@ -58,20 +60,20 @@ public class WxCardSpend implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;

@Excel(name="补贴状态",width = 20,orderNum = "10",replace = { "未支付_0", "已分账_1","已人工分账_2"})
@Excel(name = "支付状态", width = 20, orderNum = "11", replace = {"未支付_0", "已分账_1", "已人工分账_2"})
@io.swagger.annotations.ApiModelProperty(value="支付状态(0:未分帐, 1:已分账, 2:已人工分账)",name="payStatus")
private Integer payStatus;

@Transient
@Excel(name="消费金额",width = 20,orderNum = "7")
@Excel(name = "消费金额(元)", width = 20, orderNum = "7")
private String deductionAmountStr;

@Transient
@Excel(name="收款金额",width = 20,orderNum = "8")
@Excel(name = "应付金额(元)", width = 20, orderNum = "9")
private String paymentStr;

@Transient
@Excel(name="收款实际金额",width = 20,orderNum = "9")
@Excel(name = "实付金额(扣除手续费/元)", width = 20, orderNum = "8")
private String realPaymentStr;


@@ -98,6 +100,14 @@ public class WxCardSpend implements Serializable {
@Transient
private Integer subBusinessId;

public String getCardRemainAmountStr() {
return new BigDecimal(cardRemainAmount == null ? 0 : cardRemainAmount).divide(new BigDecimal(100)).toPlainString();
}

@Transient
@Excel(name = "卡余额(元) ", width = 20, orderNum = "10")
private String cardRemainAmountStr;

public String getDeductionAmountStr() {
if(getDeductionAmount()!=null) {
deductionAmountStr = new BigDecimal(getDeductionAmount()).divide(new BigDecimal(100)).toString();


+ 4
- 7
mallinkService/src/main/java/com/iformall/domain/vo/WxCardSpendVo.java Wyświetl plik

@@ -6,9 +6,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.Transient;
import java.util.Date;

@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@@ -16,11 +13,11 @@ public class WxCardSpendVo extends WxCardSpend {

/**卡信息*/
@io.swagger.annotations.ApiModelProperty(value="卡券名称",name="title")
@Excel(name="卡名",width = 20,orderNum = "4")
@Excel(name = "卡名称", width = 20, orderNum = "3")
private String title;

@io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName")
@Excel(name="商户",width = 20,orderNum = "5")
@Excel(name = "消费商户", width = 20, orderNum = "4")
private String merchantName;

@io.swagger.annotations.ApiModelProperty(value="补贴额(包含通道费)",name="subsidy")
@@ -30,12 +27,12 @@ public class WxCardSpendVo extends WxCardSpend {
@io.swagger.annotations.ApiModelProperty(value="补贴状态(0:未补贴, 1:已补贴)",name="status")
private Integer status;

@Excel(name="消费者",width = 20,orderNum = "2")
@Excel(name = "消费者", width = 20, orderNum = "1")
@io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName")
private String onickName;


@Excel(name="手机号",width = 20,orderNum = "3")
@Excel(name = "手机", width = 20, orderNum = "2")
@io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone")
private String ouPhone;



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java Wyświetl plik

@@ -536,7 +536,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
@Override
public void exportData(WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) {
List<WxCardSpendVo> list = wxCardSpendMapper.findCardSpendVoList(wxCardSpendVo);
excelService.exportExcel(list, null, "消费记录", WxCardSpendVo.class, "消费记录.xlsx", response, false);
excelService.exportExcel(list, null, "消费记录", WxCardSpendVo.class, "消费记录.xlsx", response, false);
}

}

Ładowanie…
Anuluj
Zapisz