From 78d8b00a65285a6fce43948b8c5bc385ac476f84 Mon Sep 17 00:00:00 2001 From: zpl Date: Thu, 2 Sep 2021 13:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=88=B6=E4=BB=B6=E6=89=93=E5=8D=B0?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E5=88=B0=E5=A4=9A=E7=AC=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E8=BF=94=E5=9B=9E=E4=B8=80=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../foreverwin/mesnac/common/mapper/PrintLogMapper.java | 2 +- .../mesnac/common/service/impl/PrintLogServiceImpl.java | 7 ++++++- common/src/main/resources/mapper/PrintLogMapper.xml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/mapper/PrintLogMapper.java b/common/src/main/java/com/foreverwin/mesnac/common/mapper/PrintLogMapper.java index 67ced48f..267b9540 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/mapper/PrintLogMapper.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/mapper/PrintLogMapper.java @@ -26,6 +26,6 @@ public interface PrintLogMapper extends BaseMapper { */ List getPrintLogListByCondition(PrintLog printLog); - LabelPrintDto findSfcPrintInfoBySfc(@Param("sfc") String sfc, @Param("site") String site); + List findSfcPrintInfoBySfc(@Param("sfc") String sfc, @Param("site") String site); } \ No newline at end of file diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java index 6a8af85a..e71cf46f 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/PrintLogServiceImpl.java @@ -109,7 +109,12 @@ public class PrintLogServiceImpl extends ServiceImpl i @Override public LabelPrintDto findSfcPrintInfoBySfc(String sfc) { - return printLogMapper.findSfcPrintInfoBySfc(sfc,CommonMethods.getSite()); + String site = CommonMethods.getSite(); + List sfcPrintInfoBySfc = printLogMapper.findSfcPrintInfoBySfc(sfc, site); + if (sfcPrintInfoBySfc.size() < 1){ + throw BusinessException.build("未找到数据【未生成库存】!"); + } + return sfcPrintInfoBySfc.get(0); } @Override diff --git a/common/src/main/resources/mapper/PrintLogMapper.xml b/common/src/main/resources/mapper/PrintLogMapper.xml index 439f34b5..3d901386 100644 --- a/common/src/main/resources/mapper/PrintLogMapper.xml +++ b/common/src/main/resources/mapper/PrintLogMapper.xml @@ -584,6 +584,7 @@ LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = I.ITEM_BO AND CF."ATTRIBUTE" = 'DRAWING_REVISION' LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = I.ITEM_BO AND CFA."ATTRIBUTE" = 'ACCESSORY_TYPE' WHERE S.SFC = #{sfc} AND I.SITE = #{site} + ORDER BY ZSD.BLANKING_SIZE