· 7 years ago · Jan 22, 2019, 03:02 AM
1/*
2Navicat MySQL Data Transfer
3
4Source Server : DK43
5Source Server Version : 50557
6Source Host : 10.21.201.21:3306
7Source Database : dkvn_thutuchanhchinh
8
9Target Server Type : MYSQL
10Target Server Version : 50557
11File Encoding : 65001
12
13Date: 2019-01-21 21:32:41
14*/
15
16SET FOREIGN_KEY_CHECKS=0;
17
18-- ----------------------------
19-- Table structure for aswmsg_messagelog
20-- ----------------------------
21DROP TABLE IF EXISTS `aswmsg_messagelog`;
22CREATE TABLE `aswmsg_messagelog` (
23 `id` int(11) NOT NULL AUTO_INCREMENT,
24 `version` varchar(50) DEFAULT NULL,
25 `messageid` varchar(100) DEFAULT NULL,
26 `sendername` varchar(255) DEFAULT NULL,
27 `senderidentity` varchar(13) DEFAULT NULL,
28 `sendercountrycode` varchar(2) DEFAULT NULL,
29 `senderministrycode` varchar(20) DEFAULT NULL,
30 `senderorganizationcode` varchar(20) DEFAULT NULL,
31 `senderunitcode` varchar(20) DEFAULT NULL,
32 `receivername` varchar(255) DEFAULT NULL,
33 `receiveridentity` varchar(13) DEFAULT NULL,
34 `receivercountrycode` varchar(2) DEFAULT NULL,
35 `receiverministrycode` varchar(20) DEFAULT NULL,
36 `receiverorganizationcode` varchar(20) DEFAULT NULL,
37 `receiverunitcode` varchar(20) DEFAULT NULL,
38 `documenttype` varchar(100) DEFAULT NULL,
39 `type` int(11) DEFAULT NULL,
40 `function` varchar(3) DEFAULT NULL,
41 `reference` bigint(20) NOT NULL,
42 `prereference` bigint(20) DEFAULT NULL,
43 `documentyear` int(11) DEFAULT NULL,
44 `senddate` datetime DEFAULT NULL,
45 `signature` blob,
46 `systemsignature` blob,
47 `allcontent` mediumblob,
48 `createdtime` datetime DEFAULT NULL,
49 `webservice` int(11) DEFAULT NULL,
50 `validated` int(11) DEFAULT NULL,
51 `validationcode` varchar(45) DEFAULT NULL,
52 `description` varchar(450) DEFAULT NULL,
53 `solangui` smallint(3) DEFAULT NULL,
54 `filelogid` bigint(20) DEFAULT NULL,
55 PRIMARY KEY (`id`),
56 KEY `reference` (`reference`),
57 KEY `prereference` (`prereference`),
58 KEY `messageid` (`messageid`)
59) ENGINE=InnoDB AUTO_INCREMENT=7857133 DEFAULT CHARSET=utf8 COMMENT='201500430014';
60
61-- ----------------------------
62-- Table structure for aswmsg_messagequeue
63-- ----------------------------
64DROP TABLE IF EXISTS `aswmsg_messagequeue`;
65CREATE TABLE `aswmsg_messagequeue` (
66 `id` int(11) NOT NULL AUTO_INCREMENT,
67 `version` varchar(50) DEFAULT NULL,
68 `messageid` varchar(100) DEFAULT NULL,
69 `sendername` varchar(255) DEFAULT NULL,
70 `senderidentity` varchar(13) DEFAULT NULL,
71 `sendercountrycode` varchar(2) DEFAULT NULL,
72 `senderministrycode` varchar(20) DEFAULT NULL,
73 `senderorganizationcode` varchar(20) DEFAULT NULL,
74 `senderunitcode` varchar(20) DEFAULT NULL,
75 `receivername` varchar(255) DEFAULT NULL,
76 `receiveridentity` varchar(13) DEFAULT NULL,
77 `receivercountrycode` varchar(2) DEFAULT NULL,
78 `receiverministrycode` varchar(20) DEFAULT NULL,
79 `receiverorganizationcode` varchar(20) DEFAULT NULL,
80 `receiverunitcode` varchar(20) DEFAULT NULL,
81 `documenttype` varchar(100) DEFAULT NULL,
82 `type` int(11) DEFAULT NULL,
83 `function` varchar(3) DEFAULT NULL,
84 `reference` bigint(20) DEFAULT NULL,
85 `prereference` bigint(20) DEFAULT NULL,
86 `documentyear` int(11) DEFAULT NULL,
87 `senddate` datetime DEFAULT NULL,
88 `signature` blob,
89 `systemsignature` blob,
90 `allcontent` longtext,
91 `createdtime` datetime DEFAULT NULL,
92 `webservice` int(11) DEFAULT NULL,
93 `validated` int(11) DEFAULT NULL,
94 `validationcode` varchar(45) DEFAULT NULL,
95 `description` varchar(450) DEFAULT NULL,
96 `solangui` smallint(3) DEFAULT NULL,
97 `hosothutucid` bigint(20) DEFAULT NULL,
98 `phieuxulyphuid` bigint(20) DEFAULT NULL,
99 `priority` smallint(3) DEFAULT NULL,
100 PRIMARY KEY (`id`),
101 KEY `priority` (`priority`),
102 KEY `messageid` (`messageid`)
103) ENGINE=InnoDB AUTO_INCREMENT=7857119 DEFAULT CHARSET=utf8;
104
105-- ----------------------------
106-- Table structure for aswmsg_messagestate
107-- ----------------------------
108DROP TABLE IF EXISTS `aswmsg_messagestate`;
109CREATE TABLE `aswmsg_messagestate` (
110 `id` int(11) NOT NULL AUTO_INCREMENT,
111 `version` varchar(50) DEFAULT NULL,
112 `messageid` varchar(100) DEFAULT NULL,
113 `sendername` varchar(255) DEFAULT NULL,
114 `senderidentity` varchar(13) DEFAULT NULL,
115 `sendercountrycode` varchar(2) DEFAULT NULL,
116 `senderministrycode` varchar(20) DEFAULT NULL,
117 `senderorganizationcode` varchar(20) DEFAULT NULL,
118 `senderunitcode` varchar(20) DEFAULT NULL,
119 `receivername` varchar(255) DEFAULT NULL,
120 `receiveridentity` varchar(13) DEFAULT NULL,
121 `receivercountrycode` varchar(2) DEFAULT NULL,
122 `receiverministrycode` varchar(20) DEFAULT NULL,
123 `receiverorganizationcode` varchar(20) DEFAULT NULL,
124 `receiverunitcode` varchar(20) DEFAULT NULL,
125 `documenttype` varchar(100) DEFAULT NULL,
126 `type` int(11) DEFAULT NULL,
127 `function` varchar(3) DEFAULT NULL,
128 `reference` bigint(20) DEFAULT NULL,
129 `prereference` bigint(20) DEFAULT NULL,
130 `documentyear` int(11) DEFAULT NULL,
131 `senddate` datetime DEFAULT NULL,
132 `signature` blob,
133 `systemsignature` blob,
134 `allcontent` longtext,
135 `createdtime` datetime DEFAULT NULL,
136 `webservice` int(11) DEFAULT NULL,
137 `validated` int(11) DEFAULT NULL,
138 `validationcode` varchar(45) DEFAULT NULL,
139 `description` varchar(450) DEFAULT NULL,
140 `solangui` smallint(3) DEFAULT NULL,
141 `hosothutucid` bigint(20) DEFAULT NULL,
142 `phieuxulyphuid` bigint(20) DEFAULT NULL,
143 `priority` smallint(3) DEFAULT NULL,
144 PRIMARY KEY (`id`),
145 KEY `priority` (`priority`),
146 KEY `messageid` (`messageid`)
147) ENGINE=InnoDB AUTO_INCREMENT=130629 DEFAULT CHARSET=utf8;
148
149-- ----------------------------
150-- Table structure for aswmsg_syndatahistory
151-- ----------------------------
152DROP TABLE IF EXISTS `aswmsg_syndatahistory`;
153CREATE TABLE `aswmsg_syndatahistory` (
154 `id` int(11) NOT NULL AUTO_INCREMENT,
155 `version` varchar(50) DEFAULT NULL,
156 `messageid` varchar(100) DEFAULT NULL,
157 `sendername` varchar(255) DEFAULT NULL,
158 `senderidentity` varchar(13) DEFAULT NULL,
159 `sendercountrycode` varchar(2) DEFAULT NULL,
160 `senderministrycode` varchar(20) DEFAULT NULL,
161 `senderorganizationcode` varchar(20) DEFAULT NULL,
162 `senderunitcode` varchar(20) DEFAULT NULL,
163 `receivername` varchar(255) DEFAULT NULL,
164 `receiveridentity` varchar(13) DEFAULT NULL,
165 `receivercountrycode` varchar(2) DEFAULT NULL,
166 `receiverministrycode` varchar(20) DEFAULT NULL,
167 `receiverorganizationcode` varchar(20) DEFAULT NULL,
168 `receiverunitcode` varchar(20) DEFAULT NULL,
169 `documenttype` varchar(100) DEFAULT NULL,
170 `type` int(11) DEFAULT NULL,
171 `function` varchar(3) DEFAULT NULL,
172 `reference` bigint(20) DEFAULT NULL,
173 `prereference` bigint(20) DEFAULT NULL,
174 `documentyear` int(11) DEFAULT NULL,
175 `senddate` datetime DEFAULT NULL,
176 `signature` blob,
177 `systemsignature` blob,
178 `allcontent` longtext,
179 `createdtime` datetime DEFAULT NULL,
180 `webservice` int(11) DEFAULT NULL,
181 `validated` int(11) DEFAULT NULL,
182 `validationcode` varchar(450) DEFAULT NULL,
183 `description` longtext,
184 `priority` smallint(3) DEFAULT NULL,
185 `solangui` smallint(3) DEFAULT NULL,
186 PRIMARY KEY (`id`),
187 KEY `priority` (`priority`),
188 KEY `messageid` (`messageid`)
189) ENGINE=InnoDB AUTO_INCREMENT=2871 DEFAULT CHARSET=utf8;
190
191-- ----------------------------
192-- Table structure for aswmsg_validationlog
193-- ----------------------------
194DROP TABLE IF EXISTS `aswmsg_validationlog`;
195CREATE TABLE `aswmsg_validationlog` (
196 `id` int(11) NOT NULL AUTO_INCREMENT,
197 `messagelogid` int(11) DEFAULT NULL,
198 `tagname` varchar(255) DEFAULT NULL,
199 `validationcode` varchar(30) DEFAULT NULL,
200 `description` varchar(255) DEFAULT NULL,
201 PRIMARY KEY (`id`),
202 KEY `messagelogid` (`messagelogid`)
203) ENGINE=InnoDB AUTO_INCREMENT=13046 DEFAULT CHARSET=utf8;
204
205-- ----------------------------
206-- Table structure for aswmsg_webservice
207-- ----------------------------
208DROP TABLE IF EXISTS `aswmsg_webservice`;
209CREATE TABLE `aswmsg_webservice` (
210 `id` int(11) NOT NULL AUTO_INCREMENT,
211 `servicecode` varchar(30) DEFAULT NULL,
212 `servicename` varchar(255) DEFAULT NULL,
213 `serviceurl` varchar(255) DEFAULT NULL,
214 `username` varchar(30) DEFAULT NULL,
215 `passwords` varchar(30) DEFAULT NULL,
216 `domain` varchar(30) DEFAULT NULL,
217 PRIMARY KEY (`id`)
218) ENGINE=InnoDB DEFAULT CHARSET=utf8;
219
220-- ----------------------------
221-- Table structure for cmon_quocgia
222-- ----------------------------
223DROP TABLE IF EXISTS `cmon_quocgia`;
224CREATE TABLE `cmon_quocgia` (
225 `id` double NOT NULL,
226 `ma` varchar(3) NOT NULL,
227 `ten` varchar(100) NOT NULL,
228 `ngaytao` datetime NOT NULL,
229 `nguoitao` varchar(100) NOT NULL,
230 `ngaysua` datetime DEFAULT NULL,
231 `nguoisua` varchar(100) DEFAULT NULL,
232 `phienban` decimal(10,0) NOT NULL DEFAULT '1',
233 `daxoa` decimal(1,0) NOT NULL DEFAULT '0',
234 PRIMARY KEY (`id`)
235) ENGINE=InnoDB DEFAULT CHARSET=utf8;
236
237-- ----------------------------
238-- Table structure for cmon_thamsohethong
239-- ----------------------------
240DROP TABLE IF EXISTS `cmon_thamsohethong`;
241CREATE TABLE `cmon_thamsohethong` (
242 `id` int(11) NOT NULL,
243 `valuedata` varchar(50) DEFAULT NULL,
244 `keydata` varchar(50) DEFAULT NULL,
245 `description` varchar(50) DEFAULT NULL,
246 PRIMARY KEY (`id`),
247 UNIQUE KEY `index2` (`keydata`),
248 KEY `id` (`id`)
249) ENGINE=InnoDB DEFAULT CHARSET=utf8;
250
251-- ----------------------------
252-- Table structure for dm_datagroup
253-- ----------------------------
254DROP TABLE IF EXISTS `dm_datagroup`;
255CREATE TABLE `dm_datagroup` (
256 `id` int(11) NOT NULL AUTO_INCREMENT,
257 `code` varchar(30) DEFAULT NULL,
258 `name` varchar(255) DEFAULT NULL,
259 `description` varchar(500) DEFAULT NULL,
260 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
261 PRIMARY KEY (`id`),
262 KEY `inx_datagroup_code` (`code`) USING BTREE,
263 KEY `inx_datagroup_name` (`name`) USING BTREE,
264 KEY `id` (`id`)
265) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8;
266
267-- ----------------------------
268-- Table structure for dm_dataitem
269-- ----------------------------
270DROP TABLE IF EXISTS `dm_dataitem`;
271CREATE TABLE `dm_dataitem` (
272 `id` int(11) NOT NULL AUTO_INCREMENT,
273 `datagroupid` int(11) DEFAULT NULL,
274 `code_0` varchar(30) DEFAULT NULL,
275 `code_1` varchar(30) DEFAULT NULL,
276 `code_2` varchar(30) DEFAULT NULL,
277 `code_3` varchar(30) DEFAULT NULL,
278 `level` int(11) DEFAULT NULL,
279 `name` varchar(255) DEFAULT NULL,
280 `altername` varchar(255) DEFAULT NULL,
281 `description` varchar(500) DEFAULT NULL,
282 `validatedfrom` date DEFAULT NULL,
283 `validatedto` date DEFAULT NULL,
284 `status` int(11) DEFAULT NULL,
285 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
286 PRIMARY KEY (`id`),
287 KEY `inx_dataitem_code0` (`code_0`) USING BTREE,
288 KEY `inx_dataitem_name` (`name`) USING BTREE,
289 KEY `inx_dataitem_group` (`datagroupid`) USING BTREE,
290 KEY `inx_dataitem_level` (`level`) USING BTREE,
291 KEY `altername` (`altername`),
292 KEY `id` (`id`)
293) ENGINE=InnoDB AUTO_INCREMENT=30223 DEFAULT CHARSET=utf8;
294
295-- ----------------------------
296-- Table structure for dm_dataitem_copy20170701
297-- ----------------------------
298DROP TABLE IF EXISTS `dm_dataitem_copy20170701`;
299CREATE TABLE `dm_dataitem_copy20170701` (
300 `id` int(11) NOT NULL AUTO_INCREMENT,
301 `datagroupid` int(11) DEFAULT NULL,
302 `code_0` varchar(30) DEFAULT NULL,
303 `code_1` varchar(30) DEFAULT NULL,
304 `code_2` varchar(30) DEFAULT NULL,
305 `code_3` varchar(30) DEFAULT NULL,
306 `level` int(11) DEFAULT NULL,
307 `name` varchar(255) DEFAULT NULL,
308 `altername` varchar(255) DEFAULT NULL,
309 `description` varchar(500) DEFAULT NULL,
310 `validatedfrom` date DEFAULT NULL,
311 `validatedto` date DEFAULT NULL,
312 `status` int(11) DEFAULT NULL,
313 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
314 PRIMARY KEY (`id`),
315 KEY `inx_dataitem_code0` (`code_0`) USING BTREE,
316 KEY `inx_dataitem_name` (`name`) USING BTREE,
317 KEY `inx_dataitem_group` (`datagroupid`) USING BTREE,
318 KEY `inx_dataitem_level` (`level`) USING BTREE,
319 KEY `altername` (`altername`),
320 KEY `id` (`id`)
321) ENGINE=InnoDB AUTO_INCREMENT=24602 DEFAULT CHARSET=utf8;
322
323-- ----------------------------
324-- Table structure for dm_datavalue
325-- ----------------------------
326DROP TABLE IF EXISTS `dm_datavalue`;
327CREATE TABLE `dm_datavalue` (
328 `id` int(11) NOT NULL AUTO_INCREMENT,
329 `entity` varchar(30) DEFAULT NULL,
330 `objectid` int(11) DEFAULT NULL,
331 `fieldcode` varchar(30) DEFAULT NULL,
332 `value` varchar(255) DEFAULT NULL,
333 PRIMARY KEY (`id`)
334) ENGINE=InnoDB DEFAULT CHARSET=utf8;
335
336-- ----------------------------
337-- Table structure for dm_dataversion
338-- ----------------------------
339DROP TABLE IF EXISTS `dm_dataversion`;
340CREATE TABLE `dm_dataversion` (
341 `id` int(11) NOT NULL AUTO_INCREMENT,
342 `datagroupid` int(11) DEFAULT NULL,
343 `version` varchar(30) DEFAULT NULL,
344 `issuedtime` date DEFAULT NULL,
345 `validatedfrom` date DEFAULT NULL,
346 `validatedto` date DEFAULT NULL,
347 PRIMARY KEY (`id`)
348) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
349
350-- ----------------------------
351-- Table structure for dm_metadata
352-- ----------------------------
353DROP TABLE IF EXISTS `dm_metadata`;
354CREATE TABLE `dm_metadata` (
355 `id` int(11) NOT NULL AUTO_INCREMENT,
356 `entity` varchar(30) DEFAULT NULL,
357 `fieldcode` varchar(30) DEFAULT NULL,
358 `fieldname` varchar(255) DEFAULT NULL,
359 `fieldaltername` varchar(255) DEFAULT NULL,
360 `fielddescription` varchar(500) DEFAULT NULL,
361 `fielddataset` varchar(255) DEFAULT NULL,
362 PRIMARY KEY (`id`)
363) ENGINE=InnoDB DEFAULT CHARSET=utf8;
364
365-- ----------------------------
366-- Table structure for motcua_chuyendichtrangthai
367-- ----------------------------
368DROP TABLE IF EXISTS `motcua_chuyendichtrangthai`;
369CREATE TABLE `motcua_chuyendichtrangthai` (
370 `id` bigint(20) NOT NULL AUTO_INCREMENT,
371 `trangthainguonid` int(11) NOT NULL,
372 `trangthaidichid` int(11) NOT NULL,
373 `dieukienchuyendich` varchar(100) DEFAULT NULL,
374 `ngayxoa` datetime DEFAULT NULL,
375 `nguoixoa` int(11) DEFAULT NULL,
376 `songayxuly` smallint(6) DEFAULT NULL,
377 `phannhomhosoid` int(11) DEFAULT NULL,
378 `hanhdongxuly` varchar(255) DEFAULT NULL,
379 PRIMARY KEY (`id`),
380 KEY `inx_chuyendichtrangthai_ttnguon` (`trangthainguonid`) USING BTREE,
381 KEY `inx_chuyendichtrangthai_ttdich` (`trangthaidichid`) USING BTREE,
382 KEY `inx_chuyendichtrangthai_dkcd` (`dieukienchuyendich`) USING BTREE,
383 KEY `inx_chuyendichtrangthai_hdxl` (`hanhdongxuly`) USING BTREE,
384 KEY `inx_chuyendichtrangthai_phannhom` (`phannhomhosoid`) USING BTREE,
385 KEY `id` (`id`)
386) ENGINE=InnoDB AUTO_INCREMENT=362 DEFAULT CHARSET=utf8;
387
388-- ----------------------------
389-- Table structure for motcua_dienbienhoso
390-- ----------------------------
391DROP TABLE IF EXISTS `motcua_dienbienhoso`;
392CREATE TABLE `motcua_dienbienhoso` (
393 `id` bigint(20) NOT NULL AUTO_INCREMENT,
394 `phieuxulychinhid` int(11) DEFAULT NULL,
395 `phieuxulyphuid` int(11) DEFAULT NULL,
396 `songayquahan` int(11) DEFAULT NULL,
397 `trangthaitruocid` int(11) NOT NULL,
398 `trangthaisauid` int(11) DEFAULT NULL,
399 `ngayxuly` datetime NOT NULL,
400 `nguoixuly` int(11) DEFAULT NULL,
401 `ngayxoa` datetime DEFAULT NULL,
402 `nguoixoa` int(11) DEFAULT NULL,
403 `hanhdongxuly` varchar(255) DEFAULT NULL,
404 `noidungxuly` varchar(500) DEFAULT NULL,
405 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
406 PRIMARY KEY (`id`),
407 KEY `phieuxulyphuid` (`phieuxulyphuid`),
408 KEY `phieuxulychinhid` (`phieuxulychinhid`),
409 KEY `nguoixuly` (`nguoixuly`),
410 KEY `trangthaitruocid` (`trangthaitruocid`),
411 KEY `trangthaisauid` (`trangthaisauid`),
412 KEY `id` (`id`)
413) ENGINE=InnoDB AUTO_INCREMENT=2121420 DEFAULT CHARSET=utf8;
414
415-- ----------------------------
416-- Table structure for motcua_dongbomtgateway
417-- ----------------------------
418DROP TABLE IF EXISTS `motcua_dongbomtgateway`;
419CREATE TABLE `motcua_dongbomtgateway` (
420 `id` int(11) NOT NULL AUTO_INCREMENT,
421 `modifydate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
422 `dienbienhosoid` bigint(20) NOT NULL,
423 `phieuxulychinhid` int(11) NOT NULL,
424 `trangthai` varchar(6) DEFAULT NULL,
425 PRIMARY KEY (`id`)
426) ENGINE=InnoDB AUTO_INCREMENT=5040851 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
427
428-- ----------------------------
429-- Table structure for motcua_ketquadienbien
430-- ----------------------------
431DROP TABLE IF EXISTS `motcua_ketquadienbien`;
432CREATE TABLE `motcua_ketquadienbien` (
433 `id` bigint(20) NOT NULL AUTO_INCREMENT,
434 `dienbienhosoid` int(11) NOT NULL,
435 `noidunghosoid` int(11) NOT NULL,
436 PRIMARY KEY (`id`),
437 KEY `dienbienhosoid` (`dienbienhosoid`),
438 KEY `noidunghosoid` (`noidunghosoid`),
439 KEY `id` (`id`)
440) ENGINE=InnoDB AUTO_INCREMENT=462915 DEFAULT CHARSET=utf8;
441
442-- ----------------------------
443-- Table structure for motcua_notification
444-- ----------------------------
445DROP TABLE IF EXISTS `motcua_notification`;
446CREATE TABLE `motcua_notification` (
447 `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
448 `DOSSIERID` bigint(20) DEFAULT NULL,
449 `Organization` varchar(255) DEFAULT NULL,
450 `Division` varchar(255) DEFAULT NULL,
451 `OfficerName` varchar(255) DEFAULT NULL,
452 `MessageID` varchar(255) DEFAULT NULL,
453 `MessageType` int(11) DEFAULT NULL,
454 `PhieuxulyphuID` bigint(20) DEFAULT NULL,
455 `Response` varchar(500) DEFAULT NULL,
456 `ResponseTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
457 `RequestContent` longtext,
458 `RequestTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
459 `RequestSender` varchar(255) DEFAULT NULL,
460 `IsReply` int(11) DEFAULT NULL,
461 PRIMARY KEY (`ID`),
462 KEY `DOSSIERID` (`DOSSIERID`),
463 KEY `PhieuxulyphuID` (`PhieuxulyphuID`),
464 KEY `MessageID` (`MessageID`),
465 KEY `ID` (`ID`)
466) ENGINE=InnoDB AUTO_INCREMENT=83279 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
467
468-- ----------------------------
469-- Table structure for motcua_phancongxuly
470-- ----------------------------
471DROP TABLE IF EXISTS `motcua_phancongxuly`;
472CREATE TABLE `motcua_phancongxuly` (
473 `id` bigint(20) NOT NULL AUTO_INCREMENT,
474 `phieuxulychinhid` bigint(20) DEFAULT NULL,
475 `phieuxulyphuid` bigint(20) DEFAULT NULL,
476 `trangthaihosoid` bigint(20) DEFAULT NULL,
477 `nguoixuly` bigint(20) DEFAULT NULL,
478 `nhomxuly` bigint(20) DEFAULT NULL,
479 `ngayphancong` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
480 `nguoiphancong` bigint(20) DEFAULT NULL,
481 PRIMARY KEY (`id`),
482 KEY `phieuxulychinhid` (`phieuxulychinhid`),
483 KEY `phieuxulyphuid` (`phieuxulyphuid`),
484 KEY `nhomxuly` (`nhomxuly`),
485 KEY `trangthaihosoid` (`trangthaihosoid`),
486 KEY `id` (`id`)
487) ENGINE=InnoDB AUTO_INCREMENT=115018 DEFAULT CHARSET=utf8;
488
489-- ----------------------------
490-- Table structure for motcua_phieuxulychinh
491-- ----------------------------
492DROP TABLE IF EXISTS `motcua_phieuxulychinh`;
493CREATE TABLE `motcua_phieuxulychinh` (
494 `id` bigint(20) NOT NULL AUTO_INCREMENT,
495 `hosothutucid` bigint(20) DEFAULT NULL,
496 `quytrinhthutucid` bigint(20) DEFAULT NULL,
497 `tennguoinop` varchar(255) DEFAULT NULL,
498 `cmndnguoinop` varchar(300) DEFAULT NULL,
499 `diachinguoinop` varchar(255) DEFAULT NULL,
500 `sodtddnguoinop` varchar(300) DEFAULT NULL,
501 `emailnguoinop` varchar(255) DEFAULT NULL,
502 `ghichu` text,
503 `trangthaihientaiid` bigint(20) DEFAULT NULL,
504 `hethosocon` bigint(20) DEFAULT NULL,
505 `chiemquyenxuly` bigint(20) DEFAULT NULL,
506 `ngaytaophieu` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
507 `nguoitaophieu` bigint(20) DEFAULT NULL,
508 `sodtcdnguoinop` varchar(300) DEFAULT NULL,
509 PRIMARY KEY (`id`),
510 KEY `hosothutucid` (`hosothutucid`),
511 KEY `quytrinhthutucid` (`quytrinhthutucid`),
512 KEY `trangthaihientaiid` (`trangthaihientaiid`),
513 KEY `id` (`id`)
514) ENGINE=InnoDB AUTO_INCREMENT=205318 DEFAULT CHARSET=utf8;
515
516-- ----------------------------
517-- Table structure for motcua_phieuxulyphu
518-- ----------------------------
519DROP TABLE IF EXISTS `motcua_phieuxulyphu`;
520CREATE TABLE `motcua_phieuxulyphu` (
521 `id` bigint(20) NOT NULL AUTO_INCREMENT,
522 `phieuxulychinhid` bigint(20) DEFAULT NULL,
523 `ghichu` text,
524 `trangthaihientaiid` bigint(20) DEFAULT NULL,
525 `noidunghosoid` bigint(20) DEFAULT NULL,
526 `chiemquyenxuly` bigint(20) DEFAULT NULL,
527 `ngaytaophieu` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
528 `nguoitaophieu` bigint(20) DEFAULT NULL,
529 `trichyeunoidung` varchar(600) DEFAULT NULL,
530 `nhomphieuxuly` varchar(30) DEFAULT NULL,
531 `phannhomhosoid` int(11) DEFAULT NULL,
532 PRIMARY KEY (`id`),
533 KEY `phieuxulychinhid` (`phieuxulychinhid`),
534 KEY `noidunghosoid` (`noidunghosoid`),
535 KEY `phannhomhosoid` (`phannhomhosoid`),
536 KEY `nhomphieuxuly` (`nhomphieuxuly`),
537 KEY `trangthaihientaiid` (`trangthaihientaiid`),
538 KEY `id` (`id`)
539) ENGINE=InnoDB AUTO_INCREMENT=401461 DEFAULT CHARSET=utf8;
540
541-- ----------------------------
542-- Table structure for motcua_quytrinhthutuc
543-- ----------------------------
544DROP TABLE IF EXISTS `motcua_quytrinhthutuc`;
545CREATE TABLE `motcua_quytrinhthutuc` (
546 `id` bigint(20) NOT NULL AUTO_INCREMENT,
547 `thutuchanhchinhid` bigint(20) DEFAULT NULL,
548 `maquytrinh` varchar(30) DEFAULT NULL,
549 `tochucxuly` bigint(20) DEFAULT NULL,
550 `songayxuly` bigint(20) DEFAULT NULL,
551 PRIMARY KEY (`id`),
552 KEY `thutuchanhchinhid` (`thutuchanhchinhid`),
553 KEY `maquytrinh` (`maquytrinh`),
554 KEY `tochucxuly` (`tochucxuly`),
555 KEY `id` (`id`)
556) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
557
558-- ----------------------------
559-- Table structure for motcua_trangthaihoso
560-- ----------------------------
561DROP TABLE IF EXISTS `motcua_trangthaihoso`;
562CREATE TABLE `motcua_trangthaihoso` (
563 `id` bigint(20) NOT NULL,
564 `tentrangthai` varchar(255) DEFAULT NULL,
565 `tentienganh` varchar(255) DEFAULT NULL,
566 `kieutrangthai` bigint(20) DEFAULT NULL,
567 `motatrangthai` varchar(255) DEFAULT NULL,
568 `vaitroxuly1` bigint(20) DEFAULT NULL,
569 `vaitroxuly2` bigint(20) DEFAULT NULL,
570 `vaitroxuly3` bigint(20) DEFAULT NULL,
571 `formxuly` varchar(100) DEFAULT NULL,
572 `quytrinhthutucid` int(11) DEFAULT NULL,
573 PRIMARY KEY (`id`),
574 KEY `tentrangthai` (`tentrangthai`),
575 KEY `quytrinhthutucid` (`quytrinhthutucid`),
576 KEY `formxuly` (`formxuly`),
577 KEY `id` (`id`)
578) ENGINE=InnoDB DEFAULT CHARSET=utf8;
579
580-- ----------------------------
581-- Table structure for rp_documentstatistics
582-- ----------------------------
583DROP TABLE IF EXISTS `rp_documentstatistics`;
584CREATE TABLE `rp_documentstatistics` (
585 `id` bigint(20) NOT NULL,
586 `createDate` datetime DEFAULT NULL,
587 `modifiedDate` datetime DEFAULT NULL,
588 `documentTypeCode` varchar(75) DEFAULT NULL,
589 `remainingNumber` bigint(20) DEFAULT NULL,
590 `receivedNumber` bigint(20) DEFAULT NULL,
591 `ontimeNumber` bigint(20) DEFAULT NULL,
592 `overtimeNumber` bigint(20) DEFAULT NULL,
593 `processingNumber` bigint(20) DEFAULT NULL,
594 `delayingNumber` bigint(20) DEFAULT NULL,
595 `month` int(11) DEFAULT NULL,
596 `year` int(11) DEFAULT NULL,
597 `status` int(11) DEFAULT NULL,
598 PRIMARY KEY (`id`)
599) ENGINE=InnoDB DEFAULT CHARSET=latin1;
600
601-- ----------------------------
602-- Table structure for tthc_bieumauhoso
603-- ----------------------------
604DROP TABLE IF EXISTS `tthc_bieumauhoso`;
605CREATE TABLE `tthc_bieumauhoso` (
606 `id` bigint(20) NOT NULL AUTO_INCREMENT,
607 `mabieumau` varchar(30) DEFAULT NULL,
608 `tenbieumau` varchar(255) DEFAULT NULL,
609 `tentienganh` varchar(255) DEFAULT NULL,
610 `tailieumau` bigint(20) DEFAULT NULL,
611 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
612 PRIMARY KEY (`id`),
613 KEY `mabieumau` (`mabieumau`),
614 KEY `inx_bmhs_tailieumau` (`tailieumau`) USING BTREE,
615 KEY `id` (`id`)
616) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8;
617
618-- ----------------------------
619-- Table structure for tthc_coquanqltt
620-- ----------------------------
621DROP TABLE IF EXISTS `tthc_coquanqltt`;
622CREATE TABLE `tthc_coquanqltt` (
623 `id` bigint(20) NOT NULL AUTO_INCREMENT,
624 `tencoquanqltt` varchar(255) DEFAULT NULL,
625 `tentienganh` varchar(255) DEFAULT NULL,
626 `idcha` bigint(20) DEFAULT NULL,
627 PRIMARY KEY (`id`),
628 KEY `inx_cqqltt_idcha` (`idcha`) USING BTREE,
629 KEY `tencoquanqltt` (`tencoquanqltt`),
630 KEY `id` (`id`)
631) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
632
633-- ----------------------------
634-- Table structure for tthc_donvithuchien
635-- ----------------------------
636DROP TABLE IF EXISTS `tthc_donvithuchien`;
637CREATE TABLE `tthc_donvithuchien` (
638 `id` bigint(20) NOT NULL AUTO_INCREMENT,
639 `thutuchanhchinhid` bigint(20) DEFAULT NULL,
640 `madvth` varchar(30) DEFAULT NULL,
641 `tendvth` varchar(255) DEFAULT NULL,
642 `tentienganh` varchar(255) DEFAULT NULL,
643 `tochuc` bigint(20) DEFAULT NULL,
644 PRIMARY KEY (`id`),
645 KEY `inx_donvith_tthcid` (`thutuchanhchinhid`) USING BTREE,
646 KEY `inx_donvith_tochuc` (`tochuc`) USING BTREE,
647 KEY `madvth_tendvth` (`madvth`,`tendvth`),
648 KEY `id` (`id`)
649) ENGINE=InnoDB DEFAULT CHARSET=utf8;
650
651-- ----------------------------
652-- Table structure for tthc_hosothutuc
653-- ----------------------------
654DROP TABLE IF EXISTS `tthc_hosothutuc`;
655CREATE TABLE `tthc_hosothutuc` (
656 `id` bigint(20) NOT NULL AUTO_INCREMENT,
657 `masohoso` varchar(35) DEFAULT NULL,
658 `mabiennhan` varchar(35) DEFAULT NULL,
659 `thutuchanhchinhid` bigint(20) DEFAULT NULL,
660 `loaichuhoso` bigint(20) DEFAULT NULL,
661 `masochuhoso` varchar(30) DEFAULT NULL,
662 `tenchuhoso` varchar(255) DEFAULT NULL,
663 `diachichuhoso` varchar(600) DEFAULT NULL,
664 `trichyeunoidung` varchar(600) DEFAULT NULL,
665 `ngayguihoso` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
666 `ngaytiepnhan` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
667 `ngaybosung` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
668 `ngayhentra` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
669 `ngaytraketqua` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
670 `ngaydonghoso` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
671 `trangthaihoso` varchar(255) DEFAULT NULL,
672 `phannhomhosoid` bigint(20) DEFAULT NULL,
673 `madonvitiepnhan` varchar(30) DEFAULT NULL,
674 `tendonvitiepnhan` varchar(255) DEFAULT NULL,
675 `ngaytao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
676 `nguoitao` bigint(20) DEFAULT NULL,
677 `tochucquanly` int(20) DEFAULT NULL,
678 `ghichu` mediumtext,
679 `languicuoi` int(11) DEFAULT '0',
680 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
681 PRIMARY KEY (`id`),
682 UNIQUE KEY `masohoso` (`masohoso`),
683 KEY `trangthaihoso` (`trangthaihoso`),
684 KEY `inx_hstt_tthcid` (`thutuchanhchinhid`) USING BTREE,
685 KEY `inx_hstt_phannhomid` (`phannhomhosoid`) USING BTREE,
686 KEY `inx_hstt_nguoitao` (`nguoitao`) USING BTREE,
687 KEY `inx_hstt_ngayguihs` (`ngayguihoso`) USING BTREE,
688 KEY `inx_hstt_masohs` (`masohoso`) USING BTREE,
689 KEY `inx_hstt_tenchush` (`tenchuhoso`) USING BTREE,
690 KEY `inx_hstt_tcql` (`tochucquanly`) USING BTREE,
691 KEY `id` (`id`),
692 KEY `mabiennhan` (`mabiennhan`)
693) ENGINE=InnoDB AUTO_INCREMENT=205318 DEFAULT CHARSET=utf8;
694
695-- ----------------------------
696-- Table structure for tthc_kehoachchuyendich
697-- ----------------------------
698DROP TABLE IF EXISTS `tthc_kehoachchuyendich`;
699CREATE TABLE `tthc_kehoachchuyendich` (
700 `id` int(11) NOT NULL AUTO_INCREMENT,
701 `phieuxulychinhid` int(11) DEFAULT NULL,
702 `phieuxulyphuid` int(11) DEFAULT NULL,
703 `messageid` varchar(50) DEFAULT NULL,
704 `messagetype` varchar(50) DEFAULT NULL,
705 `messagefunction` varchar(50) DEFAULT NULL,
706 `messagestatus` varchar(50) DEFAULT NULL,
707 `trangthainguonid` int(11) DEFAULT NULL,
708 `dieukienchuyendich` varchar(200) DEFAULT NULL,
709 `trangthaidichid` int(11) DEFAULT NULL,
710 `phannhomhosoid` int(11) DEFAULT NULL,
711 `nhomphieuxuly` varchar(200) DEFAULT NULL,
712 `hoantat` varchar(255) DEFAULT NULL,
713 `debitnotenumber` varchar(100) DEFAULT NULL,
714 `ghichu` mediumtext,
715 `thoidiemcapnhat` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
716 PRIMARY KEY (`id`)
717) ENGINE=InnoDB AUTO_INCREMENT=1431107 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
718
719-- ----------------------------
720-- Table structure for tthc_linhvucthutuc
721-- ----------------------------
722DROP TABLE IF EXISTS `tthc_linhvucthutuc`;
723CREATE TABLE `tthc_linhvucthutuc` (
724 `id` bigint(20) NOT NULL AUTO_INCREMENT,
725 `tenlinhvuc` varchar(255) DEFAULT NULL,
726 `tentienganh` varchar(255) DEFAULT NULL,
727 `idcha` bigint(20) DEFAULT NULL,
728 PRIMARY KEY (`id`),
729 KEY `inx_linhvuctt_idcha` (`idcha`) USING BTREE,
730 KEY `tenlinhvuc` (`tenlinhvuc`),
731 KEY `id` (`id`)
732) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
733
734-- ----------------------------
735-- Table structure for tthc_noidunghoso
736-- ----------------------------
737DROP TABLE IF EXISTS `tthc_noidunghoso`;
738CREATE TABLE `tthc_noidunghoso` (
739 `id` bigint(20) NOT NULL AUTO_INCREMENT,
740 `matusinh` varchar(255) DEFAULT NULL,
741 `hosothutucid` bigint(20) DEFAULT NULL,
742 `tentailieu` varchar(255) DEFAULT NULL,
743 `tailieudinhkem` bigint(20) DEFAULT NULL,
744 `noidungxml` longtext,
745 `noidungfile` mediumblob,
746 `bieumauhosoid` bigint(20) DEFAULT NULL,
747 `ngayguinhan` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
748 `loaitailieu` bigint(20) DEFAULT NULL,
749 `ngaytao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
750 `nguoitao` bigint(20) DEFAULT NULL,
751 `vehiclerecordid` int(11) DEFAULT NULL,
752 `dacapnhat` int(11) DEFAULT NULL,
753 `languicuoi` int(11) DEFAULT '0',
754 PRIMARY KEY (`id`),
755 KEY `inx_noidunghs_hsttid` (`hosothutucid`) USING BTREE,
756 KEY `inx_noidunghs_tailieukem` (`tailieudinhkem`) USING BTREE,
757 KEY `inx_noidunghs_bieumauhs` (`bieumauhosoid`) USING BTREE,
758 KEY `inx_noidunghs_nguoitao` (`nguoitao`) USING BTREE,
759 KEY `dacapnhat` (`dacapnhat`),
760 KEY `id` (`id`),
761 KEY `vehiclerecordid` (`vehiclerecordid`)
762) ENGINE=InnoDB AUTO_INCREMENT=3500720 DEFAULT CHARSET=utf8;
763
764-- ----------------------------
765-- Table structure for tthc_phannhomhoso
766-- ----------------------------
767DROP TABLE IF EXISTS `tthc_phannhomhoso`;
768CREATE TABLE `tthc_phannhomhoso` (
769 `id` bigint(20) NOT NULL AUTO_INCREMENT,
770 `maphannhom` varchar(30) DEFAULT NULL,
771 `tenphannhom` varchar(255) DEFAULT NULL,
772 `tentienganh` varchar(255) DEFAULT NULL,
773 `sothutu` int(11) DEFAULT NULL,
774 `loaiphieuxuly` smallint(6) DEFAULT NULL,
775 `THUCAP` smallint(6) DEFAULT NULL,
776 `synchdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
777 PRIMARY KEY (`id`),
778 KEY `maphannhom_tenphannhom` (`maphannhom`,`tenphannhom`),
779 KEY `loaiphieuxuly` (`loaiphieuxuly`),
780 KEY `THUCAP` (`THUCAP`),
781 KEY `id` (`id`)
782) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;
783
784-- ----------------------------
785-- Table structure for tthc_phannhomhoso_vaitro
786-- ----------------------------
787DROP TABLE IF EXISTS `tthc_phannhomhoso_vaitro`;
788CREATE TABLE `tthc_phannhomhoso_vaitro` (
789 `id` bigint(20) NOT NULL AUTO_INCREMENT,
790 `phannhomhosoid` bigint(20) DEFAULT NULL,
791 `vaitroxuly` bigint(20) DEFAULT NULL,
792 `nhomphieuxuly` varchar(30) DEFAULT NULL,
793 `LOAIPHIEUXULY` smallint(6) DEFAULT NULL,
794 PRIMARY KEY (`id`),
795 KEY `inx_phannhom_phannhomhsid` (`phannhomhosoid`) USING BTREE,
796 KEY `inx_phannhom_vaotroxuly` (`vaitroxuly`) USING BTREE,
797 KEY `id` (`id`)
798) ENGINE=InnoDB AUTO_INCREMENT=651 DEFAULT CHARSET=utf8;
799
800-- ----------------------------
801-- Table structure for tthc_thanhphanhoso
802-- ----------------------------
803DROP TABLE IF EXISTS `tthc_thanhphanhoso`;
804CREATE TABLE `tthc_thanhphanhoso` (
805 `id` bigint(20) NOT NULL AUTO_INCREMENT,
806 `thutuchanhchinhid` bigint(20) DEFAULT NULL,
807 `bieumauhosoid` bigint(20) DEFAULT NULL,
808 `thutuhienthi` bigint(20) DEFAULT NULL,
809 `loaithanhphan` bigint(20) DEFAULT NULL,
810 `mautructuyen` varchar(30) DEFAULT NULL,
811 `sotailieudinhkem` bigint(20) DEFAULT NULL,
812 PRIMARY KEY (`id`),
813 KEY `inx_tphs_tthcid` (`thutuchanhchinhid`) USING BTREE,
814 KEY `inx_tphs_bieumauid` (`bieumauhosoid`) USING BTREE,
815 KEY `mautructuyen` (`mautructuyen`),
816 KEY `id` (`id`)
817) ENGINE=InnoDB AUTO_INCREMENT=153 DEFAULT CHARSET=utf8;
818
819-- ----------------------------
820-- Table structure for tthc_thutuchanhchinh
821-- ----------------------------
822DROP TABLE IF EXISTS `tthc_thutuchanhchinh`;
823CREATE TABLE `tthc_thutuchanhchinh` (
824 `id` bigint(20) NOT NULL AUTO_INCREMENT,
825 `mathutuc` varchar(30) DEFAULT NULL,
826 `tenthutuc` varchar(255) DEFAULT NULL,
827 `trinhtuthuchien` text,
828 `cachthucthuchien` text,
829 `thanhphanhoso` text,
830 `dieukienthuchien` text,
831 `thoihangiaiquyet` text,
832 `doituongthuchien` varchar(255) DEFAULT NULL,
833 `ketquaxuly` text,
834 `cancuphaply` text,
835 `lephi` text,
836 `coquanqlttid` bigint(20) DEFAULT NULL,
837 `linhvucthutucid` bigint(20) DEFAULT NULL,
838 `ngaycohieuluc` date DEFAULT NULL,
839 `ngayhethieuluc` date DEFAULT NULL,
840 `huongdanthuchien` bigint(20) DEFAULT NULL,
841 PRIMARY KEY (`id`),
842 KEY `inx_tthc_cqqlttid` (`coquanqlttid`) USING BTREE,
843 KEY `inx_tthc_linhvucid` (`linhvucthutucid`) USING BTREE,
844 KEY `mathutuc_tenthutuc` (`mathutuc`,`tenthutuc`),
845 KEY `id` (`id`)
846) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
847
848-- ----------------------------
849-- View structure for view_dakiemtra
850-- ----------------------------
851DROP VIEW IF EXISTS `view_dakiemtra`;
852CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_dakiemtra` AS select distinct `phieuxulyphu`.`id` AS `id`,`phieuxulyphu`.`phieuxulychinhid` AS `phieuxulychinhid`,`phieuxulyphu`.`ghichu` AS `ghichu`,`phieuxulyphu`.`trangthaihientaiid` AS `trangthaihientaiid`,`phieuxulyphu`.`noidunghosoid` AS `noidunghosoid`,`phieuxulyphu`.`chiemquyenxuly` AS `chiemquyenxuly`,`phieuxulyphu`.`ngaytaophieu` AS `ngaytaophieu`,`phieuxulyphu`.`nguoitaophieu` AS `nguoitaophieu`,`phieuxulyphu`.`trichyeunoidung` AS `trichyeunoidung`,`phieuxulyphu`.`nhomphieuxuly` AS `nhomphieuxuly`,`phieuxulyphu`.`phannhomhosoid` AS `phannhomhosoid`,`phieuxulyphu`.`masohoso` AS `masohoso`,`phieuxulyphu`.`mabiennhan` AS `mabiennhan`,`phieuxulyphu`.`tenchuhoso` AS `tenchuhoso`,`phieuxulyphu`.`ngayguihoso` AS `ngayguihoso`,`phieuxulyphu`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`phieuxulyphu`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`phieuxulyphu`.`tochucquanly` AS `tochucquanly`,`inspectionrecord`.`inspectorid` AS `inspectorid`,`inspectionrecord`.`corporationid` AS `corporationid` from (`dkvn_thutuchanhchinh`.`view_phieuxulyphu_hosothutuc` `phieuxulyphu` join `dkvn_nghiepvu`.`vr_inspectionrecord` `inspectionrecord`) where (`phieuxulyphu`.`id` = `inspectionrecord`.`phieuxulyphuid`) ;
853
854-- ----------------------------
855-- View structure for view_dakiemtra_backup
856-- ----------------------------
857DROP VIEW IF EXISTS `view_dakiemtra_backup`;
858CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_tthc`@`%` SQL SECURITY DEFINER VIEW `view_dakiemtra_backup` AS select distinct `phieuxulyphu`.`id` AS `id`,`phieuxulyphu`.`phieuxulychinhid` AS `phieuxulychinhid`,`phieuxulyphu`.`ghichu` AS `ghichu`,`phieuxulyphu`.`trangthaihientaiid` AS `trangthaihientaiid`,`phieuxulyphu`.`noidunghosoid` AS `noidunghosoid`,`phieuxulyphu`.`chiemquyenxuly` AS `chiemquyenxuly`,`phieuxulyphu`.`ngaytaophieu` AS `ngaytaophieu`,`phieuxulyphu`.`nguoitaophieu` AS `nguoitaophieu`,`phieuxulyphu`.`trichyeunoidung` AS `trichyeunoidung`,`phieuxulyphu`.`nhomphieuxuly` AS `nhomphieuxuly`,`phieuxulyphu`.`phannhomhosoid` AS `phannhomhosoid`,`phieuxulyphu`.`masohoso` AS `masohoso`,`phieuxulyphu`.`mabiennhan` AS `mabiennhan`,`phieuxulyphu`.`tenchuhoso` AS `tenchuhoso`,`phieuxulyphu`.`ngayguihoso` AS `ngayguihoso`,`phieuxulyphu`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`phieuxulyphu`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`phieuxulyphu`.`tochucquanly` AS `tochucquanly`,`inspectionrecord`.`inspectorid` AS `inspectorid`,`inspectionrecord`.`corporationid` AS `corporationid` from (`dkvn_thutuchanhchinh`.`view_phieuxulyphu_hosothutuc` `phieuxulyphu` join `dkvn_nghiepvu`.`vr_inspectionrecord` `inspectionrecord` on((`phieuxulyphu`.`id` = `inspectionrecord`.`phieuxulyphuid`))) ;
859
860-- ----------------------------
861-- View structure for view_lichkiemtrahientruong
862-- ----------------------------
863DROP VIEW IF EXISTS `view_lichkiemtrahientruong`;
864CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_lichkiemtrahientruong` AS select distinct `donvikiemtra`.`id` AS `id`,`donvikiemtra`.`phieuxulychinhid` AS `phieuxulychinhid`,`donvikiemtra`.`ghichu` AS `ghichu`,`donvikiemtra`.`trangthaihientaiid` AS `trangthaihientaiid`,`donvikiemtra`.`noidunghosoid` AS `noidunghosoid`,`donvikiemtra`.`chiemquyenxuly` AS `chiemquyenxuly`,`donvikiemtra`.`ngaytaophieu` AS `ngaytaophieu`,`donvikiemtra`.`nguoitaophieu` AS `nguoitaophieu`,`donvikiemtra`.`trichyeunoidung` AS `trichyeunoidung`,`donvikiemtra`.`nhomphieuxuly` AS `nhomphieuxuly`,`donvikiemtra`.`phannhomhosoid` AS `phannhomhosoid`,`donvikiemtra`.`masohoso` AS `masohoso`,`donvikiemtra`.`mabiennhan` AS `mabiennhan`,`donvikiemtra`.`tenchuhoso` AS `tenchuhoso`,`donvikiemtra`.`ngayguihoso` AS `ngayguihoso`,`donvikiemtra`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`donvikiemtra`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`donvikiemtra`.`tochucquanly` AS `tochucquanly`,`donvikiemtra`.`inspectionprovincecode` AS `inspectionprovincecode`,`donvikiemtra`.`corporationid` AS `corporationid`,`donvikiemtra`.`inspectorid` AS `inspectorid`,`donvikiemtra`.`confirmedinspectionId` AS `confirmedinspectionId`,`donvikiemtra`.`inspectiondistrictcode` AS `inspectiondistrictcode`,`donvikiemtra`.`ATTACHEDFILE` AS `ATTACHEDFILE` from (`dkvn_thutuchanhchinh`.`view_phancongdonvikiemtra` `donvikiemtra` join `dkvn_nghiepvu`.`vr_corporation_view` `corporation_view`) where ((`corporation_view`.`corporationid` = `donvikiemtra`.`corporationid`) and (`corporation_view`.`isleader` = 1)) union select distinct `donvikiemtra`.`id` AS `id`,`donvikiemtra`.`phieuxulychinhid` AS `phieuxulychinhid`,`donvikiemtra`.`ghichu` AS `ghichu`,`donvikiemtra`.`trangthaihientaiid` AS `trangthaihientaiid`,`donvikiemtra`.`noidunghosoid` AS `noidunghosoid`,`donvikiemtra`.`chiemquyenxuly` AS `chiemquyenxuly`,`donvikiemtra`.`ngaytaophieu` AS `ngaytaophieu`,`donvikiemtra`.`nguoitaophieu` AS `nguoitaophieu`,`donvikiemtra`.`trichyeunoidung` AS `trichyeunoidung`,`donvikiemtra`.`nhomphieuxuly` AS `nhomphieuxuly`,`donvikiemtra`.`phannhomhosoid` AS `phannhomhosoid`,`donvikiemtra`.`masohoso` AS `masohoso`,`donvikiemtra`.`mabiennhan` AS `mabiennhan`,`donvikiemtra`.`tenchuhoso` AS `tenchuhoso`,`donvikiemtra`.`ngayguihoso` AS `ngayguihoso`,`donvikiemtra`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`donvikiemtra`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`donvikiemtra`.`tochucquanly` AS `tochucquanly`,`donvikiemtra`.`inspectionprovincecode` AS `inspectionprovincecode`,`donvikiemtra`.`corporationid` AS `corporationid`,`donvikiemtra`.`inspectorid` AS `inspectorid`,`donvikiemtra`.`confirmedinspectionId` AS `confirmedinspectionId`,`donvikiemtra`.`inspectiondistrictcode` AS `inspectiondistrictcode`,`donvikiemtra`.`ATTACHEDFILE` AS `ATTACHEDFILE` from (`dkvn_thutuchanhchinh`.`view_phancongdonvikiemtra` `donvikiemtra` join `dkvn_nghiepvu`.`vr_corporation_view` `corporation_view`) where ((`corporation_view`.`inspectorid` = `donvikiemtra`.`inspectorid`) and (`corporation_view`.`corporationid` = `donvikiemtra`.`corporationid`) and (`corporation_view`.`isleader` = 0)) ;
865
866-- ----------------------------
867-- View structure for view_phancongdonvikiemtra
868-- ----------------------------
869DROP VIEW IF EXISTS `view_phancongdonvikiemtra`;
870CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_phancongdonvikiemtra` AS select distinct `phieuxulyphu`.`id` AS `id`,`phieuxulyphu`.`phieuxulychinhid` AS `phieuxulychinhid`,`phieuxulyphu`.`ghichu` AS `ghichu`,`phieuxulyphu`.`trangthaihientaiid` AS `trangthaihientaiid`,`phieuxulyphu`.`noidunghosoid` AS `noidunghosoid`,`phieuxulyphu`.`chiemquyenxuly` AS `chiemquyenxuly`,`phieuxulyphu`.`ngaytaophieu` AS `ngaytaophieu`,`phieuxulyphu`.`nguoitaophieu` AS `nguoitaophieu`,`phieuxulyphu`.`trichyeunoidung` AS `trichyeunoidung`,`phieuxulyphu`.`nhomphieuxuly` AS `nhomphieuxuly`,`phieuxulyphu`.`phannhomhosoid` AS `phannhomhosoid`,`phieuxulyphu`.`masohoso` AS `masohoso`,`phieuxulyphu`.`mabiennhan` AS `mabiennhan`,`phieuxulyphu`.`tenchuhoso` AS `tenchuhoso`,`phieuxulyphu`.`ngayguihoso` AS `ngayguihoso`,`phieuxulyphu`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`phieuxulyphu`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`phieuxulyphu`.`tochucquanly` AS `tochucquanly`,`confirmedinspection`.`inspectionprovincecode` AS `inspectionprovincecode`,`confirmedinspection`.`corporationid` AS `corporationid`,`confirmedinspection`.`inspectorid` AS `inspectorid`,`confirmedinspection`.`id` AS `confirmedinspectionId`,`confirmedinspection`.`inspectiondistrictcode` AS `inspectiondistrictcode`,`confirmedinspection`.`ATTACHEDFILE` AS `ATTACHEDFILE` from (`dkvn_thutuchanhchinh`.`view_phieuxulyphu_hosothutuc` `phieuxulyphu` join `dkvn_nghiepvu`.`vr_confirmedinspection` `confirmedinspection`) where (`phieuxulyphu`.`id` = `confirmedinspection`.`phieuxulyphuid`) ;
871
872-- ----------------------------
873-- View structure for view_phancongkiemtra
874-- ----------------------------
875DROP VIEW IF EXISTS `view_phancongkiemtra`;
876CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_phancongkiemtra` AS select `a`.`id` AS `id`,`a`.`phieuxulychinhid` AS `phieuxulychinhid`,`a`.`ghichu` AS `ghichu`,`a`.`trangthaihientaiid` AS `trangthaihientaiid`,`a`.`noidunghosoid` AS `noidunghosoid`,`a`.`chiemquyenxuly` AS `chiemquyenxuly`,`a`.`ngaytaophieu` AS `ngaytaophieu`,`a`.`nhomphieuxuly` AS `nhomphieuxuly`,`a`.`phannhomhosoid` AS `phannhomhosoid`,`c`.`inspectorid` AS `inspectorid`,`b`.`inspectionprovincecode` AS `inspectionprovincecode`,`d`.`id` AS `thutuchanhchinhid`,`d`.`masohoso` AS `maSoHoSo`,`d`.`ngayguihoso` AS `ngayguihoso`,`d`.`mabiennhan` AS `mabiennhan`,`d`.`tochucquanly` AS `tochucquanly`,`d`.`tenchuhoso` AS `tenchuhoso`,`d`.`tendonvitiepnhan` AS `tendonvitiepnhan` from (((`dkvn_thutuchanhchinh`.`motcua_phieuxulyphu` `a` join `dkvn_nghiepvu`.`vr_confirmedinspection` `b`) join `dkvn_nghiepvu`.`vr_corporation_view` `c`) join `dkvn_thutuchanhchinh`.`tthc_hosothutuc` `d`) where ((`a`.`id` = `b`.`phieuxulyphuid`) and (`b`.`corporationid` = `c`.`corporationid`) and (`a`.`phieuxulychinhid` = `d`.`id`)) group by `a`.`id`,`a`.`phieuxulychinhid`,`a`.`ghichu`,`a`.`trangthaihientaiid`,`a`.`noidunghosoid`,`a`.`chiemquyenxuly`,`a`.`ngaytaophieu`,`a`.`nhomphieuxuly`,`a`.`phannhomhosoid`,`c`.`inspectorid`,`b`.`inspectionprovincecode`,`d`.`id`,`d`.`masohoso`,`d`.`ngayguihoso`,`d`.`mabiennhan`,`d`.`tochucquanly`,`d`.`tenchuhoso`,`d`.`tendonvitiepnhan` order by `a`.`ngaytaophieu` desc ;
877
878-- ----------------------------
879-- View structure for view_phieuxulychinh_hosothutuc
880-- ----------------------------
881DROP VIEW IF EXISTS `view_phieuxulychinh_hosothutuc`;
882CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_phieuxulychinh_hosothutuc` AS select distinct `motcua_phieuxulychinh`.`id` AS `id`,`motcua_phieuxulychinh`.`hosothutucid` AS `hosothutucid`,`motcua_phieuxulychinh`.`quytrinhthutucid` AS `quytrinhthutucid`,`motcua_phieuxulychinh`.`tennguoinop` AS `tennguoinop`,`motcua_phieuxulychinh`.`cmndnguoinop` AS `cmndnguoinop`,`motcua_phieuxulychinh`.`diachinguoinop` AS `diachinguoinop`,`motcua_phieuxulychinh`.`sodtddnguoinop` AS `sodtddnguoinop`,`motcua_phieuxulychinh`.`emailnguoinop` AS `emailnguoinop`,`motcua_phieuxulychinh`.`ghichu` AS `ghichu`,`motcua_phieuxulychinh`.`trangthaihientaiid` AS `trangthaihientaiid`,`motcua_phieuxulychinh`.`hethosocon` AS `hethosocon`,`motcua_phieuxulychinh`.`chiemquyenxuly` AS `chiemquyenxuly`,`motcua_phieuxulychinh`.`ngaytaophieu` AS `ngaytaophieu`,`motcua_phieuxulychinh`.`nguoitaophieu` AS `nguoitaophieu`,`motcua_phieuxulychinh`.`sodtcdnguoinop` AS `sodtcdnguoinop`,`tthc_hosothutuc`.`masohoso` AS `masohoso`,`tthc_hosothutuc`.`mabiennhan` AS `mabiennhan`,`tthc_hosothutuc`.`tenchuhoso` AS `tenchuhoso`,`tthc_hosothutuc`.`ngayguihoso` AS `ngayguihoso`,`tthc_hosothutuc`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`tthc_hosothutuc`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`tthc_hosothutuc`.`tochucquanly` AS `tochucquanly` from (`tthc_hosothutuc` join `motcua_phieuxulychinh`) where (`tthc_hosothutuc`.`id` = `motcua_phieuxulychinh`.`id`) ;
883
884-- ----------------------------
885-- View structure for view_phieuxulyphu_hosothutuc
886-- ----------------------------
887DROP VIEW IF EXISTS `view_phieuxulyphu_hosothutuc`;
888CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_phieuxulyphu_hosothutuc` AS select distinct `motcua_phieuxulyphu`.`id` AS `id`,`motcua_phieuxulyphu`.`phieuxulychinhid` AS `phieuxulychinhid`,`motcua_phieuxulyphu`.`ghichu` AS `ghichu`,`motcua_phieuxulyphu`.`trangthaihientaiid` AS `trangthaihientaiid`,`motcua_phieuxulyphu`.`noidunghosoid` AS `noidunghosoid`,`motcua_phieuxulyphu`.`chiemquyenxuly` AS `chiemquyenxuly`,`motcua_phieuxulyphu`.`ngaytaophieu` AS `ngaytaophieu`,`motcua_phieuxulyphu`.`nguoitaophieu` AS `nguoitaophieu`,`motcua_phieuxulyphu`.`trichyeunoidung` AS `trichyeunoidung`,`motcua_phieuxulyphu`.`nhomphieuxuly` AS `nhomphieuxuly`,`motcua_phieuxulyphu`.`phannhomhosoid` AS `phannhomhosoid`,`tthc_hosothutuc`.`masohoso` AS `masohoso`,`tthc_hosothutuc`.`mabiennhan` AS `mabiennhan`,`tthc_hosothutuc`.`tenchuhoso` AS `tenchuhoso`,`tthc_hosothutuc`.`ngayguihoso` AS `ngayguihoso`,`tthc_hosothutuc`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`tthc_hosothutuc`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`tthc_hosothutuc`.`tochucquanly` AS `tochucquanly` from (`tthc_hosothutuc` join `motcua_phieuxulyphu`) where (`tthc_hosothutuc`.`id` = `motcua_phieuxulyphu`.`phieuxulychinhid`) ;
889
890-- ----------------------------
891-- View structure for view_thongke_stage1
892-- ----------------------------
893DROP VIEW IF EXISTS `view_thongke_stage1`;
894CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `view_thongke_stage1` AS select `hs`.`mabiennhan` AS `mabiennhan`,`cert`.`certificatenumber` AS `certificatenumber`,`cert`.`signdate` AS `signdate`,`hs`.`tenchuhoso` AS `tenchuhoso`,`dat2`.`name` AS `loaipt`,`dat1`.`name` AS `nhanhieu`,`grp`.`commercialname` AS `commercialname`,`grp`.`modelcode` AS `modelcode`,`pt`.`chassisnumber` AS `chassisnumber`,`pt`.`enginenumber` AS `enginenumber`,`cert`.`id` AS `certid` from ((((((`dkvn_nghiepvu`.`vr_vehiclerecord` `pt` join `dkvn_nghiepvu`.`vr_certificaterecord` `cert`) join `dkvn_nghiepvu`.`vr_vehiclegroup` `grp`) join `dkvn_thutuchanhchinh`.`dm_dataitem` `dat1`) join `dkvn_thutuchanhchinh`.`dm_dataitem` `dat2`) join `dkvn_nghiepvu`.`vr_productioncountry` `ctr`) join `dkvn_thutuchanhchinh`.`tthc_hosothutuc` `hs`) where ((`cert`.`id` = `pt`.`certificaterecordid`) and (`grp`.`id` = `pt`.`vehiclegroupid`) and (`dat1`.`datagroupid` = 3) and (`dat1`.`code_0` = `grp`.`trademark`) and (`dat2`.`datagroupid` = 2) and (`dat2`.`code_0` = `grp`.`vehicletype`) and (`grp`.`id` = `ctr`.`vehiclegroupid`) and (`hs`.`id` = `grp`.`hosothutucid`) and (substr(`cert`.`certificatenumber`,3,3) in ('KOT','MOT'))) ;
895
896-- ----------------------------
897-- View structure for view_timkiemhoso
898-- ----------------------------
899DROP VIEW IF EXISTS `view_timkiemhoso`;
900CREATE ALGORITHM=UNDEFINED DEFINER=`dkvn_nghiepvu`@`%` SQL SECURITY DEFINER VIEW `view_timkiemhoso` AS select `hosothutuc`.`id` AS `id`,`hosothutuc`.`masohoso` AS `masohoso`,`hosothutuc`.`mabiennhan` AS `mabiennhan`,`hosothutuc`.`thutuchanhchinhid` AS `thutuchanhchinhid`,`hosothutuc`.`loaichuhoso` AS `loaichuhoso`,`hosothutuc`.`masochuhoso` AS `masochuhoso`,`hosothutuc`.`tenchuhoso` AS `tenchuhoso`,`hosothutuc`.`diachichuhoso` AS `diachichuhoso`,`hosothutuc`.`trichyeunoidung` AS `trichyeunoidung`,`hosothutuc`.`ngayguihoso` AS `ngayguihoso`,`hosothutuc`.`ngaytiepnhan` AS `ngaytiepnhan`,`hosothutuc`.`ngaybosung` AS `ngaybosung`,`hosothutuc`.`ngayhentra` AS `ngayhentra`,`hosothutuc`.`ngaytraketqua` AS `ngaytraketqua`,`hosothutuc`.`ngaydonghoso` AS `ngaydonghoso`,`hosothutuc`.`trangthaihoso` AS `trangthaihoso`,`hosothutuc`.`phannhomhosoid` AS `phannhomhosoid`,`hosothutuc`.`madonvitiepnhan` AS `madonvitiepnhan`,`hosothutuc`.`tendonvitiepnhan` AS `tendonvitiepnhan`,`hosothutuc`.`ngaytao` AS `ngaytao`,`hosothutuc`.`nguoitao` AS `nguoitao`,`hosothutuc`.`tochucquanly` AS `tochucquanly`,`hosothutuc`.`ghichu` AS `ghichu`,`hosothutuc`.`languicuoi` AS `languicuoi`,`confirmedinspection`.`registeredinspectionid` AS `registeredinspectionid`,`phieuxulychinh`.`trangthaihientaiid` AS `trangthaihientaiid`,`inspectionrecord`.`corporationid` AS `corporationid`,`registeredinspection`.`inspectiondate` AS `inspectiondate` from ((((`dkvn_thutuchanhchinh`.`motcua_phieuxulychinh` `phieuxulychinh` join `dkvn_thutuchanhchinh`.`tthc_hosothutuc` `hosothutuc` on((`hosothutuc`.`id` = `phieuxulychinh`.`hosothutucid`))) left join `dkvn_nghiepvu`.`vr_inspectionrecord` `inspectionrecord` on((`hosothutuc`.`id` = `inspectionrecord`.`hosothutucid`))) left join `dkvn_nghiepvu`.`vr_confirmedinspection` `confirmedinspection` on((`hosothutuc`.`id` = `confirmedinspection`.`hosothutucid`))) left join `dkvn_nghiepvu`.`vr_registeredinspection` `registeredinspection` on((`registeredinspection`.`dossierid` = `phieuxulychinh`.`hosothutucid`))) ;