From 69ea52be42785c4c8f2ce7fc523bb656315c7e9e Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 30 May 2023 16:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E9=83=A8=E7=A0=81=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=90=AF=E7=94=A8=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/BasicOrderPrintController.java | 2 +- .../inout/IoOrderReviewController.java | 2 +- .../impl/InvInnerOrderPrintServiceImpl.java | 6 ++-- .../glxp/api/util/udi/UdiCalCountUtil.java | 33 +++++++++++++------ 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index f63903b0..ac6661e8 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -273,7 +273,7 @@ public class BasicOrderPrintController { bizData.put("index", i); bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode()); String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() + - "#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + obj.getWarehouseCode() + "#" + obj.getDeptCode(); + "#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#"; udiCode = udiCode.replaceAll("#null", "#"); bizData.put("udiCode", udiCode); bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc()); diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java index 020e1d1f..7056ceef 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java @@ -336,7 +336,7 @@ public class IoOrderReviewController extends BaseController { checkCode = checkCode.replace("\u001D", ""); } if (checkCode.toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) { - if (checkOrderCodesBean.getStatus() == Constant.DB_CHECK_ED + if (IntUtil.value(checkOrderCodesBean.getStatus()) == Constant.DB_CHECK_ED && IntUtil.value(checkOrderCodesBean.getReCount()) == checkOrderCodesBean.getScanCount()) { return Constant.CHECK_REPEAT; } diff --git a/src/main/java/com/glxp/api/service/inv/impl/InvInnerOrderPrintServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/InvInnerOrderPrintServiceImpl.java index 3152c3cd..f4c4b866 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/InvInnerOrderPrintServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/InvInnerOrderPrintServiceImpl.java @@ -116,7 +116,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode()); String udiCode = "#" + udiProductEntity.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() + - "#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + udiProductEntity.getWarehouseCode() + "#" + udiProductEntity.getDeptCode(); + "#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ; udiCode = udiCode.replaceAll("#null", "#"); innerOrderPrintEntity.setUdiCode(udiCode); invInnerOrderPrintDao.insert(innerOrderPrintEntity); @@ -165,12 +165,10 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService if (innerOrderQRCodeTextPDFTemplateRequest.getOrderId() != null) { filterStockprintRequest.setSOrderId(innerOrderQRCodeTextPDFTemplateRequest.getOrderId()); deleteStPrintTempRequest.setStockOrderFk(innerOrderQRCodeTextPDFTemplateRequest.getOrderId() + ""); - } else { deleteStPrintTempRequest.setPrintCodeIdFk(innerOrderQRCodeTextPDFTemplateRequest.getQueryId()); filterStockprintRequest.setId(innerOrderQRCodeTextPDFTemplateRequest.getQueryId()); } - innerOrderPdfTempService.delete(deleteStPrintTempRequest); List stockPrintEntities = invInnerOrderPrintService.filterJoinInnerPrint(filterStockprintRequest); if (stockPrintEntities != null && stockPrintEntities.size() > 0) { @@ -285,7 +283,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode()); String udiCode = "#" + obj.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() + - "#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + udiProductEntity.getWarehouseCode() + "#" + udiProductEntity.getDeptCode(); + "#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ; udiCode = udiCode.replaceAll("#null", "#"); innerOrderPrintEntity.setUdiCode(udiCode); invInnerOrderPrintDao.insert(innerOrderPrintEntity); diff --git a/src/main/java/com/glxp/api/util/udi/UdiCalCountUtil.java b/src/main/java/com/glxp/api/util/udi/UdiCalCountUtil.java index 6af1ec10..28b71af0 100644 --- a/src/main/java/com/glxp/api/util/udi/UdiCalCountUtil.java +++ b/src/main/java/com/glxp/api/util/udi/UdiCalCountUtil.java @@ -20,24 +20,37 @@ public class UdiCalCountUtil { // } public int getActCount(UdiRelevanceResponse udiRelevanceResponse) { - int actCount; - if (!udiRelevanceResponse.getUseDy() && (udiRelevanceResponse.getDiType() == null || udiRelevanceResponse.getDiType() != 2)) { - if (udiRelevanceResponse.getBhzxxsbzsl() == 0) { - actCount = udiRelevanceResponse.getZxxsbzbhsydysl(); - } else { + + //启用使用单元 + if (udiRelevanceResponse.getUseDy()) { + if (udiRelevanceResponse.getDiType() == 1) { + if (udiRelevanceResponse.getZxxsbzbhsydysl() == null || udiRelevanceResponse.getZxxsbzbhsydysl() == 0) { + udiRelevanceResponse.setZxxsbzbhsydysl(1); + } + return udiRelevanceResponse.getZxxsbzbhsydysl(); + } else if (udiRelevanceResponse.getDiType() == 4) { if (udiRelevanceResponse.getBhzxxsbzsl() == 0) { udiRelevanceResponse.setBhzxxsbzsl(1); } if (udiRelevanceResponse.getZxxsbzbhsydysl() == null || udiRelevanceResponse.getZxxsbzbhsydysl() == 0) { udiRelevanceResponse.setZxxsbzbhsydysl(1); } - actCount = udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getZxxsbzbhsydysl(); + return udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getZxxsbzbhsydysl(); + } else { + return udiRelevanceResponse.getBhzxxsbzsl(); + } + } else {//不启用使用单元 + if (udiRelevanceResponse.getDiType() == 1) { + return 1; + } else if (udiRelevanceResponse.getDiType() == 4) { + if (udiRelevanceResponse.getBhzxxsbzsl() == 0) { + udiRelevanceResponse.setBhzxxsbzsl(1); + } + return udiRelevanceResponse.getBhzxxsbzsl(); + } else { + return udiRelevanceResponse.getBhzxxsbzsl(); } - } else { - actCount = udiRelevanceResponse.getBhzxxsbzsl(); } - - return actCount; } public int getActCount(IoCodeTempEntity codeTempEntity) {