|
@@ -165,7 +165,8 @@ public class PurchaseFlow extends FlowDelegate {
|
|
|
SampleProduct sampleProduct = sampleProductService.getById(p.getDataResourceId());
|
|
|
BigDecimal expendQuantity = sampleProduct.getExpendQuantity().subtract(p.getCount());
|
|
|
if (expendQuantity.compareTo(BigDecimal.ZERO) < 1) {//小于0不让继续执行
|
|
|
- throw new ServiceException("采购数量不得大于合同剩余采购数量");
|
|
|
+// throw new ServiceException("采购数量不得大于合同剩余采购数量");
|
|
|
+ expendQuantity = BigDecimal.ZERO;
|
|
|
}
|
|
|
sampleProduct.setExpendQuantity(expendQuantity);
|
|
|
upSampleProduct.add(sampleProduct);
|