diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java index facddda2..35270c7d 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java @@ -638,7 +638,7 @@ public class WareHouseController { if (bussinessTypeEntity.isPreIn()) { if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) { List invProductDetailEntities = invPreInProductDetailService.findByOriginCode(code); - if(CollUtil.isNotEmpty(invProductDetailEntities)){ + if (CollUtil.isNotEmpty(invProductDetailEntities)) { return ResultVOUtils.error(500, "条码已存在!"); } } @@ -846,18 +846,18 @@ public class WareHouseController { if (warehouseEntityList.get(i).getCode().equals(code)) { return drugCodeSelectEntity; } - - if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getNameCode()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) { + UdiEntity originUdiEntity = FilterUdiUtils.getUdi(code); + if (!StrUtil.emptyIfNull(originUdiEntity.getUdi()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) { continue; } - if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getBatchNo()).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()))) { + if (!StrUtil.emptyIfNull(originUdiEntity.getBatchNo()).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()))) { continue; } - if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) { + if (!StrUtil.emptyIfNull(originUdiEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) { continue; } - if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getExpireDate()).equals(StrUtil.emptyIfNull(udiEntity.getExpireDate()))) { + if (!StrUtil.emptyIfNull(originUdiEntity.getExpireDate()).equals(StrUtil.emptyIfNull(udiEntity.getExpireDate()))) { continue; } return drugCodeSelectEntity;