Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom
This commit is contained in:
commit
eafeca270c
|
|
@ -226,11 +226,11 @@ public class BomNewEbomChildEntity implements Serializable {
|
||||||
private String materialOriginalUnit;
|
private String materialOriginalUnit;
|
||||||
|
|
||||||
|
|
||||||
private String materialNoAndProjectType;
|
// private String materialNoAndProjectType;
|
||||||
|
|
||||||
public String getMaterialNoAndProjectType() {
|
// public String getMaterialNoAndProjectType() {
|
||||||
return StrUtil.join(materialNo,projectType);
|
// return StrUtil.join(materialNo,projectType);
|
||||||
}
|
// }
|
||||||
|
|
||||||
private static final long serialVersionUID = -14147430944632372L;
|
private static final long serialVersionUID = -14147430944632372L;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -306,10 +306,10 @@ public abstract class BaseConvert {
|
||||||
if (oldChildList.size() != newChildList.size()) {
|
if (oldChildList.size() != newChildList.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Map<String, BomNewEbomChildEntity> oldChildMap = oldChildList.stream().collect(Collectors.toMap(BomNewEbomChildEntity::getMaterialNoAndProjectType , Function.identity()));
|
Map<String, List<BomNewEbomChildEntity> > oldChildMap = oldChildList.stream().collect(Collectors.groupingBy(u->StrUtil.join(u.getMaterialNo(),u.getProjectType()) ));
|
||||||
for (BomNewEbomChildEntity newChild : newChildList) {
|
for (BomNewEbomChildEntity newChild : newChildList) {
|
||||||
String key=StrUtil.join(newChild.getMaterialNo(),newChild.getProjectType());
|
String key=StrUtil.join(newChild.getMaterialNo(),newChild.getProjectType());
|
||||||
if(!oldChildMap.containsKey(key) || Objects.equals(newChild.getNum(), oldChildMap.get(key).getNum()) ){
|
if(!oldChildMap.containsKey(key) || Objects.equals(newChild.getNum(), oldChildMap.get(key).get(0).getNum()) ){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue