/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80042 (8.0.42)
 Source Host           : localhost:3306
 Source Schema         : canlian

 Target Server Type    : MySQL
 Target Server Version : 80042 (8.0.42)
 File Encoding         : 65001

 Date: 12/05/2025 16:20:05
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_data
-- ----------------------------
DROP TABLE IF EXISTS `t_data`;
CREATE TABLE `t_data`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `county` tinyint NOT NULL COMMENT '区县,1-东区，2-西区，3-仁和区，4-米易县，5-盐边县',
  `investigate_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '调研时间',
  `create_by` int NOT NULL COMMENT '创建者、调研者',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` int NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `del_flag` tinyint NOT NULL DEFAULT 0 COMMENT '0-未删除，1-删除',
  `certificate_eyesight` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-视力',
  `certificate_intellect` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-智力',
  `certificate_limb` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-肢体',
  `certificate_speech` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-言语',
  `certificate_hearing` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-听力',
  `certificate_spirit` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-精神',
  `certificate_multiple` int NOT NULL DEFAULT 0 COMMENT '持证残疾人数-多重',
  `worker_city` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-市残联',
  `worker_association` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-五大专门协会',
  `worker_service_corps` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-攀狮服务队',
  `worker_county` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-县区残联',
  `worker_township` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-乡镇残联',
  `worker_village` int NOT NULL DEFAULT 0 COMMENT '残疾人工作者队伍人数-村社区残联',
  `drill_autism` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-孤独症',
  `drill_intellect` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-智力',
  `drill_limb` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-肢体',
  `drill_speech` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-言语',
  `drill_hearing` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-听力',
  `drill_spirit` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复训练人数-精神',
  `salvation_before_seven` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-0-6岁',
  `salvation_after_seven` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-7岁之后',
  `salvation_autism` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-孤独症',
  `salvation_intellect` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-智力',
  `salvation_limb` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-肢体',
  `salvation_speech` int NOT NULL DEFAULT 0 COMMENT '残疾儿童康复救助人数-言语',
  `difficulty_medication` int NOT NULL DEFAULT 0 COMMENT '困难精神残疾人医疗救助人数-门诊服药',
  `difficulty_hospitalisation` int NOT NULL DEFAULT 0 COMMENT '困难精神残疾人医疗救助人数-住院治疗',
  `assistive_device_total` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-补贴总人数',
  `assistive_device_one` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-辅具一',
  `assistive_device_two` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-辅具二',
  `assistive_device_three` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-辅具三',
  `assistive_device_other` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-其他',
  `assistive_device_type_one` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-类别一',
  `assistive_device_type_two` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-类别二',
  `assistive_device_type_three` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-类别三',
  `assistive_device_type_four` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-类别四',
  `assistive_device_grade_one` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-等级一',
  `assistive_device_grade_two` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-等级二',
  `assistive_device_grade_three` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-等级三',
  `assistive_device_grade_four` int NOT NULL DEFAULT 0 COMMENT '残疾人基本辅助器具适配补贴人数-等级四',
  `technical_training` int NOT NULL DEFAULT 0 COMMENT '职业技能和实用技术培训人数',
  `home_allowance` int NOT NULL DEFAULT 0 COMMENT '居家灵活就业及一次性创业补贴发放数',
  `statutory_certificate_eyesight` int NOT NULL DEFAULT 0 COMMENT '法定就业年龄段持证残疾人数占比-视力',
  `statutory_certificate_intellect` int NOT NULL DEFAULT 0 COMMENT '法定就业年龄段持证残疾人数占比-智力',
  `statutory_certificate_limb` int NOT NULL DEFAULT 0 COMMENT '法定就业年龄段持证残疾人数占比-肢体',
  `statutory_certificate_speech` int NOT NULL DEFAULT 0 COMMENT '法定就业年龄段持证残疾人数占比-言语',
  `statutory_certificate_hearing` int NOT NULL DEFAULT 0 COMMENT '法定就业年龄段持证残疾人数占比-听力',
  `employed_employment` int NOT NULL DEFAULT 0 COMMENT '已就业残疾人数-就业',
  `employed_concentrated` int NOT NULL DEFAULT 0 COMMENT '已就业残疾人数-集中就业',
  `employed_public_welfare` int NOT NULL DEFAULT 0 COMMENT '已就业残疾人数-公益性岗位',
  `employed_auxiliary` int NOT NULL DEFAULT 0 COMMENT '已就业残疾人数-辅助性就业',
  `employed_individual` int NOT NULL DEFAULT 0 COMMENT '已就业残疾人数-个体就业',
  `high_school_employment` int NOT NULL DEFAULT 0 COMMENT '应届高校残疾毕业生数-就业',
  `high_school_individual` int NOT NULL DEFAULT 0 COMMENT '应届高校残疾毕业生数-个体就业',
  `high_school_flexible` int NOT NULL DEFAULT 0 COMMENT '应届高校残疾毕业生数-灵活就业',
  `education_one` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-一年级',
  `education_two` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-二年级',
  `education_three` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-三年级',
  `education_four` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-四年级',
  `education_five` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-五年级',
  `education_six` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-六年级',
  `education_seven` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-七年级',
  `education_eight` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-八年级',
  `education_nine` int NOT NULL DEFAULT 0 COMMENT '适龄残疾儿童少年义务教育-九年级',
  `education_subsidy` int NOT NULL DEFAULT 0 COMMENT '九年义务教育在读残疾儿童生活补贴发放数',
  `activity_frequency` int NOT NULL DEFAULT 0 COMMENT '公益文体活动-开展次数',
  `education_number` int NOT NULL DEFAULT 0 COMMENT '公益文体活动-参加人数',
  `matter` int NOT NULL DEFAULT 0 COMMENT '服务“一件事”办件数',
  `doctor_apprecitation` int NOT NULL DEFAULT 0 COMMENT '家庭医生签约增值服务数',
  `remould` int NOT NULL DEFAULT 0 COMMENT '困难重度残疾人家庭无障碍改造实施改造户数',
  `interviews_office` int NOT NULL DEFAULT 0 COMMENT '残疾人接访情况-办公室接访',
  `interviews_phone` int NOT NULL DEFAULT 0 COMMENT '残疾人接访情况-电话接访',
  `interviews_superior` int NOT NULL DEFAULT 0 COMMENT '残疾人接访情况-上级交办',
  `interviews_hotline` int NOT NULL DEFAULT 0 COMMENT '残疾人接访情况-12345交办',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 816 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据上报表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_data
