Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
e074bbd2
提交
e074bbd2
authored
4月 16, 2020
作者:
马晨俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mcj:新增报告管理权限拦截
上级
855cc5fe
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
0 行删除
+8
-0
EvaluationController.java
...ava/com/zjty/inspect/controller/EvaluationController.java
+8
-0
没有找到文件。
src/main/java/com/zjty/inspect/controller/EvaluationController.java
浏览文件 @
e074bbd2
package
com
.
zjty
.
inspect
.
controller
;
package
com
.
zjty
.
inspect
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.zjty.inspect.aop.AuthAnnotation
;
import
com.zjty.inspect.entity.*
;
import
com.zjty.inspect.entity.*
;
import
com.zjty.inspect.service.EvaluationService
;
import
com.zjty.inspect.service.EvaluationService
;
import
com.zjty.inspect.utils.ExcelUtil
;
import
com.zjty.inspect.utils.ExcelUtil
;
...
@@ -40,6 +41,7 @@ public class EvaluationController {
...
@@ -40,6 +41,7 @@ public class EvaluationController {
}
}
@ApiOperation
(
"根据用户名查询最新的报告输出"
)
@ApiOperation
(
"根据用户名查询最新的报告输出"
)
@GetMapping
(
value
=
"/eva"
)
@GetMapping
(
value
=
"/eva"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
getName
(
@RequestParam
String
name
,
@RequestParam
String
id
)
{
public
ResponseEntity
getName
(
@RequestParam
String
name
,
@RequestParam
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
)||
id
.
equals
(
"null"
)){
if
(
StringUtils
.
isEmpty
(
id
)||
id
.
equals
(
"null"
)){
Evaluation
e
=
evaluationService
.
findByName
(
name
);
Evaluation
e
=
evaluationService
.
findByName
(
name
);
...
@@ -58,6 +60,7 @@ public class EvaluationController {
...
@@ -58,6 +60,7 @@ public class EvaluationController {
}
}
@ApiOperation
(
"根据id查询输入"
)
@ApiOperation
(
"根据id查询输入"
)
@GetMapping
(
value
=
"/in/{name}"
)
@GetMapping
(
value
=
"/in/{name}"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
getInName
(
@PathVariable
String
name
)
{
public
ResponseEntity
getInName
(
@PathVariable
String
name
)
{
Evaluation
evaluation
=
evaluationService
.
findById
(
name
);
Evaluation
evaluation
=
evaluationService
.
findById
(
name
);
if
(
evaluation
!=
null
){
if
(
evaluation
!=
null
){
...
@@ -69,6 +72,7 @@ public class EvaluationController {
...
@@ -69,6 +72,7 @@ public class EvaluationController {
@ApiOperation
(
"根据id查询输入"
)
@ApiOperation
(
"根据id查询输入"
)
@GetMapping
(
value
=
"/all/{id}"
)
@GetMapping
(
value
=
"/all/{id}"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
getInId
(
@PathVariable
String
id
)
{
public
ResponseEntity
getInId
(
@PathVariable
String
id
)
{
Evaluation
evaluation
=
evaluationService
.
findById
(
id
);
Evaluation
evaluation
=
evaluationService
.
findById
(
id
);
if
(
evaluation
!=
null
){
if
(
evaluation
!=
null
){
...
@@ -79,6 +83,7 @@ public class EvaluationController {
...
@@ -79,6 +83,7 @@ public class EvaluationController {
@ApiOperation
(
"根据报告id查询excel输入"
)
@ApiOperation
(
"根据报告id查询excel输入"
)
@GetMapping
(
value
=
"/in/excel/{id}"
)
@GetMapping
(
value
=
"/in/excel/{id}"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
exportInName
(
@PathVariable
String
id
)
{
public
ResponseEntity
exportInName
(
@PathVariable
String
id
)
{
Evaluation
evaluation
=
evaluationService
.
findById
(
id
);
Evaluation
evaluation
=
evaluationService
.
findById
(
id
);
if
(
evaluation
!=
null
){
if
(
evaluation
!=
null
){
...
@@ -96,6 +101,7 @@ public class EvaluationController {
...
@@ -96,6 +101,7 @@ public class EvaluationController {
*/
*/
@PostMapping
(
value
=
"/{id}"
)
@PostMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"修改评估报告"
)
@ApiOperation
(
"修改评估报告"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
update
(
@RequestBody
Evaluation
evaluation
,
@PathVariable
String
id
){
public
ResponseEntity
update
(
@RequestBody
Evaluation
evaluation
,
@PathVariable
String
id
){
evaluation
.
setId
(
id
);
evaluation
.
setId
(
id
);
evaluationService
.
update
(
evaluation
);
evaluationService
.
update
(
evaluation
);
...
@@ -108,6 +114,7 @@ public class EvaluationController {
...
@@ -108,6 +114,7 @@ public class EvaluationController {
*/
*/
@ApiOperation
(
"根据id删除评估报告"
)
@ApiOperation
(
"根据id删除评估报告"
)
@DeleteMapping
(
value
=
"/{id}"
)
@DeleteMapping
(
value
=
"/{id}"
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
deleteById
(
@PathVariable
String
id
){
public
ResponseEntity
deleteById
(
@PathVariable
String
id
){
evaluationService
.
delete
(
id
);
evaluationService
.
delete
(
id
);
return
ResponseEntity
.
ok
(
200
);
return
ResponseEntity
.
ok
(
200
);
...
@@ -125,6 +132,7 @@ public class EvaluationController {
...
@@ -125,6 +132,7 @@ public class EvaluationController {
@ApiImplicitParam
(
name
=
"size"
,
value
=
"每页记录数"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"int"
)
@ApiImplicitParam
(
name
=
"size"
,
value
=
"每页记录数"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"int"
)
})
})
@RequestMapping
(
value
=
"/search/{page}/{size}"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/search/{page}/{size}"
,
method
=
RequestMethod
.
POST
)
@AuthAnnotation
(
code
=
{
"800"
})
public
ResponseEntity
findSearch
(
@RequestBody
Map
searchMap
,
@PathVariable
int
page
,
@PathVariable
int
size
){
public
ResponseEntity
findSearch
(
@RequestBody
Map
searchMap
,
@PathVariable
int
page
,
@PathVariable
int
size
){
Page
<
Evaluation
>
pageList
=
evaluationService
.
findSearch
(
searchMap
,
page
,
size
);
Page
<
Evaluation
>
pageList
=
evaluationService
.
findSearch
(
searchMap
,
page
,
size
);
return
ResponseEntity
.
ok
(
new
PageResult
<
Evaluation
>(
pageList
.
getTotalElements
(),
pageList
.
getContent
())
);
return
ResponseEntity
.
ok
(
new
PageResult
<
Evaluation
>(
pageList
.
getTotalElements
(),
pageList
.
getContent
())
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论