提交 a1f15bad authored 作者: zhoushaopan's avatar zhoushaopan

[配发]解决批量配发,装备数量为0,后端500的bug

上级 01a96377
...@@ -337,7 +337,14 @@ public class PackingController { ...@@ -337,7 +337,14 @@ public class PackingController {
AllotMaxNum allotMaxNum = new AllotMaxNum(); AllotMaxNum allotMaxNum = new AllotMaxNum();
allotMaxNum.setId(integer); allotMaxNum.setId(integer);
//map里value的集合大小为最大可配发数量 //map里value的集合大小为最大可配发数量
allotMaxNum.setMaxNum(map.get(integer).size());
if (!map.keySet().contains(integer)){
//设置最大配发数量为0
allotMaxNum.setMaxNum(0);
}else {
allotMaxNum.setMaxNum(map.get(integer).size());
}
// allotMaxNum.setMaxNum(size);
allotMaxNums.add(allotMaxNum); allotMaxNums.add(allotMaxNum);
}); });
return ResponseEntity.ok(allotMaxNums); return ResponseEntity.ok(allotMaxNums);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论