空指针

This commit is contained in:
jing's 2024-03-29 10:19:26 +08:00
parent 2ad0c12acf
commit 8b822bd503
1 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import com.nflg.product.bomnew.constant.UserJobEnum;
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO; import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
import com.nflg.product.bomnew.service.BomNewEbomParentService; import com.nflg.product.bomnew.service.BomNewEbomParentService;
import com.nflg.product.bomnew.service.UserRoleService; import com.nflg.product.bomnew.service.UserRoleService;
import com.nflg.product.bomnew.util.VUtils;
import lombok.Getter; import lombok.Getter;
import org.apache.tomcat.jni.User; import org.apache.tomcat.jni.User;
@ -38,8 +39,13 @@ public class EBomDel {
List<String> roleList= SpringUtil.getBean(UserRoleService.class).getUserPost(); List<String> roleList= SpringUtil.getBean(UserRoleService.class).getUserPost();
if(CollUtil.isEmpty(bomTreeAll)){
VUtils.isTure(true).throwMessage("查询无bom数据");
}
if(CollUtil.isEmpty(roleList)){
VUtils.isTure(true).throwMessage("查询用户角色错误");
}
//设计人员: 自己创建的直接删除 //设计人员: 自己创建的直接删除
//工艺岗位只能删除自己在EBOM中创建的数据 //工艺岗位只能删除自己在EBOM中创建的数据
@ -70,6 +76,9 @@ public class EBomDel {
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(revertOBom)) { if (CollectionUtil.isNotEmpty(revertOBom)) {
if(CollUtil.isEmpty(delEBom)){
delEBom=new ArrayList<>();
}
delEBom.addAll(revertOBom); delEBom.addAll(revertOBom);
} }
// } // }