ソースを参照

Merge branch 'develop' into release

tags/v1.2.0^2
wanghaoran 1年前
コミット
4027763063
3個のファイルの変更6行の追加3行の削除
  1. +1
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java
  2. +1
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java
  3. +4
    -3
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java

+ 1
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java ファイルの表示

@@ -372,6 +372,7 @@ public class QuestionServiceImpl extends BaseServiceImpl<QuestionMapper, Questio
BeanUtils.copyProperties(questionFile, question);
ThInspection flightDataByTime = getFlightDataByTime(flightDataList, questionFile.getAnalyseTime().getTime());
question.setMissionId(mission.getId());
question.setTenantId(mission.getTenantId());
question.setMissionName(mission.getName());
question.setLat(flightDataByTime.getLat());
question.setLng(flightDataByTime.getLng());

+ 1
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java ファイルの表示

@@ -99,6 +99,7 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper,
}
ThMission mission = thMissions.get(0);
inspection.setMissionId(mission.getId());
inspection.setTenantId(mission.getTenantId());
inspectionMapper.insert(inspection);
return inspection.getId();
}

+ 4
- 3
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java ファイルの表示

@@ -119,9 +119,10 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
@Override
@Transactional
public JsonResult generate(Integer[] ids) {
Integer questionId = ids[0];
Question question = questionMapper.selectById(questionId);
//校验,已生成工单的问题,无法生成工单
Integer count = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>()
.eq(WorkOrderQuestion::getTenantId, ShiroUtils.getTenantId())//xz
.in(WorkOrderQuestion::getQuestionId, ids));
if(count > 0){
return JsonResult.error("有问题已生成工单");
@@ -131,7 +132,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO

WorkOrder workOrder = new WorkOrder();
workOrder.setCode(code);
workOrder.setTenantId(ShiroUtils.getTenantId());//xz
workOrder.setTenantId(question.getTenantId());//xz
workOrderMapper.insert(workOrder);

for (Integer id : ids) {
@@ -139,7 +140,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
WorkOrderQuestion workOrderQuestion = new WorkOrderQuestion();
workOrderQuestion.setWorkOrderId(workOrder.getId());
workOrderQuestion.setQuestionId(id);
workOrderQuestion.setTenantId(ShiroUtils.getTenantId());//xz
workOrderQuestion.setTenantId(question.getTenantId());//xz
workOrderQuestionMapper.insert(workOrderQuestion);
}
return JsonResult.success();

読み込み中…
キャンセル
保存