Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
8ccbdfdd
提交
8ccbdfdd
authored
3月 27, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
2c7555ff
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
144 行增加
和
11 行删除
+144
-11
MessageInfo.java
...va/com/ebaiyihui/family/doctor/common/bo/MessageInfo.java
+13
-0
SendImMsgDTO.java
.../com/ebaiyihui/family/doctor/common/dto/SendImMsgDTO.java
+2
-0
RegisterPatientVo.java
.../ebaiyihui/family/doctor/common/vo/RegisterPatientVo.java
+4
-0
ReportDetailItemVo.java
...ebaiyihui/family/doctor/common/vo/ReportDetailItemVo.java
+1
-1
ReportDetailVo.java
...com/ebaiyihui/family/doctor/common/vo/ReportDetailVo.java
+1
-1
ReportTypeEnum.java
...hui/family/doctor/server/common/enums/ReportTypeEnum.java
+66
-0
ImChatTemplateImpl.java
...family/doctor/server/service/impl/ImChatTemplateImpl.java
+52
-8
MobileBenefitPackageServiceImpl.java
.../server/service/impl/MobileBenefitPackageServiceImpl.java
+5
-1
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/bo/MessageInfo.java
浏览文件 @
8ccbdfdd
...
@@ -43,6 +43,11 @@ public class MessageInfo {
...
@@ -43,6 +43,11 @@ public class MessageInfo {
*/
*/
private
String
actionType
;
private
String
actionType
;
/**
* 【选填】消息类型:TIMTextElem,TIMLocationElem,TIMFaceElem,TIMCustomElem,TIMSoundElem,TIMImageElem,TIMFileElem, TIMVideoFileElem
*/
private
String
msgType
;
public
List
<
AccountVO
>
getReceiveAccounts
()
{
public
List
<
AccountVO
>
getReceiveAccounts
()
{
return
receiveAccounts
;
return
receiveAccounts
;
}
}
...
@@ -91,6 +96,14 @@ public class MessageInfo {
...
@@ -91,6 +96,14 @@ public class MessageInfo {
this
.
actionType
=
actionType
;
this
.
actionType
=
actionType
;
}
}
public
String
getMsgType
()
{
return
msgType
;
}
public
void
setMsgType
(
String
msgType
)
{
this
.
msgType
=
msgType
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"MessageInfo{"
+
return
"MessageInfo{"
+
...
...
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/SendImMsgDTO.java
浏览文件 @
8ccbdfdd
...
@@ -30,4 +30,6 @@ public class SendImMsgDTO {
...
@@ -30,4 +30,6 @@ public class SendImMsgDTO {
private
String
abnormalId
;
private
String
abnormalId
;
private
String
intention
;
private
String
intention
;
private
String
thirdId
;
}
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/RegisterPatientVo.java
浏览文件 @
8ccbdfdd
...
@@ -36,4 +36,8 @@ public class RegisterPatientVo {
...
@@ -36,4 +36,8 @@ public class RegisterPatientVo {
private
String
intention
;
private
String
intention
;
private
String
doctorId
;
private
String
doctorId
;
private
String
thirdId
;
private
String
userId
;
}
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/ReportDetailItemVo.java
浏览文件 @
8ccbdfdd
...
@@ -13,5 +13,5 @@ public class ReportDetailItemVo {
...
@@ -13,5 +13,5 @@ public class ReportDetailItemVo {
private
String
fileUrl
;
private
String
fileUrl
;
private
String
fileType
;
private
Integer
fileType
;
}
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/ReportDetailVo.java
浏览文件 @
8ccbdfdd
...
@@ -21,7 +21,7 @@ public class ReportDetailVo {
...
@@ -21,7 +21,7 @@ public class ReportDetailVo {
private
String
diagnosis
;
private
String
diagnosis
;
private
String
reportType
;
private
Integer
reportType
;
private
String
createTime
;
private
String
createTime
;
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/common/enums/ReportTypeEnum.java
0 → 100644
浏览文件 @
8ccbdfdd
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
common
.
enums
;
import
org.apache.commons.lang.StringUtils
;
/**
* @ClassName: ReportTypeEnum
* @Author:yanliang
* @Date:2024/3/27 15:10
* @Description
*/
public
enum
ReportTypeEnum
{
// 报告类型,1检查检验, 2就诊病历
INSPECTION
(
"检查检验"
,
1
),
CONSULTATION
(
"就诊病历"
,
2
);
private
String
desc
;
private
Integer
value
;
private
ReportTypeEnum
(
String
desc
,
Integer
value
)
{
this
.
desc
=
desc
;
this
.
value
=
value
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
public
Integer
getValue
()
{
return
value
;
}
public
void
setValue
(
Integer
value
)
{
this
.
value
=
value
;
}
public
static
String
getDesc
(
Integer
value
)
{
if
(
value
==
null
||
value
<
0
)
{
return
null
;
}
for
(
ReportTypeEnum
reportTypeEnum
:
ReportTypeEnum
.
values
())
{
if
(
value
.
equals
(
reportTypeEnum
.
getValue
()))
{
return
reportTypeEnum
.
getDesc
();
}
}
return
null
;
}
public
static
Integer
getValue
(
String
desc
)
{
if
(
StringUtils
.
isBlank
(
desc
))
{
return
null
;
}
for
(
ReportTypeEnum
reportTypeEnum
:
ReportTypeEnum
.
values
())
{
if
(
reportTypeEnum
.
getDesc
().
equals
(
desc
))
{
return
reportTypeEnum
.
getValue
();
}
}
return
null
;
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImChatTemplateImpl.java
浏览文件 @
8ccbdfdd
...
@@ -10,11 +10,15 @@ import com.doctoruser.api.pojo.vo.UserInfoByUserIdRespVO;
...
@@ -10,11 +10,15 @@ import com.doctoruser.api.pojo.vo.UserInfoByUserIdRespVO;
import
com.ebaiyihui.family.doctor.common.bo.*
;
import
com.ebaiyihui.family.doctor.common.bo.*
;
import
com.ebaiyihui.family.doctor.common.dto.DoctorIdDTO
;
import
com.ebaiyihui.family.doctor.common.dto.DoctorIdDTO
;
import
com.ebaiyihui.family.doctor.common.dto.HealthInfoDTO
;
import
com.ebaiyihui.family.doctor.common.dto.HealthInfoDTO
;
import
com.ebaiyihui.family.doctor.common.dto.ReportDetailDTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.vo.ReportDetailItemVo
;
import
com.ebaiyihui.family.doctor.common.vo.ReportDetailVo
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.IMInformConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.ImConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.ImConstants
;
import
com.ebaiyihui.family.doctor.server.common.enums.MsgTempTypeEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.MsgTempTypeEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.ReportTypeEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.SenderEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.SenderEnum
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
...
@@ -26,6 +30,7 @@ import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper;
...
@@ -26,6 +30,7 @@ import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper;
import
com.ebaiyihui.family.doctor.server.service.ImChatTemplate
;
import
com.ebaiyihui.family.doctor.server.service.ImChatTemplate
;
import
com.ebaiyihui.family.doctor.server.util.JsonUtil
;
import
com.ebaiyihui.family.doctor.server.util.JsonUtil
;
import
com.ebaiyihui.family.doctor.server.util.ThirdOrderPushUtil
;
import
com.ebaiyihui.family.doctor.server.util.ThirdOrderPushUtil
;
import
com.ebaiyihui.family.doctor.server.util.UUIDUtil
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
com.ebaiyihui.imforward.client.vo.*
;
import
com.ebaiyihui.imforward.client.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -35,9 +40,7 @@ import org.springframework.stereotype.Service;
...
@@ -35,9 +40,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.text.MessageFormat
;
import
java.text.MessageFormat
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* @ClassName: ImChatTemplateImpl
* @ClassName: ImChatTemplateImpl
...
@@ -153,14 +156,58 @@ public class ImChatTemplateImpl implements ImChatTemplate {
...
@@ -153,14 +156,58 @@ public class ImChatTemplateImpl implements ImChatTemplate {
Boolean
flag
=
false
;
Boolean
flag
=
false
;
if
(!
componentsList
.
isEmpty
())
{
if
(!
componentsList
.
isEmpty
())
{
log
.
info
(
"componentsList={}"
,
componentsList
);
log
.
info
(
"componentsList={}"
,
componentsList
);
String
reportResult
=
""
;
// 报告推送
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
ReportDetailDTO
reportDetailDTO
=
new
ReportDetailDTO
();
reportDetailDTO
.
setThirdId
(
sendImMsgDTO
.
getThirdId
());
reportResult
=
thirdOrderPushUtil
.
getReportDetail
(
reportDetailDTO
);
}
for
(
int
i
=
0
;
i
<
componentsList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
componentsList
.
size
();
i
++)
{
String
content
=
componentsList
.
get
(
i
).
getContent
();
String
content
=
componentsList
.
get
(
i
).
getContent
();
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getAdmId
());
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getAdmId
());
MessageInfo
messageInfo
=
new
MessageInfo
();
MessageInfo
messageInfo
=
new
MessageInfo
();
// 报告解读
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
if
(!
StringUtils
.
isEmpty
(
reportResult
))
{
Result
<
String
>
rrResult
=
JSON
.
parseObject
(
reportResult
,
Result
.
class
);
if
(
rrResult
.
isSuccess
())
{
ReportDetailVo
reportDetailVo
=
JSONObject
.
parseObject
(
rrResult
.
getData
(),
ReportDetailVo
.
class
);
List
<
ReportDetailItemVo
>
reportDetailItemVos
=
reportDetailVo
.
getReportFileList
();
if
(
i
==
1
||
i
==
3
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
}
else
if
(
i
==
2
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
reportDetailVo
.
getReportType
().
equals
(
1
))
{
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
map
.
put
(
"UUID"
,
UUIDUtil
.
getUUID
());
map
.
put
(
"ImageFormat"
,
1
);
for
(
ReportDetailItemVo
reportDetailItemVo
:
reportDetailItemVos
)
{
if
(
reportDetailItemVo
.
getFileType
().
equals
(
1
))
{
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
imageMap
.
put
(
"Type"
,
1
);
imageMap
.
put
(
"URL"
,
reportDetailItemVo
.
getFileUrl
());
mapList
.
add
(
imageMap
);
}
}
map
.
put
(
"ImageInfoArray"
,
mapList
);
}
else
{
map
.
put
(
"UUID"
,
UUIDUtil
.
getUUID
());
map
.
put
(
"URL"
,
reportDetailItemVos
.
get
(
0
).
getFileUrl
());
map
.
put
(
"FileName"
,
StringUtils
.
isEmpty
(
reportDetailVo
.
getReprotName
())
?
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
())
:
reportDetailVo
.
getReprotName
());
map
.
put
(
"Download_Flag"
,
"2"
);
}
content
=
JSONObject
.
toJSONString
(
map
);
}
}
}
// 报告异常特殊处理
}
else
if
(
MsgTempTypeEnum
.
REP_ANO
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
// 报告异常特殊处理
if
(
MsgTempTypeEnum
.
REP_ANO
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
sendImMsgDTO
.
getIntention
());
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
sendImMsgDTO
.
getIntention
());
}
else
{
}
else
{
if
(!
StringUtils
.
isEmpty
(
sendImMsgDTO
.
getOldAdmId
()))
{
if
(!
StringUtils
.
isEmpty
(
sendImMsgDTO
.
getOldAdmId
()))
{
...
@@ -188,9 +235,6 @@ public class ImChatTemplateImpl implements ImChatTemplate {
...
@@ -188,9 +235,6 @@ public class ImChatTemplateImpl implements ImChatTemplate {
}
else
{
}
else
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
())){
}
}
}
}
}
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/MobileBenefitPackageServiceImpl.java
浏览文件 @
8ccbdfdd
...
@@ -126,6 +126,10 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
...
@@ -126,6 +126,10 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
registerPatientVo
.
setDoctorId
(
map
.
get
(
"doctorId"
));
registerPatientVo
.
setDoctorId
(
map
.
get
(
"doctorId"
));
}
}
if
(
Objects
.
nonNull
(
map
.
get
(
"thirdId"
)))
{
registerPatientVo
.
setThirdId
(
map
.
get
(
"thirdId"
));
}
if
(
Objects
.
nonNull
(
map
.
get
(
"signSeqId"
)))
{
if
(
Objects
.
nonNull
(
map
.
get
(
"signSeqId"
)))
{
registerPatientVo
.
setSignSeqId
(
map
.
get
(
"signSeqId"
));
registerPatientVo
.
setSignSeqId
(
map
.
get
(
"signSeqId"
));
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectById
(
Long
.
valueOf
(
map
.
get
(
"signSeqId"
)));
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectById
(
Long
.
valueOf
(
map
.
get
(
"signSeqId"
)));
...
@@ -181,7 +185,7 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
...
@@ -181,7 +185,7 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
mobileBenefitPackageMapper
.
update
(
entity
);
mobileBenefitPackageMapper
.
update
(
entity
);
}
}
registerPatientVo
.
setUserId
(
entity
.
getUserId
());
return
BaseResponse
.
success
(
registerPatientVo
);
return
BaseResponse
.
success
(
registerPatientVo
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论