|
|
@@ -5,18 +5,19 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.tuoheng.admin.common.ServiceExceptionEnum; |
|
|
|
import com.tuoheng.admin.entity.domain.Question; |
|
|
|
import com.tuoheng.admin.entity.domain.QuestionHandle; |
|
|
|
import com.tuoheng.admin.entity.domain.ThInspection; |
|
|
|
import com.tuoheng.admin.entity.domain.WorkOrder; |
|
|
|
import com.tuoheng.admin.entity.domain.WorkOrderQuestion; |
|
|
|
import com.tuoheng.admin.entity.request.WorkOrderHandleRequest; |
|
|
|
import com.tuoheng.admin.entity.request.WorkOrderQuestionRequest; |
|
|
|
import com.tuoheng.admin.entity.request.WorkOrderRequest; |
|
|
|
import com.tuoheng.admin.entity.vo.WorkOrderInfoVO; |
|
|
|
import com.tuoheng.admin.entity.vo.QuestionDetailVO; |
|
|
|
import com.tuoheng.admin.entity.vo.WorkOrderQuestionVO; |
|
|
|
import com.tuoheng.admin.enums.MarkTypeEnum; |
|
|
|
import com.tuoheng.admin.enums.WorkOrderStatusEnum; |
|
|
|
import com.tuoheng.admin.mapper.QuestionHandleMapper; |
|
|
|
import com.tuoheng.admin.mapper.QuestionMapper; |
|
|
|
import com.tuoheng.admin.mapper.WorkOrderMapper; |
|
|
|
import com.tuoheng.admin.mapper.WorkOrderQuestionMapper; |
|
|
|
import com.tuoheng.admin.service.IWorkOrderService; |
|
|
@@ -52,6 +53,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
@Autowired |
|
|
|
private QuestionHandleMapper questionHandleMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private QuestionMapper questionMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private UserMapper userMapper; |
|
|
|
|
|
|
@@ -186,5 +190,27 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
return JsonResult.success(pageInfo); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult questionDetail(Integer questionId) { |
|
|
|
QuestionDetailVO questionDetailVO = new QuestionDetailVO(); |
|
|
|
//查询问题详情 |
|
|
|
Question question = questionMapper.selectById(questionId); |
|
|
|
questionDetailVO.setQuestion(question); |
|
|
|
|
|
|
|
//查询问题处理详情 |
|
|
|
QuestionHandle questionHandle = questionHandleMapper.selectOne(new LambdaQueryWrapper<QuestionHandle>() |
|
|
|
.eq(QuestionHandle::getQuestionId, questionId) |
|
|
|
.eq(QuestionHandle::getMark, MarkTypeEnum.VALID.getCode())); |
|
|
|
|
|
|
|
//查询问题处理状态 |
|
|
|
WorkOrderQuestion workOrderQuestion = workOrderQuestionMapper.selectOne(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
|
.eq(WorkOrderQuestion::getQuestionId, questionId)); |
|
|
|
questionDetailVO.setQuestionHandle(questionHandle); |
|
|
|
questionHandle.setStatus(workOrderQuestion.getStatus()); |
|
|
|
|
|
|
|
questionDetailVO.setQuestionHandle(questionHandle); |
|
|
|
return JsonResult.success(questionDetailVO); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |