i皖送推送修改
This commit is contained in:
parent
2460c18a01
commit
80dc08d54e
|
|
@ -11,7 +11,6 @@ import com.bonus.material.push.service.IwsCostPushService;
|
||||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
import com.bonus.material.settlement.service.impl.SltAgreementInfoServiceImpl;
|
import com.bonus.material.settlement.service.impl.SltAgreementInfoServiceImpl;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -19,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -98,8 +97,23 @@ public class IwsCostPushController extends BaseController {
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 计算统计信息
|
||||||
|
BigDecimal totalLeaseMoney = exportVoList.stream().map(IwsCostPushExportVo::getLeaseMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal totalRepairMoney = exportVoList.stream().map(IwsCostPushExportVo::getRepairMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal totalLostMoney = exportVoList.stream().map(IwsCostPushExportVo::getLostMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
BigDecimal totalScrapMoney = exportVoList.stream().map(IwsCostPushExportVo::getScrapMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
// 创建统计行
|
||||||
|
IwsCostPushExportVo summaryVo = new IwsCostPushExportVo();
|
||||||
|
summaryVo.setMonth("合计租赁费用");
|
||||||
|
summaryVo.setLeaseMoney(totalLeaseMoney);
|
||||||
|
|
||||||
|
// 将统计行添加到数据列表中
|
||||||
|
exportVoList.add(summaryVo);
|
||||||
|
|
||||||
// 导出Excel
|
// 导出Excel
|
||||||
new ExcelUtil<>(IwsCostPushExportVo.class).exportExcel(response, exportVoList, "费用推送审核表");
|
ExcelUtil<IwsCostPushExportVo> excelUtil = new ExcelUtil<>(IwsCostPushExportVo.class);
|
||||||
|
excelUtil.exportExcel(response, exportVoList, "费用推送审核表");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 记录异常并抛出自定义异常
|
// 记录异常并抛出自定义异常
|
||||||
System.err.println("导出异常 = " + e.getMessage());
|
System.err.println("导出异常 = " + e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ public class IwsCostPushExportVo implements Serializable {
|
||||||
@Excel(name = "是否推送", readConverterExp = "0=未推送,1=已推送")
|
@Excel(name = "是否推送", readConverterExp = "0=未推送,1=已推送")
|
||||||
private String isPush;
|
private String isPush;
|
||||||
|
|
||||||
private String money;
|
private Double money;
|
||||||
|
|
||||||
private String year;
|
private String year;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue