Commit 54fe956a by 周晓航

修改 基础服务需要的参数名

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 7f857434
......@@ -92,7 +92,7 @@ public class OrderSdkAdapter {
}
if (Objects.nonNull(otherParamDTO)) {
orderRequest.setDispatchType(otherParamDTO.getDispatchType());
orderRequest.setSemiAutoDispathTime(otherParamDTO.getSemiAutoDispathTime());
orderRequest.setDispatchTimeout(otherParamDTO.getDispatchTimeout());
}
return orderRequest;
}
......
......@@ -18,5 +18,5 @@ public class OtherParamDTO {
/**
* 半自动派单时间 (分钟)
*/
private Integer semiAutoDispathTime;
private Integer dispatchTimeout;
}
......@@ -73,5 +73,5 @@ public class BaseQueryOrderRequest extends BaseConfig {
/**
* 半自动派单时间 (分钟)
*/
private Integer semiAutoDispathTime;
private Integer dispatchTimeout;
}
......@@ -918,7 +918,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
request.setOrderCode(baseQueryOrderRequest.getOrderId());
request.setOperator(baseQueryOrderRequest.getOperator());
request.setDispatchType(baseQueryOrderRequest.getDispatchType());
request.setSemiAutoDispathTime(baseQueryOrderRequest.getSemiAutoDispathTime());
request.setDispatchTimeout(baseQueryOrderRequest.getDispatchTimeout());
// 引入门店基础服务 查询自动制作完成配置时间
setTimeout(baseQueryOrderRequest,request);
com.freemud.application.sdk.api.ordercenter.response.OrderBaseResp response = orderSdkService.acceptOrder(request, baseQueryOrderRequest.getTrackingNo());
......
......@@ -72,5 +72,5 @@ public class OrderManagerRequest {
/**
* 半自动派单时间 (分钟)
*/
private Integer semiAutoDispathTime;
private Integer dispatchTimeout;
}
......@@ -210,20 +210,20 @@ public class DeliveryHandle {
* @param dispatchConfig
* @return
*/
public Integer getSemiAutoDispathTime(List<DispatchConfig> dispatchConfig) {
public Integer getDispatchTimeout(List<DispatchConfig> dispatchConfig) {
Integer rest = -1;
if (CollectionUtils.isNotEmpty(dispatchConfig)) {
Date currentDate = new Date();
Integer semiAutoDispathTime = this.getSemiAutoDispathTimeHandle(currentDate, dispatchConfig, DispatchConfig.DATETYPE_TWO);
if (semiAutoDispathTime != null) {
return semiAutoDispathTime;
Integer dispatchTimeout = this.getDispatchTimeoutHandle(currentDate, dispatchConfig, DispatchConfig.DATETYPE_TWO);
if (dispatchTimeout != null) {
return dispatchTimeout;
}
int weekDay = DateUtil.getWeekDay(currentDate);
// 是否命中 工作日
boolean isWorkDay = weekDay != 6 && weekDay != 0;
semiAutoDispathTime = this.getSemiAutoDispathTimeHandle(currentDate, dispatchConfig, (isWorkDay ? DispatchConfig.DATETYPE_ZERO : DispatchConfig.DATETYPE_ONE));
if (semiAutoDispathTime != null) {
return semiAutoDispathTime;
dispatchTimeout = this.getDispatchTimeoutHandle(currentDate, dispatchConfig, (isWorkDay ? DispatchConfig.DATETYPE_ZERO : DispatchConfig.DATETYPE_ONE));
if (dispatchTimeout != null) {
return dispatchTimeout;
}
}
return rest;
......@@ -276,7 +276,7 @@ public class DeliveryHandle {
* @param dateType
* @return null 表示没有配置
*/
private Integer getSemiAutoDispathTimeHandle(Date currentDate, List<DispatchConfig> dispatchConfig, int dateType) {
private Integer getDispatchTimeoutHandle(Date currentDate, List<DispatchConfig> dispatchConfig, int dateType) {
List<DispatchConfig> activityDayConfig = dispatchConfig.stream().filter(d -> d.getDateType() == dateType).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(activityDayConfig)) {
for (DispatchConfig d : activityDayConfig) {
......
......@@ -74,7 +74,7 @@ public class SaasOrderHandle {
//订单接单
OtherParamDTO dto = new OtherParamDTO();
dto.setDispatchType(request.getDispatchType());
dto.setSemiAutoDispathTime(request.getSemiAutoDispathTime());
dto.setDispatchTimeout(request.getDispatchTimeout());
BaseQueryOrderRequest orderConfirmRequest = orderSdkAdapter.getOrderConfirmRequest(request.getOperator(), orderBean, dto);
orderSdkAdapter.convert2wmDeliveryTimeOut(orderConfirmRequest,this.wmDeliveryTimeOut);
......
......@@ -109,7 +109,7 @@ public class SaasOrderMangerServiceImpl implements OrderManagerService {
ExpandFieldsDTO expandFields = bizVO.getBusinessInfo().getExpandFields();
request.setDispatchType(expandFields.getDispatchType());
// fisherman 半自动派单时间获取
request.setSemiAutoDispathTime(deliveryHandle.getSemiAutoDispathTime(expandFields.getDispatchConfig()));
request.setDispatchTimeout(deliveryHandle.getDispatchTimeout(expandFields.getDispatchConfig()));
}
}
// 订单接单
......
......@@ -35,5 +35,5 @@ public class POSOrderOperationBaseReq {
/**
* 半自动派单时间 (分钟)
*/
private Integer semiAutoDispathTime;
private Integer dispatchTimeout;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment