From 6b099bff4c2666f497111e88fea4ba6cbc07be37 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 12 Jul 2024 11:45:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=97=E9=9D=96=E9=AB=98=E5=80=BC=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E6=9F=A5=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thrsys/ForThirdSysApiController.java | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/thrsys/ForThirdSysApiController.java b/src/main/java/com/glxp/api/controller/thrsys/ForThirdSysApiController.java index 9dadb5ad6..ea8be6e9d 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ForThirdSysApiController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ForThirdSysApiController.java @@ -87,42 +87,44 @@ public class ForThirdSysApiController { if (checkUdi == null) { return ResultVOUtils.error(500, "收费项目未对照!"); } - boolean checkSuccess = true; - String lostMsg = ""; - //校验条码完整性 - if ("是".equals(checkUdi.getScbssfbhph()) && StrUtil.isEmpty(udiEntity.getBatchNo())) { - checkSuccess = false; - lostMsg = lostMsg + ",批次号"; - } - if ("是".equals(checkUdi.getScbssfbhscrq()) && StrUtil.isEmpty(udiEntity.getProduceDate())) { - checkSuccess = false; - lostMsg = lostMsg + ",生产日期"; - } - - if ("是".equals(checkUdi.getScbssfbhsxrq()) && StrUtil.isEmpty(udiEntity.getExpireDate())) { - checkSuccess = false; - lostMsg = lostMsg + ",失效日期"; - } - - if ("是".equals(checkUdi.getScbssfbhxlh()) && StrUtil.isEmpty(udiEntity.getSerialNo())) { - checkSuccess = false; - lostMsg = lostMsg + ",序列号"; - } - if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) { - return ResultVOUtils.error(504, "序列号超出20位!"); - } - if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) { - return ResultVOUtils.error(504, "批次号超出20位!"); - } - if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) { - checkSuccess = false; - } - if (!checkSuccess) { - return ResultVOUtils.error("UDI码格式错误:缺少" + lostMsg); - } +// boolean checkSuccess = true; +// String lostMsg = ""; +// //校验条码完整性 +// if ("是".equals(checkUdi.getScbssfbhph()) && StrUtil.isEmpty(udiEntity.getBatchNo())) { +// checkSuccess = false; +// lostMsg = lostMsg + ",批次号"; +// } +// if ("是".equals(checkUdi.getScbssfbhscrq()) && StrUtil.isEmpty(udiEntity.getProduceDate())) { +// checkSuccess = false; +// lostMsg = lostMsg + ",生产日期"; +// } +// +// if ("是".equals(checkUdi.getScbssfbhsxrq()) && StrUtil.isEmpty(udiEntity.getExpireDate())) { +// checkSuccess = false; +// lostMsg = lostMsg + ",失效日期"; +// } +// +// if ("是".equals(checkUdi.getScbssfbhxlh()) && StrUtil.isEmpty(udiEntity.getSerialNo())) { +// checkSuccess = false; +// lostMsg = lostMsg + ",序列号"; +// } +// if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) { +// return ResultVOUtils.error(504, "序列号超出20位!"); +// } +// if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) { +// return ResultVOUtils.error(504, "批次号超出20位!"); +// } +// if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) { +// checkSuccess = false; +// } +// if (!checkSuccess) { +// return ResultVOUtils.error("UDI码格式错误:缺少" + lostMsg); +// } IoCodeEntity codeEntity = codeService.getOne(new QueryWrapper().likeLeft("code", filterInvProductRequest.getUdiCode()).last("limit 1")); if (codeEntity == null) { - return ResultVOUtils.error("库存未找到该UDI码,请检查该UDI是否存在错误!"); + codeEntity = codeService.getOne(new QueryWrapper().likeLeft("errUdiCode", filterInvProductRequest.getUdiCode()).last("limit 1")); + if (codeEntity == null) + return ResultVOUtils.error("库存未找到该UDI码,请检查该UDI是否存在错误!"); } //1.获取预验收库存 InvWarehouseEntity preInInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_PREIN);