|
@@ -165,9 +165,9 @@ 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) {
|
|
|
-// throw new RemoteServiceException(workerStock.getGoodsName() + ":" + PartsAttrEnum.valueOf(this.partsAttr).getName() + "结存库存不能少于0");
|
|
|
-// }
|
|
|
+ if (closeQty.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
+ throw new RemoteServiceException(workerStock.getGoodsName() + ":" + this.partsAttr + "结存库存不能少于0");
|
|
|
+ }
|
|
|
// 注入三级帐
|
|
|
BeanUtils.copyProperties(this, workerStockAcc);
|
|
|
workerStockAcc.setQty(qty)
|