Browse Source

Merge branch 'develop' into release

tags/v1.1.0^2
wanghaoran 1 year ago
parent
commit
e35d2be54a
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java

+ 10
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java View File

@@ -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());

Loading…
Cancel
Save