|
@@ -145,6 +145,9 @@ public class WebsitPartsRetLogic {
|
|
|
websitSales.setRetAmount(websitSales.getRetAmount()
|
|
|
.add(websitPartsRetItem.getRefundAmount()));
|
|
|
|
|
|
+ if (websitSales.getRetAmount().doubleValue() > websitSales.getTotalAmount().doubleValue())
|
|
|
+ throw new RemoteServiceException(websitPartsRetItem.getGoodsName() + "超过了销售金额");
|
|
|
+
|
|
|
websitSales.updateById();
|
|
|
if (websitPartsRetItem.getRefundAmount() != null)
|
|
|
totalRefundAmount = totalRefundAmount.add(websitPartsRetItem.getRefundAmount());
|
|
@@ -240,6 +243,9 @@ public class WebsitPartsRetLogic {
|
|
|
websitSales.setRetAmount(websitSales.getRetAmount()
|
|
|
.subtract(websitPartsRetItem.getRefundAmount()));
|
|
|
|
|
|
+ if (websitSales.getRetAmount().doubleValue() > websitSales.getTotalAmount().doubleValue())
|
|
|
+ throw new RemoteServiceException(websitPartsRetItem.getGoodsName() + "超过了销售金额");
|
|
|
+
|
|
|
|
|
|
websitSales.updateById();
|
|
|
|