库存预警数值不展示修复
This commit is contained in:
@@ -106,7 +106,8 @@ public class StockController {
|
|||||||
if (stockV2Vos.getContent().isEmpty()) {
|
if (stockV2Vos.getContent().isEmpty()) {
|
||||||
dataMap.put("warnLine", 0);
|
dataMap.put("warnLine", 0);
|
||||||
}else {
|
}else {
|
||||||
dataMap.put("warnLine", stockV2Vos.getContent().get(0).getWarnLine());
|
StockV2Vo stockV2Vo = stockV2Vos.getContent().stream().filter(item -> item.getWarnLine() != null).findFirst().orElse(null);
|
||||||
|
dataMap.put("warnLine", stockV2Vo != null ? stockV2Vo.getWarnLine() : 0);
|
||||||
}
|
}
|
||||||
return new ResponseEntity<>(dataMap, HttpStatus.OK);
|
return new ResponseEntity<>(dataMap, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user