|
@ -137,7 +137,9 @@ public class ArchiveService extends BaseJpaService<ArchiveDO, ArchiveDao> {
|
|
|
patientDO.setCreateTime(new Date());
|
|
|
patientDO.setUpdateTime(new Date());
|
|
|
patientDO.setPatientStatus("1");
|
|
|
patientDao.save(patientDO);
|
|
|
if(!patientDao.existsByIdcardAndDel(idcard,"1")){
|
|
|
patientDao.save(patientDO);
|
|
|
}
|
|
|
|
|
|
BaseDoctorDO doctorDO = doctorDao.findById(doctorId);
|
|
|
ArchiveDO archiveDO = new ArchiveDO();
|
|
@ -151,9 +153,9 @@ public class ArchiveService extends BaseJpaService<ArchiveDO, ArchiveDao> {
|
|
|
archiveDao.save(archiveDO);
|
|
|
|
|
|
//床位申请修改状态
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByDoctorCode(doctorId);
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findDistinctOrgByDoctorCode(doctorId);
|
|
|
if (hospitalDOs.size()>0){
|
|
|
PatientBedApplyDo bedApplyDo = patientBedApplyDao.findByPatientAndOrgCodeAndStatus(patientDO.getIdcard(),hospitalDOs.get(0).getOrgCode(),1);
|
|
|
PatientBedApplyDo bedApplyDo = patientBedApplyDao.findByIdcardAndOrgCodeAndStatus(patientDO.getIdcard(),hospitalDOs.get(0).getOrgCode(),1);
|
|
|
if (bedApplyDo!=null){
|
|
|
bedApplyDo.setStatus(2);
|
|
|
patientBedApplyDao.save(bedApplyDo);
|
|
@ -178,9 +180,9 @@ public class ArchiveService extends BaseJpaService<ArchiveDO, ArchiveDao> {
|
|
|
archiveDO.setCreateTime(new Date());
|
|
|
archiveDao.save(archiveDO);
|
|
|
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByDoctorCode(doctorId);
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findDistinctOrgByDoctorCode(doctorId);
|
|
|
if (hospitalDOs.size()>0){
|
|
|
PatientBedApplyDo bedApplyDo = patientBedApplyDao.findByPatientAndOrgCodeAndStatus(patientDO.getIdcard(),hospitalDOs.get(0).getOrgCode(),1);
|
|
|
PatientBedApplyDo bedApplyDo = patientBedApplyDao.findByIdcardAndOrgCodeAndStatus(patientDO.getIdcard(),hospitalDOs.get(0).getOrgCode(),1);
|
|
|
if (bedApplyDo!=null){
|
|
|
bedApplyDo.setStatus(2);
|
|
|
patientBedApplyDao.save(bedApplyDo);
|