|
|
|
@ -246,7 +246,8 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
|
|
|
|
|
if (saveFlah.get()){ |
|
|
|
|
warehouseRetentionRecordEntity.setRetentionQuantity(retentionTotal.get()); |
|
|
|
|
this.updateById(warehouseRetentionRecordEntity); |
|
|
|
|
return Resp.scanSuccess("操作成功", "操作成功"); |
|
|
|
|
|
|
|
|
|
return Resp.scanSuccess("操作成功", retentionTotal.get()+"件"); |
|
|
|
|
}else { |
|
|
|
|
throw new RuntimeException("服务器正忙..."); |
|
|
|
|
} |
|
|
|
@ -270,10 +271,10 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
|
|
|
|
|
.eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId()) |
|
|
|
|
.eq(WarehouseRetentionScanEntity::getRefId, warehouseRetentionScanDTOS.getId())); |
|
|
|
|
WarehouseRetentionRecordEntity retentionRecordEntity = this.getById(warehouseRetentionScanDTOS.getId()); |
|
|
|
|
AtomicBoolean saveFlah = new AtomicBoolean(false); |
|
|
|
|
if (Func.isNotEmpty(retentionScanEntityList)) { |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
Map<Long, WarehouseRetentionScanEntity> retentionPackageMap = retentionScanEntityList.stream().collect(Collectors.toMap(WarehouseRetentionScanEntity::getOrderPackageId, Function.identity(), (k1, k2) -> k2)); |
|
|
|
|
AtomicBoolean saveFlah = new AtomicBoolean(false); |
|
|
|
|
warehouseRetentionScanDTOList.forEach(rs -> { |
|
|
|
|
if (Func.isNotEmpty(retentionPackageMap.get(rs.getOrderPackageId()))) { |
|
|
|
|
//查看是否是零担,如果是零担需要查看是否发生数量修改
|
|
|
|
@ -318,7 +319,12 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
|
|
|
|
|
.eq(WarehouseRetentionScanEntity::getRefId, warehouseRetentionScanDTOS.getId())).stream().mapToInt(WarehouseRetentionScanEntity::getRetentionQuantity).sum(); |
|
|
|
|
retentionRecordEntity.setRetentionQuantity(retentionTotal); |
|
|
|
|
this.updateById(retentionRecordEntity); |
|
|
|
|
return Resp.scanSuccess("操作成功", "操作成功"); |
|
|
|
|
if (saveFlah.get()){ |
|
|
|
|
return Resp.scanSuccess("操作成功", retentionTotal+"件"); |
|
|
|
|
}else { |
|
|
|
|
throw new RuntimeException("服务器正忙..."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|