|
|
@@ -1,6 +1,7 @@
|
|
|
|
|
|
package com.qlm.service;
|
|
|
|
|
|
+import java.sql.Connection;
|
|
|
import java.sql.SQLException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -15,10 +16,13 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jfinal.aop.Before;
|
|
|
import com.jfinal.kit.HttpKit;
|
|
|
+import com.jfinal.kit.PropKit;
|
|
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
+import com.jfinal.plugin.activerecord.CaseInsensitiveContainerFactory;
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.IAtom;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
+import com.jfinal.plugin.activerecord.dialect.OracleDialect;
|
|
|
import com.jfinal.plugin.activerecord.tx.Tx;
|
|
|
import com.jfinal.plugin.activerecord.tx.TxConfig;
|
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
@@ -31,6 +35,22 @@ public class WmesService {
|
|
|
// ��web����Ψһ�IJ�ͬ��Ҫ�ֶ�����һ����ز����start()����
|
|
|
dp.start();
|
|
|
arp.start();
|
|
|
+
|
|
|
+
|
|
|
+ DruidPlugin oraclePlugin = new DruidPlugin(PropKit.get("oracleUrl"),
|
|
|
+ PropKit.get("oracleUser"),
|
|
|
+ PropKit.get("oraclePass"));
|
|
|
+
|
|
|
+ oraclePlugin.setDriverClass("oracle.jdbc.OracleDriver");
|
|
|
+ oraclePlugin.setValidationQuery("select 1 from dual");
|
|
|
+
|
|
|
+ ActiveRecordPlugin oracleArp = new ActiveRecordPlugin("oracle", oraclePlugin);
|
|
|
+ oracleArp.setDialect(new OracleDialect());
|
|
|
+ oracleArp.setContainerFactory(new CaseInsensitiveContainerFactory());
|
|
|
+
|
|
|
+ oracleArp.setTransactionLevel(Connection.TRANSACTION_READ_COMMITTED);
|
|
|
+ oraclePlugin.start();
|
|
|
+ oracleArp.start();
|
|
|
}
|
|
|
public static void main(String[] args) {
|
|
|
con();
|
|
|
@@ -50,7 +70,7 @@ public class WmesService {
|
|
|
long start = System.currentTimeMillis();
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
|
|
|
List<Record> datas = new ArrayList<Record>();
|
|
|
for (Record record : find) {
|
|
|
|