|
|
@@ -27,9 +27,6 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.trade.purchase.order.enums.OrderTypeEnum;
|
|
|
-import io.seata.core.exception.TransactionException;
|
|
|
-import io.seata.core.model.GlobalStatus;
|
|
|
-import io.seata.core.model.TransactionManager;
|
|
|
import io.seata.spring.annotation.GlobalTransactional;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -1845,7 +1842,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
&& s.getTenantId().equals(SecureUtil.getTenantId())
|
|
|
).findFirst().orElse(null);
|
|
|
if (oneStock == null) {
|
|
|
- throw new SecurityException("撤销失败:未查询到库存信息");
|
|
|
+ throw new SecurityException("编号:"+oneStock.getCode()+"撤销失败:未查询到库存信息");
|
|
|
}
|
|
|
// 原单据的订货数量
|
|
|
BigDecimal orderQuantity = e.getOrderQuantity();
|
|
|
@@ -1856,7 +1853,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
|
|
|
// 判断比较大小
|
|
|
if (orderQuantity.compareTo(lockingQuantity) > 0) {
|
|
|
- throw new SecurityException("撤销失败:原单据的" + oneStock.getCode() + "订货数量大于锁定库存,无法释放 库存");
|
|
|
+ throw new SecurityException("撤销失败:原单据的" + oneStock.getCode() + "订货数量:"+orderQuantity+"大于锁定库存:"+lockingQuantity+",无法释放 库存");
|
|
|
}
|
|
|
// 增加可用库存
|
|
|
oneStock.setSurplusRouteQuantity(surplusRouteQuantity.add(orderQuantity));
|