|
|
@@ -157,7 +157,7 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public void insertOutsideGoodsInto(OutboundVO outboundVO, List<OutboundItemVO> outboundItemVOList) {
|
|
|
if (outboundItemVOList != null && outboundItemVOList.size() > 0) {
|
|
|
- Map<String, List<OutboundItemVO>> outboundItemVOMap = outboundItemVOList.stream().collect(Collectors.groupingBy(OutboundItemVO::getSkuId));
|
|
|
+ Map<String, List<OutboundItemVO>> outboundItemVOMap = outboundItemVOList.stream().collect(Collectors.groupingBy(OutboundItemVO::getOutId));
|
|
|
for (String str : outboundItemVOMap.keySet()) {
|
|
|
//提取分组后的明细
|
|
|
List<OutboundItemVO> outboundItemVOListGroup = outboundItemVOMap.get(str);
|
|
|
@@ -213,6 +213,7 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
|
|
|
inboundItemVO.setIntoType(inboundVO.getIntoType());
|
|
|
//入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
|
|
|
inboundItemVO
|
|
|
+ .setPriceInto(outboundItemVO.getPriceOut())
|
|
|
.setIntoQty(outboundItemVO.getOutQty())
|
|
|
.setIntoAmt(outboundItemVO.getOutQty())
|
|
|
.setIntoingQty(BigDecimal.ZERO)
|
|
|
@@ -451,9 +452,12 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
|
|
|
//region 库存
|
|
|
//筛选出skuId不为空的 走库存
|
|
|
List<OutboundItemVO> invList = outboundVO.getItemList().stream().filter(it -> it.getSkuId() != null).collect(Collectors.toList());
|
|
|
- Map<String, Object> invMap = new HashMap<>();
|
|
|
- invMap.put("outDetail", invList);
|
|
|
- inventoryService.operatingInventoryInformation(invMap);
|
|
|
+ if(invList.size() > 0){
|
|
|
+ Map<String, Object> invMap = new HashMap<>();
|
|
|
+ invMap.put("outDetail", invList);
|
|
|
+ inventoryService.operatingInventoryInformation(invMap);
|
|
|
+ }
|
|
|
+
|
|
|
//endregion
|
|
|
}
|
|
|
//endregion
|