修改就诊记录。

This commit is contained in:
haown 2024-05-08 17:19:36 +08:00
parent 93c0bffe59
commit 9a15c0f808
3 changed files with 9 additions and 2 deletions

View File

@ -48,6 +48,7 @@ public class AgencyController extends BaseController {
*/ */
@GetMapping("/selectAgencyList") @GetMapping("/selectAgencyList")
public AjaxResult selectAgencyByIdList(Agency agency) { public AjaxResult selectAgencyByIdList(Agency agency) {
// TODO 根据用户角色确定查询范围
return agencyService.selectAgencyByIdList(agency); return agencyService.selectAgencyByIdList(agency);
} }

View File

@ -52,7 +52,7 @@ public class PatientVisitRecordController extends BaseController {
* 查询患者就诊记录基本信息列表 * 查询患者就诊记录基本信息列表
*/ */
@ApiOperation("查询患者就诊记录基本信息列表") @ApiOperation("查询患者就诊记录基本信息列表")
@PreAuthorize("@ss.hasPermi('manage:visit:list')") //@PreAuthorize("@ss.hasPermi('manage:visit:list')")
@GetMapping("/getList") @GetMapping("/getList")
public AjaxResult getList(PatientVisitRecordDto patientVisitRecord) { public AjaxResult getList(PatientVisitRecordDto patientVisitRecord) {
List<PatientVisitRecord> list = patientVisitRecordService.selectPatientVisitRecordList(patientVisitRecord); List<PatientVisitRecord> list = patientVisitRecordService.selectPatientVisitRecordList(patientVisitRecord);

View File

@ -209,6 +209,9 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int saveRecord(PatientVisitRecordInfoSaveDto saveDto) { public int saveRecord(PatientVisitRecordInfoSaveDto saveDto) {
if (saveDto.getPatientId() == null) {
throw new ServiceException("患者信息传输错误!");
}
PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
// 查询患者基本信息 // 查询患者基本信息
PatientBaseInfoVo patientBaseInfo = patientMapper.getPatientBaseInfo(saveDto.getPatientId()); PatientBaseInfoVo patientBaseInfo = patientMapper.getPatientBaseInfo(saveDto.getPatientId());
@ -249,11 +252,14 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int updateRecord(PatientVisitRecordInfoSaveDto updDto) { public int updateRecord(PatientVisitRecordInfoSaveDto updDto) {
if (updDto.getId() == null) { if (updDto.getId() == null) {
throw new ServiceException("数据传输错误"); throw new ServiceException("数据传输错误");
} }
if (updDto.getPatientId() == null) {
throw new ServiceException("患者信息传输错误!");
}
PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyBeanProp(patientVisitRecord, updDto); BeanUtils.copyBeanProp(patientVisitRecord, updDto);
patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());