Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
2cd76b40
提交
2cd76b40
authored
3月 21, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
fa477023
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
76 行增加
和
4 行删除
+76
-4
SignedDoctorDTO.java
...m/ebaiyihui/family/doctor/common/dto/SignedDoctorDTO.java
+3
-0
RegisterPatientVo.java
.../ebaiyihui/family/doctor/common/vo/RegisterPatientVo.java
+3
-0
ImMsgTemplateController.java
...ily/doctor/server/controller/ImMsgTemplateController.java
+1
-1
MobileBenefitPackageServiceImpl.java
.../server/service/impl/MobileBenefitPackageServiceImpl.java
+4
-0
PatientServiceImpl.java
...family/doctor/server/service/impl/PatientServiceImpl.java
+65
-3
没有找到文件。
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/dto/SignedDoctorDTO.java
浏览文件 @
2cd76b40
...
@@ -48,4 +48,7 @@ public class SignedDoctorDTO {
...
@@ -48,4 +48,7 @@ public class SignedDoctorDTO {
@ApiModelProperty
(
"签约状态1.未签约2.已签约3:已解约"
)
@ApiModelProperty
(
"签约状态1.未签约2.已签约3:已解约"
)
private
Integer
signStatus
;
private
Integer
signStatus
;
@ApiModelProperty
(
"签约id"
)
private
String
signSeqId
;
}
}
family-doctor-common/src/main/java/com/ebaiyihui/family/doctor/common/vo/RegisterPatientVo.java
浏览文件 @
2cd76b40
...
@@ -27,4 +27,7 @@ public class RegisterPatientVo {
...
@@ -27,4 +27,7 @@ public class RegisterPatientVo {
@ApiModelProperty
(
"消息推送类型"
)
@ApiModelProperty
(
"消息推送类型"
)
private
Integer
msgPushType
;
private
Integer
msgPushType
;
@ApiModelProperty
(
"签约id"
)
private
String
signSeqId
;
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/controller/ImMsgTemplateController.java
浏览文件 @
2cd76b40
...
@@ -38,6 +38,6 @@ public class ImMsgTemplateController {
...
@@ -38,6 +38,6 @@ public class ImMsgTemplateController {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
BaseResponse
.
error
(
e
.
getMessage
());
return
BaseResponse
.
error
(
e
.
getMessage
());
}
}
return
response
;
return
BaseResponse
.
success
(
"消息推送成功"
)
;
}
}
}
}
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/MobileBenefitPackageServiceImpl.java
浏览文件 @
2cd76b40
...
@@ -109,6 +109,10 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
...
@@ -109,6 +109,10 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
registerPatientVo
.
setMsgPushType
(
Integer
.
valueOf
(
map
.
get
(
"msgPushType"
)));
registerPatientVo
.
setMsgPushType
(
Integer
.
valueOf
(
map
.
get
(
"msgPushType"
)));
}
}
if
(
Objects
.
nonNull
(
map
.
get
(
"signSeqId"
)))
{
registerPatientVo
.
setSignSeqId
(
map
.
get
(
"signSeqId"
));
}
String
patientId
=
map
.
get
(
"patient_id"
);
String
patientId
=
map
.
get
(
"patient_id"
);
if
(!
StringUtils
.
isEmpty
(
patientId
))
{
if
(!
StringUtils
.
isEmpty
(
patientId
))
{
// 查询患者信息
// 查询患者信息
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientServiceImpl.java
浏览文件 @
2cd76b40
...
@@ -49,6 +49,9 @@ public class PatientServiceImpl implements PatientService {
...
@@ -49,6 +49,9 @@ public class PatientServiceImpl implements PatientService {
@Autowired
@Autowired
private
MobileBenefitPackageMapper
mobileBenefitPackageMapper
;
private
MobileBenefitPackageMapper
mobileBenefitPackageMapper
;
// @Autowired
// private
@Autowired
@Autowired
private
ImMsgTemplateService
imMsgTemplateService
;
private
ImMsgTemplateService
imMsgTemplateService
;
...
@@ -97,7 +100,6 @@ public class PatientServiceImpl implements PatientService {
...
@@ -97,7 +100,6 @@ public class PatientServiceImpl implements PatientService {
if
(!
patientSignEntities
.
isEmpty
())
{
if
(!
patientSignEntities
.
isEmpty
())
{
return
BaseResponse
.
error
(
"已经有进行中的签约的医生,不能在进行签约!!!"
);
return
BaseResponse
.
error
(
"已经有进行中的签约的医生,不能在进行签约!!!"
);
}
}
}
}
if
(
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
if
(
SignStatus
.
CANCEL
.
getValue
().
equals
(
reqVo
.
getSignStatus
()))
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
...
@@ -112,10 +114,15 @@ public class PatientServiceImpl implements PatientService {
...
@@ -112,10 +114,15 @@ public class PatientServiceImpl implements PatientService {
}
}
// 处理换绑医生
// 处理换绑医生
if
(
Objects
.
nonNull
(
reqVo
.
getAdmId
()))
{
if
(
Objects
.
nonNull
(
reqVo
.
getAdmId
())
||
Objects
.
nonNull
(
reqVo
.
getSignSeqId
())
)
{
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
PatientSignEntity
>
psWrapper
=
new
QueryWrapper
<>();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
PatientSignEntity
patientSign
=
new
PatientSignEntity
();
if
(
Objects
.
nonNull
(
reqVo
.
getAdmId
()))
{
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
patientSign
.
setAdmId
(
reqVo
.
getAdmId
());
}
if
(
Objects
.
nonNull
(
reqVo
.
getSignSeqId
()))
{
patientSign
.
setId
(
Long
.
valueOf
(
reqVo
.
getSignSeqId
()));
}
psWrapper
.
setEntity
(
patientSign
);
psWrapper
.
setEntity
(
patientSign
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
PatientSignEntity
patientSignEntity
=
patientSignMapper
.
selectOne
(
psWrapper
);
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
if
(
Objects
.
nonNull
(
patientSignEntity
))
{
...
@@ -239,4 +246,59 @@ public class PatientServiceImpl implements PatientService {
...
@@ -239,4 +246,59 @@ public class PatientServiceImpl implements PatientService {
}
}
return
BaseResponse
.
success
(
patientSignEntity
);
return
BaseResponse
.
success
(
patientSignEntity
);
}
}
// public ScheduleRecordEntity getScheduleDoctorInfo(String patientId){
// String date = DateUtils.dateToSimpleString(new Date());
// String hourAndSecond = DateUtils.getHourAndSecond();
// QueryWrapper<PatientSignEntity> psWrapper = new QueryWrapper<>();
// PatientSignEntity patientSign = new PatientSignEntity();
// patientSign.setPatientId(patientId);
// patientSign.setStatus(StatusEnum.IN_CONSULTATION.getValue());
// psWrapper.setEntity(patientSign);
// List<PatientSignEntity> patientSignEntities = patientSignMapper.selectList(psWrapper);
// List<Long> doctorIdsFastBuy = patientSignEntities.stream().map(PatientSignEntity::getDoctorId).collect(Collectors.toList());
// log.info("患者已下单医生:{}", doctorIdsFastBuy);
//
// List<ScheduleRecordEntity> scheduleRecordEntities = scheduleRecordMapper.selectByDate(CommonConstants.APP_CODE, 3, date, 1, hourAndSecond);
// List<String> doctorIds = new ArrayList<>();
// log.info("当前排班医生:{}", JSON.toJSONString(scheduleRecordEntities));
//
// if (CollectionUtils.isEmpty(scheduleRecordEntities)) {
// throw new BusinessException("暂无排班医生,请稍后下单");
// }
//
// //过滤该患者已下过单的医生
// if (!CollectionUtils.isEmpty(doctorIdsFastBuy)) {
// scheduleRecordEntities = scheduleRecordEntities.stream().filter(v -> !doctorIdsFastBuy.contains(v.getDoctorId())).collect(Collectors.toList());
// }
//
// if (CollectionUtils.isEmpty(scheduleRecordEntities)) {
// throw new BusinessException("已有订单进行中,请勿重复下单");
// }
//
// doctorIds = scheduleRecordEntities.stream().map(ScheduleRecordEntity::getDoctorId).collect(Collectors.toList());
//
// List<String> doctorByOrderCount = orderMapper.findDoctorByOrderCount(doctorIds, type);
//
// ScheduleRecordEntity scheduleRecordEntity = new ScheduleRecordEntity();
//
// //有极速购药订单的医生(d1)数量等于有排班的医生(d2)数量,取d1数量最少的(第一个)
// //有极速购药订单的医生(d1)数量小于有排班的医生(d2)数量,d2-d1,剩下随机取
// if (doctorByOrderCount.size() == scheduleRecordEntities.size()) {
// String doctorId = doctorByOrderCount.get(0);
// Optional<ScheduleRecordEntity> first = scheduleRecordEntities.stream().filter(v -> Objects.equals(v.getDoctorId(), doctorId)).findFirst();
// scheduleRecordEntity = first.get();
// } else if (doctorByOrderCount.size() < scheduleRecordEntities.size()) {
// scheduleRecordEntities = scheduleRecordEntities.stream().filter(v -> !doctorByOrderCount.contains(v.getDoctorId())).collect(Collectors.toList());
// Random random = new Random();
// int i = random.nextInt(scheduleRecordEntities.size() + 1);
// if (i == 0) {
// i = i + 1;
// }
// scheduleRecordEntity = scheduleRecordEntities.get(i - 1);
// }
//
// log.info("当前下单的医生:{}", JSON.toJSONString(scheduleRecordEntity));
// return scheduleRecordEntity;
// }
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论