Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
6038ee0d
提交
6038ee0d
authored
3月 27, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
a171956b
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
51 行增加
和
3 行删除
+51
-3
MobileBenefitPackageMapper.java
...mily/doctor/server/mapper/MobileBenefitPackageMapper.java
+1
-1
RabbitConsumer.java
...aiyihui/family/doctor/server/rabbitmq/RabbitConsumer.java
+29
-0
MobileBenefitPackageServiceImpl.java
.../server/service/impl/MobileBenefitPackageServiceImpl.java
+1
-1
PatientServiceImpl.java
...family/doctor/server/service/impl/PatientServiceImpl.java
+1
-1
SignedTask.java
...a/com/ebaiyihui/family/doctor/server/task/SignedTask.java
+17
-0
MobileBenefitPackageMapper.xml
.../src/main/resources/mapper/MobileBenefitPackageMapper.xml
+2
-0
没有找到文件。
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/mapper/MobileBenefitPackageMapper.java
浏览文件 @
6038ee0d
...
@@ -17,7 +17,7 @@ public interface MobileBenefitPackageMapper {
...
@@ -17,7 +17,7 @@ public interface MobileBenefitPackageMapper {
void
insert
(
MobileBenefitPackageEntity
entity
);
void
insert
(
MobileBenefitPackageEntity
entity
);
MobileBenefitPackageEntity
queryByPhone
(
@Param
(
"mobile"
)
String
mobile
,
@Param
(
"activateOrderId"
)
String
activateOrderId
);
MobileBenefitPackageEntity
queryByPhone
(
@Param
(
"mobile"
)
String
mobile
,
@Param
(
"activateOrderId"
)
String
activateOrderId
,
@Param
(
"flag"
)
String
flag
);
void
updateUsed
(
MobileBenefitPackageEntity
entity
);
void
updateUsed
(
MobileBenefitPackageEntity
entity
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/rabbitmq/RabbitConsumer.java
浏览文件 @
6038ee0d
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
rabbitmq
;
package
com
.
ebaiyihui
.
family
.
doctor
.
server
.
rabbitmq
;
import
com.ebaiyihui.family.doctor.common.dto.NotifyConsultDataDTO
;
import
com.ebaiyihui.family.doctor.server.common.constants.CommonConstants
;
import
com.ebaiyihui.family.doctor.server.common.enums.StatusEnum
;
import
com.ebaiyihui.family.doctor.server.common.enums.StatusEnum
;
import
com.ebaiyihui.family.doctor.server.config.RabbitMqConfig
;
import
com.ebaiyihui.family.doctor.server.config.RabbitMqConfig
;
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.mapper.MobileBenefitPackageMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper
;
import
com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper
;
import
com.ebaiyihui.family.doctor.server.util.DateUtils
;
import
com.ebaiyihui.family.doctor.server.util.ThirdOrderPushUtil
;
import
com.ebaiyihui.family.doctor.server.vo.OrderTaskVo
;
import
com.ebaiyihui.family.doctor.server.vo.OrderTaskVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.messaging.handler.annotation.Payload
;
import
org.springframework.messaging.handler.annotation.Payload
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -26,6 +33,12 @@ public class RabbitConsumer {
...
@@ -26,6 +33,12 @@ public class RabbitConsumer {
@Autowired
@Autowired
private
PatientSignMapper
patientSignMapper
;
private
PatientSignMapper
patientSignMapper
;
@Autowired
private
MobileBenefitPackageMapper
mobileBenefitPackageMapper
;
@Autowired
private
ThirdOrderPushUtil
thirdOrderPushUtil
;
@RabbitListener
(
queues
=
RabbitMqConfig
.
ORDER_DELAY_QUEUE_1
)
@RabbitListener
(
queues
=
RabbitMqConfig
.
ORDER_DELAY_QUEUE_1
)
public
void
orderDelayQueue1
(
@Payload
OrderTaskVo
orderTaskVo
)
{
public
void
orderDelayQueue1
(
@Payload
OrderTaskVo
orderTaskVo
)
{
log
.
info
(
"定时任务监听结果:{}"
,
orderTaskVo
.
toString
());
log
.
info
(
"定时任务监听结果:{}"
,
orderTaskVo
.
toString
());
...
@@ -41,6 +54,22 @@ public class RabbitConsumer {
...
@@ -41,6 +54,22 @@ public class RabbitConsumer {
if
(
StatusEnum
.
IN_CONSULTATION
.
getValue
().
equals
(
patientSignEntity
.
getStatus
()))
{
if
(
StatusEnum
.
IN_CONSULTATION
.
getValue
().
equals
(
patientSignEntity
.
getStatus
()))
{
patientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
patientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
patientSignMapper
.
updateById
(
patientSignEntity
);
patientSignMapper
.
updateById
(
patientSignEntity
);
MobileBenefitPackageEntity
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
patientSignEntity
.
getPatientPhone
(),
patientSignEntity
.
getPackageOrderId
(),
"1"
);
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
// 推送第三方权益使用
NotifyConsultDataDTO
notifyConsultDataDTO
=
new
NotifyConsultDataDTO
();
notifyConsultDataDTO
.
setActivateOrderId
(
patientSignEntity
.
getPackageOrderId
());
notifyConsultDataDTO
.
setConsultOrderNo
(
patientSignEntity
.
getAdmId
());
notifyConsultDataDTO
.
setStatus
(
String
.
valueOf
(
StatusEnum
.
FINISH_APPLY
.
getValue
()));
notifyConsultDataDTO
.
setProductId
(
entity
.
getProductId
());
notifyConsultDataDTO
.
setPatientId
(
entity
.
getUserId
());
notifyConsultDataDTO
.
setExpertName
(
patientSignEntity
.
getDoctorName
());
notifyConsultDataDTO
.
setOrderDate
(
DateUtils
.
dateToFullString
(
patientSignEntity
.
getCreateTime
()));
notifyConsultDataDTO
.
setSupplierCode
(
CommonConstants
.
SUPPLIER_CODE_JTYS
);
thirdOrderPushUtil
.
syncBenefitUsedOrder
(
notifyConsultDataDTO
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"orderDelayQueue监听异常"
,
e
);
log
.
info
(
"orderDelayQueue监听异常"
,
e
);
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/MobileBenefitPackageServiceImpl.java
浏览文件 @
6038ee0d
...
@@ -61,7 +61,7 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
...
@@ -61,7 +61,7 @@ public class MobileBenefitPackageServiceImpl implements MobileBenefitPackageServ
RegisterPatientVo
registerPatientVo
=
new
RegisterPatientVo
();
RegisterPatientVo
registerPatientVo
=
new
RegisterPatientVo
();
MobileBenefitPackageEntity
entity
=
new
MobileBenefitPackageEntity
();
MobileBenefitPackageEntity
entity
=
new
MobileBenefitPackageEntity
();
if
(
Objects
.
nonNull
(
map
.
get
(
"activateOrderId"
)))
{
if
(
Objects
.
nonNull
(
map
.
get
(
"activateOrderId"
)))
{
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
map
.
get
(
"mobile"
),
map
.
get
(
"activateOrderId"
));
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
map
.
get
(
"mobile"
),
map
.
get
(
"activateOrderId"
)
,
null
);
if
(
ObjectUtils
.
isEmpty
(
entity
))
{
if
(
ObjectUtils
.
isEmpty
(
entity
))
{
return
BaseResponse
.
error
(
"没有查询到有关权益"
);
return
BaseResponse
.
error
(
"没有查询到有关权益"
);
}
}
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/PatientServiceImpl.java
浏览文件 @
6038ee0d
...
@@ -77,7 +77,7 @@ public class PatientServiceImpl implements PatientService {
...
@@ -77,7 +77,7 @@ public class PatientServiceImpl implements PatientService {
@Override
@Override
public
BaseResponse
<
String
>
signedDoctor
(
SignedDoctorDTO
reqVo
)
{
public
BaseResponse
<
String
>
signedDoctor
(
SignedDoctorDTO
reqVo
)
{
MobileBenefitPackageEntity
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
());
MobileBenefitPackageEntity
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
reqVo
.
getPhone
(),
reqVo
.
getPackageOrderId
()
,
null
);
if
(
ObjectUtils
.
isEmpty
(
entity
))
{
if
(
ObjectUtils
.
isEmpty
(
entity
))
{
return
BaseResponse
.
error
(
"没有查询到有关权益"
);
return
BaseResponse
.
error
(
"没有查询到有关权益"
);
}
}
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/task/SignedTask.java
浏览文件 @
6038ee0d
...
@@ -3,6 +3,7 @@ package com.ebaiyihui.family.doctor.server.task;
...
@@ -3,6 +3,7 @@ package com.ebaiyihui.family.doctor.server.task;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ebaiyihui.family.doctor.common.bo.Result
;
import
com.ebaiyihui.family.doctor.common.bo.Result
;
import
com.ebaiyihui.family.doctor.common.dto.HealthInfoDTO
;
import
com.ebaiyihui.family.doctor.common.dto.HealthInfoDTO
;
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.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.constants.ImConstants
;
...
@@ -24,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -24,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -195,6 +197,21 @@ public class SignedTask {
...
@@ -195,6 +197,21 @@ public class SignedTask {
patientSignEntity
.
setSignEndTime
(
endTime
);
patientSignEntity
.
setSignEndTime
(
endTime
);
}
else
{
}
else
{
patientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
patientSignEntity
.
setStatus
(
StatusEnum
.
FINISH_APPLY
.
getValue
());
MobileBenefitPackageEntity
entity
=
mobileBenefitPackageMapper
.
queryByPhone
(
patientSignEntity
.
getPatientPhone
(),
patientSignEntity
.
getPackageOrderId
(),
"1"
);
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
// 推送第三方权益使用
NotifyConsultDataDTO
notifyConsultDataDTO
=
new
NotifyConsultDataDTO
();
notifyConsultDataDTO
.
setActivateOrderId
(
patientSignEntity
.
getPackageOrderId
());
notifyConsultDataDTO
.
setConsultOrderNo
(
patientSignEntity
.
getAdmId
());
notifyConsultDataDTO
.
setStatus
(
String
.
valueOf
(
StatusEnum
.
FINISH_APPLY
.
getValue
()));
notifyConsultDataDTO
.
setProductId
(
entity
.
getProductId
());
notifyConsultDataDTO
.
setPatientId
(
entity
.
getUserId
());
notifyConsultDataDTO
.
setExpertName
(
patientSignEntity
.
getDoctorName
());
notifyConsultDataDTO
.
setOrderDate
(
DateUtils
.
dateToFullString
(
patientSignEntity
.
getCreateTime
()));
notifyConsultDataDTO
.
setSupplierCode
(
CommonConstants
.
SUPPLIER_CODE_JTYS
);
thirdOrderPushUtil
.
syncBenefitUsedOrder
(
notifyConsultDataDTO
);
}
}
}
patientSignSevice
.
updateById
(
patientSignEntity
);
patientSignSevice
.
updateById
(
patientSignEntity
);
mobileBenefitPackageMapper
.
updateVersion
(
mbp
);
mobileBenefitPackageMapper
.
updateVersion
(
mbp
);
...
...
family-doctor-server/src/main/resources/mapper/MobileBenefitPackageMapper.xml
浏览文件 @
6038ee0d
...
@@ -59,7 +59,9 @@
...
@@ -59,7 +59,9 @@
mobile_benefit_package
mobile_benefit_package
WHERE
WHERE
phone = #{mobile} and activateOrderId = #{activateOrderId}
phone = #{mobile} and activateOrderId = #{activateOrderId}
<if
test=
"flag!=null and flag!=''"
>
and NOW() BETWEEN STR_TO_DATE(benefitsStartTime, '%Y-%m-%d %H:%i:%s') AND STR_TO_DATE(benefitsEndTime, '%Y-%m-%d %H:%i:%s')
and NOW() BETWEEN STR_TO_DATE(benefitsStartTime, '%Y-%m-%d %H:%i:%s') AND STR_TO_DATE(benefitsEndTime, '%Y-%m-%d %H:%i:%s')
</if>
ORDER BY
ORDER BY
x_create_time DESC
x_create_time DESC
LIMIT 0,1
LIMIT 0,1
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论