|
@@ -244,6 +244,13 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
Object purchaseBackInfo = wmsService.getPurchaseBackInfo(result.getBusinessId());
|
|
|
result.setPurchaseBackInfo(purchaseBackInfo);
|
|
|
}
|
|
|
+
|
|
|
+ //到货物流备注
|
|
|
+ String victoriatouristJson = stockWait.getVictoriatouristJson();
|
|
|
+ JSONObject json = ObjectUtil.isNotEmpty(victoriatouristJson) ? JSONObject.parseObject(victoriatouristJson) : new JSONObject();
|
|
|
+ String arrivalRemark = wmsService.getArrivalRemark(json.getLong("deliverGoodsId"));
|
|
|
+ result.setArrivalRemark(arrivalRemark);
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -271,6 +278,10 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
stockWait.setVictoriatouristJson(JSONObject.toJSONString(json, JSONWriter.Feature.WriteLongAsString));
|
|
|
updateById(stockWait);
|
|
|
|
|
|
+ //到货物流备注
|
|
|
+ Long deliverGoodsId = json.getLong("deliverGoodsId");
|
|
|
+ wmsService.editArrivalRemark(deliverGoodsId, stockWaitDto.getArrivalRemark());
|
|
|
+
|
|
|
//如果是采购到货 计算结存单价
|
|
|
if (StockWaitType.PURCHASE_ARRIVAL_IN.getDetailType().equals(stockWait.getBusinessType())) {
|
|
|
List<Long> productIds = stockWaitDetailsDtoList.stream().map(StockWaitDetails::getProductId).distinct().collect(Collectors.toList());
|
|
@@ -363,7 +374,6 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//库存操作类型
|
|
|
Integer opType = -1;
|
|
|
//到货入库
|
|
@@ -395,7 +405,7 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
arrivalStockRecords.setStockJournalId(stockJournal.getId());
|
|
|
arrivalStockRecordsService.save(arrivalStockRecords);
|
|
|
//创建入库明细
|
|
|
- arrivalStockRecordsDetailsList.forEach(item->item.setArrivalStockRecordsId(arrivalStockRecords.getId()));
|
|
|
+ arrivalStockRecordsDetailsList.forEach(item -> item.setArrivalStockRecordsId(arrivalStockRecords.getId()));
|
|
|
arrivalStockRecordsDetailsService.saveBatch(arrivalStockRecordsDetailsList);
|
|
|
}
|
|
|
//如果是采购到货修改到货状态
|