feiyu02
2025-09-30 6904763f0e74d9a9fa4dbc39f635d2aee39416c6
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
39
40
41
42
43
44
45
46
47
48
49
50
51
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 io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
import springfox.documentation.annotations.ApiIgnore
 
@Api(tags = ["评分子项得分API接口"])
@RestController
@RequestMapping("/itemevaluation")
class ItemevaluationController (val itemevaluationService: ItemevaluationService){
    @ApiOperation(value = "获取所有评分子项得分记录")
    @GetMapping
    fun getAll() = itemevaluationService.findAll()
 
    @ApiOperation(value = "根据子任务id获取评分子项得分记录")
    @GetMapping("/subtask/{id}")
    fun getBySubtaskId(@ApiParam(value = "子任务id") @PathVariable id:String) = itemevaluationService.findBySubTaskID(id)
 
    @ApiOperation(value = "上传一个评分子项得分记录")
    @PutMapping
    fun add(@ApiParam(value = "评分子项得分记录") @RequestBody itemevaluation: Itemevaluation) = itemevaluationService.save(itemevaluation)
 
    @ApiOperation(value = "上传一组评分子项得分记录")
    @PutMapping("/addlist")
    fun addList(@ApiParam(value = "评分子项得分记录数组") @RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.savelist(itemevaluationlist)
 
    @ApiOperation(value = "更新一条评分子项得分记录")
    @PostMapping
    fun update(@ApiParam(value = "评分子项得分记录") @RequestBody itemevaluation: Itemevaluation) = itemevaluationService.update(itemevaluation)
 
    @ApiOperation(value = "更新一组评分子项得分记录")
    @PostMapping("/uplist")
    fun updatelist(@ApiParam(value = "评分子项得分记录数组") @RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.updatelist(itemevaluationlist)
 
    @ApiOperation(value = "查找评分子项得分记录")
    @GetMapping("/{id}")
    fun getById(@ApiParam(value = "评分子项得分记录id") @PathVariable id:String) = itemevaluationService.findOne(id)
 
    @ApiIgnore
    @ApiOperation(value = "删除评分子项得分记录")
    @DeleteMapping("/{id}")
    fun delete (@ApiParam(value = "评分子项得分记录id") @PathVariable id: String) = itemevaluationService.delete(id)
 
    @ApiOperation(value = "根据总分id获取对应评分子项得分记录")
    @GetMapping("/pointId/{evaluationId}")
    fun getItemEvaluationList(@ApiParam(value = "总分记录id") @PathVariable evaluationId: String) = itemevaluationService.getItemEvaluationList(evaluationId)
}