刘韬 5 years ago
parent
commit
85e1fe471f

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

@@ -76,9 +76,9 @@ public class ZskkConfig extends JFinalConfig {
 		me.add(arpConnected);
 		me.add(arpConnected);
 
 
 		
 		
-//		Cron4jPlugin cpData = new Cron4jPlugin();
-//		cpData.addTask("*/5 * * * *", new DataTask());
-//		me.add(cpData);
+		Cron4jPlugin cpData = new Cron4jPlugin();
+		cpData.addTask("*/5 * * * *", new DataTask());
+		me.add(cpData);
 		
 		
 //		Cron4jPlugin cpData = new Cron4jPlugin();
 //		Cron4jPlugin cpData = new Cron4jPlugin();
 //		cpData.addTask("*/1 * * * *", new UpdateTask());
 //		cpData.addTask("*/1 * * * *", new UpdateTask());

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

@@ -109,7 +109,6 @@ public class ViewController extends Controller {
 	}
 	}
 	
 	
 	public void upload(File ddFile) {
 	public void upload(File ddFile) {
-//		ddFile.save();
 		try {
 		try {
 			getFiles();
 			getFiles();
 		    renderNull();
 		    renderNull();

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

@@ -21,7 +21,7 @@ public class DataTask implements ITask {
         JSONArray jsonArray = dService.getExamList(30);	
         JSONArray jsonArray = dService.getExamList(30);	
         for (Object object : jsonArray) {
         for (Object object : jsonArray) {
 			JSONObject jsonObject = JSON.parseObject(object.toString());
 			JSONObject jsonObject = JSON.parseObject(object.toString());
-			Record record = Db.use("connected").findFirst("select * from PACSONLINE_Interface where STUDYUID=?", jsonObject.getString("studyuid"));
+			Record record = Db.use("connected").findFirst("select * from reportinfo where STUDYUID=?", jsonObject.getString("studyuid"));
 			if (record == null) {
 			if (record == null) {
 				continue;
 				continue;
 			}
 			}
@@ -31,26 +31,26 @@ public class DataTask implements ITask {
 			Map<String, String> params = new HashMap<>();
 			Map<String, String> params = new HashMap<>();
 			params.put("exam_id", jsonObject.getString("id"));
 			params.put("exam_id", jsonObject.getString("id"));
 			//报告医生姓名
 			//报告医生姓名
-			params.put("report_doctor_name", record.getStr("REPORTDOCTOR"));
+			params.put("report_doctor_name", record.getStr("REPORTDOCTOR")==null?"":record.getStr("REPORTDOCTOR"));
 			//报告时间
 			//报告时间
-			params.put("report_datetime", record.getStr("REPORTDATE"));
+			params.put("report_datetime", record.getStr("REPORTDATE")==null?"2020-07-22 00:00:00":record.getStr("REPORTDATE"));
 			//审核医生姓名
 			//审核医生姓名
-			params.put("review_doctor_name", record.getStr("REVIEWDOCTOR"));
+			params.put("review_doctor_name", record.getStr("REPORTDOCTOR")==null?"":record.getStr("REPORTDOCTOR"));
 			//审核时间
 			//审核时间
-			params.put("review_datetime", record.getStr("REPORTDATE"));
+			params.put("review_datetime", record.getStr("REPORTDATE")==null?"2020-07-22 00:00:00":record.getStr("REPORTDATE"));
 			//确认医生姓名
 			//确认医生姓名
-			params.put("confirm_doctor_name", record.getStr("REVIEWDOCTOR"));
+			params.put("confirm_doctor_name", record.getStr("REPORTDOCTOR")==null?"":record.getStr("REPORTDOCTOR"));
 			//确认时间
 			//确认时间
-			params.put("confirm_datetime", record.getStr("REPORTDATE"));
+			params.put("confirm_datetime", record.getStr("REPORTDATE")==null?"2020-07-22 00:00:00":record.getStr("REPORTDATE"));
 			//意见建议
 			//意见建议
 			params.put("impression", record.getStr("IMPRESSION"));
 			params.put("impression", record.getStr("IMPRESSION"));
 			//影像所见
 			//影像所见
 			params.put("description", record.getStr("DESCRIPTION"));
 			params.put("description", record.getStr("DESCRIPTION"));
 			//exams表
 			//exams表
 			//申请科室
 			//申请科室
-			params.put("application_department", record.getStr("DEPARTMENT"));
+			params.put("application_department", record.getStr("DEPARTMENT")==null?"":record.getStr("DEPARTMENT"));
 			//申请医生
 			//申请医生
-			params.put("application_doctor", record.getStr("CLINICALDOCTOR"));
+			params.put("application_doctor", record.getStr("CLINICALDOCTOR")==null?"":record.getStr("CLINICALDOCTOR"));
 			//临床诊断
 			//临床诊断
 			params.put("clin_diag", "");
 			params.put("clin_diag", "");
 			//症状
 			//症状
@@ -59,9 +59,9 @@ public class DataTask implements ITask {
 			//患者姓名
 			//患者姓名
 			params.put("name", record.getStr("PATIENTNAME"));
 			params.put("name", record.getStr("PATIENTNAME"));
 			//患者手机号
 			//患者手机号
-			params.put("phone", "");
+			params.put("phone", record.getStr("PHONE")==null?"":record.getStr("PHONE"));
 			//患者身份证号
 			//患者身份证号
-			params.put("card_num", record.getStr("IDCARD"));
+			params.put("card_num", record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
 			params.put("report_result", "0");
 			params.put("report_result", "0");
 			ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
 			ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
 			tService.execute(() -> {
 			tService.execute(() -> {