Root Cause: SpecialAdviceAppServiceImpl.saveLeaveHospitalOrders() 在第 436 行调用 .getRecords().get(0) 时,如果 getAdviceBaseInfo 返回空列表,会抛出 IndexOutOfBoundsException。 Fix: 1. 用 CollectionUtils.isEmpty() 判空,空时返回友好错误提示 2. 修复 endTime = endTime 的无操作逻辑,改为默认当前时间
Root Cause: SpecialAdviceAppServiceImpl.saveLeaveHospitalOrders() 在第 436 行调用 .getRecords().get(0) 时,如果 getAdviceBaseInfo 返回空列表,会抛出 IndexOutOfBoundsException。 Fix: 1. 用 CollectionUtils.isEmpty() 判空,空时返回友好错误提示 2. 修复 endTime = endTime 的无操作逻辑,改为默认当前时间