Browse Source

doc文档

dubch 5 years ago
parent
commit
6c9108c2ee
1 changed files with 23 additions and 0 deletions
  1. 23 0
      src/dashoo.cn/doc/老数据导入前.sql

+ 23 - 0
src/dashoo.cn/doc/老数据导入前.sql

@@ -27,9 +27,32 @@ DELETE from `T_供方资料_V2014` WHERE `类别` = '';
 UPDATE `T_供方资料_V2014` set `类别` = '银行开户许可证或基本存款账户信息' WHERE `类别` = '开户行许可证' or `类别` = '银行开户许可'  or `类别` = '银行开户许可证'  or `类别` = '开户许可证';
 UPDATE `T_供方资料_V2014` set `类别` = '企业信用信息截屏' WHERE `类别` = '企业信用信息系统截屏';
 UPDATE `T_供方资料_V2014` set `类别` = '诚信合规承诺书' WHERE `类别` = '承诺书';
+UPDATE `T_供方资料_V2014` SET 有效期至=REPLACE(`有效期至`, '/', '-'), 有效期至=REPLACE(`有效期至`, '年', '-'), 有效期至=REPLACE(`有效期至`, '月', '-'), 有效期至=REPLACE(`有效期至`, '日', ''), 日期=REPLACE(`日期`, '/', '-'), 日期=REPLACE(`日期`, '年', '-'), 日期=REPLACE(`日期`, '月', '-'), 日期=REPLACE(`日期`, '日', '')
+UPDATE `T_供方资料_V2014` SET 有效期至 = concat(有效期至, '-01') where (length(有效期至) = 6 or length(有效期至) = 7) and 有效期至 not like '%-';
+UPDATE `T_供方资料_V2014` SET 有效期至 = concat(有效期至, '01') where 有效期至 like '%-';
+UPDATE `T_供方资料_V2014` SET 日期 = '2011-01-01' where 日期 = '2011-0';
 
 UPDATE `T_年审` SET `企业名称`='华北利星行机械(北京)有限公司'  WHERE  `企业名称`='华北利星行机械(北京)有限公司';
 
+update `T_资格预审表` set 成立时间 = '2020-08-03' where 成立时间 = '二O二O年八月三日';
+	update `T_资格预审表` set 成立时间 = '2014-05-14' where 成立时间 = '二〇一四年五月十四日';
+	update `T_资格预审表` set 成立时间 = '2006-08-07' where 成立时间 = '二00六年八月七日';
+	update `T_资格预审表` set 成立时间 = '2001-08-16' where 成立时间 = '二00一年八月十六日';
+	update `T_资格预审表` set 成立时间 = '1998-01-01' where 成立时间 = '一九九八年';
+	update `T_资格预审表` set 成立时间 = '2011-03-03' where 成立时间 = '20113.3';
+	update `T_资格预审表` set 成立时间 = trim(成立时间);
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '年' , '-01-01') where locate('年', 成立时间) > 0 and locate('月', 成立时间) = 0 and locate('日', 成立时间) = 0 ;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '-' , '') where locate('-', 成立时间) > 0 and length(成立时间) = 1;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '.' , '-') where locate('.', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '年' , '-') where locate('年', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '月' , '-') where locate('月', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '日' , '') where locate('日', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '号' , '') where locate('号', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = replace(成立时间, '/' , '-') where locate('/', 成立时间) > 0;
+	update `T_资格预审表` set 成立时间 = concat(成立时间 , '-01') where (locate('-', 成立时间) > 0 and (length(成立时间) = 7 or length(成立时间) = 6) and 成立时间 NOT like '%-');
+	update `T_资格预审表` set 成立时间 = concat(成立时间 , '01') where 成立时间 like '%-';
+	update `T_资格预审表` set 成立时间 = concat(成立时间 , '-01-01') where LENGTH(成立时间) = 4;
+
 set session bulk_insert_buffer_size = 120 * 1024 * 1024;
 SET GLOBAL group_concat_max_len=1024000;
 set global innodb_flush_log_at_trx_commit = 2;