|
|
@@ -915,7 +915,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -979,7 +979,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjHistory history;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()) &&
|
|
|
- ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
+ ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -1000,11 +1000,13 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
}
|
|
|
PjOrderItems orderItems = pjOrderItems.stream().filter(e -> e.getId().equals(item.getSrcItemId())).findFirst().orElse(null);
|
|
|
if (orderItems != null) {
|
|
|
- if (ObjectUtils.isNull(orderItems.getDots())) {
|
|
|
- orderItems.setDots(item.getDot());
|
|
|
- } else {
|
|
|
- if (!orderItems.getDots().contains(item.getDot())) {
|
|
|
- orderItems.setDots(orderItems.getDots() + "," + item.getDot());
|
|
|
+ if (ObjectUtils.isNotNull(item.getDot())) {
|
|
|
+ if (ObjectUtils.isNull(orderItems.getDots())) {
|
|
|
+ orderItems.setDots(item.getDot());
|
|
|
+ } else {
|
|
|
+ if (!orderItems.getDots().contains(item.getDot())) {
|
|
|
+ orderItems.setDots(orderItems.getDots() + "," + item.getDot());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (ObjectUtils.isNull(orderItems.getCostprie()) || new BigDecimal("0.00").compareTo(orderItems.getCostprie()) == 0) {
|
|
|
@@ -1504,7 +1506,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne1 = pjStockDescList1.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne1 = pjStockDescList1.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -1519,12 +1521,14 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
orderItems.setRebateProfit(new BigDecimal("0.00"));
|
|
|
}
|
|
|
orderItems.setSendNum(orderItems.getSendNum().subtract(item.getSendNum()));
|
|
|
- if (orderItems.getSendNum().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
- orderItems.setDots("");
|
|
|
- } else {
|
|
|
- if (ObjectUtils.isNotNull(orderItems.getDots())) {
|
|
|
- if (orderItems.getDots().contains(item.getDot())) {
|
|
|
- orderItems.setDots(orderItems.getDots().replace(item.getDot(), ""));
|
|
|
+ if (ObjectUtils.isNotNull(item.getDot())) {
|
|
|
+ if (orderItems.getSendNum().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
+ orderItems.setDots("");
|
|
|
+ } else {
|
|
|
+ if (ObjectUtils.isNotNull(orderItems.getDots())) {
|
|
|
+ if (orderItems.getDots().contains(item.getDot())) {
|
|
|
+ orderItems.setDots(orderItems.getDots().replace(item.getDot(), ""));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1541,7 +1545,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -1562,7 +1566,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjHistory history;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()) &&
|
|
|
- ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
+ ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -2185,11 +2189,13 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (!"TKSHGD".equals(ship.getBizTypeName())) {
|
|
|
PjOrderItems orderItems = pjOrderItems.stream().filter(e -> e.getId().equals(item.getSrcItemId())).findFirst().orElse(null);
|
|
|
if (orderItems != null) {
|
|
|
- if (ObjectUtils.isNull(orderItems.getDots())) {
|
|
|
- orderItems.setDots(item.getDot());
|
|
|
- } else {
|
|
|
- if (!orderItems.getDots().contains(item.getDot())) {
|
|
|
- orderItems.setDots(orderItems.getDots() + "," + item.getDot());
|
|
|
+ if (ObjectUtils.isNotNull(item.getDot())){
|
|
|
+ if (ObjectUtils.isNull(orderItems.getDots())) {
|
|
|
+ orderItems.setDots(item.getDot());
|
|
|
+ } else {
|
|
|
+ if (!orderItems.getDots().contains(item.getDot())) {
|
|
|
+ orderItems.setDots(orderItems.getDots() + "," + item.getDot());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (orderItems.getGoodsNum().compareTo(orderItems.getSendNum().add(item.getSendNum())) < 0) {
|
|
|
@@ -2230,7 +2236,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
&& e.getStorageId().equals(ship.getStorageId())
|
|
|
- &&ObjectUtils.isNotNull(e.getDot())&& e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -2263,7 +2269,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockDesc.setRebatePrice(item.getRebatePrice());
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockDesc.setDot(item.getDot());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
stockDesc.setDot(null);
|
|
|
}
|
|
|
long timestamp = System.currentTimeMillis() + count;
|
|
|
@@ -2361,7 +2367,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(item.getId()) &&
|
|
|
e.getReservoirAreaId().equals(itemHistory.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(itemHistory.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(itemHistory.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(item.getId()) &&
|
|
|
e.getReservoirAreaId().equals(itemHistory.getReservoirAreaId())
|
|
|
@@ -2373,7 +2379,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
Long reservoirAreaId = itemHistory.getReservoirAreaId();
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
areaRecord = areaRecordList.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&& e.getDot().equals(itemHistory.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(itemHistory.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
areaRecord = areaRecordList.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
&& ObjectUtils.isNull(e.getDot())).findFirst().orElse(null);
|
|
|
@@ -2712,7 +2718,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
&& e.getStorageId().equals(ship.getStorageId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -2847,7 +2853,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
&& e.getStorageId().equals(ship.getStorageId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -2915,7 +2921,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
BigDecimal quantity;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
&& ObjectUtils.isNull(e.getDot()) && ObjectUtils.isNull(reservoirAreaRecord.getDot()))
|
|
|
@@ -2973,12 +2979,14 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (orderItems != null) {
|
|
|
orderItems.setSendNum(orderItems.getSendNum().subtract(item.getSendNum()));
|
|
|
orderItems.setGoodsTotalShipAmount(orderItems.getSendNum().multiply(item.getPrice()));
|
|
|
- if (orderItems.getSendNum().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
- orderItems.setDots("");
|
|
|
- } else {
|
|
|
- if (ObjectUtils.isNotNull(orderItems.getDots())) {
|
|
|
- if (orderItems.getDots().contains(item.getDot())) {
|
|
|
- orderItems.setDots(orderItems.getDots().replace(item.getDot(), ""));
|
|
|
+ if (ObjectUtils.isNotNull(item.getDot())){
|
|
|
+ if (orderItems.getSendNum().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
+ orderItems.setDots("");
|
|
|
+ } else {
|
|
|
+ if (ObjectUtils.isNotNull(orderItems.getDots())) {
|
|
|
+ if (orderItems.getDots().contains(item.getDot())) {
|
|
|
+ orderItems.setDots(orderItems.getDots().replace(item.getDot(), ""));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -3557,7 +3565,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjStockDesc stockOneC;
|
|
|
//管理批次号
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
- stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(orderItems.getDot()) &&
|
|
|
+ stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(orderItems.getDot()) &&
|
|
|
e.getGoodsId().equals(orderItems.getGoodsId())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNull(e.getDot()) &&
|
|
|
@@ -3585,7 +3593,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getReservoirAreaId().equals(item.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getReservoirAreaId().equals(item.getReservoirAreaId())
|
|
|
@@ -3597,7 +3605,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
Long reservoirAreaId = item.getReservoirAreaId();
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
areaRecord = reservoirAreaRecordListC.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
areaRecord = reservoirAreaRecordListC.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
&& ObjectUtils.isNull(e.getDot())).findFirst().orElse(null);
|
|
|
@@ -3648,7 +3656,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjStockDesc stockOneR;
|
|
|
//管理批次号
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
- stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(orderItems.getDot()) &&
|
|
|
+ stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(orderItems.getDot()) &&
|
|
|
e.getGoodsId().equals(orderItems.getGoodsId())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNull(e.getDot()) &&
|
|
|
@@ -3677,7 +3685,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(item.getCallInReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(item.getCallInReservoirAreaId())
|
|
|
@@ -3689,7 +3697,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
Long reservoirAreaId = item.getCallInReservoirAreaId();
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
areaRecord = reservoirAreaRecordListR.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
areaRecord = reservoirAreaRecordListR.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
&& ObjectUtils.isNull(e.getDot())).findFirst().orElse(null);
|
|
|
@@ -3778,7 +3786,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockDesc.setSalesCompanyName(detail.getSalesCompanyName());
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockDesc.setDot(orderItems.getDot());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
stockDesc.setDot(null);
|
|
|
}
|
|
|
stockDesc.setCreateDept(detail.getCreateDept());
|
|
|
@@ -3809,7 +3817,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(item.getCallInReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(item.getCallInReservoirAreaId())
|
|
|
@@ -3959,7 +3967,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjStockDesc stockOneC;
|
|
|
//管理批次号
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
- stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(orderItems.getDot()) &&
|
|
|
+ stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(orderItems.getDot()) &&
|
|
|
e.getGoodsId().equals(orderItems.getGoodsId())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOneC = stockOneListC.stream().filter(e -> ObjectUtils.isNull(e.getDot()) &&
|
|
|
@@ -3987,7 +3995,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getReservoirAreaId().equals(item.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getReservoirAreaId().equals(item.getReservoirAreaId())
|
|
|
@@ -3999,7 +4007,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
Long reservoirAreaId = item.getReservoirAreaId();
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
areaRecord = reservoirAreaRecordListC.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
areaRecord = reservoirAreaRecordListC.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
&& ObjectUtils.isNull(e.getDot())).findFirst().orElse(null);
|
|
|
@@ -4038,7 +4046,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjStockDesc stockOneR;
|
|
|
//管理批次号
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
- stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(orderItems.getDot()) &&
|
|
|
+ stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(orderItems.getDot()) &&
|
|
|
e.getGoodsId().equals(orderItems.getGoodsId())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOneR = stockOneListR.stream().filter(e -> ObjectUtils.isNull(e.getDot()) &&
|
|
|
@@ -4060,7 +4068,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = histories.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = histories.stream().filter(e -> e.getSrcItemId().equals(orderItems.getId()) &&
|
|
|
e.getCallInReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
@@ -4314,7 +4322,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtils.isNotNull(e.getDots())) {
|
|
|
if (e.getDots().contains(",")) {
|
|
|
shipItems.setDot(e.getDots().substring(e.getDots().indexOf(",")));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
shipItems.setDot(e.getDots());
|
|
|
}
|
|
|
}
|
|
|
@@ -4567,7 +4575,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -4588,7 +4596,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjHistory history;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()) &&
|
|
|
- ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
+ ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -4887,7 +4895,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -4908,7 +4916,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
PjHistory history;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()) &&
|
|
|
- ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
+ ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
history = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId()))
|
|
|
.findFirst().orElse(null);
|
|
|
@@ -5179,7 +5187,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtils.isNotNull(e.getDots())) {
|
|
|
if (e.getDots().contains(",")) {
|
|
|
shipItems.setDot(e.getDots().substring(e.getDots().indexOf(",")));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
shipItems.setDot(e.getDots());
|
|
|
}
|
|
|
}
|
|
|
@@ -5446,7 +5454,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
&& e.getStorageId().equals(ship.getStorageId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -5473,7 +5481,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockDesc.setRebatePrice(item.getRebatePrice());
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockDesc.setDot(item.getDot());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
stockDesc.setDot(null);
|
|
|
}
|
|
|
if (stockDesc.getBalanceQuantity().compareTo(new BigDecimal("0")) != 0) {
|
|
|
@@ -5565,7 +5573,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(item.getId()) &&
|
|
|
e.getReservoirAreaId().equals(itemHistory.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(itemHistory.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(itemHistory.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = historyList.stream().filter(e -> e.getSrcItemId().equals(item.getId()) &&
|
|
|
e.getReservoirAreaId().equals(itemHistory.getReservoirAreaId())
|
|
|
@@ -5577,7 +5585,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
Long reservoirAreaId = itemHistory.getReservoirAreaId();
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
areaRecord = areaRecordList.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(itemHistory.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(itemHistory.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
areaRecord = areaRecordList.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaId)
|
|
|
&& ObjectUtils.isNull(e.getDot())).findFirst().orElse(null);
|
|
|
@@ -5951,7 +5959,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
&& e.getStorageId().equals(ship.getStorageId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
@@ -5987,7 +5995,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
BigDecimal quantity;
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
quantity = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(reservoirAreaRecord.getDot())).map(PjHistory::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
} else {
|
|
|
quantity = histories.stream().filter(e -> e.getReservoirAreaId().equals(reservoirAreaRecord.getReservoirAreaId())
|
|
|
&& ObjectUtils.isNull(e.getDot()) && ObjectUtils.isNull(reservoirAreaRecord.getDot()))
|
|
|
@@ -6473,7 +6481,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
if (ObjectUtil.isNotEmpty(goodsDesc.getWhether()) && "1".equals(goodsDesc.getWhether())) {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|
|
|
- && ObjectUtils.isNotNull(e.getDot())&&e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
+ && ObjectUtils.isNotNull(e.getDot()) && e.getDot().equals(item.getDot())).findFirst().orElse(null);
|
|
|
} else {
|
|
|
stockOne = pjStockDescList.stream()
|
|
|
.filter(e -> e.getGoodsId().equals(item.getGoodsId())
|