|
|
@@ -3666,6 +3666,10 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
}
|
|
|
stockOneC.setBalanceQuantityHave(stockOneC.getBalanceQuantityHave().subtract(orderItems.getGoodsNum()));
|
|
|
} else {
|
|
|
+ if(orderItems.getSendNumHave().compareTo(new BigDecimal("0.00")) == 0 &&
|
|
|
+ orderItems.getSendNumFinancing().compareTo(new BigDecimal("0.00")) == 0){
|
|
|
+ throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "调拨数量有误请联系管理员");
|
|
|
+ }
|
|
|
if (orderItems.getSendNumFinancing().compareTo(stockOneC.getBalanceQuantityFinancing()) > 0) {
|
|
|
throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "融资库存不足,保存失败");
|
|
|
}
|
|
|
@@ -3776,6 +3780,10 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (!"1".equals(status)) {
|
|
|
stockOneR.setBalanceQuantityHave(stockOneR.getBalanceQuantityHave().add(orderItems.getGoodsNum()));
|
|
|
} else {
|
|
|
+ if(orderItems.getSendNumHave().compareTo(new BigDecimal("0.00")) == 0 &&
|
|
|
+ orderItems.getSendNumFinancing().compareTo(new BigDecimal("0.00")) == 0){
|
|
|
+ throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "调拨数量有误请联系管理员");
|
|
|
+ }
|
|
|
stockOneR.setBalanceQuantityFinancing(stockOneR.getBalanceQuantityFinancing().add(orderItems.getSendNumFinancing()));
|
|
|
stockOneR.setBalanceQuantityHave(stockOneR.getBalanceQuantityHave().add(orderItems.getSendNumHave()));
|
|
|
}
|
|
|
@@ -4077,6 +4085,10 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (!"1".equals(status)) {
|
|
|
stockOneC.setBalanceQuantityHave(stockOneC.getBalanceQuantityHave().add(orderItems.getGoodsNum()));
|
|
|
} else {
|
|
|
+ if(orderItems.getSendNumHave().compareTo(new BigDecimal("0.00")) == 0 &&
|
|
|
+ orderItems.getSendNumFinancing().compareTo(new BigDecimal("0.00")) == 0){
|
|
|
+ throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "调拨数量有误请联系管理员");
|
|
|
+ }
|
|
|
stockOneC.setBalanceQuantityFinancing(stockOneC.getBalanceQuantityFinancing().add(orderItems.getSendNumFinancing()));
|
|
|
stockOneC.setBalanceQuantityHave(stockOneC.getBalanceQuantityHave().add(orderItems.getSendNumHave()));
|
|
|
}
|
|
|
@@ -4143,6 +4155,10 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
}
|
|
|
stockOneR.setBalanceQuantityHave(stockOneR.getBalanceQuantityHave().subtract(orderItems.getGoodsNum()));
|
|
|
} else {
|
|
|
+ if(orderItems.getSendNumHave().compareTo(new BigDecimal("0.00")) == 0 &&
|
|
|
+ orderItems.getSendNumFinancing().compareTo(new BigDecimal("0.00")) == 0){
|
|
|
+ throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "调拨数量有误请联系管理员");
|
|
|
+ }
|
|
|
if (orderItems.getSendNumFinancing().compareTo(stockOneR.getBalanceQuantityFinancing()) > 0) {
|
|
|
throw new RuntimeException("第" + count + "行,商品:" + goodsDesc.getCname() + "融资库存不足,保存失败");
|
|
|
}
|