|
@@ -230,11 +230,8 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
|
|
|
} else {
|
|
} else {
|
|
|
inOutStorage.setWarehouseUnitPrice(inOutStorage.getPrice());
|
|
inOutStorage.setWarehouseUnitPrice(inOutStorage.getPrice());
|
|
|
}
|
|
}
|
|
|
- if (billingRules) {
|
|
|
|
|
- inOutStorage.setSurplusGoodsAmount(inOutStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- } else {
|
|
|
|
|
- inOutStorage.setSurplusGoodsAmount(inOutStorage.getSurplusWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ inOutStorage.setSurplusGoodsAmount(inOutStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
if (ObjectUtils.isNull(inOutStorage.getOutStorageDate())) {
|
|
if (ObjectUtils.isNull(inOutStorage.getOutStorageDate())) {
|
|
|
inOutStorage.setOutStorageDate(new Date());
|
|
inOutStorage.setOutStorageDate(new Date());
|
|
@@ -258,11 +255,7 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
|
|
|
inStorage.setSurplusQuantity(quantity.subtract(inOutStorage.getOutQuantity()));
|
|
inStorage.setSurplusQuantity(quantity.subtract(inOutStorage.getOutQuantity()));
|
|
|
inStorage.setSurplusWeight(grossWeight.subtract(inOutStorage.getOutWeight()));
|
|
inStorage.setSurplusWeight(grossWeight.subtract(inOutStorage.getOutWeight()));
|
|
|
inStorage.setSurplusNetWeight(netWeight.subtract(inOutStorage.getOutNetWeight()));
|
|
inStorage.setSurplusNetWeight(netWeight.subtract(inOutStorage.getOutNetWeight()));
|
|
|
- if (billingRules) {
|
|
|
|
|
- inStorage.setSurplusGoodsAmount(inStorage.getSurplusWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- } else {
|
|
|
|
|
- inStorage.setSurplusGoodsAmount(inStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ inStorage.setSurplusGoodsAmount(inStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
inStorage.setUpdateTime(new Date());
|
|
inStorage.setUpdateTime(new Date());
|
|
|
inStorage.setUpdateUser(AuthUtil.getUserId());
|
|
inStorage.setUpdateUser(AuthUtil.getUserId());
|
|
|
inStorage.setUpdateUserName(AuthUtil.getUserName());
|
|
inStorage.setUpdateUserName(AuthUtil.getUserName());
|
|
@@ -271,11 +264,7 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
|
|
|
inOutStorage.setSurplusQuantity(quantity.subtract(inOutStorage.getOutQuantity()));
|
|
inOutStorage.setSurplusQuantity(quantity.subtract(inOutStorage.getOutQuantity()));
|
|
|
inOutStorage.setSurplusWeight(grossWeight.subtract(inOutStorage.getOutWeight()));
|
|
inOutStorage.setSurplusWeight(grossWeight.subtract(inOutStorage.getOutWeight()));
|
|
|
inOutStorage.setSurplusNetWeight(netWeight.subtract(inOutStorage.getOutNetWeight()));
|
|
inOutStorage.setSurplusNetWeight(netWeight.subtract(inOutStorage.getOutNetWeight()));
|
|
|
- if (billingRules) {
|
|
|
|
|
- inOutStorage.setSurplusGoodsAmount(inStorage.getSurplusWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- } else {
|
|
|
|
|
- inOutStorage.setSurplusGoodsAmount(inStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ inOutStorage.setSurplusGoodsAmount(inStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
Bills bills = billsMapper.selectById(inOutStorage.getPid());
|
|
Bills bills = billsMapper.selectById(inOutStorage.getPid());
|
|
|
if (bills != null) {
|
|
if (bills != null) {
|
|
|
BFees fees = bFeesService.getOne(new LambdaQueryWrapper<BFees>()
|
|
BFees fees = bFeesService.getOne(new LambdaQueryWrapper<BFees>()
|
|
@@ -443,11 +432,7 @@ public class InOutStorageServiceImpl extends ServiceImpl<InOutStorageMapper, InO
|
|
|
if (storage == null) {
|
|
if (storage == null) {
|
|
|
throw new RuntimeException("未查到仓库信息");
|
|
throw new RuntimeException("未查到仓库信息");
|
|
|
}
|
|
}
|
|
|
- if ("1".equals(storage.getBillingRules())) {
|
|
|
|
|
- outStorage.setSurplusGoodsAmount(inOutStorage.getSurplusWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- } else {
|
|
|
|
|
- outStorage.setSurplusGoodsAmount(inOutStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ outStorage.setSurplusGoodsAmount(inOutStorage.getSurplusNetWeight().multiply(inOutStorage.getPrice()));
|
|
|
outStorage.setConfirmDispatchVehicles("0");
|
|
outStorage.setConfirmDispatchVehicles("0");
|
|
|
baseMapper.insert(outStorage);
|
|
baseMapper.insert(outStorage);
|
|
|
if (new BigDecimal("0.00").compareTo(inOutStorage.getSurplusQuantity()) == 0 &&
|
|
if (new BigDecimal("0.00").compareTo(inOutStorage.getSurplusQuantity()) == 0 &&
|