demand: 计算时效bug修复
committer: heyu
This commit is contained in:
parent
44a4e4dee7
commit
e2329974b0
@ -1460,7 +1460,7 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
// 23:59:59未签收,且在emis_waybill_problem_info表内的所有运单信息
|
// 23:59:59未签收,且在emis_waybill_problem_info表内的所有运单信息
|
||||||
// 重新计算并更新预估到达时间
|
// 重新计算并更新预估到达时间
|
||||||
String beginDate = "2025-08-01 00:00:00";
|
String beginDate = "2025-08-01 00:00:00";
|
||||||
String endDate = "2025-09-03 23:59:59";
|
String endDate = "2025-09-05 23:59:59";
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
EmisWaybill queryWaybill = new EmisWaybill();
|
EmisWaybill queryWaybill = new EmisWaybill();
|
||||||
|
|||||||
@ -4104,13 +4104,15 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算预估到达时间,根据产品时效来计算
|
* 计算预估到达时间,根据产品时效来计算
|
||||||
|
*
|
||||||
* @param sendDate 开单时间
|
* @param sendDate 开单时间
|
||||||
* @param prodCode
|
* @param prodCode
|
||||||
* @param receiveCountry
|
* @param receiveCountry
|
||||||
* @param sendCountry
|
* @param sendCountry
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Date getEstimateDate(Date sendDate,String prodCode,String receiveCountry,String sendCountry,Integer otherAddDay) {
|
public Date getEstimateDate(Date sendDate, String prodCode, String receiveCountry, String sendCountry,
|
||||||
|
Integer otherAddDay) {
|
||||||
Date estDate = null;
|
Date estDate = null;
|
||||||
|
|
||||||
if (otherAddDay == null) {
|
if (otherAddDay == null) {
|
||||||
@ -4147,15 +4149,16 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
// 1+1+ 5+0-1+2+0
|
// 1+1+ 5+0-1+2+0
|
||||||
int totalDays = (emisTransProduct.getMaxAging() + otherAddDay - 1) + weekDays + notCaclDays;
|
int totalDays = (emisTransProduct.getMaxAging() + otherAddDay - 1) + weekDays + notCaclDays;
|
||||||
log.info("计算预估到达时间:[maxAging="+emisTransProduct.getMaxAging()+",weekDays="+weekDays+",notCaclDays="+notCaclDays);
|
log.info("计算预估到达时间:[maxAging=" + emisTransProduct.getMaxAging() + ",weekDays=" + weekDays + ",notCaclDays="
|
||||||
|
+ notCaclDays);
|
||||||
// 预估达到时间
|
// 预估达到时间
|
||||||
Date estimateDate = DateUtils.addDays(startDate, totalDays);
|
Date estimateDate = DateUtils.addDays(startDate, totalDays);
|
||||||
|
|
||||||
// 判断预估到达时间是否为周末,如果是周末则往后加一天
|
// 判断预估到达时间是否为周日,如果是周日则往后加一天
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
cal.setTime(estimateDate);
|
cal.setTime(estimateDate);
|
||||||
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
|
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
|
||||||
if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) {
|
if (dayOfWeek == Calendar.SUNDAY) {
|
||||||
estimateDate = DateUtils.addDays(estimateDate, 1);
|
estimateDate = DateUtils.addDays(estimateDate, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user