字段异常

This commit is contained in:
luoliming 2024-05-15 11:19:06 +08:00
parent d20cc3dc57
commit f22e96b99b
2 changed files with 6 additions and 6 deletions

View File

@ -226,11 +226,11 @@ public class BomNewEbomChildEntity implements Serializable {
private String materialOriginalUnit;
private String materialNoAndProjectType;
// private String materialNoAndProjectType;
public String getMaterialNoAndProjectType() {
return StrUtil.join(materialNo,projectType);
}
// public String getMaterialNoAndProjectType() {
// return StrUtil.join(materialNo,projectType);
// }
private static final long serialVersionUID = -14147430944632372L;

View File

@ -306,10 +306,10 @@ public abstract class BaseConvert {
if (oldChildList.size() != newChildList.size()) {
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) {
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;
}
}