ebom,pbom getBomTree 去重
This commit is contained in:
parent
18c0b7f8cb
commit
53e4a89474
|
|
@ -11,6 +11,7 @@ import java.math.BigDecimal;
|
|||
import java.time.LocalDateTime;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
|
|
@ -300,4 +301,20 @@ public class BomNewPbomParentVO extends BaseMaterialVO implements Serializable {
|
|||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (!super.equals(o)) return false;
|
||||
BomNewPbomParentVO that = (BomNewPbomParentVO) o;
|
||||
return rowId.equals(that.rowId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode(), rowId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
bomDetail=Collections.EMPTY_LIST;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return result.stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
private void handlerChildBomVersionDetail(List<BomNewEbomParentVO> bomDetail) {
|
||||
List<String> materialNos = bomDetail.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo()) ).map(BomNewEbomParentVO::getMaterialNo).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
ForkJoinTask<List<BomNewPbomParentVO>> submit = bomDetailPool.submit(detailTask);
|
||||
|
||||
List<BomNewPbomParentVO> result = submit.join();
|
||||
return result;
|
||||
return result.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue