Browse Source

应急事件添加图片字段

develop
wanjing 9 months ago
parent
commit
d0d02bfa0c
5 changed files with 11 additions and 5 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/sql/sql_change_v1.3.7.sql
  2. +0
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentController.java
  3. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java
  4. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/add/AddAccidentService.java
  5. +3
    -2
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentMapper.xml

+ 1
- 1
tuoheng-service/tuoheng-admin/sql/sql_change_v1.3.7.sql View File

@@ -7,4 +7,4 @@ use tuoheng_freeway;
-- 事件表
alter table tuoheng_freeway.th_accident add name varchar(20) default '' not null comment '事件名称' after dept_id;
alter table tuoheng_freeway.th_accident add report_type tinyint(1) default 1 not null comment '上报类型:1:自动上报(默认);2:手动上报' after dept_id;
alter table tuoheng_freeway.th_accident add image varchar(255) default '' not null comment '图片' after question_name;

+ 0
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentController.java View File

@@ -144,8 +144,6 @@ public class AccidentController {
return accidentService.verify(request);
}



/**
* 事故上报
*/

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java View File

@@ -92,6 +92,11 @@ public class Accident extends BaseEntity {
*/
private String questionName;

/**
* 图片
*/
private String image;

/**
* 是否有事故:0:无;1:有
*/

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/add/AddAccidentService.java View File

@@ -1,6 +1,7 @@
package com.tuoheng.admin.service.accident.add;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.conver.AccidentConverMapper;
import com.tuoheng.admin.entity.Accident;
@@ -15,6 +16,7 @@ import com.tuoheng.admin.mapper.RoadInformationMapper;
import com.tuoheng.admin.mapper.SectionMapper;
import com.tuoheng.admin.request.accident.AddAccidentRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.utils.GaodeUtil;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.DateUtils;
import com.tuoheng.common.core.utils.JsonResult;

+ 3
- 2
tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentMapper.xml View File

@@ -18,6 +18,7 @@
<result property="questionId" column="question_id" />
<result property="questionCode" column="question_code" />
<result property="questionName" column="question_name" />
<result property="image" column="image" />
<result property="isCasualties" column="is_casualties" />
<result property="isDrivingSafety" column="is_driving_safety" />
<result property="isFire" column="is_fire" />
@@ -44,13 +45,13 @@


<sql id="Base_Column_List">
id, tenant_id, dept_id, name, report_type, 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, name, report_type, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, image,
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, name, report_type, 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, name, report_type, inspection_id, inspection_file_id, accident_inspection_id, road_id, road_code, section_id, section_name, question_id, question_code, question_name, image,
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

Loading…
Cancel
Save