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
0c1c5938
Commit
0c1c5938
authored
Jul 14, 2022
by
向怀芳
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 患者就诊卡处理
parent
4a9a15b9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
5 deletions
+166
-5
AppointmentController.java
.../sict/theme/hphy/controller/mp/AppointmentController.java
+2
-0
HphyPatientBaseController.java
...t/theme/hphy/controller/mp/HphyPatientBaseController.java
+15
-5
HpPatientCardMapper.java
...va/cn/sh/stc/sict/theme/hphy/dao/HpPatientCardMapper.java
+14
-0
HpPatientCard.java
...n/java/cn/sh/stc/sict/theme/hphy/model/HpPatientCard.java
+35
-0
HpPatientCardService.java
.../sh/stc/sict/theme/hphy/service/HpPatientCardService.java
+24
-0
HpPatientCardServiceImpl.java
...ict/theme/hphy/service/impl/HpPatientCardServiceImpl.java
+63
-0
HpPatientCardMapper.xml
...-schema/src/main/resources/mapper/HpPatientCardMapper.xml
+13
-0
No files found.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentController.java
View file @
0c1c5938
...
...
@@ -38,6 +38,7 @@ public class AppointmentController {
private
HphyPatientBaseService
hphyPatientBaseService
;
private
HpHosInfoService
hosInfoService
;
private
HpDeptInfoService
hpDeptInfoService
;
private
HpPatientCardService
hpPatientCardService
;
@ApiOperation
(
"预约须知"
)
@GetMapping
(
"/app/rule"
)
...
...
@@ -146,6 +147,7 @@ public class AppointmentController {
app
.
setStatus
(
Constant
.
STRING_NO
);
app
.
setEvaStatus
(
Constant
.
BYTE_NO
);
hpAppointmentService
.
save
(
app
);
hpPatientCardService
.
updateByApp
(
patient
,
order
);
return
new
R
().
success
(
result
);
}
return
new
R
().
error
(
"预约失败!"
);
...
...
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
View file @
0c1c5938
...
...
@@ -10,12 +10,12 @@ import cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.R
;
import
cn.sh.stc.sict.cloud.common.core.util.SsbUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.ValidateCodeUtil
;
import
cn.sh.stc.sict.cloud.common.security.util.SecurityUtils
;
import
cn.sh.stc.sict.cloud.upms.dto.CurrentUser
;
import
cn.sh.stc.sict.cloud.upms.model.SysUserBase
;
import
cn.sh.stc.sict.theme.hphy.constant.PatientConstant
;
import
cn.sh.stc.sict.theme.hphy.model.HpPatientCard
;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
cn.sh.stc.sict.theme.hphy.service.HpPatientCardService
;
import
cn.sh.stc.sict.theme.hphy.service.HphyPatientBaseService
;
import
cn.sh.stc.sict.theme.hphy.wd.WanDaHttpUtil
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,6 +43,7 @@ public class HphyPatientBaseController {
private
HphyPatientBaseService
hphyPatientBaseService
;
private
StringRedisTemplate
redisTemplate
;
private
HpPatientCardService
hpPatientCardService
;
/**
* 注册并关联登录信息
...
...
@@ -129,15 +130,16 @@ public class HphyPatientBaseController {
}
// 获取患者信息
HphyPatientBase
base
=
hphyPatientBaseService
.
getByOpenId
(
current
.
getOpenId
());
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
if
(
LoginTypeEnum
.
SSB
.
getType
().
equals
(
source
))
{
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
if
(
LoginTypeEnum
.
SSB
.
getType
().
equals
(
source
))
{
WDUserInfo
userInfo
=
SsbUtil
.
getUserInfo
(
token
);
List
<
WDUserCardInfo
>
cardList
=
SsbUtil
.
getUserCardInfoList
(
token
);
base
=
hphyPatientBaseService
.
saveSSbInfo
(
current
,
userInfo
,
cardList
);
hpPatientCardService
.
save
(
base
,
cardList
);
}
}
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
return
new
R
().
error
(
"患者未实名!"
);
}
if
(
StrUtil
.
isNotBlank
(
base
.
getGender
()))
{
...
...
@@ -147,4 +149,12 @@ public class HphyPatientBaseController {
return
new
R
(
base
);
}
@ApiOperation
(
"获取患者就诊卡list"
)
@GetMapping
(
"/card/list"
)
public
R
listPatientCard
()
{
CurrentUser
current
=
SecurityUtils
.
getCurrentUser
();
List
<
HpPatientCard
>
cardList
=
hpPatientCardService
.
listByUserId
(
current
.
getId
());
return
new
R
(
cardList
);
}
}
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/dao/HpPatientCardMapper.java
0 → 100644
View file @
0c1c5938
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
dao
;
import
cn.sh.stc.sict.theme.hphy.model.HpPatientCard
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 黄浦-患者-卡号(HpPatientCard)表数据库访问层
*
* @author F_xh
* @since 2022-07-14 11:00:02
*/
public
interface
HpPatientCardMapper
extends
BaseMapper
<
HpPatientCard
>
{
}
\ No newline at end of file
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/model/HpPatientCard.java
0 → 100644
View file @
0c1c5938
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
/**
* 黄浦-患者-卡号(HpPatientCard)表实体类
*
* @author F_xh
* @since 2022-07-14 11:00:02
*/
@Data
@SuppressWarnings
(
"serial"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
HpPatientCard
extends
Model
<
HpPatientCard
>
{
private
String
id
;
private
Long
patientId
;
private
Long
userId
;
private
String
cardNo
;
private
String
cardType
;
private
String
hospitalId
;
/**
* 获取主键值
*
* @return 主键值
*/
@Override
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
}
\ No newline at end of file
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpPatientCardService.java
0 → 100644
View file @
0c1c5938
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
service
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserCardInfo
;
import
cn.sh.stc.sict.theme.hphy.model.HpPatientCard
;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
cn.sh.stc.sict.theme.hphy.wd.OrderInfo
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* 黄浦-患者-卡号(HpPatientCard)表服务接口
*
* @author F_xh
* @since 2022-07-14 11:00:02
*/
public
interface
HpPatientCardService
extends
IService
<
HpPatientCard
>
{
void
save
(
HphyPatientBase
base
,
List
<
WDUserCardInfo
>
cardList
);
List
<
HpPatientCard
>
listByUserId
(
Long
userId
);
void
updateByApp
(
HphyPatientBase
patient
,
OrderInfo
order
);
}
\ No newline at end of file
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpPatientCardServiceImpl.java
0 → 100644
View file @
0c1c5938
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserCardInfo
;
import
cn.sh.stc.sict.theme.hphy.dao.HpPatientCardMapper
;
import
cn.sh.stc.sict.theme.hphy.model.HpPatientCard
;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
cn.sh.stc.sict.theme.hphy.service.HpPatientCardService
;
import
cn.sh.stc.sict.theme.hphy.wd.OrderInfo
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 黄浦-患者-卡号(HpPatientCard)表服务实现类
*
* @author F_xh
* @since 2022-07-14 11:00:02
*/
@Service
(
"hpPatientCardService"
)
public
class
HpPatientCardServiceImpl
extends
ServiceImpl
<
HpPatientCardMapper
,
HpPatientCard
>
implements
HpPatientCardService
{
@Override
public
void
save
(
HphyPatientBase
base
,
List
<
WDUserCardInfo
>
cardList
)
{
if
(
CollUtil
.
isNotEmpty
(
cardList
))
{
cardList
.
forEach
(
wdCard
->
{
HpPatientCard
card
=
BeanUtil
.
toBean
(
wdCard
,
HpPatientCard
.
class
);
card
.
setUserId
(
base
.
getUserId
());
card
.
setPatientId
(
base
.
getId
());
this
.
save
(
card
);
});
}
}
@Override
public
List
<
HpPatientCard
>
listByUserId
(
Long
userId
)
{
LambdaQueryWrapper
<
HpPatientCard
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
HpPatientCard:
:
getUserId
,
userId
);
return
this
.
list
(
wrapper
);
}
@Override
public
void
updateByApp
(
HphyPatientBase
patient
,
OrderInfo
order
)
{
if
(
StrUtil
.
isNotBlank
(
order
.
getMediCardId
())
&&
StrUtil
.
isNotBlank
(
order
.
getMediCardType
()))
{
HpPatientCard
card
=
new
HpPatientCard
();
card
.
setCardNo
(
order
.
getMediCardId
());
card
.
setCardType
(
order
.
getMediCardType
());
card
.
setUserId
(
patient
.
getUserId
());
card
.
setPatientId
(
patient
.
getId
());
LambdaQueryWrapper
<
HpPatientCard
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
HpPatientCard:
:
getUserId
,
patient
.
getUserId
())
.
eq
(
HpPatientCard:
:
getPatientId
,
patient
.
getId
())
.
eq
(
HpPatientCard:
:
getCardType
,
order
.
getMediCardType
());
this
.
saveOrUpdate
(
card
,
wrapper
);
}
}
}
\ No newline at end of file
smart-health-modules/theme-schema/src/main/resources/mapper/HpPatientCardMapper.xml
0 → 100644
View file @
0c1c5938
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.sh.stc.sict.theme.dao.HpPatientCardMapper"
>
<resultMap
type=
"cn.sh.stc.sict.theme.model.HpPatientCard"
id=
"HpPatientCardMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"patientId"
column=
"patient_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"cardNo"
column=
"card_no"
/>
<result
property=
"cardType"
column=
"card_type"
/>
<result
property=
"hospitalId"
column=
"hospital_id"
/>
</resultMap>
</mapper>
\ No newline at end of file
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