Fix Bug #491: 【执行科室配置】保存配置时系统报错
后端修复:时间冲突校验时 organizationService.getById 可能返回 null,增加空值判断避免 NPE 前端修复:保存前校验是否已选择科室,未选择时给出提示并阻断 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -147,8 +147,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
||||
for (OrganizationLocation organizationLocation : organizationLocationList)
|
||||
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||
String organizationName =
|
||||
organizationService.getById(organizationLocation.getOrganizationId()).getName();
|
||||
Organization org = organizationService.getById(organizationLocation.getOrganizationId());
|
||||
String organizationName = org != null ? org.getName() : "未知科室";
|
||||
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user