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);