fix:修复查询指定科室高值库存

lh_dev_fifo
chenhc 7 months ago
parent bc22b85acc
commit 005222859d

@ -126,22 +126,29 @@ public class ForThirdSysApiController {
if (codeEntity == null) if (codeEntity == null)
return ResultVOUtils.error("库存未找到该UDI码请检查该UDI是否存在错误"); return ResultVOUtils.error("库存未找到该UDI码请检查该UDI是否存在错误");
} }
//1.获取预验收库存
InvWarehouseEntity preInInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_PREIN); Integer purType = checkUdi.getPurType();
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) { if (purType != null && purType == 2) {
count = invPreinProductDetailService.vailStockCountByCode(null, preInInv.getCode(), null, filterInvProductRequest.getUdiCode()); count = 1;
} else } else {
count = invPreinProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, preInInv.getCode(), null); //1.获取预验收库存
InvWarehouseEntity preInInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_PREIN);
if (count == 0) { if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
//2.获取寄售库存 count = invPreinProductDetailService.vailStockCountByCode(null, preInInv.getCode(), null, filterInvProductRequest.getUdiCode());
InvWarehouseEntity preInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_ADVANCE); } else
count = invPreProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, preInv.getCode(), null); count = invPreinProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, preInInv.getCode(), null);
}
if (count == 0) { if (count == 0) {
//3.获取入账库库存 //2.获取寄售库存
count = invProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, filterInvProductRequest.getInvCode(), null, true); InvWarehouseEntity preInv = invWarehouseService.findByOne(ConstantStatus.ACTION_TYPE_ADVANCE);
count = invPreProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, preInv.getCode(), null);
}
if (count == 0) {
//3.获取入账库库存
count = invProductDetailService.vailStockCount(checkUdi.getRelId(), udiEntity.getBatchNo(), null, null, filterInvProductRequest.getInvCode(), null, true);
}
} }
InvProductResponse invProductResponse = new InvProductResponse(); InvProductResponse invProductResponse = new InvProductResponse();
BeanUtil.copyProperties(checkUdi, invProductResponse); BeanUtil.copyProperties(checkUdi, invProductResponse);
invProductResponse.setThrCode(checkUdi.getThirdId()); invProductResponse.setThrCode(checkUdi.getThirdId());

Loading…
Cancel
Save