比对根节点不比较
This commit is contained in:
parent
bd41892bbc
commit
13fd8df3f4
|
|
@ -2,6 +2,7 @@ package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
|
@ -318,17 +319,24 @@ public class CompareReportService {
|
||||||
}
|
}
|
||||||
//多层比较父级物料编码/图号
|
//多层比较父级物料编码/图号
|
||||||
if (queryType.compareTo(ReportConstant.QueryTypeEnum.MULTI.getValue()) == 0) {
|
if (queryType.compareTo(ReportConstant.QueryTypeEnum.MULTI.getValue()) == 0) {
|
||||||
if (CollUtil.isEmpty(leftBomRowIdMap.get(from.getParentRowId()))
|
|
||||||
|| CollUtil.isEmpty(rightBomRowIdMap.get(to.getParentRowId()))) {
|
|
||||||
compareReportVO.setSymbol(ReportConstant.SymbolEnum.NON_EQ.getValue());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ForwardReportVO fromParent = leftBomRowIdMap.get(from.getParentRowId()).get(0);
|
|
||||||
ForwardReportVO toParent = rightBomRowIdMap.get(to.getParentRowId()).get(0);
|
|
||||||
|
|
||||||
if (!compareFunc.apply(fromParent).equals(compareFunc.apply(toParent))) {
|
//根节点下面不用比较
|
||||||
compareReportVO.setSymbol(ReportConstant.SymbolEnum.NON_EQ.getValue());
|
if ( (Objects.nonNull(from.getParentRowId()) &&from.getParentRowId()>0)
|
||||||
continue;
|
&& (Objects.nonNull(to.getParentRowId()) &&to.getParentRowId()>0) ) {
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(leftBomRowIdMap.get(from.getParentRowId()))
|
||||||
|
|| CollUtil.isEmpty(rightBomRowIdMap.get(to.getParentRowId()))) {
|
||||||
|
compareReportVO.setSymbol(ReportConstant.SymbolEnum.NON_EQ.getValue());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ForwardReportVO fromParent = leftBomRowIdMap.get(from.getParentRowId()).get(0);
|
||||||
|
ForwardReportVO toParent = rightBomRowIdMap.get(to.getParentRowId()).get(0);
|
||||||
|
|
||||||
|
if (!compareFunc.apply(fromParent).equals(compareFunc.apply(toParent))) {
|
||||||
|
compareReportVO.setSymbol(ReportConstant.SymbolEnum.NON_EQ.getValue());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue