@@ -0,0 +1,9 @@ | |||
-- 2024-01-19 11:20 | |||
-- v1.3.7 | |||
use tuoheng_freeway; | |||
-- 事件表 | |||
alter table tuoheng_freeway.th_accident add report_type tinyint(1) default 1 not null comment '上报类型:1:自动上报(默认);2:手动上报' after dept_id; | |||
@@ -32,6 +32,11 @@ public class Accident extends BaseEntity { | |||
*/ | |||
private String deptId; | |||
/** | |||
* 上报类型:1:自动上报(默认);2:手动上报 | |||
*/ | |||
private Integer reportType; | |||
/** | |||
* 巡检任务id | |||
*/ |
@@ -0,0 +1,27 @@ | |||
package com.tuoheng.admin.enums.accident; | |||
import lombok.Getter; | |||
/** | |||
* 事件上报类型 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2024-01-19 | |||
*/ | |||
public enum AccidentReportTypeEnum { | |||
AUTO(1,"自动上报"), | |||
MANUAL(2,"手动上报"),; | |||
AccidentReportTypeEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -32,7 +32,7 @@ public class AccidentIgnoreService { | |||
private AccidentMapper accidentMapper; | |||
public JsonResult ignore(String id) { | |||
// log.info("进入忽略事故业务"); | |||
// log.info("进入忽略事故业务, id={}", id); | |||
User user = CurrentUserUtil.getUserInfo(); | |||
String userId = user.getId(); | |||
String tenantId = user.getTenantId(); |
@@ -10,6 +10,7 @@ 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.accident.AccidentReportTypeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.request.third.DspCallbackRequest; | |||
import com.tuoheng.admin.request.third.QuestionFile; | |||
@@ -335,6 +336,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService { | |||
} | |||
Accident accident = new Accident(); | |||
//问题类型为应急类型时添加数据 | |||
accident.setReportType(AccidentReportTypeEnum.AUTO.getCode()); | |||
accident.setTenantId(inspectionFile.getTenantId()); | |||
accident.setInspectionId(inspectionFile.getInspectionId()); | |||
accident.setInspectionFileId(inspectionFile.getId()); |
@@ -6,6 +6,7 @@ | |||
<result property="id" column="id" /> | |||
<result property="tenantId" column="tenant_id" /> | |||
<result property="deptId" column="dept_id" /> | |||
<result property="reportType" column="report_type" /> | |||
<result property="inspectionId" column="inspection_id" /> | |||
<result property="inspectionFileId" column="inspection_file_id" /> | |||
<result property="accidentInspectionId" column="accident_inspection_id" /> | |||
@@ -42,13 +43,13 @@ | |||
<sql id="Base_Column_List"> | |||
id, tenant_id, dept_id, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, | |||
id, tenant_id, dept_id, report_type, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, | |||
is_casualties, is_driving_safety, is_fire, record, longitude, latitude, uav_return, status, create_user, create_time, update_user, update_time, | |||
check_user, check_time, check_result, verification_time, report_time, no_accident_time, ignore_time, end_time, flag, mark | |||
</sql> | |||
<sql id="selectThAccidentVo"> | |||
select id, tenant_id, dept_id, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, | |||
select id, tenant_id, dept_id, report_type, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, | |||
is_casualties, is_driving_safety, is_fire, record, longitude, latitude, uav_return, status, create_user, create_time, update_user, update_time, | |||
check_user, check_time, check_result, verification_time, report_time, no_accident_time, ignore_time, end_time, flag, mark | |||
from th_accident |
@@ -38,18 +38,18 @@ public class DspCallbackServiceTest { | |||
@Test | |||
public void testGetOneById() { | |||
String requestId = "369567d311de473886c40a5c85305493"; | |||
String requestId = "c4da0ec5d77b46d6992f9f9462fb1bc3"; | |||
DspCallbackRequest dspCallbackRequest = new DspCallbackRequest(); | |||
dspCallbackRequest.setAnalyseStatus(2); | |||
dspCallbackRequest.setAnalyseStatus(10); | |||
dspCallbackRequest.setType(1); | |||
List<QuestionFile> questionFiles = new ArrayList<>(); | |||
QuestionFile questionFile = new QuestionFile(); | |||
questionFile.setFileCode("PVR2024010815484594512"); | |||
questionFile.setFileName("2024-01-08-15-48-45_frame-52-332_type_20240108154845591880-1-003-1_AI.jpg"); | |||
questionFile.setFileOriginalUrl("https://image.t-aaron.com/369567d311de473886c40a5c85305493/2024-01-08-15-48-45_frame-52-332_type_20240108154845581518-1-0-0_OR.jpg"); | |||
questionFile.setFileMarkerUrl("https://image.t-aaron.com/369567d311de473886c40a5c85305493/2024-01-08-15-48-45_frame-52-332_type_20240108154845591880-1-003-1_AI.jpg"); | |||
questionFile.setAnalyseTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, "2024-01-08 15:48:45")); | |||
questionFile.setFileCode("PBS2024011110351459454"); | |||
questionFile.setFileName("2024-01-11-10-35-14_frame-2926-3206_type_20240111103514148029-1-003-1_AI.jpg"); | |||
questionFile.setFileOriginalUrl("https://image.t-aaron.com/c4da0ec5d77b46d6992f9f9462fb1bc3/2024-01-11-10-35-14_frame-2926-3206_type_20240111103514141070-1-0-0_OR.jpg"); | |||
questionFile.setFileMarkerUrl("https://image.t-aaron.com/c4da0ec5d77b46d6992f9f9462fb1bc3/2024-01-11-10-35-14_frame-2926-3206_type_20240111103514148029-1-003-1_AI.jpg"); | |||
questionFile.setAnalyseTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, "2024-01-11 10:35:14")); | |||
questionFile.setQuestionName("车辆"); | |||
questionFile.setQuestionCode("003008"); | |||
questionFiles.add(questionFile); |