Sfoglia il codice sorgente

缩短时间间隔 调整数据入库bug

刘韬 6 anni fa
parent
commit
49b248c9f0

+ 0 - 1
DataFusion/WebRoot/WEB-INF/classes/.gitignore

@@ -1,4 +1,3 @@
 /com/
 /config.properties
 /log4j.properties
-/_DataDictionary.txt 

+ 1 - 1
DataFusion/src/com/zskk/config/ZskkConfig.java

@@ -72,7 +72,7 @@ public class ZskkConfig extends JFinalConfig {
 		me.add(arpConnected);
 		
 		Cron4jPlugin cpData = new Cron4jPlugin();
-		cpData.addTask("*/25 * * * *", new DataTask());
+		cpData.addTask("*/20 * * * *", new DataTask());
 		me.add(cpData);
 
 //		Cron4jPlugin cp2 = new Cron4jPlugin();

+ 11 - 1
DataFusion/src/com/zskk/control/ViewController.java

@@ -21,7 +21,17 @@ public class ViewController extends Controller {
 	/**
 	 * 在被连接数据库执行sql语句
 	 */
-	public void executeSql() {
+	public void executeSql(String sqlStr) {
+		try {
+			List<Record>  d =  Db.use("connected").find(this.getPara("sqlStr"));
+			this.renderJson(d);
+		} catch (Exception e) {
+			// TODO: handle exception
+			this.renderText(e.toString());
+		}
+	}
+	
+	public void testTask() {
 		try {
 			//List<Record>  d =  Db.use("connected").find(this.getPara("sqlStr"));
 			List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=73090001 order by createdAt desc limit 50");

+ 2 - 2
DataFusion/src/com/zskk/task/DataTask.java

@@ -34,8 +34,8 @@ public class DataTask implements ITask {
 				if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
 					continue;
 				}
-				report.setImpression(record.getStr("IMPRESSION"));
-				report.setDescription(record.getStr("DESCRIPTION"));
+				report.setImpression(record.getStr("DESCRIPTION"));
+				report.setDescription(record.getStr("IMPRESSION"));
 				report.setExamId(exams2.getId());
 				report.setCreatedAt(new Date());
 				if (record.getStr("FITEM_RESULT_CODE") != null) {