Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
37f0d270
提交
37f0d270
authored
4月 03, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'test'
上级
5eecb5b3
ce2b119f
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
47 行增加
和
2 行删除
+47
-2
ScheduleRecordMapper.java
...hui/family/doctor/server/mapper/ScheduleRecordMapper.java
+2
-1
PatientServiceImpl.java
...family/doctor/server/service/impl/PatientServiceImpl.java
+25
-1
ServiceConfigServiceImpl.java
.../doctor/server/service/impl/ServiceConfigServiceImpl.java
+17
-0
ScheduleRecordMapper.xml
...server/src/main/resources/mapper/ScheduleRecordMapper.xml
+3
-0
没有找到文件。
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/mapper/ScheduleRecordMapper.java
浏览文件 @
37f0d270
...
@@ -20,5 +20,6 @@ public interface ScheduleRecordMapper extends BaseMapper<ScheduleRecordEntity> {
...
@@ -20,5 +20,6 @@ public interface ScheduleRecordMapper extends BaseMapper<ScheduleRecordEntity> {
@Param
(
"servType"
)
Integer
servType
,
@Param
(
"servType"
)
Integer
servType
,
@Param
(
"scheduleDate"
)
String
scheduleDate
,
@Param
(
"scheduleDate"
)
String
scheduleDate
,
@Param
(
"status"
)
Integer
status
,
@Param
(
"status"
)
Integer
status
,
@Param
(
"endStart"
)
String
endStart
);
@Param
(
"endStart"
)
String
endStart
,
@Param
(
"doctorId"
)
String
doctorId
);
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientServiceImpl.java
浏览文件 @
37f0d270
...
@@ -6,16 +6,19 @@ import com.ebaiyihui.family.doctor.common.dto.NotifyConsultDataDTO;
...
@@ -6,16 +6,19 @@ import com.ebaiyihui.family.doctor.common.dto.NotifyConsultDataDTO;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.dto.SendImMsgDTO
;
import
com.ebaiyihui.family.doctor.common.dto.SignedDoctorDTO
;
import
com.ebaiyihui.family.doctor.common.dto.SignedDoctorDTO
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.constants.ImConstants
;
import
com.ebaiyihui.family.doctor.server.common.enums.ImSignStatus
;
import
com.ebaiyihui.family.doctor.server.common.enums.ImSignStatus
;
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.common.enums.StatusEnum
;
import
com.ebaiyihui.family.doctor.server.entity.MobileBenefitPackageEntity
;
import
com.ebaiyihui.family.doctor.server.entity.MobileBenefitPackageEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.PatientSignEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ScheduleRecordEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ScheduleRecordEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.mapper.MobileBenefitPackageMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.MobileBenefitPackageMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.ScheduleRecordMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.ScheduleRecordMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.ServiceConfigMapper
;
import
com.ebaiyihui.family.doctor.server.rabbitmq.RabbitProduct
;
import
com.ebaiyihui.family.doctor.server.rabbitmq.RabbitProduct
;
import
com.ebaiyihui.family.doctor.server.service.GoEasyPushService
;
import
com.ebaiyihui.family.doctor.server.service.GoEasyPushService
;
import
com.ebaiyihui.family.doctor.server.service.ImChatTemplate
;
import
com.ebaiyihui.family.doctor.server.service.ImChatTemplate
;
...
@@ -49,6 +52,9 @@ public class PatientServiceImpl implements PatientService {
...
@@ -49,6 +52,9 @@ public class PatientServiceImpl implements PatientService {
@Autowired
@Autowired
private
PatientSignMapper
patientSignMapper
;
private
PatientSignMapper
patientSignMapper
;
@Autowired
private
ServiceConfigMapper
serviceConfigMapper
;
@Autowired
@Autowired
private
MobileBenefitPackageMapper
mobileBenefitPackageMapper
;
private
MobileBenefitPackageMapper
mobileBenefitPackageMapper
;
...
@@ -318,7 +324,7 @@ public class PatientServiceImpl implements PatientService {
...
@@ -318,7 +324,7 @@ public class PatientServiceImpl implements PatientService {
throw
new
BusinessException
(
"已有进行中排班医生沟通,请勿重复点击"
);
throw
new
BusinessException
(
"已有进行中排班医生沟通,请勿重复点击"
);
}
}
// 查询排班医生信息
// 查询排班医生信息
List
<
ScheduleRecordEntity
>
scheduleRecordEntities
=
scheduleRecordMapper
.
selectByDate
(
String
.
valueOf
(
CommonConstants
.
ORGAN_CODE
),
5
,
date
,
1
,
hourAndSecond
);
List
<
ScheduleRecordEntity
>
scheduleRecordEntities
=
scheduleRecordMapper
.
selectByDate
(
String
.
valueOf
(
CommonConstants
.
ORGAN_CODE
),
5
,
date
,
1
,
hourAndSecond
,
null
);
log
.
info
(
"当前排班医生:{},传进来过滤的医生id={}"
,
JSON
.
toJSONString
(
scheduleRecordEntities
),
doctorId
);
log
.
info
(
"当前排班医生:{},传进来过滤的医生id={}"
,
JSON
.
toJSONString
(
scheduleRecordEntities
),
doctorId
);
if
(!
CollectionUtils
.
isEmpty
(
scheduleRecordEntities
))
{
if
(!
CollectionUtils
.
isEmpty
(
scheduleRecordEntities
))
{
...
@@ -340,6 +346,24 @@ public class PatientServiceImpl implements PatientService {
...
@@ -340,6 +346,24 @@ public class PatientServiceImpl implements PatientService {
}
}
scheduleRecordEntity
=
scheduleRecordEntities
.
get
(
i
-
1
);
scheduleRecordEntity
=
scheduleRecordEntities
.
get
(
i
-
1
);
log
.
info
(
"查询当前排班医生doctorId={}"
,
scheduleRecordEntity
.
getDoctorId
());
// 查询值班的医生是否在线,如果不在线则强制在线,以排班信息为准
QueryWrapper
<
ServiceConfigEntity
>
queryWrapper
=
new
QueryWrapper
<>();
ServiceConfigEntity
wrapperEntity
=
new
ServiceConfigEntity
();
wrapperEntity
.
setOrganId
(
String
.
valueOf
(
CommonConstants
.
ORGAN_CODE
));
wrapperEntity
.
setAppCode
(
CommonConstants
.
APP_CODE
);
wrapperEntity
.
setDoctorId
(
scheduleRecordEntity
.
getDoctorId
());
wrapperEntity
.
setServiceCode
(
ImConstants
.
IM_QUERY_ACCOUNT_CODE
);
wrapperEntity
.
setStatus
(
1
);
queryWrapper
.
setEntity
(
wrapperEntity
);
queryWrapper
.
last
(
"limit 1"
);
ServiceConfigEntity
serviceConfigEntity
=
serviceConfigMapper
.
selectOne
(
queryWrapper
);
log
.
info
(
"查询当前排班医生信息serviceConfigEntity={}"
,
serviceConfigEntity
);
if
(
Objects
.
nonNull
(
serviceConfigEntity
)
&&
serviceConfigEntity
.
getOfficeStatus
().
equals
(-
1
))
{
serviceConfigEntity
.
setOfficeStatus
(
1
);
serviceConfigMapper
.
updateById
(
serviceConfigEntity
);
}
log
.
info
(
"当前下单的医生:{}"
,
JSON
.
toJSONString
(
scheduleRecordEntity
));
log
.
info
(
"当前下单的医生:{}"
,
JSON
.
toJSONString
(
scheduleRecordEntity
));
return
scheduleRecordEntity
;
return
scheduleRecordEntity
;
}
}
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ServiceConfigServiceImpl.java
浏览文件 @
37f0d270
...
@@ -4,16 +4,23 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,16 +4,23 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.ebaiyihui.family.doctor.common.dto.RequestGetDoctorOfficeStatusDTO
;
import
com.ebaiyihui.family.doctor.common.dto.RequestGetDoctorOfficeStatusDTO
;
import
com.ebaiyihui.family.doctor.common.dto.RequestServiceConfigDTO
;
import
com.ebaiyihui.family.doctor.common.dto.RequestServiceConfigDTO
;
import
com.ebaiyihui.family.doctor.common.vo.RequestOnlineOrOfflineVo
;
import
com.ebaiyihui.family.doctor.common.vo.RequestOnlineOrOfflineVo
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.entity.ScheduleRecordEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity
;
import
com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.exception.BusinessException
;
import
com.ebaiyihui.family.doctor.server.mapper.ScheduleRecordMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.ServiceConfigMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.ServiceConfigMapper
;
import
com.ebaiyihui.family.doctor.server.service.ServiceConfigService
;
import
com.ebaiyihui.family.doctor.server.service.ServiceConfigService
;
import
com.ebaiyihui.family.doctor.server.util.DateUtils
;
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.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
java.util.Date
;
import
java.util.List
;
/**
/**
* @ClassName: ServiceConfigServiceImpl
* @ClassName: ServiceConfigServiceImpl
* @Author:yanliang
* @Author:yanliang
...
@@ -27,6 +34,9 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
...
@@ -27,6 +34,9 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
@Autowired
@Autowired
private
ServiceConfigMapper
serviceConfigMapper
;
private
ServiceConfigMapper
serviceConfigMapper
;
@Autowired
private
ScheduleRecordMapper
scheduleRecordMapper
;
@Override
@Override
public
RequestOnlineOrOfflineVo
getDoctorOfficeStatus
(
RequestGetDoctorOfficeStatusDTO
requestGetDoctorOfficeStatusDTO
)
{
public
RequestOnlineOrOfflineVo
getDoctorOfficeStatus
(
RequestGetDoctorOfficeStatusDTO
requestGetDoctorOfficeStatusDTO
)
{
QueryWrapper
<
ServiceConfigEntity
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ServiceConfigEntity
>
queryWrapper
=
new
QueryWrapper
<>();
...
@@ -78,6 +88,13 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
...
@@ -78,6 +88,13 @@ 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/resources/mapper/ScheduleRecordMapper.xml
浏览文件 @
37f0d270
...
@@ -13,6 +13,9 @@
...
@@ -13,6 +13,9 @@
and status =1
and status =1
and start_time
<![CDATA[<= ]]>
#{endStart}
and start_time
<![CDATA[<= ]]>
#{endStart}
and end_time
<![CDATA[>= ]]>
#{endStart}
and end_time
<![CDATA[>= ]]>
#{endStart}
<if
test=
"doctorId != null and doctorId != ''"
>
and doctor_id = #{doctorId}
</if>
</where>
</where>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论