Browse Source

feat(all): 修改配送明细报表逻辑

dist.1.3.0
zhaoqiaobo 6 months ago
parent
commit
e2ca547436
  1. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml
  2. 11
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

2
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
'商配'

11
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<ReportDetailVO> zeroPage = reportDeliverMapeer.getDetailsZeroPage(page, queryWrapper);

Loading…
Cancel
Save