Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hphy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向怀芳
hphy
Commits
31ba5e43
Commit
31ba5e43
authored
Aug 09, 2023
by
gaozhaochen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 问诊机器人回答定制化处理
parent
617814b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
HpGpIntelligentQAController.java
...e/hpgp/controller/mobile/HpGpIntelligentQAController.java
+9
-1
No files found.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java
View file @
31ba5e43
...
@@ -53,6 +53,8 @@ public class HpGpIntelligentQAController {
...
@@ -53,6 +53,8 @@ public class HpGpIntelligentQAController {
private
static
final
String
ERROR_MSG
=
"使用的人太多啦!等下再用吧!"
;
private
static
final
String
ERROR_MSG
=
"使用的人太多啦!等下再用吧!"
;
private
static
final
Random
RANDOM
=
new
Random
();
private
static
final
Random
RANDOM
=
new
Random
();
private
static
final
Executor
EXECUTOR
=
Executors
.
newFixedThreadPool
(
10
);
private
static
final
Executor
EXECUTOR
=
Executors
.
newFixedThreadPool
(
10
);
// 报告查询、医疗知识问答、医疗分诊、预约挂号
private
static
final
Set
<
String
>
QA_TYPE
=
Sets
.
newHashSet
(
"报告查询"
,
"预约挂号"
);
/**
/**
* 打浦桥科室
* 打浦桥科室
...
@@ -120,7 +122,7 @@ public class HpGpIntelligentQAController {
...
@@ -120,7 +122,7 @@ public class HpGpIntelligentQAController {
public
R
qaV2
(
String
question
)
{
public
R
qaV2
(
String
question
)
{
if
(
StrUtil
.
isNotBlank
(
question
)
&&
question
.
contains
(
"上周的血检报告出了"
))
{
if
(
StrUtil
.
isNotBlank
(
question
)
&&
question
.
contains
(
"上周的血检报告出了"
))
{
IntelligentAnswerVO
answerVO
=
new
IntelligentAnswerVO
();
IntelligentAnswerVO
answerVO
=
new
IntelligentAnswerVO
();
answerVO
.
setAnswer
(
"<a href=\"https://
ffyjs.hpwjsns.org.cn/huangpuH5/healthExam\">https://ffyjs.hpwjsns.org.cn/huangpuH5
/healthExam</a>"
);
answerVO
.
setAnswer
(
"<a href=\"https://
www.sh-sict.com/healthExam\">https://www.sh-sict.com
/healthExam</a>"
);
return
new
R
(
answerVO
);
return
new
R
(
answerVO
);
}
}
CurrentUser
current
=
SecurityUtils
.
getCurrentUser
();
CurrentUser
current
=
SecurityUtils
.
getCurrentUser
();
...
@@ -167,6 +169,12 @@ public class HpGpIntelligentQAController {
...
@@ -167,6 +169,12 @@ public class HpGpIntelligentQAController {
JSONObject
bodyJson
=
JSON
.
parseObject
(
body
);
JSONObject
bodyJson
=
JSON
.
parseObject
(
body
);
String
chat
=
bodyJson
.
getString
(
"Chat"
);
String
chat
=
bodyJson
.
getString
(
"Chat"
);
JSONArray
departmentArray
=
bodyJson
.
getJSONArray
(
"Department"
);
JSONArray
departmentArray
=
bodyJson
.
getJSONArray
(
"Department"
);
String
medicalType
=
bodyJson
.
getString
(
"Medical_type"
);
if
(
StrUtil
.
isNotBlank
(
medicalType
)
&&
QA_TYPE
.
contains
(
medicalType
)){
IntelligentAnswerVO
answerVO
=
new
IntelligentAnswerVO
();
answerVO
.
setAnswer
(
"<a href=\"https://www.sh-sict.com/healthExam\">https://www.sh-sict.com/healthExam</a>"
);
return
new
R
(
answerVO
);
}
if
(
StrUtil
.
isBlank
(
chat
))
{
if
(
StrUtil
.
isBlank
(
chat
))
{
return
new
R
();
return
new
R
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment