Explorar el Código

[卡消费列表][修改]:卡消费列表导出和UI界面一致

release_toaliyun_real
Stormeye Wu hace 7 años
padre
commit
813e3f91ef
Se han modificado 1 ficheros con 10 adiciones y 7 borrados
  1. +10
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java

+ 10
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java Ver fichero

@@ -1,6 +1,5 @@
package com.iformall.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.ErrorCode;
@@ -16,7 +15,6 @@ import com.iformall.service.WxCardSpendService;
import com.iformall.service.WxProfitSharingOrderService;
import com.iformall.utils.Constant;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
@@ -32,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;

@@ -483,7 +482,8 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
String filename = UUID.randomUUID() + ".xlsx";
filepath = filepath + filename;

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DecimalFormat df = new DecimalFormat("0.00");

try {
File file = new File(filepath);
@@ -527,16 +527,19 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {

WxCardSpendVo entity = cardSpendVoList.get(i);

idCellTwo.setCellValue(entity.getId());
idCellTwo.setCellValue(String.valueOf(entity.getId()));
ownerCellTwo.setCellValue(entity.getOnickName());
phoneCellTwo.setCellValue(entity.getOuPhone());
cardNameCellTwo.setCellValue(entity.getTitle());
merchantNameCellTwo.setCellValue(entity.getMerchantName());
costCellTwo.setCellValue(entity.getDeductionAmount());
String dStr = df.format((float)entity.getDeductionAmount()/100);
costCellTwo.setCellValue(dStr);
if (entity.getCreateDate() != null)
costTimeCellTwo.setCellValue(sdf.format(entity.getCreateDate()));
receivePayCellTwo.setCellValue(entity.getPayment());
realReceivePayCellTwo.setCellValue(entity.getRealPayment());
dStr = df.format((float)entity.getPayment()/100);
receivePayCellTwo.setCellValue(dStr);
dStr = df.format((float)entity.getRealPayment()/100);
realReceivePayCellTwo.setCellValue(dStr);
String statusStr = "未支付";
if (entity.getPayStatus().equals(EnumCardSpendStatus.NOT_PAY.getCode()))
statusStr = "未支付";


Cargando…
Cancelar
Guardar