更新数据库加密相关操作
This commit is contained in:
@@ -133,6 +133,7 @@ class PatientForm extends BaseModel
|
||||
throw new Exception($this->getErrorMsg());
|
||||
}
|
||||
$user_id = \Yii::$app->user->identity->id;
|
||||
$isSave = false;
|
||||
//修改
|
||||
if ($this->id) {
|
||||
$patient = UserPatient::findOne([
|
||||
@@ -143,6 +144,8 @@ class PatientForm extends BaseModel
|
||||
if (!$patient) {
|
||||
throw new Exception('就诊人不存在');
|
||||
}
|
||||
$isSave = true;
|
||||
$idCard = $patient->id_card;
|
||||
} else {//新增
|
||||
$patient = new UserPatient();
|
||||
}
|
||||
@@ -154,6 +157,9 @@ class PatientForm extends BaseModel
|
||||
}
|
||||
$patient->user_id = \Yii::$app->user->id;
|
||||
$patient->attributes = $this->attributes;
|
||||
if ($isSave) {
|
||||
$patient->id_card = $idCard;
|
||||
}
|
||||
$patient->saveOrFail();
|
||||
|
||||
$UserPatientHealthInquiry = UserPatientHealthInquiry::find()->where([
|
||||
|
||||
Reference in New Issue
Block a user