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
提交
ff48c972
提交
ff48c972
编写于
8月 28, 2018
作者:
minghao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: app调用详情接口
上级
34517c01
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
87 行增加
和
18 行删除
+87
-18
AnalysisController.java
...e/exam/analysis/server/controller/AnalysisController.java
+10
-7
CHCRankingList.java
...ud/online/exam/analysis/server/entity/CHCRankingList.java
+10
-10
CHCRankingListMapper.java
...ine/exam/analysis/server/mapper/CHCRankingListMapper.java
+14
-0
DoctorMapper.java
...loud/online/exam/analysis/server/mapper/DoctorMapper.java
+15
-0
DoctorService.java
...ud/online/exam/analysis/server/service/DoctorService.java
+7
-0
CHCRankingListServiceImpl.java
...alysis/server/service/impl/CHCRankingListServiceImpl.java
+10
-1
DoctorServiceImpl.java
.../exam/analysis/server/service/impl/DoctorServiceImpl.java
+5
-0
DoctorMapper.xml
server/src/main/resources/mybatis/DoctorMapper.xml
+16
-0
未找到文件。
server/src/main/java/com/pica/cloud/online/exam/analysis/server/controller/AnalysisController.java
浏览文件 @
ff48c972
...
@@ -13,6 +13,7 @@ import com.pica.cloud.online.exam.analysis.server.configuration.PropertiesConfig
...
@@ -13,6 +13,7 @@ import com.pica.cloud.online.exam.analysis.server.configuration.PropertiesConfig
import
com.pica.cloud.online.exam.analysis.server.entity.*
;
import
com.pica.cloud.online.exam.analysis.server.entity.*
;
import
com.pica.cloud.online.exam.analysis.server.service.AntiSpamService
;
import
com.pica.cloud.online.exam.analysis.server.service.AntiSpamService
;
import
com.pica.cloud.online.exam.analysis.server.service.CHCAnalysisService
;
import
com.pica.cloud.online.exam.analysis.server.service.CHCAnalysisService
;
import
com.pica.cloud.online.exam.analysis.server.service.CHCRankingListService
;
import
com.pica.cloud.online.exam.analysis.server.service.DoctorService
;
import
com.pica.cloud.online.exam.analysis.server.service.DoctorService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -49,6 +50,9 @@ public class AnalysisController {
...
@@ -49,6 +50,9 @@ public class AnalysisController {
@Autowired
@Autowired
private
AntiSpamService
antiSpamService
;
private
AntiSpamService
antiSpamService
;
@Autowired
private
CHCRankingListService
rankingListService
;
@ApiOperation
(
value
=
"获取活动详情"
,
response
=
PicaResponse
.
class
)
@ApiOperation
(
value
=
"获取活动详情"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/activityDetail"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/activityDetail"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
<
CHCAnalysisDto
>
getActivityDetail
(
@RequestParam
(
required
=
false
)
Integer
id
)
{
public
PicaResponse
<
CHCAnalysisDto
>
getActivityDetail
(
@RequestParam
(
required
=
false
)
Integer
id
)
{
...
@@ -158,21 +162,20 @@ public class AnalysisController {
...
@@ -158,21 +162,20 @@ public class AnalysisController {
/**
/**
* CHC 获取考试前两百名
* CHC 获取考试前两百名
*/
*/
if
(
rankingListService
.
isRankingInTop200
(
doctor
.
getId
()))
{
examTitleReplyDto
.
setReplyStatus
(
analysisService
.
getReplyStatus
(
examTitleId
,
user
.
getId
()));
}
}
else
if
(
analysis
.
getType
()
==
2
)
{
}
else
if
(
analysis
.
getType
()
==
2
)
{
/**
/**
* PSA 职务职称主任/副主任 院长/副院长 科长/副科长 管理人数100以上
* PSA 职务职称主任/副主任 院长/副院长 科长/副科长 管理人数100以上
*/
*/
if
(
doctorService
.
isAuth
(
doctor
.
getId
()))
{
examTitleReplyDto
.
setReplyStatus
(
analysisService
.
getReplyStatus
(
examTitleId
,
user
.
getId
()));
}
}
}
}
}
}
}
if
(
user
==
null
||
user
.
getId
()
==
0
)
{
examTitleReplyDto
.
setReplyStatus
(
0
);
}
else
{
examTitleReplyDto
.
setReplyStatus
(
analysisService
.
getReplyStatus
(
examTitleId
,
user
.
getId
()));
}
builder
.
setData
(
examTitleReplyDto
);
builder
.
setData
(
examTitleReplyDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
server/src/main/java/com/pica/cloud/online/exam/analysis/server/entity/CHCRankingList.java
浏览文件 @
ff48c972
...
@@ -7,9 +7,9 @@ package com.pica.cloud.online.exam.analysis.server.entity;
...
@@ -7,9 +7,9 @@ package com.pica.cloud.online.exam.analysis.server.entity;
public
class
CHCRankingList
{
public
class
CHCRankingList
{
private
Integer
id
;
private
Integer
id
;
private
Integer
doctor
_i
d
;
private
Integer
doctor
I
d
;
private
String
doctor
_n
ame
;
private
String
doctor
N
ame
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
...
@@ -19,19 +19,19 @@ public class CHCRankingList {
...
@@ -19,19 +19,19 @@ public class CHCRankingList {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
Integer
getDoctor
_i
d
()
{
public
Integer
getDoctor
I
d
()
{
return
doctor
_i
d
;
return
doctor
I
d
;
}
}
public
void
setDoctor
_id
(
Integer
doctor_i
d
)
{
public
void
setDoctor
Id
(
Integer
doctorI
d
)
{
this
.
doctor
_id
=
doctor_i
d
;
this
.
doctor
Id
=
doctorI
d
;
}
}
public
String
getDoctor
_n
ame
()
{
public
String
getDoctor
N
ame
()
{
return
doctor
_n
ame
;
return
doctor
N
ame
;
}
}
public
void
setDoctor
_name
(
String
doctor_n
ame
)
{
public
void
setDoctor
Name
(
String
doctorN
ame
)
{
this
.
doctor
_name
=
doctor_n
ame
;
this
.
doctor
Name
=
doctorN
ame
;
}
}
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/mapper/CHCRankingListMapper.java
0 → 100644
浏览文件 @
ff48c972
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
mapper
;
/**
* @author wuminghao
* @date 2018/8/28 15:07
*/
public
interface
CHCRankingListMapper
{
/**
* 根据医生id判断是否在200名范围内
* @param doctorId
* @return
*/
int
selectRecordExistTop200
(
int
doctorId
);
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/mapper/DoctorMapper.java
浏览文件 @
ff48c972
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
mapper
;
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
mapper
;
import
com.pica.cloud.online.exam.analysis.server.entity.Doctor
;
import
com.pica.cloud.online.exam.analysis.server.entity.Doctor
;
import
org.omg.CORBA.INTERNAL
;
/**
/**
* @author wuminghao
* @author wuminghao
...
@@ -13,4 +14,18 @@ public interface DoctorMapper {
...
@@ -13,4 +14,18 @@ public interface DoctorMapper {
* @return
* @return
*/
*/
Doctor
selectByPrimaryKey
(
int
id
);
Doctor
selectByPrimaryKey
(
int
id
);
/**
* 根据医生id获取是否有权限
* @param doctorId
* @return
*/
Integer
selectAuthByDoctorId
(
Integer
doctorId
);
/**
* 根据医生id获取患者个数
* @param doctorId
* @return
*/
Integer
selectPatientCountByDoctorId
(
Integer
doctorId
);
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/DoctorService.java
浏览文件 @
ff48c972
...
@@ -13,4 +13,11 @@ public interface DoctorService {
...
@@ -13,4 +13,11 @@ public interface DoctorService {
* @return
* @return
*/
*/
Doctor
getDoctorById
(
Integer
doctorId
);
Doctor
getDoctorById
(
Integer
doctorId
);
/**
* 根据医生的id获取医生的权限
* @param doctorId
* @return
*/
boolean
isAuth
(
Integer
doctorId
);
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/impl/CHCRankingListServiceImpl.java
浏览文件 @
ff48c972
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
service
.
impl
;
package
com
.
pica
.
cloud
.
online
.
exam
.
analysis
.
server
.
service
.
impl
;
import
com.pica.cloud.online.exam.analysis.server.mapper.CHCRankingListMapper
;
import
com.pica.cloud.online.exam.analysis.server.service.CHCRankingListService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
@@ -7,6 +10,12 @@ import org.springframework.stereotype.Service;
...
@@ -7,6 +10,12 @@ import org.springframework.stereotype.Service;
* @date 2018/8/28 13:57
* @date 2018/8/28 13:57
*/
*/
@Service
@Service
public
class
CHCRankingListServiceImpl
{
public
class
CHCRankingListServiceImpl
implements
CHCRankingListService
{
@Autowired
CHCRankingListMapper
rankingListMapper
;
@Override
public
boolean
isRankingInTop200
(
Integer
doctorId
)
{
return
rankingListMapper
.
selectRecordExistTop200
(
doctorId
)
>
0
;
}
}
}
server/src/main/java/com/pica/cloud/online/exam/analysis/server/service/impl/DoctorServiceImpl.java
浏览文件 @
ff48c972
...
@@ -19,4 +19,9 @@ public class DoctorServiceImpl implements DoctorService {
...
@@ -19,4 +19,9 @@ public class DoctorServiceImpl implements DoctorService {
public
Doctor
getDoctorById
(
Integer
doctorId
)
{
public
Doctor
getDoctorById
(
Integer
doctorId
)
{
return
doctorMapper
.
selectByPrimaryKey
(
doctorId
);
return
doctorMapper
.
selectByPrimaryKey
(
doctorId
);
}
}
@Override
public
boolean
isAuth
(
Integer
doctorId
)
{
return
doctorMapper
.
selectAuthByDoctorId
(
doctorId
)
>
0
;
}
}
}
server/src/main/resources/mybatis/DoctorMapper.xml
浏览文件 @
ff48c972
...
@@ -18,4 +18,20 @@
...
@@ -18,4 +18,20 @@
limit 1
limit 1
</select>
</select>
<select
id=
"selectAuthByDoctorId"
resultType=
"java.lang.Integer"
parameterType=
"java.lang.Integer"
>
select
count(1)
from pica.p_doctor
where id = #{doctorId,jdbcType=INTEGER}
and delete_flag = 1
and (title_id in (101, 401) or administer_title_id in (101,102,103,104,105,106))
</select>
<select
id=
"selectPatientCountByDoctorId"
resultType=
"java.lang.Integer"
parameterType=
"java.lang.Integer"
>
select
count(1)
from pica.p_doc_pat_mapping
where doctor_id = #{doctorId,jdbcType=INTEGER}
and delete_flag = 1
</select>
</mapper>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录