Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-analysis
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.online.exam
pica-cloud-analysis
提交
34517c01
提交
34517c01
编写于
8月 28, 2018
作者:
minghao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: app调用详情接口
上级
51065141
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
161 行增加
和
9 行删除
+161
-9
AnalysisController.java
...e/exam/analysis/server/controller/AnalysisController.java
+64
-5
CHCRankingList.java
...ud/online/exam/analysis/server/entity/CHCRankingList.java
+37
-0
CHCAnalysisService.java
...line/exam/analysis/server/service/CHCAnalysisService.java
+19
-2
CHCRankingListService.java
...e/exam/analysis/server/service/CHCRankingListService.java
+14
-0
CHCAnalysisServiceImpl.java
.../analysis/server/service/impl/CHCAnalysisServiceImpl.java
+15
-2
CHCRankingListServiceImpl.java
...alysis/server/service/impl/CHCRankingListServiceImpl.java
+12
-0
未找到文件。
server/src/main/java/com/pica/cloud/online/exam/analysis/server/controller/AnalysisController.java
浏览文件 @
34517c01
...
...
@@ -60,7 +60,7 @@ public class AnalysisController {
id
=
(
id
==
null
?
1
:
id
);
try
{
CHCAnalysisDto
analysisDto
=
analysisService
.
getCHCAnalysisById
(
id
);
CHCAnalysisDto
analysisDto
=
analysisService
.
getCHCAnalysis
Dto
ById
(
id
);
List
<
AnalysisRoundDto
>
roundList
=
analysisService
.
getRoundListByAnalysisId
(
id
);
analysisDto
.
setRoundList
(
roundList
);
...
...
@@ -84,7 +84,7 @@ public class AnalysisController {
id
=
(
id
==
null
?
2
:
id
);
try
{
CHCAnalysisDto
analysisDto
=
analysisService
.
getPSAAnalysisById
(
id
);
CHCAnalysisDto
analysisDto
=
analysisService
.
getPSAAnalysis
Dto
ById
(
id
);
List
<
AnalysisRoundDto
>
roundList
=
analysisService
.
getRoundListByAnalysisId
(
id
);
analysisDto
.
setRoundList
(
roundList
);
...
...
@@ -141,12 +141,35 @@ public class AnalysisController {
examTitleReplyDto
.
setExamTitle
(
examTitleDto
);
examTitleReplyDto
.
setReplyList
(
replyDtoList
);
/**
* 设置回复状态
*/
examTitleReplyDto
.
setReplyStatus
(
0
);
if
(
user
!=
null
&&
user
.
getId
()
!=
0
)
{
Doctor
doctor
=
doctorService
.
getDoctorById
(
user
.
getId
());
if
(
doctor
!=
null
)
{
/**
* TODO: 判断权限 CHC PSA
*/
CHCAnalysis
analysis
=
analysisService
.
getAnalysisById
(
analysisRoundExamTitle
.
getAnalysisId
());
if
(
analysis
.
getType
()
==
1
)
{
/**
* CHC 获取考试前两百名
*/
}
else
if
(
analysis
.
getType
()
==
2
)
{
/**
* PSA 职务职称主任/副主任 院长/副院长 科长/副科长 管理人数100以上
*/
}
}
}
if
(
user
==
null
||
user
.
getId
()
==
0
)
{
examTitleReplyDto
.
setReplyStatus
(
0
);
}
else
{
/**
* 判断权限 CHC RSA
*/
examTitleReplyDto
.
setReplyStatus
(
analysisService
.
getReplyStatus
(
examTitleId
,
user
.
getId
()));
}
...
...
@@ -194,6 +217,42 @@ public class AnalysisController {
return
builder
.
build
();
}
@ApiOperation
(
value
=
"查看回复详情"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/replyDetailByExamTitleId/{examTitleId}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
<
ExamTitleReplyDetailDto
>
getReplyDetailByExamTitleId
(
@PathVariable
(
"examTitleId"
)
Integer
examTitleId
,
@RequestParam
(
required
=
false
)
String
token
)
{
PICAUser
user
=
null
;
if
(
token
!=
null
)
{
user
=
CommonUtils
.
getUserByToken
(
redisClient
,
token
);
}
PicaResponse
.
Builder
<
ExamTitleReplyDetailDto
>
builder
=
new
PicaResponse
.
Builder
<>();
try
{
ExamTitleReplyDetailDto
examTitleReplyDetailDto
=
new
ExamTitleReplyDetailDto
();
Reply
reply
=
analysisService
.
getReplyByExamTitleId
(
examTitleId
,
user
!=
null
?
user
.
getId
()
:
0
);
AnalysisRoundExamTitle
analysisRoundExamTitle
=
analysisService
.
getAnanlysisRoundExamTitleById
(
examTitleId
);
ExamTitleDto
examTitleDto
=
analysisService
.
getExamTitleDtoById
(
examTitleId
);
if
(
null
!=
reply
)
{
ReplyDto
replyDto
=
analysisService
.
getReplyDtoByReply
(
reply
,
user
!=
null
?
user
.
getId
()
:
0
);
examTitleReplyDetailDto
.
setAnalysisId
(
analysisRoundExamTitle
.
getAnalysisId
());
examTitleReplyDetailDto
.
setRoundId
(
analysisRoundExamTitle
.
getRoundId
());
examTitleReplyDetailDto
.
setExamTitle
(
examTitleDto
);
examTitleReplyDetailDto
.
setReply
(
replyDto
);
builder
.
setData
(
examTitleReplyDetailDto
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
builder
.
build
();
}
@ApiOperation
(
value
=
"点赞"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/starReply/{replyId}/analysis/{analysisId}/round/{roundId}/examTitle/{examTitleId}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
starReply
(
@PathVariable
(
"analysisId"
)
Integer
analysisId
,
@PathVariable
(
"roundId"
)
Integer
roundId
,
...
...
server/src/main/java/com/pica/cloud/online/exam/analysis/server/entity/CHCRankingList.java
0 → 100644
浏览文件 @
34517c01
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
entity
;
/**
* @author wuminghao
* @date 2018/8/28 13:52
*/
public
class
CHCRankingList
{
private
Integer
id
;
private
Integer
doctor_id
;
private
String
doctor_name
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getDoctor_id
()
{
return
doctor_id
;
}
public
void
setDoctor_id
(
Integer
doctor_id
)
{
this
.
doctor_id
=
doctor_id
;
}
public
String
getDoctor_name
()
{
return
doctor_name
;
}
public
void
setDoctor_name
(
String
doctor_name
)
{
this
.
doctor_name
=
doctor_name
;
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/CHCAnalysisService.java
浏览文件 @
34517c01
...
...
@@ -2,6 +2,7 @@ package com.pica.cloud.online.exam.analysis.server.service;
import
com.pica.cloud.online.exam.analysis.common.dto.*
;
import
com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle
;
import
com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis
;
import
com.pica.cloud.online.exam.analysis.server.entity.Reply
;
import
java.util.List
;
...
...
@@ -16,14 +17,21 @@ public interface CHCAnalysisService {
* @param analysisId
* @return
*/
CHCAnalysis
Dto
getCHC
AnalysisById
(
Integer
analysisId
);
CHCAnalysis
get
AnalysisById
(
Integer
analysisId
);
/**
* 根据活动id获取活动详情
* @param analysisId
* @return
*/
CHCAnalysisDto
getPSAAnalysisById
(
Integer
analysisId
);
CHCAnalysisDto
getCHCAnalysisDtoById
(
Integer
analysisId
);
/**
* 根据活动id获取活动详情
* @param analysisId
* @return
*/
CHCAnalysisDto
getPSAAnalysisDtoById
(
Integer
analysisId
);
/**
* 根据活动id获取活动的轮数
...
...
@@ -132,4 +140,13 @@ public interface CHCAnalysisService {
* @return
*/
Integer
getReplyStatus
(
Integer
examTitleId
,
Integer
userId
);
/**
* 获取我的评论详情
* @param examTitleId
* @param userId
* @return
*/
Reply
getReplyByExamTitleId
(
Integer
examTitleId
,
Integer
userId
);
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/CHCRankingListService.java
0 → 100644
浏览文件 @
34517c01
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
service
;
/**
* @author wuminghao
* @date 2018/8/28 13:55
*/
public
interface
CHCRankingListService
{
/**
* 判断输入的用户id是否为前200名
* @param doctorId
* @return
*/
boolean
isRankingInTop200
(
Integer
doctorId
);
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/impl/CHCAnalysisServiceImpl.java
浏览文件 @
34517c01
...
...
@@ -46,7 +46,12 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
private
PropertiesConfiguration
properties
;
@Override
public
CHCAnalysisDto
getCHCAnalysisById
(
Integer
analysisId
)
{
public
CHCAnalysis
getAnalysisById
(
Integer
analysisId
)
{
return
analysisMapper
.
selectByPrimaryKey
(
analysisId
);
}
@Override
public
CHCAnalysisDto
getCHCAnalysisDtoById
(
Integer
analysisId
)
{
CHCAnalysis
analysis
=
analysisMapper
.
selectByPrimaryKey
(
analysisId
);
if
(
null
==
analysis
)
{
...
...
@@ -72,7 +77,7 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
}
@Override
public
CHCAnalysisDto
getPSAAnalysisById
(
Integer
analysisId
)
{
public
CHCAnalysisDto
getPSAAnalysis
Dto
ById
(
Integer
analysisId
)
{
CHCAnalysis
analysis
=
analysisMapper
.
selectPSAByPrimaryKey
(
analysisId
);
if
(
null
==
analysis
)
{
return
null
;
...
...
@@ -438,4 +443,12 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
*/
return
2
;
}
@Override
public
Reply
getReplyByExamTitleId
(
Integer
examTitleId
,
Integer
userId
)
{
Reply
reply
=
new
Reply
();
reply
.
setAnalysisRoundExamTitleId
(
examTitleId
);
reply
.
setUserId
(
userId
);
return
replyMapper
.
selectReplyByRecord
(
reply
);
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/impl/CHCRankingListServiceImpl.java
0 → 100644
浏览文件 @
34517c01
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
/**
* @author wuminghao
* @date 2018/8/28 13:57
*/
@Service
public
class
CHCRankingListServiceImpl
{
}
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录