|
|
|
@ -483,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 CustomerException("配送日期必选且时间不超过一个月"); |
|
|
|
|
throw new CustomerException(5000, "配送日期必选且时间不超过一个月"); |
|
|
|
|
} |
|
|
|
|
} 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 CustomerException("签收日期必选且时间不超过一个月"); |
|
|
|
|
throw new CustomerException(5000, "签收日期必选且时间不超过一个月"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
throw new CustomerException("导出时配送日期必填"); |
|
|
|
|
throw new CustomerException(5000, "导出时配送日期必填"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -503,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 CustomerException("配送日期必选且时间不超过7天"); |
|
|
|
|
throw new CustomerException(5000, "配送日期必选且时间不超过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 CustomerException("签收日期必选且时间不超过7天 "); |
|
|
|
|
throw new CustomerException(5000, "签收日期必选且时间不超过7天 "); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
throw new CustomerException("导出时配送日期必填"); |
|
|
|
|
throw new CustomerException(5000, "导出时配送日期必填"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|