You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/word/新协航_设计文档/数据库建表文档/1.0/枚举类型设置及部分视图.sql

232 lines
10 KiB
MySQL

2 years ago
select m.seller,m.buyer,m.contractno,m.id as mainid,cg.id ,
cg.name,c.country_code,c.country ,M.billno,M.ContainerNo,M.SealNo,M.ContractAmount
from import_main M
left join import_country c on m.country_id=c.id
left join import_cargo cg on cg.contract_id=M.id
left join import_cargoinfo ci on ci.id=cg.cargoinfo_id
select distinct seller from import_main
-----------<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ------------
select * from tSysEnumtype
select * from tSysEnumvalue
/*
delete from tSysEnumtype where langid=8
delete from tSysEnumValue where langid=8
delete from tSysEnumtype where enumtypeid=8
delete from tSysEnumValue where enumtypeid=8
*/
insert into tSysEnumtype values(0,0,'<EFBFBD>ǻ<EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,0,0,'<EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,0,1,'<EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumtype values(0,1,'<EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD>ʽ',1)
insert into tSysEnumValue values(0,1,0,'FOB',0,1,1.00)
insert into tSysEnumValue values(0,1,1,'CIF',0,2,1.00)
insert into tSysEnumValue values(0,1,2,'CIP',0,3,1.00)
delete from tSysEnumtype where enumtypeid=2
delete from tsysenumvalue where enumtypeid=2
insert into tSysEnumtype values(0,2,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,2,0,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,2,1,'<EFBFBD>Զ<EFBFBD>֤',0,2,1.00)
insert into tSysEnumValue values(0,2,2,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤',0,3,1.00)
insert into tSysEnumValue values(0,2,3,'<EFBFBD>',0,4,1.00)
delete from tSysEnumtype where enumtypeid=3
delete from tsysenumvalue where enumtypeid=3
insert into tSysEnumtype values(0,3,'<EFBFBD><EFBFBD>ͬ״̬',1)
insert into tSysEnumValue values(0,3,0,'<EFBFBD>ӵ<EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,3,1,'<EFBFBD><EFBFBD>֤',0,2,1.00)
insert into tSysEnumValue values(0,3,2,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,3,1.00)
insert into tSysEnumValue values(0,3,3,'<EFBFBD><EFBFBD>֤',0,4,1.00)
insert into tSysEnumValue values(0,3,4,'<EFBFBD>ۿڲ<EFBFBD><EFBFBD><EFBFBD>',0,5,1.00)
insert into tSysEnumValue values(0,3,5,'<EFBFBD>˵<EFBFBD><EFBFBD>',0,6,1.00)
insert into tSysEnumValue values(0,3,6,'<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>',0,7,1.00)
insert into tSysEnumValue values(0,3,7,'<EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,8,1.00)
insert into tSysEnumtype values(0,4,'<EFBFBD><EFBFBD><EFBFBD>ʽ',1)
insert into tSysEnumValue values(0,4,0,'DP',0,1,1.00)
insert into tSysEnumValue values(0,4,1,'TT',0,2,1.00)
insert into tSysEnumtype values(0,5,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾',1)
insert into tSysEnumValue values(0,5,0,'δ֪',0,1,1.00)
insert into tSysEnumValue values(0,5,1,'BBB<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾',0,2,1.00)
insert into tSysEnumValue values(0,5,2,'CCC<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾',0,3,1.00)
insert into tSysEnumtype values(0,6,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',1)
insert into tSysEnumValue values(0,6,0,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,6,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumtype values(0,7,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬',1)
insert into tSysEnumValue values(0,7,0,'',0,1,1.00)
insert into tSysEnumValue values(0,7,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,7,2,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,7,3,'<EFBFBD>ѷ<EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,7,4,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,7,5,'<EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>',0,2,1.00)
insert into tSysEnumtype values(0,8,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬',1)
insert into tSysEnumValue values(0,8,0,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,8,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,8,2,'ת<EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,8,3,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,8,4,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumtype values(0,9,'<EFBFBD>ⷿ',1)
insert into tSysEnumValue values(0,9,0,'δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,9,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,9,2,'<EFBFBD>̼<EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,9,3,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumtype values(0,10,'<EFBFBD>ۿ<EFBFBD>',1)
insert into tSysEnumValue values(0,10,0,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,10,1,'<EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,10,2,'<EFBFBD>Ϻ<EFBFBD>',0,2,1.00)
delete from tSysEnumtype where enumtypeid=11
delete from tsysenumvalue where enumtypeid=11
insert into tSysEnumtype values(0,11,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ',1)
insert into tSysEnumValue values(0,11,0,'KG',0,1,1.00)
insert into tSysEnumValue values(0,11,1,'<EFBFBD><EFBFBD>',0,2,0.4536)
insert into tSysEnumValue values(0,11,2,'<EFBFBD><EFBFBD>',0,3,1000.00)
delete from tSysEnumtype where enumtypeid=12
delete from tsysenumvalue where enumtypeid=12
insert into tSysEnumtype values(0,12,'<EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',1)
insert into tSysEnumValue values(0,12,0,'ȫ<EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,12,1,'ֻ<EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>֧<EFBFBD><EFBFBD>β<EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,12,2,'<EFBFBD>ͻ<EFBFBD>֧<EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD>',0,3,1.00)
insert into tSysEnumValue values(0,12,3,'ֻ<EFBFBD><EFBFBD>β<EFBFBD><EFBFBD>ͻ<EFBFBD>֧<EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,3,1.00)
delete from tSysEnumtype where enumtypeid=13
delete from tsysenumvalue where enumtypeid=13
insert into tSysEnumtype values(0,13,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤ʹ<EFBFBD><EFBFBD>״̬',1)
insert into tSysEnumValue values(0,13,0,'<EFBFBD><EFBFBD>֤',0,1,1.00)
insert into tSysEnumValue values(0,13,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
delete from tSysEnumtype where enumtypeid=14
delete from tsysenumvalue where enumtypeid=14
insert into tSysEnumtype values(0,14,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ_<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,14,0,'Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,14,1,'β<EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,14,2,'<EFBFBD><EFBFBD>˰',0,3,1.00)
insert into tSysEnumValue values(0,14,3,'<EFBFBD><EFBFBD>ֵ˰',0,4,1.00)
insert into tSysEnumValue values(0,14,4,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,5,1.00)
insert into tSysEnumValue values(0,14,5,'<EFBFBD>˷<EFBFBD>',0,6,1.00)
insert into tSysEnumValue values(0,14,6,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>',0,7,1.00)
insert into tSysEnumValue values(0,14,7,'<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>',0,8,1.00)
delete from tSysEnumtype where enumtypeid=15
delete from tsysenumvalue where enumtypeid=15
insert into tSysEnumtype values(0,15,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬',1)
insert into tSysEnumValue values(0,15,0,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,15,1,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,15,2,'<EFBFBD><EFBFBD><EFBFBD>ֹ黹',0,3,1.00)
insert into tSysEnumValue values(0,15,3,'ȫ<EFBFBD><EFBFBD><EFBFBD>',0,4,1.00)
delete from tSysEnumtype where enumtypeid=16
delete from tsysenumvalue where enumtypeid=16
insert into tSysEnumtype values(0,16,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD>',1)
insert into tSysEnumValue values(0,16,0,'δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,16,1,'<EFBFBD>ȴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,16,2,'<EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,16,3,'<EFBFBD><EFBFBD><EFBFBD>ֹ黹',0,3,1.00)
insert into tSysEnumValue values(0,16,4,'ȫ<EFBFBD><EFBFBD><EFBFBD>',0,4,1.00)
delete from tSysEnumtype where enumtypeid=17
delete from tsysenumvalue where enumtypeid=17
insert into tSysEnumtype values(0,17,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,17,0,'¼<EFBFBD><EFBFBD><>ſ<EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,17,1,'<EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,17,2,'<EFBFBD><EFBFBD><EFBFBD>ֹ黹',0,3,1.00)
insert into tSysEnumValue values(0,17,3,'ȫ<EFBFBD><EFBFBD><EFBFBD>',0,4,1.00)
delete from tSysEnumtype where enumtypeid=18
delete from tsysenumvalue where enumtypeid=18
insert into tSysEnumtype values(0,18,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ״̬',1)
insert into tSysEnumValue values(0,18,0,'<EFBFBD><EFBFBD><EFBFBD>ֹ黹',0,1,1.00)
insert into tSysEnumValue values(0,18,1,'ȫ<EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
delete from tSysEnumtype where enumtypeid=19
delete from tsysenumvalue where enumtypeid=19
insert into tSysEnumtype values(0,19,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֿ<EFBFBD>',1)
delete from tSysEnumtype where enumtypeid=20
delete from tsysenumvalue where enumtypeid=20
insert into tSysEnumtype values(0,20,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,20,1,'<EFBFBD><EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,20,2,'<EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD>',0,2,1.00)
insert into tSysEnumValue values(0,20,3,'<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>̯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,3,1.00)
insert into tSysEnumValue values(0,20,4,'<EFBFBD><EFBFBD>̯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,4,1.00)
insert into tSysEnumValue values(0,20,5,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ',0,5,1.00)
insert into tSysEnumValue values(0,20,6,'<EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>',0,6,1.00)
insert into tSysEnumValue values(0,20,7,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,7,1.00)
insert into tSysEnumValue values(0,20,8,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,8,1.00)
insert into tSysEnumValue values(0,20,9,'<EFBFBD>̶<EFBFBD><EFBFBD>ʲ<EFBFBD>',0,9,1.00)
insert into tSysEnumValue values(0,20,10,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,10,1.00)
insert into tSysEnumValue values(0,20,11,'<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>',0,11,1.00)
insert into tSysEnumValue values(0,20,12,'<EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>',0,12,1.00)
insert into tSysEnumValue values(0,20,13,'<EFBFBD><EFBFBD>Ϣ',0,13,1.00)
insert into tSysEnumValue values(0,20,14,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,14,1.00)
insert into tSysEnumValue values(0,20,15,'<EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>',0,15,1.00)
insert into tSysEnumValue values(0,20,16,'ȡů<EFBFBD><EFBFBD>',0,16,1.00)
insert into tSysEnumValue values(0,20,17,'<EFBFBD><EFBFBD><EFBFBD>',0,17,1.00)
insert into tSysEnumValue values(0,20,18,'ʵ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>',0,18,1.00)
insert into tSysEnumValue values(0,20,19,'ʵ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,19,1.00)
insert into tSysEnumValue values(0,20,20,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,20,1.00)
insert into tSysEnumValue values(0,20,21,'ˮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,21,1.00)
insert into tSysEnumValue values(0,20,22,'˰<EFBFBD><EFBFBD>',0,22,1.00)
insert into tSysEnumValue values(0,20,23,'̯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,23,1.00)
insert into tSysEnumValue values(0,20,24,'ͨѶ<EFBFBD><EFBFBD>',0,24,1.00)
insert into tSysEnumValue values(0,20,25,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>',0,25,1.00)
insert into tSysEnumValue values(0,20,26,'<EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD>',0,26,1.00)
insert into tSysEnumValue values(0,20,27,'<EFBFBD>ֽ<EFBFBD>',0,27,1.00)
insert into tSysEnumValue values(0,20,28,'Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,28,1.00)
insert into tSysEnumValue values(0,20,29,'<EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>',0,29,1.00)
insert into tSysEnumValue values(0,20,30,'<EFBFBD>۾ɷ<EFBFBD>',0,30,1.00)
delete from tSysEnumtype where enumtypeid=21
delete from tsysenumvalue where enumtypeid=21
insert into tSysEnumtype values(0,21,'Ԥ<EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,21,1,'Ԥ<EFBFBD><EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,21,2,'Ԥ<EFBFBD><EFBFBD>',0,2,1.00)
delete from tSysEnumtype where enumtypeid=22
delete from tsysenumvalue where enumtypeid=22
insert into tSysEnumtype values(0,22,'<EFBFBD>ո<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,22,1,'<EFBFBD>տ<EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,22,2,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0,2,1.00)
delete from tSysEnumtype where enumtypeid=9000
delete from tsysenumvalue where enumtypeid=9000
insert into tSysEnumtype values(0,9000,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰<EFBFBD><EFBFBD>',1)
insert into tSysEnumValue values(0,9000,0,'<EFBFBD><EFBFBD><EFBFBD>ݹ<EFBFBD>',0,1,1.00)
insert into tSysEnumValue values(0,9000,1,'<EFBFBD><EFBFBD>ͨ',0,2,1.00)
insert into tSysenumvalue values(0,99024,10,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>',0,0,1.00)
select * into temp_code_fee from code_fee
delete from code_fee
-----------------------
select newid()+''
select * from import_country
SELECT CtnCode,CtnName,CodeAndName
from vMsTruckCtn
SELECT id,country_code,country,(country_code+'_'+country) as country_codeandname
from import_country