|
@@ -165,7 +165,7 @@ public class WorkerStockDTO {
|
|
|
}
|
|
|
BigDecimal direct = this.directFlag.equals("ADD") ? BigDecimal.ONE : new BigDecimal("-1");
|
|
|
BigDecimal closeQty = qty.add(this.changeQty.multiply(direct));
|
|
|
- if (closeQty.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
+ if (closeQty.compareTo(BigDecimal.ZERO) < 0 && this.partsAttr.equals(PartsAttrEnum.NEW.getKey())) {
|
|
|
throw new RemoteServiceException(workerStock.getGoodsName() + ":" + this.partsAttr + "结存库存不能少于0");
|
|
|
}
|
|
|
// 注入三级帐
|