Browse Source

根据AI识别应急问题,应急记录数据入库

tags/v1.2.0^2
chengwang 1 year ago
parent
commit
c469e5c332
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java

+ 3
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java View File

@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.enums.*;
import com.tuoheng.admin.enums.code.questiontype.QuestionTypeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.third.DspCallbackRequest;
import com.tuoheng.admin.request.third.QuestionFile;
@@ -301,11 +300,13 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
for (InspectionFile inspectionFile : inspectionFileList) {
Accident accident = new Accident();
//问题类型为应急类型时添加数据
if(inspectionFile.getQuestionCode().equals(QuestionCodeEnum.TURN_OVER.getCode()) || inspectionFile.getQuestionCode().equals(QuestionCodeEnum.REAR_END_COLLISION.getCode())){
if(inspectionFile.getQuestionCode().equals(QuestionCodeEnum.PONDING.getCode())
|| inspectionFile.getQuestionCode().equals(QuestionCodeEnum.BIOCKY_CRACK.getCode())){
accident.setTenantId(inspectionFile.getTenantId());
accident.setDeptId(deptId);
accident.setInspectionId(inspectionFile.getInspectionId());
accident.setInspectionFileId(inspectionFile.getId());
//应急任务id
accident.setAccidentInspectionId(inspectionFile.getInspectionId());
//根据巡检任务查询对应的公路id
Inspection inspection = inspectionMapper.selectById(inspectionFile.getInspectionId());

Loading…
Cancel
Save