|
@@ -718,15 +718,20 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
|
|
|
this.deleteOutsideGoodsInto(outboundVO, outsideGoods);
|
|
this.deleteOutsideGoodsInto(outboundVO, outsideGoods);
|
|
|
//新建外协品生产外协入库单
|
|
//新建外协品生产外协入库单
|
|
|
this.insertOutsideGoodsInto(outboundVO, outsideGoods);
|
|
this.insertOutsideGoodsInto(outboundVO, outsideGoods);
|
|
|
- List<OutboundItemVO> delOutsideGoods = outboundVO.getDeleteItemList().stream().filter(it -> it.getSkuId() == null).collect(Collectors.toList());
|
|
|
|
|
- //删除外协品生产外协入库单
|
|
|
|
|
- this.deleteOutsideGoodsInto(outboundVO, delOutsideGoods);
|
|
|
|
|
|
|
+ if(outboundVO.getDeleteItemList() != null){
|
|
|
|
|
+ List<OutboundItemVO> delOutsideGoods = outboundVO.getDeleteItemList().stream().filter(it -> it.getSkuId() == null).collect(Collectors.toList());
|
|
|
|
|
+ //删除外协品生产外协入库单
|
|
|
|
|
+ this.deleteOutsideGoodsInto(outboundVO, delOutsideGoods);
|
|
|
|
|
+ }
|
|
|
//endregion
|
|
//endregion
|
|
|
|
|
|
|
|
//region 修改库存
|
|
//region 修改库存
|
|
|
//筛选出skuId不为空的 走库存
|
|
//筛选出skuId不为空的 走库存
|
|
|
List<OutboundItemVO> invList = outboundVO.getItemList().stream().filter(it -> it.getSkuId() != null).collect(Collectors.toList());
|
|
List<OutboundItemVO> invList = outboundVO.getItemList().stream().filter(it -> it.getSkuId() != null).collect(Collectors.toList());
|
|
|
- List<OutboundItemVO> invDelList = outboundVO.getDeleteItemList().stream().filter(it -> it.getSkuId() != null).collect(Collectors.toList());
|
|
|
|
|
|
|
+ List<OutboundItemVO> invDelList = null;
|
|
|
|
|
+ if(outboundVO.getDeleteItemList() != null){
|
|
|
|
|
+ invDelList = outboundVO.getDeleteItemList().stream().filter(it -> it.getSkuId() != null).collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
if ((invList != null && invList.size() > 0) || (invDelList != null && invDelList.size() > 0)) {
|
|
if ((invList != null && invList.size() > 0) || (invDelList != null && invDelList.size() > 0)) {
|
|
|
Map<String, Object> invMap = new HashMap<>();
|
|
Map<String, Object> invMap = new HashMap<>();
|
|
|
invMap.put("outDetail", invList);
|
|
invMap.put("outDetail", invList);
|