|
|
@@ -154,6 +154,16 @@ public class QuestionServiceImpl extends BaseServiceImpl<QuestionMapper, Questio |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult<Boolean> check(QuestionStatusRequest entity) { |
|
|
|
//已经生成工单的问题无法修改 |
|
|
|
for (Integer id : entity.getId()) { |
|
|
|
List<WorkOrderQuestion> workOrderQuestions = workOrderQuestionMapper.selectList(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
|
.eq(WorkOrderQuestion::getQuestionId, id)); |
|
|
|
if(StringUtils.isNotEmpty(workOrderQuestions)){ |
|
|
|
return JsonResult.error("问题:"+id+"已生成工单,无法修改!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//根据ID的数量来判断是否是批量确认和忽略 |
|
|
|
Question question=new Question(UpdateOrCreateEnum.UPDATE.getCode()); |
|
|
|
question.setStatus(entity.getStatus()); |