|
|
|
@ -172,10 +172,13 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
Long detailsZeroPageCount = reportDeliverMapeer.getDetailsZeroPageCount(queryWrapper); |
|
|
|
|
long allTotal = total + detailsZeroPageCount; |
|
|
|
|
// 包件没数据查零担
|
|
|
|
|
if (detailsPage.size() < size) { |
|
|
|
|
int zeroSize = size - detailsPage.size(); |
|
|
|
|
double div = NumberUtil.div(allTotal, size.doubleValue()); |
|
|
|
|
long zeroCurrent = current - (int) Math.ceil(div) + 1; |
|
|
|
|
int pageSize = current * size; |
|
|
|
|
if (detailsPage.size() < pageSize) { |
|
|
|
|
// 剩余需要查询的数量
|
|
|
|
|
int zeroTotal = pageSize - detailsPage.size(); |
|
|
|
|
double div = NumberUtil.div(zeroTotal, size.doubleValue()); |
|
|
|
|
long zeroCurrent = (int) Math.ceil(div) + 1; |
|
|
|
|
int zeroSize = zeroTotal % size; |
|
|
|
|
page.setCurrent(zeroCurrent); |
|
|
|
|
page.setSize(zeroSize); |
|
|
|
|
List<ReportDetailVO> zeroPage = reportDeliverMapeer.getDetailsZeroPage(page, queryWrapper); |
|
|
|
|