diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrInvWarehouseController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrInvWarehouseController.java index 99498261a..0996ad1d1 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrInvWarehouseController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrInvWarehouseController.java @@ -69,10 +69,11 @@ public class ThrInvWarehouseController { List ThrInvWarehouseEntityList = new ArrayList<>(); List thrInvWarehouseEntities = thrInvWarehouseService.selectByPid(invSubWarehouseEntity.getParentId()); for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrInvWarehouseEntities) { - if((invSubWarehouseEntity.getCode().equals(thrInvWarehouseEntity.getCode()) && invSubWarehouseEntity.getName().equals(thrInvWarehouseEntity.getName()))){ + if((invSubWarehouseEntity.getCode().equals(thrInvWarehouseEntity.getCode()) || invSubWarehouseEntity.getName().equals(thrInvWarehouseEntity.getName()))){ //添加集合中 ThrInvWarehouseEntityList.add(thrInvWarehouseEntity); } + } if(ThrInvWarehouseEntityList.size()==0){ invSubWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + "");