|
|
@ -10,10 +10,7 @@ import com.ccsens.util.bean.dto.QueryDto; |
|
|
|
import com.ccsens.util.CodeEnum; |
|
|
|
import com.ccsens.util.exception.BaseException; |
|
|
|
import com.ccsens.wisdomcar.bean.dto.PatientAndFamilyDto; |
|
|
|
import com.ccsens.wisdomcar.bean.po.HospitalMember; |
|
|
|
import com.ccsens.wisdomcar.bean.po.HospitalMemberExample; |
|
|
|
import com.ccsens.wisdomcar.bean.po.PatientFamily; |
|
|
|
import com.ccsens.wisdomcar.bean.po.PatientProject; |
|
|
|
import com.ccsens.wisdomcar.bean.po.*; |
|
|
|
import com.ccsens.wisdomcar.bean.vo.PatientAndFamilyVo; |
|
|
|
import com.ccsens.wisdomcar.bean.vo.PatientVo; |
|
|
|
import com.ccsens.wisdomcar.persist.dao.HospitalMemberDao; |
|
|
@ -69,6 +66,19 @@ public class PatientAndFamilyService implements IPatientAndFamilyService{ |
|
|
|
patient.setPhone(param.getPhone()); |
|
|
|
} |
|
|
|
patientProjectDao.updateByPrimaryKeySelective(patient); |
|
|
|
//修改患者家属信息
|
|
|
|
PatientFamilyExample patientFamilyExample = new PatientFamilyExample(); |
|
|
|
patientFamilyExample.createCriteria().andPatientIdEqualTo(param.getId()); |
|
|
|
List<PatientFamily> patientFamilies = patientFamilyDao.selectByExample(patientFamilyExample); |
|
|
|
if (CollectionUtil.isNotEmpty(patientFamilies)){ |
|
|
|
if (ObjectUtil.isNotNull(param.getFamilyName())){ |
|
|
|
patientFamilies.get(0).setName(param.getFamilyName()); |
|
|
|
} |
|
|
|
if (ObjectUtil.isNotNull(param.getFamilyPhone())){ |
|
|
|
patientFamilies.get(0).setPhone(param.getFamilyPhone()); |
|
|
|
} |
|
|
|
patientFamilyDao.updateByPrimaryKeySelective(patientFamilies.get(0)); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
throw new BaseException(Constant.PATIENT_NOT_FOUND); |
|
|
|
} |
|
|
|