فهرست منبع

创建天津黄河医院分支,增加xml解析类,增加http请求访问

刘韬 5 سال پیش
والد
کامیت
b10d09cc19

+ 5 - 0
DataFusion/.classpath

@@ -29,5 +29,10 @@
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/objenesis-2.1.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ojdbc6.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sqljdbc42.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/annotations-13.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-stdlib-1.3.41.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-stdlib-common-1.3.41.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/okhttp-4.1.1.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/okio-2.2.2.jar"/>
 	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
 </classpath>

BIN
DataFusion/WebRoot/WEB-INF/lib/annotations-13.0.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/kotlin-stdlib-1.3.41.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/kotlin-stdlib-common-1.3.41.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/okhttp-4.1.1.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/okio-2.2.2.jar


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

@@ -58,13 +58,13 @@ public class ZskkConfig extends JFinalConfig {
 		_MappingKit.mapping(arpZskk);
 		me.add(arpZskk);
 		// 配置数据库连接池插件
-		DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
-		me.add(druidPluginConnected);
+//		DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
+//		me.add(druidPluginConnected);
 
 		// 配置ActiveRecord插件
-		ActiveRecordPlugin arpConnected = new ActiveRecordPlugin("connected", druidPluginConnected);
-		arpConnected.setDialect(new OracleDialect());
-		me.add(arpConnected);
+//		ActiveRecordPlugin arpConnected = new ActiveRecordPlugin("connected", druidPluginConnected);
+//		arpConnected.setDialect(new OracleDialect());
+//		me.add(arpConnected);
 
 		
 		Cron4jPlugin cpData = new Cron4jPlugin();

+ 9 - 2
DataFusion/src/com/zskk/control/ViewController.java

@@ -118,14 +118,17 @@ public class ViewController extends Controller {
         return date;
 	}
 	
-	private Date parseStringToDate(String dateStr) {
+	private static Date parseStringToDate(String dateStr) {
 		if (dateStr == null) {
 			return new Date();
 		}
-		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
 	    Date date = null;
 		try {
 			date = sdf.parse(dateStr);
+			SimpleDateFormat sdf2= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+			System.out.println(date);
 		} catch (ParseException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
@@ -133,4 +136,8 @@ public class ViewController extends Controller {
         return date;
 	}
 	
+	public static void main(String[] args) {
+		parseStringToDate("2019-07-18T01:26:28.57+08:00");
+	}
+	
 }

+ 132 - 114
DataFusion/src/com/zskk/model/_DataDictionary.txt

@@ -1,124 +1,141 @@
 Table: doctors
-----------------+---------------+------+-----+---------+---------
- Field          | Type          | Null | Key | Default | Remarks 
-----------------+---------------+------+-----+---------+---------
- id             | VARCHAR(32)   | NO   | PRI |         |         
- username       | VARCHAR(100)  | NO   |     |         | 用户名     
- password       | VARCHAR(200)  | NO   |     |         | 密码      
- realname       | VARCHAR(200)  | YES  |     |         | 真实姓名    
- email          | VARCHAR(200)  | YES  |     |         | email   
- login_time     | DATETIME(19)  | YES  |     |         | 登录时间    
- createdAt      | DATETIME(19)  | YES  |     |         | 创建时间    
- updatedAt      | DATETIME(19)  | YES  |     |         | 修改时间    
- token          | VARCHAR(255)  | YES  |     |         | 每次登陆产生新的Session标识
- phone          | VARCHAR(20)   | YES  |     |         | 电话      
- remark         | VARCHAR(1000) | YES  |     |         | 备注      
- doctor_title   | VARCHAR(255)  | YES  |     |         | 职称      
- status         | VARCHAR(50)   | YES  |     |         |         
- attachment     | VARCHAR(2000) | YES  |     |         | 附件      
- institution_id | VARCHAR(50)   | YES  |     |         | 医疗机构ID  
- department_id  | VARCHAR(50)   | YES  |     |         | 主要科室ID  
- doctor_role    | VARCHAR(20)   | YES  |     |         | 1.本地医生2.远程医生(可多选)
- login_failure  | INT(10)       | YES  |     |         | 登录失败次数  
- is_report      | VARCHAR(10)   | YES  |     |         | 是否能写报告  
-----------------+---------------+------+-----+---------+---------
+------------------+---------------+------+-----+---------+---------
+ Field            | Type          | Null | Key | Default | Remarks 
+------------------+---------------+------+-----+---------+---------
+ id               | VARCHAR(32)   | NO   | PRI |         |         
+ username         | VARCHAR(100)  | NO   |     |         | 用户名     
+ password         | VARCHAR(200)  | NO   |     |         | 密码      
+ realname         | VARCHAR(200)  | YES  |     |         | 真实姓名    
+ email            | VARCHAR(200)  | YES  |     |         | email   
+ login_time       | DATETIME(19)  | YES  |     |         | 登录时间    
+ createdAt        | DATETIME(19)  | YES  |     |         | 创建时间    
+ updatedAt        | DATETIME(19)  | YES  |     |         | 修改时间    
+ token            | VARCHAR(255)  | YES  |     |         | 每次登陆产生新的Session标识
+ phone            | VARCHAR(20)   | YES  |     |         | 电话      
+ remark           | VARCHAR(1000) | YES  |     |         | 备注      
+ doctor_title     | VARCHAR(255)  | YES  |     |         | 职称      
+ status           | VARCHAR(50)   | YES  |     |         |         
+ attachment       | VARCHAR(2000) | YES  |     |         | 附件      
+ institution_id   | VARCHAR(50)   | YES  |     |         | 医疗机构ID  
+ department_id    | VARCHAR(50)   | YES  |     |         | 主要科室ID  
+ doctor_role      | VARCHAR(20)   | YES  |     |         | 1.本地医生2.远程医生(可多选)
+ login_failure    | INT(10)       | YES  |     |         | 登录失败次数  
+ is_report        | VARCHAR(10)   | YES  |     |         | 是否能写报告  
+ exam_class       | VARCHAR(255)  | YES  |     | *       |         
+ send_sms         | VARCHAR(10)   | YES  |     | 0       | 发送短信通知  
+ message_push     | VARCHAR(10)   | YES  |     | 0       | 是否推送消息  
+ is_admin         | VARCHAR(255)  | YES  |     | 0       | 是否为管理员  
+ is_send_message  | VARCHAR(255)  | YES  |     | 0       | 登录是否发送短信
+ is_use_autograph | VARCHAR(255)  | YES  |     | 0       | 是否使用电子签名
+ autograph        | VARCHAR(255)  | YES  |     |         | 电子签名    
+------------------+---------------+------+-----+---------+---------
 
 Table: exams
--------------------+---------------+------+-----+---------+---------
- Field             | Type          | Null | Key | Default | Remarks 
--------------------+---------------+------+-----+---------+---------
- id                | VARCHAR(32)   | NO   | PRI |         |         
- dept_id           | VARCHAR(100)  | YES  |     |         | 检查科室(执行科室)
- patient_id        | VARCHAR(100)  | YES  |     |         | 患者id    
- patient_num       | VARCHAR(200)  | YES  |     |         | 病历号     
- accession_num     | VARCHAR(100)  | YES  |     |         | 科室检查号   
- exam_datetime     | VARCHAR(20)   | YES  |     |         | 检查日期    
- exam_class        | VARCHAR(200)  | YES  |     |         | 检查类型    
- exam_sub_class    | VARCHAR(200)  | YES  |     |         | 检查子类    
- exam_project      | VARCHAR(200)  | YES  |     |         | 检查项目    
- device            | VARCHAR(200)  | YES  |     |         | 检查设备    
- body_part         | VARCHAR(200)  | YES  |     |         | 检查部位    
- exam_method       | VARCHAR(200)  | YES  |     |         | 检查方法    
- hopitalized_no    | VARCHAR(200)  | YES  |     |         | 住院号     
- bed_no            | VARCHAR(200)  | YES  |     |         | 床位号     
- clin_dept_id      | VARCHAR(50)   | YES  |     |         | 送诊科室id  
- technician        | VARCHAR(200)  | YES  |     |         | 技师      
- charge            | VARCHAR(200)  | YES  |     |         | 检查费用    
- cost              | VARCHAR(200)  | YES  |     |         | 实际费用    
- clin_doctors      | VARCHAR(200)  | YES  |     |         | 送诊医生    
- phone             | VARCHAR(20)   | YES  |     |         | 联系方式    
- institution_id    | VARCHAR(200)  | YES  |     |         | 医院id    
- study_id          | VARCHAR(50)   | YES  |     |         | studyuid(studykey)
- illness_desc      | TEXT(65535)   | YES  |     |         | 主诉      
- phys_sign         | VARCHAR(200)  | YES  |     |         | 体征      
- clin_diag         | VARCHAR(1000) | YES  |     |         | 临床诊断    
- clin_symp         | VARCHAR(4000) | YES  |     |         | 临床症状    
- patient_source    | VARCHAR(20)   | YES  |     |         | 病人来源 1门诊 2住院 3外来
- req_datetime      | DATETIME(19)  | YES  |     |         | 申请时间    
- req_doctor        | VARCHAR(50)   | YES  |     |         | 申请医生(医生id)
- remark            | TEXT(65535)   | YES  |     |         | 其他说明    
- register          | VARCHAR(50)   | YES  |     |         | 登记人员( 医生id)
- register_datetime | DATETIME(19)  | YES  |     |         | 注册登记时间  
- exam_status       | TINYINT(3)    | YES  |     | 1       | 1、登记 2、开始检查3、检查完毕 4、申请 5、驳回 6、接收、7、初步报告 8、审核报告 9、确认、
- status            | VARCHAR(20)   | YES  |     | 1       | 记录状态 0禁用 1正常
- pay_status        | VARCHAR(10)   | YES  |     | 0       | 支付状态    
- is_remote         | VARCHAR(10)   | YES  |     |         | 远程诊断是被接受 0,未接受  1,已接受
- urgent            | VARCHAR(10)   | NO   |     | 0       | 是否急诊 0否  1是
- film_type         | VARCHAR(20)   | YES  |     | 0       | 0 未定义  1传统胶片  2电子胶片
- anamnesis         | VARCHAR(255)  | YES  |     |         |         
- family_ill        | VARCHAR(255)  | YES  |     |         |         
- createdAt         | DATETIME(19)  | YES  |     |         |         
- updatedAt         | DATETIME(19)  | YES  |     |         |         
- delivery_doctor   | VARCHAR(100)  | YES  |     |         | 送诊医生    
- exam_report       | VARCHAR(10)   | YES  |     |         | 检查结果    
--------------------+---------------+------+-----+---------+---------
+------------------------+---------------+------+-----+---------+---------
+ Field                  | Type          | Null | Key | Default | Remarks 
+------------------------+---------------+------+-----+---------+---------
+ id                     | VARCHAR(32)   | NO   | PRI |         |         
+ dept_id                | VARCHAR(100)  | YES  |     |         | 检查科室(执行科室)
+ patient_id             | VARCHAR(100)  | YES  |     |         | 患者id    
+ patient_num            | VARCHAR(200)  | YES  |     |         | 病历号     
+ accession_num          | VARCHAR(100)  | YES  |     |         | 科室检查号   
+ exam_datetime          | VARCHAR(20)   | YES  |     |         | 检查日期    
+ exam_class             | VARCHAR(200)  | YES  |     |         | 检查类型    
+ exam_sub_class         | VARCHAR(200)  | YES  |     |         | 检查子类    
+ exam_project           | VARCHAR(200)  | YES  |     |         | 检查项目    
+ device                 | VARCHAR(200)  | YES  |     |         | 检查设备    
+ body_part              | VARCHAR(200)  | YES  |     |         | 检查部位    
+ exam_method            | VARCHAR(200)  | YES  |     |         | 检查方法    
+ hopitalized_no         | VARCHAR(200)  | YES  |     |         | 住院号     
+ bed_no                 | VARCHAR(200)  | YES  |     |         | 床位号     
+ clin_dept_id           | VARCHAR(50)   | YES  |     |         | 送诊科室id  
+ technician             | VARCHAR(200)  | YES  |     |         | 技师      
+ charge                 | VARCHAR(200)  | YES  |     |         | 检查费用    
+ cost                   | VARCHAR(200)  | YES  |     |         | 实际费用    
+ clin_doctors           | VARCHAR(200)  | YES  |     |         | 送诊医生    
+ phone                  | VARCHAR(20)   | YES  |     |         | 联系方式    
+ institution_id         | VARCHAR(200)  | YES  |     |         | 医院id    
+ study_id               | VARCHAR(50)   | YES  |     |         | studyuid(studykey)
+ illness_desc           | TEXT(65535)   | YES  |     |         | 主诉      
+ phys_sign              | VARCHAR(200)  | YES  |     |         | 体征      
+ clin_diag              | VARCHAR(1000) | YES  |     |         | 临床诊断    
+ clin_symp              | VARCHAR(4000) | YES  |     |         | 临床症状    
+ patient_source         | VARCHAR(20)   | YES  |     |         | 病人来源 1门诊 2住院 3外来
+ req_datetime           | DATETIME(19)  | YES  |     |         | 申请时间    
+ req_doctor             | VARCHAR(50)   | YES  |     |         | 申请医生(医生id)
+ remark                 | TEXT(65535)   | YES  |     |         | 其他说明    
+ register               | VARCHAR(50)   | YES  |     |         | 登记人员( 医生id)
+ register_datetime      | DATETIME(19)  | YES  |     |         | 注册登记时间  
+ exam_status            | TINYINT(3)    | YES  |     | 1       | 1、登记 2、开始检查3、检查完毕 4、申请 5、驳回 6、接收、7、初步报告 8、审核报告 9、确认、
+ status                 | VARCHAR(20)   | YES  |     | 1       | 记录状态 0禁用 1正常
+ pay_status             | VARCHAR(10)   | YES  |     | 0       | 支付状态    
+ is_remote              | VARCHAR(10)   | YES  |     |         | 远程诊断是被接受 0,未接受  1,已接受
+ urgent                 | VARCHAR(10)   | NO   |     | 0       | 是否急诊 0否  1是
+ film_type              | VARCHAR(20)   | YES  |     | 2       | 0 未定义  1传统胶片  2电子胶片
+ anamnesis              | VARCHAR(255)  | YES  |     |         |         
+ family_ill             | VARCHAR(255)  | YES  |     |         |         
+ createdAt              | DATETIME(19)  | YES  |     |         |         
+ updatedAt              | DATETIME(19)  | YES  |     |         |         
+ delivery_doctor        | VARCHAR(100)  | YES  |     |         | 送诊医生    
+ exam_report            | VARCHAR(10)   | YES  |     |         | 检查结果    
+ ext                    | JSON          | YES  |     |         |         
+ id_card                | VARCHAR(50)   | YES  |     |         | 身份证号    
+ study_uid              | VARCHAR(100)  | YES  |     |         |         
+ application_department | VARCHAR(255)  | YES  |     |         | 申请科室    
+ application_doctor     | VARCHAR(255)  | YES  |     |         | 申请医生    
+ severe                 | VARCHAR(255)  | YES  |     | 0       | 重症标识    
+ patient_area           | VARCHAR(255)  | YES  |     |         | 病区      
+------------------------+---------------+------+-----+---------+---------
 
 Table: patient_infos
------------------+---------------+------+-----+---------+---------
- Field           | Type          | Null | Key | Default | Remarks 
------------------+---------------+------+-----+---------+---------
- id              | VARCHAR(32)   | NO   | PRI |         |         
- name            | VARCHAR(100)  | YES  |     |         | 患者姓名    
- sex             | VARCHAR(10)   | YES  |     |         | 性别      
- card_num        | VARCHAR(100)  | YES  |     |         | 身份证号    
- phone           | VARCHAR(20)   | YES  |     |         | 手机号     
- ctime           | DATETIME(19)  | YES  |     |         | 创建时间    
- birthday        | VARCHAR(20)   | YES  |     |         | 生日      
- age             | VARCHAR(10)   | YES  |     |         | 年龄      
- card_type       | VARCHAR(30)   | YES  |     |         | 证件类型    
- nationality     | VARCHAR(50)   | YES  |     |         | 国籍      
- nation          | VARCHAR(30)   | YES  |     |         | 民族      
- marry           | VARCHAR(10)   | YES  |     |         | 婚否      
- professional    | VARCHAR(100)  | YES  |     |         | 职业      
- address         | VARCHAR(255)  | YES  |     |         | 联系地址    
- temp_patient_id | VARCHAR(50)   | YES  |     |         | 检查临时患者id(从dicom影像中解析)
- status          | VARCHAR(10)   | YES  |     |         |         
- institution_id  | VARCHAR(200)  | YES  |     |         | 所属医院    
- anamnesis       | VARCHAR(2000) | YES  |     |         | 疾病史     
- family_ill      | VARCHAR(2000) | YES  |     |         | 家族史     
- createdAt       | DATETIME(19)  | YES  |     |         |         
- updatedAt       | DATETIME(19)  | YES  |     |         |         
------------------+---------------+------+-----+---------+---------
+-----------------+--------------+------+-----+---------+---------
+ Field           | Type         | Null | Key | Default | Remarks 
+-----------------+--------------+------+-----+---------+---------
+ id              | VARCHAR(32)  | NO   | PRI |         |         
+ name            | VARCHAR(100) | YES  |     |         | 患者姓名    
+ sex             | VARCHAR(10)  | YES  |     |         | 性别      
+ card_num        | VARCHAR(100) | YES  |     |         | 身份证号    
+ phone           | VARCHAR(20)  | YES  |     |         | 手机号     
+ ctime           | DATETIME(19) | YES  |     |         | 创建时间    
+ birthday        | VARCHAR(20)  | YES  |     |         | 生日      
+ age             | VARCHAR(10)  | YES  |     |         | 年龄      
+ card_type       | VARCHAR(30)  | YES  |     |         | 证件类型    
+ nationality     | VARCHAR(50)  | YES  |     |         | 国籍      
+ nation          | VARCHAR(30)  | YES  |     |         | 民族      
+ marry           | VARCHAR(10)  | YES  |     |         | 婚否      
+ professional    | VARCHAR(100) | YES  |     |         | 职业      
+ address         | VARCHAR(255) | YES  |     |         | 联系地址    
+ temp_patient_id | VARCHAR(50)  | YES  |     |         | 检查临时患者id(从dicom影像中解析)
+ status          | INT(10)      | NO   |     | 1       |         
+ institution_id  | VARCHAR(200) | YES  |     |         | 所属医院    
+ anamnesis       | VARCHAR(255) | YES  |     |         | 疾病史     
+ family_ill      | VARCHAR(255) | YES  |     |         | 家族史     
+ createdAt       | DATETIME(19) | YES  |     |         |         
+ updatedAt       | DATETIME(19) | YES  |     |         |         
+ ext             | JSON         | YES  |     |         |         
+-----------------+--------------+------+-----+---------+---------
 
 Table: report
--------------------+---------------+------+-----+---------+---------
- Field             | Type          | Null | Key | Default | Remarks 
--------------------+---------------+------+-----+---------+---------
- id                | VARCHAR(32)   | NO   | PRI |         | 报告id    
- report_datetime   | DATETIME(19)  | YES  |     |         | 报告时间    
- description       | TEXT(65535)   | YES  |     |         | 检查所见    
- impression        | TEXT(65535)   | YES  |     |         | 意见建议    
- img_url           | VARCHAR(1500) | YES  |     |         | 缩略图地址   
- exam_id           | VARCHAR(255)  | YES  |     |         | 检查表id   
- createdAt         | DATETIME(19)  | YES  |     |         |         
- report_doctor_id  | VARCHAR(255)  | YES  |     |         | 报告医生id  
- review_doctor_id  | VARCHAR(255)  | YES  |     |         | 审核医生id  
- qr_code           | VARCHAR(255)  | YES  |     |         | 二维码     
- report_result     | VARCHAR(255)  | YES  |     |         | 报告结果(阴阳性) 1阴性 2阳性
- review_datetime   | DATETIME(19)  | YES  |     |         | 审核时间    
- confirm_doctor_id | VARCHAR(50)   | YES  |     |         | 确认医生    
- confirm_datetime  | DATETIME(19)  | YES  |     |         | 确认时间    
--------------------+---------------+------+-----+---------+---------
+-----------------------+---------------+------+-----+---------+---------
+ Field                 | Type          | Null | Key | Default | Remarks 
+-----------------------+---------------+------+-----+---------+---------
+ id                    | VARCHAR(32)   | NO   | PRI |         | 报告id    
+ report_datetime       | DATETIME(19)  | YES  |     |         | 报告时间    
+ description           | TEXT(65535)   | YES  |     |         | 检查所见    
+ impression            | TEXT(65535)   | YES  |     |         | 意见建议    
+ img_url               | VARCHAR(1500) | YES  |     |         | 缩略图地址   
+ exam_id               | VARCHAR(255)  | YES  |     |         | 检查表id   
+ createdAt             | DATETIME(19)  | YES  |     |         |         
+ report_doctor_id      | VARCHAR(255)  | YES  |     |         | 报告医生id  
+ review_doctor_id      | VARCHAR(255)  | YES  |     |         | 审核医生id  
+ qr_code               | VARCHAR(255)  | YES  |     |         | 二维码     
+ report_result         | VARCHAR(255)  | YES  |     |         | 报告结果(阴阳性) 1阴性 2阳性
+ review_datetime       | DATETIME(19)  | YES  |     |         | 审核时间    
+ confirm_doctor_id     | VARCHAR(50)   | YES  |     |         | 确认医生    
+ confirm_datetime      | DATETIME(19)  | YES  |     |         | 确认时间    
+ type                  | VARCHAR(10)   | YES  |     | 1       | 报告类型    
+ remote_application_id | VARCHAR(50)   | YES  |     |         | 申请id    
+-----------------------+---------------+------+-----+---------+---------
 
 Table: studies
 ------------------+--------------+------+-----+---------+---------
@@ -139,5 +156,6 @@ Table: studies
  institution_id   | VARCHAR(200) | YES  |     |         |         
  createdAt        | DATETIME(19) | YES  |     |         |         
  updatedAt        | DATETIME(19) | YES  |     |         |         
+ ext              | JSON         | YES  |     |         |         
 ------------------+--------------+------+-----+---------+---------
 

+ 1 - 1
DataFusion/src/com/zskk/model/_MappingKit.java

@@ -21,7 +21,7 @@ public class _MappingKit {
 		arp.addMapping("patient_infos", "id", PatientInfos.class);
 		arp.addMapping("report", "id", Report.class);
 		// Composite Primary Key order: id,studyuid
-		arp.addMapping("studies", "id", Studies.class);
+		arp.addMapping("studies", "id,studyuid", Studies.class);
 	}
 }
 

+ 63 - 0
DataFusion/src/com/zskk/model/base/BaseDoctors.java

@@ -180,4 +180,67 @@ public abstract class BaseDoctors<M extends BaseDoctors<M>> extends Model<M> imp
 		return getStr("is_report");
 	}
 
+	public M setExamClass(java.lang.String examClass) {
+		set("exam_class", examClass);
+		return (M)this;
+	}
+	
+	public java.lang.String getExamClass() {
+		return getStr("exam_class");
+	}
+
+	public M setSendSms(java.lang.String sendSms) {
+		set("send_sms", sendSms);
+		return (M)this;
+	}
+	
+	public java.lang.String getSendSms() {
+		return getStr("send_sms");
+	}
+
+	public M setMessagePush(java.lang.String messagePush) {
+		set("message_push", messagePush);
+		return (M)this;
+	}
+	
+	public java.lang.String getMessagePush() {
+		return getStr("message_push");
+	}
+
+	public M setIsAdmin(java.lang.String isAdmin) {
+		set("is_admin", isAdmin);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsAdmin() {
+		return getStr("is_admin");
+	}
+
+	public M setIsSendMessage(java.lang.String isSendMessage) {
+		set("is_send_message", isSendMessage);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsSendMessage() {
+		return getStr("is_send_message");
+	}
+
+	public M setIsUseAutograph(java.lang.String isUseAutograph) {
+		set("is_use_autograph", isUseAutograph);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsUseAutograph() {
+		return getStr("is_use_autograph");
+	}
+
+	public M setAutograph(java.lang.String autograph) {
+		set("autograph", autograph);
+		return (M)this;
+	}
+	
+	public java.lang.String getAutograph() {
+		return getStr("autograph");
+	}
+
 }

+ 63 - 0
DataFusion/src/com/zskk/model/base/BaseExams.java

@@ -405,4 +405,67 @@ public abstract class BaseExams<M extends BaseExams<M>> extends Model<M> impleme
 		return getStr("exam_report");
 	}
 
+	public M setExt(java.lang.String ext) {
+		set("ext", ext);
+		return (M)this;
+	}
+	
+	public java.lang.String getExt() {
+		return getStr("ext");
+	}
+
+	public M setIdCard(java.lang.String idCard) {
+		set("id_card", idCard);
+		return (M)this;
+	}
+	
+	public java.lang.String getIdCard() {
+		return getStr("id_card");
+	}
+
+	public M setStudyUid(java.lang.String studyUid) {
+		set("study_uid", studyUid);
+		return (M)this;
+	}
+	
+	public java.lang.String getStudyUid() {
+		return getStr("study_uid");
+	}
+
+	public M setApplicationDepartment(java.lang.String applicationDepartment) {
+		set("application_department", applicationDepartment);
+		return (M)this;
+	}
+	
+	public java.lang.String getApplicationDepartment() {
+		return getStr("application_department");
+	}
+
+	public M setApplicationDoctor(java.lang.String applicationDoctor) {
+		set("application_doctor", applicationDoctor);
+		return (M)this;
+	}
+	
+	public java.lang.String getApplicationDoctor() {
+		return getStr("application_doctor");
+	}
+
+	public M setSevere(java.lang.String severe) {
+		set("severe", severe);
+		return (M)this;
+	}
+	
+	public java.lang.String getSevere() {
+		return getStr("severe");
+	}
+
+	public M setPatientArea(java.lang.String patientArea) {
+		set("patient_area", patientArea);
+		return (M)this;
+	}
+	
+	public java.lang.String getPatientArea() {
+		return getStr("patient_area");
+	}
+
 }

+ 12 - 3
DataFusion/src/com/zskk/model/base/BasePatientInfos.java

@@ -144,13 +144,13 @@ public abstract class BasePatientInfos<M extends BasePatientInfos<M>> extends Mo
 		return getStr("temp_patient_id");
 	}
 
