|
|
@@ -1,6 +1,5 @@ |
|
|
package com.iformall.service.impl; |
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams; |
|
|
|
|
|
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; |
|
|
@@ -28,7 +27,6 @@ import javax.servlet.http.HttpServletResponse; |
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.math.RoundingMode; |
|
|
import java.math.RoundingMode; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @author gongbiao |
|
|
* @author gongbiao |
|
|
@@ -222,32 +220,6 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
@Override |
|
|
@Override |
|
|
public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll) { |
|
|
public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll) { |
|
|
|
|
|
|
|
|
Map<Long, List<WxBillAllVo>> billMapList = wxBillAllMapper.list(wxBillAll) |
|
|
|
|
|
.parallelStream() |
|
|
|
|
|
.collect(Collectors.groupingBy(WxBillAllVo::getMerchantId)); |
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
Iterator<Map.Entry<Long, List<WxBillAllVo>>> entries = billMapList.entrySet().iterator(); |
|
|
|
|
|
while (entries.hasNext()) { |
|
|
|
|
|
Map.Entry<Long, List<WxBillAllVo>> entry = entries.next(); |
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
ExportParams deptExportParams = new ExportParams(); |
|
|
|
|
|
WxBillAllVo first = ((List<WxBillAllVo>)(entry.getValue())).get(0); |
|
|
|
|
|
deptExportParams.setSheetName(first.getMerchantName()); |
|
|
|
|
|
deptExportParams.setTitle(first.getMerchantName() |
|
|
|
|
|
+ " (" |
|
|
|
|
|
+ EnumRentShopType.getEnum((Integer)first.getRentShopType()).getMessage() |
|
|
|
|
|
+ "-"+first.getShopNumber() |
|
|
|
|
|
+ ")"); |
|
|
|
|
|
//deptExportParams.setSecondTitle(); |
|
|
|
|
|
map.put("title", deptExportParams); |
|
|
|
|
|
map.put("entity", WxBillAllVo.class); |
|
|
|
|
|
map.put("data", entry.getValue()); |
|
|
|
|
|
list.add(map); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
excelService.exportExcel(list, "账单数据.xls", response); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private int updateBillOtherDeposit(Map<String, Object> bill) { |
|
|
private int updateBillOtherDeposit(Map<String, Object> bill) { |
|
|
|