-- MySQL dump 10.13  Distrib 8.0.17, for Linux (x86_64)
--
-- Host: localhost    Database: zd_rescue
-- ------------------------------------------------------
-- Server version	8.0.17

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `base_app_settings`
--

DROP TABLE IF EXISTS `base_app_settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_app_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `version` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `type` int(11) DEFAULT NULL COMMENT '(1. 自启动 2. 省电策略)',
  `package_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `class_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `tip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_app_version`
--

DROP TABLE IF EXISTS `base_app_version`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_app_version` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `app_version` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '版本号',
  `path` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '路径',
  `update` int(11) DEFAULT '1' COMMENT '0:非强制更新;1:强制更新',
  `app_type` int(11) DEFAULT NULL COMMENT '0：经销商app',
  `update_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_area`
--

DROP TABLE IF EXISTS `base_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '地区id',
  `parent_id` int(11) DEFAULT NULL COMMENT '地区父级id',
  `name` varchar(35) DEFAULT NULL COMMENT '地区名称',
  `code` int(11) DEFAULT NULL COMMENT '地区编码',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT '0',
  `all_name` varchar(60) DEFAULT NULL,
  `province` varchar(60) DEFAULT NULL,
  `city` varchar(60) DEFAULT NULL,
  `area_nature` int(11) DEFAULT NULL,
  `send_order_way` int(11) DEFAULT NULL,
  `urgent_rate` int(11) DEFAULT NULL,
  `zijie_rate` int(11) DEFAULT NULL,
  `supplier_rate` int(11) DEFAULT NULL,
  `regular_price` int(11) DEFAULT NULL,
  `region` int(11) DEFAULT NULL,
  `inner_radius` int(11) DEFAULT NULL COMMENT '内圈半径',
  `outer_radius` int(11) DEFAULT NULL COMMENT '外圈半径',
  `dispatch_able_min` int(11) DEFAULT NULL COMMENT '可派分钟',
  `repair_traditional_scheduling_rule` int(11) DEFAULT NULL COMMENT '小修传统调度规则',
  `repair_polymerization_scheduling_rule` int(11) DEFAULT NULL COMMENT '小修聚合调度规则',
  `repair_polymerization_enable` tinyint(11) DEFAULT NULL COMMENT '小修平安聚合打开',
  `trail_traditional_scheduling_rule` int(11) DEFAULT NULL COMMENT '拖车传统调度规则',
  `trail_polymerization_scheduling_rule` int(11) DEFAULT NULL COMMENT '拖车聚合调度规则',
  `trail_polymerization_enable` int(11) DEFAULT NULL,
  `config_extend_enable` int(11) DEFAULT NULL COMMENT '是否继承开关',
  `config_extend_area_id` int(11) DEFAULT NULL COMMENT 'pareatId无则省id',
  `regional_manager` varchar(60) DEFAULT NULL COMMENT '区域经理',
  `self_repair_price` double(10,2) DEFAULT NULL COMMENT '小修自解价格',
  `self_trail_unit_price` double(10,2) DEFAULT NULL COMMENT '拖车自解单价',
  `long_distance_trail_fixed_unit_price` double(10,2) DEFAULT NULL COMMENT '长途拖车一口价',
  `self_trail_starting_price` double(10,2) DEFAULT NULL COMMENT '拖车自解起步价',
  `self_trail_starting_mileage` double(10,2) DEFAULT NULL COMMENT '拖车自解起步公里数',
  `self_trail_excess_part_unit_price` double(10,2) DEFAULT NULL COMMENT '拖车自解超过部分单价',
  PRIMARY KEY (`id`),
  KEY `user_role_ibfk_1` (`parent_id`),
  KEY `user_role_ibfk_2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=920001 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_brand`
--

DROP TABLE IF EXISTS `base_brand`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_brand` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `remark` varchar(60) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_cc_login_record`
--

DROP TABLE IF EXISTS `base_cc_login_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_cc_login_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(60) DEFAULT NULL,
  `base_user_id` int(11) DEFAULT NULL,
  `login_status` tinyint(4) DEFAULT NULL,
  `start_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `end_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=801 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_config`
--

DROP TABLE IF EXISTS `base_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '唯一标识',
  `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  `json_info` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '配置具体内容，json格式',
  `creator` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `delete_flag` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `code_index` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_consult_service`
--

DROP TABLE IF EXISTS `base_consult_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_consult_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `remark` varchar(60) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `service_id` varchar(30) DEFAULT NULL,
  `service_name` varchar(30) DEFAULT NULL,
  `sequence` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_custom_area`
--

DROP TABLE IF EXISTS `base_custom_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_custom_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '地区id',
  `name` varchar(35) DEFAULT NULL COMMENT '地区名称',
  `remark` varchar(11) DEFAULT NULL COMMENT '地区编码',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT '0',
  `supplier_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_designated_destination`
--

DROP TABLE IF EXISTS `base_designated_destination`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_designated_destination` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `base_custom_area_id` int(11) DEFAULT NULL,
  `lon` decimal(11,6) DEFAULT NULL COMMENT 'æ<98>¯å<90>¦æ<8c><87>å®<9a>ç<9b>®ç<9a><84>å<9c>°',
  `lat` decimal(10,6) DEFAULT NULL,
  `ranges` decimal(11,2) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_designated_destination_ibfk1` (`base_custom_area_id`),
  CONSTRAINT `contract_designated_destination_ibfk1` FOREIGN KEY (`base_custom_area_id`) REFERENCES `base_custom_area` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_disaster_weather`
--

DROP TABLE IF EXISTS `base_disaster_weather`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_disaster_weather` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `area_code` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL COMMENT '灾害类型',
  `start_date` datetime DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `is_track` int(1) DEFAULT NULL COMMENT '是否跟踪',
  `contract_type` int(2) DEFAULT NULL COMMENT '合同类型',
  `remark` varchar(120) DEFAULT NULL,
  `seat_remind` varchar(600) DEFAULT NULL,
  `rescue_remind` varchar(600) DEFAULT NULL,
  `is_auto_open_case` tinyint(4) DEFAULT NULL COMMENT '是否自动开案 0否  1是',
  `is_auto_dispatch` tinyint(4) DEFAULT NULL COMMENT '是否自动派遣 0否  1是',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_business`
--

DROP TABLE IF EXISTS `base_doc_business`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_business` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `doc_business_type_id` int(11) NOT NULL COMMENT '经营ID类型',
  `delete_flag` tinyint(2) NOT NULL COMMENT '删除状态:0. 删除，1.可用',
  `question` varchar(255) NOT NULL COMMENT '提问',
  `answer` text COMMENT '回答',
  `click_cout` int(11) NOT NULL COMMENT '点击累加次数',
  `sort` int(11) DEFAULT '100' COMMENT '排序',
  `update_user` varchar(50) DEFAULT NULL COMMENT '更新者',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='运营库';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_business_type`
--

DROP TABLE IF EXISTS `base_doc_business_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_business_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名称',
  `delete_flag` tinyint(2) NOT NULL DEFAULT '0' COMMENT '删除状态:0. 删除，1.可用',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='运营分类';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_contract_type`
--

DROP TABLE IF EXISTS `base_doc_contract_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_contract_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名称',
  `delete_flag` tinyint(2) DEFAULT '0' COMMENT '删除状态:0. 删除，1.可用',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='基础分类';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_exam`
--

DROP TABLE IF EXISTS `base_doc_exam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_exam` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type` enum('填空','单选','多选') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `delete_flag` tinyint(2) DEFAULT NULL COMMENT '删除状态:0. 删除，1.可用',
  `question` varchar(255) DEFAULT NULL COMMENT '问题',
  `question_show_a` tinyint(2) DEFAULT NULL,
  `question_a` varchar(0) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '选择或填空A',
  `answer_a` varchar(255) DEFAULT NULL,
  `question_show_b` tinyint(2) DEFAULT NULL,
  `question_b` varchar(255) DEFAULT NULL,
  `question_show_c` tinyint(2) DEFAULT NULL,
  `question_c` varchar(255) DEFAULT NULL,
  `question_show_d` tinyint(2) DEFAULT NULL,
  `question_d` varchar(255) DEFAULT NULL,
  `question_show_e` tinyint(2) DEFAULT NULL,
  `question_e` varchar(255) DEFAULT NULL,
  `question_show_f` tinyint(2) DEFAULT NULL,
  `question_f` varchar(255) DEFAULT NULL,
  `answer` varchar(255) DEFAULT NULL COMMENT '答案',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试题库';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_flow_type`
--

DROP TABLE IF EXISTS `base_doc_flow_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_flow_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) DEFAULT NULL COMMENT '流程名称',
  `delete_flag` tinyint(2) NOT NULL DEFAULT '0' COMMENT '删除状态:0. 删除，1.可用',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='流程状态表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_question_answer`
--

DROP TABLE IF EXISTS `base_doc_question_answer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_question_answer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `doc_contract_type_id` int(11) DEFAULT NULL COMMENT '绑定合同类型',
  `contract_id` int(11) DEFAULT NULL COMMENT '绑定合同ID',
  `doc_flow_type_id` int(11) DEFAULT NULL COMMENT '绑定流程类型',
  `delete_flag` tinyint(2) DEFAULT NULL COMMENT '删除状态:0. 删除，1.可用',
  `question` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT ' 问题',
  `answer` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '答案',
  `update_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新者',
  `create_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者',
  `sort` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1030 DEFAULT CHARSET=utf8 COMMENT='问题库';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_doc_train`
--

DROP TABLE IF EXISTS `base_doc_train`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_doc_train` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `doc_contract_type_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '合同类型',
  `contract_id` int(11) DEFAULT NULL COMMENT '绑定合同ID',
  `train_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '培训标题',
  `train_descript` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '培训简介255个字',
  `train_file_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '培训附件文件地址',
  `train_file_name` varchar(50) DEFAULT NULL COMMENT '附件文件名称',
  `down_count` int(255) DEFAULT '0' COMMENT '下载次数',
  `delete_flag` tinyint(2) DEFAULT '0' COMMENT '删除状态:0. 删除，1.可用',
  `update_user` varchar(50) DEFAULT NULL COMMENT '更新者',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建者',
  `sort` int(11) DEFAULT '100' COMMENT '排序',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='培训库';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_error_notice_info`
--

DROP TABLE IF EXISTS `base_error_notice_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_error_notice_info` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(30) DEFAULT NULL COMMENT '用户名',
  `phone` varchar(30) DEFAULT NULL COMMENT '手机号',
  `type` varchar(50) DEFAULT NULL COMMENT '类型',
  `delete_flag` tinyint(2) DEFAULT '0' COMMENT '是否删除.0.未删除,1.删除',
  `content` varchar(255) DEFAULT NULL COMMENT '描述{#} 代表要替换的值',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_excel_config_type`
--

DROP TABLE IF EXISTS `base_excel_config_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_excel_config_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_excel_log`
--

