Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
18985711
提交
18985711
authored
4月 12, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'test'
上级
c5006cc9
19923e80
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
135 行增加
和
111 行删除
+135
-111
QueryDoctorsDTO.java
...m/ebaiyihui/family/doctor/common/dto/QueryDoctorsDTO.java
+9
-0
PatientSignService.java
...ihui/family/doctor/server/service/PatientSignService.java
+1
-1
DoctorServiceImpl.java
.../family/doctor/server/service/impl/DoctorServiceImpl.java
+24
-4
ImChatTemplateImpl.java
...family/doctor/server/service/impl/ImChatTemplateImpl.java
+16
-16
PatientServiceImpl.java
...family/doctor/server/service/impl/PatientServiceImpl.java
+60
-59
PatientSignServiceImpl.java
...ly/doctor/server/service/impl/PatientSignServiceImpl.java
+16
-21
ServiceConfigServiceImpl.java
.../doctor/server/service/impl/ServiceConfigServiceImpl.java
+8
-8
SignedTask.java
...a/com/ebaiyihui/family/doctor/server/task/SignedTask.java
+1
-2
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/QueryDoctorsDTO.java
浏览文件 @
18985711
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
package
com
.
ebaiyihui
.
family
.
doctor
.
common
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,4 +18,12 @@ public class QueryDoctorsDTO extends QueryFamousDTO {
...
@@ -17,4 +18,12 @@ public class QueryDoctorsDTO extends QueryFamousDTO {
* 新冠门诊多科室
* 新冠门诊多科室
*/
*/
private
List
<
Long
>
depts
;
private
List
<
Long
>
depts
;
@ApiModelProperty
(
"权益包id"
)
private
String
packageOrderId
;
@ApiModelProperty
(
"签约关联id"
)
private
Long
signSeqId
;
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/PatientSignService.java
浏览文件 @
18985711
...
@@ -48,7 +48,7 @@ public interface PatientSignService {
...
@@ -48,7 +48,7 @@ public interface PatientSignService {
List
<
PatientSignEntity
>
selectList
(
PatientSignEntity
patientSignEntity
);
List
<
PatientSignEntity
>
selectList
(
PatientSignEntity
patientSignEntity
);
List
<
PatientSignEntity
>
getListByPhone
(
String
phone
);
List
<
PatientSignEntity
>
getListByPhone
(
String
phone
,
String
activateOrderId
);
int
updateById
(
PatientSignEntity
patientSignEntity
);
int
updateById
(
PatientSignEntity
patientSignEntity
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/DoctorServiceImpl.java
浏览文件 @
18985711
...
@@ -13,6 +13,7 @@ import com.ebaiyihui.family.doctor.common.dto.*;
...
@@ -13,6 +13,7 @@ import com.ebaiyihui.family.doctor.common.dto.*;
import
com.ebaiyihui.family.doctor.common.vo.*
;
import
com.ebaiyihui.family.doctor.common.vo.*
;
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.SignStatus
;
import
com.ebaiyihui.family.doctor.server.common.enums.SignStatus
;
import
com.ebaiyihui.family.doctor.server.common.enums.StatusEnum
;
import
com.ebaiyihui.family.doctor.server.entity.PatientEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity
;
...
@@ -84,6 +85,7 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -84,6 +85,7 @@ public class DoctorServiceImpl implements DoctorService {
patientSignEntity
.
setPatientId
(
reqVo
.
getPatientId
());
patientSignEntity
.
setPatientId
(
reqVo
.
getPatientId
());
patientSignEntity
.
setOrganId
(
reqVo
.
getOrganId
());
patientSignEntity
.
setOrganId
(
reqVo
.
getOrganId
());
patientSignEntity
.
setSignStatus
(
SignStatus
.
SIGNED
.
getValue
());
patientSignEntity
.
setSignStatus
(
SignStatus
.
SIGNED
.
getValue
());
patientSignEntity
.
setPackageOrderId
(
reqVo
.
getPackageOrderId
());
QueryWrapper
<
PatientEntity
>
pWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PatientEntity
>
pWrapper
=
new
QueryWrapper
<>();
PatientEntity
patient
=
new
PatientEntity
();
PatientEntity
patient
=
new
PatientEntity
();
...
@@ -157,6 +159,26 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -157,6 +159,26 @@ public class DoctorServiceImpl implements DoctorService {
// if (LastSignFlag) {
// if (LastSignFlag) {
// isLastSign(reqVo, doctorListVos, wOrganId, entity, doctorZxwzService);
// isLastSign(reqVo, doctorListVos, wOrganId, entity, doctorZxwzService);
// }
// }
// 过滤签约过的医生信息
if
(
Objects
.
isNull
(
reqVo
.
getSignSeqId
())
&&
Objects
.
nonNull
(
reqVo
.
getPackageOrderId
()))
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
// patientSign.setPackageOrderId(reqVo.getPackageOrderId());
patientSign
.
setPatientId
(
reqVo
.
getPatientId
());
patientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
patientSign
.
setSignStatus
(
SignStatus
.
SIGNED
.
getValue
());
psWrapper
.
setEntity
(
patientSign
);
psWrapper
.
notIn
(
"package_order_id"
,
reqVo
.
getPackageOrderId
());
List
<
PatientSignEntity
>
patientSignEntities
=
patientSignMapper
.
selectList
(
psWrapper
);
log
.
info
(
"patientSignEntities={}"
,
patientSignEntities
);
if
(!
patientSignEntities
.
isEmpty
())
{
List
<
Long
>
patientDoctorIds
=
patientSignEntities
.
stream
().
map
(
PatientSignEntity:
:
getDoctorId
).
collect
(
Collectors
.
toList
());
log
.
info
(
"patientDoctorIds={}"
,
patientDoctorIds
);
doctorListVos
=
doctorListVos
.
stream
().
filter
(
doctorListVo
->
!
patientDoctorIds
.
contains
(
Long
.
valueOf
(
doctorListVo
.
getDoctorId
()))).
collect
(
Collectors
.
toList
());
}
}
pageResult
.
setPageNum
(
reqVo
.
getPageNum
());
pageResult
.
setPageNum
(
reqVo
.
getPageNum
());
pageResult
.
setPageSize
(
doctorListVos
.
size
());
pageResult
.
setPageSize
(
doctorListVos
.
size
());
// pageResult.setPageSize(reqVo.getPageSize());
// pageResult.setPageSize(reqVo.getPageSize());
...
@@ -178,8 +200,7 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -178,8 +200,7 @@ public class DoctorServiceImpl implements DoctorService {
businessDoctorPageReqVo
.
setPageSize
(
9999
);
businessDoctorPageReqVo
.
setPageSize
(
9999
);
businessDoctorPageReqVo
.
setServiceCode
(
ImConstants
.
IM_QUERY_ACCOUNT_CODE
);
businessDoctorPageReqVo
.
setServiceCode
(
ImConstants
.
IM_QUERY_ACCOUNT_CODE
);
BaseResponse
<
PageResult
<
DoctorBasicRespVO
>>
result
=
BaseResponse
<
PageResult
<
DoctorBasicRespVO
>>
result
=
doctorWorkingServiceClient
.
getBusinessDoctorBaseInfoPage
(
businessDoctorPageReqVo
);
doctorWorkingServiceClient
.
getBusinessDoctorBaseInfoPage
(
businessDoctorPageReqVo
);
if
(!
result
.
isSuccess
())
{
if
(!
result
.
isSuccess
())
{
return
BaseResponse
.
error
(
"医生查询失败"
);
return
BaseResponse
.
error
(
"医生查询失败"
);
}
}
...
@@ -408,8 +429,7 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -408,8 +429,7 @@ public class DoctorServiceImpl implements DoctorService {
BeanUtils
.
copyProperties
(
reqVo
,
businessDoctorPageReqVo
);
BeanUtils
.
copyProperties
(
reqVo
,
businessDoctorPageReqVo
);
businessDoctorPageReqVo
.
setServiceCode
(
reqVo
.
getServiceCodes
());
businessDoctorPageReqVo
.
setServiceCode
(
reqVo
.
getServiceCodes
());
log
.
info
(
"医生数据入参"
+
JSON
.
toJSONString
(
businessDoctorPageReqVo
));
log
.
info
(
"医生数据入参"
+
JSON
.
toJSONString
(
businessDoctorPageReqVo
));
BaseResponse
<
PageResult
<
DoctorBasicRespVO
>>
businessDoctorPage
=
BaseResponse
<
PageResult
<
DoctorBasicRespVO
>>
businessDoctorPage
=
doctorWorkingServiceClient
.
getBusinessDoctorBaseInfoPage
(
businessDoctorPageReqVo
);
doctorWorkingServiceClient
.
getBusinessDoctorBaseInfoPage
(
businessDoctorPageReqVo
);
log
.
info
(
"医生数据出参"
+
JSON
.
toJSONString
(
businessDoctorPage
.
getData
()));
log
.
info
(
"医生数据出参"
+
JSON
.
toJSONString
(
businessDoctorPage
.
getData
()));
if
(
null
==
businessDoctorPage
.
getData
())
{
if
(
null
==
businessDoctorPage
.
getData
())
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImChatTemplateImpl.java
浏览文件 @
18985711
...
@@ -181,22 +181,22 @@ public class ImChatTemplateImpl implements ImChatTemplate {
...
@@ -181,22 +181,22 @@ public class ImChatTemplateImpl implements ImChatTemplate {
}
else
if
(
i
==
1
)
{
}
else
if
(
i
==
1
)
{
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
// if (reportDetailVo.getReportType().equals(1)) {
// if (reportDetailVo.getReportType().equals(1)) {
imageMap
.
put
(
"UserAction"
,
CommonConstants
.
USER_ACTION
);
imageMap
.
put
(
"UserAction"
,
CommonConstants
.
USER_ACTION
);
imageMap
.
put
(
"applicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"applicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"appointmentId"
,
sendImMsgDTO
.
getAdmId
());
imageMap
.
put
(
"appointmentId"
,
sendImMsgDTO
.
getAdmId
());
imageMap
.
put
(
"attacheUrl"
,
reportDetailItemVos
.
get
(
0
).
getFileUrl
());
imageMap
.
put
(
"attacheUrl"
,
reportDetailItemVos
.
get
(
0
).
getFileUrl
());
imageMap
.
put
(
"businessCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"businessCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"doctorHeadUrl"
,
patientSignInfo
.
getDoctorHeadPortrait
());
imageMap
.
put
(
"doctorHeadUrl"
,
patientSignInfo
.
getDoctorHeadPortrait
());
imageMap
.
put
(
"doctorName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"doctorName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"msgId"
,
UUIDUtil
.
getUUID
());
imageMap
.
put
(
"msgId"
,
UUIDUtil
.
getUUID
());
imageMap
.
put
(
"msgType"
,
CommonConstants
.
MSG_TYPE
);
imageMap
.
put
(
"msgType"
,
CommonConstants
.
MSG_TYPE
);
imageMap
.
put
(
"senderName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"senderName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"senderProfessional"
,
patientSignInfo
.
getDoctorProfessional
());
imageMap
.
put
(
"senderProfessional"
,
patientSignInfo
.
getDoctorProfessional
());
imageMap
.
put
(
"team"
,
false
);
imageMap
.
put
(
"team"
,
false
);
imageMap
.
put
(
"teamFlag"
,
0
);
imageMap
.
put
(
"teamFlag"
,
0
);
imageMap
.
put
(
"toApplicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"toApplicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
msgType
=
"TIMCustomElem"
;
msgType
=
"TIMCustomElem"
;
// }
// }
content
=
JSONObject
.
toJSONString
(
imageMap
);
content
=
JSONObject
.
toJSONString
(
imageMap
);
}
else
if
(
i
==
2
)
{
}
else
if
(
i
==
2
)
{
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientServiceImpl.java
浏览文件 @
18985711
...
@@ -30,6 +30,7 @@ import com.ebaiyihui.family.doctor.server.util.UUIDUtil;
...
@@ -30,6 +30,7 @@ import com.ebaiyihui.family.doctor.server.util.UUIDUtil;
import
com.ebaiyihui.family.doctor.server.vo.OrderTaskVo
;
import
com.ebaiyihui.family.doctor.server.vo.OrderTaskVo
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
com.ebaiyihui.framework.response.BaseResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -111,72 +112,71 @@ public class PatientServiceImpl implements PatientService {
...
@@ -111,72 +112,71 @@ public class PatientServiceImpl implements PatientService {
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
psWrapper
.
setEntity
(
patientSign
);
psWrapper
.
setEntity
(
patientSign
);
oldPatientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
oldPatientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
}
Date
signCreateTime
=
oldPatientSignEntity
.
getCreateTime
();
PatientSignEntity
tempOldPatientSignEntity
=
new
PatientSignEntity
();
BeanUtils
.
copyProperties
(
oldPatientSignEntity
,
tempOldPatientSignEntity
);
log
.
info
(
"tempOldPatientSignEntity={}"
,
tempOldPatientSignEntity
);
log
.
info
(
"入参查询oldPatientSignEntity={}"
,
oldPatientSignEntity
);
if
(!
oldPatientSignEntity
.
getSignId
().
equals
(
0L
))
{
QueryWrapper
<
PatientSignEntity
>
cpsWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
cPatientSign
=
new
PatientSignEntity
();
cPatientSign
.
setId
(
oldPatientSignEntity
.
getSignId
());
cpsWrapper
.
setEntity
(
cPatientSign
);
oldPatientSignEntity
=
patientSignMapper
.
selectOne
(
cpsWrapper
);
log
.
info
(
"改签查询原始oldPatientSignEntity={}"
,
oldPatientSignEntity
);
if
(!
SignStatus
.
NORMAL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
Integer
signStatus
=
SignStatus
.
SIGNED
.
getValue
();
Integer
status
=
StatusEnum
.
IN_CONSULTATION
.
getValue
();
if
(
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
signStatus
=
SignStatus
.
CANCEL
.
getValue
();
status
=
StatusEnum
.
FINISH_APPLY
.
getValue
();
}
}
List
<
PatientSignEntity
>
patientSignEntities
=
getPatientSignList
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
(),
// 改签查询原始签约信息
signStatus
,
status
);
if
(
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
if
(!
patientSignEntities
.
isEmpty
())
{
if
(!
oldPatientSignEntity
.
getSignId
().
equals
(
0L
))
{
if
(!
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
log
.
info
(
"signCreateTime={}, signStartTime={}, signEndTime={}"
,
signCreateTime
,
signStartTime
,
signEndTime
);
return
BaseResponse
.
error
(
"已经有进行中的签约或者改签医生,不能再进行签约或者改签!!!"
);
if
(
signCreateTime
.
after
(
signStartTime
)
&&
signCreateTime
.
before
(
signEndTime
))
{
return
BaseResponse
.
error
(
"已经有进行中的签约或者改签医生,不能再进行签约或者改签!!!"
);
}
}
}
PatientSignEntity
patientSignEntity
=
patientSignEntities
.
get
(
0
);
// 处理换绑医生
Date
signCreateTime
=
oldPatientSignEntity
.
getCreateTime
();
if
((!
StringUtils
.
isEmpty
(
reqVo
.
getAdmId
())
||
!
StringUtils
.
isEmpty
(
reqVo
.
getSignSeqId
())))
{
log
.
info
(
"signCreateTime={}, signStartTime={}, signEndTime={}"
,
signCreateTime
,
signStartTime
,
signEndTime
);
if
(
Objects
.
nonNull
(
tempOldPatientSignEntity
))
{
if
(
signCreateTime
.
after
(
signStartTime
)
&&
signCreateTime
.
before
(
signEndTime
))
{
signEndTime
=
tempOldPatientSignEntity
.
getSignEndTime
();
return
BaseResponse
.
error
(
"已经有进行中的签约或者改签医生,不能再进行签约或者改签!!!"
);
tempOldPatientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
tempOldPatientSignEntity
.
setSignStatus
(
SignStatus
.
CANCEL
.
getValue
());
tempOldPatientSignEntity
.
setSubStatus
(
2
);
tempOldPatientSignEntity
.
setSignEndTime
(
curDate
);
patientSignMapper
.
updateById
(
tempOldPatientSignEntity
);
}
else
{
return
BaseResponse
.
error
(
"未查询到的签约医生,不能进行改签!!!"
);
}
}
}
oldPatientSignEntity
=
patientSignEntity
;
}
}
else
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setSignId
(
oldPatientSignEntity
.
getId
());
patientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
patientSign
.
setSignStatus
(
SignStatus
.
NORMAL
.
getValue
());
psWrapper
.
setEntity
(
patientSign
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
return
BaseResponse
.
success
(
patientSignEntity
.
getAdmId
());
}
// 查询排班医生信息
ScheduleRecordEntity
scheduleRecordEntity
=
getScheduleDoctor
(
reqVo
.
getPatientId
(),
oldPatientSignEntity
.
getDoctorId
());
doctorId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDoctorId
());
doctorName
=
scheduleRecordEntity
.
getDoctorName
();
deptId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDeptId
());
deptName
=
scheduleRecordEntity
.
getDeptName
();
}
}
else
if
(
SignStatus
.
NORMAL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
// 排班签约信息
QueryWrapper
<
PatientSignEntity
>
nPsWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
nPatientSign
=
new
PatientSignEntity
();
nPatientSign
.
setSignId
(
oldPatientSignEntity
.
getId
());
nPatientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
nPatientSign
.
setSignStatus
(
SignStatus
.
NORMAL
.
getValue
());
nPsWrapper
.
setEntity
(
nPatientSign
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
nPsWrapper
);
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
return
BaseResponse
.
success
(
patientSignEntity
.
getAdmId
());
}
// 处理换绑医生
// 查询排班医生信息
if
((!
StringUtils
.
isEmpty
(
reqVo
.
getAdmId
())
||
!
StringUtils
.
isEmpty
(
reqVo
.
getSignSeqId
()))
ScheduleRecordEntity
scheduleRecordEntity
=
getScheduleDoctor
(
reqVo
.
getPatientId
(),
reqVo
.
getPackageOrderId
(),
tempOldPatientSignEntity
.
getDoctorId
());
&&
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
doctorId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDoctorId
());
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
doctorName
=
scheduleRecordEntity
.
getDoctorName
();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
deptId
=
Long
.
valueOf
(
scheduleRecordEntity
.
getDeptId
());
if
(
Objects
.
nonNull
(
reqVo
.
getAdmId
()))
{
deptName
=
scheduleRecordEntity
.
getDeptName
();
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
}
if
(
Objects
.
nonNull
(
reqVo
.
getSignSeqId
()))
{
patientSign
.
setId
(
Long
.
valueOf
(
reqVo
.
getSignSeqId
()));
}
}
psWrapper
.
setEntity
(
patientSign
);
}
else
{
// 首次签约
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
Integer
signStatus
=
SignStatus
.
SIGNED
.
getValue
();
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
Integer
status
=
StatusEnum
.
IN_CONSULTATION
.
getValue
();
signEndTime
=
patientSignEntity
.
getSignEndTime
();
List
<
PatientSignEntity
>
patientSignEntities
=
getPatientSignList
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
(),
patientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
signStatus
,
status
);
patientSignEntity
.
setSignStatus
(
SignStatus
.
CANCEL
.
getValue
());
if
(!
patientSignEntities
.
isEmpty
())
{
patientSignEntity
.
setSubStatus
(
2
);
if
(
SignStatus
.
SIGNED
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
patientSignEntity
.
setSignEndTime
(
curDate
);
return
BaseResponse
.
error
(
"已经有进行中的签约或者改签医生,不能再进行签约或者改签!!!"
);
patientSignMapper
.
updateById
(
patientSignEntity
);
}
}
else
{
return
BaseResponse
.
error
(
"未查询到的签约医生,不能进行改签!!!"
);
}
}
}
}
...
@@ -310,12 +310,13 @@ public class PatientServiceImpl implements PatientService {
...
@@ -310,12 +310,13 @@ public class PatientServiceImpl implements PatientService {
* @param patientId
* @param patientId
* @return
* @return
*/
*/
public
ScheduleRecordEntity
getScheduleDoctor
(
String
patientId
,
Long
doctorId
)
{
public
ScheduleRecordEntity
getScheduleDoctor
(
String
patientId
,
String
packageOrderId
,
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
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setPatientId
(
patientId
);
patientSign
.
setPatientId
(
patientId
);
patientSign
.
setPackageOrderId
(
packageOrderId
);
patientSign
.
setSignStatus
(
SignStatus
.
NORMAL
.
getValue
());
patientSign
.
setSignStatus
(
SignStatus
.
NORMAL
.
getValue
());
patientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
patientSign
.
setStatus
(
StatusEnum
.
IN_CONSULTATION
.
getValue
());
psWrapper
.
setEntity
(
patientSign
);
psWrapper
.
setEntity
(
patientSign
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientSignServiceImpl.java
浏览文件 @
18985711
...
@@ -184,28 +184,22 @@ public class PatientSignServiceImpl implements PatientSignService {
...
@@ -184,28 +184,22 @@ public class PatientSignServiceImpl implements PatientSignService {
public
BaseResponse
<
PageUtil
<
ImInfoListResVo
>>
queryImInfoList
(
ImInfoListDocReqDTO
param
)
{
public
BaseResponse
<
PageUtil
<
ImInfoListResVo
>>
queryImInfoList
(
ImInfoListDocReqDTO
param
)
{
param
.
setPageNum
((
param
.
getPageNum
()
-
1
)
*
param
.
getPageSize
());
param
.
setPageNum
((
param
.
getPageNum
()
-
1
)
*
param
.
getPageSize
());
List
<
ImInfoListResVo
>
records
=
patientSignMapper
.
queryImInfoList
(
param
);
List
<
ImInfoListResVo
>
records
=
patientSignMapper
.
queryImInfoList
(
param
);
//根据患者id分组
Map
<
String
,
List
<
ImInfoListResVo
>>
collect
=
records
.
stream
().
collect
(
Collectors
.
groupingBy
(
ImInfoListResVo:
:
getPatientId
));
List
<
ImInfoListResVo
>
resVo
=
new
ArrayList
<>();
List
<
ImInfoListResVo
>
resVo
=
new
ArrayList
<>();
for
(
String
key
:
collect
.
keySet
())
{
for
(
ImInfoListResVo
imInfoListResVo
:
records
)
{
List
<
ImInfoListResVo
>
zkFbImInfoListResVos
=
collect
.
get
(
key
);
Integer
age
=
IDCardUtil
.
getAge
(
imInfoListResVo
.
getCredNo
());
List
<
String
>
admIds
=
zkFbImInfoListResVos
.
stream
().
map
(
ImInfoListResVo:
:
getAdmId
).
collect
(
Collectors
.
toList
());
Integer
gender
=
IDCardUtil
.
getGenderForInteger
(
imInfoListResVo
.
getCredNo
());
ImInfoListResVo
record
=
zkFbImInfoListResVos
.
get
(
0
);
Integer
age
=
IDCardUtil
.
getAge
(
record
.
getCredNo
());
imInfoListResVo
.
setAge
(
age
);
Integer
gender
=
IDCardUtil
.
getGenderForInteger
(
record
.
getCredNo
());
imInfoListResVo
.
setGender
(
gender
);
record
.
setAge
(
age
);
String
statusDesc
=
StatusEnum
.
getDesc
(
imInfoListResVo
.
getStatus
());
record
.
setGender
(
gender
);
imInfoListResVo
.
setStatusDesc
(
statusDesc
);
List
<
String
>
admIds
=
new
ArrayList
<>();
String
statusDesc
=
StatusEnum
.
getDesc
(
record
.
getStatus
());
admIds
.
add
(
imInfoListResVo
.
getAdmId
());
record
.
setStatusDesc
(
statusDesc
);
imInfoListResVo
.
setAdmIds
(
admIds
);
imInfoListResVo
.
setStatus
(
imInfoListResVo
.
getStatus
());
record
.
setStatus
(
record
.
getStatus
());
resVo
.
add
(
imInfoListResVo
);
record
.
setAdmIds
(
admIds
);
resVo
.
add
(
record
);
}
}
resVo
=
resVo
.
stream
().
sorted
(
Comparator
.
comparing
(
ImInfoListResVo:
:
getUpdateTime
)).
collect
(
Collectors
.
toList
());
resVo
=
resVo
.
stream
().
sorted
(
Comparator
.
comparing
(
ImInfoListResVo:
:
getUpdateTime
)).
collect
(
Collectors
.
toList
());
...
@@ -318,10 +312,11 @@ public class PatientSignServiceImpl implements PatientSignService {
...
@@ -318,10 +312,11 @@ public class PatientSignServiceImpl implements PatientSignService {
}
}
@Override
@Override
public
List
<
PatientSignEntity
>
getListByPhone
(
String
phone
)
{
public
List
<
PatientSignEntity
>
getListByPhone
(
String
phone
,
String
activateOrderId
)
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
patientSign
.
setPatientPhone
(
phone
);
patientSign
.
setPatientPhone
(
phone
);
patientSign
.
setPackageOrderId
(
activateOrderId
);
psWrapper
.
setEntity
(
patientSign
);
psWrapper
.
setEntity
(
patientSign
);
// psWrapper.orderByDesc("create_time");
// psWrapper.orderByDesc("create_time");
// psWrapper.last("limit 1");
// psWrapper.last("limit 1");
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ServiceConfigServiceImpl.java
浏览文件 @
18985711
...
@@ -79,6 +79,14 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
...
@@ -79,6 +79,14 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
throw
new
BusinessException
(
"未查询到该医生上下线配置信息!"
);
throw
new
BusinessException
(
"未查询到该医生上下线配置信息!"
);
}
}
String
date
=
DateUtils
.
dateToSimpleString
(
new
Date
());
String
hourAndSecond
=
DateUtils
.
getHourAndSecond
();
// 查询排班医生信息
List
<
ScheduleRecordEntity
>
scheduleRecordEntities
=
scheduleRecordMapper
.
selectByDate
(
String
.
valueOf
(
CommonConstants
.
ORGAN_CODE
),
5
,
date
,
1
,
hourAndSecond
,
serviceConfigEntity
.
getDoctorId
());
if
(!
scheduleRecordEntities
.
isEmpty
()){
throw
new
BusinessException
(
"不能上下线,您今天有值班!"
);
}
serviceConfigEntity
.
setOfficeStatus
(
requestOnlineOrOfflineVo
.
getOfficeStatus
());
serviceConfigEntity
.
setOfficeStatus
(
requestOnlineOrOfflineVo
.
getOfficeStatus
());
int
flag
=
serviceConfigMapper
.
updateById
(
serviceConfigEntity
);
int
flag
=
serviceConfigMapper
.
updateById
(
serviceConfigEntity
);
if
(
flag
<=
0
)
{
if
(
flag
<=
0
)
{
...
@@ -88,14 +96,6 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
...
@@ -88,14 +96,6 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
throw
new
BusinessException
(
"上线失败"
);
throw
new
BusinessException
(
"上线失败"
);
}
}
}
}
String
date
=
DateUtils
.
dateToSimpleString
(
new
Date
());
String
hourAndSecond
=
DateUtils
.
getHourAndSecond
();
// 查询排班医生信息
List
<
ScheduleRecordEntity
>
scheduleRecordEntities
=
scheduleRecordMapper
.
selectByDate
(
String
.
valueOf
(
CommonConstants
.
ORGAN_CODE
),
5
,
date
,
1
,
hourAndSecond
,
serviceConfigEntity
.
getDoctorId
());
if
(!
scheduleRecordEntities
.
isEmpty
()){
throw
new
BusinessException
(
"不能上下线,您今天有值班!"
);
}
return
requestOnlineOrOfflineVo
;
return
requestOnlineOrOfflineVo
;
}
}
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/task/SignedTask.java
浏览文件 @
18985711
...
@@ -202,11 +202,10 @@ public class SignedTask {
...
@@ -202,11 +202,10 @@ public class SignedTask {
for
(
MobileBenefitPackageEntity
mbp
:
mobileBenefitPackageEntities
)
{
for
(
MobileBenefitPackageEntity
mbp
:
mobileBenefitPackageEntities
)
{
Date
curTime
=
new
Date
();
Date
curTime
=
new
Date
();
Date
endTime
=
DateUtils
.
parseDate
(
mbp
.
getBenefitsEndTime
(),
DateUtils
.
FULL_FORMAT
);
Date
endTime
=
DateUtils
.
parseDate
(
mbp
.
getBenefitsEndTime
(),
DateUtils
.
FULL_FORMAT
);
List
<
PatientSignEntity
>
patientSignEntities
=
patientSignSevice
.
getListByPhone
(
mbp
.
getPhone
());
List
<
PatientSignEntity
>
patientSignEntities
=
patientSignSevice
.
getListByPhone
(
mbp
.
getPhone
()
,
mbp
.
getActivateOrderId
()
);
mbp
.
setVersion
(
1
);
mbp
.
setVersion
(
1
);
for
(
PatientSignEntity
patientSignEntity
:
patientSignEntities
)
{
for
(
PatientSignEntity
patientSignEntity
:
patientSignEntities
)
{
if
(
endTime
.
after
(
curTime
))
{
if
(
endTime
.
after
(
curTime
))
{
patientSignEntity
.
setPackageOrderId
(
mbp
.
getActivateOrderId
());
patientSignEntity
.
setSignEndTime
(
endTime
);
patientSignEntity
.
setSignEndTime
(
endTime
);
}
else
{
}
else
{
if
(
SignStatus
.
SIGNED
.
getValue
().
equals
(
patientSignEntity
.
getSignStatus
())
if
(
SignStatus
.
SIGNED
.
getValue
().
equals
(
patientSignEntity
.
getSignStatus
())
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论