|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemDictData; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.FinishAnswerDTO; | 
|---|
|  |  |  | import com.doumee.dao.web.response.DeviceRoleVO; | 
|---|
|  |  |  | import com.doumee.dao.web.response.ProblemsVO; | 
|---|
|  |  |  | import com.doumee.service.business.DeviceRoleService; | 
|---|
|  |  |  | import com.doumee.service.business.DeviceService; | 
|---|
|  |  |  | import com.doumee.service.business.ProblemLogService; | 
|---|
|  |  |  | import com.doumee.service.business.ProblemsService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.checkerframework.checker.units.qual.A; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ProblemsService problemsService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ProblemLogService problemLogService; | 
|---|
|  |  |  | private DeviceRoleService deviceRoleService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "查询字典值数据", notes = "H5") | 
|---|
|  |  |  | @GetMapping("/getSystemDictData") | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success("查询成功",systemDictDataBiz.queryByCode(dictCode,label)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "获取题目数据", notes = "H5") | 
|---|
|  |  |  | @GetMapping("/getProblemsVO") | 
|---|
|  |  |  | @ApiOperation(value = "设备组列表", notes = "H5") | 
|---|
|  |  |  | @GetMapping("/deviceRoleList") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "useType", value = "使用场景 0劳务人员 1普通访客", required = true) | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0劳务访客 1普通访客 2内部人员", required = true) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<List<ProblemsVO>> getProblemsVO(@RequestParam Integer useType) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功",problemsService.getProblemsVO(useType)); | 
|---|
|  |  |  | public ApiResponse<List<DeviceRoleVO>> deviceRoleList(@RequestParam Integer type) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功",deviceRoleService.findListByType(type)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "保存答题记录", notes = "H5") | 
|---|
|  |  |  | @PostMapping("/finishAnswer") | 
|---|
|  |  |  | public ApiResponse<Integer> finishAnswer(@RequestBody FinishAnswerDTO finishAnswerDTO) { | 
|---|
|  |  |  | return ApiResponse.success("查询成功",problemLogService.finishAnswer(finishAnswerDTO)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|