Commit 4112dae5 authored by zhengyi's avatar zhengyi

订单控货业务修改补充

Signed-off-by: default avatarzhengyi <landuo321@aliyun.com>
parent 6898f69f
-- 2024-08-24 订单控货现在参数控货订单锁定天数
alter table `ecw_order`
add column `lock_consignee_day` int default 0 COMMENT '锁定收货人天数';
alter table `ecw_order`
add column `lock_consignee_time` datetime default NULL COMMENT '放货锁定收货人到期时间';
alter table `ecw_order`
......
......@@ -531,6 +531,8 @@ public class OrderDO extends BaseDO {
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date lockConsigneeTime;
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
//
// @ApiModelProperty(value = "拆单子订单是否变更运输方式")
// private Boolean splitChangeTransport = false;
......
......@@ -124,6 +124,9 @@ public class OrderCargoControlReleaseInfoDto {
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date lockConsigneeTime;
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
@ApiModelProperty(value = "放货详情记录列表")
private List<OrderCargoControlPickBackVO> cargoControlPickBackVOList;
......
......@@ -1458,9 +1458,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
// TODO 这里更新订单卸柜/到仓时间,同时对控货订单的限制修改收货人锁定到期时间进行更新,当前默认使用14D处理,待仓库业务添加该时间配置在做处理
Date lockConsigneeTime = null;
if (orderDO.getIsCargoControl()){
if (orderDO.getIsCargoControl()) {
// TODO 获取卸柜/到仓业务时间的锁定收货人时间当天的结束时间
lockConsigneeTime = DateUtil.endOfDay(DateUtil.offsetDay(businessTime, 14));
lockConsigneeTime = DateUtil.endOfDay(DateUtil.offsetDay(businessTime, Objects.isNull(orderDO.getLockConsigneeDay()) ? 14 : orderDO.getLockConsigneeDay()));
}
orderMapper.update(null, new LambdaUpdateWrapper<OrderDO>()
.set(OrderDO::getUnloadTime, businessTime)
......@@ -1600,9 +1600,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
}
// TODO 这里更新订单卸柜/到仓时间,同时对控货订单的限制修改收货人锁定到期时间进行更新,当前默认使用14D处理,待仓库业务添加该时间配置在做处理
Date lockConsigneeTime = null;
if (orderDO.getIsCargoControl()){
if (orderDO.getIsCargoControl()) {
// TODO 获取卸柜/到仓业务时间的锁定收货人时间当天的结束时间
lockConsigneeTime = DateUtil.endOfDay(DateUtil.offsetDay(businessTime, 14));
lockConsigneeTime = DateUtil.endOfDay(DateUtil.offsetDay(businessTime, Objects.isNull(orderDO.getLockConsigneeDay()) ? 14 : orderDO.getLockConsigneeDay()));
}
orderMapper.update(null, new LambdaUpdateWrapper<OrderDO>()
.set(OrderDO::getUnloadTime, businessTime)
......
......@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Comparator;
......@@ -327,8 +328,20 @@ public class OrderBackPageVO {
private Date loadTime;
@ApiModelProperty(value = "已卸柜/已到仓时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date unloadTime;
@ApiModelProperty(value = "是否限制修改收货人")
private Boolean isLimitUpdateConsignee;
@ApiModelProperty(value = "放货锁定收货人到期时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date lockConsigneeTime;
@ApiModelProperty(value = "放货锁定收货人天数")
private Integer lockConsigneeDay;
/**
* 渠道名称
......
......@@ -2989,7 +2989,6 @@
if(#{query.customerDetailId} is not null and #{query.customerDetailId} > 0, (select min(owi.`in_time`) from
ecw_order_warehouse_in owi where owi.deleted = 0 and owi.order_id = o.order_id ), o.rucang_time ) as
rucang_time,
o.unload_time,
o.cost,
o.parent_number,
o.parent_order_id,
......@@ -3025,6 +3024,9 @@
o.is_exception,
o.create_time,
o.load_time,
o.unload_time,
o.is_limit_update_consignee,
o.lock_consignee_time,
(select su.nickname from system_user su where su.deleted = 0 and su.id = o.salesman_id) as salesman_name,
(select min(wi.`in_time`) from ecw_order_warehouse_in wi where wi.deleted = 0 and wi.order_id = o.order_id ) as
in_time,
......@@ -3114,6 +3116,9 @@
o.is_exception,
o.create_time,
o.load_time,
o.unload_time,
o.is_limit_update_consignee,
o.lock_consignee_time,
(select su.nickname from system_user su where su.deleted = 0 and su.id = o.salesman_id) as salesman_name,
(select min(wi.`in_time`) from ecw_order_warehouse_in wi where wi.deleted = 0 and wi.order_id = o.order_id ) as
in_time,
......
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