From 0342d9f4ba7cc7edb4fb3f022c8c5cffcc60127f Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 22 Apr 2025 16:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=2046503=20PCN=EF=BC=9A=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=8F=91=E8=BF=90=E5=8D=A1=E6=8E=A7product=5Fsn=E5=92=8Ccust?= =?UTF-8?q?=5Fsn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shippingscan/strategy/MesShippingScanSnStrategyServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnStrategyServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnStrategyServiceImpl.java index 03739c6..2e47d77 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnStrategyServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnStrategyServiceImpl.java @@ -32,7 +32,6 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import java.util.Comparator; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -152,8 +151,8 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr throw new ImppBusiException(String.format("【%s】此条码已经扫描过,请检查数据!", model.getSn())); } DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode()); - DdlPreparedPack.getStringEqualPack(model.getSn(), "productSn", packBean); - DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); + packBean.setWhereAppend(packBean.getWhereAppend() + " and (model.productSn = '"+ model.getSn() +"' or model.custSn = '"+ model.getSn() + "')"); + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{MesPcnExtConstWords.CREATE_DATE_TIME}, packBean); MesProduceSn produceSn = produceSnRepository.getByProperty(packBean); if (!StringUtils.isEmpty(produceSn)) { if (orderManagement.getStatus() == MesExtEnumUtil.SHIPPING_ORDER_STATUS.UNPACKING.getValue()) {