修改更新条件

This commit is contained in:
Flow 2025-06-27 11:07:22 +08:00
parent d962a3851e
commit 25052e565f
3 changed files with 23 additions and 0 deletions

View File

@ -2049,4 +2049,12 @@ public class InspectPatientController {
patientService.updateChiefinspector(medicalSn, chiefinspectorid, chiefinspector);
return success(true);
}
@PutMapping("/updatePatientStatus")
@Operation(summary = "根据体检编号更新患者状态")
public CommonResult<Boolean> updatePatientStatus(@RequestParam("medicalSn") String medicalSn,
@RequestParam("status") Integer status) {
patientService.updatePatientStatus(medicalSn, status);
return success(true);
}
}

View File

@ -199,4 +199,11 @@ public interface InspectPatientService {
* @param chiefinspector 总检医生姓名
*/
void updateChiefinspector(String medicalSn, String chiefinspectorid, String chiefinspector);
/**
* 根据体检编号更新患者状态
* @param medicalSn 体检编号
* @param status 状态
*/
void updatePatientStatus(String medicalSn, Integer status);
}

View File

@ -1197,4 +1197,12 @@ public class InspectPatientServiceImpl implements InspectPatientService {
.set(InspectPatientDO::getChiefinspector, updateReqVO.getChiefinspector());
patientMapper.update(null, updateWrapper);
}
@Override
public void updatePatientStatus(String medicalSn, Integer status) {
LambdaUpdateWrapper<InspectPatientDO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(InspectPatientDO::getMedicalSn, medicalSn)
.set(InspectPatientDO::getStatus, status);
patientMapper.update(null, updateWrapper);
}
}