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)
|
}
|