From e2ca54743667eb99c612b95c048dd778ecc84354 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Wed, 10 Jul 2024 10:27:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E9=80=81=E6=98=8E=E7=BB=86=E6=8A=A5=E8=A1=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/report/mapper/ReportDeliverMapper.xml | 2 +- .../report/service/impl/ReportDeliverServiceImpl.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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);