From 887d1bea1bfc50ecd93f4d05219211445d1e9587 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Tue, 3 Mar 2026 09:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ConfigSuppliersInfoServiceImpl.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/configSuppliersInfo/service/impl/ConfigSuppliersInfoServiceImpl.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/configSuppliersInfo/service/impl/ConfigSuppliersInfoServiceImpl.java index 8fcb0ff8..cab0e969 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/configSuppliersInfo/service/impl/ConfigSuppliersInfoServiceImpl.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/modules/configSuppliersInfo/service/impl/ConfigSuppliersInfoServiceImpl.java @@ -92,41 +92,41 @@ public class ConfigSuppliersInfoServiceImpl extends ServiceImpl xs != null) // 过滤掉null的供应商物料 .anyMatch(xs -> { // 安全的字段比较,允许null值 - boolean materialNameMatch = (wl.getMaterialName() == null && xs.getMaterialName() == null) || - (wl.getMaterialName() != null && xs.getMaterialName() != null && - wl.getMaterialName().equals(xs.getMaterialName())); +// boolean materialNameMatch = (wl.getMaterialName() == null && xs.getMaterialName() == null) || +// (wl.getMaterialName() != null && xs.getMaterialName() != null && +// wl.getMaterialName().equals(xs.getMaterialName())); +// +// boolean specificationModelMatch = (wl.getSpecificationModel() == null && xs.getSpecificationModel() == null) || +// (wl.getSpecificationModel() != null && xs.getSpecificationModel() != null && +// wl.getSpecificationModel().equals(xs.getSpecificationModel())); +// +// boolean brandTypeMatch = (wl.getBrandType() == null && xs.getBrandType() == null) || +// (wl.getBrandType() != null && xs.getBrandType() != null && +// wl.getBrandType().equals(xs.getBrandType())); - boolean specificationModelMatch = (wl.getSpecificationModel() == null && xs.getSpecificationModel() == null) || - (wl.getSpecificationModel() != null && xs.getSpecificationModel() != null && - wl.getSpecificationModel().equals(xs.getSpecificationModel())); - - boolean brandTypeMatch = (wl.getBrandType() == null && xs.getBrandType() == null) || - (wl.getBrandType() != null && xs.getBrandType() != null && - wl.getBrandType().equals(xs.getBrandType())); - - return materialNameMatch && specificationModelMatch && brandTypeMatch; + return true; }) ) .map(wl -> { // 找到对应的xs项目 NuBizSuppliersMaterialInfo matchedXs = xsList.stream() .filter(xs -> xs != null) - .filter(xs -> { - // 同样的匹配逻辑 - boolean materialNameMatch = (wl.getMaterialName() == null && xs.getMaterialName() == null) || - (wl.getMaterialName() != null && xs.getMaterialName() != null && - wl.getMaterialName().equals(xs.getMaterialName())); - - boolean specificationModelMatch = (wl.getSpecificationModel() == null && xs.getSpecificationModel() == null) || - (wl.getSpecificationModel() != null && xs.getSpecificationModel() != null && - wl.getSpecificationModel().equals(xs.getSpecificationModel())); - - boolean brandTypeMatch = (wl.getBrandType() == null && xs.getBrandType() == null) || - (wl.getBrandType() != null && xs.getBrandType() != null && - wl.getBrandType().equals(xs.getBrandType())); - - return materialNameMatch && specificationModelMatch && brandTypeMatch; - }) +// .filter(xs -> { +// // 同样的匹配逻辑 +// boolean materialNameMatch = (wl.getMaterialName() == null && xs.getMaterialName() == null) || +// (wl.getMaterialName() != null && xs.getMaterialName() != null && +// wl.getMaterialName().equals(xs.getMaterialName())); +// +// boolean specificationModelMatch = (wl.getSpecificationModel() == null && xs.getSpecificationModel() == null) || +// (wl.getSpecificationModel() != null && xs.getSpecificationModel() != null && +// wl.getSpecificationModel().equals(xs.getSpecificationModel())); +// +// boolean brandTypeMatch = (wl.getBrandType() == null && xs.getBrandType() == null) || +// (wl.getBrandType() != null && xs.getBrandType() != null && +// wl.getBrandType().equals(xs.getBrandType())); +// +// return materialNameMatch && specificationModelMatch && brandTypeMatch; +// }) .findFirst() .orElse(null);