浏览代码

fix(线路模块): 线路字段命名及字段类型修改

高家顺 3 年之前
父节点
当前提交
fde7346e98

+ 66 - 56
sql/file_collect.sql

@@ -3,15 +3,15 @@
 
  Source Server         : localhost
  Source Server Type    : MySQL
- Source Server Version : 80021
+ Source Server Version : 50726
  Source Host           : localhost:3306
  Source Schema         : file_collect
 
  Target Server Type    : MySQL
- Target Server Version : 80021
+ Target Server Version : 50726
  File Encoding         : 65001
 
- Date: 19/09/2021 10:24:00
+ Date: 26/09/2021 16:20:43
 */
 
 SET NAMES utf8mb4;
@@ -22,18 +22,18 @@ SET FOREIGN_KEY_CHECKS = 0;
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_line`;
 CREATE TABLE `kr_b_line`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '线路表',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '线路表',
   `province_id` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省份id',
   `city_id` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '城市id',
   `line_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '线路名称',
   `robot_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '机器人名称',
   `voltage` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '电压等级,例:直流220kV,交流xkV',
   `line_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '线路状态:在运,停运',
-  `service_begintime` datetime(0) NOT NULL COMMENT '投运时间',
-  `begin_tower` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '机器运行的起始杆塔',
-  `end_tower` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '机器运行的终止杆塔',
-  `creator_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '创建人',
-  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
+  `service_begintime` datetime(0) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '投运时间',
+  `begin_tower` int(11) NOT NULL DEFAULT 0 COMMENT '机器运行的起始杆塔',
+  `end_tower` int(11) NOT NULL DEFAULT 0 COMMENT '机器运行的终止杆塔',
+  `creator_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
+  `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
   PRIMARY KEY (`id`) USING BTREE,
   INDEX `idx_province`(`province_id`) USING BTREE COMMENT '省份索引',
   INDEX `idx_city`(`city_id`) USING BTREE COMMENT '城市索引',
@@ -43,16 +43,16 @@ CREATE TABLE `kr_b_line`  (
 -- ----------------------------
 -- Records of kr_b_line
 -- ----------------------------
-INSERT INTO `kr_b_line` VALUES (6, '370000000000', '370300000000', '淄齐线', '机器人名称', '220kV', '在运', '2021-09-15 00:10:02', '1', '31', 1, '2021-09-15 00:45:35');
+INSERT INTO `kr_b_line` VALUES (6, '370000000000', '370300000000', '淄齐线', '机器人名称', '220kV', '在运', '2021-09-15 00:10:02', 1, 31, 1, '2021-09-15 00:45:35');
 
 -- ----------------------------
 -- Table structure for kr_b_line_upload_log
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_line_upload_log`;
 CREATE TABLE `kr_b_line_upload_log`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '上传记录表',
-  `line_id` bigint(0) NOT NULL COMMENT '上传线路ID',
-  `uploader_id` bigint(0) NOT NULL COMMENT '上传者ID',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '上传记录表',
+  `line_id` bigint(20) NOT NULL COMMENT '上传线路ID',
+  `uploader_id` bigint(20) NOT NULL COMMENT '上传者ID',
   `upload_time` datetime(0) NOT NULL COMMENT '上传日期',
   `status` tinyint(1) NOT NULL COMMENT '上传状态:0-失败,1-成功',
   `warn_msg` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '警告信息',