-- ----------------------------
INSERT INTO `t_data` VALUES (808, 1, '2025-05-09 15:08:14', 1, '2025-05-09 15:08:17', NULL, NULL, 0, 120, 220, 330, 356, 450, 470, 256, 120, 121, 123, 56, 565, 78, 98, 98, 45, 12, 23, 15, 16, 17, 56, 60, 50, 60, 61, 65, 88, 89, 94, 93, 65, 56, 45, 56, 44, 23, 35, 38, 56, 45, 18, 89, 75, 73, 91, 45, 62, 48, 35, 86, 84, 83, 23, 26, 62, 65, 79, 96, 92, 93, 45, 56, 78, 32, 35, 65, 42, 46, 48, 41, 75, 56, 32);
INSERT INTO `t_data` VALUES (809, 1, '2025-05-09 15:11:57', 1, '2025-05-09 15:11:59', NULL, NULL, 0, 200, 323, 450, 655, 522, 35, 236, 120, 121, 123, 56, 565, 78, 98, 98, 45, 12, 23, 15, 16, 17, 56, 60, 50, 60, 61, 65, 88, 89, 94, 93, 65, 56, 45, 56, 44, 23, 35, 38, 56, 45, 18, 89, 75, 73, 91, 45, 62, 48, 35, 86, 84, 83, 23, 26, 62, 65, 79, 96, 92, 93, 45, 56, 78, 32, 35, 65, 42, 46, 48, 41, 75, 56, 32);
INSERT INTO `t_data` VALUES (810, 2, '2025-05-09 15:21:36', 1, '2025-05-09 15:22:56', NULL, NULL, 0, 200, 236, 365, 324, 266, 956, 562, 232, 565, 96, 55, 56, 54, 59, 23, 45, 86, 89, 94, 85, 856, 56, 45, 12, 32, 42, 75, 755, 755, 46, 42, 85, 65, 545, 569, 1585, 852, 23, 232, 12, 12, 12, 52, 52, 52, 565, 88, 89, 46, 43, 84, 87, 89, 98, 645, 56, 567, 79, 989, 85, 85, 89, 96, 94, 46, 52, 65, 13, 12, 125, 75, 49, 86, 46);
INSERT INTO `t_data` VALUES (811, 1, '2024-05-16 00:00:00', 1, '2024-05-09 15:48:19', NULL, NULL, 0, 1000, 200, 63, 23, 263, 568, 200, 232, 235, 2686, 896, 56, 62, 23, 102, 565, 565, 568, 935, 56, 568, 895, 56, 23, 23, 285, 862, 232, 562, 865, 85, 52, 325, 862, 8565, 543, 53, 23, 565, 565, 656, 56, 568, 88, 89, 89, 59, 56, 565, 65, 565, 56, 65, 32, 23, 75, 89, 2, 32, 23, 35, 23, 56, 568, 32, 32, 32, 23, 23, 56, 56, 89, 898, 56);
INSERT INTO `t_data` VALUES (812, 5, '2025-05-09 16:08:02', 1, '2025-05-09 16:08:13', 1, '2025-05-09 16:08:43', 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `t_data` VALUES (813, 5, '2025-05-09 00:00:00', 1, '2025-05-09 16:11:30', 1, '2025-05-09 16:17:40', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74);
INSERT INTO `t_data` VALUES (814, 5, '2025-05-16 00:00:00', 1, '2025-05-09 16:12:31', 1, '2025-05-09 16:19:19', 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);
INSERT INTO `t_data` VALUES (815, 5, '2025-05-12 00:00:00', 1, '2025-05-12 09:31:34', 1, '2025-05-12 09:32:35', 0, 40, 40, 40, 40, 40, 40, 40, 20, 20, 20, 20, 20, 20, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);

-- ----------------------------
-- Table structure for t_institution
-- ----------------------------
DROP TABLE IF EXISTS `t_institution`;
CREATE TABLE `t_institution`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '机构ID',
  `county` tinyint NOT NULL COMMENT '区县,1-东区，2-西区，3-仁和区，4-米易县，5-盐边县',
  `type` tinyint NOT NULL COMMENT '机构类型，1-残疾人定点康复机构，2-残疾人友好医疗机构',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '机构名称',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '详细地址',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '联系电话',
  `del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志（0代表存在 1代表删除）',
  `create_by` int NOT NULL COMMENT '创建者',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_by` int NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2099167235 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '机构表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_institution
-- ----------------------------
INSERT INTO `t_institution` VALUES (-1927364607, 1, 1, '中国十九冶集团有限公司职工医院', '攀枝花大道中段南充路1号', '0812-3981216', 0, 1, '2025-05-09 10:35:46', NULL, NULL);
INSERT INTO `t_institution` VALUES (-1856061439, 1, 1, '攀枝花市第二人民医院', '攀枝花市西区苏铁中路183号', '0812-3864698', 0, 1, '2025-05-09 10:36:02', NULL, NULL);
INSERT INTO `t_institution` VALUES (-1709260798, 5, 2, '盐边县中医院', '盐边县渔门镇桑云街15号', '0812-8877116', 0, 1, '2025-05-09 10:39:33', NULL, NULL);
INSERT INTO `t_institution` VALUES (-1688289279, 1, 1, '攀枝花爱尔眼科医院有限公司', '攀枝花市东区德阳巷15附3-1号', '0812-2901188', 0, 1, '2025-05-09 10:37:02', NULL, NULL);
INSERT INTO `t_institution` VALUES (-1608577023, 5, 2, '12', '12', '12', 1, 1, '2025-05-09 16:05:13', 1, '2025-05-09 16:06:46');
INSERT INTO `t_institution` VALUES (-1486962686, 1, 2, '攀枝花盛泰康复医院有限公司', '攀枝花市东区朝阳上街31号', '0812-3312666', 0, 1, '2025-05-09 10:40:12', NULL, NULL);
INSERT INTO `t_institution` VALUES (-1004617726, 5, 2, '盐边惠爱精神病医院合伙企业（有限合伙）', '盐边县红果彝族乡三滩村新房子组 （矿山救护队旁）', '0812-3325120', 0, 1, '2025-05-09 10:39:53', NULL, NULL);
INSERT INTO `t_institution` VALUES (-480329726, 2, 2, '攀枝花煤业集团有限责任公司总医院', '攀枝花西区陶家渡福乐巷34号', '0812-5996041', 0, 1, '2025-05-09 10:38:41', NULL, NULL);
INSERT INTO `t_institution` VALUES (-413220862, 5, 1, '盐边县人民医院', '盐边县桐子林镇西环北路117号', '0812-3980256', 0, 1, '2025-05-09 10:38:23', NULL, NULL);
INSERT INTO `t_institution` VALUES (-295780351, 1, 1, '攀枝花盛泰康复医院有限公司', '攀枝花市东区朝阳上街31号', '0812-3312666', 0, 1, '2025-05-09 10:36:40', NULL, NULL);
INSERT INTO `t_institution` VALUES (-27344895, 1, 1, '攀枝花市中心医院', '攀枝花市东区攀枝花大道中段益康街34号', '0812-2238015', 0, 1, '2025-05-09 10:33:46', NULL, NULL);
INSERT INTO `t_institution` VALUES (262062081, 3, 2, '攀枝花市第三人民医院', '攀枝花市仁和区云康路18号', '0812-2903884', 0, 1, '2025-05-09 10:40:33', NULL, NULL);
INSERT INTO `t_institution` VALUES (329170945, 4, 2, '米易县人民医院', '米易县攀莲镇河熙北路39号', '0812-6376308', 0, 1, '2025-05-09 10:39:00', NULL, NULL);
INSERT INTO `t_institution` VALUES (1218363394, 3, 1, '攀枝花市第三人民医院', '攀枝花市仁和区云康路18号', '0812-3885834', 0, 1, '2025-05-09 10:34:53', NULL, NULL);
INSERT INTO `t_institution` VALUES (1319026689, 4, 1, '米易县妇幼保健服务中心', '米易县大坪北路27号', '0812-8194758', 0, 1, '2025-05-09 10:38:07', NULL, NULL);
INSERT INTO `t_institution` VALUES (1717485570, 1, 1, '攀枝花市妇幼保健院', '攀枝花市东区三线大道北段451号', '0812-3335346', 0, 1, '2025-05-09 10:35:09', NULL, NULL);
INSERT INTO `t_institution` VALUES (1931395073, 1, 1, '攀枝花市中西医结合医院', '攀枝花市东区炳草岗桃源街27号', '0812-2213013', 0, 1, '2025-05-09 10:34:31', NULL, NULL);
INSERT INTO `t_institution` VALUES (1964949506, 1, 1, '攀枝花市儿童福利院', '攀枝花市东区地龙箐路28号', '0812-3154126', 0, 1, '2025-05-09 10:36:24', NULL, NULL);
INSERT INTO `t_institution` VALUES (2099167234, 1, 1, '攀钢集团总医院', '攀枝花市东区木棉路284号', '0812-3396083', 0, 1, '2025-05-09 10:35:26', NULL, NULL);

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '手机号',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
  `status` tinyint NULL DEFAULT 0 COMMENT '帐号状态（0正常 1停用）',
  `del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志（0代表存在 1代表删除）',
  `create_by` int NOT NULL COMMENT '创建者',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_by` int NULL DEFAULT NULL COMMENT '更新者',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `is_first` tinyint NOT NULL DEFAULT 1 COMMENT '是否第一次登录/重置密码后登录，0-否，1-是',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES (1, 'admin', 'admin', '$2a$10$Ji62l2oGrIYz3LNw9Qe5GO8DJv7eBmfWHpjZ5Kx7ZEpGPIziMQzta', 0, 0, 1, '2025-04-29 17:00:07', 1, '2025-05-08 09:37:43', '超级管理员', 0);
INSERT INTO `t_user` VALUES (2, '19923261698', '胡', '$2a$10$8KLa2enAZSYJ1nRNpkwxG.ssOv994dizfIdKqCCz1LjnAMp9niWy6', 0, 0, 1, '2025-05-07 17:31:54', NULL, NULL, NULL, 0);
INSERT INTO `t_user` VALUES (111, '18224358736', '董国庆', '$2a$10$sqcEWbOydyraBWFHNXAUUOhnrvbaPUDOq5JT4EtMfj8YRPQ46jdzi', 0, 0, 1, '2025-05-06 12:08:03', 1, '2025-05-09 09:22:19', '121212', 0);
INSERT INTO `t_user` VALUES (112, '18224358732', '蒲苇1', '$2a$10$30AQj1hQb1FyrxtNoy3Pi.8OizNG5IgnOizF0G/WVLAOojW2gWIJi', 1, 1, 1, '2025-05-06 17:24:17', 111, '2025-05-06 17:49:30', '是的发送到323', 1);
INSERT INTO `t_user` VALUES (113, '15102879064', '测试', '$2a$10$FHv.H45BdkdraS.lWspfOemvQYaXUD/a9r5TwYLjHytSdK2tmf3iW', 0, 1, 1, '2025-05-09 09:23:12', 1, '2025-05-09 14:35:25', NULL, 0);
INSERT INTO `t_user` VALUES (114, '15102879064', '测试', '$2a$10$/fjE9r5OMppviUbEkwTeduOewkYb9LleynfH.E8tSiJGHDfgiWcM.', 1, 0, 1, '2025-05-09 14:35:41', 1, '2025-05-09 16:31:10', '12', 0);
INSERT INTO `t_user` VALUES (115, '13540242981', 'wan1', '$2a$10$VmvBiIug6ujpIwSIUYdMpufQsSZcEMRwujhMfj8hTDJIMZH.aMazO', 0, 1, 1, '2025-05-09 16:00:36', 114, '2025-05-09 16:07:41', '备注1', 1);
INSERT INTO `t_user` VALUES (116, '13540242981', 'wan1', '$2a$10$5CmvNEnSQxEsrKGb5Iwlm./d3rP4PD.LcRg4lFJhG8j6p/boc8cbu', 0, 1, 114, '2025-05-09 16:07:56', 1, '2025-05-09 16:08:56', '12', 0);

-- ----------------------------
-- Procedure structure for InsertMockData
-- ----------------------------
DROP PROCEDURE IF EXISTS `InsertMockData`;
delimiter ;;
CREATE PROCEDURE `InsertMockData`(IN numRows INT)
BEGIN
    DECLARE i INT DEFAULT 1;
    DECLARE countyValue TINYINT;
    DECLARE createByValue INT;
    DECLARE updateByValue INT;
    DECLARE investigateTimeValue DATETIME;
    DECLARE createTimeValue DATETIME;
    DECLARE updateTimeValue DATETIME;

    WHILE i <= numRows DO
        -- 随机生成区县值（1-5）
        SET countyValue = FLOOR(RAND() * 5) + 1;
        -- 随机生成创建者值（假设范围 1-100）
        SET createByValue = FLOOR(RAND() * 100) + 1;
        -- 随机生成更新者值（假设范围 1-100，也可以为 NULL）
        SET updateByValue = IF(FLOOR(RAND() * 2) = 1, FLOOR(RAND() * 100) + 1, NULL);
        -- 随机生成调研时间和创建时间（假设在最近一年内）
        SET investigateTimeValue = DATE_SUB(CURRENT_DATE, INTERVAL FLOOR(RAND() * 365) DAY) + INTERVAL FLOOR(RAND() * 23) HOUR + INTERVAL FLOOR(RAND() * 59) MINUTE + INTERVAL FLOOR(RAND() * 59) SECOND;
        SET createTimeValue = investigateTimeValue;
        -- 随机生成更新时间（如果有更新者，在创建时间之后的一段时间内）
        IF updateByValue IS NOT NULL THEN
            SET updateTimeValue = DATE_ADD(createTimeValue, INTERVAL FLOOR(RAND() * 30) DAY) + INTERVAL FLOOR(RAND() * 23) HOUR + INTERVAL FLOOR(RAND() * 59) MINUTE + INTERVAL FLOOR(RAND() * 59) SECOND;
        ELSE
            SET updateTimeValue = NULL;
        END IF;

        -- 插入数据
        INSERT INTO t_data (
            county,
            investigate_time,
            create_by,
            create_time,
            update_by,
            update_time,
            certificate_eyesight,
            certificate_intellect,
            certificate_limb,
            certificate_speech,
            certificate_hearing,
            certificate_spirit,
            certificate_multiple,
            worker_city,
            worker_association,
            worker_service_corps,
            worker_county,
            worker_township,
            worker_village,
            drill_autism,
            drill_intellect,
            drill_limb,
            drill_speech,
            drill_hearing,
            drill_spirit,
            salvation_before_seven,
            salvation_after_seven,
            salvation_autism,
            salvation_intellect,
            salvation_limb,
            salvation_speech,
            difficulty_mzedication,
            difficulty_hospitalisation,
            assistive_device_total,
            assistive_device_one,
            assistive_device_two,
            assistive_device_three,
            assistive_device_other,
            assistive_device_type_one,
            assistive_device_type_tow,
            assistive_device_type_three,
            assistive_device_type_four,
            assistive_device_grade_one,
            assistive_device_grade_two,
            assistive_device_grade_three,
            assistive_device_grade_four,
            technical_training,
            home_allowance,
            statutory_certificate_eyesight,
            statutory_certificate_intellect,
            statutory_certificate_limb,
            statutory_certificate_speech,
            statutory_certificate_hearing,
            employed_employment,
            employed_concentrated,
            employed_public_welfare,
            employed_auxiliary,
            employed_individual,
            high_school_employment,
            high_school_individual,
            high_school_flexible,
            education_one,
            education_two,
            education_three,
            education_four,
            education_five,
            education_six,
            education_seven,
            education_eight,
            education_nine,
            education_subsidy,
            activity_frequency,
            education_number,
            matter,
            doctor_apprecitation,
            remould,
            interviews_office,
            interviews_phone,
            interviews_superior,
            interviews_hotline
        ) VALUES (
            countyValue,
            investigateTimeValue,
            createByValue,
            createTimeValue,
            updateByValue,
            updateTimeValue,
            FLOOR(RAND() * 100), -- 随机生成持证残疾人数相关值（0-100）
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 50),  -- 随机生成残疾人工作者队伍人数相关值（0-50）
            FLOOR(RAND() * 50),
            FLOOR(RAND() * 50),
            FLOOR(RAND() * 50),
            FLOOR(RAND() * 50),
            FLOOR(RAND() * 50),
            FLOOR(RAND() * 30),  -- 随机生成残疾儿童康复训练人数相关值（0-30）
            FLOOR(RAND() * 30),
            FLOOR(RAND() * 30),
            FLOOR(RAND() * 30),
            FLOOR(RAND() * 30),
            FLOOR(RAND() * 30),
            FLOOR(RAND() * 20),  -- 随机生成残疾儿童康复救助人数相关值（0-20）
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 15),  -- 随机生成困难精神残疾人医疗救助人数相关值（0-15）
            FLOOR(RAND() * 15),
            FLOOR(RAND() * 40),  -- 随机生成残疾人基本辅助器具适配补贴人数相关值（0-40）
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 40),
            FLOOR(RAND() * 30),  -- 随机生成职业技能和实用技术培训人数（0-30）
            FLOOR(RAND() * 20),  -- 随机生成居家灵活就业及一次性创业补贴发放数（0-20）
            FLOOR(RAND() * 100),  -- 随机生成法定就业年龄段持证残疾人数占比相关值（0-100）
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 100),
            FLOOR(RAND() * 80),  -- 随机生成已就业残疾人数相关值（0-80）
            FLOOR(RAND() * 80),
            FLOOR(RAND() * 80),
            FLOOR(RAND() * 80),
            FLOOR(RAND() * 80),
            FLOOR(RAND() * 10),  -- 随机生成应届高校残疾毕业生数相关值（0-10）
            FLOOR(RAND() * 10),
            FLOOR(RAND() * 10),
            FLOOR(RAND() * 20),  -- 随机生成适龄残疾儿童少年义务教育相关值（0-20）
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 20),
            FLOOR(RAND() * 15),  -- 随机生成九年义务教育在读残疾儿童生活补贴发放数（0-15）
            FLOOR(RAND() * 10),  -- 随机生成公益文体活动开展次数（0-10）
            FLOOR(RAND() * 50),  -- 随机生成公益文体活动参加人数（0-50）
            FLOOR(RAND() * 30),  -- 随机生成服务“一件事”办件数（0-30）
            FLOOR(RAND() * 20),  -- 随机生成家庭医生签约增值服务数（0-20）
            FLOOR(RAND() * 15),  -- 随机生成困难重度残疾人家庭无障碍改造实施改造户数（0-15）
            FLOOR(RAND() * 10),  -- 随机生成残疾人接访情况相关值（0-10）
            FLOOR(RAND() * 10),
            FLOOR(RAND() * 10),
            FLOOR(RAND() * 10)
        );

        SET i = i + 1;
    END WHILE;
END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
