Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
65410b9f38
@ -492,6 +492,10 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
DlRepairSo inSo = new DlRepairSo();
|
||||
//过滤掉入库数量为null或0的情况(此为无效数据)
|
||||
List<DlRepairSoi> filterWare = reqVO.getSoiList().stream().filter(item -> item.getInCount() != null && item.getInCount() > 0).collect(Collectors.toList());
|
||||
//如果为空代表无需入库
|
||||
if (CollectionUtil.isEmpty(filterWare)) {
|
||||
return;
|
||||
}
|
||||
//即将入库采购品
|
||||
List<DlRepairSoi> pmsWaresList = repairSoiService.listByIds(filterWare.stream().map(DlRepairSoi::getId).collect(Collectors.toList()));
|
||||
//初始化本次入库采购品
|
||||
@ -554,8 +558,8 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
// 更新采购单的状态,如果是全部入库完了,就是03已入库,反之不变
|
||||
// 查该采购单的所有采购配件
|
||||
List<DlRepairSoi> sois = repairSoiService.list(new LambdaQueryWrapper<DlRepairSoi>().eq(DlRepairSoi::getSoId, reqVO.getId()));
|
||||
// 过滤出入库数量等于采购数量的数据
|
||||
List<DlRepairSoi> allInSois = sois.stream().filter(item -> item.getInCount().equals(item.getGoodsCount())).collect(Collectors.toList());
|
||||
// 过滤出入库数量大于等于采购数量的数据 (入库数量可以大于采购的数量)
|
||||
List<DlRepairSoi> allInSois = sois.stream().filter(item -> item.getInCount() >= item.getGoodsCount()).collect(Collectors.toList());
|
||||
// 如果allInSois的size就是sois的size,那就是全部都入库了
|
||||
if (CollectionUtil.isNotEmpty(allInSois) && allInSois.size() == sois.size()) {
|
||||
// 更新采购单的状态为已入库
|
||||
|
Loading…
Reference in New Issue
Block a user