DROP TABLE IF EXISTS `base_excel_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_excel_log` (
  `id` varchar(50) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `type` varchar(20) DEFAULT NULL COMMENT '操作类型',
  `condition` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '查询条件',
  `size` int(11) DEFAULT NULL COMMENT '数据量',
  `start_time` datetime DEFAULT NULL COMMENT '开始执行时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束执行时间',
  `create_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_fault_type`
--

DROP TABLE IF EXISTS `base_fault_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_fault_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `level` int(11) DEFAULT NULL COMMENT '等级 1-2-3',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_fault_type_ibfk_1` (`parent_id`),
  CONSTRAINT `base_fault_type_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `base_fault_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_group`
--

DROP TABLE IF EXISTS `base_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sub_warn_keys` varchar(150) DEFAULT NULL COMMENT '订阅提醒',
  `feedback_positions` longtext COMMENT '反馈职位',
  `position_code` varchar(150) DEFAULT NULL COMMENT '职位编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_knowledge`
--

DROP TABLE IF EXISTS `base_knowledge`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_knowledge` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(30) DEFAULT NULL,
  `question` text,
  `answer` text,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_kpi`
--

DROP TABLE IF EXISTS `base_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_kpi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_kpi_ibfk_1` (`parent_id`),
  CONSTRAINT `base_kpi_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `base_kpi` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_kpi_detail`
--

DROP TABLE IF EXISTS `base_kpi_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_kpi_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `kpi` decimal(10,2) DEFAULT NULL,
  `area` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `supplier_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `base_kpi_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `base_kpi_detail_ibfk_1` (`base_kpi_id`),
  CONSTRAINT `base_kpi_detail_ibfk_1` FOREIGN KEY (`base_kpi_id`) REFERENCES `base_kpi` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_menu`
--

DROP TABLE IF EXISTS `base_menu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `action` varchar(60) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `is_sys` int(11) DEFAULT NULL,
  `icon` varchar(40) DEFAULT NULL,
  `chinese_name` varchar(60) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1062 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_models`
--

DROP TABLE IF EXISTS `base_models`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_models` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `width` decimal(10,0) DEFAULT NULL,
  `length` decimal(10,0) DEFAULT NULL,
  `manned` int(11) DEFAULT NULL,
  `brand_id` int(11) DEFAULT NULL,
  `chassis` int(11) DEFAULT NULL,
  `four_wheel` int(11) DEFAULT NULL,
  `trailer_hitch` int(11) DEFAULT NULL,
  `battery` int(11) DEFAULT NULL,
  `required_trailer` int(11) DEFAULT NULL,
  `spare_tire` int(11) DEFAULT NULL,
  `fuel_type` int(11) DEFAULT NULL,
  `tire_antitheft_screw` int(11) DEFAULT NULL,
  `electricity_ride` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_brand_models_ibfk_1` (`brand_id`),
  CONSTRAINT `base_brand_models_ibfk_1` FOREIGN KEY (`brand_id`) REFERENCES `base_brand` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=172 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_models_remind`
--

DROP TABLE IF EXISTS `base_models_remind`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_models_remind` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `base_models_id` int(11) DEFAULT NULL COMMENT '车型id',
  `service_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务类型ids',
  `seat_remind` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `rescue_remind` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_msg_info`
--

DROP TABLE IF EXISTS `base_msg_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_msg_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msg_phone` varchar(60) DEFAULT NULL,
  `msg_content` text,
  `msg_type` int(11) DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `send_time` datetime DEFAULT NULL,
  `is_success` int(11) DEFAULT NULL,
  `send_type` int(11) DEFAULT NULL,
  `order_code` varchar(60) DEFAULT NULL,
  `task_code` varchar(60) DEFAULT NULL,
  `contract_message_reminder_id` int(11) DEFAULT NULL,
  `message_temple_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4819 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_remark_level`
--

DROP TABLE IF EXISTS `base_remark_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_remark_level` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `remark_template` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role`
--

DROP TABLE IF EXISTS `base_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `role_type` int(11) DEFAULT NULL COMMENT '1平台用户角色 2 合同同用户角色  3 supplier角色',
  `history_excel_id` int(11) DEFAULT NULL COMMENT '历史报表导出配置id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `supplier_id` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL COMMENT '角色备注',
  `delete_flag` int(11) NOT NULL DEFAULT '0',
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4222 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_area_visual`
--

DROP TABLE IF EXISTS `base_role_area_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_area_visual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `visual_group_id` int(11) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL COMMENT '合同用户',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_role_area_visual_ibfk_1` (`visual_group_id`),
  CONSTRAINT `base_role_area_visual_ibfk_1` FOREIGN KEY (`visual_group_id`) REFERENCES `base_role_visual_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_authority`
--

DROP TABLE IF EXISTS `base_role_authority`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_authority` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `menu_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `type` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_role_ibfk_1` (`role_id`),
  KEY `base_role_authority_ibfk_12` (`menu_id`),
  CONSTRAINT `base_role_authority_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `base_role` (`id`) ON DELETE SET NULL,
  CONSTRAINT `base_role_authority_ibfk_12` FOREIGN KEY (`menu_id`) REFERENCES `base_menu` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=140960 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_contract_visual`
--

DROP TABLE IF EXISTS `base_role_contract_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_contract_visual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `visual_group_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_role_contract_visual_ibfk_1` (`visual_group_id`),
  CONSTRAINT `base_role_contract_visual_ibfk_1` FOREIGN KEY (`visual_group_id`) REFERENCES `base_role_visual_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_enterprise_visual`
--

DROP TABLE IF EXISTS `base_role_enterprise_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_enterprise_visual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `visual_group_id` int(11) DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_role_enterprise_visual_ibfk_1` (`visual_group_id`),
  CONSTRAINT `base_role_enterprise_visual_ibfk_1` FOREIGN KEY (`visual_group_id`) REFERENCES `base_role_visual_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_supplier_visual`
--

DROP TABLE IF EXISTS `base_role_supplier_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_supplier_visual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `visual_group_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '1、sys_user 2、rescue_user  3、contract_user 外键对应contract表4、supplier_user  外键对应supplier表 ',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_role_supplier_visual_ibfk_1` (`visual_group_id`),
  CONSTRAINT `base_role_supplier_visual_ibfk_1` FOREIGN KEY (`visual_group_id`) REFERENCES `base_role_visual_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_role_visual_group`
--

DROP TABLE IF EXISTS `base_role_visual_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_role_visual_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remark` varchar(120) DEFAULT NULL COMMENT '角色备注',
  `is_supplier_role` int(11) DEFAULT '2' COMMENT '默认2不指定服务商权限',
  `is_contract_role` int(11) DEFAULT '2' COMMENT '默认2不指定',
  `is_enterprise_role` int(11) DEFAULT NULL,
  `is_area_role` int(11) DEFAULT '2' COMMENT '默认2不指定服务商权限',
  `create_user_name` varchar(60) DEFAULT NULL,
  `update_user_name` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service`
--

DROP TABLE IF EXISTS `base_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `base_service_type_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `service_process_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0' COMMENT '现在作为停用启用的标志',
  `is_hang` int(11) DEFAULT NULL,
  `flow_id` int(11) DEFAULT NULL,
  `is_rescue` int(11) DEFAULT '0' COMMENT '是否是救援类服务',
  `serviceIds` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `base_service_ibk1` (`base_service_type_id`),
  KEY `base_service_ibk_2` (`parent_id`),
  KEY `base_service_ibk_3` (`service_process_id`),
  CONSTRAINT `base_service_ibk1` FOREIGN KEY (`base_service_type_id`) REFERENCES `base_service_type` (`id`),
  CONSTRAINT `base_service_ibk_2` FOREIGN KEY (`parent_id`) REFERENCES `base_service` (`id`) ON DELETE CASCADE,
  CONSTRAINT `base_service_ibk_3` FOREIGN KEY (`service_process_id`) REFERENCES `base_service_process` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2267 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_basic_answer`
--

DROP TABLE IF EXISTS `base_service_basic_answer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_basic_answer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `answer` varchar(255) DEFAULT NULL,
  `answer_detail` varchar(255) DEFAULT NULL,
  `service_basic_question_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_service_question_ibfk_1` (`service_basic_question_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_basic_question`
--

DROP TABLE IF EXISTS `base_service_basic_question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_basic_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question` varchar(255) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `contract_service_question_group_id` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=901 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_process`
--

DROP TABLE IF EXISTS `base_service_process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_process` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_process_detail`
--

DROP TABLE IF EXISTS `base_service_process_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_process_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `base_service_process_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `base_task_status_id` int(11) DEFAULT NULL,
  `is_hang` int(11) DEFAULT NULL COMMENT '是否挂起',
  PRIMARY KEY (`id`),
  KEY `base_service_process_detail_ibfk_1` (`parent_id`),
  KEY `base_task_status_ibfk_2` (`base_task_status_id`),
  CONSTRAINT `base_service_process_detail_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `base_service_process_detail` (`id`),
  CONSTRAINT `base_task_status_ibfk_2` FOREIGN KEY (`base_task_status_id`) REFERENCES `base_task_status` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_process_status`
--

DROP TABLE IF EXISTS `base_service_process_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_process_status` (
  `id` int(11) NOT NULL,
  `point` int(11) DEFAULT NULL,
  `name` varchar(80) DEFAULT NULL,
  `finish_name` varchar(80) DEFAULT NULL,
  `estimated_time` int(11) DEFAULT NULL,
  `sequence` int(11) DEFAULT NULL,
  `process_id` int(11) DEFAULT NULL COMMENT '地点',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `detail1` (`process_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_question`
--

DROP TABLE IF EXISTS `base_service_question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question` varchar(50) DEFAULT NULL,
  `operate_service_group_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `province_code` int(11) DEFAULT NULL,
  `city_code` int(11) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `question_replay_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `old_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `base_service_question_ibfk_1` (`operate_service_group_id`),
  KEY `base_service_question_ibfk_2` (`question_replay_id`),
  CONSTRAINT `base_service_question_ibfk_1` FOREIGN KEY (`operate_service_group_id`) REFERENCES `contract_operate_service_group` (`id`) ON DELETE CASCADE,
  CONSTRAINT `base_service_question_ibfk_2` FOREIGN KEY (`question_replay_id`) REFERENCES `base_service_question_replay` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_question_replay`
--

DROP TABLE IF EXISTS `base_service_question_replay`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_question_replay` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `replay_option` varchar(255) DEFAULT NULL,
  `replay_content` varchar(255) DEFAULT NULL,
  `base_service_question_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_service_question_ibfk_1` (`base_service_question_id`),
  CONSTRAINT `base_service_question_replay_ibfk_1` FOREIGN KEY (`base_service_question_id`) REFERENCES `base_service_question` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_service_type`
--

DROP TABLE IF EXISTS `base_service_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_service_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `name` varchar(50) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL COMMENT '1:车辆救援，2:车务服务，3：代驾服务，4：医疗救援，5:其他',
  `delete_flag` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1202 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_supplier_authority`
--

DROP TABLE IF EXISTS `base_supplier_authority`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_supplier_authority` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `menu_id` int(11) DEFAULT NULL,
  `supplier_role_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `type` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_role_ibfk_1` (`menu_id`),
  KEY `base_supplier_authority_ibk11` (`supplier_role_id`),
  CONSTRAINT `base_supplier_authority_ibk11` FOREIGN KEY (`supplier_role_id`) REFERENCES `base_supplier_role` (`id`) ON DELETE SET NULL,
  CONSTRAINT `base_supplier_authority_ibk22` FOREIGN KEY (`menu_id`) REFERENCES `base_menu` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=203685 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_supplier_role`
--

DROP TABLE IF EXISTS `base_supplier_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_supplier_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `history_excel_id` int(11) DEFAULT NULL COMMENT '历史报表导出配置id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `description` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_role_ifbl1` (`supplier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4200 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_task_status`
--

DROP TABLE IF EXISTS `base_task_status`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_task_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL COMMENT 'ming',
  `app` varchar(60) DEFAULT NULL,
  `json` text,
  `is_end` int(11) DEFAULT NULL,
  `place_record` int(11) DEFAULT NULL COMMENT '地点记录',
  `supplier_id` int(11) DEFAULT NULL,
  `is_must` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`,`code`) USING BTREE,
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_tel_channel`
--

DROP TABLE IF EXISTS `base_tel_channel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_tel_channel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pc_ip` varchar(60) NOT NULL COMMENT 'pc的ip地址',
  `pc_mac` varchar(60) DEFAULT NULL,
  `tel_ip` varchar(60) DEFAULT NULL COMMENT '话机的ip地址',
  `tel_channel_number` varchar(60) NOT NULL COMMENT '话机通道号',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `pc_ip` (`pc_ip`) USING BTREE COMMENT '电话ip不能重复'
) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_user`
--

DROP TABLE IF EXISTS `base_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) DEFAULT NULL COMMENT '1、sys_user 2、rescue_user  3、contract_user 外键对应contract表4、supplier_user  外键对应supplier表 ',
  `supplier_id` int(11) DEFAULT NULL,
  `name` varchar(60) DEFAULT NULL,
  `username` varchar(60) DEFAULT NULL,
  `password` varchar(60) DEFAULT NULL,
  `phone` varchar(60) DEFAULT NULL,
  `email` varchar(60) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remark` varchar(120) DEFAULT NULL,
  `visual_group_id` int(11) DEFAULT NULL,
  `is_zd` int(11) DEFAULT NULL,
  `gateway` varchar(60) DEFAULT NULL,
  `jlr_enterprise_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) NOT NULL DEFAULT '0',
  `password2` varchar(60) DEFAULT NULL,
  `cc_uuid` int(11) DEFAULT NULL,
  `deal_supplier_auth` int(1) DEFAULT NULL COMMENT '是否能处理服务商自有案件',
  PRIMARY KEY (`id`),
  KEY `base_user_username` (`username`),
  KEY `base_user_visual_group_ibfk_1` (`visual_group_id`),
  KEY `idx_supplier_id` (`supplier_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=53782 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_user_cc`
--

DROP TABLE IF EXISTS `base_user_cc`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_user_cc` (
  `base_user_id` int(11) NOT NULL COMMENT '中道用户id',
  `ccid` int(11) DEFAULT NULL COMMENT '呼叫中心坐席id',
  `nickname` varchar(60) DEFAULT NULL COMMENT '呼叫中心坐席呢称',
  `name` varchar(60) DEFAULT NULL COMMENT '呼叫中心坐席名称',
  `pwd` varchar(60) DEFAULT NULL COMMENT '呼叫中心坐席密码',
  `channel` varchar(60) DEFAULT NULL COMMENT '通道',
  `seat_outphone` varchar(60) DEFAULT NULL COMMENT '坐席外呼电话',
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人id',
  `create_user_name` varchar(60) DEFAULT NULL COMMENT '创建人名称',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user_id` int(11) DEFAULT NULL COMMENT '更新人id',
  `update_user_name` varchar(60) DEFAULT NULL COMMENT '更新人名称',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `login_status` tinyint(4) DEFAULT NULL COMMENT '坐席登陆状态\r\n',
  PRIMARY KEY (`base_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_user_group`
--

DROP TABLE IF EXISTS `base_user_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_user_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `group_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sms_reminder` int(1) DEFAULT NULL COMMENT '短信提醒',
  `data_permission` int(1) DEFAULT NULL COMMENT '数据权限',
  PRIMARY KEY (`id`),
  KEY `user_role_ibfk_1` (`user_id`),
  KEY `base_user_group_ibk2` (`group_id`),
  CONSTRAINT `base_user_group_ibk1` FOREIGN KEY (`user_id`) REFERENCES `base_user` (`id`) ON DELETE SET NULL,
  CONSTRAINT `base_user_group_ibk2` FOREIGN KEY (`group_id`) REFERENCES `base_group` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_user_login_log`
--

DROP TABLE IF EXISTS `base_user_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_user_login_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `all_user_name` varchar(60) DEFAULT NULL,
  `op_time` datetime DEFAULT NULL,
  `op_type` int(60) DEFAULT NULL,
  `ip_address` varchar(60) DEFAULT NULL,
  `source` varchar(400) DEFAULT NULL,
  `browser_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `system_name` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12698 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_user_role`
--

DROP TABLE IF EXISTS `base_user_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `base_user_role_ibfk_2` (`user_id`) USING BTREE,
  KEY `base_user_role_ibk22` (`role_id`),
  CONSTRAINT `base_user_role_ibk11` FOREIGN KEY (`user_id`) REFERENCES `base_user` (`id`) ON DELETE SET NULL,
  CONSTRAINT `base_user_role_ibk22` FOREIGN KEY (`role_id`) REFERENCES `base_role` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=5655 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `base_work_reminder_config`
--

DROP TABLE IF EXISTS `base_work_reminder_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `base_work_reminder_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL COMMENT '职位id',
  `date_type` int(11) NOT NULL COMMENT '时间类型（日/周/月）',
  `day` int(11) NOT NULL COMMENT '天数',
  `milli_second` bigint(20) DEFAULT NULL COMMENT '毫秒数',
  `event_content` longtext NOT NULL COMMENT '流转内容',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `batch_work_operation`
--

DROP TABLE IF EXISTS `batch_work_operation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `batch_work_operation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `work_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `pay_load` json DEFAULT NULL,
  `work_start_time` datetime NOT NULL,
  `work_end_time` datetime DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `retry_count` int(11) DEFAULT NULL,
  `success_count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1281245 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `before_dispatch_image`
--

DROP TABLE IF EXISTS `before_dispatch_image`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `before_dispatch_image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `image_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `image_type` int(11) DEFAULT NULL COMMENT '1 开案照片',
  `tag` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '位置',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_order_id_index` (`user_order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `business_operation_record_log`
--

DROP TABLE IF EXISTS `business_operation_record_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `business_operation_record_log` (
  `id` varchar(50) NOT NULL,
  `name` varchar(150) DEFAULT NULL,
  `type` int(2) DEFAULT NULL COMMENT '操作类型',
  `columns_json_before` text NOT NULL COMMENT '操作之前的数据',
  `columns_json_after` text NOT NULL COMMENT '操作之后的数据',
  `create_time` datetime NOT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cc_workplace`
--

DROP TABLE IF EXISTS `cc_workplace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cc_workplace` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL COMMENT '职场名称',
  `row_no` int(11) DEFAULT NULL COMMENT '行数',
  `column_no` int(11) DEFAULT NULL COMMENT '列数',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cc_workplace_seat`
--

DROP TABLE IF EXISTS `cc_workplace_seat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cc_workplace_seat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `workplace_id` int(11) DEFAULT NULL COMMENT '职场id',
  `channel_number` varchar(30) DEFAULT NULL COMMENT '通道号',
  `row_no` int(30) DEFAULT NULL,
  `column_no` int(30) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `cc_workplace_seat_space_id` (`workplace_id`) USING BTREE,
  CONSTRAINT `cc_workplace_seat_space_id` FOREIGN KEY (`workplace_id`) REFERENCES `cc_workplace` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consult_order`
--

DROP TABLE IF EXISTS `consult_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consult_order` (
  `id` varchar(50) NOT NULL,
  `code` varchar(60) DEFAULT NULL,
  `user_name` varchar(50) DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `contract_code` varchar(60) DEFAULT NULL,
  `identity` varchar(30) DEFAULT NULL,
  `license` varchar(30) DEFAULT NULL,
  `frame_code` varchar(30) DEFAULT NULL,
  `style` varchar(30) DEFAULT NULL,
  `brands` varchar(30) DEFAULT NULL,
  `service_ids` varchar(50) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `order_source` varchar(50) DEFAULT NULL,
  `contract_company_code` varchar(30) DEFAULT NULL,
  `consult_info` varchar(120) DEFAULT NULL,
  `response_info` varchar(120) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `create_user` varchar(50) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `special_organize` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consult_order_detail`
--

DROP TABLE IF EXISTS `consult_order_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consult_order_detail` (
  `id` varchar(60) NOT NULL,
  `order_id` varchar(50) DEFAULT NULL,
  `deal_info` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `deal_user` varchar(50) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `consult_order_detail_ibfk_1` (`order_id`),
  CONSTRAINT `consult_order_detail_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `consult_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consult_order_detail_his`
--

DROP TABLE IF EXISTS `consult_order_detail_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consult_order_detail_his` (
  `id` varchar(60) NOT NULL,
  `order_id` varchar(50) DEFAULT NULL,
  `deal_info` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `deal_user` varchar(50) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `consult_order_detail_his_ibfk_1` (`order_id`),
  CONSTRAINT `consult_order_detail_his_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `consult_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consult_order_his`
--

DROP TABLE IF EXISTS `consult_order_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `consult_order_his` (
  `id` varchar(50) NOT NULL,
  `code` varchar(60) DEFAULT NULL,
  `user_name` varchar(50) DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `contract_code` varchar(60) DEFAULT NULL,
  `identity` varchar(30) DEFAULT NULL,
  `license` varchar(30) DEFAULT NULL,
  `frame_code` varchar(30) DEFAULT NULL,
  `style` varchar(30) DEFAULT NULL,
  `brands` varchar(30) DEFAULT NULL,
  `service_ids` varchar(50) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `order_source` varchar(50) DEFAULT NULL,
  `contract_company_code` varchar(30) DEFAULT NULL,
  `consult_info` varchar(255) DEFAULT NULL,
  `response_info` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `create_user` varchar(50) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `special_organize` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract`
--

DROP TABLE IF EXISTS `contract`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `active_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '激活码',
  `contract_name` varchar(80) DEFAULT NULL COMMENT '合同名称',
  `contract_name_alias` varchar(80) DEFAULT NULL COMMENT '合同名称简称',
  `is_evaluate` int(11) DEFAULT NULL COMMENT '是否评价',
  `contract_enterprise_id` int(11) DEFAULT NULL COMMENT '合同企业',
  `remark` text COMMENT '合同备注',
  `app_code` varchar(255) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT NULL,
  `create_user` varchar(80) DEFAULT NULL,
  `authentication_qualifications` int(11) DEFAULT NULL,
  `validation_information` int(11) DEFAULT NULL,
  `brand` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `contract_type` int(11) DEFAULT NULL,
  `trouble_group_id` int(11) DEFAULT NULL,
  `return_visit_group_id` int(11) DEFAULT NULL,
  `service_question_group_id` int(11) DEFAULT NULL,
  `message_reminder_group_id` int(11) DEFAULT NULL,
  `track_limit_group_id` int(11) DEFAULT NULL,
  `consult_group_id` int(11) DEFAULT NULL,
  `settlement_type` int(11) DEFAULT NULL,
  `white_remind_group_id` int(11) DEFAULT NULL COMMENT '白名单配置id',
  `create_order_remind_group_id` int(11) DEFAULT NULL COMMENT '合同开案提醒配置id',
  `is_auto_push` int(2) DEFAULT NULL COMMENT '是否自动推送',
  `is_water_mark` int(2) DEFAULT NULL COMMENT '是否需要水印',
  `contract_deal_user` int(2) DEFAULT NULL COMMENT '合同处理方',
  `is_enable` int(2) DEFAULT NULL COMMENT '合同是否启用',
  `is_return_car` int(2) DEFAULT NULL COMMENT '是否可用回程车',
  `open_case_mode` tinyint(4) DEFAULT NULL COMMENT '开案方式 1接口 2手动',
  `cut_insurance_amount` int(1) DEFAULT NULL COMMENT '是否扣除责任险费用',
  PRIMARY KEY (`id`),
  KEY `contract_enterprise_ibfk2` (`contract_enterprise_id`),
  KEY `contract_ibfk_1` (`parent_id`),
  KEY `contract_name_index_1` (`contract_name`) USING BTREE,
  CONSTRAINT `contract_enterprise_ibfk2` FOREIGN KEY (`contract_enterprise_id`) REFERENCES `contract_enterprise` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=17663 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_billing_info`
--

DROP TABLE IF EXISTS `contract_billing_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_billing_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `unit_name` varchar(255) DEFAULT NULL,
  `bank` varchar(255) DEFAULT NULL,
  `account_no` varchar(255) DEFAULT NULL,
  `bank_no` varchar(255) DEFAULT NULL,
  `duty_paragraph` varchar(255) DEFAULT NULL,
  `tax_rate` decimal(11,2) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_budget_amount`
--

DROP TABLE IF EXISTS `contract_budget_amount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_budget_amount` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `month` int(2) NOT NULL,
  `type` int(2) NOT NULL,
  `unit_price` decimal(11,2) NOT NULL,
  `case_number` decimal(11,2) NOT NULL,
  `total_amount` decimal(11,2) NOT NULL,
  `unit_price_cost` decimal(11,2) NOT NULL,
  `case_number_cost` decimal(11,2) NOT NULL,
  `total_amount_cost` decimal(11,2) NOT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `delete_flag` int(1) NOT NULL,
  `create_user` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `update_user` varchar(80) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_callcenter_rule`
--

DROP TABLE IF EXISTS `contract_callcenter_rule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_callcenter_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(120) DEFAULT NULL COMMENT '电话',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `contract_id` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_first` int(11) DEFAULT NULL COMMENT '是否首选',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `contract_callcenter_rule_ibfk_1` (`contract_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_consulting_type`
--

DROP TABLE IF EXISTS `contract_consulting_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_consulting_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `consulting_id` int(11) DEFAULT NULL,
  `contract_consulting_type_group_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=573 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_consulting_type_group`
--

DROP TABLE IF EXISTS `contract_consulting_type_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_consulting_type_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user_name` varchar(60) DEFAULT NULL,
  `update_user_name` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0' COMMENT '删除标记 0 正常 1删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_destination`
--

DROP TABLE IF EXISTS `contract_destination`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_destination` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(120) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `longitude` decimal(16,8) DEFAULT NULL,
  `latitude` decimal(16,8) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `brand_name` varchar(60) DEFAULT NULL,
  `model_name` text,
  `contacts_one` varchar(50) DEFAULT NULL,
  `contacts_one_phone` varchar(50) DEFAULT NULL,
  `contacts_two` varchar(50) DEFAULT NULL,
  `contacts_two_phone` varchar(50) DEFAULT NULL,
  `contacts_three` varchar(50) DEFAULT NULL,
  `contacts_three_phone` varchar(50) DEFAULT NULL,
  `remark` text,
  `delete_flag` int(11) DEFAULT NULL COMMENT '0未删除 1已删除',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user_name` varchar(50) DEFAULT NULL,
  `code` varchar(50) DEFAULT NULL,
  `enabled` int(11) DEFAULT NULL,
  `operate_enabled_user_name` varchar(50) DEFAULT NULL,
  `service_id` varchar(120) DEFAULT NULL,
  `service_grade` int(3) DEFAULT NULL COMMENT '服务等级',
  `accident_car_commissioner_phone` varchar(50) DEFAULT NULL COMMENT '事故专员电话',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20368 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_destination_relation`
--

DROP TABLE IF EXISTS `contract_destination_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_destination_relation` (
  `contract_id` int(11) NOT NULL,
  `destination_id` int(11) NOT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `contract_destination_relation_contract_id_ibfk1` (`contract_id`),
  KEY `contract_destination_relation_destination_id_ibfk1` (`destination_id`),
  CONSTRAINT `contract_destination_relation_contract_id_ibfk1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contract_destination_relation_destination_id_ibfk1` FOREIGN KEY (`destination_id`) REFERENCES `contract_destination` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_enterprise`
--

DROP TABLE IF EXISTS `contract_enterprise`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_enterprise` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `enterprise_name` varchar(100) DEFAULT NULL,
  `enterprise_alias` varchar(50) DEFAULT NULL,
  `enterprise_code` varchar(50) DEFAULT NULL,
  `juridical_person` varchar(50) DEFAULT NULL,
  `phone` varchar(60) DEFAULT NULL,
  `fax` varchar(30) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `address_lon` decimal(16,8) DEFAULT NULL,
  `address_lat` decimal(16,8) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `invoice_header` varchar(80) DEFAULT NULL,
  `account` varchar(50) DEFAULT NULL,
  `account_bank` varchar(50) DEFAULT NULL,
  `remark` text,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(80) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `duty_paragraph` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_enterprise_brand`
--

DROP TABLE IF EXISTS `contract_enterprise_brand`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_enterprise_brand` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `base_brand_id` int(11) DEFAULT NULL,
  `contract_enterprise_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_enterprise_brand_models_ibfk_1` (`contract_enterprise_id`),
  CONSTRAINT `contract_enterprise_brand_ibfk_1` FOREIGN KEY (`contract_enterprise_id`) REFERENCES `contract_enterprise` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_enterprise_linkman`
--

DROP TABLE IF EXISTS `contract_enterprise_linkman`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_enterprise_linkman` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(80) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(80) DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_enterprise_linkman_ibfk_1` (`enterprise_id`),
  CONSTRAINT `contract_enterprise_linkman_ibfk_1` FOREIGN KEY (`enterprise_id`) REFERENCES `contract_enterprise` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_enterprise_models`
--

DROP TABLE IF EXISTS `contract_enterprise_models`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_enterprise_models` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `base_models_id` int(11) DEFAULT NULL,
  `contract_enterprise_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_enterprise_brand_models_ibfk_1` (`contract_enterprise_id`),
  CONSTRAINT `contract_enterprise_models_ibfk_1` FOREIGN KEY (`contract_enterprise_id`) REFERENCES `contract_enterprise` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_flow_node`
--

DROP TABLE IF EXISTS `contract_flow_node`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_flow_node` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `base_task_status_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_info`
--

DROP TABLE IF EXISTS `contract_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `open_words` varchar(400) DEFAULT NULL,
  `share_message` varchar(400) DEFAULT NULL,
  `service_time` varchar(400) DEFAULT NULL,
  `phone` varchar(400) DEFAULT NULL,
  `service_object` varchar(400) DEFAULT NULL,
  `service_detail` text,
  `is_enable` int(11) DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `charge_standard` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `photo_requirements` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `requirements_for_master` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `arrive_b_point_remind` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '到达现场提醒师傅',
  `arrive_b_point_link` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_info_ibfk_1` (`contract_id`) USING BTREE,
  CONSTRAINT `contract_info_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7426 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_markup_period`
--

DROP TABLE IF EXISTS `contract_markup_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_markup_period` (
  `markup_period_id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_settlement_detail_id` int(11) DEFAULT NULL,
  `start_time` int(11) DEFAULT NULL COMMENT '开始时间',
  `end_time` int(11) DEFAULT NULL COMMENT '结束时间',
  `service_ids` varchar(255) DEFAULT NULL COMMENT '服务类型',
  `markup_amount` decimal(11,0) DEFAULT NULL COMMENT '加价金额',
  `create_person` varchar(60) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_person` varchar(60) NOT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`markup_period_id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_member`
--

DROP TABLE IF EXISTS `contract_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `document_number` varchar(100) DEFAULT NULL COMMENT '单证号',
  `id_number` varchar(100) DEFAULT NULL COMMENT '身份证号',
  `vin_no` varchar(100) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(60) DEFAULT NULL COMMENT '车牌号',
  `brand` varchar(60) DEFAULT NULL,
  `model` varchar(120) DEFAULT NULL,
  `return_visit` int(11) DEFAULT NULL,
  `owner_name` varchar(60) DEFAULT NULL,
  `owner_phone` varchar(60) DEFAULT NULL,
  `mail` varchar(60) DEFAULT NULL,
  `app_member_login` varchar(60) DEFAULT NULL COMMENT 'app会员登入号',
  `wechat` varchar(60) DEFAULT NULL,
  `remark` varchar(160) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `organize_id` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `purchase_enterprise` varchar(100) DEFAULT NULL COMMENT '机构',
  `purchase_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `from_source` int(11) DEFAULT NULL,
  `flag` varchar(60) DEFAULT NULL COMMENT '车主标签',
  `grade` varchar(60) DEFAULT NULL COMMENT '车主等级',
  `distance_limit` int(11) DEFAULT NULL COMMENT '免拖公里数',
  PRIMARY KEY (`id`),
  KEY `contract_member_ibfk_1` (`vin_no`) USING BTREE,
  KEY `contract_member_ibfk_2` (`plate_number`) USING BTREE,
  KEY `contract_member_ibfk_4` (`contract_id`) USING BTREE,
  KEY `contract_member_ibfk_5` (`update_time`) USING BTREE,
  KEY `contract_member_ibfk_6` (`create_time`) USING BTREE,
  KEY `contract_member_ibfk_3` (`supplier_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5110465 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_member_login`
--

DROP TABLE IF EXISTS `contract_member_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_member_login` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `document_number` varchar(60) DEFAULT NULL COMMENT '单证号',
  `id_number` varchar(60) DEFAULT NULL COMMENT '身份证号',
  `vin_no` varchar(60) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(60) DEFAULT NULL COMMENT '车牌号',
  `brand` varchar(60) DEFAULT NULL COMMENT '品牌',
  `model` varchar(60) DEFAULT NULL COMMENT '车型',
  `owner_name` varchar(60) DEFAULT NULL COMMENT '所有者姓名',
  `owner_phone` varchar(60) DEFAULT NULL COMMENT '所有者电话号码',
  `login_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_member_ibfk1` (`contract_id`) USING BTREE,
  CONSTRAINT `contract_member_login_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_member_service_group`
--

DROP TABLE IF EXISTS `contract_member_service_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_member_service_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_member_id` int(11) DEFAULT NULL COMMENT '次数限制',
  `contract_service_group_id` int(11) DEFAULT NULL,
  `service_degree` int(11) DEFAULT '0',
  `residue_degree` int(11) DEFAULT NULL COMMENT '剩余次数',
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `exemption_period` int(11) DEFAULT NULL COMMENT '免除日期',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `authorization` int(11) DEFAULT NULL COMMENT '0:未授权 1:已授权',
  `service_tags` varchar(120) DEFAULT NULL COMMENT '服务标签',
  PRIMARY KEY (`id`),
  KEY `contract_member_service_group_ibfk_1` (`contract_member_id`),
  KEY `contract_member_service_group_ibfk_2` (`contract_service_group_id`) USING BTREE,
  CONSTRAINT `contract_member_service_group_ibfk_1` FOREIGN KEY (`contract_member_id`) REFERENCES `contract_member` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contract_member_service_group_ibfk_2` FOREIGN KEY (`contract_service_group_id`) REFERENCES `contract_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4087087 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_member_service_group_his`
--

DROP TABLE IF EXISTS `contract_member_service_group_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_member_service_group_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_member_id` int(11) DEFAULT NULL COMMENT '次数限制',
  `contract_service_group_id` int(11) DEFAULT NULL,
  `service_degree` int(11) DEFAULT '0',
  `residue_degree` int(11) DEFAULT NULL COMMENT '剩余次数',
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `exemption_period` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `authorization` int(11) DEFAULT NULL COMMENT '0:未授权 1:已授权',
  `service_tags` varchar(120) DEFAULT NULL COMMENT '服务标签',
  PRIMARY KEY (`id`),
  KEY `contract_member_service_group_ibfk_1` (`contract_member_id`),
  KEY `contract_member_service_group_ibfk_2` (`contract_service_group_id`) USING BTREE,
  CONSTRAINT `contract_member_service_group_his_ibfk_1` FOREIGN KEY (`contract_member_id`) REFERENCES `contract_member` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contract_member_service_group_his_ibfk_2` FOREIGN KEY (`contract_service_group_id`) REFERENCES `contract_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4086471 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_message_reminder`
--

DROP TABLE IF EXISTS `contract_message_reminder`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_message_reminder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `message_group_id` int(11) DEFAULT NULL,
  `area` int(11) DEFAULT NULL,
  `to_accept_message` varchar(255) DEFAULT NULL COMMENT '受理短信',
  `enabled_accept_message` int(11) DEFAULT NULL COMMENT '是否启用受理短信 1(启用) 2(不启用)',
  `send_single_message` varchar(255) DEFAULT NULL COMMENT '派单短信',
  `enabled_single_message` int(11) DEFAULT NULL COMMENT '是否启用派单短信 1(启用) 2(不启用)',
  `complete_message` varchar(255) DEFAULT NULL COMMENT '完成短信',
  `enabled_complete_message` int(11) DEFAULT NULL COMMENT '是否启用完成短信1(启用) 2(不启用)',
  `cancle_message` varchar(255) DEFAULT NULL,
  `enabled_cancle_message` int(11) DEFAULT NULL COMMENT '是否启用取消短信1(启用) 2(不启用)',
  `remark` varchar(255) DEFAULT NULL,
  `operate_service_group_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `contract_message_redminder_ibfk_1` (`operate_service_group_id`),
  CONSTRAINT `contract_message_redminder_ibfk_1` FOREIGN KEY (`operate_service_group_id`) REFERENCES `contract_operate_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_message_reminder_group`
--

DROP TABLE IF EXISTS `contract_message_reminder_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_message_reminder_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) NOT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_operate_service_group`
--

DROP TABLE IF EXISTS `contract_operate_service_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_operate_service_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `service_id` text,
  `type` int(11) DEFAULT NULL COMMENT '1 (短信提醒分组) 2（结算规则分组）3(回访话术管理)',
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除（0：否；1：是）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=372 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_order_create_remind_detail`
--

DROP TABLE IF EXISTS `contract_order_create_remind_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_order_create_remind_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_order_create_rule_id` int(11) DEFAULT NULL,
  `verifying_name` varchar(60) DEFAULT NULL COMMENT '验证名称',
  `code_snippet` text COMMENT '代码片段',
  `seat_remind` varchar(600) DEFAULT NULL COMMENT '坐席提醒',
  `rescue_remind` varchar(600) DEFAULT NULL COMMENT '救援提醒',
  `field_name` varchar(50) DEFAULT NULL COMMENT '字段中文名',
  `field_code` varchar(50) DEFAULT NULL COMMENT '字段英文名',
  `create_user` varchar(60) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_order_create_remind_rule`
--

DROP TABLE IF EXISTS `contract_order_create_remind_rule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_order_create_remind_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rule_name` varchar(50) DEFAULT NULL COMMENT '配置组名称',
  `create_user` varchar(60) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_order_time_node`
--

DROP TABLE IF EXISTS `contract_order_time_node`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_order_time_node` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_enable` int(11) DEFAULT NULL COMMENT '是否启用 1,是 2,否',
  `first_operate_time` int(11) DEFAULT NULL,
  `first_dispatch_time` int(11) DEFAULT NULL,
  `task_accept_time` int(11) DEFAULT NULL,
  `work_complete_time` int(11) DEFAULT NULL,
  `dest_arrive_time` int(11) DEFAULT NULL,
  `task_finish_time` int(11) DEFAULT NULL,
  `finish_time` int(11) DEFAULT NULL,
  `arrive_time` int(11) DEFAULT NULL,
  `depart_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `contract_order_time_node_ibfk_1` (`contract_id`) USING BTREE,
  CONSTRAINT `contract_order_time_node_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_organize`
--

DROP TABLE IF EXISTS `contract_organize`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_organize` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `active_code` varchar(60) DEFAULT NULL,
  `name` varchar(60) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `longitude` decimal(16,8) DEFAULT NULL,
  `latitude` decimal(16,8) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `brand_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `model_name` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `contacts_one` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contacts_one_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contacts_two` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contacts_two_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contacts_three` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contacts_three_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `delete_flag` int(11) DEFAULT NULL COMMENT '0未删除 1已删除',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `enabled` int(11) DEFAULT NULL,
  `operate_enabled_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_back_org` int(11) DEFAULT NULL COMMENT '是否返厂',
  `abbr_name` varchar(60) DEFAULT NULL,
  `settlement_type` int(11) DEFAULT NULL,
  `contact_email` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18481 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_organize_settle`
--

DROP TABLE IF EXISTS `contract_organize_settle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_organize_settle` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '合同结算ID',
  `contract_organize_id` int(11) DEFAULT NULL COMMENT '合同子机构ID',
  `settle_name` varchar(60) DEFAULT NULL COMMENT '结算名称',
  `settle_type` int(11) DEFAULT NULL COMMENT '结算类型',
  `start_price` double(10,2) DEFAULT NULL COMMENT '启步价',
  `unit_price` double(10,2) DEFAULT NULL COMMENT '单价',
  `limit_mileage` int(11) DEFAULT NULL COMMENT '限制里程',
  `update_user` varchar(60) DEFAULT NULL COMMENT '更新者',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建者',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `contract_organize_id` (`contract_organize_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_preferred_supplier`
--

DROP TABLE IF EXISTS `contract_preferred_supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_preferred_supplier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `supplier_type` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user_id` int(11) DEFAULT NULL,
  `update_user_name` varchar(60) DEFAULT NULL,
  `service_ids` varchar(255) DEFAULT NULL,
  `service_code` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `contract_preferred_supplier_ibfk_2` (`contract_id`,`supplier_id`) USING BTREE,
  KEY `contract_preferred_supplier_ibfk_1` (`contract_id`),
  CONSTRAINT `contract_preferred_supplier_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6605 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_preferred_supplier_ratio`
--

DROP TABLE IF EXISTS `contract_preferred_supplier_ratio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_preferred_supplier_ratio` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `dispatch_ratio` decimal(11,2) DEFAULT NULL,
  `current_dispatch_ratio` decimal(11,0) DEFAULT NULL,
  `total_dispatch_number` int(11) DEFAULT NULL,
  `already_dispatch_number` int(11) DEFAULT NULL,
  `adjustment` decimal(10,0) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_preferred_supplier_ibfk_1` (`contract_id`),
  CONSTRAINT `contract_preferred_supplier_ratio_ibfk_1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_return_visit_group`
--

DROP TABLE IF EXISTS `contract_return_visit_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_return_visit_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) NOT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_return_visit_question`
--

DROP TABLE IF EXISTS `contract_return_visit_question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_return_visit_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question` varchar(50) DEFAULT NULL,
  `operate_service_group_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `return_visit_group_id` int(11) DEFAULT NULL,
  `province_code` int(11) DEFAULT NULL,
  `city_code` int(11) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `old_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `base_service_question_ibfk_1` (`operate_service_group_id`),
  CONSTRAINT `contract_return_visit_question_ibfk_1` FOREIGN KEY (`operate_service_group_id`) REFERENCES `contract_operate_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_return_visit_replay`
--

DROP TABLE IF EXISTS `contract_return_visit_replay`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_return_visit_replay` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `replay_option` varchar(255) DEFAULT NULL,
  `replay_content` varchar(255) DEFAULT NULL,
  `question_id` int(11) NOT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `next_question_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `base_service_question_ibfk_1` (`question_id`),
  CONSTRAINT `contract_return_visit_replay_ibfk_1` FOREIGN KEY (`question_id`) REFERENCES `contract_return_visit_question` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_coupon`
--

DROP TABLE IF EXISTS `contract_service_coupon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_coupon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `contract_service_group_id` int(11) DEFAULT NULL,
  `phone_number` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `plate_number` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `status` tinyint(4) DEFAULT NULL,
  `init_service_times` int(11) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL COMMENT '服务期限，天数',
  `exemption_period` int(11) DEFAULT NULL COMMENT '免赔天数',
  `activate_time` datetime DEFAULT NULL,
  `activate_start_time` datetime DEFAULT NULL COMMENT '兑换开始时间',
  `activate_end_time` datetime DEFAULT NULL COMMENT '兑换截止时间',
  `create_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `instruction` varchar(160) DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `code_unique` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11761 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_group`
--

DROP TABLE IF EXISTS `contract_service_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(60) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) NOT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除（1：删除，0：不删除）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=366 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_group_details`
--

DROP TABLE IF EXISTS `contract_service_group_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_group_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `base_service_id` int(11) DEFAULT NULL,
  `contract_service_group_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_service_group_details_ibfk1` (`contract_service_group_id`),
  CONSTRAINT `contract_service_group_details_ibfk1` FOREIGN KEY (`contract_service_group_id`) REFERENCES `contract_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11254 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_group_details_rule`
--

DROP TABLE IF EXISTS `contract_service_group_details_rule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_group_details_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `base_service_id` int(11) DEFAULT NULL,
  `first_service_id` int(11) DEFAULT NULL,
  `second_service_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_group_relation`
--

DROP TABLE IF EXISTS `contract_service_group_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_group_relation` (
  `contract_id` int(11) NOT NULL,
  `service_group_id` int(11) NOT NULL,
  `is_first` int(11) DEFAULT '0' COMMENT '唯一默认服务组',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `contract_service_group_contract_id_ibfk1` (`contract_id`),
  KEY `contract_service_group_service_group_id_ibfk1` (`service_group_id`),
  CONSTRAINT `contract_service_group_contract_id_ibfk1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE,
  CONSTRAINT `contract_service_group_service_group_id_ibfk1` FOREIGN KEY (`service_group_id`) REFERENCES `contract_service_group` (`id`) ON DELETE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_question`
--

DROP TABLE IF EXISTS `contract_service_question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_question_group_id` int(11) NOT NULL,
  `service_basic_question_id` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `service_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_service_question_ibfk_2` (`service_question_group_id`),
  KEY `contract_service_question_ibfk_1` (`service_basic_question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_service_question_group`
--

DROP TABLE IF EXISTS `contract_service_question_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_service_question_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_setting`
--

DROP TABLE IF EXISTS `contract_setting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(60) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) NOT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `type` int(2) NOT NULL COMMENT '类型（1，合同，2，服务）',
  `enable` int(2) DEFAULT NULL COMMENT '是否启用',
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除（1：删除，0：不删除）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='服务分组设置';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_setting_details`
--

DROP TABLE IF EXISTS `contract_setting_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_setting_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `relation_id` int(11) DEFAULT NULL,
  `setting_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `type` int(2) NOT NULL COMMENT '类型（1，合同，2，服务）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `contract_setting_details_ibfk1` (`setting_id`),
  CONSTRAINT `contract_setting_details_ibfk1` FOREIGN KEY (`setting_id`) REFERENCES `contract_setting` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=641 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_settlement_detail`
--

DROP TABLE IF EXISTS `contract_settlement_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_settlement_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `settlement_type` int(11) DEFAULT NULL COMMENT '结算方式',
  `charge_node` int(11) DEFAULT NULL COMMENT '收费节点',
  `node_time_limit` int(11) DEFAULT NULL COMMENT '节点时限/分钟',
  `bridge_amount_payer` int(11) DEFAULT NULL COMMENT '路桥费付费方',
  `wait_amount_payer` int(11) DEFAULT NULL COMMENT '等待费付费方',
  `tyre_amount_payer` int(11) DEFAULT NULL COMMENT '辅助轮费付费方',
  `charging_method` int(11) DEFAULT NULL COMMENT '收费模式',
  `tyre_fee` decimal(11,2) DEFAULT NULL COMMENT '小轮费用',
  `repair_underground_fee` decimal(11,2) DEFAULT NULL COMMENT '小修地库费用',
  `trail_underground_fee` decimal(11,2) DEFAULT NULL COMMENT '拖车地库费用',
  `machine_fee` decimal(11,2) DEFAULT NULL COMMENT '吊车费用',
  `manpower_fee` decimal(11,2) DEFAULT NULL COMMENT '人力费用',
  `is_enabled` int(2) DEFAULT NULL COMMENT '是否启用',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(2) NOT NULL DEFAULT '0',
  `is_same_city_no_limit` int(2) DEFAULT '0' COMMENT '是否同城免拖',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_settlement_detail_relation`
--

DROP TABLE IF EXISTS `contract_settlement_detail_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_settlement_detail_relation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_id` int(11) DEFAULT NULL,
  `organize_id` int(11) DEFAULT NULL,
  `contract_settlement_detail_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_settlement_detail_settlement_detail_id_ibfk1` (`contract_settlement_detail_id`) USING BTREE,
  KEY `contract_settlement_detail_contract_id_ibfk1` (`contract_id`) USING BTREE,
  KEY `contract_settlement_detail_contract_organize_id_ibfk1` (`organize_id`),
  CONSTRAINT `contract_settlement_detail_contract_id_ibfk1` FOREIGN KEY (`contract_id`) REFERENCES `contract` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `contract_settlement_detail_contract_organize_id_ibfk1` FOREIGN KEY (`organize_id`) REFERENCES `contract_organize` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `contract_settlement_detail_settlement_detail_id_ibfk1` FOREIGN KEY (`contract_settlement_detail_id`) REFERENCES `contract_settlement_detail` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_settlement_rule`
--

DROP TABLE IF EXISTS `contract_settlement_rule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_settlement_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_settlement_detail_id` int(11) DEFAULT NULL,
  `operate_service_group_id` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `arrival_time` int(11) DEFAULT NULL,
  `abandon_time` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `area` varchar(255) DEFAULT NULL,
  `service_point_name` varchar(120) DEFAULT NULL,
  `service_point_code` int(11) DEFAULT NULL,
  `service_longitude` decimal(11,6) DEFAULT NULL,
  `service_latitude` decimal(11,6) DEFAULT NULL,
  `service_range` decimal(11,6) DEFAULT NULL,
  `destination_point_name` varchar(120) DEFAULT NULL,
  `destination_point_code` int(11) DEFAULT NULL,
  `destination_longitude` decimal(11,6) DEFAULT NULL,
  `destination_latitude` decimal(11,6) DEFAULT NULL,
  `destination_range` decimal(11,6) DEFAULT NULL,
  `service_area` varchar(255) DEFAULT NULL,
  `destination_area` varchar(255) DEFAULT NULL,
  `custom_area_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `limit_mileage_setting` int(11) DEFAULT NULL COMMENT '限制公里数',
  `bridge_amount_payer` int(11) DEFAULT NULL COMMENT '路桥费付费方',
  `wait_amount_payer` int(11) DEFAULT NULL COMMENT '等待费付费方',
  `tyre_amount_payer` int(11) DEFAULT NULL COMMENT '辅助轮费付费方',
  `charging_method` int(11) DEFAULT NULL COMMENT '收费模式',
  `tyre_fee` decimal(11,0) DEFAULT NULL COMMENT '小轮费用',
  `repair_underground_fee` decimal(11,0) DEFAULT NULL COMMENT '小修地库费用',
  `trail_underground_fee` decimal(11,0) DEFAULT NULL COMMENT '拖车地库费用',
  `machine_fee` decimal(11,0) DEFAULT NULL COMMENT '吊车费用',
  `manpower_fee` decimal(11,0) DEFAULT NULL COMMENT '人力费用',
  PRIMARY KEY (`id`),
  KEY `contract_settlement_rule_ibfk_3` (`operate_service_group_id`),
  KEY `contract_settlement_rule_ibfk_2` (`contract_settlement_detail_id`) USING BTREE,
  CONSTRAINT `contract_settlement_rule_ibfk_2` FOREIGN KEY (`contract_settlement_detail_id`) REFERENCES `contract_settlement_detail` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `contract_settlement_rule_ibfk_3` FOREIGN KEY (`operate_service_group_id`) REFERENCES `contract_operate_service_group` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_settlement_rule_mode`
--

DROP TABLE IF EXISTS `contract_settlement_rule_mode`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_settlement_rule_mode` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_settlement_detail_id` int(11) DEFAULT NULL,
  `contract_settlement_rule_id` int(11) DEFAULT NULL,
  `task_type` int(11) DEFAULT NULL,
  `finished_settlement_type` int(11) DEFAULT NULL,
  `abandon_settlement_type` int(11) DEFAULT NULL,
  `finished_price` decimal(11,2) DEFAULT NULL,
  `abandon_price` decimal(10,2) DEFAULT NULL,
  `finished_limited_mileage` decimal(10,2) DEFAULT NULL,
  `abandon_limited_mileage` decimal(10,2) DEFAULT NULL,
  `finished_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `abandon_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `finished_exceed_fee_name` int(11) DEFAULT NULL,
  `abandon_exceed_fee_name` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_user_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL COMMENT '0未删除 1已删除',
  `enable` int(11) DEFAULT '0' COMMENT '/**0 未启用  1. 已启用*/',
  `reserve` int(11) DEFAULT NULL COMMENT '备用方案',
  `standby_time` datetime DEFAULT NULL,
  `self_settlement_type` int(11) DEFAULT NULL,
  `fail_settlement_type` int(11) DEFAULT NULL,
  `self_price` decimal(10,2) DEFAULT NULL,
  `fail_price` decimal(10,2) DEFAULT NULL,
  `self_limited_mileage` decimal(10,2) DEFAULT NULL,
  `fail_limited_mileage` decimal(10,2) DEFAULT NULL,
  `self_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `fail_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `self_exceed_fee_name` int(11) DEFAULT NULL,
  `fail_exceed_fee_name` int(11) DEFAULT NULL,
  `finished_limited_account` decimal(10,2) DEFAULT NULL,
  `abandon_limited_account` decimal(10,2) DEFAULT NULL,
  `self_limited_account` decimal(10,2) DEFAULT NULL,
  `fail_limited_account` decimal(10,2) DEFAULT NULL,
  `finished_second_open` int(11) DEFAULT '0' COMMENT '完成结算第二段开启',
  `finished_second_price` decimal(10,2) DEFAULT NULL COMMENT '完成二段起步价',
  `finished_second_limited_mileage` decimal(10,2) DEFAULT NULL COMMENT '完成二段限制里程',
  `finished_second_excess_unit_price` decimal(10,2) DEFAULT NULL COMMENT '完成二段超出单价',
  `finished_second_exceed_fee_name` int(11) DEFAULT NULL COMMENT '完成二段超出收费方',
  `abandon_second_open` int(11) DEFAULT '0' COMMENT '不成功结算第二段开启',
  `abandon_second_price` decimal(10,2) DEFAULT NULL COMMENT '不成功二段起步价',
  `abandon_second_limited_mileage` decimal(10,2) DEFAULT NULL COMMENT '不成功二段限制里程',
  `abandon_second_excess_unit_price` decimal(10,2) DEFAULT NULL COMMENT '不成功二段超出单价',
  `abandon_second_exceed_fee_name` int(11) DEFAULT NULL COMMENT '不成功二段超出收费方',
  `self_second_open` int(11) DEFAULT '0' COMMENT '自解结算第二段开启',
  `self_second_price` decimal(10,2) DEFAULT NULL COMMENT '自解二段起步价',
  `self_second_limited_mileage` decimal(10,2) DEFAULT NULL COMMENT '自解二段限制里程',
  `self_second_excess_unit_price` decimal(10,2) DEFAULT NULL COMMENT '自解二段超出单价',
  `self_second_exceed_fee_name` int(11) DEFAULT NULL COMMENT '自解二段超出收费方',
  `fail_second_open` int(11) DEFAULT '0' COMMENT '放弃结算第二段开启',
  `fail_second_price` decimal(10,2) DEFAULT NULL COMMENT '放弃二段起步价',
  `fail_second_limited_mileage` decimal(10,2) DEFAULT NULL COMMENT '放弃二段限制里程',
  `fail_second_excess_unit_price` decimal(10,2) DEFAULT NULL COMMENT '放弃二段超出单价',
  `fail_second_exceed_fee_name` int(11) DEFAULT NULL COMMENT '放弃二段超出收费方',
  PRIMARY KEY (`id`),
  KEY `supplier_settlement_rule_mode_ibk1` (`contract_settlement_rule_id`) USING BTREE,
  KEY `contract_settlement_rule_mode_ibfk_2` (`contract_settlement_detail_id`) USING BTREE,
  CONSTRAINT `contract_settlement_rule_mode_ibfk_1` FOREIGN KEY (`contract_settlement_rule_id`) REFERENCES `contract_settlement_rule` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `contract_settlement_rule_mode_ibfk_2` FOREIGN KEY (`contract_settlement_detail_id`) REFERENCES `contract_settlement_detail` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=290 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_settlement_service_combine`
--

DROP TABLE IF EXISTS `contract_settlement_service_combine`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_settlement_service_combine` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `combination_service_id` int(11) DEFAULT NULL,
  `contract_settlement_detail_id` int(11) DEFAULT NULL,
  `combination_type` int(11) DEFAULT NULL COMMENT '组合类型',
  `full_apply_able` int(11) DEFAULT NULL COMMENT '取消订单是否适用',
  `create_person` varchar(60) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_person` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `delete_flag` int(2) DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_subsequent_profit`
--

DROP TABLE IF EXISTS `contract_subsequent_profit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_subsequent_profit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `group_name` varchar(255) DEFAULT NULL,
  `profit_id` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user_name` varchar(255) DEFAULT NULL,
  `update_user_name` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除 0 正常 1删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_track_limit`
--

DROP TABLE IF EXISTS `contract_track_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_track_limit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tract_limit_group_id` int(11) NOT NULL,
  `track_limit` int(11) DEFAULT NULL COMMENT '跟踪时效',
  `area` int(11) DEFAULT NULL,
  `is_track` int(11) DEFAULT '2' COMMENT '是否跟踪',
  `tracking_type` int(11) DEFAULT NULL COMMENT '跟踪类型',
  `base_service_process_detail_id` int(11) DEFAULT NULL,
  `base_service_process_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `to_be_tracked_status` int(11) DEFAULT NULL COMMENT '待跟踪状态',
  `tracking_content` varchar(255) DEFAULT NULL COMMENT '跟踪类容',
  `estimate_point_type` int(11) DEFAULT NULL COMMENT '预计跟踪节点',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_track_limit_group`
--

DROP TABLE IF EXISTS `contract_track_limit_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_track_limit_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(255) DEFAULT NULL,
  `remark` varchar(500) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_user` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_track_limit_new`
--

DROP TABLE IF EXISTS `contract_track_limit_new`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_track_limit_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tract_limit_group_id` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `track_obj` int(2) DEFAULT NULL,
  `mode` int(11) DEFAULT NULL,
  `app_track_limit` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `track_content` varchar(255) DEFAULT NULL,
  `enable` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1147 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_trouble_group`
--

DROP TABLE IF EXISTS `contract_trouble_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_trouble_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) NOT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_trouble_level`
--

DROP TABLE IF EXISTS `contract_trouble_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_trouble_level` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `level_name` varchar(60) DEFAULT NULL,
  `level_en` varchar(120) DEFAULT NULL,
  `sympton` text,
  `solution` text,
  `type` int(11) DEFAULT NULL,
  `trouble_group_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `seat_remind` varchar(600) DEFAULT NULL,
  `rescue_remind` varchar(600) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `contract_trouble_level_ibfk_2` (`parent_id`),
  KEY `contract_trouble_level_group_id_ibfk` (`trouble_group_id`),
  CONSTRAINT `contract_trouble_level_ibfk_2` FOREIGN KEY (`parent_id`) REFERENCES `contract_trouble_level` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6058 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_white_remind_group`
--

DROP TABLE IF EXISTS `contract_white_remind_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_white_remind_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `group_name` varchar(60) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  `delete_flag` int(2) DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `contract_white_remind_limit`
--

DROP TABLE IF EXISTS `contract_white_remind_limit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_white_remind_limit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_white_remind_group_id` int(11) DEFAULT NULL,
  `create_order_feedback_positions` varchar(600) DEFAULT NULL COMMENT '开案反馈职位',
  `dispatch_limit` int(11) DEFAULT NULL COMMENT '派单时效',
  `dispatch_feedback_positions` varchar(600) DEFAULT NULL COMMENT '派单超时反馈职位',
  `arrival_limit` int(11) DEFAULT NULL COMMENT '到达时效',
  `arrival_feedback_positions` varchar(600) DEFAULT NULL COMMENT '到达超时反馈职位',
  `complaint_feedback_positions` varchar(600) DEFAULT NULL COMMENT '投诉反馈职位',
  `type` int(11) DEFAULT NULL COMMENT '特殊客户类型',
  `enable` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cpic_settle_list`
--

DROP TABLE IF EXISTS `cpic_settle_list`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cpic_settle_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `settle_amount` decimal(11,2) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `success_time` datetime DEFAULT NULL,
  `fail_reason` varchar(120) DEFAULT NULL,
  `is_return` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `batch_uuid` varchar(60) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `return_node` int(2) DEFAULT NULL,
  `return_amount` decimal(11,2) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_id` (`id`) USING BTREE,
  KEY `idx_order_id` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=370 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_invoice`
--

DROP TABLE IF EXISTS `customer_invoice`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_invoice` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `order_code` varchar(60) DEFAULT NULL COMMENT '工单编号',
  `invoice_code` varchar(60) DEFAULT NULL COMMENT '票务工单编号',
  `invoice_type` int(11) DEFAULT NULL COMMENT '票务工单类型(1:自解报销；2:后续利益报销；3:客诉报销)',
  `expense_amount` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '报销金额',
  `invoice_number` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票张数',
  `invoice_amount` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票总金额',
  `payment_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打款人',
  `payment_time` datetime DEFAULT NULL COMMENT '打款时间',
  `payment_amount` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '打款金额',
  `remark` varchar(120) DEFAULT NULL COMMENT '票务描述信息',
  `order_create_time` datetime DEFAULT NULL COMMENT '工单日期',
  `create_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `state` int(11) DEFAULT NULL COMMENT '1:生成票务工单；2：审核通过；3：审核不通过；4：已打款',
  `audit_remark` varchar(120) DEFAULT NULL COMMENT '审核备注',
  `courier_number` varchar(60) DEFAULT NULL,
  `payment_info` varchar(120) DEFAULT NULL,
  `courier_received_time` datetime DEFAULT NULL,
  `payee` varchar(50) DEFAULT NULL COMMENT '收款人',
  `account_no` varchar(20) DEFAULT NULL COMMENT '账号',
  `branch` varchar(50) DEFAULT NULL COMMENT '分行',
  `preliminary_audit_fail_reason` varchar(120) DEFAULT NULL COMMENT '初审不通过原因',
  `deal_result` varchar(120) DEFAULT NULL COMMENT '处理结果',
  `expedited_state` tinyint(4) DEFAULT '0' COMMENT '加急状态 0 不加急 1 加急',
  `expedited_time` datetime DEFAULT NULL COMMENT '加急时间',
  `expedited_user` varchar(60) DEFAULT NULL COMMENT '加急人',
  `electronic_invoice_receipt_time` datetime DEFAULT NULL COMMENT '电子发票收到时间',
  `print_time` datetime DEFAULT NULL COMMENT '打印时间',
  `print_code` varchar(15) DEFAULT NULL COMMENT '打印编号',
  `relation_between_payee_and_user` varchar(50) DEFAULT NULL COMMENT '打款人和车主关系',
  `mileage_ab` int(11) DEFAULT NULL COMMENT '小修AB公里数',
  `mileage_bc` int(11) DEFAULT NULL COMMENT '拖车BC公里数',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `customer_invoice_ibk1` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_invoice_audit_remark`
--

DROP TABLE IF EXISTS `customer_invoice_audit_remark`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_invoice_audit_remark` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `customer_invoice_id` int(11) DEFAULT NULL COMMENT '票务id',
  `deal_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核人',
  `deal_time` datetime DEFAULT NULL COMMENT '审核时间',
  `remark` varchar(120) DEFAULT NULL COMMENT '备注',
  `state` int(3) DEFAULT NULL COMMENT '审核状态（2：通过；3：不通过）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_invoice_picture`
--

DROP TABLE IF EXISTS `customer_invoice_picture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_invoice_picture` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `customer_invoice_id` int(11) DEFAULT NULL COMMENT '票务id',
  `url` varchar(120) DEFAULT NULL COMMENT '照片路径',
  `upload_user` varchar(60) DEFAULT NULL COMMENT '上传人',
  `upload_time` datetime DEFAULT NULL COMMENT '上传时间',
  `file_name` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_invoice_update_remark`
--

DROP TABLE IF EXISTS `customer_invoice_update_remark`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_invoice_update_remark` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `customer_invoice_id` int(11) DEFAULT NULL COMMENT '票务id',
  `update_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(120) DEFAULT NULL COMMENT '票务描述信息',
  `invoice_type` int(3) DEFAULT NULL COMMENT '票务工单类型(1:自解报销；2:后续利益报销；3:客诉报销)',
  `expense_amount` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '报销金额',
  `invoice_amount` varchar(40) DEFAULT NULL COMMENT '发票总金额',
  `state` int(3) DEFAULT NULL COMMENT '1:生成票务工单；2：审核通过；3：审核不通过；4：已打款',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_account`
--

DROP TABLE IF EXISTS `customer_order_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `settle_type` int(11) DEFAULT NULL COMMENT '结算方式 1月结 3 现金',
  `is_settle` int(11) DEFAULT NULL COMMENT '是否结算 0 不结算  1 结算',
  `ref_amount` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '系统推荐金额',
  `base_amount` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '基本费用',
  `wheel_fee` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '小轮费',
  `basement_fee` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '地库费',
  `hoist_fee` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '吊车费',
  `period_fee` decimal(10,2) DEFAULT NULL COMMENT '时段加价费用',
  `other_fee` decimal(10,2) unsigned zerofill DEFAULT '00000000.00' COMMENT '其它费用',
  `confirm_amount` decimal(10,2) DEFAULT '0.00' COMMENT '确认金额',
  `finance_amount` decimal(10,2) DEFAULT '0.00' COMMENT '财务金额',
  `settle_amount` decimal(10,2) DEFAULT '0.00' COMMENT '结算金额',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `export_time` datetime DEFAULT NULL COMMENT '导出时间',
  `confirm_time` datetime DEFAULT NULL COMMENT '确认时间',
  `finance_time` datetime DEFAULT NULL COMMENT '确认时间',
  `settle_time` datetime DEFAULT NULL COMMENT '结算时间',
  `export_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '导出人',
  `confirm_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '确认人',
  `finance_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '确认人',
  `settle_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算人',
  `state` int(11) DEFAULT NULL COMMENT '处理状态（1 对账单生成 2 对账单导出 3 对账单确认 4 财务单确认 5 结算完成）',
  `settle_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次号',
  `service_id` int(11) DEFAULT NULL COMMENT '服务ID',
  `sale_exception_remark` varchar(100) DEFAULT NULL COMMENT '销售金额异常说明',
  `exception_remind_state` int(2) DEFAULT NULL COMMENT '异常提醒状态',
  `exception_create_time` datetime DEFAULT NULL COMMENT '异常生成时间',
  `exception_deal_time` datetime DEFAULT NULL COMMENT '异常处理时间',
  `exception_deal_user` varchar(20) DEFAULT NULL COMMENT '异常处理人',
  `sale_commit_remark` varchar(100) DEFAULT NULL COMMENT '销售金额提交原因',
  `finance_return_remark` varchar(100) DEFAULT NULL COMMENT '财务退回原因',
  `check_count` int(2) DEFAULT NULL COMMENT '退回次数',
  `return_amount` decimal(10,2) DEFAULT NULL COMMENT '回传金额',
  `return_time` datetime DEFAULT NULL COMMENT '回传时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `order_id` (`order_id`) USING BTREE,
  KEY `idx_settle_code` (`settle_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5152 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_account_log`
--

DROP TABLE IF EXISTS `customer_order_account_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_account_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `deal_user` varchar(20) DEFAULT NULL COMMENT '处理人',
  `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
  `content` varchar(255) DEFAULT NULL COMMENT '处理内容',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_order_id` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=235 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_cut`
--

DROP TABLE IF EXISTS `customer_order_cut`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_cut` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `cut_amount` decimal(30,2) DEFAULT NULL COMMENT '扣款金额',
  `cut_reason` varchar(200) DEFAULT NULL COMMENT '扣款原因',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
  `deal_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '处理人',
  `state` int(11) DEFAULT NULL COMMENT '处理状态 0 未处理 1 生成供应商扣款单 2 关闭 3 撤消',
  `undo_reason` varchar(60) DEFAULT NULL COMMENT '撤消原因',
  `settle_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次编号',
  `cut_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扣款编号',
  `minus_state` int(11) DEFAULT NULL COMMENT '0:正常 1：倒扣',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_order_id` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=223 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_relation`
--

DROP TABLE IF EXISTS `customer_order_relation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_relation` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `settle_amount` decimal(10,2) DEFAULT '0.00' COMMENT '结算金额',
  `settle_time` datetime DEFAULT NULL COMMENT '结算时间',
  `settle_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算人',
  `settle_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次号',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_id` (`order_id`) USING BTREE,
  KEY `idx_settle_code` (`settle_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4463 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_settle`
--

DROP TABLE IF EXISTS `customer_order_settle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_settle` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次编号',
  `order_number` int(11) DEFAULT NULL COMMENT '工单数量',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '结算金额',
  `adjust_amount` decimal(10,2) DEFAULT NULL COMMENT '调整金额',
  `adjust_remark` varchar(255) DEFAULT NULL COMMENT '调整原因',
  `billing_amount` decimal(10,2) DEFAULT NULL COMMENT '开票金额',
  `billing_code` varchar(60) DEFAULT NULL COMMENT '发票号',
  `billing_time` datetime DEFAULT NULL COMMENT '开票日期',
  `pay_money` decimal(11,2) DEFAULT NULL COMMENT '打款金额',
  `pay_time` datetime DEFAULT NULL COMMENT '打款时间',
  `remark` varchar(120) DEFAULT NULL COMMENT '备注',
  `received_status` int(2) DEFAULT NULL COMMENT '收款状态',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `contract_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '合同编码',
  `special_organize_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构名称',
  `start_time` datetime DEFAULT NULL COMMENT '开始日期',
  `over_time` datetime DEFAULT NULL COMMENT '结束日期',
  `state` int(11) DEFAULT NULL COMMENT '1:结算单已生成 2：申请开票 3：已开票',
  `cancel_state` int(11) DEFAULT NULL COMMENT '0:正常 1：作废',
  `cancel_time` datetime DEFAULT NULL COMMENT '作废时间',
  `cancel_reason` varchar(120) DEFAULT NULL COMMENT '作废原因',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_settle_cut`
--

DROP TABLE IF EXISTS `customer_order_settle_cut`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_settle_cut` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `settle_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次编号',
  `cut_code` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扣款编号',
  `cut_amount` decimal(10,2) DEFAULT NULL COMMENT '扣款金额',
  `cut_reason` varchar(120) DEFAULT NULL COMMENT '扣款原因',
  `remark` varchar(120) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `customer_order_settle_detail`
--

DROP TABLE IF EXISTS `customer_order_settle_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer_order_settle_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(20) NOT NULL,
  `invoice_money` double(11,2) DEFAULT NULL,
  `tax_rate` decimal(11,2) DEFAULT NULL COMMENT '税率',
  `tax_amount` decimal(11,2) DEFAULT NULL COMMENT '税额',
  `after_tax_amount` decimal(11,2) DEFAULT NULL COMMENT '税后金额',
  `courier_number` varchar(20) DEFAULT NULL COMMENT '快递单号',
  `line_number` varchar(20) DEFAULT NULL COMMENT '行号',
  `customer_order_settle_id` int(11) NOT NULL,
  `path` varchar(120) NOT NULL,
  `file_name` varchar(80) DEFAULT NULL,
  `create_user` varchar(20) NOT NULL,
  `update_user` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `remark` varchar(120) DEFAULT NULL,
  `bank` varchar(30) DEFAULT NULL,
  `identification_number` varchar(30) DEFAULT NULL,
  `bank_name` varchar(30) DEFAULT NULL,
  `bank_num` varchar(30) DEFAULT NULL,
  `account_name` varchar(30) DEFAULT NULL,
  `invoice_code` varchar(60) DEFAULT NULL,
  `invoice_year` datetime DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_customer_order_settle_id` (`customer_order_settle_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `driving_charging_standard`
--

DROP TABLE IF EXISTS `driving_charging_standard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `driving_charging_standard` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `province` varchar(20) NOT NULL COMMENT '省份',
  `city` varchar(30) DEFAULT NULL COMMENT '城市',
  `area` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '区（县）',
  `area_code` varchar(30) DEFAULT NULL COMMENT '区域代码',
  `avoid_dragging_km` decimal(9,1) DEFAULT NULL COMMENT '免拖公里数',
  `avoid_dragging_mu` decimal(9,1) DEFAULT NULL COMMENT '免脱车时间',
  `start_time` varchar(20) DEFAULT NULL COMMENT '代驾开始时间段',
  `end_time` varchar(20) DEFAULT NULL COMMENT '代驾结束时间段',
  `flag_fall_price` decimal(10,1) DEFAULT NULL COMMENT '起步价',
  `starting_price_kilometer` decimal(9,1) DEFAULT NULL COMMENT '起步价公里',
  `extra_charge` decimal(9,1) DEFAULT NULL COMMENT '超出起步价公里费用',
  `extra_miles` decimal(9,1) DEFAULT NULL COMMENT '超出起步价公里数',
  `more_than_minutes` decimal(9,1) DEFAULT NULL COMMENT '超出等候时间',
  `more_than_minutes_price` decimal(9,1) DEFAULT NULL COMMENT '超过的时间价格',
  `contract_name` varchar(50) DEFAULT NULL COMMENT '合同名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=24513 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `email_template`
--

DROP TABLE IF EXISTS `email_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `email_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `template_name` varchar(120) DEFAULT NULL,
  `mail_title` varchar(120) NOT NULL,
  `mail_recipient` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `mail_cc` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `mail_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `excel_config`
--

DROP TABLE IF EXISTS `excel_config`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `excel_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `supplier_id` int(11) NOT NULL COMMENT '所属供应商',
  `columns_json` text NOT NULL,
  `authon` varchar(20) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `external_order`
--

DROP TABLE IF EXISTS `external_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `external_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '合同会员id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `external_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `document_number` varchar(60) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(60) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(60) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(60) DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) DEFAULT NULL COMMENT '车型',
  `user_name` varchar(60) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `address` varchar(120) DEFAULT NULL COMMENT '事发地址',
  `lon` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `lat` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `dest_address` varchar(120) DEFAULT NULL COMMENT '目的地地址',
  `dest_lon` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `dest_lat` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `situation_describe` varchar(255) DEFAULT NULL,
  `special_organize` varchar(50) DEFAULT NULL,
  `vehicle_point_remark` varchar(600) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `bgz_status` tinyint(4) DEFAULT NULL COMMENT '不规则工单状态  1 未绑定  1 已绑定',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23097 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fca_call_data`
--

DROP TABLE IF EXISTS `fca_call_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fca_call_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `din` varchar(40) DEFAULT NULL,
  `event_id` varchar(40) DEFAULT NULL COMMENT '事件id',
  `call_type` varchar(30) DEFAULT NULL COMMENT 'ecall/bcall',
  `platform_response_id` varchar(40) DEFAULT NULL COMMENT 'platform_response_id',
  `data` json DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `vin` varchar(60) DEFAULT NULL,
  `msisdn` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fca_gps_svl`
--

DROP TABLE IF EXISTS `fca_gps_svl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fca_gps_svl` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `lat` double DEFAULT NULL,
  `lon` double DEFAULT NULL,
  `direction` double DEFAULT NULL COMMENT '方向',
  `speed` double DEFAULT NULL COMMENT '速度',
  `din` varchar(40) DEFAULT NULL COMMENT '车辆标识',
  `engine_status` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `platform_response_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1051 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `good_well`
--

DROP TABLE IF EXISTS `good_well`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `good_well` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_type` varchar(30) DEFAULT NULL COMMENT '后续利益类型',
  `service_content` varchar(60) DEFAULT NULL,
  `max_amount` int(11) DEFAULT NULL COMMENT '最高限额 -1表示没有限额',
  `same_city_type` int(11) DEFAULT NULL COMMENT '0 不限，1 同城，2 非同城',
  `remark` varchar(120) DEFAULT NULL,
  `state` int(11) DEFAULT NULL COMMENT '状态 0启用，1停用',
  `parent_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gps_transfer`
--

DROP TABLE IF EXISTS `gps_transfer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `gps_transfer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `longitude` varchar(50) DEFAULT NULL,
  `latidude` varchar(50) DEFAULT NULL,
  `alarm_type` int(50) DEFAULT NULL COMMENT '类型',
  `sms_card` varchar(60) DEFAULT NULL COMMENT 'sms卡号',
  `plate_number` varchar(50) DEFAULT NULL COMMENT '车牌号',
  `vehicle_status` int(11) DEFAULT NULL COMMENT ' 是否有任务1待命 2前往拖车 3正在拖车 4归建。',
  `type` varchar(10) DEFAULT NULL COMMENT '指令类型:值为5',
  `angle` varchar(60) DEFAULT NULL COMMENT '角度',
  `speed` varchar(50) DEFAULT NULL COMMENT '行驶速度',
  `gps_time` bigint(20) DEFAULT NULL COMMENT 'GPS时间',
  `driver_name` varchar(50) DEFAULT NULL COMMENT 'SMS卡号-车牌号 组合名称',
  `name` varchar(50) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(20) DEFAULT NULL COMMENT '手机号',
  `vehicle_type` varchar(20) DEFAULT NULL COMMENT '勤务类型，1 整治 2 应急救援',
  `app_code` varchar(30) DEFAULT NULL COMMENT 'code类型;武汉 WUHAN2016',
  `update_user` varchar(60) DEFAULT NULL COMMENT '更新人',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `driver_name` (`driver_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `help_coupon`
--

DROP TABLE IF EXISTS `help_coupon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `help_coupon` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片',
  `type` tinyint(2) DEFAULT NULL COMMENT '类型1 新用户赠送2.以消费赠送   3，营销活动  4.推荐赠送',
  `customer_id` bigint(11) DEFAULT NULL COMMENT '合同客户',
  `customer_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '合同客户',
  `number` bigint(12) DEFAULT NULL COMMENT '使用次数',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  `area_id` bigint(11) DEFAULT NULL COMMENT '区域id',
  `area_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区域名称',
  `coupon_type` tinyint(2) DEFAULT NULL COMMENT '1.送现金 2.送服务 3.送打折',
  `coupon_money` decimal(12,2) DEFAULT NULL COMMENT '送多少钱',
  `coupon_rate` decimal(4,2) DEFAULT NULL COMMENT '折扣率',
  `coupon_server_type` bigint(12) DEFAULT NULL COMMENT '送服务类型',
  `coupon_server_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '送服务描述',
  `start_date` datetime DEFAULT NULL COMMENT '开始日期',
  `end_date` datetime DEFAULT NULL COMMENT '结束日期',
  `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
  `switchs` tinyint(2) DEFAULT NULL COMMENT '开关标志 0开  1关',
  `status` tinyint(2) DEFAULT NULL COMMENT '1有效 0失效',
  `valid_time` bigint(20) DEFAULT NULL COMMENT '有效时间',
  `valid_date_type` tinyint(4) DEFAULT NULL COMMENT '有效类型 2 开始结束时间   1  当天开始计算有效期',
  `contract_results` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '合同',
  `enterprise_results` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '合同客户',
  `area_type` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `help_coupon_cellphone_info`
--

DROP TABLE IF EXISTS `help_coupon_cellphone_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `help_coupon_cellphone_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片',
  `type` tinyint(2) DEFAULT NULL COMMENT '类型1 新用户赠送2.以消费赠送   3，营销活动  4.推荐赠送',
  `area_id` bigint(11) DEFAULT NULL COMMENT '区域id',
  `area_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '区域名称',
  `coupon_type` tinyint(2) DEFAULT NULL COMMENT '1.送现金 2.送服务 3.送打折',
  `coupon_money` decimal(12,2) DEFAULT NULL COMMENT '送多少钱',
  `coupon_rate` decimal(4,2) DEFAULT NULL COMMENT '折扣率',
  `coupon_server_type` int(10) DEFAULT NULL COMMENT '送服务类型',
  `coupon_server_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '送服务描述',
  `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
  `status` tinyint(255) DEFAULT NULL COMMENT '1有效 0失效',
  `user_id` bigint(12) DEFAULT NULL COMMENT '用户id',
  `valid_date` date DEFAULT NULL COMMENT '有效时间',
  `falg` tinyint(2) DEFAULT NULL COMMENT '使用标识0 未使用   1已使用',
  `cellphone` bigint(11) DEFAULT NULL COMMENT '手机号',
  `start_date` date DEFAULT NULL COMMENT '开始时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=421 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `help_driver_region_price`
--

DROP TABLE IF EXISTS `help_driver_region_price`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `help_driver_region_price` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `time_slot` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '时间段 9:00-11:00',
  `area_id` bigint(11) DEFAULT NULL COMMENT '区id',
  `area_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '区name',
  `basic_price` decimal(10,2) DEFAULT NULL COMMENT '基础费用 ',
  `start_price` decimal(10,2) DEFAULT NULL COMMENT '起步价',
  `start_kilometre` bigint(10) DEFAULT NULL COMMENT '起步公路',
  `price` decimal(12,2) DEFAULT NULL COMMENT '单价 超出起步价每公里单价',
  `wait_time` bigint(12) DEFAULT NULL COMMENT '分为单位  免等时间',
  `wait_price` decimal(10,2) DEFAULT NULL COMMENT '等待费用 ',
  `wait_base_time` bigint(12) DEFAULT NULL COMMENT '分钟/等待30分钟费用叠加一次',
  `create_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人id',
  `return_start_kilometre` bigint(10) DEFAULT NULL COMMENT '回城起步公里',
  `return_kilometre_price` bigint(10) DEFAULT NULL COMMENT '回城每公里单价',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1534 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_contract_visual`
--

DROP TABLE IF EXISTS `jlr_contract_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_contract_visual` (
  `id` int(11) NOT NULL,
  `jlr_user_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_coupon`
--

DROP TABLE IF EXISTS `jlr_coupon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_coupon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vin_code` varchar(120) DEFAULT NULL,
  `user_name` varchar(120) DEFAULT NULL,
  `user_phone` varchar(120) DEFAULT NULL,
  `license` varchar(120) DEFAULT NULL,
  `charge` float DEFAULT '0',
  `remark` varchar(200) DEFAULT NULL,
  `electronic_accounts` varchar(30) DEFAULT NULL,
  `consume_charge` float DEFAULT '0',
  `e_password` varchar(200) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_coupon_consume`
--

DROP TABLE IF EXISTS `jlr_coupon_consume`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_coupon_consume` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vin_code` varchar(30) NOT NULL,
  `consume_count` float NOT NULL,
  `consume_time` datetime DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `reparie_info` varchar(200) DEFAULT NULL,
  `hitch_info` varchar(200) DEFAULT NULL,
  `is_settle` int(11) DEFAULT '0',
  `settle_time` datetime DEFAULT NULL,
  `settlement_state` int(11) DEFAULT NULL,
  `remark` varchar(250) DEFAULT NULL,
  `electronic_accounts` varchar(30) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_coupon_recharge`
--

DROP TABLE IF EXISTS `jlr_coupon_recharge`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_coupon_recharge` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vin_code` varchar(120) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `recharge_count` float DEFAULT '0',
  `seate_name` varchar(50) DEFAULT NULL,
  `remark` varchar(200) DEFAULT NULL,
  `service_name` varchar(30) DEFAULT NULL,
  `electronic_accounts` varchar(30) DEFAULT NULL,
  `consume_count` float DEFAULT '0',
  `overdue_time` datetime DEFAULT NULL,
  `recharge_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_destination_visual`
--

DROP TABLE IF EXISTS `jlr_destination_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_destination_visual` (
  `id` int(11) NOT NULL,
  `jlr_user_id` int(11) DEFAULT NULL,
  `contract_destination_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_electric_test`
--

DROP TABLE IF EXISTS `jlr_electric_test`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_electric_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `remote_control` int(11) DEFAULT NULL,
  `double_flash` int(11) DEFAULT NULL,
  `car_speed` int(11) DEFAULT NULL,
  `motor` int(11) DEFAULT NULL,
  `electric_equipment` int(11) DEFAULT NULL,
  `electric_start` int(11) DEFAULT NULL,
  `xi_huo` int(11) DEFAULT NULL,
  `malfunction` int(11) DEFAULT NULL,
  `park_duration` int(11) DEFAULT NULL COMMENT '停车时长 ',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='捷豹路虎搭电检测';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_enterprise`
--

DROP TABLE IF EXISTS `jlr_enterprise`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_enterprise` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(120) DEFAULT NULL,
  `contact` varchar(60) DEFAULT NULL,
  `phone1` varchar(40) DEFAULT NULL,
  `phone2` varchar(30) DEFAULT NULL,
  `phone3` varchar(30) DEFAULT NULL,
  `registry` varchar(120) DEFAULT NULL,
  `lon` varchar(30) DEFAULT NULL,
  `lat` varchar(30) DEFAULT NULL,
  `abbr_name` varchar(80) DEFAULT NULL,
  `settle_type` int(11) DEFAULT '1',
  `is_send` int(11) DEFAULT '0',
  `brands` varchar(100) DEFAULT NULL,
  `activate_code` varchar(30) DEFAULT NULL,
  `area_code` varchar(10) DEFAULT NULL,
  `abbr_code` varchar(20) DEFAULT NULL,
  `remark` varchar(200) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `contact2` varchar(60) DEFAULT NULL,
  `contact3` varchar(60) DEFAULT NULL,
  `job1` varchar(60) DEFAULT NULL,
  `job2` varchar(60) DEFAULT NULL,
  `job3` varchar(60) DEFAULT NULL,
  `service_qualification` varchar(255) DEFAULT NULL,
  `car_type` varchar(30) DEFAULT NULL,
  `first_sale_date` varchar(25) DEFAULT NULL,
  `vin_code` varchar(30) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=640018285 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_epqr`
--

DROP TABLE IF EXISTS `jlr_epqr`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_epqr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单编号',
  `task_order_id` int(11) NOT NULL DEFAULT '0' COMMENT '任务编号',
  `submit_state` int(11) DEFAULT NULL COMMENT '维修信息保存状态(“0：保存”，“1：提交并反馈案件”)默认是0',
  `repair_result` varchar(30) DEFAULT NULL COMMENT '修复车辆结果（“0：成功”，“1：失败”，“2：其它”）',
  `repair_describe` varchar(255) DEFAULT NULL COMMENT '维修描述',
  `repair_type` varchar(60) DEFAULT NULL COMMENT '维修类型',
  `repair_type_describe` varchar(255) DEFAULT NULL COMMENT '维修类型描述',
  `is_quality` int(11) DEFAULT NULL COMMENT '是否质量问题（“0：是”，“1：否”）',
  `is_technical` int(11) DEFAULT NULL COMMENT '是否有技术公告（“0：是，1:否”）',
  `is_efficiency` int(11) DEFAULT NULL COMMENT '技术公告是否有效（“0:是，1：否”）',
  `no_quality_type` varchar(60) DEFAULT NULL COMMENT '非质量问题类型',
  `select_type` varchar(30) DEFAULT NULL COMMENT '其他类型 （“EPQR/TA/技术公告号这三种属于哪一种 ”）',
  `quality_describe` varchar(255) DEFAULT NULL COMMENT '质量描述 （当判断EPQR/TA/技术公告号这三种为哪一种时需添加描述信息）',
  `is_worker_order` int(11) DEFAULT NULL COMMENT '是否具有工单号（“0:是，1：否”）',
  `worker_order_describe` varchar(255) DEFAULT NULL COMMENT '工单描述（“进店维修：如果有工单号需添加工单号 ，如果没有工单号需添加原因”）',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `technical_number` varchar(60) DEFAULT NULL COMMENT '技术报告号',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注 详细信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=478091298 DEFAULT CHARSET=utf8 COMMENT='维修工单信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_kpi`
--

DROP TABLE IF EXISTS `jlr_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_kpi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pickup_rate` decimal(10,6) DEFAULT NULL COMMENT '20秒接起率（20秒内已接起电话量/呼入总量）',
  `abandoned_call_rate` decimal(10,6) DEFAULT NULL COMMENT '5秒未接率（大于5秒未接电话总量/呼入总量）',
  `complaint_rate` decimal(10,6) DEFAULT NULL COMMENT '投诉率（有效抱怨量&投诉量/案件总量）',
  `complaint_count` int(11) DEFAULT NULL COMMENT '投诉量（有效抱怨量&投诉量）',
  `single_point_contact_rate` decimal(10,6) DEFAULT NULL COMMENT '专属联络率（专属联络量/案件总量）',
  `average_arrival_time` decimal(6,3) DEFAULT NULL COMMENT '平均到达时效（预约案件、咨询案件不计）分钟',
  `average_arrival_time_in_main_cities` decimal(6,3) DEFAULT NULL COMMENT '六大城市平均到达时效（预约案件、咨询案件不计）分钟',
  `dispatch_via_app_rate_in_main_cities` decimal(10,6) DEFAULT NULL COMMENT '六大城市APP派工率（经销商救援案件不计）',
  `arrival_time_over_one_hour_rate` decimal(10,6) DEFAULT NULL COMMENT '到达时效>60min的比例',
  `on_time_arrival_rate_of_appointment` decimal(10,6) DEFAULT NULL COMMENT '预约案件准时到达率',
  `roadside_repair_success_rate` decimal(10,6) DEFAULT NULL COMMENT '路修案件成功修复率',
  `accident_case_percentage` decimal(10,6) DEFAULT NULL COMMENT '事故案件率（非故障救援案件量/救援案件总量）',
  `kpi_time` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_menu`
--

DROP TABLE IF EXISTS `jlr_menu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `action` varchar(100) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `is_sys` int(11) DEFAULT NULL,
  `icon` varchar(40) DEFAULT NULL,
  `chinese_name` varchar(255) DEFAULT NULL,
  `state` int(11) DEFAULT '0' COMMENT '0:启用 1：弃用',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=639970744 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_role`
--

DROP TABLE IF EXISTS `jlr_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=641100906 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_role_authority`
--

DROP TABLE IF EXISTS `jlr_role_authority`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_role_authority` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `menu_id` int(11) DEFAULT NULL COMMENT '合同用户',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_jlr_role_authority_id` (`id`),
  KEY `menu_id` (`menu_id`),
  KEY `jlr_role_authority_ibfk_1` (`role_id`),
  CONSTRAINT `jlr_role_authority_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `jlr_role` (`id`),
  CONSTRAINT `jlr_role_authority_ibfk_2` FOREIGN KEY (`menu_id`) REFERENCES `jlr_menu` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=342 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_supplier_visual`
--

DROP TABLE IF EXISTS `jlr_supplier_visual`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_supplier_visual` (
  `id` int(11) NOT NULL,
  `jlr_user_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_trouble_level`
--

DROP TABLE IF EXISTS `jlr_trouble_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_trouble_level` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `level_name` varchar(255) DEFAULT NULL,
  `level_en` varchar(255) DEFAULT NULL,
  `parent_level` varchar(255) DEFAULT NULL,
  `parent_level_en` varchar(255) DEFAULT NULL,
  `sympton` varchar(255) DEFAULT NULL,
  `solution` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_trouble_parts`
--

DROP TABLE IF EXISTS `jlr_trouble_parts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_trouble_parts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `seq` int(11) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `del_flag` int(11) DEFAULT NULL,
  `english` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `jlr_user`
--

DROP TABLE IF EXISTS `jlr_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `jlr_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) DEFAULT NULL,
  `login_name` varchar(20) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(30) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `message_template`
--

DROP TABLE IF EXISTS `message_template`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `message_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msg_title` varchar(50) DEFAULT NULL COMMENT '短信标题',
  `msg_text` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '短信内容',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `openapi_access_token`
--

DROP TABLE IF EXISTS `openapi_access_token`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `openapi_access_token` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `openapi_third_partner_id` int(11) DEFAULT NULL COMMENT '外键id',
  `access_token` varchar(120) DEFAULT NULL COMMENT 'token',
  `expires_in` bigint(20) DEFAULT NULL COMMENT '有效时间',
  `app_id` varchar(60) DEFAULT NULL COMMENT 'appId',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `openapi_access_token_ibk1` (`openapi_third_partner_id`),
  CONSTRAINT `openapi_access_token_ibk1` FOREIGN KEY (`openapi_third_partner_id`) REFERENCES `openapi_third_partner` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `openapi_third_partner`
--

DROP TABLE IF EXISTS `openapi_third_partner`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `openapi_third_partner` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `company_name` varchar(120) DEFAULT NULL COMMENT '公司名称',
  `account` varchar(120) DEFAULT '1' COMMENT '账户',
  `secret_key` varchar(120) DEFAULT NULL COMMENT '秘钥',
  `app_id` varchar(60) DEFAULT NULL COMMENT 'appId',
  `interface_return_address` varchar(120) DEFAULT NULL COMMENT '接口返回地址',
  `app_code` varchar(60) DEFAULT NULL COMMENT 'appCode',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_access`
--

DROP TABLE IF EXISTS `order_access`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `order_code` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `external_code` varchar(35) NOT NULL,
  `nps_score` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `nps_low_reason` varchar(35) DEFAULT NULL,
  `is_click_h5` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `comment_score` varchar(35) DEFAULT NULL,
  `comment_content` varchar(255) DEFAULT NULL,
  `flag` varchar(35) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `nps_time` datetime DEFAULT NULL,
  `score_time` datetime DEFAULT NULL,
  `h5_time` datetime DEFAULT NULL,
  `h5_status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_aging_data`
--

DROP TABLE IF EXISTS `order_aging_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_aging_data` (
  `user_order_id` int(11) DEFAULT NULL,
  `first_operate_time` datetime DEFAULT NULL,
  `dispatch_time` datetime DEFAULT NULL,
  `supplement_time` datetime DEFAULT NULL,
  `dispatch_vehicle_time` datetime DEFAULT NULL,
  `driver_accept_time` datetime DEFAULT NULL,
  `depart_time` datetime DEFAULT NULL,
  `arrive_time` datetime DEFAULT NULL,
  `work_complete_time` datetime DEFAULT NULL,
  `dest_arrive_time` datetime DEFAULT NULL,
  `task_end_time` datetime DEFAULT NULL,
  `finish_time` datetime DEFAULT NULL,
  `drop_time` datetime DEFAULT NULL,
  `is_online` int(11) DEFAULT NULL,
  `is_appoint` int(11) DEFAULT NULL,
  `accept_time` datetime DEFAULT NULL,
  `is_auto_send` int(11) DEFAULT '0',
  `appoint_time` datetime DEFAULT NULL,
  `is_update` int(11) DEFAULT '0',
  `update_time` datetime DEFAULT NULL,
  `is_settle` int(11) DEFAULT NULL,
  `task_success_status` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  UNIQUE KEY `order_aging_data_user_order_id_primary_key` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_aging_data_his`
--

DROP TABLE IF EXISTS `order_aging_data_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_aging_data_his` (
  `user_order_id` int(11) DEFAULT NULL,
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `dispatch_time` datetime DEFAULT NULL COMMENT '调度时间',
  `supplement_time` datetime DEFAULT NULL COMMENT '完善时间',
  `dispatch_vehicle_time` datetime DEFAULT NULL COMMENT '调度车辆时间',
  `driver_accept_time` datetime DEFAULT NULL COMMENT '师傅接单时间',
  `depart_time` datetime DEFAULT NULL COMMENT '发车时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '工作完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '任务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '服务完成时间',
  `drop_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上时间',
  `is_appoint` int(11) DEFAULT NULL COMMENT '是否预约时间',
  `accept_time` datetime DEFAULT NULL COMMENT '服务商接单时间',
  `is_auto_send` int(11) DEFAULT '0',
  `appoint_time` datetime DEFAULT NULL,
  `is_update` int(11) DEFAULT '0',
  `update_time` datetime DEFAULT NULL,
  `is_settle` int(11) DEFAULT NULL,
  `task_success_status` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  UNIQUE KEY `order_aging_data_user_order_id_primary_key` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_api_send`
--

DROP TABLE IF EXISTS `order_api_send`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_api_send` (
  `user_order_id` int(11) NOT NULL,
  `send_type` int(11) DEFAULT NULL COMMENT '1. 首处理\n2. 完成\n3. 放弃\n4. 任务状态\n6. 上传照片',
  `order_status` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `photo_url` varchar(120) DEFAULT NULL,
  `send_time` datetime DEFAULT NULL,
  KEY `order_send_api_user_order_id` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单回传记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_api_send_his`
--

DROP TABLE IF EXISTS `order_api_send_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_api_send_his` (
  `user_order_id` int(11) NOT NULL,
  `send_type` int(11) DEFAULT NULL COMMENT '1. 首处理\n2. 完成\n3. 放弃\n4. 任务状态\n6. 上传照片',
  `order_status` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `photo_url` varchar(120) DEFAULT NULL,
  `send_time` datetime DEFAULT NULL,
  KEY `order_send_api_user_order_id` (`user_order_id`) USING BTREE,
  CONSTRAINT `order_api_send_user_order_id_pk_his` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单回传记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_appraise_history`
--

DROP TABLE IF EXISTS `order_appraise_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_appraise_history` (
  `order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `is_success` int(11) DEFAULT NULL COMMENT '回访结果',
  `is_else_fee` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_update_dest` int(11) DEFAULT NULL COMMENT '是否有引导更改目的地',
  `seat_score` int(11) DEFAULT NULL COMMENT '对坐席的响应速度',
  `rescue_score` int(11) DEFAULT NULL COMMENT '对现场救援人员的响应速度',
  `score` int(11) DEFAULT NULL COMMENT '对本次服务的整体评价',
  `reason` text COMMENT '不满意的原因',
  `appraise_user_id` int(11) DEFAULT NULL COMMENT '评价人id',
  `appraise_user_name` varchar(60) DEFAULT NULL COMMENT '评价人姓名',
  `score_content` text COMMENT '评价内容',
  `seat_attitude_score` int(11) DEFAULT NULL COMMENT '对坐席人员态度',
  `rescue_attitude_score` int(11) DEFAULT NULL COMMENT '对救援人员态度',
  `seat_business_score` int(11) DEFAULT NULL COMMENT '对坐席人员业务能力',
  `rescue_business_score` int(11) DEFAULT NULL COMMENT '对救援人员业务能力',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=359 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_auxiliary_tools`
--

DROP TABLE IF EXISTS `order_auxiliary_tools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_auxiliary_tools` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务订单id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `tool_name` varchar(60) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `amount` decimal(11,2) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_bill`
--

DROP TABLE IF EXISTS `order_bill`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_bill` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `apply_bill_way` int(11) DEFAULT NULL,
  `receive_phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `receive_mail` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '公司名称',
  `user_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `taxpayer_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '纳税人识别号',
  `apply_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '申请发票时间',
  `bill_flag` int(11) NOT NULL DEFAULT '0' COMMENT '开票状态   0 未   1 已开',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改状态时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_complain`
--

DROP TABLE IF EXISTS `order_complain`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_complain` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `order_code` varchar(60) DEFAULT NULL,
  `sub_order_code` varchar(60) DEFAULT NULL COMMENT '外部订单子编号',
  `outer_code` varchar(60) DEFAULT NULL COMMENT '外部订单编号',
  `plate_number` varchar(60) DEFAULT NULL,
  `vin_code` varchar(60) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` varchar(60) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `contract_name` varchar(60) DEFAULT NULL,
  `order_create_time` datetime DEFAULT NULL COMMENT '订单发生日期',
  `complain_time` datetime DEFAULT NULL COMMENT '投诉时间',
  `linkman_mobile_phone` varchar(60) DEFAULT NULL COMMENT '投诉人联系电话',
  `deal_status` int(11) DEFAULT NULL COMMENT '状态 0:未处理, 1:处理中 ，2已处理 ,3 冷处理',
  `order_first_deal_time` datetime DEFAULT NULL COMMENT '订单处理时间',
  `complainor` varchar(60) DEFAULT NULL COMMENT '投诉人',
  `incidence` int(11) DEFAULT NULL COMMENT '影响程度',
  `outer_content_id` varchar(60) DEFAULT NULL COMMENT '投诉流水号',
  `complain_from` int(11) DEFAULT NULL COMMENT '投诉来源',
  `complain_info` text COMMENT '投诉内容',
  `complain_appeal` text COMMENT '投诉诉求',
  `report_deal_info` text COMMENT '处理方案(报告)',
  `deal_info` text COMMENT '处理方案',
  `real_reason` text COMMENT '实际原因',
  `plain_tract_time` datetime DEFAULT NULL COMMENT '预计跟踪时间',
  `first_deal_time` datetime DEFAULT NULL COMMENT '首次处理时间',
  `close_time` datetime DEFAULT NULL COMMENT '首次关案时间',
  `foreign_flag` int(11) DEFAULT NULL COMMENT '对外责任 0: 无 ， 1：有',
  `interior_flag` int(11) DEFAULT NULL COMMENT '对外责任 0: 无 ， 1：有',
  `latest_progress` text COMMENT '最新进度',
  `is_classics` int(11) DEFAULT NULL COMMENT '是否经典案例 0: 否， 1：是',
  `irresponsibility_reason` varchar(255) DEFAULT NULL COMMENT '无责原因',
  `responsible_by` varchar(60) DEFAULT NULL COMMENT '责任方',
  `supplier_responsibility` varchar(120) DEFAULT NULL COMMENT '供应商责任',
  `cc_responsibility` varchar(120) DEFAULT NULL COMMENT '呼叫中心责任',
  `chanye_responsibility` varchar(120) DEFAULT NULL COMMENT '产业部责任',
  `yunying_responsibility` varchar(120) DEFAULT NULL COMMENT '运营责任',
  `caiwu_responsibility` varchar(120) DEFAULT NULL COMMENT '财务部责任',
  `other_responsibility` varchar(120) DEFAULT NULL COMMENT '其他责任',
  `complain_seat` varchar(120) DEFAULT NULL COMMENT '责任人',
  `complain_supplier_id` int(11) DEFAULT NULL COMMENT '责任供应商id',
  `complain_supplier` varchar(120) DEFAULT NULL COMMENT '责任供应商',
  `close_type` int(11) DEFAULT NULL COMMENT '结案方式',
  `supplier_compensate` double DEFAULT NULL COMMENT '供应商赔偿',
  `cc_compensate` double DEFAULT NULL COMMENT '呼叫中心赔偿',
  `chanye_compensate` double DEFAULT NULL COMMENT '产业部赔偿',
  `zhiliang_compensate` double DEFAULT NULL COMMENT '质量部赔偿',
  `caiwu_compensate` double DEFAULT NULL COMMENT '财务部赔偿',
  `zijie_compensate` double DEFAULT NULL COMMENT '自解赔偿',
  `back_compensate` double DEFAULT NULL COMMENT '多退少补',
  `kindness_compensate` double DEFAULT NULL COMMENT '善意补助',
  `update_user` varchar(60) DEFAULT NULL COMMENT '更新人',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `complain_type` int(1) DEFAULT NULL COMMENT '投诉类别',
  `finish_user` varchar(60) DEFAULT NULL COMMENT '关案人',
  `enclosure` text COMMENT '投诉附件',
  `final_complain_state` tinyint(2) DEFAULT NULL COMMENT '最终结果',
  `final_close_user` varchar(60) DEFAULT NULL COMMENT '案件终结人',
  `final_close_time` datetime DEFAULT NULL COMMENT '案件终结时间',
  `stage` char(2) DEFAULT NULL COMMENT '阶段 呼投/质投',
  `call_stage_result` tinyint(4) DEFAULT NULL COMMENT '呼投处理结果',
  `handover_info` varchar(255) DEFAULT NULL COMMENT '交接情况',
  `handover_time` datetime DEFAULT NULL COMMENT '转质投件时间',
  `area_compensate` double DEFAULT NULL COMMENT '区域管理部赔偿',
  `binding_deal_user` varchar(60) DEFAULT NULL COMMENT '指定处理人',
  PRIMARY KEY (`id`),
  KEY `idx_order_id` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=478 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_complain_content`
--

DROP TABLE IF EXISTS `order_complain_content`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_complain_content` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `complain_id` int(11) DEFAULT NULL,
  `outer_content_id` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '投诉流水号',
  `complain_from` int(11) DEFAULT NULL COMMENT '投诉来源',
  `complain_info` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '投诉内容',
  `create_user` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `complain_id_index` (`complain_id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_complain_op`
--

DROP TABLE IF EXISTS `order_complain_op`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_complain_op` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `complain_id` int(11) DEFAULT NULL,
  `op_string` text COMMENT '操作内容',
  `operator_name` varchar(60) DEFAULT NULL COMMENT '操作人',
  `operate_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `remark` text COMMENT '操作备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=497 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_daijia_balance_turnover`
--

DROP TABLE IF EXISTS `order_daijia_balance_turnover`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_daijia_balance_turnover` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_code` varchar(20) DEFAULT NULL COMMENT '合同app_code',
  `money` int(11) DEFAULT NULL COMMENT '变动金额',
  `type` int(1) DEFAULT NULL COMMENT '1 充值 2 消费',
  `order_id` int(11) DEFAULT NULL COMMENT '中道系统订单id',
  `outer_code` varchar(30) DEFAULT NULL COMMENT '外部订单号',
  `user_phone` varchar(15) DEFAULT NULL COMMENT '用户手机号',
  `coupon` varchar(10) DEFAULT NULL COMMENT '优惠券号',
  `order_status` int(10) DEFAULT NULL COMMENT '订单状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间\n',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record`
--

DROP TABLE IF EXISTS `order_dispatch_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `service_id` int(11) DEFAULT NULL,
  `operator_id` int(11) DEFAULT NULL,
  `dispatch_time` datetime DEFAULT NULL COMMENT '调度时间',
  `is_supplier_area_cover` int(1) DEFAULT NULL COMMENT '是否属于覆盖范围',
  `supplier_area_type` int(1) DEFAULT NULL COMMENT '服务商区域覆盖类型',
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_ibk2` (`task_order_id`),
  KEY `idx_service_id` (`service_id`) USING BTREE,
  KEY `idx_supplier_id` (`supplier_id`) USING BTREE,
  KEY `idx_vehicle_id` (`vehicle_id`) USING BTREE,
  CONSTRAINT `order_dispatch_record_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_dispatch_record_ibk2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18994 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his`
--

DROP TABLE IF EXISTS `order_dispatch_record_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(120) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `service_id` int(11) DEFAULT NULL,
  `operator_id` int(11) DEFAULT NULL,
  `dispatch_time` datetime DEFAULT NULL COMMENT '调度时间',
  `is_supplier_area_cover` int(1) DEFAULT NULL COMMENT '是否属于覆盖范围',
  `supplier_area_type` int(1) DEFAULT NULL COMMENT '服务商区域覆盖类型',
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`),
  KEY `idx_service_id` (`service_id`) USING BTREE,
  KEY `idx_supplier_id` (`supplier_id`) USING BTREE,
  KEY `idx_vehicle_id` (`vehicle_id`) USING BTREE,
  CONSTRAINT `order_dispatch_record_his_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_dispatch_record_his_ibfk_2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18994 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his_2016`
--

DROP TABLE IF EXISTS `order_dispatch_record_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his_2016` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his_2017`
--

DROP TABLE IF EXISTS `order_dispatch_record_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his_2017` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his_2018`
--

DROP TABLE IF EXISTS `order_dispatch_record_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his_2019`
--

DROP TABLE IF EXISTS `order_dispatch_record_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `service_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`),
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_dispatch_record_his_2020`
--

DROP TABLE IF EXISTS `order_dispatch_record_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_dispatch_record_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `accept_flag` int(11) DEFAULT NULL COMMENT '接受放弃: 1.接受，2：拒绝， 3：调度前拒绝',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `service_id` int(11) DEFAULT NULL,
  `operator_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_dispatch_record_his_ibk1` (`user_order_id`) USING BTREE,
  KEY `order_dispatch_record_his_ibk2` (`task_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_drive_trsearch_log`
--

DROP TABLE IF EXISTS `order_drive_trsearch_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_drive_trsearch_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_order_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL COMMENT '车辆id',
  `trace_id` int(11) DEFAULT NULL,
  `trace_type` varchar(10) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1354 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_driver_info`
--

DROP TABLE IF EXISTS `order_driver_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_driver_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) NOT NULL,
  `driver_name` varchar(20) DEFAULT NULL,
  `driver_phone` varchar(13) DEFAULT NULL,
  `id_card` varchar(30) DEFAULT NULL,
  `plate_number` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_edit_record`
--

DROP TABLE IF EXISTS `order_edit_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_edit_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `order_code` varchar(60) DEFAULT NULL,
  `file` varchar(60) DEFAULT NULL,
  `update_content` varchar(255) DEFAULT NULL COMMENT '修改内容',
  `update_reason` varchar(255) DEFAULT NULL COMMENT '修改原因',
  `create_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_estimation_his`
--

DROP TABLE IF EXISTS `order_estimation_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_estimation_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_code` varchar(35) NOT NULL COMMENT '订单编号',
  `contract_setting_id` int(11) DEFAULT NULL COMMENT '财务暂估合同分类',
  `first_contract_name` varchar(100) DEFAULT NULL COMMENT '一级合同客户名称',
  `contract_name` varchar(100) DEFAULT NULL COMMENT '二级合同客户名称',
  `charging_method` int(2) DEFAULT NULL COMMENT '收费类型',
  `contract_service_setting_id` varchar(100) DEFAULT NULL COMMENT '上游结算内容',
  `supplier_service_setting_id` varchar(100) DEFAULT NULL COMMENT '下游结算内容',
  `supplier_code` varchar(30) DEFAULT NULL COMMENT '服务商编号',
  `supplier_name` varchar(255) DEFAULT NULL COMMENT '服务商名称',
  `task_status_name` varchar(30) DEFAULT NULL COMMENT '服务完成状况',
  `is_contract_settle` int(1) DEFAULT NULL COMMENT '是否和上游结算',
  `contract_settle_type` int(2) DEFAULT NULL COMMENT '（合同）结算类型',
  `contract_settle_rule` int(2) DEFAULT NULL COMMENT '（合同）费用类型',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '（合同）预估费用',
  `is_supplier_settle` int(1) DEFAULT NULL COMMENT '是否和服务商结算',
  `supplier_settlement_type` int(2) DEFAULT NULL COMMENT '服务商结算类型',
  `supplier_proprietary_type` int(2) DEFAULT NULL COMMENT '服务商类型',
  `guidance_amount` decimal(11,2) DEFAULT NULL COMMENT '预估金额',
  `guidance_amount_total` decimal(11,2) DEFAULT NULL COMMENT '下游预估金额（加杂费）',
  `bridge_amount` decimal(11,2) DEFAULT NULL COMMENT '总过境费',
  `wait_amount` decimal(11,2) DEFAULT NULL COMMENT '等候费',
  `basement_fee` decimal(11,2) DEFAULT NULL COMMENT '地库费',
  `tyre_price` decimal(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `tyre_number` int(2) DEFAULT NULL COMMENT '辅助轮个数',
  `fixed_price` decimal(11,2) DEFAULT NULL COMMENT '协商一口价',
  `fixed_price_type` int(2) DEFAULT NULL COMMENT '协商一口价类型',
  `fixed_price_remark` varchar(100) DEFAULT NULL COMMENT '协商一口价说明',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=931 DEFAULT CHARSET=utf8 COMMENT='历史暂估表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_event_flow`
--

DROP TABLE IF EXISTS `order_event_flow`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_event_flow` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `remark_id` varchar(50) DEFAULT NULL COMMENT '备注id',
  `flow_type` int(11) NOT NULL COMMENT '流转类型',
  `event_content` longtext NOT NULL COMMENT '流转内容',
  `expected_time` datetime DEFAULT NULL COMMENT '期望时间',
  `event_position` varchar(50) DEFAULT NULL COMMENT '流转对象',
  `status` int(11) DEFAULT NULL COMMENT '处理状态',
  `result` varchar(500) DEFAULT NULL COMMENT '处理结果',
  `order_type` int(1) DEFAULT NULL COMMENT '事件关联类型',
  `event_type` varchar(50) DEFAULT NULL COMMENT '事件类型',
  `event_number` int(2) DEFAULT NULL COMMENT '事件序号',
  `first_reminder_time` datetime DEFAULT NULL,
  `second_reminder_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `deal_user` varchar(20) DEFAULT NULL,
  `finish_time` datetime DEFAULT NULL,
  `finish_user` varchar(20) DEFAULT NULL,
  `sub_warn_keys` int(2) DEFAULT NULL COMMENT '提醒类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1544 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_event_flow_his`
--

DROP TABLE IF EXISTS `order_event_flow_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_event_flow_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `remark_id` varchar(50) DEFAULT NULL COMMENT '备注id',
  `flow_type` int(11) NOT NULL COMMENT '流转类型',
  `event_content` longtext NOT NULL COMMENT '流转内容',
  `expected_time` datetime DEFAULT NULL COMMENT '期望时间',
  `event_position` varchar(50) DEFAULT NULL COMMENT '流转对象',
  `status` int(11) DEFAULT NULL COMMENT '处理状态',
  `result` varchar(500) DEFAULT NULL COMMENT '处理结果',
  `order_type` int(1) DEFAULT NULL COMMENT '事件关联类型',
  `event_type` varchar(50) DEFAULT NULL COMMENT '事件类型',
  `event_number` int(2) DEFAULT NULL COMMENT '事件序号',
  `first_reminder_time` datetime DEFAULT NULL,
  `second_reminder_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `deal_user` varchar(20) DEFAULT NULL,
  `finish_time` datetime DEFAULT NULL,
  `finish_user` varchar(20) DEFAULT NULL,
  `sub_warn_keys` int(2) DEFAULT NULL COMMENT '提醒类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1074 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_grab_record`
--

DROP TABLE IF EXISTS `order_grab_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_grab_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NULL DEFAULT NULL,
  `grab_time` timestamp NULL DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT '1 抢单中 2 抢单完成',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=340 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_images`
--

DROP TABLE IF EXISTS `order_images`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `task_order_id` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `images` varchar(255) DEFAULT NULL,
  `remark` varchar(60) DEFAULT NULL,
  `owner_car_remark` varchar(60) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `task_status` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  `create_user_id` int(11) DEFAULT NULL,
  `supplier_driver_id` int(11) DEFAULT NULL,
  `image_type` int(11) DEFAULT '0' COMMENT '1: 车辆照片， 2： 签名照片，3：其他照片',
  `tag` varchar(20) DEFAULT NULL COMMENT '用了区分app传递过来的所有照片类型',
  `tag1` varchar(20) DEFAULT NULL COMMENT '用了区分app传递过来的所有照片类型',
  `return_flag` int(11) DEFAULT '0' COMMENT '用了区分标记回传是否成功',
  `return_time` datetime DEFAULT NULL,
  `file_id` varchar(60) DEFAULT NULL,
  `lon` decimal(11,6) DEFAULT NULL COMMENT '拍照时经度',
  `lat` decimal(11,6) DEFAULT NULL,
  `take_photo_time` datetime DEFAULT NULL COMMENT '拍摄时间',
  `photo_source` int(11) DEFAULT NULL COMMENT '1 相机 2 相册 真实位置  3 相册 补充位置',
  `take_address` varchar(255) DEFAULT NULL COMMENT '拍照地址',
  `is_water_mark` int(11) DEFAULT NULL COMMENT '是否已添加水印',
  PRIMARY KEY (`id`),
  KEY `order_images_ibk1` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3574637 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_index`
--

DROP TABLE IF EXISTS `order_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_index` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` bigint(20) NOT NULL DEFAULT '1',
  `owner` varchar(30) NOT NULL,
  `day` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`,`owner`)
) ENGINE=InnoDB AUTO_INCREMENT=447 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_lowest_record`
--

DROP TABLE IF EXISTS `order_lowest_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_lowest_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) NOT NULL COMMENT '订单id',
  `lowest_supplier_id` int(11) DEFAULT NULL COMMENT 'lowest服务商id',
  `lowest_supplier_priority` int(11) DEFAULT NULL COMMENT 'lowest服务商优先级',
  `lowest_supplier_settle_type` int(11) DEFAULT NULL COMMENT 'lowest服务商结算方式',
  `lowest_ab` decimal(11,2) DEFAULT NULL COMMENT 'lowest服务商ab距离',
  `lowest_bc` decimal(11,2) DEFAULT NULL COMMENT 'lowest服务商bc距离',
  `lowest_ca` decimal(11,2) DEFAULT NULL COMMENT 'lowest服务商ca距离',
  `lowest_supplier_amount_new` decimal(11,2) DEFAULT NULL COMMENT 'lowest服务商价格',
  `lowest_supplier_amount` decimal(11,2) DEFAULT NULL COMMENT 'lowest服务商价格（初始）',
  `first_supplier_id` int(11) DEFAULT NULL COMMENT '首派服务商id',
  `first_supplier_settle_type` int(11) DEFAULT NULL COMMENT '首派服务商结算方式',
  `first_ab` decimal(11,2) DEFAULT NULL COMMENT '首派服务商ab距离',
  `first_bc` decimal(11,2) DEFAULT NULL COMMENT '首派服务商bc距离',
  `first_ca` decimal(11,2) DEFAULT NULL COMMENT '首派服务商ca距离',
  `first_supplier_amount` decimal(11,2) DEFAULT NULL COMMENT '首派服务商价格',
  `first_supplier_proprietary_type` int(11) DEFAULT NULL COMMENT '首派服务商性质',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_order_id` (`user_order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1173 DEFAULT CHARSET=utf8 COMMENT='订单最低价服务商记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_mail_info`
--

DROP TABLE IF EXISTS `order_mail_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_mail_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(50) DEFAULT NULL,
  `mail_subject` varchar(50) DEFAULT NULL,
  `mail_content` varchar(255) DEFAULT NULL,
  `create_user` varchar(50) DEFAULT NULL,
  `send_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_member_consult`
--

DROP TABLE IF EXISTS `order_member_consult`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_member_consult` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(50) DEFAULT NULL COMMENT '姓名',
  `user_phone` varchar(11) DEFAULT NULL COMMENT '手机号',
  `contract_member_id` int(11) NOT NULL COMMENT '合同会员id',
  `service_group_id` int(11) DEFAULT NULL COMMENT '服务组id',
  `remark` varchar(120) DEFAULT NULL COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='会员咨询';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_member_consult_content`
--

DROP TABLE IF EXISTS `order_member_consult_content`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_member_consult_content` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) DEFAULT NULL COMMENT '咨询编号',
  `consult_id` int(11) DEFAULT NULL COMMENT '会员咨询id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '合同id',
  `service_group_id` int(11) DEFAULT NULL COMMENT '服务组id',
  `type` int(11) DEFAULT NULL COMMENT '咨询类型',
  `content` varchar(200) DEFAULT NULL COMMENT '咨询内容',
  `return_content` varchar(200) DEFAULT NULL COMMENT '回复内容',
  `mail_content` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮件内容',
  `file_path` varchar(255) DEFAULT NULL COMMENT '文件路径，逗号拼接',
  `user_phone` varchar(11) DEFAULT NULL COMMENT '电话',
  `deal_user` varchar(50) DEFAULT NULL COMMENT '接待坐席',
  `consult_start_time` datetime DEFAULT NULL COMMENT '咨询开始时间',
  `consult_end_time` datetime DEFAULT NULL COMMENT '咨询结束时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(60) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_user` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_msg_info`
--

DROP TABLE IF EXISTS `order_msg_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_msg_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `msg_subject` varchar(255) DEFAULT NULL,
  `msg_content` varchar(500) DEFAULT NULL,
  `msg_type` int(11) DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `send_time` datetime DEFAULT NULL,
  `is_success` int(11) DEFAULT NULL,
  `send_type` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_online_alarm`
--

DROP TABLE IF EXISTS `order_online_alarm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_online_alarm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `driver_name` varchar(50) DEFAULT NULL,
  `driver_phone` varchar(15) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `vehicle_name` varchar(50) DEFAULT NULL,
  `plate_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `alarm_type` int(11) DEFAULT NULL,
  `alarm_content` varchar(160) DEFAULT NULL,
  `alarm_state` int(11) DEFAULT NULL COMMENT '1 未处理  2 已处理   3 处理超时',
  `alarm_time` datetime DEFAULT NULL,
  `deal_user` varchar(60) DEFAULT NULL,
  `deal_content` varchar(60) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=315 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation`
--

DROP TABLE IF EXISTS `order_operation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation` (
  `id` varchar(60) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(120) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `revoke_type` int(11) DEFAULT NULL,
  `revoke_reason` varchar(100) DEFAULT NULL,
  `revoke_supplier` int(11) DEFAULT NULL,
  `task_accept_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_operation_ibk1` (`user_order_id`),
  KEY `order_operation_ibk2` (`task_order_id`),
  CONSTRAINT `order_operation_ibk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_operation_ibk2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his`
--

DROP TABLE IF EXISTS `order_operation_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his` (
  `id` varchar(60) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(120) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `revoke_type` int(11) DEFAULT NULL,
  `revoke_reason` varchar(100) DEFAULT NULL,
  `revoke_supplier` int(11) DEFAULT NULL,
  `task_accept_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_operation_his_ibk1` (`user_order_id`),
  KEY `order_operation_his_ibk2` (`task_order_id`),
  CONSTRAINT `order_operation_his_ibk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_operation_his_ibk2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his_2016`
--

DROP TABLE IF EXISTS `order_operation_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his_2016` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_operation_his_ibk1` (`user_order_id`),
  KEY `order_operation_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his_2017`
--

DROP TABLE IF EXISTS `order_operation_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his_2017` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_operation_his_ibk1` (`user_order_id`),
  KEY `order_operation_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his_2018`
--

DROP TABLE IF EXISTS `order_operation_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_operation_his_ibk1` (`user_order_id`),
  KEY `order_operation_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his_2019`
--

DROP TABLE IF EXISTS `order_operation_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_operation_his_ibk1` (`user_order_id`),
  KEY `order_operation_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_operation_his_2020`
--

DROP TABLE IF EXISTS `order_operation_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_operation_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '事发地址',
  `mileage` int(11) DEFAULT NULL COMMENT '公里数',
  `operation_type` int(11) DEFAULT NULL COMMENT '流程类型：1：开案流程，2： 调度流程， 3：任务流程',
  `dispatch_result` int(11) DEFAULT NULL COMMENT '调度结果: 1: 接受， 2：拒绝， 3：超时 ',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆',
  `vehicle_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务车辆',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作人',
  `app_user_id` int(11) DEFAULT NULL COMMENT 'app操作人',
  `app_user_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'app操作人',
  `operation_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `revoke_type` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_operation_his_ibk1` (`user_order_id`) USING BTREE,
  KEY `order_operation_his_ibk2` (`task_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_phone_record_2020`
--

DROP TABLE IF EXISTS `order_phone_record_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_phone_record_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `phone_type` int(11) DEFAULT NULL,
  `phone_id` varchar(255) DEFAULT NULL,
  `phone_record_url` varchar(255) DEFAULT NULL,
  `call_style` varchar(255) DEFAULT NULL,
  `insert_time` datetime DEFAULT NULL,
  `duration` bigint(20) DEFAULT NULL,
  `ring_time` bigint(20) DEFAULT NULL,
  `uin` varchar(255) DEFAULT NULL,
  `dnis` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `operator_name` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `consult_order_id` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL COMMENT '关联编号',
  `contract_name` varchar(255) DEFAULT NULL COMMENT '呼入来源',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `record_status` int(11) DEFAULT NULL COMMENT '补充完成状态',
  `phone_number` varchar(255) DEFAULT NULL COMMENT '电话号码',
  `insert_db_time` datetime DEFAULT NULL,
  `queue_name` varchar(255) DEFAULT NULL COMMENT '呼叫节点名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_phone_Id_key` (`phone_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_phone_record_2021`
--

DROP TABLE IF EXISTS `order_phone_record_2021`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_phone_record_2021` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `phone_type` int(11) DEFAULT NULL,
  `phone_id` varchar(255) DEFAULT NULL,
  `phone_record_url` varchar(255) DEFAULT NULL,
  `call_style` varchar(255) DEFAULT NULL,
  `insert_time` datetime DEFAULT NULL,
  `duration` bigint(20) DEFAULT NULL,
  `ring_time` bigint(20) DEFAULT NULL,
  `uin` varchar(255) DEFAULT NULL,
  `dnis` varchar(255) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `operator_name` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `consult_order_id` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL COMMENT '关联编号',
  `contract_name` varchar(255) DEFAULT NULL COMMENT '呼入来源',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `record_status` int(11) DEFAULT NULL COMMENT '补充完成状态',
  `phone_number` varchar(255) DEFAULT NULL COMMENT '电话号码',
  `insert_db_time` datetime DEFAULT NULL,
  `queue_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '呼叫节点名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_phone_Id_key` (`phone_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6317 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_phone_record_statistic`
--

DROP TABLE IF EXISTS `order_phone_record_statistic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_phone_record_statistic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cc_phone` varchar(50) DEFAULT NULL COMMENT '电话号',
  `queue_name` varchar(255) DEFAULT NULL COMMENT '队列名称',
  `call_in_count` int(11) DEFAULT NULL COMMENT '呼入量',
  `call_in_count_answered` int(11) DEFAULT NULL COMMENT '呼入接通量',
  `call_in_ring_time_sum` bigint(20) DEFAULT NULL COMMENT '呼入响铃时长之和',
  `call_in_duration_sum` bigint(20) DEFAULT NULL COMMENT '呼入通话时长之和',
  `call_in_count_answered_in_ten_seconds` int(11) DEFAULT NULL COMMENT '10秒呼入接通量',
  `call_in_count_answered_in_twenty_seconds` int(11) DEFAULT NULL COMMENT '20秒呼入接通量',
  `call_in_count_abandoned_in_three_seconds` int(11) DEFAULT NULL COMMENT '3秒呼入放弃量',
  `call_out_count` int(11) DEFAULT NULL COMMENT '呼出量',
  `call_out_count_answered` int(11) DEFAULT NULL COMMENT '呼出接通量',
  `call_out_duration_sum` bigint(20) DEFAULT NULL COMMENT '呼出通话时长之和',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_phone_relation_2020`
--

DROP TABLE IF EXISTS `order_phone_relation_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_phone_relation_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_name` varchar(100) DEFAULT NULL COMMENT '电话来源',
  `phone_type` varchar(11) DEFAULT NULL COMMENT '电话类型',
  `phone_id` varchar(40) DEFAULT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `relation_order_code` varchar(100) DEFAULT NULL COMMENT '订单编号',
  `consult_order_id` varchar(40) DEFAULT NULL,
  `medical_consult_id` int(11) DEFAULT NULL COMMENT '医疗救援咨询id',
  `record_status` int(11) DEFAULT NULL,
  `operate_user` varchar(120) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `other_remark` varchar(255) DEFAULT NULL,
  `remark_id` varchar(40) DEFAULT NULL,
  `consult_detail_id` varchar(40) DEFAULT NULL,
  `call_style` varchar(20) DEFAULT NULL,
  `phone_number` varchar(50) DEFAULT NULL,
  `trunk_number` varchar(50) DEFAULT NULL,
  `is_supplement` int(11) DEFAULT NULL COMMENT '电话记录是否补充',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `OnlyPhone_id` (`phone_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_phone_relation_2021`
--

DROP TABLE IF EXISTS `order_phone_relation_2021`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_phone_relation_2021` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `contract_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话来源',
  `phone_type` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话类型',
  `phone_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `relation_order_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '订单编号',
  `consult_order_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `medical_consult_id` int(11) DEFAULT NULL COMMENT '医疗救援咨询id',
  `record_status` int(11) DEFAULT NULL,
  `operate_user` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `other_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `remark_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `consult_detail_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `call_style` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `phone_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `trunk_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_supplement` int(11) DEFAULT NULL COMMENT '电话记录是否补充',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `OnlyPhone_id` (`phone_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1329 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark`
--

DROP TABLE IF EXISTS `order_remark`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(60) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(60) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `remark_source` int(11) DEFAULT '1',
  `operator_type` varchar(30) DEFAULT NULL,
  `remark_type` int(11) DEFAULT NULL,
  `remark_level1` varchar(50) DEFAULT NULL,
  `remark_level2` varchar(50) DEFAULT NULL,
  `remark_level3` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_remark_ibk1` (`user_order_id`),
  KEY `order_remark_ibk2` (`task_order_id`),
  CONSTRAINT `order_remark_ibk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_deal`
--

DROP TABLE IF EXISTS `order_remark_deal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_deal` (
  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(60) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(60) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `order_code` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '订单编号',
  `task_code` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '任务编号',
  `outer_code` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '外部编号',
  `contract_id` int(11) DEFAULT NULL,
  `remark_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_remark_ibk1` (`user_order_id`) USING BTREE,
  KEY `order_remark_ibk2` (`contract_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his`
--

DROP TABLE IF EXISTS `order_remark_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `remark_source` int(11) DEFAULT '1',
  `operator_type` varchar(255) DEFAULT NULL,
  `remark_type` int(11) DEFAULT NULL,
  `remark_level1` varchar(50) DEFAULT NULL,
  `remark_level2` varchar(50) DEFAULT NULL,
  `remark_level3` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_remark_his_ibk1` (`user_order_id`),
  KEY `order_remark_his_ibk2` (`task_order_id`),
  CONSTRAINT `order_remark_his_ibk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his_2016`
--

DROP TABLE IF EXISTS `order_remark_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his_2016` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_remark_his_ibk1` (`user_order_id`),
  KEY `order_remark_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his_2017`
--

DROP TABLE IF EXISTS `order_remark_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his_2017` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_remark_his_ibk1` (`user_order_id`),
  KEY `order_remark_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his_2018`
--

DROP TABLE IF EXISTS `order_remark_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his_2018` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_remark_his_ibk1` (`user_order_id`),
  KEY `order_remark_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his_2019`
--

DROP TABLE IF EXISTS `order_remark_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his_2019` (
  `id` varchar(50) NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_remark_his_ibk1` (`user_order_id`),
  KEY `order_remark_his_ibk2` (`task_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_remark_his_2020`
--

DROP TABLE IF EXISTS `order_remark_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_remark_his_2020` (
  `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `order_status` int(11) DEFAULT NULL COMMENT '订单状态',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `is_zd` int(11) DEFAULT NULL COMMENT '是否中道 0: 否， 1： 是',
  `deal_status` int(11) DEFAULT NULL COMMENT '处理状态 1：待处理； 2：处理完毕。',
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属供应商',
  `operator_id` int(11) DEFAULT NULL COMMENT '操作人',
  `operator_name` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_remark_his_ibk1` (`user_order_id`) USING BTREE,
  KEY `order_remark_his_ibk2` (`task_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_saic`
--

DROP TABLE IF EXISTS `order_saic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_saic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_order_no` varchar(50) NOT NULL COMMENT '发包方唯一工单编号',
  `owner_sub_order_no` varchar(50) DEFAULT NULL COMMENT '发包方唯一子工单编号',
  `vehicle_type` varchar(60) DEFAULT NULL COMMENT '车型',
  `service_type` varchar(30) NOT NULL COMMENT '服务类型/救援项目',
  `branch` varchar(20) NOT NULL COMMENT '分公司代码',
  `branch_name` varchar(60) NOT NULL COMMENT '分公司名称',
  `case_location` varchar(200) NOT NULL COMMENT '案件地点/救援地点',
  `case_longitude` varchar(20) DEFAULT NULL COMMENT '案件经度',
  `case_latitude` varchar(20) DEFAULT NULL COMMENT '案件纬度',
  `service_content` varchar(400) DEFAULT NULL COMMENT '发包方下单备注',
  `case_province` varchar(20) DEFAULT NULL COMMENT '案件发生所在省',
  `case_city` varchar(20) DEFAULT NULL COMMENT '案件发生所在市 ',
  `case_county` varchar(20) DEFAULT NULL COMMENT '案件发生所在区',
  `incident_type` varchar(10) NOT NULL COMMENT '是否事故救援：0表示非事故，1表示事故',
  `salvation_fee_type` varchar(10) NOT NULL COMMENT '是否事故救援：0表示非事故，1表示事',
  `drag_environment` varchar(20) DEFAULT NULL COMMENT '救援环境，1：地下停车场拖车；2：高层停车场拖车；3：吊装救援',
  `des_address` varchar(200) DEFAULT NULL COMMENT '拖车目的地',
  `des_longitude` varchar(20) DEFAULT NULL COMMENT '目的地经度',
  `des_latitude` varchar(20) DEFAULT NULL COMMENT '目的地纬度',
  `des_state` varchar(30) DEFAULT NULL COMMENT '目的地省',
  `des_city` varchar(30) DEFAULT NULL COMMENT '目的地的市',
  `des_county` varchar(30) DEFAULT NULL COMMENT '目的地区',
  `case_code` int(11) DEFAULT NULL,
  `des_code` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `save_state` int(11) DEFAULT NULL,
  `partner_code` varchar(20) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record`
--

DROP TABLE IF EXISTS `order_track_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `order_code` varchar(255) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `contract_name` varchar(255) DEFAULT NULL,
  `plate_number` varchar(255) DEFAULT NULL,
  `user_phone` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `service_supplier_name` varchar(255) DEFAULT NULL,
  `service_supplier_id` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` varchar(225) DEFAULT NULL,
  `deal_user_id` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `tracking_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL COMMENT '1.待处理 2,已处理 3,超时 4 时效',
  `supplier_id` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `is_loop_track` int(11) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `track_content` varchar(255) DEFAULT NULL,
  `to_be_tracked_status` int(11) DEFAULT NULL,
  `finish_time` timestamp NULL DEFAULT NULL,
  `finish_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_track_record_fk2` (`task_order_id`),
  KEY `order_track_record_fk1` (`user_order_id`),
  CONSTRAINT `order_track_record_fk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_track_record_fk2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_his`
--

DROP TABLE IF EXISTS `order_track_record_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `order_code` varchar(255) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `contract_name` varchar(255) DEFAULT NULL,
  `plate_number` varchar(255) DEFAULT NULL,
  `user_phone` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `service_supplier_name` varchar(255) DEFAULT NULL,
  `service_supplier_id` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` varchar(255) DEFAULT NULL,
  `deal_user_id` varchar(255) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` varchar(255) DEFAULT NULL,
  `tracking_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL COMMENT '1.待处理 2,已处理 3,超时 4 时效',
  `supplier_id` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `is_loop_track` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `track_content` varchar(255) DEFAULT NULL,
  `to_be_tracked_status` int(11) DEFAULT NULL,
  `finish_time` datetime DEFAULT NULL,
  `finish_user_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_track_record_his_ibk1` (`task_order_id`),
  KEY `order_track_record_his_ibk2` (`user_order_id`),
  CONSTRAINT `order_track_record_his_fk1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_track_record_his_fk2` FOREIGN KEY (`task_order_id`) REFERENCES `task_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_his_2018`
--

DROP TABLE IF EXISTS `order_track_record_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `order_code` varchar(255) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `contract_name` varchar(255) DEFAULT NULL,
  `plate_number` varchar(255) DEFAULT NULL,
  `user_phone` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `service_supplier_name` varchar(255) DEFAULT NULL,
  `service_supplier_id` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` int(11) DEFAULT NULL,
  `deal_user_id` varchar(255) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` varchar(255) DEFAULT NULL,
  `tracking_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL COMMENT '1.待处理 2,已处理 3,超时 4 时效',
  `supplier_id` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `is_loop_track` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_track_record_his_ibk1` (`task_order_id`),
  KEY `order_track_record_his_ibk2` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_his_2019`
--

DROP TABLE IF EXISTS `order_track_record_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `order_code` varchar(255) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `contract_name` varchar(255) DEFAULT NULL,
  `plate_number` varchar(255) DEFAULT NULL,
  `user_phone` varchar(255) DEFAULT NULL,
  `user_name` varchar(255) DEFAULT NULL,
  `service_supplier_name` varchar(255) DEFAULT NULL,
  `service_supplier_id` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` varchar(255) DEFAULT NULL,
  `deal_user_id` varchar(255) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` varchar(255) DEFAULT NULL,
  `tracking_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL COMMENT '1.待处理 2,已处理 3,超时 4 时效',
  `supplier_id` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `is_loop_track` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_track_record_his_ibk1` (`task_order_id`),
  KEY `order_track_record_his_ibk2` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_his_2020`
--

DROP TABLE IF EXISTS `order_track_record_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `order_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `task_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `contract_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `plate_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `user_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `service_supplier_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `service_supplier_id` int(11) DEFAULT NULL,
  `task_status` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `service_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `deal_user_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `deal_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `deal_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `tracking_time` datetime DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL COMMENT '1.待处理 2,已处理 3,超时 4 时效',
  `supplier_id` int(11) DEFAULT NULL,
  `track_limit` int(11) DEFAULT NULL,
  `is_loop_track` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `track_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `to_be_tracked_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_track_record_his_ibk1` (`task_order_id`) USING BTREE,
  KEY `order_track_record_his_ibk2` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_new`
--

DROP TABLE IF EXISTS `order_track_record_new`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `order_code` varchar(255) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `parent_contract_id` int(11) DEFAULT NULL,
  `supplement_user_name` varchar(255) DEFAULT NULL,
  `seat_group_id` int(11) DEFAULT NULL,
  `contract_type` int(11) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL,
  `track_time` datetime DEFAULT NULL,
  `track_time_limit` int(11) DEFAULT NULL,
  `track_content` varchar(255) DEFAULT NULL,
  `track_mode` int(11) DEFAULT NULL,
  `track_obj` int(2) DEFAULT NULL,
  `track_type` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL,
  `first_deal_user_name` varchar(255) DEFAULT NULL COMMENT '开始跟踪处理人',
  `first_deal_time` datetime DEFAULT NULL COMMENT '开始跟踪处理时间',
  `track_sort` int(1) DEFAULT NULL COMMENT '跟踪次数',
  `halfway_track_type` int(1) DEFAULT NULL COMMENT '一半跟踪类型',
  `user_deal` int(1) DEFAULT NULL COMMENT '是否用户处理',
  PRIMARY KEY (`id`),
  KEY `idx_id` (`id`) USING BTREE,
  KEY `idx_user_order_id` (`user_order_id`) USING BTREE,
  KEY `idx_task_order_id` (`task_order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7785 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_track_record_new_his`
--

DROP TABLE IF EXISTS `order_track_record_new_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_track_record_new_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `task_order_id` int(11) DEFAULT NULL,
  `task_code` varchar(255) DEFAULT NULL,
  `order_code` varchar(255) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `parent_contract_id` int(11) DEFAULT NULL,
  `supplement_user_name` varchar(255) DEFAULT NULL,
  `seat_group_id` int(11) DEFAULT NULL,
  `contract_type` int(11) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL,
  `track_time` datetime DEFAULT NULL,
  `track_time_limit` int(11) DEFAULT NULL,
  `track_content` varchar(255) DEFAULT NULL,
  `track_mode` int(11) DEFAULT NULL,
  `track_obj` int(2) DEFAULT NULL,
  `track_type` int(11) DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `first_deal_user_name` varchar(255) DEFAULT NULL COMMENT '开始跟踪处理人',
  `first_deal_time` datetime DEFAULT NULL COMMENT '开始跟踪处理时间',
  `track_sort` int(1) DEFAULT NULL COMMENT '跟踪次数',
  `halfway_track_type` int(1) DEFAULT NULL COMMENT '一半跟踪类型',
  `user_deal` int(1) DEFAULT NULL COMMENT '是否用户处理',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7784 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_trsearch_log`
--

DROP TABLE IF EXISTS `order_trsearch_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_trsearch_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `rescue_vehicle_id` int(11) DEFAULT NULL,
  `trace_id` int(11) DEFAULT NULL,
  `status` int(1) DEFAULT '0' COMMENT '状态',
  `fail_count` int(1) DEFAULT '0' COMMENT '失败次数',
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `trace_type` varchar(20) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3045 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_trsearch_log_exception`
--

DROP TABLE IF EXISTS `order_trsearch_log_exception`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_trsearch_log_exception` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `rescue_vehicle_id` int(11) DEFAULT NULL,
  `trace_id` int(11) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `trace_type` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3025 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `order_voucher_recharge_record`
--

DROP TABLE IF EXISTS `order_voucher_recharge_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_voucher_recharge_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `user_order_code` varchar(20) DEFAULT NULL COMMENT '订单号',
  `vin_no` varchar(20) DEFAULT NULL COMMENT '车架号',
  `user_phone` varchar(20) DEFAULT NULL COMMENT '电话号码',
  `recharge_amount` int(11) DEFAULT NULL COMMENT '充值金额',
  `recharge_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '充值时间',
  `recharge_user_name` varchar(100) DEFAULT NULL COMMENT '充值人',
  `activity_code` varchar(100) DEFAULT NULL COMMENT '活动号',
  `effective_time` datetime DEFAULT NULL COMMENT '生效时间',
  `failure_time` datetime DEFAULT NULL COMMENT '失效时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user_name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `package_sino`
--

DROP TABLE IF EXISTS `package_sino`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `package_sino` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pack_name` varchar(60) DEFAULT NULL,
  `pack_type` int(11) DEFAULT NULL,
  `pack_price` int(11) DEFAULT NULL,
  `pack_image` text,
  `pack_time` int(11) DEFAULT NULL,
  `effect_time` int(11) DEFAULT NULL,
  `pack_descr` varchar(255) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `service_group` int(11) DEFAULT NULL,
  `good_will` int(11) DEFAULT NULL,
  `pack_remark` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `phone_call_record`
--

DROP TABLE IF EXISTS `phone_call_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `phone_call_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone_number` varchar(30) DEFAULT NULL COMMENT '电话号码',
  `user_order_code` varchar(35) DEFAULT NULL COMMENT '订单编码',
  `task_order_code` varchar(35) DEFAULT NULL COMMENT '任务编码',
  `type_code` varchar(30) DEFAULT NULL COMMENT '类型',
  `call_time` datetime DEFAULT NULL COMMENT '拨打时间',
  `press_number` varchar(4) DEFAULT NULL COMMENT '按键数字',
  `timeout_time` datetime DEFAULT NULL COMMENT '对方超时未接的时刻',
  `answer_time` datetime DEFAULT NULL COMMENT '接听时间',
  `hang_up_time` datetime DEFAULT NULL COMMENT '挂断时间',
  `status` tinyint(4) DEFAULT NULL COMMENT '1呼叫中 2结束',
  `end_operation` varchar(120) DEFAULT NULL COMMENT '结束后的操作',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `phone_call_type`
--

DROP TABLE IF EXISTS `phone_call_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `phone_call_type` (
  `id` int(11) NOT NULL,
  `code` varchar(20) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `node1` varchar(20) DEFAULT NULL,
  `node2` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `create_user` varchar(50) DEFAULT NULL,
  `update_user` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `phone_channel_setting`
--

DROP TABLE IF EXISTS `phone_channel_setting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `phone_channel_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电脑ip',
  `hostname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '主机名',
  `department` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '部门',
  `phone_channel_number` int(11) DEFAULT NULL COMMENT '话机通道号',
  `phone_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话ip',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `delete_flag` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `picc_invoice_syn`
--

DROP TABLE IF EXISTS `picc_invoice_syn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `picc_invoice_syn` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `payment_number` varchar(50) DEFAULT NULL COMMENT '付款清单号，单一订单唯一标识',
  `request_source` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '请求来源：使用服务商注册唯一标识\r\n',
  `invoice_number` varchar(60) DEFAULT NULL COMMENT '发票号',
  `invoice_code` varchar(70) DEFAULT NULL COMMENT '发票代码',
  `invoice_year` datetime DEFAULT NULL COMMENT '发票年份',
  `images` varchar(255) DEFAULT NULL COMMENT '图片地址',
  `scene` varchar(20) DEFAULT NULL COMMENT '场景',
  `time` datetime DEFAULT NULL COMMENT '创建时间',
  `return_state` int(2) DEFAULT NULL COMMENT '发票回传状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `picc_order_audit`
--

DROP TABLE IF EXISTS `picc_order_audit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `picc_order_audit` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `request_code` varchar(50) DEFAULT NULL COMMENT '订单流水号，单一订单唯一标识',
  `pay_ables` decimal(10,2) DEFAULT NULL COMMENT '人保确认金额(元)',
  `fail_reason` varchar(255) DEFAULT NULL COMMENT '审核失败原因',
  `fail_remark` varchar(255) DEFAULT NULL COMMENT '审核失败备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `payment_number` varchar(255) DEFAULT NULL COMMENT '付款清单流水号',
  `audit_succeed` int(3) DEFAULT NULL COMMENT '0 失败 1成功',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `picc_pay_order`
--

DROP TABLE IF EXISTS `picc_pay_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `picc_pay_order` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `payment_number` varchar(50) DEFAULT NULL COMMENT '付款清单流水号，单一订单唯一标识',
  `charge_amt` decimal(10,2) DEFAULT NULL COMMENT '发票金额总费用/分',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `return_state` int(10) DEFAULT NULL COMMENT '开票状态 0未开票 1.已开票 2.重新开票',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_external_order`
--

DROP TABLE IF EXISTS `pingan_external_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_external_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `tran_code` varchar(100) DEFAULT NULL,
  `tran_salvation_id` varchar(100) DEFAULT NULL,
  `sign` varchar(100) DEFAULT NULL,
  `report_name` varchar(100) DEFAULT NULL,
  `mobile` varchar(100) DEFAULT NULL,
  `salvation_object` varchar(100) DEFAULT NULL,
  `license` varchar(100) DEFAULT NULL,
  `brand` varchar(100) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `dep_code` varchar(100) DEFAULT NULL,
  `damage_time` varchar(100) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `insured_name` varchar(100) DEFAULT NULL,
  `desc` varchar(500) DEFAULT NULL,
  `operator_id` varchar(100) DEFAULT NULL,
  `callerno` varchar(100) DEFAULT NULL,
  `salvation_fee_type` varchar(100) DEFAULT NULL,
  `obligate_field` varchar(100) DEFAULT NULL,
  `gps_x` varchar(100) DEFAULT NULL,
  `gps_y` varchar(100) DEFAULT NULL,
  `salvation_factory_id` varchar(100) DEFAULT NULL,
  `data_source` varchar(100) DEFAULT NULL,
  `salvation_flag` varchar(100) DEFAULT NULL,
  `client_type` varchar(100) DEFAULT NULL,
  `set_code` varchar(100) DEFAULT NULL,
  `vehicle_frame_no` varchar(100) DEFAULT NULL,
  `is_online` varchar(100) DEFAULT NULL,
  `direct_sub_comp` varchar(100) DEFAULT NULL,
  `is_new_core` varchar(100) DEFAULT NULL,
  `succor_type` varchar(100) DEFAULT NULL,
  `drag_environment` varchar(100) DEFAULT NULL,
  `is_need_garage` varchar(100) DEFAULT NULL,
  `destination` varchar(500) DEFAULT NULL,
  `garage_name` varchar(100) DEFAULT NULL,
  `destlongitude` varchar(100) DEFAULT NULL,
  `destlatitude` varchar(100) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `customer_type` varchar(25) DEFAULT NULL,
  `risk_customer_label` varchar(500) DEFAULT NULL,
  `sensitive_customer_label` varchar(500) DEFAULT NULL,
  `power_type` varchar(100) DEFAULT NULL,
  `salvation_reason` varchar(500) DEFAULT NULL,
  `land_bank` varchar(25) DEFAULT NULL,
  `work_order_type` int(11) DEFAULT NULL,
  `rescue_person_tel` varchar(50) DEFAULT NULL,
  `rescue_sence_pic_urls` varchar(600) DEFAULT NULL,
  `polymerize_distance` varchar(255) DEFAULT NULL,
  `polymerize_duration` varchar(255) DEFAULT NULL,
  `product_version` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1495 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_invoice`
--

DROP TABLE IF EXISTS `pingan_invoice`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_invoice` (
  `id` int(9) NOT NULL AUTO_INCREMENT,
  `tickey_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票号码',
  `tickey_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票代码',
  `finish_mark` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '同一个结算流水号批次推送的直接理赔订单是否完成：0否1是，默认0',
  `is_special_dep` varchar(2) DEFAULT NULL COMMENT '是否是特殊机构，0否1是，默认0，注：因为部分机构是和供应商按照三级机构结算。',
  `return_result` int(2) DEFAULT NULL COMMENT '回传结果 0 没回传 ，1 已回传 ',
  `return_time` datetime DEFAULT NULL COMMENT '回传时间',
  `return_state` int(255) DEFAULT NULL COMMENT '回传状态  0 成功  1失败  2.重新开票',
  `fail_time` datetime DEFAULT NULL COMMENT '重新开票时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `avg_discount_money_sum` decimal(15,3) DEFAULT NULL COMMENT '单均扣减金额总和',
  `last_settlement_price_sum` decimal(15,3) DEFAULT NULL COMMENT '财务结算金额总和',
  `invoice_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'IBOS的key',
  `selletment_flow_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算流水号',
  `tickey_purchasing_unit_name` varchar(255) DEFAULT NULL COMMENT '发票购货单位名称',
  `tickey_purchasing_unit_code` varchar(255) DEFAULT NULL COMMENT '发票购货单位识别号',
  `no_tax_amount` varchar(50) DEFAULT NULL COMMENT '不含税价金额',
  `tax_amount` varchar(50) DEFAULT NULL COMMENT '税额',
  `photo_path` varchar(255) DEFAULT NULL COMMENT '图片地址',
  `reason_msg` varchar(255) DEFAULT NULL COMMENT '发票不通过原因',
  `order_number` int(8) DEFAULT NULL COMMENT '工单数量',
  `invoice_update_time` datetime DEFAULT NULL COMMENT '开发票时间',
  `invoice_money` decimal(10,2) DEFAULT NULL COMMENT '发票金额',
  `tax_rate` decimal(9,2) DEFAULT NULL COMMENT '税率',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名字',
  `photo_back_flag` int(9) DEFAULT NULL COMMENT '照片是否回传 0没回传，1 已经回传',
  `data_back_flag` int(9) DEFAULT NULL COMMENT '发票数据是否回传 0没回传，1 已经回传',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_invoice_direct_settlement`
--

DROP TABLE IF EXISTS `pingan_invoice_direct_settlement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_invoice_direct_settlement` (
  `id` int(9) NOT NULL AUTO_INCREMENT,
  `selletment_flow_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算流水号',
  `finish_mark` varchar(2) DEFAULT NULL COMMENT '同一个结算流水号批次推送的直接理赔订单是否完成：0否1是，默认0',
  `is_special_dep` varchar(2) DEFAULT NULL COMMENT '是否是特殊机构，0否1是，默认0，注：因为部分机构是和供应商按照三级机构结算。',
  `return_result` int(2) DEFAULT NULL COMMENT '回传结果 0 没回传 ，1 已回传 ',
  `return_time` datetime DEFAULT NULL COMMENT '回传时间',
  `return_state` int(255) DEFAULT NULL COMMENT '回传状态  0 成功  1失败  2.重新开票',
  `fail_time` datetime DEFAULT NULL COMMENT '重新开票时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `avg_discount_money_sum` decimal(15,3) DEFAULT NULL COMMENT '单均扣减金额总和',
  `last_settlement_price_sum` decimal(15,3) DEFAULT NULL COMMENT '财务结算金额总和',
  `invoice_key` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'IBOS的key',
  `tickey_purchasing_unit_name` varchar(255) DEFAULT NULL COMMENT '发票购货单位名称',
  `tickey_purchasing_unit_code` varchar(255) DEFAULT NULL COMMENT '发票购货单位识别号',
  `tickey_number` varchar(50) DEFAULT NULL COMMENT '发票号码',
  `tickey_code` varchar(50) DEFAULT NULL COMMENT '发票代码',
  `no_tax_amount` varchar(50) DEFAULT NULL COMMENT '不含税价金额',
  `tax_amount` varchar(50) DEFAULT NULL COMMENT '税额',
  `photo_path` varchar(255) DEFAULT NULL COMMENT '图片地址',
  `reason_msg` varchar(255) DEFAULT NULL COMMENT '发票不通过原因',
  `order_number` int(8) DEFAULT NULL COMMENT '工单数量',
  `invoice_update_time` datetime DEFAULT NULL COMMENT '开发票时间',
  `invoice_money` decimal(10,2) DEFAULT NULL COMMENT '发票金额',
  `tax_rate` decimal(9,2) DEFAULT NULL COMMENT '税率',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_invoice_order_details`
--

DROP TABLE IF EXISTS `pingan_invoice_order_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_invoice_order_details` (
  `id` int(9) NOT NULL AUTO_INCREMENT,
  `avg_discount_money` decimal(20,3) DEFAULT NULL COMMENT '单均扣减金额',
  `salvation_order_id` varchar(40) DEFAULT NULL COMMENT '救援订单号',
  `last_settlement_price` decimal(30,3) DEFAULT NULL COMMENT '财务结算金额',
  `tickey_purchasing_unit_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票购货单位名称',
  `selletment_flow_id` varchar(30) DEFAULT NULL COMMENT '结算流水号',
  `tickey_purchasing_unit_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票购货单位识别号',
  `batch_number` varchar(40) DEFAULT NULL COMMENT '批次号',
  `tickey_number` varchar(50) DEFAULT NULL COMMENT '发票号码',
  `tickey_code` varchar(50) DEFAULT NULL COMMENT '发票代码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_account`
--

DROP TABLE IF EXISTS `pingan_order_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `outer_code` varchar(35) NOT NULL,
  `pici_code` varchar(35) DEFAULT NULL,
  `plate_number` varchar(255) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `malfunction_reason` int(11) DEFAULT NULL,
  `cut_amount` double(11,2) DEFAULT NULL,
  `cut_reason` varchar(500) DEFAULT NULL,
  `pay_percent` varchar(25) DEFAULT NULL,
  `verify_state` varchar(11) DEFAULT NULL,
  `verify_time` datetime DEFAULT NULL,
  `amount` double DEFAULT NULL,
  `order_state` varchar(11) DEFAULT NULL,
  `account_state` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `finish_time` datetime DEFAULT NULL,
  `settlement_bill_state` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_account_operation`
--

DROP TABLE IF EXISTS `pingan_order_account_operation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_account_operation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `outer_code` varchar(35) NOT NULL,
  `operate_user` varchar(100) DEFAULT NULL,
  `operate_remark` varchar(250) DEFAULT NULL,
  `operate_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=257 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_account_pici`
--

DROP TABLE IF EXISTS `pingan_order_account_pici`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_account_pici` (
  `pici_code` varchar(35) NOT NULL,
  `total_amount` double DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`pici_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_account_subsidiary_file`
--

DROP TABLE IF EXISTS `pingan_order_account_subsidiary_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_account_subsidiary_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `outer_code` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `file_type` int(11) DEFAULT NULL,
  `file_path` varchar(160) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `file_id` varchar(225) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_invoice_info_back`
--

DROP TABLE IF EXISTS `pingan_order_invoice_info_back`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_invoice_info_back` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `selletment_flow_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算流水号',
  `statistics_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算批次号',
  `invoice_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票号码	右上角发票号码8位',
  `invoice_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票号码	发票右上角12位数字',
  `invoice_total_amount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '不含税价	发票中的总金额',
  `invoice_tax` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '税额	发票中的税额',
  `invoice_buy_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票购货单位名称	产险分公司开票全称',
  `invoice_buy_identification_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票购货单位识别号	产险纳税人识别号',
  `invoice_sell_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票销货单位名称 	供应商开票全称',
  `invoice_sell_identification_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票销货单位识别号 	供应商纳税人识别号',
  `invoice_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票类型	专票',
  `invoice_tax_rate` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票税率	发票上税率',
  `collection_account_name` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '户名	供应商收款账户名（必须与发票销货单位名称保持一致）',
  `collection_account` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '账号	供应商收款账号',
  `collection_bank` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '银行大类	供应商收款银行，必须在SHEET3内包含的银行',
  `collection_deposit_bank` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '开户银行	供应商收款开户行，必须在SHEET3内包含的开户行',
  `collection_deposit_bank_detail` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '开户行明细	供应商开户行明细',
  `bank_territory_province` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '银行所属地（省）	实际归属地',
  `bank_territory_city` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '银行所属地（市）	实际归属地',
  `invoice_abstract` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '摘要',
  `invoice_photo` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票的照片或者电子票',
  `claim_settlement_method` int(2) DEFAULT NULL COMMENT '理赔方式(0:间接理赔发票。1：直接理赔发票。默认为间接理赔发票)',
  `pingan_order_statistics_id_info_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `image` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_invoice_subsidiary_file`
--

DROP TABLE IF EXISTS `pingan_order_invoice_subsidiary_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_invoice_subsidiary_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pingan_order_statistics_id_info_id` int(11) DEFAULT NULL,
  `file_path` varchar(160) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `file_id` varchar(225) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `pingan_order_invoice_info_back_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_notice_invoice`
--

DROP TABLE IF EXISTS `pingan_order_notice_invoice`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_notice_invoice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `selletment_flow_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '结算流水号',
  `this_month_count_money` varchar(50) DEFAULT NULL COMMENT '本月合计支付金额',
  `direct_claims_fee` varchar(50) DEFAULT NULL COMMENT '直接理赔账单金额',
  `indirect_claims_fee` varchar(50) DEFAULT NULL COMMENT '间接理赔账单金额',
  `direct_claims_pay_fee` varchar(50) DEFAULT NULL COMMENT '直接理赔支付金额',
  `indirect_claims_pay_fee` varchar(50) DEFAULT NULL COMMENT '间接理赔支付金额',
  `year` varchar(20) DEFAULT NULL COMMENT '结算账单年份',
  `dep_code_no` varchar(20) DEFAULT NULL COMMENT '机构编码',
  `month` varchar(4) DEFAULT NULL COMMENT '结算账单月份',
  `provider` varchar(50) DEFAULT NULL COMMENT '供应商编码',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `is_re_notice_invoice` int(4) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_settle`
--

DROP TABLE IF EXISTS `pingan_order_settle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_settle` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` double(11,2) DEFAULT NULL,
  `sum_count` double(11,2) DEFAULT NULL,
  `routinization_cut` double(11,2) DEFAULT NULL,
  `complaints_recoeds_cut` double(11,2) DEFAULT NULL,
  `nps_cut` double(11,2) DEFAULT NULL,
  `pai_gong_cut` double(11,2) DEFAULT NULL,
  `dao_kan_cut` double(11,2) DEFAULT NULL,
  `zi_jie_cut` double(11,2) DEFAULT NULL,
  `others_cut` double(11,2) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `selletment_flow_id` varchar(225) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `account_state` int(11) DEFAULT NULL,
  `adjust_ment_type` varchar(255) DEFAULT NULL,
  `adjust_ment` double(11,2) DEFAULT NULL,
  `adjust_ment_reason` varchar(255) DEFAULT NULL,
  `order_count` int(11) DEFAULT NULL,
  `settle_origize` varchar(255) DEFAULT NULL,
  `others_cut_remark` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_settle_detail`
--

DROP TABLE IF EXISTS `pingan_order_settle_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_settle_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pingan_order_settle_id` int(11) DEFAULT NULL,
  `outer_code` varchar(35) NOT NULL,
  `verify_state` varchar(11) DEFAULT NULL,
  `verify_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pingan_order_settle_id_ibfk1` (`pingan_order_settle_id`),
  CONSTRAINT `pingan_order_settle_id_ibfk1` FOREIGN KEY (`pingan_order_settle_id`) REFERENCES `pingan_order_settle` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=231 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_settle_pici`
--

DROP TABLE IF EXISTS `pingan_order_settle_pici`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_settle_pici` (
  `pici_code` varchar(35) NOT NULL,
  `total_amount` double DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`pici_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `pingan_order_statistics_id_info`
--

DROP TABLE IF EXISTS `pingan_order_statistics_id_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `pingan_order_statistics_id_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `statistics_id` varchar(100) DEFAULT NULL,
  `statistics_id_amount` varchar(100) DEFAULT NULL,
  `claim_settlement_method` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `pingan_order_notice_invoice_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `product_channel`
--

DROP TABLE IF EXISTS `product_channel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_channel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `contract_enterprise_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `product_channel_ibfk_1` (`product_id`),
  CONSTRAINT `product_channel_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `product_sino` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `product_member`
--

DROP TABLE IF EXISTS `product_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(60) DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `car_brand` varchar(20) DEFAULT NULL,
  `car_type` varchar(20) DEFAULT NULL,
  `license` varchar(20) DEFAULT NULL,
  `frame_code` varchar(20) DEFAULT NULL,
  `identity` varchar(20) DEFAULT NULL,
  `policy_code` varchar(20) DEFAULT NULL,
  `package_id` int(11) DEFAULT NULL,
  `buy_time` datetime DEFAULT NULL,
  `product_channel_id` int(11) DEFAULT NULL,
  `aduit_time` datetime DEFAULT NULL,
  `aduit_state` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `pay_state` int(11) DEFAULT '0' COMMENT '未付款',
  PRIMARY KEY (`id`),
  KEY `product_member_ibfk_2` (`package_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `product_package`
--

DROP TABLE IF EXISTS `product_package`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_package` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `package_id` int(11) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `product_package_ibfk_1` (`product_id`),
  KEY `product_package_ibfk_2` (`package_id`),
  CONSTRAINT `product_package_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `product_sino` (`id`) ON DELETE CASCADE,
  CONSTRAINT `product_package_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `package_sino` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `product_sino`
--

DROP TABLE IF EXISTS `product_sino`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_sino` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pro_name` varchar(60) DEFAULT NULL,
  `pro_type` int(11) DEFAULT NULL,
  `pro_descr` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `read_record`
--

DROP TABLE IF EXISTS `read_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `read_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `supplier_training_materials_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `user_name` varchar(20) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `driver_name` varchar(20) DEFAULT NULL,
  `type` int(1) DEFAULT NULL COMMENT '类型，1浏览 2确认阅读',
  `source` varchar(20) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_training_materials_id` (`supplier_training_materials_id`) USING BTREE,
  KEY `idx_user_id` (`user_id`) USING BTREE,
  KEY `idx_driver_id` (`driver_id`) USING BTREE,
  KEY `idx_type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `return_order_publish`
--

DROP TABLE IF EXISTS `return_order_publish`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `return_order_publish` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `publish_supplier_id` int(11) NOT NULL COMMENT '发布供应商id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '关联订单id',
  `user_order_code` varchar(30) DEFAULT NULL COMMENT '关联订单code',
  `status` tinyint(4) DEFAULT NULL COMMENT '0 待接单 20 已接单 30 完成 40 取消 ',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `publish_amount` decimal(16,4) DEFAULT NULL COMMENT '发布价格',
  `publish_mileage` decimal(16,4) DEFAULT NULL COMMENT '发布公里数',
  `accept_time` datetime DEFAULT NULL COMMENT '接单时间',
  `accept_user` varchar(60) DEFAULT NULL COMMENT '接单人',
  `accept_supplier_id` int(11) DEFAULT NULL COMMENT '接单供应商',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `scheduling`
--

DROP TABLE IF EXISTS `scheduling`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `scheduling` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `period_time` varchar(10) DEFAULT NULL COMMENT '时间段',
  `start_time` time DEFAULT NULL COMMENT '开始时间',
  `end_time` time DEFAULT NULL COMMENT '结束时间',
  `scheduling_length` int(11) DEFAULT NULL COMMENT '时长',
  `scheduling_flag` varchar(20) DEFAULT NULL COMMENT '标记',
  `workplace` int(10) DEFAULT NULL COMMENT '职场',
  `scheduling_date` date DEFAULT NULL COMMENT '日期',
  `employees_working` varchar(30) DEFAULT NULL COMMENT '员工工号',
  `employees_group_id` int(11) DEFAULT NULL COMMENT '员工分组',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人id',
  `create_user_name` varchar(30) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user_id` int(11) DEFAULT NULL COMMENT '更新人id',
  `update_user_name` varchar(30) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `seat_scheduling`
--

DROP TABLE IF EXISTS `seat_scheduling`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `seat_scheduling` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `period_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '时间段',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `scheduling_length` double(3,1) DEFAULT NULL COMMENT '时长',
  `scheduling_flag` varchar(20) DEFAULT NULL COMMENT '标记',
  `workplace` int(11) DEFAULT NULL COMMENT '职场',
  `scheduling_date` date DEFAULT NULL COMMENT '日期',
  `employees_working` varchar(30) DEFAULT NULL COMMENT '员工工号',
  `employees_group_id` int(11) DEFAULT NULL COMMENT '员工分组',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人id',
  `create_user_name` varchar(30) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user_id` int(11) DEFAULT NULL COMMENT '更新人id',
  `update_user_name` varchar(30) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7949 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `seat_statistics`
--

DROP TABLE IF EXISTS `seat_statistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `seat_statistics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `operator_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '坐席名字',
  `create_all` int(11) DEFAULT NULL COMMENT '开案总数',
  `create_success` int(11) DEFAULT NULL COMMENT '创建成功数量',
  `create_fail` int(11) DEFAULT NULL COMMENT '创建失败数量',
  `supplement` int(11) DEFAULT NULL COMMENT '补充案件数量',
  `supplement_trail` int(11) DEFAULT NULL COMMENT '补充-拖车 数量',
  `supplement_on_site` int(11) DEFAULT NULL COMMENT '补充-现场 数量',
  `dispatch_all` int(11) DEFAULT NULL COMMENT '派工总数',
  `dispatch_success` int(11) DEFAULT NULL COMMENT '调度成功数量',
  `dispatch_fail` int(11) DEFAULT NULL COMMENT '调度失败数量',
  `modify` int(11) DEFAULT NULL COMMENT '修改案件数量',
  `appraise` int(11) DEFAULT NULL COMMENT '评价案件数量',
  `consult` int(11) DEFAULT NULL COMMENT '咨询服务数量',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `call_in` int(11) DEFAULT NULL COMMENT '处理呼入 数量',
  `call_out` int(11) DEFAULT NULL COMMENT '呼出数量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `seating_group`
--

DROP TABLE IF EXISTS `seating_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `seating_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '名称',
  `supplier_id` int(11) DEFAULT '0' COMMENT '供应商id',
  `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
  `delete_flag` int(11) DEFAULT '0' COMMENT '是否删除',
  `type` int(11) DEFAULT '0' COMMENT '类型',
  `cc_id` int(11) DEFAULT NULL COMMENT '呼叫中心id',
  `parent_cc_id` int(11) DEFAULT NULL COMMENT 'parentId',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=253 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `seating_group_middle`
--

DROP TABLE IF EXISTS `seating_group_middle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `seating_group_middle` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) DEFAULT '0' COMMENT '坐席组id',
  `user_id` int(11) DEFAULT '0' COMMENT '坐席id',
  `user_login_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '坐席登录名',
  `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '坐席名称',
  `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=719 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `service_for_man`
--

DROP TABLE IF EXISTS `service_for_man`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `service_for_man` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `code` varchar(255) DEFAULT NULL COMMENT '订单编号',
  `license` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `user_phone` varchar(255) DEFAULT NULL COMMENT '车主电话',
  `user_name` varchar(255) DEFAULT NULL COMMENT '车主姓名',
  `contract_id` int(11) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `homeAddress` varchar(255) DEFAULT NULL,
  `is_city` int(11) DEFAULT NULL COMMENT '是否同城',
  `distance` decimal(11,3) DEFAULT NULL COMMENT '两地距离',
  `people_number` int(11) DEFAULT NULL COMMENT '报销人数',
  `is_taxi` int(11) DEFAULT NULL COMMENT '出租车服务',
  `taxi_fee` int(11) DEFAULT NULL COMMENT '出租车金额',
  `is_take_car` int(11) DEFAULT NULL COMMENT '是否自提车',
  `take_car_fee` int(11) DEFAULT NULL COMMENT '自提车金额',
  `service` varchar(225) DEFAULT NULL COMMENT '服务项目',
  `service_fee` int(11) DEFAULT NULL COMMENT '服务项目金额',
  `finish_time` datetime DEFAULT NULL COMMENT '维修时间',
  `repaired_time` datetime DEFAULT NULL COMMENT '修复时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `days` int(11) DEFAULT NULL,
  `is_commit` int(11) DEFAULT NULL,
  `create_user_name` varchar(255) DEFAULT NULL,
  `repaired_code` varchar(255) DEFAULT NULL,
  `repaired_day` int(11) DEFAULT NULL,
  `is_maintain` int(11) DEFAULT NULL COMMENT '是否已完成维修',
  `is_travel_qualification` int(11) DEFAULT NULL COMMENT '是否具备出行报销资质',
  `is_travel_power` int(11) DEFAULT NULL COMMENT '是否告知客户符合出行权益',
  PRIMARY KEY (`id`),
  KEY `order_remark_ibk1` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `service_for_man_detail`
--

DROP TABLE IF EXISTS `service_for_man_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `service_for_man_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `service` varchar(255) DEFAULT NULL,
  `service_fee` decimal(6,2) DEFAULT NULL,
  `days` int(11) DEFAULT NULL,
  `create_user_name` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `service_for_man_detail_ibk1` (`order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=207 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `service_for_man_op`
--

DROP TABLE IF EXISTS `service_for_man_op`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `service_for_man_op` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `op_string` text COMMENT '操作内容',
  `operator_name` varchar(60) DEFAULT NULL COMMENT '操作人',
  `operate_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `remark` text COMMENT '操作备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=494 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `service_for_man_track_record`
--

DROP TABLE IF EXISTS `service_for_man_track_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `service_for_man_track_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `service_for_man_id` int(11) DEFAULT NULL,
  `service_for_man_detail_id` int(11) DEFAULT NULL,
  `track_type` int(11) DEFAULT NULL,
  `track_status` int(11) DEFAULT NULL,
  `track_time` datetime DEFAULT NULL,
  `track_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user_name` varchar(255) DEFAULT NULL,
  `first_deal_user_name` varchar(255) DEFAULT NULL,
  `first_deal_time` datetime DEFAULT NULL,
  `deal_user_name` varchar(255) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `deal_result` varchar(255) DEFAULT NULL,
  `enjoy_benefits_end_result` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `share_vehicle_order`
--

DROP TABLE IF EXISTS `share_vehicle_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `share_vehicle_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `weixin_user_id` int(11) DEFAULT NULL COMMENT '微信用户id',
  `license` varchar(10) DEFAULT NULL COMMENT '车牌',
  `get_on_time` datetime DEFAULT NULL COMMENT '上车时间',
  `get_on_location` varchar(200) DEFAULT NULL COMMENT '上车地点',
  `get_on_lon` decimal(16,12) DEFAULT NULL COMMENT '上车经度',
  `get_on_lat` decimal(16,12) DEFAULT NULL COMMENT '上车纬度',
  `get_on_area_code` varchar(40) DEFAULT NULL COMMENT '上车位置区域编码',
  `get_down_time` datetime DEFAULT NULL COMMENT '下车时间',
  `get_down_location` varchar(200) DEFAULT NULL COMMENT '下车地点',
  `get_down_lon` decimal(16,12) DEFAULT NULL COMMENT '下车经度',
  `get_down_lat` decimal(16,12) DEFAULT NULL COMMENT '下车纬度',
  `get_down_area_code` varchar(40) DEFAULT NULL COMMENT '下车区域编码',
  `contracting_code` varchar(20) DEFAULT NULL COMMENT '合同编码',
  `bike_state` int(11) DEFAULT NULL COMMENT '车好坏',
  `state` int(11) DEFAULT NULL COMMENT '上下车',
  `brand` varchar(20) DEFAULT NULL COMMENT '单车品牌',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `subsidiary_order_batch`
--

DROP TABLE IF EXISTS `subsidiary_order_batch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `subsidiary_order_batch` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `batch_code` varchar(20) NOT NULL COMMENT '批次编号',
  `order_number` int(11) DEFAULT NULL COMMENT '开票数量',
  `invoice_amount` decimal(11,3) DEFAULT NULL COMMENT '开票金额',
  `bridge_amount` decimal(11,3) DEFAULT NULL COMMENT '路桥费总额',
  `invoice_status` int(2) DEFAULT NULL COMMENT '状态',
  `remark` varchar(50) DEFAULT NULL COMMENT '批次备注',
  `contract_id` int(11) DEFAULT NULL COMMENT '开票合同',
  `organize_name` varchar(50) DEFAULT NULL COMMENT '开票机构',
  `start_time` datetime DEFAULT NULL COMMENT '开票开始时间',
  `over_time` datetime DEFAULT NULL COMMENT '开票结束时间',
  `invoice_number` varchar(20) DEFAULT NULL COMMENT '发票号码',
  `invoice_time` datetime DEFAULT NULL COMMENT '发票时间',
  `pay_money` decimal(11,2) DEFAULT NULL COMMENT '收款金额',
  `pay_time` datetime DEFAULT NULL COMMENT '收款时间',
  `pay_user` varchar(20) DEFAULT NULL COMMENT '收款人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(50) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `subsidiary_order_info`
--

DROP TABLE IF EXISTS `subsidiary_order_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `subsidiary_order_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) NOT NULL COMMENT '订单id',
  `driver1` varchar(20) DEFAULT NULL COMMENT '驾驶员1',
  `driver2` varchar(20) DEFAULT NULL COMMENT '驾驶员2',
  `auxiliary1` varchar(20) DEFAULT NULL COMMENT '辅助工1',
  `auxiliary2` varchar(20) DEFAULT NULL COMMENT '辅助工2',
  `auxiliary_fee` decimal(11,3) DEFAULT NULL COMMENT '辅助费',
  `price1` decimal(11,3) DEFAULT NULL COMMENT '金额1',
  `price2` decimal(11,3) DEFAULT NULL COMMENT '金额2',
  `price3` decimal(11,3) DEFAULT NULL COMMENT '金额3',
  `price4` decimal(11,3) DEFAULT NULL COMMENT '金额4',
  `days` int(6) DEFAULT NULL COMMENT '出省天数',
  `bridge_amount1` decimal(11,2) DEFAULT NULL COMMENT '路桥费1',
  `bridge_amount2` decimal(11,2) DEFAULT NULL COMMENT '路桥费2',
  `dilemma_amount` decimal(11,2) DEFAULT NULL COMMENT '困境费',
  `tyre_amount` decimal(11,2) DEFAULT NULL COMMENT '辅助轮费',
  `basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费',
  `cash_amount` decimal(11,2) DEFAULT '0.00' COMMENT '现金金额',
  `ticket_amount` decimal(11,2) DEFAULT '0.00' COMMENT '票证金额',
  `uncollected_amount` decimal(11,2) DEFAULT '0.00' COMMENT '未收金额',
  `mileage_bc` decimal(11,2) DEFAULT '0.00' COMMENT 'bc公里数',
  `total_amount` decimal(11,2) DEFAULT '0.00' COMMENT '总金额',
  `settle_type` int(2) DEFAULT NULL COMMENT '结算方式(现金，月结，票证)',
  `business_content` varchar(50) DEFAULT NULL COMMENT '业务内容',
  `enter_remark` varchar(255) DEFAULT NULL COMMENT '录单备注',
  `account_remark` varchar(255) DEFAULT NULL COMMENT '对账备注',
  `enter_time` datetime DEFAULT NULL COMMENT '输单日期',
  `account_amount` decimal(11,2) DEFAULT NULL COMMENT '对账金额',
  `account_time` datetime DEFAULT NULL COMMENT '对账时间',
  `batch_code` varchar(30) DEFAULT NULL COMMENT '开票批次编号',
  `account_status` int(2) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_order_id` (`order_id`) USING BTREE,
  KEY `idx_batch_code` (`batch_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier`
--

DROP TABLE IF EXISTS `supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `alias` varchar(50) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL,
  `phone_login_name` varchar(255) DEFAULT NULL,
  `linkman` varchar(50) DEFAULT NULL,
  `phone1` varchar(30) DEFAULT NULL,
  `phone2` varchar(30) DEFAULT NULL,
  `phone3` varchar(30) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `address_lon` decimal(16,8) DEFAULT NULL,
  `address_lat` decimal(16,8) DEFAULT NULL,
  `scheduling_model` int(11) DEFAULT NULL,
  `proprietary` int(11) DEFAULT NULL COMMENT '1自营，0非自营',
  `email` varchar(225) DEFAULT NULL,
  `remark` varchar(1000) DEFAULT NULL,
  `account_checking` int(11) DEFAULT NULL COMMENT '对账方式 1.系统  2人工',
  `states` int(11) DEFAULT '0' COMMENT '是否启用 0 启用 1 停止',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `delete_flag` int(11) NOT NULL DEFAULT '0',
  `supplier_role_id` int(11) DEFAULT NULL COMMENT '供应商权限',
  `vehicle_resources` int(11) DEFAULT NULL,
  `reconciliation_email` varchar(255) DEFAULT NULL,
  `reconciliation_telephone` varchar(255) DEFAULT NULL,
  `app_group_id` int(11) DEFAULT NULL,
  `settlement_type` int(11) DEFAULT NULL,
  `linkman_phone_job_description` varchar(255) DEFAULT NULL,
  `trundle_price` decimal(11,2) DEFAULT NULL COMMENT '小轮单价',
  `emergency_phone1` varchar(30) DEFAULT NULL,
  `emergency_phone2` varchar(30) DEFAULT NULL,
  `emergency_phone3` varchar(30) DEFAULT NULL,
  `update_user_id` int(11) DEFAULT NULL,
  `update_user_name` varchar(255) DEFAULT NULL,
  `app_dispatch_type` int(11) DEFAULT NULL,
  `supplier_authority_id` int(11) DEFAULT NULL,
  `is_polymerization` int(11) DEFAULT '0' COMMENT '是否参加平安聚合\r\n',
  `priority_to_subsidiary` int(11) DEFAULT NULL COMMENT '平安聚合到的案子是否优先派给子公司:1,0',
  `is_back_single` int(11) DEFAULT '0' COMMENT '是否背单',
  `area_code` int(11) DEFAULT NULL,
  `is_sino_polymerization` int(11) DEFAULT NULL COMMENT '是否中道聚合',
  `skill_level` int(11) DEFAULT NULL COMMENT '技能等级 高 1 中2 低3',
  `minor_repair_polymerization_standard` int(11) DEFAULT NULL COMMENT '中道小修空车标准',
  `trail_car_polymerization_standard` int(11) DEFAULT NULL COMMENT '中道拖车空车标准',
  `order_set` int(11) DEFAULT NULL,
  `is_pingan_electricity` int(11) DEFAULT NULL,
  `is_daijia` int(11) DEFAULT NULL COMMENT ' 1 代驾',
  `supplier_tag` varchar(100) DEFAULT NULL COMMENT '标签',
  `is_return_car` int(11) DEFAULT NULL COMMENT '是否回程车',
  `ordinary_driving_commission` decimal(11,2) DEFAULT NULL COMMENT '普通代驾抽佣比例',
  `driver_report_commission` decimal(11,2) DEFAULT NULL COMMENT '司机报单抽佣',
  `wechat_report_commission` decimal(11,2) DEFAULT NULL COMMENT '小程序开案抽佣比例',
  `is_sino_repair_polymerization` int(11) DEFAULT NULL COMMENT '是否参与中道小修聚和',
  `is_sino_trail_polymerization` int(11) DEFAULT NULL COMMENT '是否参与中道拖车聚合',
  `is_pingan_repair_polymerization` int(11) DEFAULT NULL,
  `is_pingan_trail_polymerization` int(11) DEFAULT NULL,
  `pingan_repair_polymerization_standard` int(11) DEFAULT NULL COMMENT '平安小修空车标准',
  `pingan_trail_polymerization_standard` int(11) DEFAULT NULL COMMENT '平安拖车空车标准',
  `supplier_proprietary_type` int(11) DEFAULT NULL COMMENT '服务商类型 2:核心,3:主力,4:普通,5:现金,7:4s店,8:虚拟,9:经销商',
  `repair_insurance` decimal(11,2) DEFAULT NULL COMMENT '小修案件保险费',
  `driver_insurance` decimal(11,2) DEFAULT NULL COMMENT '代驾案件保险费',
  `auth_to_zd` int(1) DEFAULT NULL COMMENT '是否授权中道处理案件',
  PRIMARY KEY (`id`),
  KEY `supplier_ibk1` (`parent_id`),
  KEY `supplier_ibk2` (`id`),
  KEY `supplier_role_authority_id` (`supplier_role_id`),
  KEY `supplier_ibk3` (`scheduling_model`)
) ENGINE=InnoDB AUTO_INCREMENT=1000024 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_account_batch`
--

DROP TABLE IF EXISTS `supplier_account_batch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_account_batch` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `batch_code` varchar(255) DEFAULT NULL COMMENT '批次号',
  `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  `pay_money` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '付款金额',
  `total_money` double(11,2) DEFAULT NULL COMMENT '批次总金额',
  `invoice_money` double(11,2) DEFAULT NULL COMMENT '开票总金额',
  `status` int(11) DEFAULT NULL COMMENT '开票状态(1:通知开票，2：已收到发票，3：已打款)',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `order_num` int(11) DEFAULT NULL COMMENT '工单数量',
  `create_user` varchar(255) DEFAULT NULL COMMENT '创建人',
  `update_user` varbinary(255) DEFAULT NULL COMMENT '修改人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `delete_flag` int(11) DEFAULT NULL COMMENT '是否删除',
  `start_time` datetime DEFAULT NULL COMMENT '开票开始日期',
  `over_time` datetime DEFAULT NULL COMMENT '开票结束日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `pay_time` datetime DEFAULT NULL COMMENT '支付时间',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_account_batch_detail`
--

DROP TABLE IF EXISTS `supplier_account_batch_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_account_batch_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(20) NOT NULL,
  `invoice_money` double(11,2) DEFAULT NULL,
  `tax_rate` decimal(11,2) DEFAULT NULL COMMENT '税率',
  `tax_amount` decimal(11,2) DEFAULT NULL COMMENT '税额',
  `after_tax_amount` decimal(11,2) DEFAULT NULL COMMENT '税后金额',
  `courier_number` varchar(20) DEFAULT NULL COMMENT '快递单号',
  `line_number` varchar(20) DEFAULT NULL COMMENT '行号',
  `invoice_batch_id` int(11) NOT NULL,
  `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `file_name` varchar(80) DEFAULT NULL,
  `create_user` varchar(20) NOT NULL,
  `update_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `remark` varchar(500) DEFAULT NULL,
  `bank` varchar(30) DEFAULT NULL,
  `identification_number` varchar(30) DEFAULT NULL,
  `bank_name` varchar(30) DEFAULT NULL,
  `bank_num` varchar(30) DEFAULT NULL,
  `account_name` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_invoice_batch_id` (`invoice_batch_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_account_record`
--

DROP TABLE IF EXISTS `supplier_account_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_account_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `task_order_cost_his_id` int(11) DEFAULT NULL COMMENT '结算单id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `supplier_settle_mileage_ab` double(11,3) DEFAULT NULL COMMENT '供应商ab结算距离',
  `supplier_settle_mileage_bc` double(11,3) DEFAULT NULL COMMENT '供应商bc结算距离',
  `supplier_settle_mileage_ca` double(11,3) DEFAULT NULL COMMENT '供应商ca结算距离',
  `supplier_other_amount` double(11,2) DEFAULT NULL COMMENT '其他费(供应商）',
  `supplier_bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT 'ab段路桥费（供应商）',
  `supplier_bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT 'bc段路桥费（供应商）',
  `supplier_bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT 'ca段路桥费（供应商）',
  `supplier_dilemma_amount` double(11,2) DEFAULT NULL COMMENT '困境费（供应商）',
  `supplier_tyre_amount` double(11,2) DEFAULT NULL COMMENT '小轮费（供应商）',
  `supplier_wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费（供应商）',
  `supplier_settle_amount` double(11,2) DEFAULT NULL COMMENT '供应商结算金额',
  `supplier_other_amount_remark` varchar(255) DEFAULT NULL COMMENT '其他费用说明（供应商）',
  `supplier_customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额（供应商）',
  `supplier_customer_amount_remark` varchar(255) DEFAULT NULL COMMENT '收取客户说明（供应商）',
  `dilemma_amount` double(11,2) DEFAULT NULL COMMENT '困境费',
  `tyre_amount` double(11,2) DEFAULT NULL COMMENT '小轮费',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT 'ab段路桥费',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT 'bc段路桥费',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT 'ca段路桥费',
  `supplier_remark` varchar(255) DEFAULT NULL COMMENT '供应商描述',
  `settle_mileage_ab` double(11,3) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,3) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,3) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '结算金额',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费用',
  `other_amount_remark` varchar(255) DEFAULT NULL COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` varchar(255) DEFAULT NULL COMMENT '收取客户金额说明',
  `audit_remark` varchar(255) DEFAULT NULL COMMENT '审核说明',
  `account_status` int(2) DEFAULT NULL COMMENT '对账状态(0:待供应商记账，1：等待审核，2：审核失败3：再次审核，4：审核完成，5：生成批次，等待开票)',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `batch_code` varchar(255) DEFAULT NULL COMMENT '批次号',
  `check_count` int(11) DEFAULT NULL COMMENT '退回次数',
  `audit_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核人',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `supplier_base_price` decimal(11,2) DEFAULT '0.00' COMMENT '供应商基本费用总计',
  `supplier_bridge_amount` decimal(11,2) DEFAULT '0.00' COMMENT '供应商桥路费总计',
  `supplier_extra_price` decimal(11,2) DEFAULT '0.00' COMMENT '供应商额外费用总计',
  `base_price` decimal(11,2) DEFAULT '0.00' COMMENT '基本费用总计',
  `bridge_amount` decimal(11,2) DEFAULT '0.00' COMMENT '桥路费总计',
  `extra_price` decimal(11,2) DEFAULT '0.00' COMMENT '额外费用总计',
  `basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费',
  `supplier_basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费(供应商)',
  `finance_price` decimal(11,2) DEFAULT '0.00' COMMENT '财务金额',
  `first_audit_success_remark` varchar(600) DEFAULT NULL COMMENT '初审通过原因',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(50) DEFAULT NULL COMMENT '修改人',
  `auto_checked` int(1) DEFAULT NULL COMMENT '是否自动审核通过',
  `auto_rollback` int(1) DEFAULT NULL COMMENT '自动退回',
  `is_exception_audit_confirm` int(1) DEFAULT NULL COMMENT '是否为异常通过',
  `is_exception_audit_confirm_remark` varchar(50) DEFAULT NULL COMMENT '异常通过原因',
  `finance_refuse_audit_remark` varchar(50) DEFAULT NULL COMMENT '财务拒审原因',
  `exception_approval_status` int(1) DEFAULT NULL COMMENT '审批状态(异常案件的审批状态)',
  `exception_approval_remark` varchar(255) DEFAULT NULL COMMENT '异常审批说明',
  PRIMARY KEY (`id`),
  UNIQUE KEY `cost_id_index` (`task_order_cost_his_id`) USING BTREE COMMENT '防止一个案件多次推送',
  KEY `idx_batch_code` (`batch_code`) USING BTREE,
  KEY `idx_supplier_account_record_user_order_id` (`user_order_id`) USING BTREE,
  KEY `idx_supplier_account_record_supplier_id` (`supplier_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=212 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_account_record_log`
--

DROP TABLE IF EXISTS `supplier_account_record_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_account_record_log` (
  `id` varchar(50) NOT NULL,
  `task_order_cost_his_id` int(11) DEFAULT NULL COMMENT '结算单id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `supplier_settle_mileage_ab` double(11,3) DEFAULT NULL COMMENT '供应商ab结算距离',
  `supplier_settle_mileage_bc` double(11,3) DEFAULT NULL COMMENT '供应商bc结算距离',
  `supplier_settle_mileage_ca` double(11,3) DEFAULT NULL COMMENT '供应商ca结算距离',
  `supplier_other_amount` double(11,2) DEFAULT NULL COMMENT '其他费(供应商）',
  `supplier_bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT 'ab段路桥费（供应商）',
  `supplier_bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT 'bc段路桥费（供应商）',
  `supplier_bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT 'ca段路桥费（供应商）',
  `supplier_dilemma_amount` double(11,2) DEFAULT NULL COMMENT '困境费（供应商）',
  `supplier_tyre_amount` double(11,2) DEFAULT NULL COMMENT '小轮费（供应商）',
  `supplier_wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费（供应商）',
  `supplier_settle_amount` double(11,2) DEFAULT NULL COMMENT '供应商结算金额',
  `supplier_other_amount_remark` varchar(255) DEFAULT NULL COMMENT '其他费用说明（供应商）',
  `supplier_customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额（供应商）',
  `supplier_customer_amount_remark` varchar(255) DEFAULT NULL COMMENT '收取客户说明（供应商）',
  `dilemma_amount` double(11,2) DEFAULT NULL COMMENT '困境费',
  `tyre_amount` double(11,2) DEFAULT NULL COMMENT '小轮费',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT 'ab段路桥费',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT 'bc段路桥费',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT 'ca段路桥费',
  `supplier_remark` varchar(255) DEFAULT NULL COMMENT '供应商描述',
  `settle_mileage_ab` double(11,3) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,3) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,3) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '结算金额',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费用',
  `other_amount_remark` varchar(255) DEFAULT NULL COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` varchar(255) DEFAULT NULL COMMENT '收取客户金额说明',
  `audit_remark` varchar(255) DEFAULT NULL COMMENT '审核说明',
  `before_account_status` varchar(255) DEFAULT NULL COMMENT '对账前置状态',
  `account_status` int(255) DEFAULT NULL COMMENT '对账状态(0:待供应商记账，1：等待审核，2：审核失败3：再次审核，4：审核完成，5：生成批次，等待开票)',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_user` varchar(50) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(50) DEFAULT NULL COMMENT '更新人',
  `batch_code` varchar(255) DEFAULT NULL COMMENT '批次号',
  `check_count` int(11) DEFAULT NULL COMMENT '退回次数',
  `audit_user` varchar(255) DEFAULT NULL COMMENT '审核人',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `supplier_base_price` decimal(11,2) DEFAULT '0.00' COMMENT '供应商基本费用总计',
  `supplier_bridge_amount` decimal(11,2) DEFAULT '0.00' COMMENT '供应商桥路费总计',
  `supplier_extra_price` decimal(11,2) DEFAULT '0.00' COMMENT '供应商额外费用总计',
  `base_price` decimal(11,2) DEFAULT '0.00' COMMENT '基本费用总计',
  `bridge_amount` decimal(11,2) DEFAULT '0.00' COMMENT '桥路费总计',
  `extra_price` decimal(11,2) DEFAULT '0.00' COMMENT '额外费用总计',
  `basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费',
  `supplier_basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费(供应商)',
  `finance_price` decimal(11,2) DEFAULT '0.00' COMMENT '财务金额',
  `first_audit_success_remark` varchar(600) DEFAULT NULL COMMENT '初审通过原因',
  `auto_rollback` int(1) DEFAULT NULL COMMENT '自动退回',
  `exception_approval_status` int(1) DEFAULT NULL COMMENT '审批状态(异常案件的审批状态)',
  `before_exception_approval_status` int(1) DEFAULT NULL COMMENT '前置审批状态(异常案件的审批状态)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_supplier_account_record_user_order_id` (`user_order_id`) USING BTREE,
  KEY `idx_supplier_account_record_supplier_id` (`supplier_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_app_login`
--

DROP TABLE IF EXISTS `supplier_app_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_app_login` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `device_id` varchar(100) DEFAULT NULL,
  `device_info` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `check_flag` int(11) DEFAULT NULL,
  `regId` varchar(100) DEFAULT NULL COMMENT '极光推送id',
  `active_time` datetime DEFAULT NULL COMMENT '设备活跃时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=153 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_billing_info`
--

DROP TABLE IF EXISTS `supplier_billing_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_billing_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `unit_name` varchar(255) DEFAULT NULL,
  `bank` varchar(255) DEFAULT NULL,
  `account_no` varchar(255) DEFAULT NULL,
  `bank_no` varchar(255) DEFAULT NULL,
  `duty_paragraph` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_contract_specify_service`
--

DROP TABLE IF EXISTS `supplier_contract_specify_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_contract_specify_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `relation_type` int(11) DEFAULT NULL COMMENT '关系类型  1 仅做  0 不做',
  `create_user` varchar(50) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_dispatch`
--

DROP TABLE IF EXISTS `supplier_dispatch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_dispatch` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `area_id` int(11) DEFAULT NULL COMMENT '地区',
  `range_mile` int(11) DEFAULT '0' COMMENT '调度范围',
  `overtime` int(11) DEFAULT '0' COMMENT '超过时间',
  `total_overtime` int(11) DEFAULT '0' COMMENT '超过总时间',
  `fail_counts` int(11) DEFAULT '0' COMMENT '失败次数',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_dispatch_supplier`
--

DROP TABLE IF EXISTS `supplier_dispatch_supplier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_dispatch_supplier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_dispatch_id` int(11) NOT NULL DEFAULT '0',
  `supplier_id` int(11) NOT NULL DEFAULT '0',
  `percent` decimal(10,0) DEFAULT NULL,
  `current_percent` decimal(10,0) DEFAULT NULL,
  `total_count` int(11) DEFAULT NULL,
  `already_count` int(11) DEFAULT NULL,
  `priority` decimal(11,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_dispatch_supplier_ibfk_1` (`supplier_dispatch_id`),
  KEY `supplier_dispatch_supplier_ibfk_2` (`supplier_id`),
  CONSTRAINT `supplier_dispatch_supplier_ibfk_1` FOREIGN KEY (`supplier_dispatch_id`) REFERENCES `supplier_dispatch` (`id`) ON DELETE CASCADE,
  CONSTRAINT `supplier_dispatch_supplier_ibfk_2` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver`
--

DROP TABLE IF EXISTS `supplier_driver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `supplier_vehicle_id` bigint(13) DEFAULT NULL COMMENT '车辆关联id',
  `job_number` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `last_log_time` datetime DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `icon` varchar(255) DEFAULT NULL COMMENT '头像',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `states` int(11) DEFAULT '1' COMMENT ' 1 启用  0 冻结',
  `sex` tinyint(2) DEFAULT NULL COMMENT '性别，1男  0女',
  `native_place` varchar(20) DEFAULT NULL COMMENT '籍贯',
  `identity_card_number` varchar(20) DEFAULT NULL COMMENT '身份证号',
  `identity_card_front` varchar(255) DEFAULT NULL COMMENT '身份证正面',
  `identity_card_contrary` varchar(255) DEFAULT NULL COMMENT '身份证反面',
  `driving_licence_front` varchar(255) DEFAULT NULL COMMENT '驾驶证正面',
  `driving_licence_contrary` varchar(255) DEFAULT NULL COMMENT '驾驶证反面',
  `driving_begin_date` date DEFAULT NULL COMMENT '计算驾龄的开始日期',
  `driving_licence_validity_date` date DEFAULT NULL COMMENT '驾照有效期截至日期',
  `driving_score` tinyint(3) DEFAULT NULL COMMENT '驾驶分数',
  `discipline_score` tinyint(3) DEFAULT '12' COMMENT '纪律分',
  `bank_card` varchar(20) DEFAULT NULL COMMENT '银行卡号',
  `qualification_states` tinyint(2) DEFAULT NULL COMMENT '1申请，2面试，3试用期 4正式 5 不通过',
  `commission_scheme` bigint(11) DEFAULT NULL COMMENT '抽成方案，需要连接抽成方案表的主键',
  `level` tinyint(2) DEFAULT NULL COMMENT '师傅等级',
  `approval_userId` bigint(11) DEFAULT NULL COMMENT '审核人',
  `health_license_image` varchar(255) DEFAULT NULL COMMENT '健康证',
  `driver_age` tinyint(2) DEFAULT NULL COMMENT '驾龄',
  `age` tinyint(2) DEFAULT NULL COMMENT '年龄',
  `range_from` int(11) DEFAULT NULL COMMENT '接单范围  公里',
  `bank_card_code` varchar(50) DEFAULT NULL COMMENT '所有银行/编码',
  `urgent_cellphone` bigint(11) DEFAULT NULL COMMENT '紧急联系人',
  `lssue_date` datetime DEFAULT NULL COMMENT '初次拿证日期',
  `office_position` int(11) DEFAULT NULL COMMENT '职位',
  `address` varchar(255) DEFAULT NULL COMMENT '住址',
  `address_lon` decimal(16,8) DEFAULT NULL,
  `address_lat` decimal(16,8) DEFAULT NULL,
  `driving_model` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '准驾车型',
  `take_car_home` tinyint(4) DEFAULT NULL COMMENT '是否带车回家 0否  1是',
  `entry_date` datetime DEFAULT NULL COMMENT '入职日期',
  `shift` varchar(10) DEFAULT NULL COMMENT '班次',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4959 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_account`
--

DROP TABLE IF EXISTS `supplier_driver_account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_account` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `driver_id` bigint(11) NOT NULL COMMENT '司机id',
  `balance_amount` decimal(13,2) NOT NULL DEFAULT '0.00' COMMENT '剩余金额',
  `total_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '总金额',
  `extract_amount` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '已提现金额',
  `approve_amount` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '审批中金额',
  `version` bigint(12) NOT NULL DEFAULT '0' COMMENT '版本号',
  `process_amount` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '体现中金额',
  `status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '冻结0/正常1    ',
  `freeze_amount` decimal(16,4) DEFAULT NULL COMMENT '冻结金额',
  `delete_flag` tinyint(2) DEFAULT NULL COMMENT '0. 删除，1.可用',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_driver` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_account_approval_data`
--

DROP TABLE IF EXISTS `supplier_driver_account_approval_data`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_account_approval_data` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `order_id` bigint(11) DEFAULT NULL COMMENT '司机id',
  `order_no` varchar(50) DEFAULT NULL COMMENT '订单号',
  `driver_id` bigint(11) DEFAULT NULL COMMENT '司机id',
  `approval_price` decimal(10,2) DEFAULT NULL COMMENT '审核金额',
  `status` tinyint(2) DEFAULT NULL COMMENT '0待审批',
  `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`),
  KEY `driver_id` (`driver_id`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_account_extract`
--

DROP TABLE IF EXISTS `supplier_driver_account_extract`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_account_extract` (
  `id` bigint(13) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `driver_id` bigint(13) DEFAULT '0' COMMENT '师傅id',
  `water_no` varchar(50) DEFAULT NULL COMMENT '流水',
  `extract_amount` decimal(16,2) DEFAULT '0.00' COMMENT '提现金额',
  `status` tinyint(3) DEFAULT '0' COMMENT '0申请中  1已打款   2失败',
  `back_card_id` bigint(13) DEFAULT NULL COMMENT '银行卡id',
  `version` bigint(12) DEFAULT '1' COMMENT '版本',
  `apply_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
  `approval_userid` bigint(13) DEFAULT NULL COMMENT '审批人id',
  `fail_remarks` varchar(255) DEFAULT NULL COMMENT '失败原因',
  `settlement_user` bigint(12) DEFAULT NULL COMMENT '打款人',
  `settlement_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '打款时间',
  `type` tinyint(2) DEFAULT '0' COMMENT '0普通提现 1离职提现',
  `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `operate_name` varchar(50) DEFAULT NULL COMMENT '操作人',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_driver_id` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_account_flowing_water`
--

DROP TABLE IF EXISTS `supplier_driver_account_flowing_water`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_account_flowing_water` (
  `id` bigint(13) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `water_no` varchar(50) DEFAULT NULL COMMENT '流水编号',
  `driver_id` bigint(13) DEFAULT NULL COMMENT '司机id',
  `money` decimal(16,2) DEFAULT NULL COMMENT '入账金额',
  `max_money` decimal(16,2) DEFAULT NULL COMMENT '钱包金额',
  `order_no` varchar(50) DEFAULT NULL COMMENT '订单号',
  `contract_id` bigint(13) DEFAULT NULL COMMENT '合同id',
  `type` int(5) DEFAULT NULL COMMENT '1000 订单收入  1001  加价   1002 现金抽佣 2000 充值 3000 提现申请 3001 提现成功 3002 提现失败 4000奖励 5000 惩罚 6000 其他',
  `remarks` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `order_id` bigint(20) DEFAULT NULL COMMENT '订单id',
  `operate_name` varchar(50) DEFAULT NULL COMMENT '操作人',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `order_id` (`order_id`),
  KEY `contract_id` (`contract_id`),
  KEY `driver_id` (`driver_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1658 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_apply_for_qualification`
--

DROP TABLE IF EXISTS `supplier_driver_apply_for_qualification`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_apply_for_qualification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_driver_id` int(11) DEFAULT NULL COMMENT '申请资质的司机的id',
  `qualification_type` int(11) DEFAULT NULL COMMENT '1申请，2面试，3试用期 4正式 5 不通过',
  `create_date` datetime DEFAULT NULL COMMENT '申请创建时间',
  `response_date` datetime DEFAULT NULL COMMENT '处理时间',
  `interview_time` datetime DEFAULT NULL COMMENT '面试时间',
  `remark` varchar(255) DEFAULT NULL COMMENT '处理备注',
  `executor` varchar(11) DEFAULT NULL COMMENT '处理人的id（当前登录人）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=141 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_bank_card`
--

DROP TABLE IF EXISTS `supplier_driver_bank_card`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_bank_card` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `driver_id` bigint(20) NOT NULL,
  `back_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '银行编码',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行名称',
  `english_name` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '英文名称',
  `delete_flag` tinyint(2) NOT NULL COMMENT '删除标识',
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `card_no` bigint(22) DEFAULT NULL COMMENT '银行卡号',
  `account_name` varchar(50) DEFAULT NULL COMMENT '账户名',
  PRIMARY KEY (`id`),
  KEY `idx_driver_id` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_discipline_score_log`
--

DROP TABLE IF EXISTS `supplier_driver_discipline_score_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_discipline_score_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_driver_id` int(11) DEFAULT NULL COMMENT '被扣分的司机的id',
  `deduct_score` int(11) DEFAULT NULL COMMENT '扣除分数',
  `remark` varchar(255) DEFAULT NULL COMMENT '扣分原因备注',
  `create_time` datetime DEFAULT NULL COMMENT '记录时间',
  `creater` int(11) DEFAULT NULL COMMENT '记录人的id，当前登录的人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_leave_office`
--

DROP TABLE IF EXISTS `supplier_driver_leave_office`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_leave_office` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `driver_id` int(13) DEFAULT NULL COMMENT '司机',
  `remarks` varchar(255) DEFAULT NULL COMMENT '离职原因',
  `apply_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '申请时间',
  `approval_user_id` bigint(13) DEFAULT NULL COMMENT '审批人',
  `status` tinyint(2) DEFAULT NULL COMMENT '0审批中   1已批准',
  `approval_date` timestamp NULL DEFAULT NULL COMMENT '审批时间',
  `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `failure_remarks` varchar(255) DEFAULT NULL COMMENT '失败原因',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_message`
--

DROP TABLE IF EXISTS `supplier_driver_message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标题',
  `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '消息内容',
  `type` int(11) DEFAULT NULL COMMENT '消息类型',
  `status` int(11) DEFAULT NULL COMMENT '1 已读 2 未读',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_off_work`
--

DROP TABLE IF EXISTS `supplier_driver_off_work`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_off_work` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
  `deal_user` varchar(60) DEFAULT NULL COMMENT '处理人',
  `off_work_state` int(2) DEFAULT NULL COMMENT '1 发起 2 同意 3 拒绝 4 撤销',
  `off_work_reason` varchar(150) DEFAULT NULL COMMENT '请假原因',
  `off_work_type` int(2) DEFAULT NULL COMMENT '请假分类',
  `revoke_user` varchar(60) DEFAULT NULL COMMENT '撤销人',
  `revoke_time` datetime DEFAULT NULL COMMENT '撤销时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_driver_roster`
--

DROP TABLE IF EXISTS `supplier_driver_roster`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_driver_roster` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `vehicle_id` int(11) DEFAULT NULL COMMENT '车辆id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `roster_time` date DEFAULT NULL COMMENT '排班时间',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结算时间',
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_user` varchar(60) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(60) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=212 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_empty_kilometers`
--

DROP TABLE IF EXISTS `supplier_empty_kilometers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_empty_kilometers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `time` date DEFAULT NULL COMMENT '日期',
  `car_number` varchar(60) DEFAULT NULL COMMENT '车号',
  `factory_kilometers` int(11) DEFAULT NULL COMMENT '出厂公里数',
  `return_factory_kilometers` int(11) DEFAULT NULL COMMENT '返厂公里数',
  `drive_kilometers` int(11) DEFAULT NULL COMMENT '行驶公里数',
  `actual_kilometers` int(11) DEFAULT NULL COMMENT '实际公里数',
  `ldling_kilometers` int(11) DEFAULT NULL COMMENT '空驶公里数',
  `ldling_rate` decimal(10,2) DEFAULT NULL COMMENT '空驶率',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `create_user` varchar(60) DEFAULT NULL,
  `update_user` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_exclusive_contract`
--

DROP TABLE IF EXISTS `supplier_exclusive_contract`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_exclusive_contract` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_exclusive_contract_ibk1` (`supplier_id`),
  CONSTRAINT `supplier_exclusive_contract_ibk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=99526 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_file`
--

DROP TABLE IF EXISTS `supplier_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `file_name` varchar(255) DEFAULT NULL,
  `file_url` varchar(255) DEFAULT NULL,
  `file_size` int(11) DEFAULT NULL,
  `file_type` int(2) DEFAULT NULL COMMENT '文件类型',
  `delete_flag` int(2) DEFAULT NULL COMMENT '是否作废',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_file_ibk1` (`supplier_id`),
  CONSTRAINT `supplier_file_ibk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_kpi`
--

DROP TABLE IF EXISTS `supplier_kpi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_kpi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `month_date` varchar(15) DEFAULT NULL COMMENT '月份',
  `province` varchar(50) DEFAULT NULL COMMENT '省份',
  `city` varchar(50) DEFAULT NULL,
  `area` varchar(50) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `region_class` varchar(50) DEFAULT NULL COMMENT '大区分类',
  `region_manager` varchar(50) DEFAULT NULL COMMENT '大区经理',
  `area_manager` varchar(50) DEFAULT NULL COMMENT '区域经理',
  `supplier_nature` varchar(50) DEFAULT NULL COMMENT '服务商性质',
  `finish_count` int(11) DEFAULT NULL COMMENT '完成案件量',
  `accept_count` int(11) DEFAULT NULL COMMENT '接单量',
  `refuse_count` int(11) DEFAULT NULL COMMENT '拒单量',
  `refuse_rate` decimal(10,2) DEFAULT NULL COMMENT '拒单率',
  `refuse_rate_contribution` decimal(10,2) DEFAULT NULL COMMENT '拒单率贡献度',
  `complain_count` int(11) DEFAULT NULL COMMENT '投诉量',
  `complain_rate` decimal(10,2) DEFAULT NULL COMMENT '投诉率',
  `car_damage_count` int(11) DEFAULT NULL COMMENT '车损量',
  `car_damage_rate` decimal(10,2) DEFAULT NULL COMMENT '车损率',
  `cta` varchar(20) DEFAULT NULL COMMENT '到达时效(单位秒)',
  `arrive_rate` decimal(10,2) DEFAULT NULL COMMENT '40分钟到达率',
  `city_arrive_rate` decimal(10,2) DEFAULT NULL COMMENT '城区40分钟到达率',
  `accept_rate` decimal(10,2) DEFAULT NULL COMMENT '3分钟师傅接单率',
  `ab_average_mile` decimal(10,2) DEFAULT NULL COMMENT 'A-B平均公里数',
  `app_use_rate` decimal(10,2) DEFAULT NULL COMMENT 'APP使用率',
  `app_contact_rate` decimal(10,2) DEFAULT NULL COMMENT 'APP师傅5分钟联络率',
  `app_accuracy_rate` decimal(10,2) DEFAULT NULL COMMENT '已使用APP准确率',
  `favorable_rate` decimal(10,2) DEFAULT NULL COMMENT '好评率',
  `road_repair_success_rate` decimal(10,2) DEFAULT NULL COMMENT '路修成功率',
  `taibao_urged_rate` decimal(10,2) DEFAULT NULL COMMENT '太保催促率',
  `active_vehicles` int(11) DEFAULT NULL COMMENT '活跃车辆数',
  `polymerization_success_rate` decimal(10,2) DEFAULT NULL COMMENT '聚合成功率',
  `full_trailer_rate` decimal(10,2) DEFAULT NULL COMMENT '全程拖车案件比例',
  `supplier_score` decimal(10,2) DEFAULT NULL COMMENT '得分',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15707 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_kpi_city`
--

DROP TABLE IF EXISTS `supplier_kpi_city`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_kpi_city` (
  `id` int(11) NOT NULL DEFAULT '0',
  `province` varchar(50) DEFAULT NULL COMMENT '省份',
  `month_date` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '月份',
  `city` varchar(50) DEFAULT NULL,
  `region_class` varchar(50) DEFAULT NULL COMMENT '大区分类',
  `region_manager` varchar(50) DEFAULT NULL COMMENT '大区经理',
  `area_manager` varchar(50) DEFAULT NULL COMMENT '区域经理',
  `total_count` int(11) DEFAULT NULL COMMENT '总案件量',
  `finish_count` int(11) DEFAULT NULL COMMENT '完成案件量',
  `giveup_count` int(11) DEFAULT NULL COMMENT '放弃案件量',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `cancel_rate` decimal(10,2) DEFAULT NULL COMMENT '拒单率',
  `no_dealer_count` int(11) DEFAULT NULL COMMENT '非经销商案件量',
  `supplier_finish_count` int(11) DEFAULT NULL COMMENT '供应商完成案件',
  `self_solve_count` int(11) DEFAULT NULL COMMENT '自解案件量',
  `self_solve_rate` decimal(11,0) DEFAULT NULL COMMENT '自解率',
  `urgent_count` int(11) DEFAULT NULL COMMENT '紧急派遣案件',
  `urgent_rate` decimal(11,0) DEFAULT NULL COMMENT '紧急派遣率',
  `self_solve_hight_low` varchar(60) DEFAULT NULL COMMENT '自解高低',
  `urgent_hight_low` varchar(60) DEFAULT NULL COMMENT '紧急派遣率高低',
  `cta_prescription` varchar(60) DEFAULT NULL COMMENT 'CAT时效',
  `emergency_dispatch` int(11) DEFAULT NULL COMMENT '紧急派遣成功量',
  `emergency_dispatch_success_rate` int(11) DEFAULT NULL COMMENT '紧急派遣成功率',
  `amount_of_dispatch` int(11) DEFAULT NULL COMMENT '一次派遣量',
  `amount_of_dispatch_rate` decimal(10,2) DEFAULT NULL COMMENT '一次派遣成功率',
  `accept_count` int(11) DEFAULT NULL COMMENT '接单量',
  `rejected_count` int(255) DEFAULT NULL COMMENT '拒单量',
  `rejected_rate` decimal(10,2) DEFAULT NULL COMMENT '拒单率',
  `rejected_contribution` decimal(10,2) DEFAULT NULL COMMENT '拒单贡献度',
  `complain_count` int(11) DEFAULT NULL COMMENT '投诉量',
  `complain_rate` decimal(10,2) DEFAULT NULL COMMENT '投诉率',
  `car_damage_count` int(11) DEFAULT NULL COMMENT '车损量',
  `car_damage_rate` decimal(10,2) DEFAULT NULL COMMENT '车损率',
  `forty_arrival_rate` decimal(10,2) DEFAULT NULL COMMENT '40分钟到达率',
  `master_order_rate` decimal(10,2) DEFAULT NULL COMMENT '3分钟师傅接单率',
  `first_creation` varchar(60) DEFAULT NULL COMMENT '创建后首派时效',
  `first_send` varchar(60) DEFAULT NULL COMMENT '转派时效',
  `delivery_time_limit` varchar(60) DEFAULT NULL COMMENT '派车时效',
  `app_use_rate` decimal(10,2) DEFAULT NULL COMMENT 'APP使用率',
  `master_contact_rate` decimal(60,0) DEFAULT NULL COMMENT '十分钟师傅联络率',
  `app_accurate` decimal(10,2) DEFAULT NULL COMMENT 'APP已使用率',
  `road_repair_success_rate` decimal(10,2) DEFAULT NULL COMMENT '路修成功率',
  `polymerization_success_count` int(11) DEFAULT NULL COMMENT '聚合成功量',
  `polymerization_success_rate` decimal(10,2) DEFAULT NULL COMMENT '聚合成功率',
  `aggregate_success_denominator` int(11) DEFAULT NULL COMMENT '聚合成功分母',
  `trailer_ratio` decimal(11,2) DEFAULT NULL COMMENT '全程拖车案件比例',
  `average_recommend_kilometers` int(11) DEFAULT NULL COMMENT '平均推荐公里数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_linkman`
--

DROP TABLE IF EXISTS `supplier_linkman`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_linkman` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `email` varchar(80) DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `create_user` varchar(80) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_linkman_ibk1` (`supplier_id`),
  CONSTRAINT `supplier_linkman_ibk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_notice`
--

DROP TABLE IF EXISTS `supplier_notice`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_notice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `content` text,
  `supplier_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_online_vehicle_record_2021`
--

DROP TABLE IF EXISTS `supplier_online_vehicle_record_2021`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_online_vehicle_record_2021` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `parent_supplier_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL COMMENT '不用',
  `job_number` varchar(255) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  `lon` varchar(255) DEFAULT NULL,
  `lat` varchar(255) DEFAULT NULL,
  `speed` varchar(20) DEFAULT NULL,
  `direction` varchar(255) DEFAULT NULL,
  `gps_time` datetime DEFAULT NULL,
  `vehicle_login_time` datetime DEFAULT NULL,
  `login_state` int(11) DEFAULT NULL COMMENT '0 下线  1 在线',
  `state` int(11) DEFAULT NULL COMMENT '0:空闲1:忙碌,2:置忙',
  `online_state` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `vehicle_id` (`vehicle_id`) USING BTREE,
  KEY `driver_id` (`driver_id`) USING BTREE,
  KEY `supplier_id` (`supplier_id`),
  KEY `parent_supplier_id` (`parent_supplier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16881 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_order_cut`
--

DROP TABLE IF EXISTS `supplier_order_cut`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_order_cut` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `cut_amount` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扣款金额',
  `cut_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扣款原因',
  `cut_batch` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '扣款批次',
  `supplier_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务商id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
  `deal_user` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '处理人',
  `state` int(11) DEFAULT NULL COMMENT '处理状态 0未处理 1 已经扣除  2 下次待扣除 3已关闭 4撤消',
  `order_complain_id` int(11) DEFAULT NULL COMMENT '投诉案件id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=238 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_pingan_driver`
--

DROP TABLE IF EXISTS `supplier_pingan_driver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_pingan_driver` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `provider_code` varchar(50) NOT NULL,
  `provider_name` varchar(50) DEFAULT NULL,
  `identity_card` varchar(30) NOT NULL,
  `photo_key` varchar(255) DEFAULT NULL,
  `salvation_person_name` varchar(50) NOT NULL,
  `salvationPersonTelNo` varchar(20) NOT NULL,
  `syn_flag` int(2) DEFAULT NULL,
  `photo_path` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2212 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_pingan_logs`
--

DROP TABLE IF EXISTS `supplier_pingan_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_pingan_logs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `driver_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '司机',
  `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机',
  `company_code` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '公司代码',
  `supplier_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务商名字',
  `lon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `lat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `busy` int(11) DEFAULT NULL COMMENT '状态,0.空头,1.繁忙',
  `service_type` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务类型',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=42029498 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_service_area`
--

DROP TABLE IF EXISTS `supplier_service_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_service_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `area` int(11) DEFAULT NULL,
  `arrival_time` int(11) DEFAULT NULL,
  `abandon_time` int(11) DEFAULT NULL,
  `priority` int(11) DEFAULT NULL,
  `is_supplier_service_type` int(11) DEFAULT '0',
  `update_user_id` int(11) DEFAULT NULL,
  `update_user_name` varchar(225) DEFAULT NULL,
  `states` int(11) DEFAULT '0' COMMENT '是否启用 1 启用 0 停止',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_area_ibfk2` (`supplier_id`,`area`),
  KEY `supplier_area_ibfk` (`id`,`supplier_id`) USING BTREE,
  KEY `supplier_area_ibfk3` (`supplier_id`,`area`),
  CONSTRAINT `supplier_area_ibfk1	` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=44173 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_service_area_capability`
--

DROP TABLE IF EXISTS `supplier_service_area_capability`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_service_area_capability` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_id` int(11) DEFAULT NULL,
  `supplier_service_area_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_service_capability_ipk1` (`supplier_service_area_id`) USING BTREE,
  CONSTRAINT `supplier_service_area_capability_ipk1` FOREIGN KEY (`supplier_service_area_id`) REFERENCES `supplier_service_area` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_service_type`
--

DROP TABLE IF EXISTS `supplier_service_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_service_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_service_type_ibk1` (`supplier_id`),
  KEY `supplier_service_type_ibk2` (`service_id`) USING BTREE,
  CONSTRAINT `supplier_service_type_ibk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=239848 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_extra`
--

DROP TABLE IF EXISTS `supplier_settlement_extra`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_extra` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `distinguish_floor_ceiling` int(2) DEFAULT NULL COMMENT '是否区分地上地下',
  `distinguish_storey` int(2) DEFAULT NULL COMMENT '是否区分几层',
  `basement_floor_one` decimal(11,2) DEFAULT NULL COMMENT '地库费地下一层',
  `basement_floor_two` decimal(11,2) DEFAULT NULL COMMENT '地库费地下二层',
  `basement_floor_three` decimal(11,2) DEFAULT NULL COMMENT '地库费地下三层',
  `basement_floor_four` decimal(11,2) DEFAULT NULL COMMENT '地库费地下四层',
  `basement_floor_five` decimal(11,2) DEFAULT NULL COMMENT '地库费地下五层',
  `basement_floor_six` decimal(11,2) DEFAULT NULL COMMENT '地库费地下六层',
  `basement_ceiling_one` decimal(11,2) DEFAULT NULL COMMENT '地库费地上一层',
  `basement_ceiling_two` decimal(11,2) DEFAULT NULL COMMENT '地库费地上二层',
  `basement_ceiling_three` decimal(11,2) DEFAULT NULL COMMENT '地库费地上三层',
  `basement_ceiling_four` decimal(11,2) DEFAULT NULL COMMENT '地库费地上四层',
  `basement_ceiling_five` decimal(11,2) DEFAULT NULL COMMENT '地库费地上五层',
  `basement_ceiling_six` decimal(11,2) DEFAULT NULL COMMENT '地库费地上六层',
  `distinguish_tyre` int(2) DEFAULT NULL COMMENT '是否区分小轮种类',
  `universal_wheel_price` decimal(11,2) DEFAULT NULL COMMENT '万向轮费用',
  `tyre_price` decimal(11,2) DEFAULT NULL COMMENT '普通小轮费用',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_user` varchar(30) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(30) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_supplier_id` (`supplier_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_rule`
--

DROP TABLE IF EXISTS `supplier_settlement_rule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `area` int(11) DEFAULT NULL,
  `service_point_name` varchar(255) DEFAULT NULL,
  `service_point_code` int(11) DEFAULT NULL,
  `service_longitude` decimal(11,6) DEFAULT NULL,
  `service_latitude` decimal(11,6) DEFAULT NULL,
  `service_range` decimal(11,6) DEFAULT NULL,
  `destination_point_name` varchar(255) DEFAULT NULL,
  `destination_point_code` int(11) DEFAULT NULL,
  `destination_longitude` decimal(11,6) DEFAULT NULL,
  `destination_latitude` decimal(11,6) DEFAULT NULL,
  `destination_range` decimal(11,6) DEFAULT NULL,
  `service_area` int(11) DEFAULT NULL,
  `destination_area` int(11) DEFAULT NULL,
  `custom_area_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `temp_id` int(11) DEFAULT NULL,
  `temp_type` int(11) DEFAULT NULL,
  `settlement` int(11) DEFAULT NULL,
  `temp_state` int(11) DEFAULT NULL,
  `supplier_settlement_rule_mode_id` varchar(255) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  `time_group_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_settlement_rule_ibk2` (`service_area`),
  KEY `supplier_settlement_rule_ibk3` (`destination_area`),
  KEY `supplier_settlement_rule_ibk4` (`supplier_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=381210 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_rule_mode`
--

DROP TABLE IF EXISTS `supplier_settlement_rule_mode`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_rule_mode` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `supplier_settlement_rule_id` int(11) DEFAULT NULL,
  `finished_settlement_type` int(11) DEFAULT NULL COMMENT '1：实施；2：单程；3：全程；4：全程减半；5：一口价；6：按次数个数',
  `unfinished_settlement_type` int(11) DEFAULT NULL COMMENT '1：实施；2：单程；3：全程；4：全程减半；5：一口价；6：按次数个数',
  `abandon_settlement_type` int(11) DEFAULT NULL COMMENT '1：实施；2：单程；3：全程；4：全程减半；5：一口价；6：按次数个数',
  `success_settlement_type` int(11) DEFAULT NULL COMMENT '1：实施；2：单程；3：全程；4：全程减半；5：一口价；6：按次数个数',
  `finished_price` decimal(11,2) DEFAULT NULL,
  `unfinished_price` decimal(10,2) DEFAULT NULL,
  `abandon_price` decimal(10,2) DEFAULT NULL,
  `success_price` decimal(10,2) DEFAULT NULL,
  `finished_limited_mileage` decimal(10,4) DEFAULT NULL,
  `unfinished_limited_mileage` decimal(10,4) DEFAULT NULL,
  `abandon_limited_mileage` decimal(10,4) DEFAULT NULL,
  `success_limited_mileage` decimal(11,4) DEFAULT NULL,
  `finished_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `unfinished_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `abandon_excess_unit_price` decimal(10,2) DEFAULT NULL,
  `success_excess_unit_price` decimal(11,2) DEFAULT NULL,
  `finished_exceed_fee_name` int(11) DEFAULT NULL COMMENT '1：车主；2：企业',
  `unfinished_exceed_fee_name` int(11) DEFAULT NULL COMMENT '1：车主；2：企业',
  `abandon_exceed_fee_name` int(11) DEFAULT NULL COMMENT '1：车主；2：企业',
  `success_exceed_fee_name` int(11) DEFAULT NULL COMMENT '1：车主；2：企业',
  `reserve` int(11) DEFAULT NULL COMMENT '备用方案',
  `enable` int(11) DEFAULT '0' COMMENT '0未启用 1 已启用',
  `standby_time` datetime DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `delete_flag` int(11) DEFAULT '0' COMMENT '0未删除 1 已删除',
  `name` varchar(225) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `supplier_settlement_service_type_id` int(11) DEFAULT NULL,
  `time_group_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_settlement_rule_mode_ibk1` (`reserve`),
  KEY `supplier_settlement_rule_mode_ibk2` (`supplier_settlement_rule_id`),
  CONSTRAINT `supplier_settlement_rule_mode_ibk2` FOREIGN KEY (`supplier_settlement_rule_id`) REFERENCES `supplier_settlement_rule` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19099 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_service_type`
--

DROP TABLE IF EXISTS `supplier_settlement_service_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_service_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `type` int(11) DEFAULT NULL,
  `temp_id` int(11) DEFAULT NULL,
  `service_id` varchar(500) DEFAULT NULL,
  `time_group_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_settlement_service_type_ibk1` (`supplier_id`),
  CONSTRAINT `supplier_settlement_service_type_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=181084 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_service_type_message`
--

DROP TABLE IF EXISTS `supplier_settlement_service_type_message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_service_type_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_settlement_service_type_id` int(11) DEFAULT NULL,
  `base_service_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_settlement_service_type_message_ipk1` (`supplier_settlement_service_type_id`) USING BTREE,
  CONSTRAINT `supplier_settlement_service_type_message_ibfk_1` FOREIGN KEY (`supplier_settlement_service_type_id`) REFERENCES `supplier_settlement_service_type` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=679257 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_settlement_time_group`
--

DROP TABLE IF EXISTS `supplier_settlement_time_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_settlement_time_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) NOT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `remark` text,
  `create_user` varchar(50) DEFAULT NULL,
  `update_user` varchar(50) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=500010 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_standby`
--

DROP TABLE IF EXISTS `supplier_standby`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_standby` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `longitude` decimal(30,12) DEFAULT NULL,
  `latitude` decimal(30,12) DEFAULT NULL,
  `code` int(11) DEFAULT NULL,
  `update_user_id` int(11) DEFAULT NULL,
  `update_user_name` varchar(225) DEFAULT NULL,
  `states` int(11) DEFAULT '0' COMMENT '是否启用 1 启用 0 停止',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_user_id` int(11) DEFAULT NULL,
  `create_user_name` varchar(225) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_standby_ibfk1` (`supplier_id`),
  KEY `supplier_standby_ibfk2` (`longitude`),
  KEY `supplier_standby_ibfk3` (`latitude`)
) ENGINE=InnoDB AUTO_INCREMENT=63190 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_states_history`
--

DROP TABLE IF EXISTS `supplier_states_history`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_states_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `states` int(11) DEFAULT NULL,
  `operator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `out_of_service_reason` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_states_history_ibk1` (`supplier_id`),
  CONSTRAINT `supplier_states_history_ibk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_training_materials`
--

DROP TABLE IF EXISTS `supplier_training_materials`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_training_materials` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `keyword` varchar(400) DEFAULT NULL COMMENT '关键字',
  `content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
  `synopsis` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '简介',
  `theme_picture` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `read_count` int(11) DEFAULT NULL,
  `authority` int(1) DEFAULT NULL,
  `push_time` datetime DEFAULT NULL,
  `push_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `doc_type` int(1) DEFAULT NULL COMMENT '文档类型',
  `choice_title` varchar(255) DEFAULT NULL COMMENT '题目标题',
  `choice_conter` longtext COMMENT '选项内容',
  `choice_right_sort` int(1) DEFAULT NULL COMMENT '正确选项序号',
  `training_type` int(1) DEFAULT NULL COMMENT '培训类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle`
--

DROP TABLE IF EXISTS `supplier_vehicle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `job_number` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `number` varchar(255) DEFAULT NULL COMMENT 'sms卡号',
  `phone` varchar(255) DEFAULT NULL,
  `service_scope` int(11) DEFAULT NULL,
  `service_scope_limit` int(11) DEFAULT NULL COMMENT '服务范围上限',
  `virtual_vehicle` int(11) DEFAULT NULL COMMENT '/** 虚拟车辆 0 否 1 是*/',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `terminal_id` bigint(20) DEFAULT NULL,
  `vehicle_type` varchar(60) DEFAULT NULL COMMENT '车辆类型',
  `delete_flag` int(11) DEFAULT '0',
  `is_polymerization` int(11) DEFAULT '0' COMMENT '是否平安聚合',
  `is_sino_polymerization` int(11) DEFAULT NULL COMMENT '是否中道聚合',
  `traffic_type` int(1) DEFAULT NULL COMMENT '交管业务属性',
  `available_service_ids` varchar(400) DEFAULT NULL COMMENT '可使用服务能力',
  `jpush_id` varchar(100) DEFAULT NULL COMMENT '极光推送id',
  `is_insured` int(11) DEFAULT NULL COMMENT '已买保险',
  `insured_start_time` datetime DEFAULT NULL COMMENT '保险开始时间',
  `insured_end_time` datetime DEFAULT NULL COMMENT '保险结束时间',
  `vehicle_tonnage` int(2) DEFAULT NULL COMMENT '车辆吨位',
  `vehicle_license` int(2) DEFAULT NULL COMMENT '车辆牌照',
  `vehicle_pass` int(2) DEFAULT NULL COMMENT '车辆是否有通行证',
  `main_service_area` varchar(60) DEFAULT NULL COMMENT '主要服务区域',
  `device_id` varchar(100) DEFAULT NULL COMMENT '手机设备id （用于代驾推送）',
  `version` varchar(255) DEFAULT NULL COMMENT '其他信息拼接（用于代驾）',
  `category` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车辆类别，如’依维柯平板车‘',
  `terminal_id_new` bigint(20) DEFAULT NULL COMMENT '新的terminalId(对应新的mapKey)',
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_ibfk1` (`supplier_id`),
  CONSTRAINT `supplier_vehicle_ibfk1` FOREIGN KEY (`supplier_id`) REFERENCES `supplier` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=327527 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_alarm`
--

DROP TABLE IF EXISTS `supplier_vehicle_alarm`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_alarm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL,
  `rescue_vehicle_id` int(11) NOT NULL,
  `alarm_type` int(11) DEFAULT NULL COMMENT '1 掉线报警  2  置忙报警   3 空移报警',
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `alarm_remark` varchar(30) DEFAULT NULL,
  `start_gps` varchar(50) DEFAULT NULL,
  `end_gps` varchar(50) DEFAULT NULL,
  `status` int(11) DEFAULT NULL COMMENT '0  报警中   1  结束报警',
  `remind_time` datetime DEFAULT NULL COMMENT '提醒时间',
  `empty_move_mileage` decimal(11,2) DEFAULT NULL COMMENT '空移里程',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66340 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_camera`
--

DROP TABLE IF EXISTS `supplier_vehicle_camera`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_camera` (
  `sim` varchar(100) NOT NULL,
  `vehicle_name` varchar(100) DEFAULT NULL,
  `camera1_url` varchar(200) DEFAULT NULL,
  `camera2_url` varchar(200) DEFAULT NULL,
  `camera3_url` varchar(200) DEFAULT NULL,
  `camera4_url` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`sim`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_login_log`
--

DROP TABLE IF EXISTS `supplier_vehicle_login_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_login_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicle_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `exit_mileage` int(11) DEFAULT NULL,
  `enter_mileage` int(11) DEFAULT NULL,
  `login_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `exit_time` datetime DEFAULT NULL,
  `device_info` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `regId` varchar(25) DEFAULT NULL,
  `deviceId` varchar(50) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_login_log_vehicle_id` (`vehicle_id`) USING BTREE,
  KEY `idx_driver_id` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5211 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_main_service`
--

DROP TABLE IF EXISTS `supplier_vehicle_main_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_main_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_vehicle_id` int(11) DEFAULT NULL COMMENT '供应商车辆id',
  `area_code` int(11) DEFAULT NULL COMMENT '主要服务区域',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_order`
--

DROP TABLE IF EXISTS `supplier_vehicle_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL,
  `supplier_vehicle_id` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `project_completion_time` datetime DEFAULT NULL,
  `expected_completion_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_order_ibk1` (`supplier_vehicle_id`),
  CONSTRAINT `supplier_vehicle_order_ibk1` FOREIGN KEY (`supplier_vehicle_id`) REFERENCES `supplier_vehicle` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_position`
--

DROP TABLE IF EXISTS `supplier_vehicle_position`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_position` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL COMMENT '不用',
  `job_number` varchar(255) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `lon` varchar(255) DEFAULT NULL,
  `lat` varchar(255) DEFAULT NULL,
  `speed` varchar(20) DEFAULT NULL,
  `direction` varchar(255) DEFAULT NULL,
  `gps_time` datetime DEFAULT NULL,
  `vehicle_login_time` datetime DEFAULT NULL,
  `state` int(11) DEFAULT NULL COMMENT '0:空闲1:忙碌,2:置忙',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `login_state` int(11) DEFAULT NULL COMMENT '0 下线  1 在线',
  `online_state` int(11) DEFAULT NULL,
  `area_code` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_position_lon` (`lon`) USING BTREE,
  KEY `supplier_vehicle_position_lat` (`lat`) USING BTREE,
  KEY `supplier_vehicle_position_vehicle_id` (`vehicle_id`) USING BTREE,
  KEY `supplier_vehicle_position_driver_id` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6442 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_refueling`
--

DROP TABLE IF EXISTS `supplier_vehicle_refueling`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_refueling` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicle_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `oil_fee` int(11) DEFAULT NULL,
  `oil_mass` double(11,0) DEFAULT NULL,
  `type` int(11) DEFAULT NULL COMMENT '1：加油，2：维修',
  `dial_record` int(11) DEFAULT NULL,
  `repair_images` varchar(500) DEFAULT NULL,
  `repair_amount` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_refueling_ibfk1` (`driver_id`),
  CONSTRAINT `supplier_vehicle_refueling_ibfk1` FOREIGN KEY (`driver_id`) REFERENCES `supplier_driver` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_resources`
--

DROP TABLE IF EXISTS `supplier_vehicle_resources`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_resources` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `flat_car` int(11) DEFAULT NULL COMMENT '平板车',
  `landing_car` int(11) DEFAULT NULL COMMENT '全落地平板车',
  `basement_rescue_vehicle` int(11) DEFAULT NULL COMMENT '地库救援车',
  `emergency_repair_vehicle` int(11) DEFAULT NULL COMMENT '抢修车',
  `crane` int(11) DEFAULT NULL COMMENT '吊车',
  `repair_car` int(11) DEFAULT NULL COMMENT '清障车',
  `other_car` int(11) DEFAULT NULL COMMENT '其他',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_routine_service`
--

DROP TABLE IF EXISTS `supplier_vehicle_routine_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_routine_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tag_image` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `tag_status` int(11) DEFAULT '0',
  `tag` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_service`
--

DROP TABLE IF EXISTS `supplier_vehicle_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_vehicle_id` int(11) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_service_ibk1` (`supplier_vehicle_id`),
  CONSTRAINT `supplier_vehicle_service_ibk1` FOREIGN KEY (`supplier_vehicle_id`) REFERENCES `supplier_vehicle` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=3697716 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_track`
--

DROP TABLE IF EXISTS `supplier_vehicle_track`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_track` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicle_id` int(11) DEFAULT NULL,
  `position` text,
  `gps_time` datetime DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_vehicle_track_ibfk1` (`vehicle_id`),
  CONSTRAINT `supplier_vehicle_track_ibfk1` FOREIGN KEY (`vehicle_id`) REFERENCES `supplier_vehicle` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehicle_wechat_login`
--

DROP TABLE IF EXISTS `supplier_vehicle_wechat_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehicle_wechat_login` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `vehicle_id` int(11) DEFAULT NULL,
  `driver_id` int(11) DEFAULT NULL,
  `weixin_user_id` int(11) DEFAULT NULL,
  `check_flag` int(11) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehionline_his2020`
--

DROP TABLE IF EXISTS `supplier_vehionline_his2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehionline_his2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rescue_vehicle_id` int(11) DEFAULT NULL,
  `staff_name` varchar(30) DEFAULT NULL,
  `online_time` datetime DEFAULT NULL,
  `online_lon` decimal(10,6) DEFAULT NULL,
  `online_lat` decimal(10,6) DEFAULT NULL,
  `online_address` varchar(200) DEFAULT NULL,
  `offline_time` datetime DEFAULT NULL,
  `offline_lon` decimal(10,6) DEFAULT NULL,
  `offline_lat` decimal(10,6) DEFAULT NULL,
  `offline_address` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=414 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_vehionline_his2021`
--

DROP TABLE IF EXISTS `supplier_vehionline_his2021`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_vehionline_his2021` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rescue_vehicle_id` int(11) DEFAULT NULL,
  `staff_name` varchar(30) DEFAULT NULL,
  `online_time` datetime DEFAULT NULL,
  `online_lon` decimal(10,6) DEFAULT NULL,
  `online_lat` decimal(10,6) DEFAULT NULL,
  `online_address` varchar(200) DEFAULT NULL,
  `offline_time` datetime DEFAULT NULL,
  `offline_lon` decimal(10,6) DEFAULT NULL,
  `offline_lat` decimal(10,6) DEFAULT NULL,
  `offline_address` varchar(200) DEFAULT NULL,
  `offline_reason_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '下线原因',
  `offline_reason` varchar(100) DEFAULT NULL COMMENT '下线原因',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=535 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_virtual_cellphone`
--

DROP TABLE IF EXISTS `supplier_virtual_cellphone`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_virtual_cellphone` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `binding_vehicle_id` int(11) DEFAULT NULL,
  `origin_phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '原始手机号',
  `virtual_phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT ' 虚拟手机号',
  `driver_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '司机手机号',
  `state` tinyint(2) DEFAULT NULL COMMENT '1 启用  0停用',
  `valid_time` bigint(17) DEFAULT NULL COMMENT '系统时间戳',
  `lon` decimal(16,8) DEFAULT NULL,
  `lat` decimal(16,8) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `binding_vehicle_id` (`binding_vehicle_id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `supplier_wechat_login`
--

DROP TABLE IF EXISTS `supplier_wechat_login`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_wechat_login` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL,
  `weixin_user_id` int(11) DEFAULT NULL,
  `check_flag` int(11) NOT NULL DEFAULT '0' COMMENT '默认接收 若改为1，不接受通知',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_invoice_batch`
--

DROP TABLE IF EXISTS `task_invoice_batch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_invoice_batch` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `batch_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次号',
  `finance_batch_code` varchar(255) DEFAULT NULL COMMENT '财务批次',
  `order_num` int(11) DEFAULT NULL COMMENT '工单数量',
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮箱',
  `total_money` decimal(11,2) DEFAULT NULL COMMENT '批次总金额',
  `invoice_money` decimal(11,2) DEFAULT NULL COMMENT '开票总金额',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注',
  `bridge_amount_total` decimal(11,2) DEFAULT NULL COMMENT '桥路费总计',
  `cut_money` decimal(11,2) DEFAULT NULL COMMENT '扣款金额',
  `pay_money` varchar(255) DEFAULT NULL COMMENT '打款金额',
  `pay_time` datetime DEFAULT NULL COMMENT '打款时间',
  `status` int(11) DEFAULT NULL COMMENT '开票状态(1:通知开票，2：已收到发票，3：已打款)',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `create_user` varchar(255) DEFAULT NULL,
  `update_user` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `start_time` datetime DEFAULT NULL COMMENT '开始日期',
  `over_time` datetime DEFAULT NULL COMMENT '结束日期',
  `delete_flag` int(11) DEFAULT '0',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_batch_code` (`batch_code`) USING BTREE,
  KEY `idx_finance_batch_code` (`finance_batch_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_invoice_batch_detail`
--

DROP TABLE IF EXISTS `task_invoice_batch_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_invoice_batch_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `invoice_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发票号',
  `invoice_money` decimal(11,2) DEFAULT NULL COMMENT '开票金额',
  `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注',
  `invoice_batch_id` int(11) DEFAULT NULL COMMENT '批次id',
  `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片路径',
  `file_name` varchar(255) DEFAULT NULL,
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `bank` varchar(255) DEFAULT NULL COMMENT '银行',
  `bank_type` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_num` varchar(255) DEFAULT NULL,
  `bank_pattern` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_invoice_batch_detail_ibfk_1` (`invoice_batch_id`),
  CONSTRAINT `task_invoice_batch_detail_ibfk_1` FOREIGN KEY (`invoice_batch_id`) REFERENCES `task_invoice_batch` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_invoice_batch_voucher`
--

DROP TABLE IF EXISTS `task_invoice_batch_voucher`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_invoice_batch_voucher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `remark` text,
  `invoice_batch_id` int(11) DEFAULT NULL,
  `file_name` varchar(255) DEFAULT NULL,
  `create_user` varchar(255) DEFAULT NULL,
  `update_user` varchar(255) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `task_invoice_batch_vouche_ibfk_1` (`invoice_batch_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_invoice_finance_batch`
--

DROP TABLE IF EXISTS `task_invoice_finance_batch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_invoice_finance_batch` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `finance_batch_code` varchar(50) DEFAULT NULL COMMENT '财务批次编号',
  `pay_money` varchar(11) DEFAULT NULL COMMENT '付款金额',
  `total_money` double(11,2) DEFAULT NULL COMMENT '批次总金额',
  `invoice_money` double(11,2) DEFAULT NULL COMMENT '开票总金额',
  `bridge_amount_total` decimal(11,2) DEFAULT NULL COMMENT '桥路费总计',
  `cut_money` decimal(11,2) DEFAULT NULL COMMENT '扣款金额',
  `status` int(11) DEFAULT NULL COMMENT '开票状态(1:通知开票，2：已收到发票，3：已打款)',
  `supplier_id` int(11) DEFAULT NULL COMMENT '服务商id',
  `order_num` int(11) DEFAULT NULL COMMENT '工单数量',
  `create_user` varchar(255) DEFAULT NULL COMMENT '创建人',
  `update_user` varchar(255) DEFAULT NULL COMMENT '修改人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `delete_flag` int(11) DEFAULT NULL COMMENT '是否删除',
  `start_time` datetime DEFAULT NULL COMMENT '开票开始日期',
  `over_time` datetime DEFAULT NULL COMMENT '开票结束日期',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `pay_time` datetime DEFAULT NULL COMMENT '支付时间',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order`
--

DROP TABLE IF EXISTS `task_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_vehicle_user_name` varchar(255) DEFAULT NULL COMMENT '派车人',
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `check_complete_time` datetime DEFAULT NULL COMMENT '验车完成时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) DEFAULT NULL,
  `holdon` int(11) DEFAULT '0' COMMENT '0：不挂起；1：挂起',
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  `driver_accept_time` datetime DEFAULT NULL,
  `finish_user` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_time` datetime DEFAULT NULL,
  `first_contact_time` datetime DEFAULT NULL COMMENT '第一次联系客户时间',
  `contact_success_time` datetime DEFAULT NULL COMMENT '联系成功时间',
  `input_address` varchar(255) DEFAULT NULL,
  `device_binding` varchar(100) DEFAULT NULL,
  `photo_size` int(11) DEFAULT NULL,
  `audit_seat_user` varchar(100) DEFAULT NULL COMMENT '坐席审核人',
  `audit_seat_time` datetime DEFAULT NULL COMMENT '坐席审核时间',
  `polymerize_faile_reason` varchar(255) DEFAULT NULL,
  `vehicle_terminal` tinyint(11) DEFAULT '0' COMMENT '车辆终端 0 线下 1 app 2 wx',
  `bpoint_photo_longtitude` decimal(16,6) DEFAULT NULL COMMENT '照片B点',
  `bpoint_photo_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_photo_longtitude` decimal(16,6) DEFAULT NULL COMMENT '照片C点',
  `cpoint_photo_latitude` decimal(16,6) DEFAULT NULL,
  `photo_mileage_ab` decimal(11,3) DEFAULT NULL COMMENT '照片AB距离',
  `photo_mileage_bc` decimal(11,3) DEFAULT NULL,
  `photo_mileage_ca` decimal(11,3) DEFAULT NULL,
  `supplier_order_id` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_ibfk_1` (`user_order_id`),
  CONSTRAINT `task_order_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13314 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost`
--

DROP TABLE IF EXISTS `task_order_cost`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT '0.00' COMMENT '合同结算价格',
  `report_mileage_ab` decimal(11,3) unsigned DEFAULT '0.000' COMMENT 'ab上报距离',
  `report_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc上报距离',
  `report_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca上报距离',
  `report_amount` decimal(11,2) DEFAULT '0.00' COMMENT '上报费用',
  `guidance_contract_mileage_ab` decimal(11,3) DEFAULT NULL COMMENT 'ab合同推荐距离',
  `guidance_contract_mileage_bc` decimal(11,3) DEFAULT NULL COMMENT 'bc合同推荐距离',
  `guidance_contract_mileage_ca` decimal(11,3) DEFAULT NULL COMMENT 'ca合同推荐距离',
  `guidance_mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT 'ab推荐距离',
  `guidance_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc推荐距离',
  `guidance_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca推荐距离',
  `guidance_amount` decimal(11,2) DEFAULT '0.00' COMMENT '预估费用',
  `settle_mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT 'ab结算距离',
  `settle_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc结算距离',
  `settle_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca结算距离',
  `settle_amount` decimal(11,2) DEFAULT '0.00' COMMENT '预估费用',
  `real_ref_settle_mileage_ab` decimal(11,2) DEFAULT NULL COMMENT '实际推荐ab距离',
  `real_ref_settle_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT '实际推荐bc距离',
  `real_ref_settle_mileage_ca` decimal(11,2) DEFAULT NULL COMMENT '实际推荐ca距离',
  `fixed_price_type` int(11) DEFAULT '0' COMMENT '一口价种类',
  `fixed_price` decimal(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `fixed_user` varchar(50) DEFAULT NULL COMMENT '议价人',
  `fixed_time` datetime DEFAULT NULL COMMENT '议价时间',
  `bridge_amount_ab` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费ab',
  `bridge_amount_bc` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费bc',
  `bridge_amount_ca` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费ca',
  `wait_amount` decimal(11,2) DEFAULT '0.00' COMMENT '等候费',
  `tyre_number` int(11) DEFAULT '0' COMMENT '辅助轮个数',
  `tyre_price` decimal(11,2) DEFAULT '0.00' COMMENT '辅助轮单价',
  `other_amount` decimal(11,2) DEFAULT '0.00' COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` decimal(11,2) DEFAULT '0.00' COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT '0' COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_price` decimal(11,2) DEFAULT '0.00',
  `unit_price` decimal(11,2) DEFAULT '0.00',
  `mileage` decimal(11,2) DEFAULT '0.00',
  `dilemma_fee` decimal(11,2) DEFAULT '0.00',
  `base_price` decimal(11,2) DEFAULT '0.00',
  `assist_fee` decimal(11,2) DEFAULT '0.00',
  `total_fee` decimal(11,2) DEFAULT '0.00',
  `drop_mileage` decimal(11,3) DEFAULT '0.000' COMMENT '放空里程',
  `supplier_settlement_type` int(11) DEFAULT NULL COMMENT '供应商结算方式',
  `report_mileage` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写',
  `report_unit_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写',
  `report_start_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写',
  `report_base_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写基本费用总计',
  `report_total_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写总价',
  `collect_type` int(1) DEFAULT NULL COMMENT '收取方式',
  `basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费',
  `supplier_settle_ratio` int(2) DEFAULT NULL COMMENT '服务商结算比例',
  `wait_time` int(11) DEFAULT NULL COMMENT '等候时长',
  `return_start_kilometre` int(11) DEFAULT NULL COMMENT '回程起步公里',
  `return_kilometre_price` decimal(11,2) DEFAULT NULL COMMENT '回城每公里单价',
  `audit_bridge_amount_ab` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费ab',
  `audit_bridge_amount_bc` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费bc',
  `audit_bridge_amount_ca` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费ca',
  `audit_wait_amount` decimal(11,2) DEFAULT NULL COMMENT '审核确认等候费',
  `audit_tyre_number` decimal(11,2) DEFAULT NULL COMMENT '审核确认辅助轮个数',
  `audit_tyre_price` decimal(11,2) DEFAULT NULL COMMENT '审核确认辅助轮单价',
  `audit_dilemma_fee` decimal(11,2) DEFAULT NULL COMMENT '审核确认困境费',
  `audit_basement_fee` decimal(11,2) DEFAULT NULL COMMENT '审核确认地库费',
  `audit_fixed_price` decimal(11,2) DEFAULT NULL COMMENT '审核确认一口价',
  `audit_fixed_price_type` int(11) DEFAULT NULL COMMENT '审核确认一口价类型',
  `free_wait_time` int(11) DEFAULT NULL COMMENT '免等时长',
  `per_wait_price` decimal(10,2) DEFAULT NULL COMMENT '等候单价',
  `increase_price` decimal(10,2) DEFAULT NULL COMMENT '系统加价',
  `supplement_mileage_bc` decimal(10,2) DEFAULT NULL COMMENT '历史订单公里数补正',
  `insurance` decimal(11,2) DEFAULT NULL COMMENT '保险费',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_ibk1` (`task_order_id`),
  KEY `task_order_cost_ibk2` (`user_order_id`),
  CONSTRAINT `task_order_cost_ibk1` FOREIGN KEY (`task_order_id`) REFERENCES `task_order` (`id`) ON DELETE CASCADE,
  CONSTRAINT `task_order_cost_ibk2` FOREIGN KEY (`user_order_id`) REFERENCES `user_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13705 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his`
--

DROP TABLE IF EXISTS `task_order_cost_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT '0.00' COMMENT '合同结算价格',
  `report_mileage_ab` decimal(11,3) unsigned DEFAULT '0.000' COMMENT 'ab上报距离',
  `report_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc上报距离',
  `report_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca上报距离',
  `report_amount` decimal(11,2) DEFAULT '0.00' COMMENT '上报费用',
  `guidance_contract_mileage_ab` decimal(11,3) DEFAULT NULL COMMENT 'ab合同推荐距离',
  `guidance_contract_mileage_bc` decimal(11,3) DEFAULT NULL COMMENT 'bc合同推荐距离',
  `guidance_contract_mileage_ca` decimal(11,3) DEFAULT NULL COMMENT 'ca合同推荐距离',
  `guidance_mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT 'ab推荐距离',
  `guidance_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc推荐距离',
  `guidance_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca推荐距离',
  `guidance_amount` decimal(11,2) DEFAULT '0.00' COMMENT '预估费用',
  `settle_mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT 'ab结算距离',
  `settle_mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT 'bc结算距离',
  `settle_mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT 'ca结算距离',
  `settle_amount` decimal(11,2) DEFAULT '0.00' COMMENT '预估费用',
  `real_ref_settle_mileage_ab` decimal(11,2) DEFAULT NULL COMMENT '实际推荐ab距离',
  `real_ref_settle_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT '实际推荐bc距离',
  `real_ref_settle_mileage_ca` decimal(11,2) DEFAULT NULL COMMENT '实际推荐ca距离',
  `fixed_price_type` int(11) DEFAULT '0' COMMENT '一口价种类',
  `fixed_price` decimal(11,2) DEFAULT '0.00' COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `fixed_user` varchar(50) DEFAULT NULL COMMENT '议价人',
  `fixed_time` datetime DEFAULT NULL COMMENT '议价时间',
  `bridge_amount_ab` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费ab',
  `bridge_amount_bc` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费bc',
  `bridge_amount_ca` decimal(11,2) DEFAULT '0.00' COMMENT '过路桥费ca',
  `wait_amount` decimal(11,2) DEFAULT '0.00' COMMENT '等候费',
  `tyre_number` int(11) DEFAULT '0' COMMENT '辅助轮个数',
  `tyre_price` decimal(11,2) DEFAULT '0.00' COMMENT '辅助轮单价',
  `other_amount` decimal(11,2) DEFAULT '0.00' COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` decimal(11,2) DEFAULT '0.00' COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT '0' COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_price` decimal(11,2) DEFAULT '0.00',
  `unit_price` decimal(11,2) DEFAULT '0.00',
  `mileage` decimal(11,2) DEFAULT '0.00',
  `dilemma_fee` decimal(11,2) DEFAULT '0.00' COMMENT '困境费',
  `base_price` decimal(11,2) DEFAULT '0.00',
  `assist_fee` decimal(11,2) DEFAULT '0.00',
  `total_fee` decimal(11,2) DEFAULT '0.00',
  `drop_mileage` decimal(11,3) DEFAULT '0.000' COMMENT '放空里程',
  `supplier_settlement_type` int(11) DEFAULT NULL COMMENT '供应商结算方式',
  `report_mileage` decimal(11,2) DEFAULT '0.00',
  `report_unit_price` decimal(11,2) DEFAULT '0.00',
  `report_start_price` decimal(11,2) DEFAULT '0.00',
  `report_base_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写基本费用总计',
  `report_total_price` decimal(11,2) DEFAULT '0.00' COMMENT 'app 子公司手动填写总价',
  `collect_type` int(1) DEFAULT NULL COMMENT '收取方式',
  `basement_fee` decimal(11,2) DEFAULT '0.00' COMMENT '地库费',
  `supplier_settle_ratio` int(2) DEFAULT NULL COMMENT '服务商结算比例',
  `wait_time` int(11) DEFAULT NULL,
  `return_start_kilometre` int(11) DEFAULT NULL,
  `return_kilometre_price` decimal(11,2) DEFAULT NULL,
  `audit_bridge_amount_ab` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费ab',
  `audit_bridge_amount_bc` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费bc',
  `audit_bridge_amount_ca` decimal(11,2) DEFAULT NULL COMMENT '审核确认过路桥费ca',
  `audit_wait_amount` decimal(11,2) DEFAULT NULL COMMENT '审核确认等候费',
  `audit_tyre_number` decimal(11,2) DEFAULT NULL COMMENT '审核确认辅助轮个数',
  `audit_tyre_price` decimal(11,2) DEFAULT NULL COMMENT '审核确认辅助轮单价',
  `audit_dilemma_fee` decimal(11,2) DEFAULT NULL COMMENT '审核确认困境费',
  `audit_basement_fee` decimal(11,2) DEFAULT NULL COMMENT '审核确认地库费',
  `audit_fixed_price` decimal(11,2) DEFAULT NULL COMMENT '审核确认一口价',
  `audit_fixed_price_type` int(11) DEFAULT NULL COMMENT '审核确认一口价类型',
  `free_wait_time` int(11) DEFAULT NULL,
  `per_wait_price` decimal(10,2) DEFAULT NULL,
  `increase_price` decimal(10,2) DEFAULT NULL COMMENT '系统加价',
  `supplement_mileage_bc` decimal(10,2) DEFAULT NULL,
  `insurance` decimal(11,2) DEFAULT NULL COMMENT '保险费',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_his_ibk1` (`task_order_id`),
  KEY `task_order_cost_his_ibk2` (`user_order_id`),
  KEY `idx_task_settle_id` (`task_settle_id`) USING BTREE,
  CONSTRAINT `task_order_cost_his_ibk1` FOREIGN KEY (`task_order_id`) REFERENCES `task_order_his` (`id`) ON DELETE CASCADE,
  CONSTRAINT `task_order_cost_his_ibk2` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=74571 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_2016`
--

DROP TABLE IF EXISTS `task_order_cost_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_2016` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `report_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab上报距离',
  `report_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc上报距离',
  `report_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca上报距离',
  `report_amount` double(11,2) DEFAULT NULL COMMENT '上报费用',
  `guidance_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab推荐距离',
  `guidance_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc推荐距离',
  `guidance_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca推荐距离',
  `guidance_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `settle_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `fixed_price_type` int(11) DEFAULT NULL COMMENT '一口价种类',
  `fixed_price` double(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT '过路桥费ab',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT '过路桥费bc',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT '过路桥费ca',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `tyre_number` int(11) DEFAULT NULL COMMENT '辅助轮个数',
  `tyre_price` double(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_price` int(11) DEFAULT '0',
  `unit_price` double DEFAULT '0',
  `mileage` int(11) DEFAULT '0',
  `dilemma_fee` int(11) DEFAULT '0',
  `base_price` int(11) DEFAULT '0',
  `assist_fee` int(11) DEFAULT '0',
  `total_fee` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_his_ibk1` (`task_order_id`),
  KEY `task_order_cost_his_ibk2` (`user_order_id`),
  CONSTRAINT `task_order_cost_his_2016_ibfk_1` FOREIGN KEY (`task_order_id`) REFERENCES `task_order_his` (`id`) ON DELETE CASCADE,
  CONSTRAINT `task_order_cost_his_2016_ibfk_2` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_2017`
--

DROP TABLE IF EXISTS `task_order_cost_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_2017` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `report_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab上报距离',
  `report_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc上报距离',
  `report_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca上报距离',
  `report_amount` double(11,2) DEFAULT NULL COMMENT '上报费用',
  `guidance_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab推荐距离',
  `guidance_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc推荐距离',
  `guidance_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca推荐距离',
  `guidance_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `settle_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `fixed_price_type` int(11) DEFAULT NULL COMMENT '一口价种类',
  `fixed_price` double(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT '过路桥费ab',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT '过路桥费bc',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT '过路桥费ca',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `tyre_number` int(11) DEFAULT NULL COMMENT '辅助轮个数',
  `tyre_price` double(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_price` int(11) DEFAULT '0',
  `unit_price` double DEFAULT '0',
  `mileage` int(11) DEFAULT '0',
  `dilemma_fee` int(11) DEFAULT '0',
  `base_price` int(11) DEFAULT '0',
  `assist_fee` int(11) DEFAULT '0',
  `total_fee` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_his_ibk1` (`task_order_id`),
  KEY `task_order_cost_his_ibk2` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_2018`
--

DROP TABLE IF EXISTS `task_order_cost_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `report_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab上报距离',
  `report_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc上报距离',
  `report_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca上报距离',
  `report_amount` double(11,2) DEFAULT NULL COMMENT '上报费用',
  `guidance_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab推荐距离',
  `guidance_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc推荐距离',
  `guidance_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca推荐距离',
  `guidance_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `settle_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `fixed_price_type` int(11) DEFAULT NULL COMMENT '一口价种类',
  `fixed_price` double(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT '过路桥费ab',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT '过路桥费bc',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT '过路桥费ca',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `tyre_number` int(11) DEFAULT NULL COMMENT '辅助轮个数',
  `tyre_price` double(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_price` int(11) DEFAULT '0',
  `unit_price` double DEFAULT '0',
  `mileage` int(11) DEFAULT '0',
  `dilemma_fee` int(11) DEFAULT '0',
  `base_price` int(11) DEFAULT '0',
  `assist_fee` int(11) DEFAULT '0',
  `total_fee` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_his_ibk1` (`task_order_id`),
  KEY `task_order_cost_his_ibk2` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_2019`
--

DROP TABLE IF EXISTS `task_order_cost_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `report_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab上报距离',
  `report_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc上报距离',
  `report_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca上报距离',
  `report_amount` double(11,2) DEFAULT NULL COMMENT '上报费用',
  `guidance_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab推荐距离',
  `guidance_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc推荐距离',
  `guidance_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca推荐距离',
  `guidance_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `settle_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `fixed_price_type` int(11) DEFAULT NULL COMMENT '一口价种类',
  `fixed_price` double(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text COMMENT '一口价说明',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT '过路桥费ab',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT '过路桥费bc',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT '过路桥费ca',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `tyre_number` int(11) DEFAULT NULL COMMENT '辅助轮个数',
  `tyre_price` double(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费',
  `other_amount_remark` text COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` text COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_price` int(11) DEFAULT '0',
  `unit_price` double DEFAULT '0',
  `mileage` int(11) DEFAULT '0',
  `dilemma_fee` int(11) DEFAULT '0',
  `base_price` int(11) DEFAULT '0',
  `assist_fee` int(11) DEFAULT '0',
  `total_fee` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `task_order_cost_his_ibk1` (`task_order_id`),
  KEY `task_order_cost_his_ibk2` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_2020`
--

DROP TABLE IF EXISTS `task_order_cost_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `user_order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `task_order_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_settle_type` int(11) DEFAULT NULL COMMENT '任务服务商结算方式',
  `task_settle_id` int(11) DEFAULT NULL COMMENT '任务服务商结算id',
  `is_supplier_settle` int(11) DEFAULT NULL COMMENT '是否向下结算: 0:否， 1： 是',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `report_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab上报距离',
  `report_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc上报距离',
  `report_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca上报距离',
  `report_amount` double(11,2) DEFAULT NULL COMMENT '上报费用',
  `guidance_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab推荐距离',
  `guidance_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc推荐距离',
  `guidance_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca推荐距离',
  `guidance_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `settle_mileage_ab` double(11,0) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` double(11,0) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` double(11,0) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` double(11,2) DEFAULT NULL COMMENT '预估费用',
  `fixed_price_type` int(11) DEFAULT NULL COMMENT '一口价种类',
  `fixed_price` double(11,2) DEFAULT NULL COMMENT '一口价结算',
  `fixed_price_remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '一口价说明',
  `bridge_amount_ab` double(11,2) DEFAULT NULL COMMENT '过路桥费ab',
  `bridge_amount_bc` double(11,2) DEFAULT NULL COMMENT '过路桥费bc',
  `bridge_amount_ca` double(11,2) DEFAULT NULL COMMENT '过路桥费ca',
  `wait_amount` double(11,2) DEFAULT NULL COMMENT '等候费',
  `tyre_number` int(11) DEFAULT NULL COMMENT '辅助轮个数',
  `tyre_price` double(11,2) DEFAULT NULL COMMENT '辅助轮单价',
  `other_amount` double(11,2) DEFAULT NULL COMMENT '其他费',
  `other_amount_remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '其他费用说明',
  `customer_amount` double(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '收取客户金额说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `start_price` int(11) DEFAULT '0',
  `unit_price` double DEFAULT '0',
  `mileage` int(11) DEFAULT '0',
  `dilemma_fee` int(11) DEFAULT '0',
  `base_price` int(11) DEFAULT '0',
  `assist_fee` int(11) DEFAULT '0',
  `total_fee` int(11) DEFAULT '0',
  `drop_mileage` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `task_order_cost_his_ibk1` (`task_order_id`) USING BTREE,
  KEY `task_order_cost_his_ibk2` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_cost_his_record`
--

DROP TABLE IF EXISTS `task_order_cost_his_record`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_cost_his_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单成本id',
  `task_order_cost_his_id` int(11) NOT NULL COMMENT '订单id',
  `supplier_settle_mileage_ab` decimal(11,2) DEFAULT NULL COMMENT '供应商ab结算距离',
  `supplier_settle_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT '供应商bc结算距离',
  `supplier_settle_mileage_ca` decimal(11,2) DEFAULT NULL COMMENT '供应商ca结算距离',
  `supplier_other_amount` decimal(11,2) DEFAULT NULL COMMENT '其他费(供应商）',
  `supplier_settle_amount` decimal(11,2) DEFAULT NULL COMMENT '供应商结算金额',
  `supplier_bridge_amount_ab` decimal(11,2) DEFAULT NULL COMMENT 'ab段路桥费（供应商）',
  `supplier_bridge_amount_bc` decimal(11,2) DEFAULT NULL COMMENT 'bc段路桥费（供应商）',
  `supplier_bridge_amount_ca` decimal(11,2) DEFAULT NULL COMMENT 'ca段路桥费（供应商）',
  `supplier_dilemma_amount` decimal(11,2) DEFAULT NULL COMMENT '困境费（供应商）',
  `supplier_tyre_amount` decimal(11,2) DEFAULT NULL COMMENT '小轮费（供应商）',
  `supplier_wait_amount` decimal(11,2) DEFAULT NULL COMMENT '等候费（供应商）',
  `supplier_other_amount_remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '其他费用说明（供应商）',
  `supplier_customer_amount` decimal(11,2) DEFAULT NULL COMMENT '收取客户金额（供应商）',
  `supplier_customer_amount_remark` varchar(255) DEFAULT NULL COMMENT '收取客户说明（供应商）',
  `dilemma_amount` decimal(11,2) DEFAULT NULL COMMENT '困境费',
  `tyre_amount` decimal(11,2) DEFAULT NULL COMMENT '小轮费',
  `wait_amount` decimal(11,2) DEFAULT NULL COMMENT '等候费',
  `bridge_amount_ab` decimal(11,2) DEFAULT NULL COMMENT 'ab段路桥费',
  `bridge_amount_bc` decimal(11,2) DEFAULT NULL COMMENT 'bc段路桥费',
  `bridge_amount_ca` decimal(11,2) DEFAULT NULL COMMENT 'ca段路桥费',
  `supplier_remark` varchar(255) DEFAULT NULL COMMENT '供应商描述',
  `settle_mileage_ab` decimal(11,2) DEFAULT NULL COMMENT 'ab结算距离',
  `settle_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT 'bc结算距离',
  `settle_mileage_ca` decimal(11,2) DEFAULT NULL COMMENT 'ca结算距离',
  `settle_amount` decimal(11,2) DEFAULT NULL COMMENT '结算金额',
  `other_amount` decimal(11,2) DEFAULT '0.00' COMMENT '其他费',
  `other_amount_remark` varchar(1000) DEFAULT NULL COMMENT '其他费用说明',
  `customer_amount` decimal(11,2) DEFAULT NULL COMMENT '收取客户金额',
  `customer_amount_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '收取客户金额说明',
  `audit_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核说明',
  `account_status` int(11) DEFAULT NULL COMMENT '对账状态(0:待供应商记账，1：等待审核，2：审核失败3：再次审核，4：审核完成，5：通知开票)',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `batch_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '批次号',
  `check_count` int(11) DEFAULT NULL COMMENT '退回次数',
  `audit_user` varchar(20) DEFAULT NULL COMMENT '审核人',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `task_order_cost_his_record_ibfk_1` (`task_order_cost_his_id`) USING BTREE,
  CONSTRAINT `task_order_cost_his_record_ibfk_1` FOREIGN KEY (`task_order_cost_his_id`) REFERENCES `task_order_cost_his` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_haibao_insurance`
--

DROP TABLE IF EXISTS `task_order_haibao_insurance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_haibao_insurance` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `order_id` bigint(20) DEFAULT NULL,
  `order_no` varchar(50) DEFAULT NULL,
  `plate` varchar(20) DEFAULT NULL,
  `rescue_company_name` varchar(50) DEFAULT NULL,
  `service_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务类型',
  `driver_id` bigint(20) DEFAULT NULL,
  `driver_mobile` varchar(11) DEFAULT NULL,
  `driver_id_no` varchar(18) DEFAULT NULL,
  `driver_name` varchar(50) DEFAULT NULL,
  `order_time` datetime DEFAULT NULL,
  `arrival_time` datetime DEFAULT NULL,
  `product_id` varchar(50) DEFAULT NULL,
  `product_name` varchar(50) DEFAULT NULL,
  `partner_code` varchar(50) DEFAULT NULL,
  `hb_order_no` varchar(50) DEFAULT NULL,
  `policy_no` varchar(50) DEFAULT NULL,
  `premium` decimal(12,2) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `status` tinyint(2) DEFAULT NULL COMMENT '1新建订单  2 第一次已推送 3 第二次已推送 4.已完成',
  `start_address` varchar(500) DEFAULT NULL COMMENT '起点',
  `destination` varchar(500) DEFAULT NULL COMMENT '救援车辆目的地',
  `termination` varchar(500) DEFAULT NULL COMMENT '终点',
  `kilo_meters` decimal(12,2) DEFAULT NULL COMMENT '公里',
  `policy_state` int(11) DEFAULT NULL COMMENT '保单状态',
  `policy_amount` decimal(11,2) DEFAULT NULL COMMENT '保险金额',
  PRIMARY KEY (`id`),
  KEY `order_no` (`order_no`),
  KEY `driver_id` (`driver_id`)
) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his`
--

DROP TABLE IF EXISTS `task_order_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_vehicle_user_name` varchar(255) DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `check_complete_time` datetime DEFAULT NULL COMMENT '验车完成时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  `driver_accept_time` datetime DEFAULT NULL,
  `finish_user` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_time` datetime DEFAULT NULL,
  `first_contact_time` datetime DEFAULT NULL,
  `contact_success_time` datetime DEFAULT NULL,
  `input_address` varchar(255) DEFAULT NULL,
  `device_binding` varchar(100) DEFAULT NULL,
  `photo_size` int(11) DEFAULT NULL,
  `audit_seat_user` varchar(100) DEFAULT NULL COMMENT '坐席审核人',
  `audit_seat_time` datetime DEFAULT NULL COMMENT '坐席审核时间',
  `polymerize_faile_reason` varchar(255) DEFAULT NULL,
  `vehicle_terminal` tinyint(11) DEFAULT '0' COMMENT '车辆终端 0 线下 1 app 2 wx',
  `bpoint_photo_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_photo_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_photo_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_photo_latitude` decimal(16,6) DEFAULT NULL,
  `photo_mileage_ab` decimal(11,3) DEFAULT NULL,
  `photo_mileage_bc` decimal(11,3) DEFAULT NULL,
  `photo_mileage_ca` decimal(11,3) DEFAULT NULL,
  `supplier_order_id` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_his_ibfk_1` (`user_order_id`),
  KEY `task_order_his_ibfk_code` (`code`) USING BTREE,
  KEY `task_order_his_ibfk_task_status` (`task_status`) USING BTREE,
  KEY `task_order_his_ibfk_service_supplier_id` (`service_supplier_id`) USING BTREE,
  KEY `task_order_his_ibfk_first_service_supplier_id` (`first_service_supplier_id`) USING BTREE,
  CONSTRAINT `task_order_his_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13313 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his_2016`
--

DROP TABLE IF EXISTS `task_order_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his_2016` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_his_ibfk_1` (`user_order_id`),
  CONSTRAINT `task_order_his_2016_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his_2017`
--

DROP TABLE IF EXISTS `task_order_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his_2017` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_his_ibfk_1` (`user_order_id`),
  CONSTRAINT `task_order_his_2017_ibfk_1` FOREIGN KEY (`user_order_id`) REFERENCES `user_order_his` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his_2018`
--

DROP TABLE IF EXISTS `task_order_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_his_ibfk_1` (`user_order_id`),
  KEY `task_order_his_ibfk_service_supplier_id` (`service_supplier_id`,`first_service_supplier_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his_2019`
--

DROP TABLE IF EXISTS `task_order_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text,
  `give_up_point_address` varchar(255) DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) DEFAULT NULL,
  `audit_seat_remark` varchar(255) DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) DEFAULT NULL,
  `trace_id_bc_path` varchar(255) DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `task_order_his_ibfk_1` (`user_order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_his_2020`
--

DROP TABLE IF EXISTS `task_order_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_order_id` int(11) DEFAULT NULL,
  `code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务编号',
  `first_service_supplier_id` int(11) DEFAULT NULL COMMENT '首次服务商',
  `service_supplier_id` int(11) DEFAULT NULL COMMENT '服务供应商',
  `task_service_id` int(11) DEFAULT NULL COMMENT '任务id',
  `task_flow_id` int(11) DEFAULT NULL COMMENT '任务flow_id',
  `task_vehicle_id` int(11) DEFAULT NULL COMMENT '服务车辆id',
  `task_vehicle_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务车辆名称',
  `driver_id` int(11) DEFAULT NULL COMMENT '司机id',
  `driver_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '司机名称',
  `driver_phone` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '司机电话',
  `task_status` int(11) DEFAULT NULL COMMENT '任务状态',
  `task_success_status` int(11) DEFAULT NULL COMMENT '任务完成状态：0： 未完成， 1：完成',
  `dispatch_status` int(11) DEFAULT NULL COMMENT '调度状态',
  `dispatch_type` int(11) DEFAULT NULL COMMENT '派单方式: 1. 电话， 2：app ，3: 系统 ， 4： 微信',
  `process_detail_id` int(11) DEFAULT NULL COMMENT '任务流程节点',
  `first_dispatch_time` datetime DEFAULT NULL COMMENT '首次调度时间',
  `first_dispatcher_id` int(11) DEFAULT NULL COMMENT '首次调度人',
  `first_dispatcher_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '首次调度人',
  `dispatch_user_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `dispatch_user_id` int(11) DEFAULT NULL COMMENT '派遣人',
  `dispatch_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `dispatch_times` int(11) DEFAULT NULL COMMENT '派遣次数',
  `apoint_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '出发地',
  `apoint_code` int(11) DEFAULT NULL,
  `apoint_longtitude` decimal(16,8) DEFAULT NULL,
  `apoint_latitude` decimal(16,8) DEFAULT NULL,
  `bpoint_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '服务地',
  `bpoint_code` int(11) DEFAULT NULL,
  `bpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `bpoint_latitude` decimal(16,6) DEFAULT NULL,
  `bpoint_estimated_time` datetime DEFAULT NULL COMMENT '预估到达时间',
  `cpoint_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '目的地',
  `cpoint_code` int(11) DEFAULT NULL,
  `cpoint_longtitude` decimal(16,6) DEFAULT NULL,
  `cpoint_latitude` decimal(16,6) DEFAULT NULL,
  `cpoint_estimated_time` datetime DEFAULT NULL COMMENT '预计到达目的地时间',
  `task_accept_time` datetime DEFAULT NULL COMMENT '任务接受时间',
  `depart_time` datetime DEFAULT NULL COMMENT '出发时间',
  `arrive_time` datetime DEFAULT NULL COMMENT '到达服务地时间',
  `work_complete_time` datetime DEFAULT NULL COMMENT '作业完成时间',
  `dest_arrive_time` datetime DEFAULT NULL COMMENT '到达目的地时间',
  `task_end_time` datetime DEFAULT NULL COMMENT '服务结束时间',
  `finish_time` datetime DEFAULT NULL COMMENT '完成时间',
  `vehicle_examination_information` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `give_up_point_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '放弃地址',
  `give_up_point_code` int(11) DEFAULT NULL COMMENT '放弃code',
  `give_up_point_longtitude` decimal(16,8) DEFAULT NULL COMMENT '放弃经度',
  `give_up_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '放弃纬度',
  `give_up_time` datetime DEFAULT NULL COMMENT '放弃时间',
  `give_up_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '放弃原因',
  `give_up_status` int(11) DEFAULT NULL COMMENT '放弃状态   (1, "未派遣"), (2, "未到现场"),(3, "到达现场");',
  `give_up_kilometres` int(11) DEFAULT NULL COMMENT '放弃公里数',
  `audit_fail_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `audit_status` int(11) DEFAULT '0' COMMENT '审核通过: 1: 无需审核， 2： 需要审核， 3： 审核完成',
  `audit_remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '审核原因',
  `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  `audit_user_id` int(11) DEFAULT NULL COMMENT '审核人',
  `audit_user_name` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `dispatch_supplier_id` int(11) DEFAULT NULL COMMENT '做调度的供应商',
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `holdon` int(11) DEFAULT NULL,
  `audit_supplier_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `audit_seat_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `seat_audit_status` int(11) DEFAULT NULL,
  `is_current` int(11) DEFAULT '0',
  `trace_id_ab` int(11) DEFAULT NULL,
  `trace_id_bc` int(11) DEFAULT NULL,
  `trace_id_ab_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `trace_id_bc_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `dispatch_vehicle_status` int(11) DEFAULT NULL,
  `driver_accept_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `task_order_his_ibfk_1` (`user_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `task_order_record_picture`
--

DROP TABLE IF EXISTS `task_order_record_picture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `task_order_record_picture` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `url` varchar(255) DEFAULT NULL COMMENT '图片路径',
  `task_order_cost_record_id` int(11) DEFAULT NULL COMMENT '供应商记账id',
  `create_time` datetime DEFAULT NULL COMMENT '更新时间',
  `upload_user` varchar(30) DEFAULT NULL COMMENT '上传人',
  `state` int(11) DEFAULT NULL COMMENT '(0:供应商描述照片，1：审核图片)',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order`
--

DROP TABLE IF EXISTS `user_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL,
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) DEFAULT NULL COMMENT '身份证',
  `brand` varchar(100) DEFAULT NULL COMMENT '品牌',
  `model` varchar(100) DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `contract_settle_service_id` int(11) DEFAULT NULL COMMENT '合同结算服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `contract_malfunction_reason` int(11) DEFAULT NULL,
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(600) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT NULL COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `contract_input_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT '合同一口价输入bc',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `insurance_surveyor_phone` varchar(225) DEFAULT NULL COMMENT '查勘员电话',
  `url_remark` varchar(225) DEFAULT NULL COMMENT 'url备注',
  `mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候ab距离',
  `mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候bc距离',
  `mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT '0' COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(50) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` decimal(11,2) DEFAULT '0.00' COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `weather` int(11) DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `fuel_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `enjoy_benefits_result` int(11) DEFAULT NULL COMMENT '后续利益宣导结果 1, 暂时保留；2，不需要；3，需要；',
  `parent_contract_id` int(11) DEFAULT NULL,
  `pingan_data_source` int(11) DEFAULT NULL,
  `supplement_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `supplement_time` datetime DEFAULT NULL,
  `organize_name` varchar(255) DEFAULT NULL,
  `seating_group_id` int(11) DEFAULT NULL COMMENT '坐席分组id',
  `assign_time` datetime DEFAULT NULL COMMENT '派遣时间',
  `work_order_type` int(11) DEFAULT NULL COMMENT '订单所属派工类型',
  `rescue_person_tel` varchar(255) DEFAULT NULL COMMENT '推荐的救援师傅手机号',
  `jlr_electric_test_id` int(11) DEFAULT NULL,
  `rescue_person_name` varchar(255) DEFAULT NULL COMMENT '推荐的救援师傅名字',
  `environment_pic` varchar(255) DEFAULT NULL,
  `juhe_vehicle_id` int(11) DEFAULT NULL COMMENT '聚合司机id',
  `juhe_supplier_id` int(11) DEFAULT NULL COMMENT '聚合供应商id',
  `jlr_customer_tag` varchar(1000) DEFAULT NULL,
  `polymerize_distance` decimal(11,2) DEFAULT NULL,
  `polymerize_duration` varchar(255) DEFAULT NULL,
  `principal_user_name` varchar(120) DEFAULT NULL COMMENT '案件责任人',
  `handover_user_name` varchar(120) DEFAULT NULL COMMENT '交接人',
  `model_vin_no` varchar(150) DEFAULT NULL COMMENT '系统车型',
  `white_customer_type` int(11) DEFAULT NULL COMMENT '白名单客户类型',
  `rescue_remind` varchar(600) DEFAULT NULL COMMENT '救援提醒',
  `white_rescue_remind` varchar(600) DEFAULT NULL COMMENT '白名单救援提醒',
  `special_remind` varchar(600) DEFAULT NULL COMMENT '特殊提醒',
  `risk_remind` varchar(600) DEFAULT NULL COMMENT '风险提醒',
  `distance_limit` int(11) DEFAULT NULL COMMENT '限制公⾥数',
  `relation_order_type` int(11) DEFAULT NULL,
  `special_dispatch_time` datetime DEFAULT NULL,
  `contract_settle_rule` int(11) DEFAULT '1' COMMENT '合同结算使用规则',
  `service_for_man_final_result` int(11) DEFAULT NULL,
  `pay_code` varchar(100) DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `paid_fee` decimal(11,2) DEFAULT NULL,
  `history_modify_user` varchar(100) DEFAULT NULL COMMENT '历史修改人',
  `complain_settle_result` int(11) DEFAULT NULL COMMENT '投诉不结算类型',
  `first_supplier_area_type` int(11) DEFAULT NULL,
  `is_water_mark` int(2) DEFAULT NULL COMMENT '是否需要水印',
  `risk_phone_supplier_name` varchar(50) DEFAULT NULL COMMENT '风险电话对应服务商',
  `first_vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '首次创建事发地地址',
  `first_destination_address` varchar(255) DEFAULT NULL COMMENT '首次创建目的地地址',
  `test_order` int(1) DEFAULT NULL COMMENT '是否测试案件',
  `auth_user_name` varchar(50) DEFAULT NULL COMMENT '授权人',
  `free_time` int(9) DEFAULT NULL COMMENT '免等时间',
  `relation` int(9) DEFAULT NULL COMMENT '是否联系',
  `need_open_case_credential` tinyint(4) DEFAULT NULL COMMENT '是否需要开案凭证',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_serivce` (`order_status`,`flow_id`,`service_id`) USING BTREE,
  KEY `user_order_his_ibfk_code` (`code`,`outer_code`) USING BTREE,
  KEY `user_order_his_ibfk_one_key` (`user_phone`,`vin_no`,`plate_number`) USING BTREE,
  KEY `user_order_his_ibfk_contract` (`parent_contract_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2656428 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his`
--

DROP TABLE IF EXISTS `user_order_his`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) DEFAULT NULL COMMENT '身份证',
  `brand` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '品牌',
  `model` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `contract_settle_service_id` int(11) DEFAULT NULL COMMENT '合同结算服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `contract_malfunction_reason` int(11) DEFAULT NULL,
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(600) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT NULL COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `contract_input_mileage_bc` decimal(11,2) DEFAULT NULL COMMENT '合同一口价输入bc',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `insurance_surveyor_phone` varchar(225) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '查勘员电话',
  `url_remark` varchar(255) DEFAULT NULL,
  `mileage_ab` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候ab距离',
  `mileage_bc` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候bc距离',
  `mileage_ca` decimal(11,3) DEFAULT '0.000' COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT '0' COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` decimal(11,2) DEFAULT '0.00' COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `weather` int(11) DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `fuel_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `enjoy_benefits_result` int(11) DEFAULT NULL COMMENT '后续利益宣导结果 1, 暂时保留；2，不需要；3，需要；',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  `pingan_data_source` int(11) DEFAULT NULL,
  `supplement_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `supplement_time` datetime DEFAULT NULL,
  `organize_name` varchar(255) DEFAULT NULL,
  `seating_group_id` int(11) DEFAULT NULL,
  `assign_time` datetime DEFAULT NULL,
  `work_order_type` int(11) DEFAULT NULL COMMENT '订单所属派工类型',
  `rescue_person_tel` varchar(255) DEFAULT NULL COMMENT '推荐的救援师傅手机号',
  `jlr_electric_test_id` int(11) DEFAULT NULL,
  `rescue_person_name` varchar(255) DEFAULT NULL,
  `environment_pic` varchar(255) DEFAULT NULL,
  `juhe_vehicle_id` int(11) DEFAULT NULL COMMENT '聚合司机id',
  `juhe_supplier_id` int(11) DEFAULT NULL COMMENT '聚合供应商id',
  `jlr_customer_tag` varchar(1000) DEFAULT NULL,
  `polymerize_distance` decimal(11,2) DEFAULT NULL,
  `polymerize_duration` varchar(255) DEFAULT NULL,
  `principal_user_name` varchar(120) DEFAULT NULL COMMENT '案件责任人',
  `handover_user_name` varchar(120) DEFAULT NULL COMMENT '交接人',
  `model_vin_no` varchar(150) DEFAULT NULL COMMENT '系统车型',
  `white_customer_type` int(11) DEFAULT NULL COMMENT '白名单客户类型',
  `rescue_remind` varchar(600) DEFAULT NULL COMMENT '救援提醒',
  `white_rescue_remind` varchar(600) DEFAULT NULL COMMENT '白名单救援提醒',
  `special_remind` varchar(600) DEFAULT NULL COMMENT '特殊提醒',
  `risk_remind` varchar(600) DEFAULT NULL COMMENT '风险提醒',
  `distance_limit` int(11) DEFAULT NULL COMMENT '限制公⾥数',
  `relation_order_type` int(11) DEFAULT NULL,
  `special_dispatch_time` datetime DEFAULT NULL COMMENT '特殊派遣时间',
  `contract_settle_rule` int(11) DEFAULT '1' COMMENT '合同结算使用规则',
  `service_for_man_final_result` int(11) DEFAULT NULL,
  `pay_code` varchar(100) DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `paid_fee` decimal(11,2) DEFAULT NULL,
  `history_modify_user` varchar(100) DEFAULT NULL COMMENT '历史修改人',
  `complain_settle_result` int(11) DEFAULT NULL COMMENT '投诉不结算类型',
  `first_supplier_area_type` int(11) DEFAULT NULL,
  `is_water_mark` int(2) DEFAULT NULL COMMENT '是否需要水印',
  `risk_phone_supplier_name` varchar(50) DEFAULT NULL COMMENT '风险电话对应服务商',
  `first_vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '首次创建事发地地址',
  `first_destination_address` varchar(255) DEFAULT NULL COMMENT '首次创建目的地地址',
  `test_order` int(1) DEFAULT NULL COMMENT '是否测试案件',
  `auth_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '授权人',
  `free_time` int(9) DEFAULT NULL COMMENT '免等时间',
  `relation` int(9) DEFAULT NULL COMMENT '是否联系',
  `need_open_case_credential` tinyint(4) DEFAULT NULL COMMENT '是否需要开案凭证',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_serivce` (`order_status`,`flow_id`,`service_id`) USING BTREE,
  KEY `user_order_his_ibfk_one_key` (`user_phone`,`vin_no`,`plate_number`) USING BTREE,
  KEY `user_order_his_ibfk_code` (`code`) USING BTREE,
  KEY `user_order_his_ibfk_outer_code` (`outer_code`) USING BTREE,
  KEY `user_order_his_ibfk_update_time` (`update_time`) USING BTREE,
  KEY `idx_vehicle_point_code` (`vehicle_point_code`) USING BTREE,
  KEY `idx_contract_id` (`contract_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2656425 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his_2016`
--

DROP TABLE IF EXISTS `user_order_his_2016`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his_2016` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(255) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT '0' COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `url_remark` varchar(255) DEFAULT NULL,
  `insurance_surveyor_phone` varchar(225) DEFAULT NULL COMMENT '查勘员电话',
  `mileage_ab` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ab距离',
  `mileage_bc` double(11,0) DEFAULT NULL COMMENT '生成订单的时候bc距离',
  `mileage_ca` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT NULL COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` double(11,0) DEFAULT NULL COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `drop_mileage` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `vehicle_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `order_channel` int(11) DEFAULT NULL COMMENT '工单来源渠道1 CALL、2 CRC-CALL  3 B-CALL、 4 APP',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_2` (`order_depart_time`) USING BTREE,
  KEY `user_order_his_ibfk_3` (`order_arrive_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his_2017`
--

DROP TABLE IF EXISTS `user_order_his_2017`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his_2017` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(255) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT '0' COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `url_remark` varchar(255) DEFAULT NULL,
  `insurance_surveyor_phone` varchar(225) DEFAULT NULL COMMENT '查勘员电话',
  `mileage_ab` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ab距离',
  `mileage_bc` double(11,0) DEFAULT NULL COMMENT '生成订单的时候bc距离',
  `mileage_ca` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT NULL COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` double(11,0) DEFAULT NULL COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `drop_mileage` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `vehicle_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `order_channel` int(11) DEFAULT NULL COMMENT '工单来源渠道1 CALL、2 CRC-CALL  3 B-CALL、 4 APP',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_2` (`order_depart_time`) USING BTREE,
  KEY `user_order_his_ibfk_3` (`order_arrive_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his_2018`
--

DROP TABLE IF EXISTS `user_order_his_2018`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his_2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(255) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT '0' COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `url_remark` varchar(255) DEFAULT NULL,
  `insurance_surveyor_phone` varchar(225) DEFAULT NULL COMMENT '查勘员电话',
  `mileage_ab` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ab距离',
  `mileage_bc` double(11,0) DEFAULT NULL COMMENT '生成订单的时候bc距离',
  `mileage_ca` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT NULL COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` double(11,0) DEFAULT NULL COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `drop_mileage` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `vehicle_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `order_channel` int(11) DEFAULT NULL COMMENT '工单来源渠道1 CALL、2 CRC-CALL  3 B-CALL、 4 APP',
  `weather` int(11) DEFAULT NULL,
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_2` (`order_depart_time`) USING BTREE,
  KEY `user_order_his_ibfk_3` (`order_arrive_time`) USING BTREE,
  KEY `user_order_his_ibfk_supplier_id` (`supplier_id`) USING BTREE,
  KEY `user_order_his_ibfk_contract_id` (`contract_id`) USING BTREE,
  KEY `user_order_his_ibfk_area_code` (`vehicle_point_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his_2019`
--

DROP TABLE IF EXISTS `user_order_his_2019`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his_2019` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(255) DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT '0' COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) DEFAULT NULL COMMENT '查勘员名称',
  `url_remark` varchar(255) DEFAULT NULL,
  `insurance_surveyor_phone` varchar(225) DEFAULT NULL COMMENT '查勘员电话',
  `mileage_ab` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ab距离',
  `mileage_bc` double(11,0) DEFAULT NULL COMMENT '生成订单的时候bc距离',
  `mileage_ca` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT NULL COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` double(11,0) DEFAULT NULL COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) DEFAULT NULL,
  `order_remark` varchar(255) DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `level1` varchar(255) DEFAULT NULL,
  `level2` varchar(255) DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `vehicle_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `order_channel` int(11) DEFAULT NULL COMMENT '工单来源渠道1 CALL、2 CRC-CALL  3 B-CALL、 4 APP',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  PRIMARY KEY (`id`),
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_2` (`order_depart_time`) USING BTREE,
  KEY `user_order_his_ibfk_3` (`order_arrive_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_order_his_2020`
--

DROP TABLE IF EXISTS `user_order_his_2020`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_order_his_2020` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '订单id',
  `supplier_id` int(11) DEFAULT NULL COMMENT '所属服务商',
  `code` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '订单编号',
  `outer_code` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '外部编号',
  `sub_order_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '外部子订单id',
  `contract_id` int(11) DEFAULT NULL COMMENT '合同编号',
  `organize_id` int(11) DEFAULT NULL COMMENT '机构',
  `service_group_id` int(11) DEFAULT NULL COMMENT '合同会员所属服务组',
  `member_service_group_id` int(11) DEFAULT NULL COMMENT '会员服务组id',
  `contract_member_id` int(11) DEFAULT NULL COMMENT '会员id',
  `user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车主姓名',
  `user_phone` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车主电话',
  `report_phone` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '报案电话',
  `document_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '单证号',
  `vin_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车牌号',
  `id_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证',
  `brand` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '品牌',
  `model` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车型',
  `vehicle_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车主备注',
  `outer_service_id` int(11) DEFAULT NULL COMMENT '推送服务id',
  `service_id` int(11) DEFAULT NULL COMMENT '服务id',
  `flow_id` int(11) DEFAULT NULL COMMENT '流程id',
  `service_remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '服务备注',
  `order_status` int(11) DEFAULT NULL COMMENT '案件状态',
  `create_operator_id` int(11) DEFAULT NULL COMMENT '创建人',
  `create_operator_name` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `first_operator_user_id` int(11) DEFAULT NULL COMMENT '首处理人',
  `first_operator_user_name` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '首处理人',
  `first_operate_time` datetime DEFAULT NULL COMMENT '首处理时间',
  `position_environment` int(11) DEFAULT NULL COMMENT '位置信息',
  `malfunction_reason` int(11) DEFAULT NULL COMMENT '故障原因',
  `malfunction_type` int(11) DEFAULT NULL COMMENT '故障类型',
  `malfunction_level1` int(11) DEFAULT NULL COMMENT '故障等级1',
  `malfunction_level2` int(11) DEFAULT NULL COMMENT '故障等级2',
  `malfunction_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '故障描述',
  `is_appoint` int(11) DEFAULT '0' COMMENT '是否预约',
  `appoint_time` datetime DEFAULT NULL COMMENT '预约时间',
  `vehicle_point_code` int(11) DEFAULT NULL COMMENT '事发地区',
  `vehicle_point_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '事发地址',
  `vehicle_point_longitude` decimal(16,8) DEFAULT NULL COMMENT '事发经度',
  `vehicle_point_latitude` decimal(16,8) DEFAULT NULL COMMENT '事发维度',
  `vehicle_point_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '事发地备注',
  `contract_destination_id` int(11) DEFAULT NULL,
  `destination_code` int(11) DEFAULT NULL COMMENT '目的地地区编码',
  `destination_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '目的地地址',
  `destination_longitude` decimal(16,8) DEFAULT NULL COMMENT '目的地经度',
  `destination_latitude` decimal(16,8) DEFAULT NULL COMMENT '目的地纬度',
  `destination_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '目的地备注',
  `destination_2nd_code` int(11) DEFAULT NULL COMMENT '第二目的地编码',
  `destination_2nd_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '第二目的地地址',
  `destination_2nd_longitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地经度',
  `destination_2nd_latitude` decimal(16,8) DEFAULT NULL COMMENT '第二目的地纬度',
  `destination_2nd_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '第二目的地备注',
  `assign_type` int(11) DEFAULT '0' COMMENT '派遣类型：1： 紧急派遣，2：需派遣，3：暂不派遣， 4 ： 自动调度',
  `contract_settle_type` int(11) DEFAULT '0' COMMENT '合同结算方式：1, "企业月结"， 2, "车主现收"',
  `is_contract_settle` int(11) DEFAULT '1' COMMENT '是否向上结算: 0:否， 1： 是',
  `contract_settle_id` int(11) DEFAULT NULL COMMENT '向上结算id',
  `contract_settle_count` decimal(11,2) DEFAULT NULL COMMENT '合同结算价格',
  `appraise_status` int(11) DEFAULT '1' COMMENT '是否评价 (1, "需要评价"), (2, "无需评价"), (2, "评价完成");',
  `insurance_surveyor_name` varchar(225) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '查勘员名称',
  `url_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `insurance_surveyor_phone` varchar(225) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '查勘员电话',
  `mileage_ab` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ab距离',
  `mileage_bc` double(11,0) DEFAULT NULL COMMENT '生成订单的时候bc距离',
  `mileage_ca` double(11,0) DEFAULT NULL COMMENT '生成订单的时候ca距离',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `order_deal_time` datetime DEFAULT NULL COMMENT '订单首次处理时间',
  `order_dispatch_time` datetime DEFAULT NULL COMMENT '首次接受调度时间',
  `order_depart_time` datetime DEFAULT NULL COMMENT '订单首次发车时间',
  `order_arrive_time` datetime DEFAULT NULL COMMENT '订单首次到达时间',
  `order_work_complete_time` datetime DEFAULT NULL COMMENT '订单首次作业完成时间',
  `order_arrive_dest_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `finish_time` datetime DEFAULT NULL COMMENT '订单首次到达目的地时间',
  `is_new_car` tinyint(4) DEFAULT '0' COMMENT '是否新车 0否，1是',
  `vehicle_miles` int(11) DEFAULT NULL COMMENT '车辆行驶里程数',
  `relation_order_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `pay_state` int(11) DEFAULT '0' COMMENT '待通知',
  `extra_fee` double(11,0) DEFAULT NULL COMMENT '额外支付费用',
  `damage_time` datetime DEFAULT NULL COMMENT '出险时间',
  `reporter_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '报案人名称',
  `data_source` int(11) DEFAULT NULL COMMENT '救援受理来源',
  `is_online` int(11) DEFAULT NULL COMMENT '是否线上救援',
  `is_need_garage` int(11) DEFAULT NULL COMMENT '是否需要推修',
  `give_up_time` datetime DEFAULT NULL,
  `give_up_source` int(11) DEFAULT NULL,
  `give_up_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `order_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_nearest_dealer` int(11) DEFAULT NULL,
  `is_complain` int(11) DEFAULT NULL,
  `give_up_user_id` int(11) DEFAULT NULL,
  `give_up_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `level1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `level2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `is_enjoy_benefits` int(11) DEFAULT NULL,
  `is_yourself_order` int(11) DEFAULT NULL,
  `weather` int(11) DEFAULT NULL,
  `is_port_car` int(11) DEFAULT NULL,
  `purchase_time` datetime DEFAULT NULL COMMENT '售车时间',
  `fuel_type` int(11) DEFAULT NULL COMMENT '工单车辆类型(1汽油车 2纯电动车、3混动车)',
  `enjoy_benefits_result` int(11) DEFAULT NULL COMMENT '后续利益宣导结果 1, 暂时保留；2，不需要；3，需要；',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '一级合同id',
  `pingan_data_source` int(11) DEFAULT NULL,
  `supplement_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `supplement_time` datetime DEFAULT NULL,
  `organize_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `user_order_his_ibfk_1` (`create_time`) USING BTREE,
  KEY `user_order_his_ibfk_serivce` (`order_status`,`flow_id`,`service_id`) USING BTREE,
  KEY `user_order_his_ibfk_one_key` (`user_phone`,`vin_no`,`plate_number`) USING BTREE,
  KEY `user_order_his_ibfk_code` (`code`) USING BTREE,
  KEY `user_order_his_ibfk_outer_code` (`outer_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `vehicle_mileage_fuel`
--

DROP TABLE IF EXISTS `vehicle_mileage_fuel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `vehicle_mileage_fuel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `vehicle_number` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车号',
  `driver_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `total_mileage` int(11) DEFAULT NULL COMMENT '车辆总里程数',
  `mileage` int(11) DEFAULT NULL COMMENT '行程里程数',
  `fuel_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '燃油类型',
  `refuel_amount` decimal(10,2) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `money` decimal(10,2) DEFAULT NULL,
  `refuel_means` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '加油方式',
  `city` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `refuel_date` date DEFAULT NULL COMMENT '加油日期',
  `create_user` varchar(50) DEFAULT NULL,
  `update_user` varchar(50) DEFAULT NULL,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `vehicle_mileage_fuel_ibk1` (`supplier_id`) USING BTREE,
  KEY `vehicle_mileage_fuel_ibk2` (`vehicle_number`) USING BTREE,
  KEY `vehicle_mileage_fuel_ibk3` (`driver_name`) USING BTREE,
  KEY `vehicle_mileage_fuel_ibk4` (`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1172 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `verification_code`
--

DROP TABLE IF EXISTS `verification_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `verification_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `verification_code` varchar(10) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_common_member`
--

DROP TABLE IF EXISTS `weixin_common_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_common_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(20) DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `car_brand` varchar(20) DEFAULT NULL,
  `car_type` varchar(20) DEFAULT NULL,
  `license` varchar(20) DEFAULT NULL,
  `frame_code` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_drive_app_user`
--

DROP TABLE IF EXISTS `weixin_drive_app_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_drive_app_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `open_id` varchar(50) DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL COMMENT '客户电话',
  `attention_time` datetime DEFAULT NULL COMMENT '关注时间',
  `state` int(11) DEFAULT NULL COMMENT '1 关注  2 取消关注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_org_user_info`
--

DROP TABLE IF EXISTS `weixin_org_user_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_org_user_info` (
  `weixin_user_id` int(11) NOT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `contract_organize_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `flag` int(11) DEFAULT '0',
  `login_name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`weixin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_pack_user_info`
--

DROP TABLE IF EXISTS `weixin_pack_user_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_pack_user_info` (
  `weixin_user_id` int(11) NOT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `delete_flag` int(11) DEFAULT '0',
  PRIMARY KEY (`weixin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_product_member`
--

DROP TABLE IF EXISTS `weixin_product_member`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_product_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weixin_user_id` int(11) DEFAULT NULL,
  `contract_member_id` int(11) DEFAULT NULL,
  `product_member_id` int(11) DEFAULT NULL,
  `common_member_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_sns_organize_photo`
--

DROP TABLE IF EXISTS `weixin_sns_organize_photo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_sns_organize_photo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `photo_type` int(11) DEFAULT NULL,
  `photo_path` varchar(60) DEFAULT NULL,
  `contract_id` int(11) DEFAULT NULL,
  `create_user` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `deal_user` varchar(20) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `deal_type` int(11) DEFAULT NULL,
  `fail_reason` varchar(20) DEFAULT NULL,
  `service_time` decimal(10,0) DEFAULT NULL,
  `wheel` decimal(10,0) DEFAULT NULL,
  `phone` decimal(10,0) DEFAULT NULL,
  `base_path` varchar(50) DEFAULT NULL,
  `contract_parent_id` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_sns_organize_user`
--

DROP TABLE IF EXISTS `weixin_sns_organize_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_sns_organize_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weixin_user_id` int(11) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `contract_id` varchar(20) DEFAULT NULL COMMENT '机构id',
  `sex` int(11) DEFAULT NULL,
  `identity` varchar(20) DEFAULT NULL,
  `email` varchar(30) DEFAULT NULL,
  `photo_path` varchar(60) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `deal_user` varchar(30) DEFAULT NULL,
  `deal_time` datetime DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `base_path` varchar(50) DEFAULT NULL,
  `contract_parent_id` varchar(20) DEFAULT NULL COMMENT '合同id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_sns_organize_user_score`
--

DROP TABLE IF EXISTS `weixin_sns_organize_user_score`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_sns_organize_user_score` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weixin_user_id` int(11) DEFAULT NULL,
  `organize_photo_id` int(11) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_sns_vehicle_user`
--

DROP TABLE IF EXISTS `weixin_sns_vehicle_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_sns_vehicle_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weixin_user_id` int(11) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `vin_no` varchar(20) DEFAULT NULL COMMENT '车架号',
  `vehicle_user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_user`
--

DROP TABLE IF EXISTS `weixin_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `open_id` varchar(80) DEFAULT NULL,
  `nick_name` varchar(80) DEFAULT NULL,
  `sex` int(11) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `province` varchar(30) DEFAULT NULL,
  `country` varchar(10) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `source_type` varchar(20) DEFAULT NULL,
  `delete_flag` int(11) DEFAULT NULL,
  `plat_code` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_user_order`
--

DROP TABLE IF EXISTS `weixin_user_order`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_user_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicle_user_id` int(11) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `service_id` int(11) DEFAULT NULL,
  `address` varchar(50) DEFAULT NULL,
  `lon` decimal(16,12) DEFAULT NULL,
  `lat` decimal(16,12) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_vehicle_code`
--

DROP TABLE IF EXISTS `weixin_vehicle_code`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_vehicle_code` (
  `weixin_user_id` int(11) NOT NULL,
  `contracting_id` int(11) DEFAULT NULL COMMENT '自建合同id',
  `rescue_company_code` varchar(20) DEFAULT NULL,
  `seat_name` varchar(20) DEFAULT NULL,
  `sharebike_contracting_id` int(11) DEFAULT NULL COMMENT '共享单车合同id',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`weixin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_vehicle_user`
--

DROP TABLE IF EXISTS `weixin_vehicle_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_vehicle_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(255) DEFAULT NULL,
  `identity` varchar(255) DEFAULT NULL,
  `license` varchar(255) DEFAULT NULL,
  `frame_code` varchar(255) DEFAULT NULL,
  `style` varchar(255) DEFAULT NULL,
  `brands` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `company_code` int(11) DEFAULT NULL,
  `service_times` int(11) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `organize_id` int(11) DEFAULT NULL,
  `create_user` varchar(255) DEFAULT NULL,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `state` int(11) DEFAULT NULL,
  `organize_photo_id` int(11) DEFAULT NULL,
  `luntai_brands` varchar(255) DEFAULT NULL,
  `price` decimal(16,8) DEFAULT NULL,
  `vehicle_type` int(11) DEFAULT NULL,
  `free_period_day` int(11) DEFAULT NULL,
  `is_cn` int(11) DEFAULT NULL,
  `has_print` int(11) DEFAULT NULL,
  `wheel_year` int(11) DEFAULT NULL,
  `rescue_year` int(11) DEFAULT NULL,
  `base_path` varchar(255) DEFAULT NULL,
  `photo_path` varchar(255) DEFAULT NULL,
  `print_date` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_wh_client_user_info`
--

DROP TABLE IF EXISTS `weixin_wh_client_user_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_wh_client_user_info` (
  `weixin_user_id` int(11) NOT NULL DEFAULT '0',
  `create_time` datetime DEFAULT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `license` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`weixin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_wh_user_info`
--

DROP TABLE IF EXISTS `weixin_wh_user_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_wh_user_info` (
  `weixin_user_id` int(11) NOT NULL,
  `user_phone` varchar(20) DEFAULT NULL,
  `contract_organize_id` int(11) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`weixin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `weixin_zdt_print`
--

DROP TABLE IF EXISTS `weixin_zdt_print`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `weixin_zdt_print` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL,
  `indexs` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `white_list`
--

DROP TABLE IF EXISTS `white_list`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `white_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话',
  `vin_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车架号',
  `plate_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '车牌号',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `update_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `flag` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标签',
  `delete_flag` int(11) DEFAULT '0',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '姓名',
  `parent_contract_id` int(11) DEFAULT NULL COMMENT '所属合同(一级合同)',
  `customer_type` int(2) DEFAULT NULL COMMENT '客户类别(vip客户，vvip客户，  风险，重大风险)',
  `seat_remind` varchar(600) DEFAULT NULL COMMENT '坐席提醒',
  `rescue_remind` varchar(600) DEFAULT NULL COMMENT '救援提醒',
  `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
  `assign_to_person` int(1) DEFAULT NULL COMMENT '是否指定到人',
  `contract_id` int(11) DEFAULT NULL COMMENT '所属合同(二级合同)',
  `organize_name` varchar(50) DEFAULT NULL COMMENT '机构名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2165 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-12-23 23:04:36
