Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
0749a45e
提交
0749a45e
authored
4月 26, 2020
作者:
孙洁清
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决内存溢出
上级
cb52746d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
1 行删除
+24
-1
EvaluationController.java
...ava/com/zjty/inspect/controller/EvaluationController.java
+8
-1
EvaluationService.java
...main/java/com/zjty/inspect/service/EvaluationService.java
+1
-0
EvaluationServiceImpl.java
.../com/zjty/inspect/service/impl/EvaluationServiceImpl.java
+15
-0
没有找到文件。
src/main/java/com/zjty/inspect/controller/EvaluationController.java
浏览文件 @
0749a45e
...
...
@@ -48,6 +48,13 @@ public class EvaluationController {
Evaluation
newEvaluation
=
evaluationService
.
save
(
evaluation
);
return
ServerResponse
.
ok
(
newEvaluation
);
}
@ApiOperation
(
"test"
)
@GetMapping
(
value
=
"/test"
)
// @AuthAnnotation(code = {"000800"})
public
ServerResponse
test
()
{
evaluationService
.
test
();
return
ServerResponse
.
ok
(
null
);
}
@ApiOperation
(
"根据用户名查询最新的报告输出"
)
@GetMapping
(
value
=
"/eva"
)
...
...
@@ -143,7 +150,7 @@ public class EvaluationController {
@ApiImplicitParam
(
name
=
"size"
,
value
=
"每页记录数"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"int"
)
})
@RequestMapping
(
value
=
"/search/{page}/{size}"
,
method
=
RequestMethod
.
POST
)
//
@AuthAnnotation(code = {"000800"})
@AuthAnnotation
(
code
=
{
"000800"
})
public
ServerResponse
<
PageResult
<
EvaReport
>>
findSearch
(
@RequestBody
Map
<
String
,
String
>
searchMap
,
@PathVariable
int
page
,
@PathVariable
int
size
)
{
Page
<
EvaReport
>
pageList
=
evaReportService
.
findSearch
(
searchMap
,
page
,
size
);
return
ServerResponse
.
ok
(
new
PageResult
<>(
pageList
.
getTotalElements
(),
pageList
.
getContent
()));
...
...
src/main/java/com/zjty/inspect/service/EvaluationService.java
浏览文件 @
0749a45e
...
...
@@ -13,4 +13,5 @@ public interface EvaluationService {
Page
<
Evaluation
>
findSearch
(
Map
<
String
,
String
>
searchMap
,
int
page
,
int
size
);
Evaluation
findById
(
String
id
);
Evaluation
findByName
(
String
name
);
void
test
();
}
src/main/java/com/zjty/inspect/service/impl/EvaluationServiceImpl.java
浏览文件 @
0749a45e
...
...
@@ -8,6 +8,7 @@ import com.zjty.inspect.service.EvaluationService;
import
com.zjty.inspect.utils.UUIDUtil
;
import
io.netty.util.internal.StringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
...
...
@@ -70,6 +71,20 @@ public class EvaluationServiceImpl implements EvaluationService {
evaluationDao
.
save
(
evaluation
);
}
public
void
test
(){
List
<
Evaluation
>
all
=
evaluationDao
.
findAll
();
for
(
Evaluation
evaluation
:
all
)
{
Optional
<
EvaReport
>
optional
=
evaReportDao
.
findById
(
evaluation
.
getId
());
if
(!
optional
.
isPresent
()){
evaluation
.
setDel
(
0
);
EvaReport
evaReport
=
new
EvaReport
();
BeanUtils
.
copyProperties
(
evaluation
,
evaReport
);
evaluationDao
.
save
(
evaluation
);
evaReportDao
.
save
(
evaReport
);
}
}
}
@Override
public
void
delete
(
String
id
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论