|
|
@@ -886,7 +886,10 @@ public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> i
|
|
|
if (!res.isSuccess()) {
|
|
|
throw new SecurityException(res.getMsg());
|
|
|
}*/
|
|
|
- stockGoodsService.updateBatchById(stockGoodsList2);
|
|
|
+ R res = stockGoodsService.updateBatchById(stockGoodsList2);
|
|
|
+ if (!res.isSuccess()) {
|
|
|
+ throw new SecurityException(res.getMsg());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
List<BusinessOverpaymentItem> list = new ArrayList<>();
|
|
|
@@ -964,7 +967,7 @@ public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> i
|
|
|
model.setGoodsId(e.getItemId());
|
|
|
//不同的出口对应不同的查询条件
|
|
|
if ("JK".equals(select.getTradeType())) {
|
|
|
- model = stockGoodsList.stream().filter(s ->
|
|
|
+ model = finalStockGoodsList.stream().filter(s ->
|
|
|
s.getGoodsId().equals(e.getItemId())
|
|
|
&& s.getTradeType().equals("JK")
|
|
|
&& s.getCntrNo().equals(e.getCntrNo())//箱号
|
|
|
@@ -973,13 +976,13 @@ public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> i
|
|
|
&& s.getContractNumber().equals(e.getContractNumber())//采购订单号
|
|
|
).findFirst().orElse(null);
|
|
|
} else if ("CK".equals(select.getTradeType())) {
|
|
|
- model = stockGoodsList.stream().filter(s ->
|
|
|
+ model = finalStockGoodsList.stream().filter(s ->
|
|
|
s.getGoodsId().equals(e.getItemId())
|
|
|
&& s.getTradeType().equals("CK")
|
|
|
&& s.getItemType().equals(e.getSpecificationAndModel())
|
|
|
).findFirst().orElse(null);
|
|
|
} else if ("GN".equals(select.getTradeType())) {
|
|
|
- model = stockGoodsList.stream().filter(s ->
|
|
|
+ model = finalStockGoodsList.stream().filter(s ->
|
|
|
s.getGoodsId().equals(e.getItemId())
|
|
|
&& s.getTradeType().equals("GN")
|
|
|
&& s.getCorpId().equals(select.getCorpId())
|
|
|
@@ -1080,7 +1083,10 @@ public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> i
|
|
|
if (!res.isSuccess()) {
|
|
|
throw new RuntimeException(res.getMsg());
|
|
|
}*/
|
|
|
- stockGoodsService.saveOrUpdateBatch(stockGoodsList1);
|
|
|
+ R res = stockGoodsService.saveOrUpdateBatch(stockGoodsList1);
|
|
|
+ if (!res.isSuccess()) {
|
|
|
+ throw new RuntimeException(res.getMsg());
|
|
|
+ }
|
|
|
// stockGoodsClient.saveOrUpdateBatchListLog(stockGoodsLogList);
|
|
|
stockGoodsLogService.saveOrUpdateBatch(stockGoodsLogList);
|
|
|
//计算明细的入库金额(明细的总采购价)
|