-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtransferOrder.sql
258 lines (227 loc) · 12.4 KB
/
transferOrder.sql
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
-- MySQL dump 10.13 Distrib 8.0.18, for Win64 (x86_64)
--
-- Host: localhost Database: transferOrder
-- ------------------------------------------------------
-- Server version 8.0.18
/*!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 `adminuser`
--
DROP TABLE IF EXISTS `adminuser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `adminuser` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`adminUser` varchar(20) NOT NULL,
`password` char(68) NOT NULL,
`perm` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `adminuser_adminUser_uindex` (`adminUser`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `adminuser`
--
LOCK TABLES `adminuser` WRITE;
/*!40000 ALTER TABLE `adminuser` DISABLE KEYS */;
INSERT INTO `adminuser` VALUES (1,'admin','{bcrypt}$2a$10$kGiuLyN//iXEixL1YCHGsOgePeQ5Ss3LttvqsUnd9XVyM5sXarksi','ROLE_admin,ROLE_base,ROLE_service,ROLE_check'),(2,'base_li','{bcrypt}$2a$10$VdK5//OGZkiLt7XV8euD7Oiu.fr0GOW6328NH1TeHs3YiTP7d801i','ROLE_base'),(3,'serveice_zhang','{bcrypt}$2a$10$WSnO4pkM4SevkIESLKs7IO6M/.Iwf8nY0ewjakqneCYlYhroFNDVi','ROLE_service'),(4,'check_chen','{bcrypt}$2a$10$RE.3Ub0HPxk0wPD8JgbcJeeL16s4fBOcae7Sc.ejRSfSfe7QGP11e','ROLE_check'),(6,'check_sun','{bcrypt}$2a$10$DMsxvxJJXoPKKS9Al/ydEu3KxLBHwFPNpdc2YLlIz2cAxf9kOsmge','ROLE_check'),(12,'service_hu','{bcrypt}$2a$10$h02TPuqGMaSGhbgXXI.r0./JZYYYHDk34g/VZnh9VutTni3nl771C','ROLE_admin,ROLE_base,ROLE_service,ROLE_check');
/*!40000 ALTER TABLE `adminuser` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `client`
--
DROP TABLE IF EXISTS `client`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `client` (
`NameZh` varchar(50) NOT NULL,
`NameEn` varchar(50) NOT NULL,
`nameSp` varchar(20) DEFAULT NULL,
`email` varchar(20) DEFAULT NULL,
`blankId` char(16) NOT NULL,
`blank` varchar(20) DEFAULT NULL,
`companyCode` int(8) DEFAULT NULL,
`province` char(5) NOT NULL,
`city` char(20) NOT NULL,
UNIQUE KEY `client_pk` (`companyCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `client`
--
LOCK TABLES `client` WRITE;
/*!40000 ALTER TABLE `client` DISABLE KEYS */;
INSERT INTO `client` VALUES ('大连什么公司','dalianshenme','大神','[email protected]','1234569632587523','中国银行',12345678,'辽宁','大连'),('北京海运','baijinghaiyun','北海运','[email protected]','1234567891234567','中国银行',32165487,'北京','北京'),('大连那啥公司','daliannasha','大拿','[email protected]','1234569632588763','中国银行',12345668,'辽宁','大连'),('上海的公司','shgs','上攻','[email protected]','1234564876452341','汇丰银行',12343212,'上海','上海'),('中国第一公司','chinano1','中一','[email protected]','1234567891234589','中国建设银行',58746932,'北京','北京'),('张策公司','zcc','zhangce','[email protected]','1234567891234567','中国银行',85697423,'河北','保定');
/*!40000 ALTER TABLE `client` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `contactman`
--
DROP TABLE IF EXISTS `contactman`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `contactman` (
`name` varchar(10) DEFAULT NULL,
`title` varchar(10) DEFAULT NULL,
`phone` char(11) DEFAULT NULL,
`tax` int(7) DEFAULT NULL,
`email` varchar(20) DEFAULT NULL,
`company` int(8) NOT NULL,
`employeeId` int(6) NOT NULL,
PRIMARY KEY (`company`,`employeeId`),
CONSTRAINT `contactman_client_companyCode_fk` FOREIGN KEY (`company`) REFERENCES `client` (`companyCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `contactman`
--
LOCK TABLES `contactman` WRITE;
/*!40000 ALTER TABLE `contactman` DISABLE KEYS */;
INSERT INTO `contactman` VALUES ('胜利','大中华负责人','13232325656',685479,'[email protected]',12343212,198657),('前二','董事长','13835352626',875421,'[email protected]',12343212,362541),('汉姆','财务','18282829563',778854,'[email protected]',12345668,665541),('王十二','秘书','13838465987',884563,'[email protected]',12345668,665542),('王二','经理','12654896562',663725,'[email protected]',32165487,123456),('赵武','经理','13232325678',256484,'[email protected]',32165487,362541),('十三娘','总监','13236528547',1236547,'[email protected]',58746932,188745),('张策','CEO','15133229977',152643,'[email protected]',85697423,100001);
/*!40000 ALTER TABLE `contactman` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Temporary view structure for view `forder`
--
DROP TABLE IF EXISTS `forder`;
/*!50001 DROP VIEW IF EXISTS `forder`*/;
SET @saved_cs_client = @@character_set_client;
/*!50503 SET character_set_client = utf8mb4 */;
/*!50001 CREATE VIEW `forder` AS SELECT
1 AS `NameZh`,
1 AS `orderId`,
1 AS `sprovince`,
1 AS `scity`,
1 AS `rprovince`,
1 AS `rcity`,
1 AS `sphone`,
1 AS `semail`,
1 AS `receive`,
1 AS `rphone`,
1 AS `remail`,
1 AS `check`,
1 AS `send`,
1 AS `time`*/;
SET character_set_client = @saved_cs_client;
--
-- Table structure for table `good`
--
DROP TABLE IF EXISTS `good`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `good` (
`goodID` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`expiry` int(3) DEFAULT NULL,
`temperature` int(3) DEFAULT NULL,
`type` varchar(10) DEFAULT NULL,
`mass` int(5) DEFAULT NULL,
`packages` varchar(10) DEFAULT NULL,
`length` int(4) DEFAULT NULL,
`width` int(4) DEFAULT NULL,
`height` int(4) DEFAULT NULL,
`unit` varchar(8) DEFAULT NULL,
PRIMARY KEY (`goodID`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `good`
--
LOCK TABLES `good` WRITE;
/*!40000 ALTER TABLE `good` DISABLE KEYS */;
INSERT INTO `good` VALUES (1,'苹果',180,25,'水果',5,'箱子',50,50,20,'kg'),(4,'梨',120,25,'水果',6,'箱子',50,25,25,'kg'),(6,'床',999999,25,'家具',200,'货车',300,200,100,'m'),(7,'手机',99999,20,'数码',500,'盒子',30,10,1,'cm'),(8,'羽绒服',9999,30,'其他',60,'15',100,50,60,'cm'),(9,'电脑',730,20,'数码',2,'箱',50,40,2,'cm'),(10,'skII',180,15,'美妆',180,'盒子',20,10,11,'ml'),(11,'鼠标',999,25,'数码',250,'盒子',10,5,5,'g');
/*!40000 ALTER TABLE `good` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order`
--
DROP TABLE IF EXISTS `order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order` (
`orderId` char(10) NOT NULL,
`client` int(8) NOT NULL,
`send` varchar(10) NOT NULL,
`sphone` char(11) NOT NULL DEFAULT '',
`semail` varchar(20) DEFAULT NULL,
`sprovince` char(5) NOT NULL,
`scity` char(8) NOT NULL,
`receive` varchar(10) NOT NULL,
`rphone` char(11) NOT NULL DEFAULT '',
`remail` varchar(20) DEFAULT NULL,
`rprovince` char(5) NOT NULL,
`rcity` char(8) DEFAULT NULL,
`time` date NOT NULL,
`check` longtext,
PRIMARY KEY (`orderId`),
UNIQUE KEY `order_orderId_uindex` (`orderId`),
KEY `order_client_companyCode_fk` (`client`),
CONSTRAINT `order_client_companyCode_fk` FOREIGN KEY (`client`) REFERENCES `client` (`companyCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order`
--
LOCK TABLES `order` WRITE;
/*!40000 ALTER TABLE `order` DISABLE KEYS */;
INSERT INTO `order` VALUES ('a2ed18c8',12345668,'三十九','18723654987','[email protected]','北京','北京','九十七','19739393737','[email protected]','河南','郑州市','2019-12-24','提交'),('b60366c7',12345668,'三三','12231231232','[email protected]','山西','太原','陈十八','15252525252','[email protected]','四川','成都','2019-12-24',NULL),('cd372d8c',85697423,'二十七','12334523412','[email protected]','北京','北京','八十八','18888888888','[email protected]','河南','安阳市','2019-12-25',NULL),('cebafbfc',32165487,'找潜力','12334523412','[email protected]','陕西','咸阳','孙六六','12334234121','[email protected]','四川','成都','2019-12-24','未通过'),('dbf27036',12345678,'刘六','13838383833','[email protected]','北京','北京','陈十八','15252525252','[email protected]','河南','郑州市','2019-12-21','审核'),('e7744233',12345678,'二十七','13838383833','[email protected]','辽宁','旅顺','张思','15252525252','[email protected]','西藏','呼和浩特','2019-12-24','审核'),('ff47403a',12343212,'as','12334523412','[email protected]','贵州','铜仁地区','九十七','12423421232','[email protected]','北京','北京','2019-12-25',NULL),('sd123124',12343212,'sas','sdas','das','sdasd','dasd','das','adsas','vsd','sad','dasd','2019-12-25',NULL),('sf123123',12345678,'老王','12365488567','[email protected]','辽宁','大连','李氏','13832266544','[email protected]','上海','上海','2019-12-25','审核');
/*!40000 ALTER TABLE `order` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_good`
--
DROP TABLE IF EXISTS `order_good`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_good` (
`orderID` char(10) NOT NULL,
`goodID` int(10) NOT NULL,
`num` int(5) DEFAULT NULL,
UNIQUE KEY `order-good_pk` (`orderID`,`goodID`),
KEY `order_good_good_goodID_fk` (`goodID`),
CONSTRAINT `order-good_order_orderId_fk` FOREIGN KEY (`orderID`) REFERENCES `order` (`orderId`),
CONSTRAINT `order_good_good_goodID_fk` FOREIGN KEY (`goodID`) REFERENCES `good` (`goodID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_good`
--
LOCK TABLES `order_good` WRITE;
/*!40000 ALTER TABLE `order_good` DISABLE KEYS */;
INSERT INTO `order_good` VALUES ('a2ed18c8',4,3333),('cd372d8c',10,4),('cebafbfc',1,11),('cebafbfc',11,222),('dbf27036',6,15),('e7744233',1,3),('sf123123',4,5),('sf123123',7,99);
/*!40000 ALTER TABLE `order_good` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Final view structure for view `forder`
--
/*!50001 DROP VIEW IF EXISTS `forder`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8mb4 */;
/*!50001 SET character_set_results = utf8mb4 */;
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `forder` AS select `client`.`NameZh` AS `NameZh`,`order`.`orderId` AS `orderId`,`order`.`sprovince` AS `sprovince`,`order`.`scity` AS `scity`,`order`.`rprovince` AS `rprovince`,`order`.`rcity` AS `rcity`,`order`.`sphone` AS `sphone`,`order`.`semail` AS `semail`,`order`.`receive` AS `receive`,`order`.`rphone` AS `rphone`,`order`.`remail` AS `remail`,`order`.`check` AS `check`,`order`.`send` AS `send`,`order`.`time` AS `time` from (`client` join `order`) where (`client`.`companyCode` = `order`.`client`) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!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 2019-12-25 22:45:59