-	public M setStatus(java.lang.String status) {
+	public M setStatus(java.lang.Integer status) {
 		set("status", status);
 		return (M)this;
 	}
 	
-	public java.lang.String getStatus() {
-		return getStr("status");
+	public java.lang.Integer getStatus() {
+		return getInt("status");
 	}
 
 	public M setInstitutionId(java.lang.String institutionId) {
@@ -198,4 +198,13 @@ public abstract class BasePatientInfos<M extends BasePatientInfos<M>> extends Mo
 		return get("updatedAt");
 	}
 
+	public M setExt(java.lang.String ext) {
+		set("ext", ext);
+		return (M)this;
+	}
+	
+	public java.lang.String getExt() {
+		return getStr("ext");
+	}
+
 }

+ 18 - 0
DataFusion/src/com/zskk/model/base/BaseReport.java

@@ -135,4 +135,22 @@ public abstract class BaseReport<M extends BaseReport<M>> extends Model<M> imple
 		return get("confirm_datetime");
 	}
 
+	public M setType(java.lang.String type) {
+		set("type", type);
+		return (M)this;
+	}
+	
+	public java.lang.String getType() {
+		return getStr("type");
+	}
+
+	public M setRemoteApplicationId(java.lang.String remoteApplicationId) {
+		set("remote_application_id", remoteApplicationId);
+		return (M)this;
+	}
+	
+	public java.lang.String getRemoteApplicationId() {
+		return getStr("remote_application_id");
+	}
+
 }

