diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml index 658c78f74..265fb13bd 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml @@ -521,7 +521,7 @@ obj.reservation_code reservation_code, obj.reservation_date task_time, dpl.warehouse warehouse_name, - dpl.warehouse warehouse_id, + dpl.warehouse_id warehouse_id, CASE WHEN obj.delivery_type = 1 THEN '商配' diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java index f9a4ecefb..4526a1dff 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java @@ -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 zeroPage = reportDeliverMapeer.getDetailsZeroPage(page, queryWrapper);