Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
9e303581
提交
9e303581
authored
3月 25, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
8685e547
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
11 行删除
+17
-11
PatientServiceImpl.java
...family/doctor/server/service/impl/PatientServiceImpl.java
+17
-11
没有找到文件。
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientServiceImpl.java
浏览文件 @
9e303581
...
@@ -37,6 +37,7 @@ import java.util.Date;
...
@@ -37,6 +37,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Random
;
import
java.util.Random
;
import
java.util.stream.Collectors
;
/**
/**
* @ClassName: PatientServiceImpl
* @ClassName: PatientServiceImpl
...
@@ -97,6 +98,17 @@ public class PatientServiceImpl implements PatientService {
...
@@ -97,6 +98,17 @@ public class PatientServiceImpl implements PatientService {
String
doctorName
=
reqVo
.
getDoctorName
();
String
doctorName
=
reqVo
.
getDoctorName
();
Long
deptId
=
reqVo
.
getDeptId
();
Long
deptId
=
reqVo
.
getDeptId
();
String
deptName
=
reqVo
.
getDeptName
();
String
deptName
=
reqVo
.
getDeptName
();
PatientSignEntity
oldPatientSignEntity
=
new
PatientSignEntity
();
// 改签或者排班医生获取签约的id
if
(!
SignStatus
.
SIGNED
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
psWrapper
.
setEntity
(
patientSign
);
oldPatientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
}
if
(!
SignStatus
.
NORMAL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
if
(!
SignStatus
.
NORMAL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
List
<
PatientSignEntity
>
patientSignEntities
=
getPatientSignList
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
(),
List
<
PatientSignEntity
>
patientSignEntities
=
getPatientSignList
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
(),
reqVo
.
getSignStatus
(),
StatusEnum
.
IN_CONSULTATION
.
getValue
());
reqVo
.
getSignStatus
(),
StatusEnum
.
IN_CONSULTATION
.
getValue
());
...
@@ -120,21 +132,13 @@ public class PatientServiceImpl implements PatientService {
...
@@ -120,21 +132,13 @@ public class PatientServiceImpl implements PatientService {
}
}
// 查询排班医生信息
// 查询排班医生信息
ScheduleRecordEntity
scheduleRecordEntity
=
getScheduleDoctor
(
reqVo
.
getPatientId
());
ScheduleRecordEntity
scheduleRecordEntity
=
getScheduleDoctor
(
reqVo
.
getPatientId
()
,
oldPatientSignEntity
.
getDoctorId
()
);
doctorId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDoctorId
());
doctorId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDoctorId
());
doctorName
=
scheduleRecordEntity
.
getDoctorName
();
doctorName
=
scheduleRecordEntity
.
getDoctorName
();
deptId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDeptId
());
deptId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDeptId
());
deptName
=
scheduleRecordEntity
.
getDeptName
();
deptName
=
scheduleRecordEntity
.
getDeptName
();
}
}
PatientSignEntity
oldPatientSignEntity
=
new
PatientSignEntity
();
// 改签或者排班医生获取签约的id
if
(!
SignStatus
.
SIGNED
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
psWrapper
.
setEntity
(
patientSign
);
oldPatientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
}
// 处理换绑医生
// 处理换绑医生
if
((!
StringUtils
.
isEmpty
(
reqVo
.
getAdmId
())
||
!
StringUtils
.
isEmpty
(
reqVo
.
getSignSeqId
()))
if
((!
StringUtils
.
isEmpty
(
reqVo
.
getAdmId
())
||
!
StringUtils
.
isEmpty
(
reqVo
.
getSignSeqId
()))
...
@@ -284,7 +288,7 @@ public class PatientServiceImpl implements PatientService {
...
@@ -284,7 +288,7 @@ public class PatientServiceImpl implements PatientService {
* @param patientId
* @param patientId
* @return
* @return
*/
*/
public
ScheduleRecordEntity
getScheduleDoctor
(
String
patientId
)
{
public
ScheduleRecordEntity
getScheduleDoctor
(
String
patientId
,
Long
doctorId
)
{
String
date
=
DateUtils
.
dateToSimpleString
(
new
Date
());
String
date
=
DateUtils
.
dateToSimpleString
(
new
Date
());
String
hourAndSecond
=
DateUtils
.
getHourAndSecond
();
String
hourAndSecond
=
DateUtils
.
getHourAndSecond
();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
...
@@ -305,6 +309,8 @@ public class PatientServiceImpl implements PatientService {
...
@@ -305,6 +309,8 @@ public class PatientServiceImpl implements PatientService {
throw
new
BusinessException
(
"暂无排班医生,请稍后重试"
);
throw
new
BusinessException
(
"暂无排班医生,请稍后重试"
);
}
}
scheduleRecordEntities
.
stream
().
filter
(
scheduleRecordEntity
->
!
scheduleRecordEntity
.
getDoctorId
().
equals
(
doctorId
)).
collect
(
Collectors
.
toList
());
ScheduleRecordEntity
scheduleRecordEntity
=
new
ScheduleRecordEntity
();
ScheduleRecordEntity
scheduleRecordEntity
=
new
ScheduleRecordEntity
();
Random
random
=
new
Random
();
Random
random
=
new
Random
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论