|
|
@@ -13,7 +13,7 @@ import com.nb.app.assistant.api.enums.ApplyEnum;
|
|
|
import com.nb.app.assistant.api.enums.BindEnum;
|
|
|
import com.nb.app.assistant.api.feign.result.ContactQuery;
|
|
|
import com.nb.app.assistant.mapper.AssistantUserBindMapper;
|
|
|
-import com.nb.app.assistant.service.result.AssistPatientResult;
|
|
|
+import com.nb.app.assistant.service.dto.AssistPatientResult;
|
|
|
import com.nb.app.msg.bean.MsgBean;
|
|
|
import com.nb.app.msg.enums.MsgEnum;
|
|
|
import com.nb.app.msg.event.SaveMsgEvent;
|
|
|
@@ -130,7 +130,7 @@ public class LocalAssistantUserBindService extends BaseService<AssistantUserBind
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public List<AssistantUserBindEntity> list(ContactQuery query) {
|
|
|
+ public List<AssistantUserBindEntity> contactList(ContactQuery query) {
|
|
|
return this.list(new QueryWrapper<AssistantUserBindEntity>()
|
|
|
.lambda()
|
|
|
.eq(AssistantUserBindEntity::getDoctorId,query.getDoctorId())
|
|
|
@@ -169,13 +169,8 @@ public class LocalAssistantUserBindService extends BaseService<AssistantUserBind
|
|
|
//绑定成功后删除邀请码
|
|
|
patientClient.delInviteCode(userBind.getInviteCode());
|
|
|
}
|
|
|
- return this.update(new UpdateWrapper<AssistantUserBindEntity>()
|
|
|
- .lambda()
|
|
|
- .eq(AssistantUserBindEntity::getId,source.getBindId())
|
|
|
- .set(AssistantUserBindEntity::getDoctorId,source.getDoctorId())
|
|
|
- .set(AssistantUserBindEntity::getStatus,source.getAgree()?BindEnum.SUCCESS:BindEnum.REFUSE)
|
|
|
- .set(!source.getAgree(),AssistantUserBindEntity::getRefuseReason,source.getRefuseReason())
|
|
|
- );
|
|
|
+ //查询是否存在默认看护
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -192,6 +187,15 @@ public class LocalAssistantUserBindService extends BaseService<AssistantUserBind
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean haveBind(String patientCode, String tenantId) {
|
|
|
+ return this.getOne(new QueryWrapper<AssistantUserBindEntity>()
|
|
|
+ .lambda()
|
|
|
+ .eq(AssistantUserBindEntity::getTenantId,tenantId)
|
|
|
+ .eq(AssistantUserBindEntity::getPatientCode,patientCode)
|
|
|
+ .last("limit 1"))!=null;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 描述:查询当前用户所看护的所有病人信息
|
|
|
* @author lifang
|