Commit f84e6c70 authored by zhangfeng's avatar zhangfeng

订单V值触发修改

parent 43b48470
...@@ -175,9 +175,9 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy { ...@@ -175,9 +175,9 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
if (!isOrderEntryValid(extraInfo.getOrderEntry(), isBackendOrder)) { if (!isOrderEntryValid(extraInfo.getOrderEntry(), isBackendOrder)) {
return null; return null;
} }
// 如果是后台下单,重新获取用户ID // 如果是后台下单,重新获取发货人用户ID
if (isBackendOrder) { if (isBackendOrder) {
userId = getCustomerMemberId(order.getCustomerId()); userId = getCustomerMemberId(order.getOrderConsignorDO().getCustomerId());
if (userId == null) { if (userId == null) {
userId = 0L; userId = 0L;
} }
......
package cn.iocoder.boot.module.order.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 订单发货人信息 Response VO
* @author 系统管理员
*/
@Data
@ApiModel("管理后台 - 订单发货人信息 Response VO")
public class OrderConsignorApiDO {
@ApiModelProperty(value = "主键ID", required = true)
private Long id;
@ApiModelProperty(value = "下单用户id")
private Long relationId;
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "发货人姓名")
private String name;
@ApiModelProperty(value = "发货人姓名(英文)")
private String nameEn;
@ApiModelProperty(value = "", required = true)
private Long customerId;
@ApiModelProperty(value = "", required = true)
private Long customerContactsId;
}
...@@ -44,18 +44,6 @@ public class OrderRespDTO { ...@@ -44,18 +44,6 @@ public class OrderRespDTO {
* 下单会员id * 下单会员id
*/ */
private Long userId; private Long userId;
/**
* 客户经理ID
*/
private Long salesmanId;
/**
* 部门ID
*/
private Long deptId;
/**
* 唛头
*/
private String marks;
/** /**
* 订单状态详情见字典 * 订单状态详情见字典
...@@ -96,165 +84,11 @@ public class OrderRespDTO { ...@@ -96,165 +84,11 @@ public class OrderRespDTO {
* 是否被删掉 1 删掉;0正常 * 是否被删掉 1 删掉;0正常
*/ */
private Boolean isDel; private Boolean isDel;
@ApiModelProperty(value = "代收金额")
private BigDecimal collectionProxy;
@ApiModelProperty(value = "代收货币ID")
private Integer collectionProxyCurrency;
/**
* 是否代收货款收款 0为否 1为是
*/
private Boolean isCollection;
/**
* 重货体积
*/
private BigDecimal wVolume;
/**
* 泡货重量
*/
private BigDecimal vWeight;
/**
* 原应收重货体积
*/
private BigDecimal orgWVolume;
/**
* 原应收泡货重量
*/
private BigDecimal orgVWeight;
@ApiModelProperty(value = "最小计量重量")
private BigDecimal minMeteringWeight = BigDecimal.ZERO;
@ApiModelProperty(value = "最小计量体积")
private BigDecimal minMeteringVolume = BigDecimal.ZERO;
@ApiModelProperty(value = "最小计量个数")
private BigDecimal minMeteringQuantity = BigDecimal.ZERO;
/**
* 重货标准基数
*/
private BigDecimal weightUnit;
/**
* 泡货标准基数
*/
private BigDecimal volumeUnit;
@ApiModelProperty(value = "原重货标准基数")
private BigDecimal orgWeightUnit;
@ApiModelProperty(value = "原泡货标准基数")
private BigDecimal orgVolumeUnit;
@ApiModelProperty(value = "计算使用的重货标准基数")
private BigDecimal useWeightUnit;
@ApiModelProperty(value = "计算使用的泡货标准基数")
private BigDecimal useVolumeUnit;
/**
* 入仓类型
*/
private Integer warehouseType;
/**
* 备注
*/
private String remarks;
/**
* 调仓始发仓
*/
private Long adjustToStartWarehouseId;
/**
* 调仓目的仓
*/
private Long adjustToDestWarehouseId;
/**
* 目的地调仓始发仓
*/
private Long destAdjustToStartWarehouseId;
/** /**
* 目的地调仓目的仓 * 订单归属客户id
*/
private Long destAdjustToDestWarehouseId;
@ApiModelProperty(value = "入仓数量", required = true)
private Integer sumQuantity;
/**
* 入仓件数
*/
private Integer sumNum;
/**
* 自定义入仓体积
*/
private BigDecimal customSumVolume;
/**
* 入仓体积
*/
private BigDecimal sumVolume;
/**
* 自定义入仓重量
*/
private BigDecimal customSumWeight;
/**
* 入仓重量
*/
private BigDecimal sumWeight;
/**
* 重货比
*/
private BigDecimal weightRatio;
/**
* 发货人的客户id
*/ */
private Long customerId; private Long customerId;
/**
* 完成入仓的入仓体积
*/
private BigDecimal sumVolumeFinishedWarehouseIn;
/**
* 完成入仓的入仓重量
*/
private BigDecimal sumWeightFinishedWarehouseIn;
/**
* 完成入仓的箱/件数
*/
private Integer sumCartonsNumFinishedWarehouseIn;
/**
* 完成入仓的所有箱内总货物数量
*/
private Integer sumQuantityAllFinishedWarehouseIn;
/**
* 上次打包的入仓体积
*/
@ApiModelProperty(value = "上次打包的入仓体积")
private BigDecimal sumVolumePrevPacked;
/**
* 上次打包的入仓重量
*/
@ApiModelProperty(value = "上次打包的入仓重量")
private BigDecimal sumWeightPrevPacked;
/**
* 上次打包的箱/件数
*/
@ApiModelProperty(value = "上次打包的箱数")
private Integer sumCartonsNumPrevPacked;
/**
* 上次打包的所有箱内总货物数量
*/
@ApiModelProperty(value = "上次打包的所有箱内总货物数量")
private Integer sumQuantityAllPrevPacked;
@ApiModelProperty(value = "付款人: 1 发货人 2 收货人 3 自定义") @ApiModelProperty(value = "付款人: 1 发货人 2 收货人 3 自定义")
private Integer drawee; private Integer drawee;
...@@ -264,30 +98,24 @@ public class OrderRespDTO { ...@@ -264,30 +98,24 @@ public class OrderRespDTO {
@ApiModelProperty(value = "打包前入仓重量") @ApiModelProperty(value = "打包前入仓重量")
private BigDecimal weightBeforePack; private BigDecimal weightBeforePack;
@ApiModelProperty(value = "打包后入仓重量") @ApiModelProperty(value = "打包后入仓重量")
private BigDecimal weightAfterPack; private BigDecimal weightAfterPack;
@ApiModelProperty(value = "是否有收货人,1-是,0-否") @ApiModelProperty(value = "是否有收货人,1-是,0-否")
private Boolean hasConsignee = true; private Boolean hasConsignee = true;
@TableField(exist = false)
@ApiModelProperty(value = "目的地信息") @ApiModelProperty(value = "目的地信息")
@NotNull(message = "目的地信息不能为空")
private OrderObjectiveApiDO orderObjectiveDO; private OrderObjectiveApiDO orderObjectiveDO;
@TableField(exist = false) @ApiModelProperty(value = "发货人信息")
private OrderConsignorApiDO orderConsignorDO;
@ApiModelProperty(value = "收货人信息") @ApiModelProperty(value = "收货人信息")
@NotNull(message = "收货人信息不能为空")
private OrderConsigneeApiDO orderConsigneeDO; private OrderConsigneeApiDO orderConsigneeDO;
@TableField(exist = false)
@ApiModelProperty(value = "目的地ID") @ApiModelProperty(value = "目的地ID")
private Long objectiveId; private Long objectiveId;
@TableField(exist = false)
@ApiModelProperty(value = "目的地") @ApiModelProperty(value = "目的地")
private String objectiveName; private String objectiveName;
......
...@@ -2,15 +2,15 @@ package cn.iocoder.yudao.module.order.api; ...@@ -2,15 +2,15 @@ package cn.iocoder.yudao.module.order.api;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.boot.module.order.api.OrderApi; import cn.iocoder.boot.module.order.api.OrderApi;
import cn.iocoder.boot.module.order.api.dto.OrderConsigneeApiDO; import cn.iocoder.boot.module.order.api.dto.*;
import cn.iocoder.boot.module.order.api.dto.OrderItemRespDTO; import cn.iocoder.yudao.module.order.convert.orderConsignor.OrderConsignorConvert;
import cn.iocoder.boot.module.order.api.dto.OrderObjectiveApiDO;
import cn.iocoder.boot.module.order.api.dto.OrderRespDTO;
import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO; import cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignee.OrderConsigneeDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO; import cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO;
import cn.iocoder.yudao.module.order.service.order.OrderConsigneeService; import cn.iocoder.yudao.module.order.service.order.OrderConsigneeService;
import cn.iocoder.yudao.module.order.service.order.OrderConsignorService;
import cn.iocoder.yudao.module.order.service.order.OrderObjectiveService; import cn.iocoder.yudao.module.order.service.order.OrderObjectiveService;
import cn.iocoder.yudao.module.order.service.order.OrderService; import cn.iocoder.yudao.module.order.service.order.OrderService;
import cn.iocoder.yudao.module.order.service.order.impl.OrderItemServiceImpl; import cn.iocoder.yudao.module.order.service.order.impl.OrderItemServiceImpl;
...@@ -21,6 +21,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -21,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -34,6 +35,8 @@ public class OrderApiImpl implements OrderApi { ...@@ -34,6 +35,8 @@ public class OrderApiImpl implements OrderApi {
private OrderConsigneeService orderConsigneeService; private OrderConsigneeService orderConsigneeService;
@Resource @Resource
private OrderItemServiceImpl orderItemService; private OrderItemServiceImpl orderItemService;
@Resource
private OrderConsignorService orderConsignorService;
@Override @Override
public OrderRespDTO getOrder(Long id, String orderNo) { public OrderRespDTO getOrder(Long id, String orderNo) {
...@@ -56,7 +59,14 @@ public class OrderApiImpl implements OrderApi { ...@@ -56,7 +59,14 @@ public class OrderApiImpl implements OrderApi {
BeanUtils.copyProperties(orderObjectiveDO, orderObjectiveApiDO); BeanUtils.copyProperties(orderObjectiveDO, orderObjectiveApiDO);
orderRespDTO.setOrderObjectiveDO(orderObjectiveApiDO); orderRespDTO.setOrderObjectiveDO(orderObjectiveApiDO);
} }
// 设置发货人信息
OrderConsignorDO orderConsignorDO =
orderConsignorService.getOne(new LambdaQueryWrapper<OrderConsignorDO>().eq(OrderConsignorDO::getOrderId, orderDO.getOrderId()).orderByDesc(OrderConsignorDO::getId).last("limit 1"));
if (Objects.nonNull(orderConsignorDO)) {
OrderConsignorApiDO orderConsignorApiDO = new OrderConsignorApiDO();
BeanUtils.copyProperties(orderConsignorDO, orderConsignorApiDO);
orderRespDTO.setOrderConsignorDO(orderConsignorApiDO);
}
// 设置收货人信息 // 设置收货人信息
OrderConsigneeDO orderConsigneeByOrderId = orderConsigneeService.getOrderConsigneeByOrderId(orderDO.getOrderId()); OrderConsigneeDO orderConsigneeByOrderId = orderConsigneeService.getOrderConsigneeByOrderId(orderDO.getOrderId());
if (orderConsigneeByOrderId != null) { if (orderConsigneeByOrderId != null) {
......
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