riku
2021-09-26 7919d4bab9e4d787b5a8d5dd6c9d99d22e394ca7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.domain.entity.Itemevaluation
import cn.flightfeather.supervision.lightshare.service.ItemevaluationService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["评分子项得分API接口"])
@RestController
@RequestMapping("/itemevaluation")
class ItemevaluationController (val itemevaluationService: ItemevaluationService){
    @GetMapping
    fun getAll() = itemevaluationService.findAll()
 
    @GetMapping("/subtask/{id}")
    fun getBySubtaskId(@PathVariable id:String) = itemevaluationService.findBySubTaskID(id)
 
    @PutMapping
    fun add(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.save(itemevaluation)
 
    @PutMapping("/addlist")
    fun addList(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.savelist(itemevaluationlist)
 
    @PostMapping
    fun update(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.update(itemevaluation)
 
    @PostMapping("/uplist")
    fun updatelist(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.updatelist(itemevaluationlist)
 
    @GetMapping("/{id}")
    fun getById(@PathVariable id:String) = itemevaluationService.findOne(id)
 
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = itemevaluationService.delete(id)
 
    @GetMapping("/pointId/{evaluationId}")
    fun getItemEvaluationList(@PathVariable evaluationId: String) = itemevaluationService.getItemEvaluationList(evaluationId)
}