提交 24d93965 authored 作者: 杨启发's avatar 杨启发

Merge branch 'refs/heads/v20.9_settlement_20240805' into dev

package com.clx.performance.vo.pc.owner.settle;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.math.BigDecimal;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class CountOwnerSettlementOwnerDetailVO {
@ApiModelProperty(value="运单数")
private Long orderChildSum;
@ApiModelProperty(value = "装车净重")
private BigDecimal loadNetSum;
@MoneyOutConvert
@ApiModelProperty(value="开票金额")
private BigDecimal invoiceFreightSum;
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ import com.clx.performance.param.pc.owner.PagePendingCarrierSettlementOwnerDetai
import com.clx.performance.service.settle.SettlementOwnerDetailService;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePendingSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.CountOwnerSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.PageOwnerSettlementOwnerDetailVO;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
......@@ -25,10 +26,7 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
......@@ -67,6 +65,13 @@ public class CarrierSettlementOwnerDetailController {
return Result.page(page.getRecords(),page.getTotal(),page.getPages());
}
@ApiOperation(value = "开票管理待开票、已开票列表统计",notes = "<br>By:杨启发")
@GetMapping("/countInvoiceOwnerSettlementOrderDetailList")
public Result<CountOwnerSettlementOwnerDetailVO> countInvoiceOwnerSettlementOrderDetailList(@RequestBody @Validated PageInvoiceOwnerSettlementOwnerDetailParam param) {
CountOwnerSettlementOwnerDetailVO vo = settlementOwnerDetailService.countInvoiceOwnerSettlementOrderDetailList(param);
return Result.ok(vo);
}
@ApiOperation(value = "导出开票管理待开票、已开票",notes = "<br>By:杨启发")
@PostMapping("/exportInvoiceOwnerSettlementOrderDetail")
public void exportInvoiceOwnerSettlementOrderDetail(@RequestBody @Validated PageInvoiceOwnerSettlementOwnerDetailParam param, HttpServletResponse response) throws Exception {
......
......@@ -30,13 +30,9 @@ import com.clx.performance.utils.excel.ExcelSheet;
import com.clx.performance.utils.excel.ExcelUtil;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePendingSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.CountOwnerSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.PageOwnerSettlementOwnerDetailVO;
import com.msl.common.exception.ServiceSystemException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
......@@ -44,6 +40,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author liruixin
......@@ -225,6 +226,18 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS
}
@Override
public CountOwnerSettlementOwnerDetailVO countInvoiceOwnerSettlementOrderDetailList(PageInvoiceOwnerSettlementOwnerDetailParam param) {
param.setPage(1);
param.setPageSize(1000000);
IPage<SettlementOwnerDetail> page = settlementOwnerDetailDao.pageInvoiceOwnerSettlementOrderDetailList(param);
CountOwnerSettlementOwnerDetailVO vo = new CountOwnerSettlementOwnerDetailVO();
vo.setOrderChildSum(page.getTotal());
vo.setLoadNetSum(page.getRecords().stream().map(SettlementOwnerDetail::getLoadNet).reduce(BigDecimal.ZERO,BigDecimal::add));
vo.setInvoiceFreightSum(page.getRecords().stream().map(SettlementOwnerDetail::getInvoiceFreight).reduce(BigDecimal.ZERO,BigDecimal::add));
return vo;
}
@Override
public SXSSFWorkbook exportOwnerSettlementOrderDetail(PageOwnerSettlementOwnerDetailParam param) {
param.setPage(1);
......
......@@ -13,6 +13,7 @@ import com.clx.performance.param.pc.owner.PageOwnerSettlementOwnerDetailParam;
import com.clx.performance.param.pc.owner.PagePendingCarrierSettlementOwnerDetailParam;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePendingSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.CountOwnerSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.PageOwnerSettlementOwnerDetailVO;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
......@@ -31,6 +32,8 @@ public interface SettlementOwnerDetailService {
IPage<PageOwnerSettlementOwnerDetailVO> pageInvoiceOwnerSettlementOrderDetailList(PageInvoiceOwnerSettlementOwnerDetailParam param);
CountOwnerSettlementOwnerDetailVO countInvoiceOwnerSettlementOrderDetailList(PageInvoiceOwnerSettlementOwnerDetailParam param);
IPage<CarrierPageSettlementOwnerDetailVO> pageSettlementOwnerDetail(PageCarrierSettlementOwnerDetailParam param);
SXSSFWorkbook exportOwnerSettlementOrderDetail(PageOwnerSettlementOwnerDetailParam param);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论