Просмотр исходного кода

[合同][修改][开发账单结算]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
738ff78b10
4 измененных файлов: 72 добавлений и 1 удалений
  1. +18
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java
  2. +27
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/ReceivedAndPayVo.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillAllService.java
  4. +26
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java

+ 18
- 0
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java Просмотреть файл

@@ -121,6 +121,24 @@ public class WxBillAllController extends BaseController {
return new ResultData(result);
}

/**
* 导出应收、承付商户列表
* @param wxBillAll
* @return
*/
@GetMapping("exportReceiveAndPayMerchantlist")
@SystemControllerLog(description = "账单管理-导出应收、承付商户列表")
@ApiOperation("导出应收、承付商户列表")
public void exportReceiveAndPayMerchantlist(@ModelAttribute WxBillAll wxBillAll,HttpServletRequest request, HttpServletResponse response) {
logger.debug("[" + getIpAddr() + "] WxBillAllController::exportReceiveAndPayMerchantlist");
if (null == wxBillAll) {
wxBillAll = new WxBillAll();
}
wxBillAll.setTenantId(getTenantId());
wxBillAllService.exportReceiveAndPayBillAsPage(wxBillAll, request,response);
}


@ApiOperation("导出欠缴商户列表")
@GetMapping("/exportOweMerchantlist")
@SystemControllerLog(description = "费用收缴数据-欠缴商户列表-导出")


+ 27
- 0
mallinkService/src/main/java/com/iformall/domain/vo/ReceivedAndPayVo.java Просмотреть файл

@@ -0,0 +1,27 @@
package com.iformall.domain.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;



@Data
public class ReceivedAndPayVo {

@Excel(name="商户名",width = 20,orderNum = "1")
private String name;
@Excel(name="商铺号",width = 20,orderNum = "2")
private String shopNumber;
@Excel(name="商铺类型",width = 20,orderNum = "3")
private String shopType;
@Excel(name="负责人",width = 20,orderNum = "4")
private String linkPerson;
@Excel(name="负责人电话",width = 20,orderNum = "5")
private String linkPhone;
@Excel(name="应收总额(元)",width = 20,orderNum = "6")
private String receivePay;
@Excel(name="承付总额(元)",width = 20,orderNum = "7")
private String payOut;


}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillAllService.java Просмотреть файл

@@ -56,6 +56,7 @@ public interface WxBillAllService {
*/
Map<String, Object> getReceiveAndPayBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize);

void exportReceiveAndPayBillAsPage(WxBillAll record, HttpServletRequest request, HttpServletResponse response);

void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response);



+ 26
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -1535,9 +1535,13 @@ public class WxBillAllServiceImpl implements WxBillAllService {
pageInfo.getList().stream().forEach(e ->{
if(e.get("receivePay")==null){
e.put("receivePay",0);
}else if(e.get("payOut")==null){
}
if(e.get("payOut")==null){
e.put("payOut",0);
}
BigDecimal r = new BigDecimal(e.get("receivePay")==null?"0":e.get("receivePay").toString());
BigDecimal p = new BigDecimal(e.get("payOut")==null?"0":e.get("payOut").toString());
e.put("balance",r.subtract(p));
});
result.put("pageInfo", pageInfo);
return result;
@@ -1578,6 +1582,27 @@ public class WxBillAllServiceImpl implements WxBillAllService {
excelService.exportExcel(list, null, name, OweMerchantVo.class, name + ".xlsx", response, false);
}

@Override
public void exportReceiveAndPayBillAsPage(WxBillAll record, HttpServletRequest request, HttpServletResponse response) {
List<Map<String, Object>> data = wxBillAllMapper.getReceiveAndPayBillAsPage(record);
List<WaitMerchantVo> list = new ArrayList<>();
for (Map<String, Object> map : data) {
WaitMerchantVo oweMerchantVo = new WaitMerchantVo();
oweMerchantVo.setLinkPerson((String) map.get("manager"));
oweMerchantVo.setName((String) map.get("merchantName"));
oweMerchantVo.setLinkPhone((String) map.get("managerPhone"));

oweMerchantVo.setRentReceivePay(new BigDecimal(subZeroAndDot(map.get("rentReceivePay").toString())));
oweMerchantVo.setPropertyReceivePay(new BigDecimal(subZeroAndDot(map.get("propertyReceivePay").toString())));
oweMerchantVo.setDepositReceivePay(new BigDecimal(subZeroAndDot(map.get("depositReceivePay").toString())));
oweMerchantVo.setOtherReceivePay(new BigDecimal(subZeroAndDot(map.get("otherReceivePay").toString())));
oweMerchantVo.setTotalReceivePay(new BigDecimal(subZeroAndDot(map.get("totalReceivePay").toString())));
list.add(oweMerchantVo);
}
String name = "商户列表";
excelService.exportExcel(list, null, name, ReceivedAndPayVo.class, name + ".xlsx", response, false);
}

@Override
public void exportWaitMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response) {
List<Map<String, Object>> data = wxBillAllMapper.getOweBillAsPage(record);


Загрузка…
Отмена
Сохранить