Commit 2bb309f0 authored by 332784038@qq.com's avatar 332784038@qq.com

新建订单为草稿订单时,重新编辑订单后,订单归属业务经理值为空的bug修复

parent a7d5f3d9
...@@ -634,4 +634,10 @@ public class OrderDO extends BaseDO { ...@@ -634,4 +634,10 @@ public class OrderDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private Boolean isChargeCustomer; private Boolean isChargeCustomer;
@ApiModelProperty(value = "是否草稿订单变更")
@TableField(exist = false)
private Boolean isChargeDraft = Boolean.FALSE;
} }
...@@ -1469,6 +1469,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -1469,6 +1469,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if (Objects.isNull(oldOrderDO)) { if (Objects.isNull(oldOrderDO)) {
throw exception(ORDER_NOT_EXISTS); throw exception(ORDER_NOT_EXISTS);
} }
if (oldOrderDO.getOrderNo().contains("DRAFT")){
// 原单为草稿订单
updateObj.setIsChargeDraft(true);
}
// 避免并发操作导致的订单编号覆盖,因订单编号为后台生成,所以订单编号更新以旧数据和新生成的为准,不使用前端传参参数 // 避免并发操作导致的订单编号覆盖,因订单编号为后台生成,所以订单编号更新以旧数据和新生成的为准,不使用前端传参参数
updateObj.setOrderNo(oldOrderDO.getOrderNo()); updateObj.setOrderNo(oldOrderDO.getOrderNo());
boolean isResetOrderNo = Boolean.FALSE; boolean isResetOrderNo = Boolean.FALSE;
...@@ -3043,7 +3047,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -3043,7 +3047,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO); orderConsigneeDO);
// 更新所属客户经理(业务员) // 更新所属客户经理(业务员)
if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus()) if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus())
&& Objects.nonNull(updateObj.getIsChargeCustomer()) && updateObj.getIsChargeCustomer()) { && ((Objects.nonNull(updateObj.getIsChargeCustomer()) && updateObj.getIsChargeCustomer())
|| (Objects.nonNull(updateObj.getIsChargeDraft()) && updateObj.getIsChargeDraft()))) {
addOrderCustomerService(updateObj, customerType); addOrderCustomerService(updateObj, customerType);
} }
} }
...@@ -3280,7 +3285,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -3280,7 +3285,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 更新所属客户经理(业务员) // 更新所属客户经理(业务员)
if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus()) if (!OrderStatusEnum.DRAFT.getValue().equals(updateObj.getStatus())
&& Objects.nonNull(updateObj.getIsChargeCustomer()) && updateObj.getIsChargeCustomer()) { && ((Objects.nonNull(updateObj.getIsChargeCustomer()) && updateObj.getIsChargeCustomer())
|| (Objects.nonNull(updateObj.getIsChargeDraft()) && updateObj.getIsChargeDraft()))) {
addOrderCustomerService(updateObj, customerType); addOrderCustomerService(updateObj, customerType);
} }
} }
......
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