提交 809d6dae authored 作者: 马晨俊's avatar 马晨俊

Merge branch 'master' of git.yfzx.zjtys.com.cn:912-system/monitor/inspect

...@@ -2,7 +2,6 @@ package com.zjty.inspect.controller; ...@@ -2,7 +2,6 @@ package com.zjty.inspect.controller;
import com.zjty.inspect.entity.Evaluation; import com.zjty.inspect.entity.Evaluation;
import com.zjty.inspect.entity.PageResult; import com.zjty.inspect.entity.PageResult;
import com.zjty.inspect.entity.RuleQo;
import com.zjty.inspect.service.EvaluationService; import com.zjty.inspect.service.EvaluationService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -37,13 +36,19 @@ public class EvaluationController { ...@@ -37,13 +36,19 @@ public class EvaluationController {
@GetMapping(value = "/{name}") @GetMapping(value = "/{name}")
public ResponseEntity getName(@PathVariable String name) { public ResponseEntity getName(@PathVariable String name) {
Evaluation evaluation = evaluationService.findByName(name); Evaluation evaluation = evaluationService.findByName(name);
return ResponseEntity.ok(evaluation.getOutEva()); if(evaluation!=null){
return ResponseEntity.ok(evaluation.getOutEva());
}
return ResponseEntity.ok(null);
} }
@ApiOperation("根据用户名查询输如") @ApiOperation("根据用户名查询输如")
@GetMapping(value = "/in/{name}") @GetMapping(value = "/in/{name}")
public ResponseEntity getInName(@PathVariable String name) { public ResponseEntity getInName(@PathVariable String name) {
Evaluation evaluation = evaluationService.findByName(name); Evaluation evaluation = evaluationService.findByName(name);
return ResponseEntity.ok(evaluation.getInEva()); if(evaluation!=null){
return ResponseEntity.ok(evaluation.getInEva());
}
return ResponseEntity.ok(null);
} }
/** /**
* 修改评估报告 * 修改评估报告
......
...@@ -73,7 +73,11 @@ public class EvaluationServiceImpl implements EvaluationService { ...@@ -73,7 +73,11 @@ public class EvaluationServiceImpl implements EvaluationService {
@Override @Override
public Evaluation findByName(String name) { public Evaluation findByName(String name) {
return evaluationDao.findByUsername(name); Evaluation evaluation = evaluationDao.findByUsername(name);
if(evaluation!=null){
return evaluation;
}
return null;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论