|
|
@@ -17,7 +17,6 @@ import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
|
|
import okhttp3.*;
|
|
|
import org.springblade.client.entity.Message;
|
|
|
import org.springblade.client.feign.IMessageClient;
|
|
|
-import org.springblade.common.enums.CommonEnum;
|
|
|
import org.springblade.common.enums.NumberEnum;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
@@ -836,7 +835,13 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
BigDecimal inventoryAmount = item.getSendNum().multiply(stockOne.getInventoryCostPrice());
|
|
|
BigDecimal rebateInventoryAmount = item.getSendNum().multiply(stockOne.getRebatePrice());
|
|
|
stockOne.setInventoryAmount(stockOne.getInventoryAmount().subtract(inventoryAmount));
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getInventoryAmount()) == 0) {
|
|
|
+ stockOne.setInventoryCostPrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
stockOne.setRebateInventoryAmount(stockOne.getRebateInventoryAmount().subtract(rebateInventoryAmount));
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getRebateInventoryAmount()) == 0) {
|
|
|
+ stockOne.setRebatePrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
stockOne.setVersion(stockOne.getVersion());
|
|
|
}
|
|
|
pjStockDescArrayList.add(stockOne);
|
|
|
@@ -1025,7 +1030,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
}
|
|
|
List<PjOrderItems> orderItemList = orderItemsList.stream().filter(e -> e.getGoodsId().equals(shipItems.getGoodsId())).collect(Collectors.toList());
|
|
|
if (orderItemList.isEmpty()) {
|
|
|
- throw new RuntimeException("商品:" + shipItems.getGoodsName() + "超过"+days+"天未赎回,请确认在出库");
|
|
|
+ throw new RuntimeException("商品:" + shipItems.getGoodsName() + "超过" + days + "天未赎回,请确认在出库");
|
|
|
}
|
|
|
List<FinancingShipItemDto> mapList = new ArrayList<>();
|
|
|
if (number.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
@@ -1356,6 +1361,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
BigDecimal rebateInventoryAmount = item.getSendNum().multiply(stockOne.getRebatePrice());
|
|
|
stockOne.setInventoryAmount(stockOne.getInventoryAmount().add(inventoryAmount));
|
|
|
stockOne.setRebateInventoryAmount(stockOne.getRebateInventoryAmount().add(rebateInventoryAmount));
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getInventoryAmount()) == 0) {
|
|
|
+ stockOne.setInventoryCostPrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getRebateInventoryAmount()) == 0) {
|
|
|
+ stockOne.setRebatePrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
stockOne.setVersion(stockOne.getVersion());
|
|
|
pjStockDescArrayList.add(stockOne);
|
|
|
} else {
|
|
|
@@ -3794,6 +3805,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne.setInventoryCostPrice(stockOne.getInventoryAmount().divide(stockOne.getBalanceQuantity(), MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP));
|
|
|
stockOne.setRebatePrice(stockOne.getRebateInventoryAmount().divide(stockOne.getBalanceQuantity(), MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP));
|
|
|
}
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getInventoryAmount()) == 0) {
|
|
|
+ stockOne.setInventoryCostPrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getRebateInventoryAmount()) == 0) {
|
|
|
+ stockOne.setRebatePrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
pjStockDescArrayList.add(stockOne);
|
|
|
} else {
|
|
|
System.err.println("商品:" + goodsDesc.getCname());
|
|
|
@@ -4049,6 +4066,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne.setInventoryCostPrice(stockOne.getInventoryAmount().divide(stockOne.getBalanceQuantity(), MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP));
|
|
|
stockOne.setRebatePrice(stockOne.getRebateInventoryAmount().divide(stockOne.getBalanceQuantity(), MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP));
|
|
|
}*/
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getInventoryAmount()) == 0) {
|
|
|
+ stockOne.setInventoryCostPrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getRebateInventoryAmount()) == 0) {
|
|
|
+ stockOne.setRebatePrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
pjStockDescArrayList.add(stockOne);
|
|
|
/*R res = iStockDescService.updateByIdNew(stockOne);
|
|
|
if (!res.isSuccess()) {
|
|
|
@@ -4859,6 +4882,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
BigDecimal rebateInventoryAmount = item.getSendNum().multiply(stockOne.getRebatePrice());
|
|
|
stockOne.setInventoryAmount(stockOne.getInventoryAmount().subtract(inventoryAmount));
|
|
|
stockOne.setRebateInventoryAmount(stockOne.getRebateInventoryAmount().subtract(rebateInventoryAmount));
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getInventoryAmount()) == 0) {
|
|
|
+ stockOne.setInventoryCostPrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
+ if (new BigDecimal("0.00").compareTo(stockOne.getRebateInventoryAmount()) == 0) {
|
|
|
+ stockOne.setRebatePrice(new BigDecimal("0.00"));
|
|
|
+ }
|
|
|
stockOne.setVersion(stockOne.getVersion());
|
|
|
pjStockDescArrayList.add(stockOne);
|
|
|
} else {
|