1、修复批量删除时,前端获取id为undefined的问题

2、修复后端,查询列表为空时,程序异常问题
This commit is contained in:
cjl
2019-01-17 18:25:02 +08:00
parent 4a47e25422
commit 67252622ef
2 changed files with 1097 additions and 1094 deletions

View File

@@ -53,13 +53,16 @@ public class DepotItemController {
try {
List<DepotItemVo4HeaderId> depotItemList = depotItemService.getHeaderIdByMaterial(materialParam, depotIds);
String allReturn = "";
if (depotItemList != null) {
if (depotItemList != null&&depotItemList.size()>0) {
for (DepotItemVo4HeaderId d : depotItemList) {
Long dl = d.getHeaderid(); //获取对象
allReturn = allReturn + dl.toString() + ",";
}
/**
* 2019-01-17修复depotItemList集合为空时程序异常
* */
allReturn = allReturn.substring(0, allReturn.length() - 1);
}
allReturn = allReturn.substring(0, allReturn.length() - 1);
if (allReturn.equals("null")) {
allReturn = "";
}