@@ -101,7 +101,7 @@ INSERT INTO `kr_b_line_upload_log` VALUES (40, 6, 1, '2021-09-15 00:45:38', 1, '
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_region_city`;
 CREATE TABLE `kr_b_region_city`  (
-  `id` bigint(0) NOT NULL COMMENT '@desc: 自增ID',
+  `id` bigint(20) NOT NULL COMMENT '@desc: 自增ID',
   `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 区、县名称',
   `city_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 城市ID',
   `province_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 省份ID',
@@ -461,7 +461,7 @@ INSERT INTO `kr_b_region_city` VALUES (343, '自治区直辖县级行政区划',
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_region_county`;
 CREATE TABLE `kr_b_region_county`  (
-  `id` bigint(0) NOT NULL COMMENT '@desc: 自增ID',
+  `id` bigint(20) NOT NULL COMMENT '@desc: 自增ID',
   `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 区、县名称',
   `county_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 区ID',
   `city_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 城市ID',
@@ -3760,7 +3760,7 @@ INSERT INTO `kr_b_region_county` VALUES (3282, '铁门关市', '659006000000', '
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_region_province`;
 CREATE TABLE `kr_b_region_province`  (
-  `id` bigint(0) NOT NULL COMMENT '@desc: 自增ID',
+  `id` bigint(20) NOT NULL COMMENT '@desc: 自增ID',
   `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 省名称',
   `province_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '@desc: 省ID',
   PRIMARY KEY (`id`) USING BTREE,
@@ -3807,31 +3807,31 @@ INSERT INTO `kr_b_region_province` VALUES (31, '新疆维吾尔自治区', '6500
 -- ----------------------------
 DROP TABLE IF EXISTS `kr_b_tower`;
 CREATE TABLE `kr_b_tower`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '杆塔详情表',
-  `line_id` bigint(0) NOT NULL COMMENT '线路ID',
-  `tower_index` int(0) NOT NULL DEFAULT 0 COMMENT '杆塔序号(对应机器巡检方案号)',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '杆塔详情表',
+  `line_id` bigint(20) NOT NULL COMMENT '线路ID',
+  `tower_index` int(11) NOT NULL DEFAULT 0 COMMENT '杆塔序号(对应机器巡检方案号)',
   `tower_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '杆塔名称',
   `tower_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '杆塔编号(SDG-18,SZT1-24等)',
   `hardware_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '金具串型号',
-  `longitude` decimal(10, 7) NOT NULL DEFAULT 0.0000000 COMMENT '经度',
-  `latitude` decimal(10, 7) NOT NULL DEFAULT 0.0000000 COMMENT '纬度',
+  `longitude` decimal(10, 7) NOT NULL COMMENT '经度',
+  `latitude` decimal(10, 7) NOT NULL COMMENT '纬度',
   `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '杆塔性质(直线塔、耐张塔)',
-  `is_station` tinyint(0) NOT NULL DEFAULT 0 COMMENT '是否为太阳能基站塔',
-  `is_weather` tinyint(0) NOT NULL DEFAULT 0 COMMENT '是否为微气象杆塔',
+  `is_station` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否为太阳能基站塔',
+  `is_weather` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否为微气象杆塔',
   `circuit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '杆塔回路(单回/双回/四回/六回)',
   `height` double(11, 2) NOT NULL DEFAULT 0.00 COMMENT '杆塔高度,单位m',
   `practical_height` double(11, 2) NOT NULL DEFAULT 0.00 COMMENT '杆塔呼高,单位m',
   `corner_direction` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '转角方向(左/右/否)否为无转角',
   `corner_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '转角角度',
   `span` double(11, 2) NOT NULL DEFAULT 0.00 COMMENT '档距',
-  `servuce_begintime` datetime(0) NOT NULL COMMENT '投运时间',
+  `service_begintime` datetime(0) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '投运时间',
   `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注说明',
-  `has_file` tinyint(0) NOT NULL DEFAULT 0 COMMENT '是否存在文件',
-  `creator_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '创建者id',
-  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
+  `has_file` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否存在文件',
+  `creator_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '创建者id',
+  `create_time` datetime(0) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
   PRIMARY KEY (`id`) USING BTREE,
-  UNIQUE INDEX `idx_line_id_idx`(`line_id`, `tower_index`) USING BTREE COMMENT '线路ID和塔索引',
-  INDEX `idx_line_id`(`line_id`) USING BTREE COMMENT '线路ID索引'
+  INDEX `idx_line_id`(`line_id`) USING BTREE COMMENT '线路ID索引',
+  UNIQUE INDEX `idx_line_id_idx`(`line_id`, `tower_index`) USING BTREE COMMENT '线路ID和塔索引'
 ) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
 
 -- ----------------------------
@@ -3874,7 +3874,7 @@ INSERT INTO `kr_b_tower` VALUES (31, 6, 31, '#029', 'SDF4-18', 'OPGW-48B1/150',
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_admin`;
 CREATE TABLE `ums_admin`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
   `password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
   `icon` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
@@ -3883,7 +3883,7 @@ CREATE TABLE `ums_admin`  (
   `note` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
   `login_time` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间',
-  `status` int(0) NULL DEFAULT 1 COMMENT '帐号启用状态:0->禁用;1->启用',
+  `status` int(11) NULL DEFAULT 1 COMMENT '帐号启用状态:0->禁用;1->启用',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台用户表' ROW_FORMAT = Dynamic;
 
@@ -3898,14 +3898,14 @@ INSERT INTO `ums_admin` VALUES (2, 'admin', '$2a$10$j6gz6VWlZbhzRM.ewThT4u66g8yW
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_admin_login_log`;
 CREATE TABLE `ums_admin_login_log`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
-  `admin_id` bigint(0) NULL DEFAULT NULL,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `admin_id` bigint(20) NULL DEFAULT NULL,
   `create_time` datetime(0) NULL DEFAULT NULL,
   `ip` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
   `address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
   `user_agent` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '浏览器登录类型',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台用户登录日志表' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台用户登录日志表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Records of ums_admin_login_log
@@ -3926,15 +3926,17 @@ INSERT INTO `ums_admin_login_log` VALUES (13, 2, '2021-05-06 14:02:04', '0:0:0:0
 INSERT INTO `ums_admin_login_log` VALUES (14, 2, '2021-05-24 16:30:42', '0:0:0:0:0:0:0:1', NULL, NULL);
 INSERT INTO `ums_admin_login_log` VALUES (15, 2, '2021-06-07 14:51:10', '0:0:0:0:0:0:0:1', NULL, NULL);
 INSERT INTO `ums_admin_login_log` VALUES (16, 2, '2021-06-30 17:18:04', '0:0:0:0:0:0:0:1', NULL, NULL);
+INSERT INTO `ums_admin_login_log` VALUES (17, 1, '2021-09-26 15:36:42', '0:0:0:0:0:0:0:1', NULL, NULL);
+INSERT INTO `ums_admin_login_log` VALUES (18, 2, '2021-09-26 15:37:28', '0:0:0:0:0:0:0:1', NULL, NULL);
 
 -- ----------------------------
 -- Table structure for ums_admin_role_relation
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_admin_role_relation`;
 CREATE TABLE `ums_admin_role_relation`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
-  `admin_id` bigint(0) NULL DEFAULT NULL,
-  `role_id` bigint(0) NULL DEFAULT NULL,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `admin_id` bigint(20) NULL DEFAULT NULL,
+  `role_id` bigint(20) NULL DEFAULT NULL,
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台用户和角色关系表' ROW_FORMAT = Dynamic;
 
@@ -3949,29 +3951,33 @@ INSERT INTO `ums_admin_role_relation` VALUES (2, 2, 1);
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_menu`;
 CREATE TABLE `ums_menu`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
-  `parent_id` bigint(0) NULL DEFAULT NULL COMMENT '父级ID',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '父级ID',
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
   `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
-  `level` int(0) NULL DEFAULT NULL COMMENT '菜单级数',
-  `sort` int(0) NULL DEFAULT NULL COMMENT '菜单排序',
+  `level` int(11) NULL DEFAULT NULL COMMENT '菜单级数',
+  `sort` int(11) NULL DEFAULT NULL COMMENT '菜单排序',
   `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端名称',
   `icon` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端图标',
-  `hidden` int(0) NULL DEFAULT NULL COMMENT '前端隐藏',
+  `hidden` int(11) NULL DEFAULT NULL COMMENT '前端隐藏',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台菜单表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
+-- Records of ums_menu
+-- ----------------------------
+
+-- ----------------------------
 -- Table structure for ums_resource
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_resource`;
 CREATE TABLE `ums_resource`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
   `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源名称',
   `url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源URL',
   `description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
-  `category_id` bigint(0) NULL DEFAULT NULL COMMENT '资源分类ID',
+  `category_id` bigint(20) NULL DEFAULT NULL COMMENT '资源分类ID',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台资源表' ROW_FORMAT = Dynamic;
 
@@ -3989,10 +3995,10 @@ INSERT INTO `ums_resource` VALUES (5, '2021-04-01 16:29:01', '浏览权限', '/v
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_resource_category`;
 CREATE TABLE `ums_resource_category`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
   `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类名称',
-  `sort` int(0) NULL DEFAULT NULL COMMENT '排序',
+  `sort` int(11) NULL DEFAULT NULL COMMENT '排序',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '资源分类表' ROW_FORMAT = Dynamic;
 
@@ -4007,13 +4013,13 @@ INSERT INTO `ums_resource_category` VALUES (2, '2020-02-07 16:35:49', '其他模
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_role`;
 CREATE TABLE `ums_role`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
   `description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
-  `admin_count` int(0) NULL DEFAULT NULL COMMENT '后台用户数量',
+  `admin_count` int(11) NULL DEFAULT NULL COMMENT '后台用户数量',
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
-  `status` int(0) NULL DEFAULT 1 COMMENT '启用状态:0->禁用;1->启用',
-  `sort` int(0) NULL DEFAULT 0,
+  `status` int(11) NULL DEFAULT 1 COMMENT '启用状态:0->禁用;1->启用',
+  `sort` int(11) NULL DEFAULT 0,
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台用户角色表' ROW_FORMAT = Dynamic;
 
@@ -4030,20 +4036,24 @@ INSERT INTO `ums_role` VALUES (4, '电力局', '不能查看#号文件', 0, '202
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_role_menu_relation`;
 CREATE TABLE `ums_role_menu_relation`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
-  `role_id` bigint(0) NULL DEFAULT NULL COMMENT '角色ID',
-  `menu_id` bigint(0) NULL DEFAULT NULL COMMENT '菜单ID',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色ID',
+  `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单ID',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台角色菜单关系表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
+-- Records of ums_role_menu_relation
+-- ----------------------------
+
+-- ----------------------------
 -- Table structure for ums_role_resource_relation
 -- ----------------------------
 DROP TABLE IF EXISTS `ums_role_resource_relation`;
 CREATE TABLE `ums_role_resource_relation`  (
-  `id` bigint(0) NOT NULL AUTO_INCREMENT,
-  `role_id` bigint(0) NULL DEFAULT NULL COMMENT '角色ID',
-  `resource_id` bigint(0) NULL DEFAULT NULL COMMENT '资源ID',
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色ID',
+  `resource_id` bigint(20) NULL DEFAULT NULL COMMENT '资源ID',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台角色资源关系表' ROW_FORMAT = Dynamic;
 

+ 2 - 2
src/main/java/com/macro/mall/tiny/modules/business/controller/FileController.java

@@ -68,8 +68,8 @@ public class FileController {
         String voltage = fileUploadParam.getVoltage();
         String lineStatus = fileUploadParam.getLineStatus();
         Long serviceBegintimeTs = fileUploadParam.getServiceBegintimeTs();
-        String beginTower = fileUploadParam.getBeginTower();
-        String endTower = fileUploadParam.getEndTower();
+        Integer beginTower = fileUploadParam.getBeginTower();
+        Integer endTower = fileUploadParam.getEndTower();
         Long size = fileUploadParam.getSize();
         Integer chunks = fileUploadParam.getChunks();
         Integer chunk = fileUploadParam.getChunk();

+ 2 - 2
src/main/java/com/macro/mall/tiny/modules/business/dto/FileUploadParam.java

@@ -35,10 +35,10 @@ public class FileUploadParam {
     private Long serviceBegintimeTs;
 
     @ApiModelProperty(value = "机器运行的起始杆塔")
-    private String beginTower;
+    private Integer beginTower;
 
     @ApiModelProperty(value = "机器运行的终止杆塔")
-    private String endTower;
+    private Integer endTower;
 
     @ApiModelProperty(value = "上传文件名称")
     private String name;

+ 1 - 0
src/main/java/com/macro/mall/tiny/modules/business/enums/DirectoryEnum.java

@@ -21,6 +21,7 @@ public enum DirectoryEnum implements IEnum<Integer> {
     SITE_INVEST(8, "8现场勘察"),
     LON_LAT_INFO(9, "9经纬度信息"),
     HARDWARE_DES(10, "10金具设计资料"),
+    ROBOT_CHECK_PIC(12,"12机器巡检图片")
     ;
 
     private final Integer type;

+ 2 - 2
src/main/java/com/macro/mall/tiny/modules/business/model/KrBLine.java

@@ -65,10 +65,10 @@ public class KrBLine implements Serializable {
     private Date serviceBegintime;
 
     @ApiModelProperty(value = "机器运行的起始杆塔")
-    private String beginTower;
+    private Integer beginTower;
 
     @ApiModelProperty(value = "机器运行的终止杆塔")
-    private String endTower;
+    private Integer endTower;
 
     @ApiModelProperty(value = "创建人")
     private Long creatorId;

+ 1 - 1
src/main/java/com/macro/mall/tiny/modules/business/model/KrBTower.java

@@ -81,7 +81,7 @@ public class KrBTower implements Serializable {
     private Double span;
 
     @ApiModelProperty(value = "投运时间")
-    private Date servuceBegintime;
+    private Date serviceBegintime;
 
     @ApiModelProperty(value = "备注说明")
     private String remark;

+ 1 - 1
src/main/java/com/macro/mall/tiny/modules/business/model/TowerExcelModel.java

@@ -54,7 +54,7 @@ public class TowerExcelModel extends BaseRowModel implements Serializable {
     private Double span = 0d;
 
     @ExcelProperty(value = "投运时间", index = 14)
-    private Date servuceBegintime;
+    private Date serviceBegintime;
 
     @ExcelProperty(value = "备注说明", index = 15)
     private String remark = "";

+ 1 - 1
src/main/java/com/macro/mall/tiny/modules/business/service/FileService.java

@@ -17,7 +17,7 @@ public interface FileService {
 
     void upload(MultipartFile file) throws IOException;
 
-    void uploadWithBlock(String name, String lineName, String provinceId, String cityId, String robotName, String voltage, String lineStatus, Long serviceBegintimeTs, String beginTower, String endTower, Long size, Integer chunks, Integer chunk, MultipartFile file, String charset) throws IOException;
+    void uploadWithBlock(String name, String lineName, String provinceId, String cityId, String robotName, String voltage, String lineStatus, Long serviceBegintimeTs, Integer beginTower, Integer endTower, Long size, Integer chunks, Integer chunk, MultipartFile file, String charset) throws IOException;
 
     BDirectory getRootDirectory();
 

+ 2 - 2
src/main/java/com/macro/mall/tiny/modules/business/service/impl/AsyncHandler.java

@@ -65,7 +65,7 @@ public class AsyncHandler {
 
     @Async
     @Transactional
-    public void handleDocument(String provinceId, String cityId, String fileSource, String lineName, String robotName, String voltage, String lineStatus, Long serviceBegintimeTs, String beginTower, String endTower, AdminUserDetails userDetails, String charset) {
+    public void handleDocument(String provinceId, String cityId, String fileSource, String lineName, String robotName, String voltage, String lineStatus, Long serviceBegintimeTs, Integer beginTower, Integer endTower, AdminUserDetails userDetails, String charset) {
         StringBuilder warnMsg = new StringBuilder();
         KrBLine line = null;
         Long userId = null;
@@ -168,7 +168,7 @@ public class AsyncHandler {
                             tower.setCornerDirection(model.getCornerDirection());
                             tower.setCornerNumber(model.getCornerNumber());
                             tower.setSpan(model.getSpan());
-                            tower.setServuceBegintime(model.getServuceBegintime());
+                            tower.setServiceBegintime(model.getServiceBegintime());
                             tower.setRemark(model.getRemark());
                             tower.setHasFile(0);
                             tower.setCreatorId(finalUserId);

+ 4 - 4
src/main/java/com/macro/mall/tiny/modules/business/service/impl/FileServiceImpl.java

@@ -82,8 +82,8 @@ public class FileServiceImpl implements FileService {
                                 String voltage,
                                 String lineStatus,
                                 Long serviceBegintimeTs,
-                                String beginTower,
-                                String endTower,
+                                Integer beginTower,
+                                Integer endTower,
                                 Long size,
                                 Integer chunks,
                                 Integer chunk,
@@ -96,7 +96,7 @@ public class FileServiceImpl implements FileService {
         if (isUploaded(name)) {
             removeKey(name);
             AdminUserDetails userDetails = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
-            asyncHandler.handleDocument(provinceId, cityId, target, lineName,robotName,  voltage, lineStatus, serviceBegintimeTs,  beginTower,  endTower, userDetails, charset);
+            asyncHandler.handleDocument(provinceId, cityId, target, lineName, robotName, voltage, lineStatus, serviceBegintimeTs, beginTower, endTower, userDetails, charset);
         }
     }
 
@@ -160,7 +160,7 @@ public class FileServiceImpl implements FileService {
 
         if (relativeCount > 2) {
             String dirType = filePath.getName(powerPathCount + 2).toString();
-            if (!dirType.equals(DirectoryEnum.TOWER_PIC.getName()) && !dirType.equals(DirectoryEnum.EARTH_WIRE_HARD_PIC.getName()) && !dirType.equals(DirectoryEnum.TEAM_CHECK_PIC.getName())) {
+            if (!dirType.equals(DirectoryEnum.TOWER_PIC.getName()) && !dirType.equals(DirectoryEnum.EARTH_WIRE_HARD_PIC.getName()) && !dirType.equals(DirectoryEnum.TEAM_CHECK_PIC.getName()) && !dirType.equals(DirectoryEnum.ROBOT_CHECK_PIC.getName())) {
                 return true;
             }
         }

+ 15 - 0
src/main/java/com/macro/mall/tiny/modules/business/service/impl/KrBTowerServiceImpl.java

@@ -107,6 +107,13 @@ public class KrBTowerServiceImpl extends ServiceImpl<KrBTowerMapper, KrBTower> i
         sonList = MyFileUtils.getSubBFiles(thirdBasePath, auth);
         resultMap.put("teamCheckFileList", sonList);
 
+        // 获取12机器巡检照片
+        secBasePath = MyFileUtils.getAuthFilePath(basePath, DirectoryEnum.ROBOT_CHECK_PIC.getName(), auth);
+        towerName = tower.getTowerName();
+        thirdBasePath = MyFileUtils.getAuthFilePath(secBasePath, towerName, auth);
+        sonList = MyFileUtils.getSubBFiles(thirdBasePath, auth);
+        resultMap.put("robotCheckFileList", sonList);
+
         return resultMap;
     }
 
@@ -172,6 +179,14 @@ public class KrBTowerServiceImpl extends ServiceImpl<KrBTowerMapper, KrBTower> i
                 continue;
             }
 
+            // 检验是否含有机器巡检照片
+            secBasePath = MyFileUtils.getAuthFilePath(basePath, DirectoryEnum.ROBOT_CHECK_PIC.getName(), access);
+            thirdBasePath = MyFileUtils.getAuthFilePath(secBasePath, tower.getTowerName(), access);
+            if (MyFileUtils.hasSonFile(thirdBasePath, access)) {
+                tower.setHasFile(1);
+                continue;
+            }
+
 
             tower.setHasFile(0);
         }

+ 1 - 4
src/main/resources/application-dev.yml

@@ -2,7 +2,7 @@ spring:
   datasource:
     url: jdbc:mysql://localhost:3306/file_collect?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
     username: root
-    password: abc45628
+    password: root
   redis:
     host: localhost # Redis服务器地址
     database: 0 # Redis数据库索引(默认为0)
@@ -10,9 +10,6 @@ spring:
     password: # Redis服务器连接密码(默认为空)
     timeout: 3000ms # 连接超时时间(毫秒)
 
-system:
-  charset: gbk
-
 logging:
   level:
     root: info

+ 0 - 3
src/main/resources/application-prod.yml

@@ -10,9 +10,6 @@ spring:
     password: # Redis服务器连接密码(默认为空)
     timeout: 3000ms # 连接超时时间(毫秒)
 
-system:
-  charset: UTF-8
-
 logging:
   file:
     path: /var/logs

+ 3 - 3
src/main/resources/mapper/business/KrBLineMapper.xml

@@ -34,7 +34,7 @@
                t.corner_direction  t_corner_direction,
                t.corner_number     t_corner_number,
                t.span              t_span,
-               t.servuce_begintime t_servuce_begintime,
+               t.service_begintime t_service_begintime,
                t.remark            t_remark,
                t.has_file          t_has_file,
                t.create_time       t_create_time
@@ -77,7 +77,7 @@
         t.corner_direction t_corner_direction,
         t.corner_number t_corner_number,
         t.span t_span,
-        t.servuce_begintime t_servuce_begintime,
+        t.service_begintime t_service_begintime,
         t.remark t_remark,
         t.has_file t_has_file,
         t.create_time t_create_time
@@ -133,7 +133,7 @@
             <result column="t_corner_direction" property="cornerDirection"/>
             <result column="t_corner_number" property="cornerNumber"/>
             <result column="t_span" property="span"/>
-            <result column="t_servuce_begintime" property="servuceBegintime"/>
+            <result column="t_service_begintime" property="serviceBegintime"/>
             <result column="t_remark" property="remark"/>
             <result column="t_has_file" property="hasFile"/>
             <result column="t_create_time" property="createTime"/>

+ 4 - 4
src/main/resources/mapper/business/KrBTowerMapper.xml

@@ -20,7 +20,7 @@
         corner_direction,
         corner_number,
         span,
-        servuce_begintime,
+        service_begintime,
         remark,
         has_file,
         creator_id,
@@ -45,7 +45,7 @@
             #{item.cornerDirection},
             #{item.cornerNumber},
             #{item.span},
-            #{item.servuceBegintime},
+            #{item.serviceBegintime},
             #{item.remark},
             #{item.hasFile},
             #{item.creatorId},
@@ -68,7 +68,7 @@
         corner_number = VALUES(corner_number),
         span = VALUES(span),
         span = VALUES(span),
-        servuce_begintime = VALUES(servuce_begintime),
+        service_begintime = VALUES(service_begintime),
         remark = VALUES(remark),
         remark = VALUES(remark),
         has_file = VALUES(has_file),
@@ -96,7 +96,7 @@
         <result column="corner_direction" property="cornerDirection"/>
         <result column="corner_number" property="cornerNumber"/>
         <result column="span" property="span"/>
-        <result column="servuce_begintime" property="servuceBegintime"/>
+        <result column="service_begintime" property="serviceBegintime"/>
         <result column="remark" property="remark"/>
         <result column="has_file" property="hasFile"/>
         <result column="creator_id" property="creatorId"/>