| | |
| | | package cn.flightfeather.supervision.lightshare.web |
| | | |
| | | import cn.flightfeather.supervision.config.IgnoreResponseAdvice |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation |
| | | import cn.flightfeather.supervision.lightshare.service.ItemevaluationService |
| | | import cn.flightfeather.supervision.lightshare.vo.AreaVo |
| | | import cn.flightfeather.supervision.lightshare.vo.EvaluationUpdateVo |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.web.bind.annotation.* |
| | | |
| | | @Api(tags = ["ItemevaluationController"], description = "评估子项得分API接口") |
| | | @RestController |
| | | @RequestMapping("/itemevaluation") |
| | | class ItemevaluationController (val itemevaluationService: ItemevaluationService){ |
| | | @IgnoreResponseAdvice |
| | | @GetMapping |
| | | fun getAll() = itemevaluationService.findAll() |
| | | |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/subtask/{id}") |
| | | fun getBySubtaskId(@PathVariable id:String) = itemevaluationService.findBySubTaskID(id) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PutMapping |
| | | fun add(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.save(itemevaluation) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PutMapping("/addlist") |
| | | fun addList(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.savelist(itemevaluationlist) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping |
| | | fun update(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.update(itemevaluation) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("/uplist") |
| | | fun updatelist(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.updatelist(itemevaluationlist) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/{id}") |
| | | fun getById(@PathVariable id:String) = itemevaluationService.findOne(id) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @DeleteMapping("/{id}") |
| | | fun delete (@PathVariable id: String) = itemevaluationService.delete(id) |
| | | |
| | | @ApiOperation(value = "新增具体评估结果") |
| | | @PostMapping("/create") |
| | | fun createItemEvaluation( |
| | | @ApiParam(value = "巡查任务主键id") @RequestParam subTaskId: String, |
| | | @ApiParam(value = "评估规则主键id", name = "2024.9.24,目前无需传入此参数,本接口统一为自动评估规则") |
| | | @RequestParam(required = false) ruleId: String?, |
| | | @ApiParam(value = "具体扣分条目主键(只传最小级别的评估项)") @RequestBody itemList: List<String>, |
| | | ) = resPack { itemevaluationService.createItemEvaluation(subTaskId, ruleId, itemList) } |
| | | |
| | | @ApiOperation(value = "更新具体评估结果") |
| | | @PostMapping("/update") |
| | | fun updateItemEvaluation( |
| | | @ApiParam(value = "巡查任务主键id") @RequestParam subTaskId: String, |
| | | @ApiParam(value = "评估规则主键id", name = "2024.9.24,目前无需传入此参数,本接口统一为自动评估规则") |
| | | @RequestParam(required = false) ruleId: String?, |
| | | @ApiParam(value = "具体扣分条目主键(只传最小级别的评估项)") @RequestBody itemList: List<String>, |
| | | ) = resPack { itemevaluationService.updateItemEvaluation(subTaskId, ruleId, itemList) } |
| | | |
| | | @ApiOperation(value = "批量更新评估结果") |
| | | @PostMapping("/update/multiple") |
| | | fun updateMonitorDataEva( |
| | | @ApiParam("得分修改细节") @RequestBody evaVo: EvaluationUpdateVo, |
| | | ) = resPack { itemevaluationService.updateMonitorDataEva(evaVo) } |
| | | } |