|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.logpm.report.service.impl; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.convert.Convert; |
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
@ -58,7 +59,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public IPage<ReportDevilerVO> deliveryTrainPage(ReportDevilerVO vo, ReportDevilerQuery query) { |
|
|
|
|
// 校验时间
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)){ |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
IPage<ReportDevilerVO> page = Condition.getPage(query); |
|
|
|
@ -94,7 +95,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public void exportTrain(HttpServletResponse response, ReportDevilerVO vo, ReportDevilerQuery query) { |
|
|
|
|
// 添加时间校验
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)){ |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
QueryWrapper<ReportDevilerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDevilerVO.class); |
|
|
|
@ -107,7 +108,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public IPage<ReportCustomerVO> customerPage(ReportCustomerVO vo, ReportCustomerQuery query) { |
|
|
|
|
// 添加时间校验
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)){ |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
// 构建前端查询参数
|
|
|
|
@ -142,7 +143,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public void exportCustomer(HttpServletResponse response, ReportCustomerVO vo, ReportCustomerQuery query) { |
|
|
|
|
// 添加时间校验
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
QueryWrapper<ReportCustomerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportCustomerVO.class); |
|
|
|
@ -155,7 +156,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public IPage<ReportDetailVO> detailsPage(ReportDetailVO vo, DevilerDetailsQuery query) { |
|
|
|
|
// 添加时间校验
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
Integer current = query.getCurrent(); |
|
|
|
@ -175,7 +176,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
int pageSize = current * size; |
|
|
|
|
if (detailsPage.size() < pageSize) { |
|
|
|
|
// 剩余需要查询的数量
|
|
|
|
|
int zeroTotal = pageSize - detailsPage.size(); |
|
|
|
|
int zeroTotal = Convert.toInt(pageSize - total); |
|
|
|
|
double div = NumberUtil.div(zeroTotal, size.doubleValue()); |
|
|
|
|
long zeroCurrent = (int) Math.ceil(div) + 1; |
|
|
|
|
int zeroSize = zeroTotal % size; |
|
|
|
@ -213,7 +214,7 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
@Override |
|
|
|
|
public void exportDetails(HttpServletResponse response, ReportDetailVO vo, DevilerDetailsQuery query) { |
|
|
|
|
// 添加时间校验
|
|
|
|
|
if(ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
if (ReportUtil.areAllPropertiesEmpty(vo)) { |
|
|
|
|
ReportUtil.dateIsWithinOneMonth(vo.getTaskTime(), query.getStartTaskTime(), query.getEndTaskTime(), "配送日期"); |
|
|
|
|
} |
|
|
|
|
QueryWrapper<ReportDetailVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDetailVO.class); |
|
|
|
|