+ 9 - 0
DataFusion/src/com/zskk/model/base/BaseStudies.java

@@ -144,4 +144,13 @@ public abstract class BaseStudies<M extends BaseStudies<M>> extends Model<M> imp
 		return get("updatedAt");
 	}
 
+	public M setExt(java.lang.String ext) {
+		set("ext", ext);
+		return (M)this;
+	}
+	
+	public java.lang.String getExt() {
+		return getStr("ext");
+	}
+
 }

+ 81 - 34
DataFusion/src/com/zskk/task/DataTask.java

@@ -14,6 +14,14 @@ import com.zskk.model.PatientInfos;
 import com.zskk.model.Report;
 import com.zskk.model.Studies;
 import com.zskk.service.WeixinService;
+import com.zskk.tools.XmlHelper;
+
+import okhttp3.MediaType;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+
 import com.zskk.model.Exams;
 
 
@@ -28,41 +36,80 @@ public class DataTask implements ITask {
 				try {
 					
 				
-//				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
-				Record record = Db.use("connected").findFirst("select * from hhris.view_reportinfo where ACCESSIONNUMBER=?",exams2.getAccessionNum());
-				if (record == null) {
-					continue;
-				}
-				Report report = new Report().use("zskk");
-				report.setId(creatId());
-				report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
-				if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
-					continue;
-				}
-				report.setImpression(new String(record.getStr("IMPRESSION").getBytes("windows-1252"),"GBK"));
-				report.setDescription(new String(record.getStr("DESCRIPTION").getBytes("windows-1252"),"GBK"));
-				report.setExamId(exams2.getId());
-				report.setCreatedAt(new Date());
-				report.setReportDoctorId(getDoctorIdByName(new String(record.getStr("REPORTDOCTOR").getBytes("windows-1252"),"GBK")));
-				report.setReviewDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
-				report.setReviewDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
-				report.setConfirmDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
-				report.setConfirmDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
-				report.save();
-				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
-				patientInfos.setName(new String(record.getStr("PATIENTNAME").getBytes("windows-1252"),"GBK"));
-//				patientInfos.setPhone(record.getStr("PHONE"));
-//				patientInfos.setCardNum(record.getStr("IDCARD"));
-				patientInfos.update();
-				try {
-					exams2.setClinDoctors(new String(record.getStr("CLINICALDOCTOR").getBytes("windows-1252"),"GBK"));
+				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
+				String url = "http://192.168.2.41/WebQuery.asmx/Query";
+				OkHttpClient okHttpClient = new OkHttpClient();
+				StringBuilder sb = new StringBuilder();
+				sb.append("input=");
+				sb.append(studies.getStudyuid());
+
+				RequestBody body = RequestBody.create(sb.toString(), MediaType.get("application/x-www-form-urlencoded"));
+				Request request = new Request.Builder().url(url).post(body).build();
+				try (Response response = okHttpClient.newCall(request).execute()) {
+					String contentString = response.body().string();
+				    XmlHelper xmlHelperStr = XmlHelper.of(contentString);
+				    String content = xmlHelperStr.getString("//string");
+				    XmlHelper xmlHelper = XmlHelper.of(content);
+				    String patientname = xmlHelper.getString("//patientname");
+				    if (patientname == null && patientname == null) {
+						continue;
+					}
+				    
+				    String department = xmlHelper.getString("//department");
+
+				    String clinicaldoctor = xmlHelper.getString("//clinicaldoctor");
+
+				    String reportdate = xmlHelper.getString("//reportdate");
+
+				    String description = xmlHelper.getString("//description");
+
+				    String impression = xmlHelper.getString("//impression");
+				    
+				    String reportdoctor = xmlHelper.getString("//reportdoctor");
+				    
+				    String reviewdoctor = xmlHelper.getString("//reviewdoctor");
+
+				    String phone  = xmlHelper.getString("//phone ");
+
+				    
+				    Report report = new Report().use("zskk");
+					report.setId(creatId());
+					report.setReportDatetime(parseStringToDate(reportdate));
+					if (impression == null && description == null) {
+						continue;
+					}
+					report.setImpression(impression);
+					report.setDescription(description);
+					report.setExamId(exams2.getId());
+					report.setCreatedAt(new Date());
+					report.setReportDoctorId(getDoctorIdByName(reportdoctor));
+					report.setReviewDoctorId(getDoctorIdByName(reviewdoctor));
+					report.setReviewDatetime(parseStringToDate(reportdate));
+					report.setConfirmDoctorId(getDoctorIdByName(reviewdoctor));
+					report.setConfirmDatetime(parseStringToDate(reportdate));
+					report.save();
+					
+					PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
+					patientInfos.setName(patientname);
+					patientInfos.setPhone(phone);
+					patientInfos.update();
+					
+				    exams2.setApplicationDepartment(department);
+				    exams2.setApplicationDoctor(clinicaldoctor);
+
+					exams2.setExamStatus(9);
+					exams2.update();
+					WeixinService wService = new WeixinService();
+					wService.requestWeixinQrcode(report.getId());
+
 				} catch (Exception e) {
-					// TODO: handle exception
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+					continue;
 				}
-				exams2.setExamStatus(9);
-				exams2.update();
-				WeixinService wService = new WeixinService();
-				wService.requestWeixinQrcode(report.getId());
+				
+				
+				
 				} catch (Exception e) {
 					// TODO: handle exception
 					continue;
@@ -102,7 +149,7 @@ public class DataTask implements ITask {
 		if (dateStr == null) {
 			return new Date();
 		}
-		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
 	    Date date = null;
 		try {
 			date = sdf.parse(dateStr);

+ 19 - 0
DataFusion/src/com/zskk/tools/Charsets.java

@@ -0,0 +1,19 @@
+package com.zskk.tools;
+
+import java.nio.charset.Charset;
+
+/**
+ * 字符集工具类
+ * Author: L.cm
+ * Date: 2016年3月29日 下午3:44:52
+ */
+public class Charsets {
+
+    // 字符集GBK
+    public static final Charset GBK = Charset.forName("GBK");
+    // 字符集ISO-8859-1
+    public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
+    // 字符集utf-8
+    public static final Charset UTF_8 = Charset.forName("UTF-8");
+
+}

+ 76 - 0
DataFusion/src/com/zskk/tools/IOUtils.java

@@ -0,0 +1,76 @@
+package com.zskk.tools;
+
+import java.io.*;
+import java.nio.charset.Charset;
+
+/**
+ * IOUtils
+ * @author L.cm
+ */
+public abstract class IOUtils {
+    private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
+
+    /**
+     * closeQuietly
+     * @param closeable 自动关闭
+     */
+    public static void closeQuietly(Closeable closeable) {
+        try {
+            if (closeable != null) {
+                closeable.close();
+            }
+        } catch (IOException ioe) {
+            // ignore
+        }
+    }
+
+    /**
+     * InputStream to String utf-8
+     *
+     * @param input  the <code>InputStream</code> to read from
+     * @return the requested String
+     * @throws NullPointerException if the input is null
+     * @throws IOException if an I/O error occurs
+     */
+    public static String toString(InputStream input) throws IOException {
+        return toString(input, Charsets.UTF_8);
+    }
+
+    /**
+     * InputStream to String
+     *
+     * @param input  the <code>InputStream</code> to read from
+     * @param charset  the <code>Charset</code>
+     * @return the requested String
+     * @throws NullPointerException if the input is null
+     * @throws IOException if an I/O error occurs
+     */
+    public static String toString(InputStream input, Charset charset) throws IOException {
+        InputStreamReader in = new InputStreamReader(input, charset);
+        StringBuffer out = new StringBuffer();
+        char[] c = new char[DEFAULT_BUFFER_SIZE];
+        for (int n; (n = in.read(c)) != -1;) {
+            out.append(new String(c, 0, n));
+        }
+        IOUtils.closeQuietly(in);
+        IOUtils.closeQuietly(input);
+        return out.toString();
+    }
+
+    /**
+     * InputStream to File
+     * @param input  the <code>InputStream</code> to read from
+     * @param file the File to write
+     * @throws IOException id异常
+     */
+    public static void toFile(InputStream input, File file) throws IOException {
+        OutputStream os = new FileOutputStream(file);
+        int bytesRead = 0;
+        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
+        while ((bytesRead = input.read(buffer, 0, DEFAULT_BUFFER_SIZE)) != -1) {
+            os.write(buffer, 0, bytesRead);
+        }
+        IOUtils.closeQuietly(os);
+        IOUtils.closeQuietly(input);
+    }
+}

+ 241 - 0
DataFusion/src/com/zskk/tools/XmlHelper.java

@@ -0,0 +1,241 @@
+package com.zskk.tools;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * xpath解析xml
+ * <pre>
+ *     文档地址:
+ *     http://www.w3school.com.cn/xpath/index.asp
+ * </pre>
+ */
+public class XmlHelper {
+    private final XPath path;
+    private final Document doc;
+
+    private XmlHelper(InputSource inputSource) throws ParserConfigurationException, SAXException, IOException {
+        DocumentBuilderFactory dbf = getDocumentBuilderFactory();
+        DocumentBuilder db = dbf.newDocumentBuilder();
+        doc = db.parse(inputSource);
+        path = getXPathFactory().newXPath();
+    }
+
+    private static XmlHelper create(InputSource inputSource) {
+        try {
+            return new XmlHelper(inputSource);
+        } catch (ParserConfigurationException e) {
+            throw new RuntimeException(e);
+        } catch (SAXException e) {
+            throw new RuntimeException(e);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static XmlHelper of(InputStream is) {
+        InputSource inputSource = new InputSource(is);
+        return create(inputSource);
+    }
+
+    public static XmlHelper of(String xmlStr) {
+        StringReader sr = new StringReader(xmlStr.trim());
+        InputSource inputSource = new InputSource(sr);
+        XmlHelper xmlHelper = create(inputSource);
+        IOUtils.closeQuietly(sr);
+        return xmlHelper;
+    }
+
+    private Object evalXPath(String expression, Object item, QName returnType) {
+        item = null == item ? doc : item;
+        try {
+            return path.evaluate(expression, item, returnType);
+        } catch (XPathExpressionException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 获取String
+     * @param expression 路径
+     * @return String
+     */
+    public String getString(String expression) {
+        return (String) evalXPath(expression, null, XPathConstants.STRING);
+    }
+
+    /**
+     * 获取Boolean
+     * @param expression 路径
+     * @return String
+     */
+    public Boolean getBoolean(String expression) {
+        return (Boolean) evalXPath(expression, null, XPathConstants.BOOLEAN);
+    }
+
+    /**
+     * 获取Number
+     * @param expression 路径
+     * @return {Number}
+     */
+    public Number getNumber(String expression) {
+        return (Number) evalXPath(expression, null, XPathConstants.NUMBER);
+    }
+
+    /**
+     * 获取某个节点
+     * @param expression 路径
+     * @return {Node}
+     */
+    public Node getNode(String expression) {
+        return (Node) evalXPath(expression, null, XPathConstants.NODE);
+    }
+
+    /**
+     * 获取子节点
+     * @param expression 路径
+     * @return NodeList
+     */
+    public NodeList getNodeList(String expression) {
+        return (NodeList) evalXPath(expression, null, XPathConstants.NODESET);
+    }
+
+
+    /**
+     * 获取String
+     * @param node 节点
+     * @param expression 相对于node的路径
+     * @return String
+     */
+    public String getString(Object node, String expression) {
+        return (String) evalXPath(expression, node, XPathConstants.STRING);
+    }
+
+    /**
+     * 获取
+     * @param node 节点
+     * @param expression 相对于node的路径
+     * @return String
+     */
+    public Boolean getBoolean(Object node, String expression) {
+        return (Boolean) evalXPath(expression, node, XPathConstants.BOOLEAN);
+    }
+
+    /**
+     * 获取
+     * @param node 节点
+     * @param expression 相对于node的路径
+     * @return {Number}
+     */
+    public Number getNumber(Object node, String expression) {
+        return (Number) evalXPath(expression, node, XPathConstants.NUMBER);
+    }
+
+    /**
+     * 获取某个节点
+     * @param node 节点
+     * @param expression 路径
+     * @return {Node}
+     */
+    public Node getNode(Object node, String expression) {
+        return (Node) evalXPath(expression, node, XPathConstants.NODE);
+    }
+
+    /**
+     * 获取子节点
+     * @param node 节点
+     * @param expression 相对于node的路径
+     * @return NodeList
+     */
+    public NodeList getNodeList(Object node, String expression) {
+        return (NodeList) evalXPath(expression, node, XPathConstants.NODESET);
+    }
+
+    /**
+     * 针对没有嵌套节点的简单处理
+     * @return map集合
+     */
+    public Map<String, String> toMap() {
+        Element root = doc.getDocumentElement();
+        Map<String, String> params = new HashMap<String, String>();
+
+        // 将节点封装成map形式
+        NodeList list = root.getChildNodes();
+        for (int i = 0; i < list.getLength(); i++) {
+            Node node = list.item(i);
+            if (node instanceof Element) {
+                params.put(node.getNodeName(), node.getTextContent());
+            }
+        }
+        return params;
+    }
+    
+    private static boolean preventedXXE = false;
+
+    private static DocumentBuilderFactory getDocumentBuilderFactory() throws ParserConfigurationException{
+    		DocumentBuilderFactory dbf = XmlHelper.XmlHelperHolder.documentBuilderFactory;
+    		if (!preventedXXE) {
+    			preventXXE(dbf);
+    			preventedXXE = true;
+    		}
+        return dbf;
+    }
+    
+    // https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=23_5
+    private static void preventXXE(DocumentBuilderFactory dbf) throws ParserConfigurationException {
+    		// This is the PRIMARY defense. If DTDs (doctypes) are disallowed, almost all XML entity attacks are prevented
+        // Xerces 2 only - http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl
+        dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
+
+        // If you can't completely disable DTDs, then at least do the following:
+        // Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-general-entities
+        // Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-general-entities
+
+        // JDK7+ - http://xml.org/sax/features/external-general-entities 
+        dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
+
+        // Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-parameter-entities
+        // Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities
+
+        // JDK7+ - http://xml.org/sax/features/external-parameter-entities 
+        dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+
+        // Disable external DTDs as well
+        dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+
+        // and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
+        dbf.setXIncludeAware(false);
+        dbf.setExpandEntityReferences(false);
+    }
+
+    private static XPathFactory getXPathFactory() {
+        return  XmlHelper.XmlHelperHolder.xPathFactory;
+    }
+
+    /**
+     * 内部类单例
+     */
+    private static class XmlHelperHolder {
+        private static DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        private static XPathFactory xPathFactory = XPathFactory.newInstance();
+    }
+
+}

+ 1 - 1
DataFusion/src/com/zskk/tools/_JFinalDemoGenerator.java

@@ -39,7 +39,7 @@ public class _JFinalDemoGenerator {
 		// 设置是否生成链式 setter 方法
 		generator.setGenerateChainSetter(false);
 		// 添加不需要生成的表名
-		generator.addExcludedTable("bodypart","constant","department","device","doctor_class","dr_cla_permission","exam_class","exam_project","exam_subclass","images","institution","manager","menu","messages","operating","remote_application","report_record","series","sys_logs","sys_menus","templates");
+		generator.addExcludedTable("bodypart","constant","department","device","doctor_class","dr_cla_permission","exam_class","exam_project","exam_subclass","images","institution","manager","menu","messages","operating","remote_application","report_record","series","sys_logs","sys_menus","templates","bbs","default_cost","every_studies","open_application","oss_callbacks","remote_contact","remote_cost","remote_order","remote_water","remote_water_log","send_message","user","user_bind","version","wechat_bind","wechat_pay_log","wechat_refund_log");
 		// 设置是否在 Model 中生成 dao 对象
 		generator.setGenerateDaoInModel(true);
 		// 设置是否生成链式 setter 方法