|
|
|
@ -40,6 +40,7 @@ import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -482,16 +483,16 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) { |
|
|
|
|
boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 30; |
|
|
|
|
if (!withinOneMonth) { |
|
|
|
|
throw new ServiceException("配送日期必选且时间不超过一个月"); |
|
|
|
|
throw new CustomerException("配送日期必选且时间不超过一个月"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) { |
|
|
|
|
boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 30; |
|
|
|
|
if (!withinOneMonth) { |
|
|
|
|
throw new ServiceException("签收日期必选且时间不超过一个月"); |
|
|
|
|
throw new CustomerException("签收日期必选且时间不超过一个月"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
throw new ServiceException("导出时配送日期必填"); |
|
|
|
|
throw new CustomerException("导出时配送日期必填"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -502,16 +503,16 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
|
|
|
|
|
if (ObjectUtil.isNotEmpty(query.getStartTaskTime()) || ObjectUtil.isNotEmpty(query.getEndTaskTime())) { |
|
|
|
|
boolean withinOneMonth = DateUtil.between(query.getStartTaskTime(), query.getEndTaskTime(), DateUnit.DAY) <= 7; |
|
|
|
|
if (!withinOneMonth) { |
|
|
|
|
throw new ServiceException("配送日期必选且时间不超过7天"); |
|
|
|
|
throw new CustomerException("配送日期必选且时间不超过7天"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (ObjectUtil.isNotEmpty(query.getStartSjsigningTime()) || ObjectUtil.isNotEmpty(query.getEndSjsigningTime())) { |
|
|
|
|
boolean withinOneMonth = DateUtil.between(query.getStartSjsigningTime(), query.getEndSjsigningTime(), DateUnit.DAY) <= 7; |
|
|
|
|
if (!withinOneMonth) { |
|
|
|
|
throw new ServiceException("签收日期必选且时间不超过7天 "); |
|
|
|
|
throw new CustomerException("签收日期必选且时间不超过7天 "); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
throw new ServiceException("导出时配送日期必填"); |
|
|
|
|
throw new CustomerException("导出时配送日期必填"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|