提交 9481332e authored 作者: 马晨俊's avatar 马晨俊

mcj:新增关键技术管理、规则管理、评估报告管理的权限配置

上级 e074bbd2
......@@ -41,7 +41,7 @@ public class EvaluationController {
}
@ApiOperation("根据用户名查询最新的报告输出")
@GetMapping(value = "/eva")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity getName(@RequestParam String name,@RequestParam String id) {
if(StringUtils.isEmpty(id)||id.equals("null")){
Evaluation e = evaluationService.findByName(name);
......@@ -60,7 +60,7 @@ public class EvaluationController {
}
@ApiOperation("根据id查询输入")
@GetMapping(value = "/in/{name}")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity getInName(@PathVariable String name) {
Evaluation evaluation = evaluationService.findById(name);
if(evaluation!=null){
......@@ -72,7 +72,7 @@ public class EvaluationController {
@ApiOperation("根据id查询输入")
@GetMapping(value = "/all/{id}")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity getInId(@PathVariable String id) {
Evaluation evaluation = evaluationService.findById(id);
if(evaluation!=null){
......@@ -83,7 +83,7 @@ public class EvaluationController {
@ApiOperation("根据报告id查询excel输入")
@GetMapping(value = "/in/excel/{id}")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity exportInName(@PathVariable String id) {
Evaluation evaluation = evaluationService.findById(id);
if(evaluation!=null){
......@@ -101,7 +101,7 @@ public class EvaluationController {
*/
@PostMapping(value = "/{id}")
@ApiOperation("修改评估报告")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity update(@RequestBody Evaluation evaluation,@PathVariable String id){
evaluation.setId(id);
evaluationService.update(evaluation);
......@@ -114,7 +114,7 @@ public class EvaluationController {
*/
@ApiOperation("根据id删除评估报告")
@DeleteMapping(value = "/{id}")
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity deleteById(@PathVariable String id){
evaluationService.delete(id);
return ResponseEntity.ok(200);
......@@ -132,7 +132,7 @@ public class EvaluationController {
@ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int")
})
@RequestMapping(value="/search/{page}/{size}",method= RequestMethod.POST)
@AuthAnnotation(code = {"800"})
@AuthAnnotation(code = {"000800"})
public ResponseEntity findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){
Page<Evaluation> pageList = evaluationService.findSearch(searchMap, page, size);
return ResponseEntity.ok(new PageResult<Evaluation>(pageList.getTotalElements(), pageList.getContent()) );
......
......@@ -39,7 +39,7 @@ public class RuleController {
*/
@PostMapping
@ApiOperation("新增规则")
@AuthAnnotation(code = {"1200","1400"})
@AuthAnnotation(code = {"001200","001400"})
public ResponseEntity rule(@RequestBody Rule rule){
log.info("规则{}",rule);
Rule rule1 = ruleService.addRulePlus(rule);
......@@ -55,7 +55,7 @@ public class RuleController {
*/
@PostMapping(value = "/update")
@ApiOperation("修改规则")
@AuthAnnotation(code = {"1200","1400"})
@AuthAnnotation(code = {"001200","001400"})
public ResponseEntity update(@RequestBody Rule rule){
ruleService.upRulePlus(rule);
return ResponseEntity.ok(200);
......@@ -67,7 +67,7 @@ public class RuleController {
*/
@ApiOperation("根据数据封装删除规则")
@DeleteMapping(value = "/{id}")
@AuthAnnotation(code = {"1200","1400"})
@AuthAnnotation(code = {"001200","001400"})
public ResponseEntity deleteByQo(@PathVariable String id){
ruleService.deleteRulePlus(id);
return ResponseEntity.ok(200);
......@@ -88,6 +88,7 @@ public class RuleController {
@ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int")
})
@RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST)
@AuthAnnotation(code = {"001200","001400"})
public ResponseEntity findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){
Page<Rule> pageList = ruleService.findSearch(searchMap, page, size);
return ResponseEntity.ok(new PageResult<Rule>(pageList.getTotalElements(), pageList.getContent()) );
......@@ -105,7 +106,7 @@ public class RuleController {
}
@PostMapping("/importRules")
@ApiOperation("导入所有规则")
@AuthAnnotation(code = {"1200"})
@AuthAnnotation(code = {"001200"})
public ResponseEntity importRules(@RequestParam("file") MultipartFile file){
ruleService.importRules(file);
return null;
......
......@@ -41,6 +41,7 @@ public class TechnologyController {
}
@GetMapping("/names")
@ApiOperation("获取所有关键技术name")
@AuthAnnotation(code = {"001100"})
public ResponseEntity getTechnologiesName(){
return ResponseEntity.ok(technologyService.findAllTechnologyNames());
}
......@@ -51,6 +52,7 @@ public class TechnologyController {
*/
@GetMapping(value = "/{name}")
@ApiOperation("根据name获取所有关键技术")
@AuthAnnotation(code = {"001100"})
public ResponseEntity getTechnologies(@PathVariable String name){
return ResponseEntity.ok(technologyService.findAllTechnology(name));
}
......@@ -60,7 +62,7 @@ public class TechnologyController {
*/
@PostMapping("/add")
@ApiOperation("新添加关键技术")
@AuthAnnotation(code = {"1100"})
@AuthAnnotation(code = {"001100"})
public ResponseEntity addTechnologies(@RequestBody Technology technology){
technologyService.add(technology);
return ResponseEntity.ok(200);
......@@ -68,7 +70,7 @@ public class TechnologyController {
}
@PostMapping(value = "/{id}")
@ApiOperation("修改关键技术")
@AuthAnnotation(code = {"1100"})
@AuthAnnotation(code = {"001100"})
public ResponseEntity update(@RequestBody Technology technology,@PathVariable String id){
technology.setId(id);
technologyService.update(technology);
......@@ -87,6 +89,7 @@ public class TechnologyController {
@ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int")
})
@RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST)
@AuthAnnotation(code = {"001100"})
public ResponseEntity findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){
Page<Technology> pageList = technologyService.findSearch(searchMap, page, size);
return ResponseEntity.ok(new PageResult<Technology>(pageList.getTotalElements(), pageList.getContent()) );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论