优化:体格检查正常值

dev_2.1.0
liu 1 year ago
parent e789b680d9
commit 35ce98c4ef

@ -15,8 +15,11 @@ import java.util.List;
@ApiModel(parent = ConfigPhysicalTool.class)
public class PhysicalToolVO extends ConfigPhysicalTool {
@ApiModelProperty("正常值列表")
private List<DefaultPhysicalIndicator> defaultPhysicalIndicatorList;
@ApiModelProperty("需要部位正常值列表")
private List<DefaultPhysicalIndicator> defaultPhysicalIndicatorList;
@ApiModelProperty("无需部位的正常值")
private DefaultPhysicalIndicator noLocationDefaultPhysicalIndicator;
}

@ -59,7 +59,7 @@ public class PhysicalToolManageServiceImpl implements PhysicalToolManageService
List<DefaultPhysicalIndicator> list = defaultPhysicalIndicatorService.lambdaQuery().eq(DefaultPhysicalIndicator::getItemId, id).list();
if (CollUtil.isNotEmpty(list)) {
bean.setDefaultPhysicalIndicatorList(list);
}else {
} else {
bean.setDefaultPhysicalIndicatorList(new ArrayList<>());
}
return bean;
@ -89,6 +89,13 @@ public class PhysicalToolManageServiceImpl implements PhysicalToolManageService
defaultPhysicalIndicatorService.save(defaultPhysicalIndicator);
}
}
// 保存无需部位的正常值(前端要求分开)
if (ObjectUtil.isNotEmpty(physicalToolVO.getNoLocationDefaultPhysicalIndicator())) {
if (physicalToolVO.getRequireLocation() == 0 && StrUtil.isNotBlank(physicalToolVO.getNoLocationDefaultPhysicalIndicator().getLocationId())) {
throw new BusinessException("无需检查位的体格检查项,检查位置必须为空");
}
defaultPhysicalIndicatorService.save(physicalToolVO.getNoLocationDefaultPhysicalIndicator());
}
}
@Override
@ -115,6 +122,14 @@ public class PhysicalToolManageServiceImpl implements PhysicalToolManageService
defaultPhysicalIndicatorService.saveOrUpdate(defaultPhysicalIndicator);
}
}
// 保存无需部位的正常值(前端要求分开)
if (ObjectUtil.isNotEmpty(physicalToolVO.getNoLocationDefaultPhysicalIndicator())) {
if (physicalToolVO.getRequireLocation() == 0 && StrUtil.isNotBlank(physicalToolVO.getNoLocationDefaultPhysicalIndicator().getLocationId())) {
throw new BusinessException("无需检查位的体格检查项,检查位置必须为空");
}
physicalToolVO.getNoLocationDefaultPhysicalIndicator().setItemId(physicalToolVO.getId());
defaultPhysicalIndicatorService.saveOrUpdate(physicalToolVO.getNoLocationDefaultPhysicalIndicator());
}
configPhysicalToolService.updateById(physicalToolVO);

Loading…
Cancel
Save