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
c881f5d0
Commit
c881f5d0
authored
Feb 26, 2021
by
向怀芳
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增发布配置
联调预约等接口
parent
7723d52f
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
97 additions
and
107 deletions
+97
-107
bootstrap-cs.yml
cloud-auth/src/main/resources/bootstrap-cs.yml
+0
-20
bootstrap-hp.yml
cloud-auth/src/main/resources/bootstrap-hp.yml
+3
-3
bootstrap-hp.yml
cloud-gateway/src/main/resources/bootstrap-hp.yml
+4
-4
bootstrap-test.yml
cloud-gateway/src/main/resources/bootstrap-test.yml
+0
-19
bootstrap-cs.yml
...d-upms/cloud-upms-biz/src/main/resources/bootstrap-cs.yml
+0
-18
bootstrap-hp.yml
...d-upms/cloud-upms-biz/src/main/resources/bootstrap-hp.yml
+6
-4
AppointmentController.java
.../sict/theme/hphy/controller/mp/AppointmentController.java
+24
-3
WDController.java
...cn/sh/stc/sict/theme/hphy/controller/mp/WDController.java
+21
-3
HpAppointment.java
...n/java/cn/sh/stc/sict/theme/hphy/model/HpAppointment.java
+5
-0
WanDaConstant.java
...main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaConstant.java
+6
-1
WanDaHttpUtil.java
...main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaHttpUtil.java
+25
-9
bootstrap-hp.yml
...-modules/theme-schema/src/main/resources/bootstrap-hp.yml
+3
-3
bootstrap-test.yml
...odules/theme-schema/src/main/resources/bootstrap-test.yml
+0
-20
No files found.
cloud-auth/src/main/resources/bootstrap-cs.yml
deleted
100644 → 0
View file @
7723d52f
server
:
port
:
10254
spring
:
application
:
name
:
@
artifactId@
main
:
allow-bean-definition-overriding
:
true
# nacos
cloud
:
nacos
:
server-addr
:
172.26.140.130:8848
discovery
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
config
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
shared-configs
:
-
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
\ No newline at end of file
cloud-auth/src/main/resources/bootstrap-
test
.yml
→
cloud-auth/src/main/resources/bootstrap-
hp
.yml
View file @
c881f5d0
...
...
@@ -9,11 +9,11 @@ spring:
# nacos
cloud
:
nacos
:
server-addr
:
1
27.0.0.1
:8848
server-addr
:
1
73.18.1.63
:8848
discovery
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
config
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
shared-configs
:
...
...
cloud-gateway/src/main/resources/bootstrap-
cs
.yml
→
cloud-gateway/src/main/resources/bootstrap-
hp
.yml
View file @
c881f5d0
...
...
@@ -7,15 +7,15 @@ spring:
# nacos
cloud
:
nacos
:
server-addr
:
17
2.26.140.130
:8848
server-addr
:
17
3.18.1.63
:8848
discovery
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
config
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles
:
active
:
dev
active
:
hp
logging
:
config
:
classpath:logback-spring.xml
...
...
cloud-gateway/src/main/resources/bootstrap-test.yml
deleted
100644 → 0
View file @
7723d52f
server
:
port
:
12999
spring
:
application
:
name
:
@
artifactId@
# nacos
cloud
:
nacos
:
server-addr
:
127.0.0.1:8848
discovery
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
config
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
file-extension
:
yml
shared-configs
:
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles
:
active
:
test
\ No newline at end of file
smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-cs.yml
deleted
100644 → 0
View file @
7723d52f
server
:
port
:
10255
spring
:
application
:
name
:
@
artifactId@
main
:
allow-bean-definition-overriding
:
true
# nacos
cloud
:
nacos
:
server-addr
:
172.26.140.130:8848
discovery
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
config
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
\ No newline at end of file
smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-
test
.yml
→
smart-health-modules/cloud-upms/cloud-upms-biz/src/main/resources/bootstrap-
hp
.yml
View file @
c881f5d0
server
:
port
:
1025
5
port
:
1025
6
spring
:
application
:
...
...
@@ -9,10 +9,12 @@ spring:
# nacos
cloud
:
nacos
:
server-addr
:
1
27.0.0.1
:8848
server-addr
:
1
73.18.1.63
:8848
discovery
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
config
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
profiles
:
active
:
hp
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentController.java
View file @
c881f5d0
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
controller
.
mp
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.net.Ipv4Util
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.util.R
;
...
...
@@ -14,6 +17,7 @@ import cn.sh.stc.sict.theme.hphy.model.HpHosInfo;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
cn.sh.stc.sict.theme.hphy.service.HpAppointmentService
;
import
cn.sh.stc.sict.theme.hphy.service.HpDocInfoService
;
import
cn.sh.stc.sict.theme.hphy.service.HpHosInfoService
;
import
cn.sh.stc.sict.theme.hphy.service.HphyPatientBaseService
;
import
cn.sh.stc.sict.theme.hphy.wd.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -40,6 +44,7 @@ public class AppointmentController {
private
HpAppointmentService
hpAppointmentService
;
private
HpDocInfoService
hpDocInfoService
;
private
HphyPatientBaseService
hphyPatientBaseService
;
private
HpHosInfoService
hosInfoService
;
@ApiOperation
(
"预约须知"
)
@GetMapping
(
"/app/rule"
)
...
...
@@ -50,7 +55,7 @@ public class AppointmentController {
@ApiOperation
(
"预约"
)
@PostMapping
(
"/app"
)
public
R
appointment
(
@RequestBody
OrderInfo
order
)
{
public
R
appointment
(
@RequestBody
OrderInfo
order
)
throws
Exception
{
CurrentUser
current
=
SecurityUtils
.
getCurrentUser
();
if
(
StrUtil
.
isBlank
(
current
.
getOpenId
()))
{
return
new
R
().
error
(
"患者信息异常!"
);
...
...
@@ -64,6 +69,10 @@ public class AppointmentController {
if
(
StrUtil
.
isBlank
(
order
.
getScheduleId
())
||
StrUtil
.
isBlank
(
order
.
getNumSourceId
()))
{
return
new
R
().
error
(
"预约排班号源信息不可为空!"
);
}
// HpHosInfo hos = hosInfoService.getById(order.getHosOrgCode());
// if (null == hos) {
// return new R().error("未找到医院信息!");
// }
HphyPatientBase
patient
=
hphyPatientBaseService
.
getByOpenId
(
current
.
getOpenId
());
if
(
null
==
patient
)
{
return
new
R
().
error
(
"未找到患者信息!"
);
...
...
@@ -92,6 +101,10 @@ public class AppointmentController {
order
.
setPlatformType
(
WanDaConstant
.
PLATFORM_TYPE
);
order
.
setChannelName
(
WanDaConstant
.
CHANNEL_NAME
);
order
.
setNumSourceFrom
(
WanDaConstant
.
NUM_SOURCE_FROM
);
order
.
setPatient_type
(
WanDaConstant
.
PATIENT_TYPE_NORMAL
);
order
.
setMediCardId
(
""
);
order
.
setMediCardType
(
""
);
order
.
setUserBD
(
DateUtil
.
format
(
IdcardUtil
.
getBirthDate
(
patient
.
getCertId
()),
DatePattern
.
NORM_DATE_PATTERN
));
AppResult
result
=
WanDaHttpUtil
.
submitOrderByUserInfo
(
order
);
if
(
null
!=
result
)
{
MapperFactory
factory
=
new
DefaultMapperFactory
.
Builder
().
build
();
...
...
@@ -105,6 +118,12 @@ public class AppointmentController {
app
.
setRoom
(
result
.
getRoom
());
app
.
setHosNumSourceId
(
result
.
getHosNumSourceId
());
app
.
setStatus
(
Constant
.
STRING_NO
);
app
.
setHosOrgName
(
docInfo
.
getHosName
());
app
.
setDeptName
(
docInfo
.
getDeptName
());
app
.
setOrderNumType
(
order
.
getOrderNumType
());
app
.
setPatientName
(
patient
.
getName
());
app
.
setResourceName
(
docInfo
.
getResourceName
());
app
.
setStatus
(
Constant
.
STRING_NO
);
hpAppointmentService
.
save
(
app
);
return
new
R
().
success
(
result
);
}
...
...
@@ -113,7 +132,7 @@ public class AppointmentController {
@ApiOperation
(
"取消预约"
)
@PostMapping
(
"/cancel/app"
)
public
R
cancelAppointment
(
@RequestBody
CancelOrderInfo
order
)
{
public
R
cancelAppointment
(
@RequestBody
CancelOrderInfo
order
)
throws
Exception
{
if
(
StrUtil
.
isBlank
(
order
.
getAppId
()))
{
return
new
R
().
error
(
"预约信息不可为空!"
);
}
...
...
@@ -121,6 +140,9 @@ public class AppointmentController {
if
(
null
==
app
)
{
return
new
R
().
error
(
"未找到预约信息!"
);
}
order
.
setCancelObj
(
WanDaConstant
.
CANCELOBJ_PATIENT
);
order
.
setHosOrgCode
(
app
.
getHosOrgCode
());
order
.
setOrderId
(
app
.
getOrderId
());
boolean
flag
=
WanDaHttpUtil
.
orderCancelInfo
(
order
);
if
(
flag
)
{
...
...
@@ -133,7 +155,6 @@ public class AppointmentController {
return
new
R
().
error
(
"取消预约失败!"
);
}
@ApiOperation
(
"预约列表"
)
@GetMapping
(
"/app/list"
)
public
R
appList
(
Page
page
,
...
...
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/WDController.java
View file @
c881f5d0
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
controller
.
mp
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.util.R
;
import
cn.sh.stc.sict.theme.hphy.wd.NumSourceInfo
;
import
cn.sh.stc.sict.theme.hphy.wd.WanDaHttpUtil
;
import
cn.sh.stc.sict.theme.hphy.wd.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -22,6 +23,7 @@ import java.util.List;
public
class
WDController
{
/**
* 0. 发短信
* 1. 医生查询
* 2. 门诊信息查询
* 3. 号源查询
...
...
@@ -35,6 +37,22 @@ public class WDController {
List
<
NumSourceInfo
>
list
=
WanDaHttpUtil
.
getOrderNumInfo
(
numSourceInfo
);
return
new
R
(
list
);
if
(
CollUtil
.
isNotEmpty
(
list
)){
return
R
.
builder
().
code
(
Constant
.
BYTE_YES
).
data
(
list
).
bizCode
(
Constant
.
INT_NO
).
build
();
}
DeptInfo
deptInfo
=
new
DeptInfo
();
deptInfo
.
setHosOrgCode
(
numSourceInfo
.
getHosOrgCode
());
deptInfo
.
setOneDeptCode
(
numSourceInfo
.
getOneDeptCode
());
deptInfo
.
setDeptCode
(
numSourceInfo
.
getDeptCode
());
List
<
OutPatInfo
>
outPatInfo
=
WanDaHttpUtil
.
getResourceOutPatInfo
(
deptInfo
);
if
(
CollUtil
.
isNotEmpty
(
outPatInfo
)){
numSourceInfo
.
setOrderType
(
WanDaConstant
.
ORDER_TYPE_CLINC
);
numSourceInfo
.
setResourceCode
(
outPatInfo
.
get
(
0
).
getResourceCode
());
list
=
WanDaHttpUtil
.
getOrderNumInfo
(
numSourceInfo
);
return
new
R
(
list
);
}
return
new
R
().
success
(
list
);
}
}
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/model/HpAppointment.java
View file @
c881f5d0
...
...
@@ -27,12 +27,14 @@ public class HpAppointment extends Model<HpAppointment> {
//医院代码
@ApiModelProperty
(
value
=
"医院代码"
)
private
String
hosOrgCode
;
private
String
hosOrgName
;
//一级科室代码
@ApiModelProperty
(
value
=
"一级科室代码"
)
private
String
oneDeptCode
;
//二级科室代码
@ApiModelProperty
(
value
=
"二级科室代码"
)
private
String
deptCode
;
private
String
deptName
;
//预约类型:1-医生 2-门诊
@ApiModelProperty
(
value
=
"预约类型:1-医生 2-门诊"
)
private
String
orderType
;
...
...
@@ -61,6 +63,7 @@ public class HpAppointment extends Model<HpAppointment> {
//1+1+1 签约编号
@ApiModelProperty
(
value
=
"1+1+1 签约编号"
)
private
String
patientId
;
private
String
patientName
;
//就诊人卡号
@ApiModelProperty
(
value
=
"就诊人卡号"
)
private
String
mediCardId
;
...
...
@@ -134,6 +137,8 @@ public class HpAppointment extends Model<HpAppointment> {
@ApiModelProperty
(
value
=
"状态:0-默认 1-取消预约"
)
private
String
status
;
private
String
orderNumType
;
private
String
doctorId
;
private
String
orderId
;
private
String
visitNo
;
...
...
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaConstant.java
View file @
c881f5d0
...
...
@@ -6,12 +6,13 @@ public class WanDaConstant {
* 预约类型:医生
*/
public
static
final
String
ORDER_TYPE_OUTP
=
"1"
;
public
static
final
String
ORDER_TYPE_CLINC
=
"2"
;
/**
* 预约方式:其他
*/
public
static
final
String
CHANNEL_CODE_OTHER
=
"
9
"
;
public
static
final
String
CHANNEL_CODE_OTHER
=
"
0
"
;
/**
* 支付方式:到院支付
...
...
@@ -35,4 +36,8 @@ public class WanDaConstant {
public
static
final
String
CHANNEL_NAME
=
"高血压精准导医平台"
;
public
static
final
String
NUM_SOURCE_FROM
=
"3"
;
public
static
final
String
PATIENT_TYPE_NORMAL
=
"1"
;
public
static
final
String
CANCELOBJ_PATIENT
=
"1"
;
}
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaHttpUtil.java
View file @
c881f5d0
...
...
@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.w3c.dom.Document
;
import
org.w3c.dom.NodeList
;
import
javax.print.DocFlavor
;
import
javax.xml.xpath.XPathConstants
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -18,6 +19,7 @@ import java.util.List;
public
class
WanDaHttpUtil
{
String
URL
=
"http://173.18.1.29:7001/yyzlWS/webservice/ss"
;
String
CODE_XPATH
=
"//Response/MessageHeader/code"
;
String
DESC_XPATH
=
"//Response/MessageHeader/desc"
;
/**
* 调用万达 webservice 接口获取医院信息
...
...
@@ -188,16 +190,16 @@ public class WanDaHttpUtil {
* @param orderInfo
* @return
*/
public
AppResult
submitOrderByUserInfo
(
OrderInfo
orderInfo
)
{
public
AppResult
submitOrderByUserInfo
(
OrderInfo
orderInfo
)
throws
Exception
{
String
xml
=
WanDaUtil
.
SubmitOrderByUserInfoServiceXML
(
orderInfo
);
log
.
error
(
"预约xml = {}"
,
xml
);
String
body
=
""
;
//
String body = "";
// TODO 测试环境
//
String body = HttpRequest.post(URL)
//
.body(xml)
//
.execute()
//
.body();
String
body
=
HttpRequest
.
post
(
URL
)
.
body
(
xml
)
.
execute
()
.
body
();
if
(
StrUtil
.
isBlank
(
body
))
{
log
.
error
(
"号源预约 失败"
);
...
...
@@ -207,10 +209,12 @@ public class WanDaHttpUtil {
String
returnXml
=
getReturn
(
body
,
"SubmitOrderByUserInfoService"
);
if
(
Constant
.
STRING_NO
.
equals
(
getCode
(
returnXml
)))
{
Document
document
=
XmlUtil
.
readXML
(
returnXml
);
NodeList
list
=
document
.
getElementsByTagName
(
"
OrderInfo
"
);
NodeList
list
=
document
.
getElementsByTagName
(
"
Result
"
);
if
(
list
.
getLength
()
>
0
)
{
return
XmlUtil
.
xmlToBean
(
list
.
item
(
0
),
AppResult
.
class
);
}
}
else
{
throw
new
Exception
(
getDesc
(
returnXml
));
}
return
null
;
}
...
...
@@ -221,7 +225,7 @@ public class WanDaHttpUtil {
* @param cancelOrderInfo
* @return
*/
public
boolean
orderCancelInfo
(
CancelOrderInfo
cancelOrderInfo
)
{
public
boolean
orderCancelInfo
(
CancelOrderInfo
cancelOrderInfo
)
throws
Exception
{
String
xml
=
WanDaUtil
.
OrderCancelInfoServiceXML
(
cancelOrderInfo
);
String
body
=
HttpRequest
.
post
(
URL
)
...
...
@@ -238,7 +242,7 @@ public class WanDaHttpUtil {
if
(
Constant
.
STRING_NO
.
equals
(
getCode
(
returnXml
)))
{
return
true
;
}
else
{
return
false
;
throw
new
Exception
(
getDesc
(
returnXml
))
;
}
}
...
...
@@ -475,6 +479,18 @@ public class WanDaHttpUtil {
return
code
;
}
private
String
getDesc
(
String
returnStr
)
{
String
desc
=
""
;
try
{
Document
returnDoc
=
XmlUtil
.
readXML
(
returnStr
);
desc
=
(
String
)
XmlUtil
.
getByXPath
(
DESC_XPATH
,
returnDoc
,
XPathConstants
.
STRING
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"获取desc失败!"
);
log
.
error
(
ex
.
getMessage
(),
ex
);
}
return
desc
;
}
private
static
String
getReturn
(
String
body
,
String
response
)
{
String
returnStr
=
""
;
try
{
...
...
smart-health-modules/theme-schema/src/main/resources/bootstrap-
cs
.yml
→
smart-health-modules/theme-schema/src/main/resources/bootstrap-
hp
.yml
View file @
c881f5d0
...
...
@@ -9,10 +9,10 @@ spring:
# nacos
cloud
:
nacos
:
server-addr
:
17
2.26.140.130
:8848
server-addr
:
17
3.18.1.63
:8848
discovery
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
config
:
namespace
:
8e95da30-3e0e-4622-8818-9a9cb4cc6641
namespace
:
d8aa6c84-076c-4a31-826e-5da727d63e06
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
\ No newline at end of file
smart-health-modules/theme-schema/src/main/resources/bootstrap-test.yml
deleted
100644 → 0
View file @
7723d52f
server
:
port
:
10253
spring
:
application
:
name
:
@
artifactId@
main
:
allow-bean-definition-overriding
:
true
# nacos
cloud
:
nacos
:
server-addr
:
127.0.0.1:8848
discovery
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
config
:
namespace
:
173eb3a0-1782-4b36-9681-0a229b2483e5
file-extension
:
yml
shared-dataids
:
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
shared-configs
:
-
application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
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