| @@ -1,6 +1,5 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| @@ -16,7 +15,6 @@ import com.iformall.service.WxCardSpendService; | |||||
| import com.iformall.service.WxProfitSharingOrderService; | import com.iformall.service.WxProfitSharingOrderService; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| import org.apache.commons.io.FileUtils; | 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.Cell; | ||||
| import org.apache.poi.ss.usermodel.Row; | import org.apache.poi.ss.usermodel.Row; | ||||
| import org.apache.poi.xssf.usermodel.XSSFSheet; | 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.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.io.*; | import java.io.*; | ||||
| import java.text.DecimalFormat; | |||||
| import java.text.SimpleDateFormat; | import java.text.SimpleDateFormat; | ||||
| import java.util.*; | import java.util.*; | ||||
| @@ -483,7 +482,8 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| String filename = UUID.randomUUID() + ".xlsx"; | String filename = UUID.randomUUID() + ".xlsx"; | ||||
| filepath = filepath + filename; | 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 { | try { | ||||
| File file = new File(filepath); | File file = new File(filepath); | ||||
| @@ -527,16 +527,19 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| WxCardSpendVo entity = cardSpendVoList.get(i); | WxCardSpendVo entity = cardSpendVoList.get(i); | ||||
| idCellTwo.setCellValue(entity.getId()); | |||||
| idCellTwo.setCellValue(String.valueOf(entity.getId())); | |||||
| ownerCellTwo.setCellValue(entity.getOnickName()); | ownerCellTwo.setCellValue(entity.getOnickName()); | ||||
| phoneCellTwo.setCellValue(entity.getOuPhone()); | phoneCellTwo.setCellValue(entity.getOuPhone()); | ||||
| cardNameCellTwo.setCellValue(entity.getTitle()); | cardNameCellTwo.setCellValue(entity.getTitle()); | ||||
| merchantNameCellTwo.setCellValue(entity.getMerchantName()); | merchantNameCellTwo.setCellValue(entity.getMerchantName()); | ||||
| costCellTwo.setCellValue(entity.getDeductionAmount()); | |||||
| String dStr = df.format((float)entity.getDeductionAmount()/100); | |||||
| costCellTwo.setCellValue(dStr); | |||||
| if (entity.getCreateDate() != null) | if (entity.getCreateDate() != null) | ||||
| costTimeCellTwo.setCellValue(sdf.format(entity.getCreateDate())); | 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 = "未支付"; | String statusStr = "未支付"; | ||||
| if (entity.getPayStatus().equals(EnumCardSpendStatus.NOT_PAY.getCode())) | if (entity.getPayStatus().equals(EnumCardSpendStatus.NOT_PAY.getCode())) | ||||
| statusStr = "未支付"; | statusStr = "未支付"; | ||||