|
@@ -29,9 +29,9 @@ import java.util.regex.Pattern;
|
|
|
@EnableScheduling
|
|
|
public class MainFactoryApplication {
|
|
|
|
|
|
- private final String INSERT_SQL = "INSERT INTO log_success ( success, location, logContent, createtime, serviceId, workId, event, iNDataContent, outDataContent, calculationLocation, dataObjectId) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
- private final String ERROR_SQL = "INSERT INTO log_error ( success, location, logContent, createtime, serviceId, workId, event, iNDataContent, outDataContent, calculationLocation, dataObjectId) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
- private final String FULL_DATA_SQL = "INSERT INTO log_fulldata ( dataObjectId, FULL_DATA_SQL) VALUES (?,?)";
|
|
|
+ private final String INSERT_SQL = "INSERT INTO log_success_a ( success, location, logContent, createtime, serviceId, workId, event, iNDataContent, outDataContent, calculationLocation, dataObjectId) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
+ private final String ERROR_SQL = "INSERT INTO log_error_a ( success, location, logContent, createtime, serviceId, workId, event, iNDataContent, outDataContent, calculationLocation, dataObjectId) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
+ private final String FULL_DATA_SQL = "INSERT INTO log_fulldata_a ( dataObjectId, FULL_DATA_SQL) VALUES (?,?)";
|
|
|
|
|
|
/*服务初始化: 启动服务*/
|
|
|
public static void main(String[] args) {
|
|
@@ -207,9 +207,9 @@ public class MainFactoryApplication {
|
|
|
return false;
|
|
|
}
|
|
|
try {
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_success` ( `id` int PRIMARY KEY NOT NULL , `success` TEXT DEFAULT NULL, `location` TEXT DEFAULT NULL, `logContent` TEXT, `serviceId`INT DEFAULT NULL, `workId` INT DEFAULT NULL, `iNDataContent` TEXT DEFAULT NULL, `outDataContent` TEXT DEFAULT NULL,`calculationLocation` TEXT DEFAULT NULL, `dataObjectId` TEXT DEFAULT NULL,`event` TEXT DEFAULT NULL,`createtime` timestamp not null default current_timestamp)");
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_error` ( `id` int PRIMARY KEY NOT NULL , `success` TEXT DEFAULT NULL, `location` TEXT DEFAULT NULL, `logContent` TEXT, `serviceId` INT DEFAULT NULL, `workId` INT DEFAULT NULL, `iNDataContent` TEXT DEFAULT NULL, `outDataContent` TEXT DEFAULT NULL,`calculationLocation` TEXT DEFAULT NULL, `dataObjectId` TEXT DEFAULT NULL,`event` TEXT DEFAULT NULL,`createtime` timestamp not null default current_timestamp)");
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_fulldata` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `dataObjectId `TEXT DEFAULT NULL,`FULL_DATA_SQL` TEXT DEFAULT NULL)");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_success_a` ( `id` int PRIMARY KEY NOT NULL , `success` TEXT DEFAULT NULL, `location` TEXT DEFAULT NULL, `logContent` TEXT, `serviceId`INT DEFAULT NULL, `workId` INT DEFAULT NULL, `iNDataContent` TEXT DEFAULT NULL, `outDataContent` TEXT DEFAULT NULL,`calculationLocation` TEXT DEFAULT NULL, `dataObjectId` TEXT DEFAULT NULL,`event` TEXT DEFAULT NULL,`createtime` timestamp not null default current_timestamp)");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_error_a` ( `id` int PRIMARY KEY NOT NULL , `success` TEXT DEFAULT NULL, `location` TEXT DEFAULT NULL, `logContent` TEXT, `serviceId` INT DEFAULT NULL, `workId` INT DEFAULT NULL, `iNDataContent` TEXT DEFAULT NULL, `outDataContent` TEXT DEFAULT NULL,`calculationLocation` TEXT DEFAULT NULL, `dataObjectId` TEXT DEFAULT NULL,`event` TEXT DEFAULT NULL,`createtime` timestamp not null default current_timestamp)");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_fulldata_a` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `dataObjectId `TEXT DEFAULT NULL,`FULL_DATA_SQL` TEXT DEFAULT NULL)");
|
|
|
} catch (Exception e) {
|
|
|
return false;
|
|
|
}
|
|
@@ -265,9 +265,9 @@ public class MainFactoryApplication {
|
|
|
}
|
|
|
try {
|
|
|
//远程表日志表结构结构
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_success` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `success` varchar(8) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `logContent` varchar(1024) DEFAULT NULL, `serviceId` int(11) DEFAULT NULL, `workId` int(11) DEFAULT NULL,`event` varchar(2) DEFAULT NULL, `iNDataContent` varchar(2048) DEFAULT NULL, `outDataContent` varchar(2048) DEFAULT NULL,`calculationLocation` varchar(8) DEFAULT NULL, `dataObjectId` varchar(32) DEFAULT NULL,`createtime` datetime )");
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_error` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `success` varchar(8) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `logContent` varchar(1024) DEFAULT NULL, `serviceId` int(11) DEFAULT NULL, `workId` int(11) DEFAULT NULL, `event` varchar(2) DEFAULT NULL,`iNDataContent` varchar(2048) DEFAULT NULL, `outDataContent` varchar(2048) DEFAULT NULL,`calculationLocation` varchar(8) DEFAULT NULL, `dataObjectId` varchar(32) DEFAULT NULL,`createtime`datetime)");
|
|
|
- myDbHelper.execute("CREATE TABLE if not EXISTS `log_fulldata` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `dataObjectId` varchar(32) DEFAULT NULL,`FULL_DATA_SQL` longtext DEFAULT NULL)");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_success_a` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `success` varchar(8) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `logContent` varchar(1024) DEFAULT NULL, `serviceId` int(11) DEFAULT NULL, `workId` int(11) DEFAULT NULL,`event` varchar(2) DEFAULT NULL, `iNDataContent` varchar(2048) DEFAULT NULL, `outDataContent` varchar(2048) DEFAULT NULL,`calculationLocation` varchar(8) DEFAULT NULL, `dataObjectId` varchar(32) DEFAULT NULL,`createtime` datetime )");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_error_a` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `success` varchar(8) DEFAULT NULL, `location` varchar(255) DEFAULT NULL, `logContent` varchar(1024) DEFAULT NULL, `serviceId` int(11) DEFAULT NULL, `workId` int(11) DEFAULT NULL, `event` varchar(2) DEFAULT NULL,`iNDataContent` varchar(2048) DEFAULT NULL, `outDataContent` varchar(2048) DEFAULT NULL,`calculationLocation` varchar(8) DEFAULT NULL, `dataObjectId` varchar(32) DEFAULT NULL,`createtime`datetime)");
|
|
|
+ myDbHelper.execute("CREATE TABLE if not EXISTS `log_fulldata_a` ( `id` int(11) NOT NULL auto_increment PRIMARY KEY, `dataObjectId` varchar(32) DEFAULT NULL,`FULL_DATA_SQL` longtext DEFAULT NULL)");
|
|
|
return true;
|
|
|
} catch (Exception e) {
|
|
|
return false;
|