Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
5d7829b4
提交
5d7829b4
authored
3月 18, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
9f655ae7
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
229 行增加
和
8 行删除
+229
-8
ImAccountReqDTO.java
...m/ebaiyihui/family/doctor/common/dto/ImAccountReqDTO.java
+25
-0
ImAccountVo.java
...va/com/ebaiyihui/family/doctor/common/vo/ImAccountVo.java
+103
-0
TeamImAccount.java
.../com/ebaiyihui/family/doctor/common/vo/TeamImAccount.java
+26
-0
PatientSignController.java
...amily/doctor/server/controller/PatientSignController.java
+12
-8
PatientSignService.java
...ihui/family/doctor/server/service/PatientSignService.java
+4
-0
PatientSignServiceImpl.java
...ly/doctor/server/service/impl/PatientSignServiceImpl.java
+59
-0
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/ImAccountReqDTO.java
0 → 100644
浏览文件 @
5d7829b4
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
/**
* @ClassName: ImAccountReqDTO
* @Author:yanliang
* @Date:2024/3/18 13:58
* @Description
*/
@Data
public
class
ImAccountReqDTO
{
private
String
admissionId
;
private
String
orderId
;
@NotBlank
(
message
=
"IM应用编码不能为空"
)
private
String
imAppCode
;
/**
* 新增了团队就诊 在医生端获取账号时 需要传入登陆医生id
*/
private
String
doctorId
;
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/ImAccountVo.java
0 → 100644
浏览文件 @
5d7829b4
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
vo
;
import
java.util.List
;
/**
* @ClassName: ImAccountVo
* @Author:yanliang
* @Date:2024/3/18 13:59
* @Description
*/
public
class
ImAccountVo
{
/**
* 1 个人医生
* 2 团队
*/
private
Integer
doctorType
;
/**
* 如果是团队doctorType=2,则返回群组id
*/
private
String
groupId
;
/**
* 医生imAccount
*/
private
String
docImAccount
;
/**
* 病人imAccount
*/
private
String
patImAccount
;
/**
* 房间号
*/
private
Long
roomNum
;
/**
* 医生imAccount
*/
private
List
<
TeamImAccount
>
teamImAccount
;
public
List
<
TeamImAccount
>
getTeamImAccount
()
{
return
teamImAccount
;
}
public
void
setTeamImAccount
(
List
<
TeamImAccount
>
teamImAccount
)
{
this
.
teamImAccount
=
teamImAccount
;
}
public
String
getDocImAccount
()
{
return
docImAccount
;
}
public
void
setDocImAccount
(
String
docImAccount
)
{
this
.
docImAccount
=
docImAccount
;
}
public
String
getPatImAccount
()
{
return
patImAccount
;
}
public
void
setPatImAccount
(
String
patImAccount
)
{
this
.
patImAccount
=
patImAccount
;
}
public
Integer
getDoctorType
()
{
return
doctorType
;
}
public
void
setDoctorType
(
Integer
doctorType
)
{
this
.
doctorType
=
doctorType
;
}
public
String
getGroupId
()
{
return
groupId
;
}
public
void
setGroupId
(
String
groupId
)
{
this
.
groupId
=
groupId
;
}
public
Long
getRoomNum
()
{
return
roomNum
;
}
public
void
setRoomNum
(
Long
roomNum
)
{
this
.
roomNum
=
roomNum
;
}
@Override
public
String
toString
()
{
return
"ImAccountVo{"
+
"doctorType="
+
doctorType
+
", groupId='"
+
groupId
+
'\''
+
", docImAccount='"
+
docImAccount
+
'\''
+
", patImAccount='"
+
patImAccount
+
'\''
+
", roomNum="
+
roomNum
+
'}'
;
}
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/TeamImAccount.java
0 → 100644
浏览文件 @
5d7829b4
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @ClassName: TeamImAccount
* @Author:yanliang
* @Date:2024/3/18 14:00
* @Description
*/
@Data
public
class
TeamImAccount
{
@ApiModelProperty
(
"医生头像"
)
private
String
portrait
;
@ApiModelProperty
(
"医生姓名"
)
private
String
doctorName
;
@ApiModelProperty
(
"职称"
)
private
String
title
;
@ApiModelProperty
(
"IM账号"
)
private
String
imAccount
;
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/controller/PatientSignController.java
浏览文件 @
5d7829b4
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
controller
;
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
controller
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.*
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.vo.*
;
import
com.ebaiyihui.family.doctor.common.dto.RequestGetDoctorOfficeStatusDTO
;
import
com.ebaiyihui.family.doctor.common.dto.RequestServiceConfigDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoDetailDocResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo
;
import
com.ebaiyihui.family.doctor.common.vo.RequestOnlineOrOfflineVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoResVo
;
import
com.ebaiyihui.family.doctor.server.service.PatientSignService
;
import
com.ebaiyihui.family.doctor.server.service.PatientSignService
;
import
com.ebaiyihui.family.doctor.server.service.ServiceConfigService
;
import
com.ebaiyihui.family.doctor.server.service.ServiceConfigService
;
import
com.ebaiyihui.family.doctor.server.util.PageUtil
;
import
com.ebaiyihui.family.doctor.server.util.PageUtil
;
...
@@ -101,4 +95,14 @@ public class PatientSignController {
...
@@ -101,4 +95,14 @@ public class PatientSignController {
}
}
return
serviceConfigService
.
saveServiceInfo
(
serviceConfigDTO
);
return
serviceConfigService
.
saveServiceInfo
(
serviceConfigDTO
);
}
}
@ApiOperation
(
value
=
"获取im账号,==聊天界面"
,
notes
=
"获取医生和病人的im账号"
)
@RequestMapping
(
value
=
"/queryImAccount"
,
method
=
RequestMethod
.
POST
)
public
BaseResponse
<
ImAccountVo
>
queryImAccount
(
@RequestBody
@Validated
ImAccountReqDTO
param
,
BindingResult
bindingResult
)
{
if
(
bindingResult
.
hasErrors
())
{
return
BaseResponse
.
error
(
bindingResult
.
getFieldError
().
getDefaultMessage
());
}
return
patientSignService
.
queryImAccount
(
param
);
}
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/PatientSignService.java
浏览文件 @
5d7829b4
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
service
;
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
service
;
import
com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ImAccountVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoDetailDocResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoDetailDocResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoResVo
;
import
com.ebaiyihui.family.doctor.common.vo.ImInfoResVo
;
...
@@ -35,4 +37,6 @@ public interface PatientSignService {
...
@@ -35,4 +37,6 @@ public interface PatientSignService {
BaseResponse
<
PageUtil
<
ImInfoListResVo
>>
queryImInfoList
(
ImInfoListDocReqDTO
param
);
BaseResponse
<
PageUtil
<
ImInfoListResVo
>>
queryImInfoList
(
ImInfoListDocReqDTO
param
);
BaseResponse
<
ImInfoDetailDocResVo
>
queryImInfoDetail
(
ImInfoDetailDocReqDTO
param
);
BaseResponse
<
ImInfoDetailDocResVo
>
queryImInfoDetail
(
ImInfoDetailDocReqDTO
param
);
BaseResponse
<
ImAccountVo
>
queryImAccount
(
ImAccountReqDTO
param
);
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientSignServiceImpl.java
浏览文件 @
5d7829b4
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.doctoruser.api.pojo.base.dto.doctor.QueryPersonnelInfoReq
;
import
com.doctoruser.api.pojo.base.dto.doctor.QueryPersonnelInfoReq
;
import
com.doctoruser.api.pojo.base.vo.doctor.PersonnelInfo
;
import
com.doctoruser.api.pojo.base.vo.doctor.PersonnelInfo
;
import
com.ebaiyihui.family.doctor.common.dto.ImAccountReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoDetailDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO
;
import
com.ebaiyihui.family.doctor.common.vo.*
;
import
com.ebaiyihui.family.doctor.common.vo.*
;
...
@@ -240,4 +241,62 @@ public class PatientSignServiceImpl implements PatientSignService {
...
@@ -240,4 +241,62 @@ public class PatientSignServiceImpl implements PatientSignService {
return
BaseResponse
.
success
(
resVo
);
return
BaseResponse
.
success
(
resVo
);
}
}
@Override
public
BaseResponse
<
ImAccountVo
>
queryImAccount
(
ImAccountReqDTO
param
)
{
// 转换imAppCode
if
(
ImConstants
.
IM_DOC_ACCOUNT_NUM
.
equals
(
param
.
getImAppCode
()))
{
param
.
setImAppCode
(
ImConstants
.
IM_PAT_ACCOUNT_NUM
);
}
else
if
(
ImConstants
.
IM_PAT_ACCOUNT_NUM
.
equals
(
param
.
getImAppCode
()))
{
param
.
setImAppCode
(
ImConstants
.
IM_DOC_ACCOUNT_NUM
);
}
if
(
StringUtils
.
isEmpty
(
param
.
getOrderId
())
&&
StringUtils
.
isEmpty
(
param
.
getAdmissionId
()))
{
return
BaseResponse
.
error
(
"不能admssionId和orderId都为空"
);
}
String
admissionId
=
param
.
getAdmissionId
();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setAdmId
(
param
.
getAdmissionId
());
psWrapper
.
setEntity
(
patientSign
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
if
(
StringUtils
.
isEmpty
(
param
.
getDoctorId
()))
{
param
.
setDoctorId
(
String
.
valueOf
(
patientSignEntity
.
getDoctorId
()));
}
return
BaseResponse
.
success
(
getImAccounts
(
patientSignEntity
,
admissionId
,
param
.
getImAppCode
(),
param
.
getDoctorId
()));
}
public
ImAccountVo
getImAccounts
(
PatientSignEntity
patientSignEntity
,
String
admId
,
String
imAppCode
,
String
doctorId
)
{
ImAccountVo
admission
=
new
ImAccountVo
();
IMQueryTargetSdkAccountRspVO
imAccountRes
=
imChatTemplate
.
queryImAccount
(
admId
,
imAppCode
,
doctorId
);
if
(
imAccountRes
==
null
)
{
//查寻Im账户为空,直接新创建,在重新查
imChatTemplate
.
createImSession
(
patientSignEntity
);
IMQueryTargetSdkAccountRspVO
imAccountRes1
=
imChatTemplate
.
queryImAccount
(
admId
,
imAppCode
,
doctorId
);
if
(
imAccountRes1
==
null
)
{
log
.
info
(
"IM ERROR 没有查询到IM账户-admId:{}"
,
admId
);
return
admission
;
}
log
.
info
(
"imAccountRes1:{}"
+
JSON
.
toJSONString
(
imAccountRes1
));
if
(
ImConstants
.
IM_DOC_ACCOUNT_NUM
.
equals
(
imAppCode
))
{
admission
.
setDocImAccount
(
imAccountRes1
.
getSdkAccount
());
}
else
if
(
ImConstants
.
IM_PAT_ACCOUNT_NUM
.
equals
(
imAppCode
))
{
admission
.
setPatImAccount
(
imAccountRes1
.
getSdkAccount
());
}
// 设置房间号
admission
.
setRoomNum
(
imAccountRes1
.
getRoomNum
());
return
admission
;
}
log
.
info
(
"imAccountRes:{}"
+
JSON
.
toJSONString
(
imAccountRes
));
if
(
ImConstants
.
IM_DOC_ACCOUNT_NUM
.
equals
(
imAppCode
))
{
admission
.
setDocImAccount
(
imAccountRes
.
getSdkAccount
());
}
else
if
(
ImConstants
.
IM_PAT_ACCOUNT_NUM
.
equals
(
imAppCode
))
{
admission
.
setPatImAccount
(
imAccountRes
.
getSdkAccount
());
}
// 设置房间号
admission
.
setRoomNum
(
imAccountRes
.
getRoomNum
());
return
admission
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论