|
@@ -94,8 +94,11 @@ public class BizTaksStockLotController extends BaseController
|
|
return error("该载具绑定的批次未在此次盘点内!");
|
|
return error("该载具绑定的批次未在此次盘点内!");
|
|
}
|
|
}
|
|
List<BizTaksStockLot> list = taksStockLotsList.stream()
|
|
List<BizTaksStockLot> list = taksStockLotsList.stream()
|
|
- .filter(item -> needQueryDayworkIds.contains(item.getDayworkId()))
|
|
|
|
|
|
+ .filter(item -> needQueryDayworkIds.contains(item.getDayworkId()) && item.getIsWaste() == 0)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
+ if(list.isEmpty()) {
|
|
|
|
+ return error("该载具绑定的批次已批废");
|
|
|
|
+ }
|
|
return success(list);
|
|
return success(list);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -142,11 +145,15 @@ public class BizTaksStockLotController extends BaseController
|
|
@PutMapping
|
|
@PutMapping
|
|
public AjaxResult edit(@RequestBody List<BizTaksStockLot> bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
|
|
public AjaxResult edit(@RequestBody List<BizTaksStockLot> bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
|
|
{
|
|
{
|
|
- bizTaksStockLot.forEach(item -> {
|
|
|
|
|
|
+ List<BizTaksStockLot> collect = bizTaksStockLot.stream().filter(item -> item.getFlag() != false).collect(Collectors.toList());
|
|
|
|
+ collect.forEach(item -> {
|
|
item.setIsTaksStock(1);
|
|
item.setIsTaksStock(1);
|
|
item.setFirstUpdateId(SecurityUtils.getLoginUser().getUserId());
|
|
item.setFirstUpdateId(SecurityUtils.getLoginUser().getUserId());
|
|
});
|
|
});
|
|
- return toAjax(bizTaksStockLotService.updateBatchById(bizTaksStockLot));
|
|
|
|
|
|
+ if(!collect.isEmpty()) {
|
|
|
|
+ return toAjax(bizTaksStockLotService.updateBatchById(collect));
|
|
|
|
+ }
|
|
|
|
+ return success();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|