1123344
This commit is contained in:
parent
d8f1eb8d16
commit
fd9ae57649
@ -46,6 +46,5 @@ public class CaseLabelController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Response.success(labelDtoList);
|
return Response.success(labelDtoList);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -840,6 +840,7 @@ public class CaseClinicalVideoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
Set<String> deleteHospitalSet = new LinkedHashSet<>();
|
||||||
for (CaseClinicalVideoAuthorModel author : deleteList){
|
for (CaseClinicalVideoAuthorModel author : deleteList){
|
||||||
// 获取医生数据
|
// 获取医生数据
|
||||||
LambdaQueryWrapper<CaseClinicalDoctorModel> doctorQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CaseClinicalDoctorModel> doctorQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
@ -858,8 +859,8 @@ public class CaseClinicalVideoService {
|
|||||||
// 减少作者统计
|
// 减少作者统计
|
||||||
caseClinicalService.DecStatsCaseClinicalDoctor(String.valueOf(caseClinicalDoctor.getDoctorId()),2);
|
caseClinicalService.DecStatsCaseClinicalDoctor(String.valueOf(caseClinicalDoctor.getDoctorId()),2);
|
||||||
|
|
||||||
// 减少医院统计
|
// 增加需要减少的医院数据
|
||||||
caseClinicalService.DecStatsCaseClinicalHospital(String.valueOf(caseClinicalDoctor.getHospitalId()),2);
|
deleteHospitalSet.add(String.valueOf(caseClinicalDoctor.getHospitalId()));
|
||||||
|
|
||||||
// 删除该作者
|
// 删除该作者
|
||||||
caseClinicalVideoAuthorDao.deleteById(author.getAuthorId());
|
caseClinicalVideoAuthorDao.deleteById(author.getAuthorId());
|
||||||
@ -872,7 +873,15 @@ public class CaseClinicalVideoService {
|
|||||||
caseClinicalDoctorCertDao.delete(certWrapper);
|
caseClinicalDoctorCertDao.delete(certWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!deleteHospitalSet.isEmpty()){
|
||||||
|
// 减少医院统计
|
||||||
|
for (String hospitalId : deleteHospitalSet ){
|
||||||
|
caseClinicalService.DecStatsCaseClinicalHospital(hospitalId,2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 新增新的作者
|
// 新增新的作者
|
||||||
|
Set<String> addHospitalSet = new LinkedHashSet<>();
|
||||||
for (addClinicalVideoApp.Author author : addList){
|
for (addClinicalVideoApp.Author author : addList){
|
||||||
GetUserInfoResponse result = new GetUserInfoResponse();
|
GetUserInfoResponse result = new GetUserInfoResponse();
|
||||||
if (author.getDoctorIden() == null || Objects.equals(author.getDoctorIden(), "")){
|
if (author.getDoctorIden() == null || Objects.equals(author.getDoctorIden(), "")){
|
||||||
@ -899,8 +908,8 @@ public class CaseClinicalVideoService {
|
|||||||
// 新增作者统计
|
// 新增作者统计
|
||||||
caseClinicalService.IncStatsCaseClinicalDoctor(String.valueOf(caseClinicalDoctor.getDoctorId()),2,lastPushDate);
|
caseClinicalService.IncStatsCaseClinicalDoctor(String.valueOf(caseClinicalDoctor.getDoctorId()),2,lastPushDate);
|
||||||
|
|
||||||
// 新增医院统计
|
// 增加需要增加的医院数据
|
||||||
caseClinicalService.IncStatsCaseClinicalHospital(String.valueOf(caseClinicalDoctor.getHospitalId()),2,lastPushDate);
|
addHospitalSet.add(String.valueOf(caseClinicalDoctor.getHospitalId()));
|
||||||
|
|
||||||
// 生成用户证书-文章/视频
|
// 生成用户证书-文章/视频
|
||||||
if (qrCodeByte == null || qrCodeByte.length == 0) {
|
if (qrCodeByte == null || qrCodeByte.length == 0) {
|
||||||
@ -949,6 +958,17 @@ public class CaseClinicalVideoService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!addHospitalSet.isEmpty()){
|
||||||
|
// 增加医院统计
|
||||||
|
for (String hospitalId : addHospitalSet ){
|
||||||
|
LocalDateTime lastPushDate = caseClinicalVideoDao.selectLastVideoPushDateByHospitalId(Long.valueOf(hospitalId));
|
||||||
|
|
||||||
|
// 新增医院统计
|
||||||
|
caseClinicalService.IncStatsCaseClinicalHospital(hospitalId,2,
|
||||||
|
lastPushDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 已存在的
|
// 已存在的
|
||||||
for (CaseClinicalVideoAuthorModel b : existsList){
|
for (CaseClinicalVideoAuthorModel b : existsList){
|
||||||
// 如果现有作者的唯一标识为空
|
// 如果现有作者的唯一标识为空
|
||||||
|
|||||||
@ -204,7 +204,7 @@ public class CaseExchangeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 发放积分
|
// 发放积分
|
||||||
// userService.ReportUserScore(String.valueOf(caseExchangeData.getExchangeId()),3,userId,50);
|
userService.ReportUserScore(String.valueOf(caseExchangeData.getExchangeId()),3,userId,50);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -410,6 +410,7 @@ public class UserService {
|
|||||||
QueryWrapper<CaseClinicalRecordScoreModel> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CaseClinicalRecordScoreModel> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("user_id", userId)
|
queryWrapper.eq("user_id", userId)
|
||||||
.ge("created_at", startOfToday) // created_at >= 今天 00:00:00
|
.ge("created_at", startOfToday) // created_at >= 今天 00:00:00
|
||||||
|
.ge("score_type", 5)
|
||||||
.orderByDesc("created_at"); // 最新的在前
|
.orderByDesc("created_at"); // 最新的在前
|
||||||
List<CaseClinicalRecordScoreModel> caseClinicalRecordScores = caseClinicalRecordScoreDao.selectList(queryWrapper);
|
List<CaseClinicalRecordScoreModel> caseClinicalRecordScores = caseClinicalRecordScoreDao.selectList(queryWrapper);
|
||||||
if (caseClinicalRecordScores.size() >= 3){
|
if (caseClinicalRecordScores.size() >= 3){
|
||||||
|
|||||||
@ -176,7 +176,7 @@
|
|||||||
<select id="selectLastArticlePushDateByLabelId" resultType="java.time.LocalDateTime">
|
<select id="selectLastArticlePushDateByLabelId" resultType="java.time.LocalDateTime">
|
||||||
SELECT MAX(ca.push_date) AS last_push_date
|
SELECT MAX(ca.push_date) AS last_push_date
|
||||||
FROM case_clinical_article ca
|
FROM case_clinical_article ca
|
||||||
INNER JOIN case_clinical_article_label cd ON caa.article_id = cd.article_id
|
INNER JOIN case_clinical_article_label cd ON ca.article_id = cd.article_id
|
||||||
WHERE cd.app_iden = #{labelIden}
|
WHERE cd.app_iden = #{labelIden}
|
||||||
AND ca.article_status = 1
|
AND ca.article_status = 1
|
||||||
AND ca.delete_status = 0
|
AND ca.delete_status = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user