Commit e5c1b062 authored by 332784038@qq.com's avatar 332784038@qq.com

订单复制部分业务代码提交

parent 5457e14c
......@@ -30,6 +30,8 @@ import java.util.List;
public interface OrderService extends IService<OrderDO> {
void updateOrderSalesmanId(Long orderId,Long salesman_id);
/**
* 创建订单
*
......@@ -379,4 +381,15 @@ public interface OrderService extends IService<OrderDO> {
void updateOrderCustomerAndSalesmanId(Long customerId, Long salesmanId, Long orderId);
/**
* copy订单
*
* @param copyOrderId 复制的订单id
* @param memberUserDO 会员信息
* @return 编号
*/
Long copyOrder(Long copyOrderId,MemberUserDO memberUserDO);
}
......@@ -6201,4 +6201,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderMapper.updateOrderCustomerAndSalesmanId(customerId, salesmanId, orderId);
}
@Override
public Long copyOrder(Long copyOrderId, MemberUserDO memberUserDO) {
OrderDO orderDO = orderMapper.selectById(copyOrderId);
// 发货人信息
OrderConsignorDO orderConsignorDO = orderConsignorService.getOne(new LambdaQueryWrapper<OrderConsignorDO>().eq(OrderConsignorDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderConsignorDO::getId).last("limit 1"));
// 收货人信息
OrderConsigneeDO orderConsigneeDO = orderConsigneeService.getOne(new LambdaQueryWrapper<OrderConsigneeDO>().eq(OrderConsigneeDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderConsigneeDO::getId).last("limit 1"));
// 控货信息
OrderCargoControlDO orderCargoControlDO = orderCargoControlMapper.selectOne(new LambdaQueryWrapper<OrderCargoControlDO>().eq(OrderCargoControlDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderCargoControlDO::getId).last("limit 1"));
// 始发地
OrderDepartureDO orderDepartureDO = orderDepartureService.getOne(new LambdaQueryWrapper<OrderDepartureDO>().eq(OrderDepartureDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderDepartureDO::getId).last("limit 1"));
// 目的地
OrderObjectiveDO orderObjectiveDO = orderObjectiveService.getOne(new LambdaQueryWrapper<OrderObjectiveDO>().eq(OrderObjectiveDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderObjectiveDO::getId).last("limit 1"));
// 商品信息
List<OrderItemDO> itemDOList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItemDO>().eq(OrderItemDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderItemDO::getOrderItemId));
// TODO 这里是否需要重新判断业绩归属
// TODO 如果是web端复制的,发货人不是当前登陆会员,是否要改为当前登陆的会员管理客户信息
return 0L;
}
}
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