| | |
| | | import cn.flightfeather.supervision.lightshare.service.ProblemlistService |
| | | import cn.flightfeather.supervision.lightshare.service.SubtaskService |
| | | import cn.flightfeather.supervision.lightshare.vo.* |
| | | import com.fasterxml.jackson.core.type.TypeReference |
| | | import com.fasterxml.jackson.databind.ObjectMapper |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | |
| | | fun setDeleteStatus(@PathVariable id: String) = problemlistService.setDeleteStatus(id) |
| | | |
| | | @PostMapping("/add") |
| | | fun addProblem(@RequestBody problemlistVo: ProblemlistVo) { |
| | | fun addProblem(@RequestBody problemlistVo: ProblemListVo) { |
| | | problemlistService.addProblem(problemlistVo) |
| | | } |
| | | |
| | | @PostMapping("/getbyarea") |
| | | fun getByArea(@RequestBody areaVo: AreaVo): List<ProblemlistVo> = problemlistService.getByArea(areaVo) |
| | | fun getByArea(@RequestBody areaVo: AreaVo): List<ProblemListVo> = problemlistService.getByArea(areaVo) |
| | | |
| | | @GetMapping("/getbytoptask") |
| | | fun getByTopTask(@RequestParam(value = "tguid", required = true) tguid: String): List<ProblemlistVo> = |
| | | fun getByTopTask(@RequestParam(value = "tguid", required = true) tguid: String): List<ProblemListVo> = |
| | | problemlistService.getByTopTask(tguid) |
| | | |
| | | @PostMapping("/getStatisticalResult") |
| | |
| | | fun getProblemsByScene( |
| | | @RequestParam(value = "sceneId", required = true) sceneId: String, |
| | | @RequestParam date: String, |
| | | ): List<ProblemlistVo> = problemlistService.getProblemByScene(sceneId, date) |
| | | ): List<ProblemListVo> = problemlistService.getProblemByScene(sceneId, date) |
| | | |
| | | @GetMapping("/month_anlysis") |
| | | fun getMonthProblemsById( |
| | |
| | | @ApiOperation(value = "新增一个问题", notes = "简化上传所需问题信息,将大部分操作交由后台完成") |
| | | @PostMapping("/newProblem") |
| | | fun newProblem( |
| | | @RequestParam("problemVo") problemVo: String, |
| | | @RequestPart("images") files: Array<MultipartFile>, |
| | | @ApiParam("问题信息json") @RequestParam("problemVo") problemVo: String, |
| | | @ApiParam("问题图片") @RequestPart("images") files: Array<MultipartFile>, |
| | | ) = problemlistService.newProblem(problemVo, files) |
| | | |
| | | @ApiOperation("更新一个问题") |
| | | @PostMapping("/updateProblem") |
| | | fun updateDeviceLocation( |
| | | @ApiParam("问题信息json") @RequestParam("problem") problem: String, |
| | | @ApiParam("删除的问题图片id") @RequestParam("deleteImg") deleteImg: List<String>, |
| | | @ApiParam("问题图片") @RequestPart("images") images: Array<MultipartFile>, |
| | | ) = resPack { |
| | | val problemVo = ObjectMapper().readValue(problem, object : TypeReference<ProblemListVo>() {}) |
| | | problemlistService.updateProblem(problemVo, deleteImg, images) |
| | | } |
| | | |
| | | @ApiOperation(value = "整改一个问题", notes = "简化上传所需问题信息,将大部分操作交由后台完成") |
| | | @PostMapping("/changeProblem") |
| | | fun changeProblem( |