Преглед на файлове

Merge remote-tracking branch 'origin/master' into i_44000003

# Conflicts:
#	DataFusion/.classpath
#	DataFusion/WebRoot/WEB-INF/classes/.gitignore
#	DataFusion/WebRoot/WEB-INF/classes/com/zskk/model/_DataDictionary.txt
#	DataFusion/WebRoot/WEB-INF/classes/config.properties
#	DataFusion/jfinal_demo.log
#	DataFusion/res/config.properties
#	DataFusion/src/com/zskk/config/ZskkConfig.java
#	DataFusion/src/com/zskk/control/ViewController.java
#	DataFusion/src/com/zskk/model/_DataDictionary.txt
#	DataFusion/src/com/zskk/model/_MappingKit.java
#	DataFusion/src/com/zskk/model/base/BaseStudies.java
#	DataFusion/src/com/zskk/service/ServiceFactory.java
#	DataFusion/src/com/zskk/service/ThreadPoolService.java
#	DataFusion/src/com/zskk/task/DataTask.java
#	DataFusion/src/com/zskk/tools/_JFinalDemoGenerator.java
刘韬 преди 4 години
родител
ревизия
6dcd4dcc9a
променени са 57 файла, в които са добавени 305 реда и са изтрити 2015 реда
  1. 5 0
      .gitignore
  2. 15 19
      DataFusion/.classpath
  3. 5 3
      DataFusion/.settings/org.eclipse.jdt.core.prefs
  4. 1 1
      DataFusion/.settings/org.eclipse.wst.common.project.facet.core.xml
  5. 0 1
      DataFusion/WebRoot/WEB-INF/classes/.gitignore
  6. 0 143
      DataFusion/WebRoot/WEB-INF/classes/com/zskk/model/_DataDictionary.txt
  7. 0 8
      DataFusion/WebRoot/WEB-INF/classes/config.properties
  8. 0 10
      DataFusion/WebRoot/WEB-INF/classes/log4j.properties
  9. BIN
      DataFusion/WebRoot/WEB-INF/lib/annotations-13.0.jar
  10. BIN
      DataFusion/WebRoot/WEB-INF/lib/commons-pool2-2.3.jar
  11. BIN
      DataFusion/WebRoot/WEB-INF/lib/druid-1.0.29.jar
  12. BIN
      DataFusion/WebRoot/WEB-INF/lib/druid-1.1.21.jar
  13. BIN
      DataFusion/WebRoot/WEB-INF/lib/fastjson-1.2.31.jar
  14. BIN
      DataFusion/WebRoot/WEB-INF/lib/fastjson-1.2.62.jar
  15. BIN
      DataFusion/WebRoot/WEB-INF/lib/fst-2.29.jar
  16. BIN
      DataFusion/WebRoot/WEB-INF/lib/jackson-core-2.5.3.jar
  17. BIN
      DataFusion/WebRoot/WEB-INF/lib/javassist-3.19.0-GA.jar
  18. BIN
      DataFusion/WebRoot/WEB-INF/lib/javax.activation-1.2.0.jar
  19. BIN
      DataFusion/WebRoot/WEB-INF/lib/jaxb-api-2.3.0.jar
  20. BIN
      DataFusion/WebRoot/WEB-INF/lib/jaxb-core-2.3.0.jar
  21. BIN
      DataFusion/WebRoot/WEB-INF/lib/jaxb-impl-2.3.0.jar
  22. BIN
      DataFusion/WebRoot/WEB-INF/lib/jedis-2.7.2.jar
  23. BIN
      DataFusion/WebRoot/WEB-INF/lib/jetty-server-8.1.8.jar
  24. BIN
      DataFusion/WebRoot/WEB-INF/lib/jfinal-3.4-bin-with-src.jar
  25. BIN
      DataFusion/WebRoot/WEB-INF/lib/jfinal-4.8-bin-with-src.jar
  26. BIN
      DataFusion/WebRoot/WEB-INF/lib/kotlin-stdlib-1.3.50.jar
  27. BIN
      DataFusion/WebRoot/WEB-INF/lib/kotlin-stdlib-common-1.3.50.jar
  28. BIN
      DataFusion/WebRoot/WEB-INF/lib/log4j-1.2.16.jar
  29. BIN
      DataFusion/WebRoot/WEB-INF/lib/log4j-1.2.17.jar
  30. BIN
      DataFusion/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.44-bin.jar
  31. BIN
      DataFusion/WebRoot/WEB-INF/lib/mysql-connector-java-8.0.18.jar
  32. BIN
      DataFusion/WebRoot/WEB-INF/lib/objenesis-2.1.jar
  33. BIN
      DataFusion/WebRoot/WEB-INF/lib/okhttp-4.2.2.jar
  34. BIN
      DataFusion/WebRoot/WEB-INF/lib/okio-2.2.2.jar
  35. 4 1
      DataFusion/res/config.properties
  36. 1 1
      DataFusion/res/log4j.properties
  37. 36 26
      DataFusion/src/com/zskk/config/ZskkConfig.java
  38. 68 106
      DataFusion/src/com/zskk/control/ViewController.java
  39. 0 11
      DataFusion/src/com/zskk/model/Doctors.java
  40. 0 11
      DataFusion/src/com/zskk/model/Exams.java
  41. 0 11
      DataFusion/src/com/zskk/model/PatientInfos.java
  42. 0 11
      DataFusion/src/com/zskk/model/Report.java
  43. 0 11
      DataFusion/src/com/zskk/model/Studies.java
  44. 0 160
      DataFusion/src/com/zskk/model/_DataDictionary.txt
  45. 0 27
      DataFusion/src/com/zskk/model/_MappingKit.java
  46. 0 246
      DataFusion/src/com/zskk/model/base/BaseDoctors.java
  47. 0 462
      DataFusion/src/com/zskk/model/base/BaseExams.java
  48. 0 210
      DataFusion/src/com/zskk/model/base/BasePatientInfos.java
  49. 0 156
      DataFusion/src/com/zskk/model/base/BaseReport.java
  50. 0 156
      DataFusion/src/com/zskk/model/base/BaseStudies.java
  51. 87 0
      DataFusion/src/com/zskk/service/DataService.java
  52. 3 1
      DataFusion/src/com/zskk/service/ServiceFactory.java
  53. 0 1
      DataFusion/src/com/zskk/service/ThreadPoolService.java
  54. 0 70
      DataFusion/src/com/zskk/service/WeixinService.java
  55. 80 81
      DataFusion/src/com/zskk/task/DataTask.java
  56. 0 13
      DataFusion/src/com/zskk/tools/JettyServer.java
  57. 0 58
      DataFusion/src/com/zskk/tools/_JFinalDemoGenerator.java

+ 5 - 0
.gitignore

@@ -8,7 +8,12 @@
 # Package Files #
 *.war
 *.ear
+classes/
+**/build
+/.settings/
 
 # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
 hs_err_pid*
 
+DataFusion/DataFusion.iml
+**/.idea

+ 15 - 19
DataFusion/.classpath

@@ -5,29 +5,25 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
 		<attributes>
 			<attribute name="module" value="true"/>
+			<attribute name="owner.project.facets" value="java"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-codec-1.9.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-io-2.5.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang3-3.4.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging-1.2.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-pool2-2.3.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/annotations-13.0.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cron4j-2.2.5.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/druid-1.0.29.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/fastjson-1.2.31.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/fst-2.29.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpclient-4.5.2.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpcore-4.4.4.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/httpmime-4.5.2.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jackson-core-2.5.3.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/javassist-3.19.0-GA.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jedis-2.7.2.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jetty-server-8.1.8.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jfinal-3.4-bin-with-src.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/log4j-1.2.16.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-5.1.44-bin.jar"/>
-	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/objenesis-2.1.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/druid-1.1.21.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/fastjson-1.2.62.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/javax.activation-1.2.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxb-api-2.3.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxb-core-2.3.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxb-impl-2.3.0.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-stdlib-1.3.50.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/kotlin-stdlib-common-1.3.50.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/log4j-1.2.17.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-8.0.18.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ojdbc6.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/okhttp-4.2.2.jar" sourcepath="/Users/liutao/.m2/repository/com/squareup/okhttp3/okhttp/4.2.2/okhttp-4.2.2-sources.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/okio-2.2.2.jar"/>
 	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sqljdbc42.jar"/>
+	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jfinal-4.8-bin-with-src.jar"/>
 	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
 </classpath>

+ 5 - 3
DataFusion/.settings/org.eclipse.jdt.core.prefs

@@ -1,8 +1,10 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
-org.eclipse.jdt.core.compiler.compliance=10
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
 org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=10
+org.eclipse.jdt.core.compiler.source=11

+ 1 - 1
DataFusion/.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -3,7 +3,7 @@
   <fixed facet="java"/>
   <fixed facet="wst.jsdt.web"/>
   <fixed facet="jst.web"/>
-  <installed facet="java" version="10"/>
   <installed facet="jst.web" version="4.0"/>
   <installed facet="wst.jsdt.web" version="1.0"/>
+  <installed facet="java" version="11"/>
 </faceted-project>

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

@@ -1 +0,0 @@
-/com/

+ 0 - 143
DataFusion/WebRoot/WEB-INF/classes/com/zskk/model/_DataDictionary.txt

@@ -1,143 +0,0 @@
-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  |     |         | 是否能写报告  
-----------------+---------------+------+-----+---------+---------
-
-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  |     |         | 检查结果    
--------------------+---------------+------+-----+---------+---------
-
-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  |     |         |         
------------------+---------------+------+-----+---------+---------
-
-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  |     |         | 确认时间    
--------------------+---------------+------+-----+---------+---------
-
-Table: studies
-------------------+--------------+------+-----+---------+---------
- Field            | Type         | Null | Key | Default | Remarks 
-------------------+--------------+------+-----+---------+---------
- id               | VARCHAR(32)  | NO   | PRI |         |         
- studyuid         | VARCHAR(200) | NO   | PRI |         |         
- patient_id       | VARCHAR(50)  | YES  |     |         | 患者id    
- studyid          | VARCHAR(50)  | YES  |     |         |         
- accession_num    | VARCHAR(255) | YES  |     |         | 科室检查号   
- studydate        | VARCHAR(255) | YES  |     |         |         
- ctime            | DATETIME(19) | YES  |     |         |         
- utime            | DATETIME(19) | YES  |     |         |         
- modality         | VARCHAR(255) | YES  |     |         |         
- status           | INT(10)      | YES  |     |         |         
- patient_age      | VARCHAR(20)  | YES  |     |         |         
- institution_name | VARCHAR(50)  | YES  |     |         | 机构名称    
- institution_id   | VARCHAR(200) | YES  |     |         |         
- createdAt        | DATETIME(19) | YES  |     |         |         
- updatedAt        | DATETIME(19) | YES  |     |         |         
-------------------+--------------+------+-----+---------+---------
-

+ 0 - 8
DataFusion/WebRoot/WEB-INF/classes/config.properties

@@ -1,8 +0,0 @@
-#DB-ZhongShiKangKai and connected partners
-jdbcUrl_zskk  = jdbc:mysql://www.pacsonline.cn:3306/pacsonline?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
-user_zskk 	  = pacs
-password_zskk = ZSKK@2017~!@#
-
-jdbcUrl_connected  = jdbc:oracle:thin:@172.16.0.244:1521:orcl
-user_connected 	   = jiekou
-password_connected = another

+ 0 - 10
DataFusion/WebRoot/WEB-INF/classes/log4j.properties

@@ -1,10 +0,0 @@
-log4j.rootLogger=WARN, stdout, file
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n
-
-# Output to the File
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=./jfinal_demo.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n

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


BIN
DataFusion/WebRoot/WEB-INF/lib/commons-pool2-2.3.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/druid-1.0.29.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/druid-1.1.21.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/fastjson-1.2.31.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/fastjson-1.2.62.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/fst-2.29.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jackson-core-2.5.3.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/javassist-3.19.0-GA.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/javax.activation-1.2.0.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jaxb-api-2.3.0.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jaxb-core-2.3.0.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jaxb-impl-2.3.0.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jedis-2.7.2.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jetty-server-8.1.8.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jfinal-3.4-bin-with-src.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/jfinal-4.8-bin-with-src.jar


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


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


BIN
DataFusion/WebRoot/WEB-INF/lib/log4j-1.2.16.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/log4j-1.2.17.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.44-bin.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/mysql-connector-java-8.0.18.jar


BIN
DataFusion/WebRoot/WEB-INF/lib/objenesis-2.1.jar


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


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


+ 4 - 1
DataFusion/res/config.properties

@@ -5,4 +5,7 @@ password_zskk = ZSKK@2017~!@#
 
 jdbcUrl_connected  = jdbc:oracle:thin:@192.168.5.5:1521:orcl
 user_connected 	   = YXYJK
-password_connected = i39
+password_connected = i39
+#DB-connected partners
+#DATA-Parms
+institution_id     = 44000003

+ 1 - 1
DataFusion/res/log4j.properties

@@ -5,6 +5,6 @@ log4j.appender.stdout.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-
 
 # Output to the File
 log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.File=./jfinal_demo.log
+log4j.appender.file.File=./zskk_df.log
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n

+ 36 - 26
DataFusion/src/com/zskk/config/ZskkConfig.java

@@ -6,23 +6,40 @@ import com.jfinal.config.Interceptors;
 import com.jfinal.config.JFinalConfig;
 import com.jfinal.config.Plugins;
 import com.jfinal.config.Routes;
+import com.jfinal.core.JFinal;
 import com.jfinal.kit.PropKit;
 import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
 import com.jfinal.plugin.activerecord.dialect.MysqlDialect;
 import com.jfinal.plugin.activerecord.dialect.OracleDialect;
+import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
 import com.jfinal.plugin.cron4j.Cron4jPlugin;
 import com.jfinal.plugin.druid.DruidPlugin;
 import com.jfinal.template.Engine;
 import com.zskk.control.ViewController;
-import com.zskk.model._MappingKit;
+import com.zskk.service.ServiceFactory;
 import com.zskk.task.DataTask;
 
 public class ZskkConfig extends JFinalConfig {
 
-	@Override
+	// 本地开发模式
+	private boolean isLocalDev = false;
+	/**
+	 * 如果生产环境配置文件存在,则优先加载该配置,否则加载开发环境配置文件
+	 * 
+	 * @param pro 生产环境配置文件
+	 * @param dev 开发环境配置文件
+	 */
+	public void loadProp(String pro, String dev) {
+		try {
+			PropKit.use(pro);
+		} catch (Exception e) {
+			PropKit.use(dev);
+			isLocalDev = true;
+		}
+	}
+
 	public void configConstant(Constants me) {
-		// 加载少量必要配置,随后可用PropKit.get(...)获取值
-		PropKit.use("config.properties");
+		loadProp("config.properties", "a_little_config.txt");
 		me.setDevMode(PropKit.getBoolean("devMode", false));
 	}
 
@@ -30,6 +47,7 @@ public class ZskkConfig extends JFinalConfig {
 	public void configRoute(Routes me) {
 		// TODO Auto-generated method stub
 		me.add("/view", ViewController.class);
+		me.add("/", ViewController.class,"");
 	}
 
 	@Override
@@ -38,10 +56,6 @@ public class ZskkConfig extends JFinalConfig {
 
 	}
 
-	public static DruidPlugin createZskkDruidPlugin() {
-
-		return new DruidPlugin(PropKit.get("jdbcUrl_zskk"), PropKit.get("user_zskk"),PropKit.get("password_zskk").trim());
-	}
 
 	public static DruidPlugin createConnectedDruidPlugin() {
 
@@ -50,34 +64,19 @@ public class ZskkConfig extends JFinalConfig {
 
 	@Override
 	public void configPlugin(Plugins me) {
-		// 配置数据库连接池插件
-		DruidPlugin druidPluginZskk = createZskkDruidPlugin();
-		me.add(druidPluginZskk);
-
-		// 配置ActiveRecord插件
-		ActiveRecordPlugin arpZskk = new ActiveRecordPlugin("zskk", druidPluginZskk);
-		arpZskk.setDialect(new MysqlDialect());
-
-		 //所有映射在 MappingKit 中自动化搞定
-		_MappingKit.mapping(arpZskk);
-		me.add(arpZskk);
-
 		// 配置数据库连接池插件
 		DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
 		me.add(druidPluginConnected);
 
-		// 配置ActiveRecord插件
+//		// 配置ActiveRecord插件
 		ActiveRecordPlugin arpConnected = new ActiveRecordPlugin("connected", druidPluginConnected);
 		arpConnected.setDialect(new OracleDialect());
 		me.add(arpConnected);
+
 		
 		Cron4jPlugin cpData = new Cron4jPlugin();
-		cpData.addTask("*/15 * * * *", new DataTask());
+		cpData.addTask("*/5 * * * *", new DataTask());
 		me.add(cpData);
-
-//		Cron4jPlugin cp2 = new Cron4jPlugin();
-//		cp2.addTask("*/3 * * * *", new SyncTask2());
-//	me.add(cp2);
 	}
 
 	@Override
@@ -91,5 +90,16 @@ public class ZskkConfig extends JFinalConfig {
 		// TODO Auto-generated method stub
 
 	}
+	
+	@Override
+	public void onStart() {
+		// TODO Auto-generated method stub
+		super.onStart();
+		ServiceFactory.init();
+	}
+	
+//	public static void main(String[] args) {
+//		JFinal.start("WebRoot", 10002, "/", 5);
+//	}
 
 }

+ 68 - 106
DataFusion/src/com/zskk/control/ViewController.java

@@ -1,140 +1,94 @@
 package com.zskk.control;
 
+import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
-import java.util.UUID;
+import java.util.Map;
+import com.alibaba.fastjson.JSON;
 import com.jfinal.core.Controller;
+import com.jfinal.kit.PropKit;
+import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
 import com.jfinal.plugin.activerecord.Db;
 import com.jfinal.plugin.activerecord.Record;
-import com.zskk.model.Doctors;
-import com.zskk.model.Exams;
-import com.zskk.model.PatientInfos;
-import com.zskk.model.Report;
-import com.zskk.model.Studies;
-import com.zskk.service.ServiceFactory;
-import com.zskk.service.WeixinService;
+import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
+import com.jfinal.plugin.druid.DruidPlugin;
+import okhttp3.FormBody;
+import okhttp3.MediaType;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
 
 public class ViewController extends Controller {
 
-	
+	private static final MediaType JSON_CODE = MediaType.get("application/json; charset=utf-8");
+
+	private static final OkHttpClient OKHTTP_CLIENT = new OkHttpClient();
+
 	/**
 	 * 在被连接数据库执行sql语句
 	 */
 	public void executeSql() {
-		try {
-			List<Record>  d =  Db.use("connected").find("select * from (select * from reportinfo order by REPORTDATE desc) where rownum <= 20");
-			this.renderJson(d);
-		} catch (Exception e) {
-			// TODO: handle exception
-			this.renderText(e.toString());
-		}
-	}
-	
-	public void executeSql2() {
-		try {
-			String sqlString = this.getPara("str");
-			List<Record>  d =  Db.use("connected").find(sqlString);
-			this.renderJson(d);
-		} catch (Exception e) {
-			// TODO: handle exception
-			this.renderText(e.toString());
-		}
+
+		List<Record> d = Db.use("connected").find(this.getPara("sqlstr"));
+		this.renderJson(d);
 	}
-	
-	public void testTask() {
+
+	public void testConn() {
 		try {
-			//List<Record>  d =  Db.use("connected").find(this.getPara("sqlStr"));
-			List<Record> examsd = new ArrayList<Record>();
+			DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
+            druidPluginConnected.start();
+			// 配置ActiveRecord插件
+			ActiveRecordPlugin arpConnected = new ActiveRecordPlugin("connected", druidPluginConnected);
+			arpConnected.setDialect(new SqlServerDialect());
+			arpConnected.start();
 
-			String ssString="";
-			List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=44000003 order by createdAt desc limit 100");
-			for (Exams exams2 : exams) {
-				try {
-				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
-				Record recordTemp = Db.use("connected").findFirst("select * from v_all_img_idx@PACSINTERFACE where F_STU_UID=?",studies.getStudyuid());
-				if (recordTemp == null) {
-					continue;
-				} 
-				
-				Record record = Db.use("connected").findFirst("select * from yxjK where STUDYUID=?",recordTemp.getStr("F_STU_NO"));
-				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(record.getStr("IMPRESSION"));
-				report.setDescription(record.getStr("DESCRIPTION"));
-				report.setExamId(exams2.getId());
-				report.setCreatedAt(new Date());
-				report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
-				report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
-				report.setReviewDatetime(parseStringToDate(record.getStr("REPORTDATE")));
-				report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
-				report.setConfirmDatetime(parseStringToDate(record.getStr("REPORTDATE")));
-				report.save();
-				
-				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
-				patientInfos.setName(record.getStr("PATIENTNAME"));
-				patientInfos.setPhone(record.getStr("PHONE")==null?"":record.getStr("PHONE"));
-				patientInfos.setCardNum(record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
-				patientInfos.update();
-				exams2.setApplicationDepartment(record.getStr("DEPATMENT"));
-				exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
-				exams2.setExamStatus(9);
-				exams2.update();
-				examsd.add(record);
-				WeixinService wService = new WeixinService();
-				ssString = wService.requestWeixinQrcode(report.getId());
-				} catch (Exception e) {
-					// TODO: handle exception
-					this.renderText(e.toString());
-//					continue;
-				}
-			}
-			this.renderText(ssString);
 		} catch (Exception e) {
 			// TODO: handle exception
 			this.renderText(e.toString());
 		}
 	}
 	
-	public void testTask2() {
-		try {
-			WeixinService wService = new WeixinService();
-			
-			String ssString = wService.requestWeixinQrcode("57f67d04ffdc4d91");
-			renderText(ssString);
-		} catch (Exception e) {
-			// TODO: handle exception
-			renderText(e.toString());
+	public static DruidPlugin createConnectedDruidPlugin() {
 
-		}
-		
-	}
-	private String creatId() {
-		UUID id = UUID.randomUUID();
-        String[] idd =id.toString().split("-");
-		return idd[0]+idd[1]+idd[2];
+		return new DruidPlugin(PropKit.get("jdbcUrl_connected"), PropKit.get("user_connected"),PropKit.get("password_connected").trim());
 	}
 	
-	private String getDoctorIdByName(String name) {
-		if (name == null) {
-			return "1";
+	/**
+	 * post请求
+	 * @param url-请求地址
+	 * @param map-参数集合
+	 * @return
+	 */
+	private static String doPost(String url, Map<String, String> map) {
+		FormBody.Builder builder = new FormBody.Builder();
+		for (String key : map.keySet()) {
+			builder.add(key, map.get(key));
 		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=44000003",name);
-		if (doctors == null) {
-			return "1";
+
+		RequestBody formBody = builder.build();
+
+		Request request = new Request.Builder().url(url).post(formBody).build();
+		
+		try (Response response = OKHTTP_CLIENT.newCall(request).execute()) {
+			if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
+			String content = response.body().string();
+			return content;
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
 		}
-		return doctors.getId();
 	}
 	
+	/**
+	 * 日期字符串格式转换
+	 * @param dateStr
+	 * @return
+	 */
 	private Date parseStringToDate(String dateStr) {
 		if (dateStr == null) {
 			return new Date();
@@ -149,5 +103,13 @@ public class ViewController extends Controller {
 		}
         return date;
 	}
-	
+
+	public static void main(String[] args) {
+        Map<String,String> paramsMap=new HashMap<String,String>();
+        paramsMap.put("institution_id", "44100001");
+
+		String contentString = doPost("https://risserver3.pacsonline.cn/butt/getExam/butt/getExam", paramsMap);
+		System.out.println(contentString);
+
+	}
 }

+ 0 - 11
DataFusion/src/com/zskk/model/Doctors.java

@@ -1,11 +0,0 @@
-package com.zskk.model;
-
-import com.zskk.model.base.BaseDoctors;
-
-/**
- * Generated by JFinal.
- */
-@SuppressWarnings("serial")
-public class Doctors extends BaseDoctors<Doctors> {
-	public static final Doctors dao = new Doctors().dao();
-}

+ 0 - 11
DataFusion/src/com/zskk/model/Exams.java

@@ -1,11 +0,0 @@
-package com.zskk.model;
-
-import com.zskk.model.base.BaseExams;
-
-/**
- * Generated by JFinal.
- */
-@SuppressWarnings("serial")
-public class Exams extends BaseExams<Exams> {
-	public static final Exams dao = new Exams().dao();
-}

+ 0 - 11
DataFusion/src/com/zskk/model/PatientInfos.java

@@ -1,11 +0,0 @@
-package com.zskk.model;
-
-import com.zskk.model.base.BasePatientInfos;
-
-/**
- * Generated by JFinal.
- */
-@SuppressWarnings("serial")
-public class PatientInfos extends BasePatientInfos<PatientInfos> {
-	public static final PatientInfos dao = new PatientInfos().dao();
-}

+ 0 - 11
DataFusion/src/com/zskk/model/Report.java

@@ -1,11 +0,0 @@
-package com.zskk.model;
-
-import com.zskk.model.base.BaseReport;
-
-/**
- * Generated by JFinal.
- */
-@SuppressWarnings("serial")
-public class Report extends BaseReport<Report> {
-	public static final Report dao = new Report().dao();
-}

+ 0 - 11
DataFusion/src/com/zskk/model/Studies.java

@@ -1,11 +0,0 @@
-package com.zskk.model;
-
-import com.zskk.model.base.BaseStudies;
-
-/**
- * Generated by JFinal.
- */
-@SuppressWarnings("serial")
-public class Studies extends BaseStudies<Studies> {
-	public static final Studies dao = new Studies().dao();
-}

+ 0 - 160
DataFusion/src/com/zskk/model/_DataDictionary.txt

@@ -1,160 +0,0 @@
-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  |     |         | 是否能写报告  
- 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  |     | 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       | 重症标识    
-------------------------+---------------+------+-----+---------+---------
-
-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          | 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  |     |         | 确认时间    
- type                  | VARCHAR(10)   | YES  |     | 1       | 报告类型    
- remote_application_id | VARCHAR(50)   | YES  |     |         | 申请id    
------------------------+---------------+------+-----+---------+---------
-
-Table: studies
-------------------+--------------+------+-----+---------+---------
- Field            | Type         | Null | Key | Default | Remarks 
-------------------+--------------+------+-----+---------+---------
- id               | VARCHAR(32)  | NO   | PRI |         |         
- studyuid         | VARCHAR(200) | NO   | PRI |         |         
- patient_id       | VARCHAR(50)  | YES  |     |         | 患者id    
- studyid          | VARCHAR(50)  | YES  |     |         |         
- accession_num    | VARCHAR(255) | YES  |     |         | 科室检查号   
- studydate        | VARCHAR(255) | YES  |     |         |         
- ctime            | DATETIME(19) | YES  |     |         |         
- utime            | DATETIME(19) | YES  |     |         |         
- modality         | VARCHAR(255) | YES  |     |         |         
- status           | INT(10)      | YES  |     |         |         
- patient_age      | VARCHAR(20)  | YES  |     |         |         
- institution_name | VARCHAR(50)  | YES  |     |         | 机构名称    
- institution_id   | VARCHAR(200) | YES  |     |         |         
- createdAt        | DATETIME(19) | YES  |     |         |         
- updatedAt        | DATETIME(19) | YES  |     |         |         
- ext              | JSON         | YES  |     |         |         
-------------------+--------------+------+-----+---------+---------
-

+ 0 - 27
DataFusion/src/com/zskk/model/_MappingKit.java

@@ -1,27 +0,0 @@
-package com.zskk.model;
-
-import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
-
-/**
- * Generated by JFinal, do not modify this file.
- * <pre>
- * Example:
- * public void configPlugin(Plugins me) {
- *     ActiveRecordPlugin arp = new ActiveRecordPlugin(...);
- *     _MappingKit.mapping(arp);
- *     me.add(arp);
- * }
- * </pre>
- */
-public class _MappingKit {
-	
-	public static void mapping(ActiveRecordPlugin arp) {
-		arp.addMapping("doctors", "id", Doctors.class);
-		arp.addMapping("exams", "id", Exams.class);
-		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);
-	}
-}
-

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

@@ -1,246 +0,0 @@
-package com.zskk.model.base;
-
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.IBean;
-
-/**
- * Generated by JFinal, do not modify this file.
- */
-@SuppressWarnings({"serial", "unchecked"})
-public abstract class BaseDoctors<M extends BaseDoctors<M>> extends Model<M> implements IBean {
-
-	public M setId(java.lang.String id) {
-		set("id", id);
-		return (M)this;
-	}
-	
-	public java.lang.String getId() {
-		return getStr("id");
-	}
-
-	public M setUsername(java.lang.String username) {
-		set("username", username);
-		return (M)this;
-	}
-	
-	public java.lang.String getUsername() {
-		return getStr("username");
-	}
-
-	public M setPassword(java.lang.String password) {
-		set("password", password);
-		return (M)this;
-	}
-	
-	public java.lang.String getPassword() {
-		return getStr("password");
-	}
-
-	public M setRealname(java.lang.String realname) {
-		set("realname", realname);
-		return (M)this;
-	}
-	
-	public java.lang.String getRealname() {
-		return getStr("realname");
-	}
-
-	public M setEmail(java.lang.String email) {
-		set("email", email);
-		return (M)this;
-	}
-	
-	public java.lang.String getEmail() {
-		return getStr("email");
-	}
-
-	public M setLoginTime(java.util.Date loginTime) {
-		set("login_time", loginTime);
-		return (M)this;
-	}
-	
-	public java.util.Date getLoginTime() {
-		return get("login_time");
-	}
-
-	public M setCreatedAt(java.util.Date createdAt) {
-		set("createdAt", createdAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getCreatedAt() {
-		return get("createdAt");
-	}
-
-	public M setUpdatedAt(java.util.Date updatedAt) {
-		set("updatedAt", updatedAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getUpdatedAt() {
-		return get("updatedAt");
-	}
-
-	public M setToken(java.lang.String token) {
-		set("token", token);
-		return (M)this;
-	}
-	
-	public java.lang.String getToken() {
-		return getStr("token");
-	}
-
-	public M setPhone(java.lang.String phone) {
-		set("phone", phone);
-		return (M)this;
-	}
-	
-	public java.lang.String getPhone() {
-		return getStr("phone");
-	}
-
-	public M setRemark(java.lang.String remark) {
-		set("remark", remark);
-		return (M)this;
-	}
-	
-	public java.lang.String getRemark() {
-		return getStr("remark");
-	}
-
-	public M setDoctorTitle(java.lang.String doctorTitle) {
-		set("doctor_title", doctorTitle);
-		return (M)this;
-	}
-	
-	public java.lang.String getDoctorTitle() {
-		return getStr("doctor_title");
-	}
-
-	public M setStatus(java.lang.String status) {
-		set("status", status);
-		return (M)this;
-	}
-	
-	public java.lang.String getStatus() {
-		return getStr("status");
-	}
-
-	public M setAttachment(java.lang.String attachment) {
-		set("attachment", attachment);
-		return (M)this;
-	}
-	
-	public java.lang.String getAttachment() {
-		return getStr("attachment");
-	}
-
-	public M setInstitutionId(java.lang.String institutionId) {
-		set("institution_id", institutionId);
-		return (M)this;
-	}
-	
-	public java.lang.String getInstitutionId() {
-		return getStr("institution_id");
-	}
-
-	public M setDepartmentId(java.lang.String departmentId) {
-		set("department_id", departmentId);
-		return (M)this;
-	}
-	
-	public java.lang.String getDepartmentId() {
-		return getStr("department_id");
-	}
-
-	public M setDoctorRole(java.lang.String doctorRole) {
-		set("doctor_role", doctorRole);
-		return (M)this;
-	}
-	
-	public java.lang.String getDoctorRole() {
-		return getStr("doctor_role");
-	}
-
-	public M setLoginFailure(java.lang.Integer loginFailure) {
-		set("login_failure", loginFailure);
-		return (M)this;
-	}
-	
-	public java.lang.Integer getLoginFailure() {
-		return getInt("login_failure");
-	}
-
-	public M setIsReport(java.lang.String isReport) {
-		set("is_report", isReport);
-		return (M)this;
-	}
-	
-	public java.lang.String getIsReport() {
-		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");
-	}
-
-}

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

@@ -1,462 +0,0 @@
-package com.zskk.model.base;
-
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.IBean;
-
-/**
- * Generated by JFinal, do not modify this file.
- */
-@SuppressWarnings({"serial", "unchecked"})
-public abstract class BaseExams<M extends BaseExams<M>> extends Model<M> implements IBean {
-
-	public M setId(java.lang.String id) {
-		set("id", id);
-		return (M)this;
-	}
-	
-	public java.lang.String getId() {
-		return getStr("id");
-	}
-
-	public M setDeptId(java.lang.String deptId) {
-		set("dept_id", deptId);
-		return (M)this;
-	}
-	
-	public java.lang.String getDeptId() {
-		return getStr("dept_id");
-	}
-
-	public M setPatientId(java.lang.String patientId) {
-		set("patient_id", patientId);
-		return (M)this;
-	}
-	
-	public java.lang.String getPatientId() {
-		return getStr("patient_id");
-	}
-
-	public M setPatientNum(java.lang.String patientNum) {
-		set("patient_num", patientNum);
-		return (M)this;
-	}
-	
-	public java.lang.String getPatientNum() {
-		return getStr("patient_num");
-	}
-
-	public M setAccessionNum(java.lang.String accessionNum) {
-		set("accession_num", accessionNum);
-		return (M)this;
-	}
-	
-	public java.lang.String getAccessionNum() {
-		return getStr("accession_num");
-	}
-
-	public M setExamDatetime(java.lang.String examDatetime) {
-		set("exam_datetime", examDatetime);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamDatetime() {
-		return getStr("exam_datetime");
-	}
-
-	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 setExamSubClass(java.lang.String examSubClass) {
-		set("exam_sub_class", examSubClass);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamSubClass() {
-		return getStr("exam_sub_class");
-	}
-
-	public M setExamProject(java.lang.String examProject) {
-		set("exam_project", examProject);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamProject() {
-		return getStr("exam_project");
-	}
-
-	public M setDevice(java.lang.String device) {
-		set("device", device);
-		return (M)this;
-	}
-	
-	public java.lang.String getDevice() {
-		return getStr("device");
-	}
-
-	public M setBodyPart(java.lang.String bodyPart) {
-		set("body_part", bodyPart);
-		return (M)this;
-	}
-	
-	public java.lang.String getBodyPart() {
-		return getStr("body_part");
-	}
-
-	public M setExamMethod(java.lang.String examMethod) {
-		set("exam_method", examMethod);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamMethod() {
-		return getStr("exam_method");
-	}
-
-	public M setHopitalizedNo(java.lang.String hopitalizedNo) {
-		set("hopitalized_no", hopitalizedNo);
-		return (M)this;
-	}
-	
-	public java.lang.String getHopitalizedNo() {
-		return getStr("hopitalized_no");
-	}
-
-	public M setBedNo(java.lang.String bedNo) {
-		set("bed_no", bedNo);
-		return (M)this;
-	}
-	
-	public java.lang.String getBedNo() {
-		return getStr("bed_no");
-	}
-
-	public M setClinDeptId(java.lang.String clinDeptId) {
-		set("clin_dept_id", clinDeptId);
-		return (M)this;
-	}
-	
-	public java.lang.String getClinDeptId() {
-		return getStr("clin_dept_id");
-	}
-
-	public M setTechnician(java.lang.String technician) {
-		set("technician", technician);
-		return (M)this;
-	}
-	
-	public java.lang.String getTechnician() {
-		return getStr("technician");
-	}
-
-	public M setCharge(java.lang.String charge) {
-		set("charge", charge);
-		return (M)this;
-	}
-	
-	public java.lang.String getCharge() {
-		return getStr("charge");
-	}
-
-	public M setCost(java.lang.String cost) {
-		set("cost", cost);
-		return (M)this;
-	}
-	
-	public java.lang.String getCost() {
-		return getStr("cost");
-	}
-
-	public M setClinDoctors(java.lang.String clinDoctors) {
-		set("clin_doctors", clinDoctors);
-		return (M)this;
-	}
-	
-	public java.lang.String getClinDoctors() {
-		return getStr("clin_doctors");
-	}
-
-	public M setPhone(java.lang.String phone) {
-		set("phone", phone);
-		return (M)this;
-	}
-	
-	public java.lang.String getPhone() {
-		return getStr("phone");
-	}
-
-	public M setInstitutionId(java.lang.String institutionId) {
-		set("institution_id", institutionId);
-		return (M)this;
-	}
-	
-	public java.lang.String getInstitutionId() {
-		return getStr("institution_id");
-	}
-
-	public M setStudyId(java.lang.String studyId) {
-		set("study_id", studyId);
-		return (M)this;
-	}
-	
-	public java.lang.String getStudyId() {
-		return getStr("study_id");
-	}
-
-	public M setIllnessDesc(java.lang.String illnessDesc) {
-		set("illness_desc", illnessDesc);
-		return (M)this;
-	}
-	
-	public java.lang.String getIllnessDesc() {
-		return getStr("illness_desc");
-	}
-
-	public M setPhysSign(java.lang.String physSign) {
-		set("phys_sign", physSign);
-		return (M)this;
-	}
-	
-	public java.lang.String getPhysSign() {
-		return getStr("phys_sign");
-	}
-
-	public M setClinDiag(java.lang.String clinDiag) {
-		set("clin_diag", clinDiag);
-		return (M)this;
-	}
-	
-	public java.lang.String getClinDiag() {
-		return getStr("clin_diag");
-	}
-
-	public M setClinSymp(java.lang.String clinSymp) {
-		set("clin_symp", clinSymp);
-		return (M)this;
-	}
-	
-	public java.lang.String getClinSymp() {
-		return getStr("clin_symp");
-	}
-
-	public M setPatientSource(java.lang.String patientSource) {
-		set("patient_source", patientSource);
-		return (M)this;
-	}
-	
-	public java.lang.String getPatientSource() {
-		return getStr("patient_source");
-	}
-
-	public M setReqDatetime(java.util.Date reqDatetime) {
-		set("req_datetime", reqDatetime);
-		return (M)this;
-	}
-	
-	public java.util.Date getReqDatetime() {
-		return get("req_datetime");
-	}
-
-	public M setReqDoctor(java.lang.String reqDoctor) {
-		set("req_doctor", reqDoctor);
-		return (M)this;
-	}
-	
-	public java.lang.String getReqDoctor() {
-		return getStr("req_doctor");
-	}
-
-	public M setRemark(java.lang.String remark) {
-		set("remark", remark);
-		return (M)this;
-	}
-	
-	public java.lang.String getRemark() {
-		return getStr("remark");
-	}
-
-	public M setRegister(java.lang.String register) {
-		set("register", register);
-		return (M)this;
-	}
-	
-	public java.lang.String getRegister() {
-		return getStr("register");
-	}
-
-	public M setRegisterDatetime(java.util.Date registerDatetime) {
-		set("register_datetime", registerDatetime);
-		return (M)this;
-	}
-	
-	public java.util.Date getRegisterDatetime() {
-		return get("register_datetime");
-	}
-
-	public M setExamStatus(java.lang.Integer examStatus) {
-		set("exam_status", examStatus);
-		return (M)this;
-	}
-	
-	public java.lang.Integer getExamStatus() {
-		return getInt("exam_status");
-	}
-
-	public M setStatus(java.lang.String status) {
-		set("status", status);
-		return (M)this;
-	}
-	
-	public java.lang.String getStatus() {
-		return getStr("status");
-	}
-
-	public M setPayStatus(java.lang.String payStatus) {
-		set("pay_status", payStatus);
-		return (M)this;
-	}
-	
-	public java.lang.String getPayStatus() {
-		return getStr("pay_status");
-	}
-
-	public M setIsRemote(java.lang.String isRemote) {
-		set("is_remote", isRemote);
-		return (M)this;
-	}
-	
-	public java.lang.String getIsRemote() {
-		return getStr("is_remote");
-	}
-
-	public M setUrgent(java.lang.String urgent) {
-		set("urgent", urgent);
-		return (M)this;
-	}
-	
-	public java.lang.String getUrgent() {
-		return getStr("urgent");
-	}
-
-	public M setFilmType(java.lang.String filmType) {
-		set("film_type", filmType);
-		return (M)this;
-	}
-	
-	public java.lang.String getFilmType() {
-		return getStr("film_type");
-	}
-
-	public M setAnamnesis(java.lang.String anamnesis) {
-		set("anamnesis", anamnesis);
-		return (M)this;
-	}
-	
-	public java.lang.String getAnamnesis() {
-		return getStr("anamnesis");
-	}
-
-	public M setFamilyIll(java.lang.String familyIll) {
-		set("family_ill", familyIll);
-		return (M)this;
-	}
-	
-	public java.lang.String getFamilyIll() {
-		return getStr("family_ill");
-	}
-
-	public M setCreatedAt(java.util.Date createdAt) {
-		set("createdAt", createdAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getCreatedAt() {
-		return get("createdAt");
-	}
-
-	public M setUpdatedAt(java.util.Date updatedAt) {
-		set("updatedAt", updatedAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getUpdatedAt() {
-		return get("updatedAt");
-	}
-
-	public M setDeliveryDoctor(java.lang.String deliveryDoctor) {
-		set("delivery_doctor", deliveryDoctor);
-		return (M)this;
-	}
-	
-	public java.lang.String getDeliveryDoctor() {
-		return getStr("delivery_doctor");
-	}
-
-	public M setExamReport(java.lang.String examReport) {
-		set("exam_report", examReport);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamReport() {
-		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");
-	}
-
-}

+ 0 - 210
DataFusion/src/com/zskk/model/base/BasePatientInfos.java

@@ -1,210 +0,0 @@
-package com.zskk.model.base;
-
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.IBean;
-
-/**
- * Generated by JFinal, do not modify this file.
- */
-@SuppressWarnings({"serial", "unchecked"})
-public abstract class BasePatientInfos<M extends BasePatientInfos<M>> extends Model<M> implements IBean {
-
-	public M setId(java.lang.String id) {
-		set("id", id);
-		return (M)this;
-	}
-	
-	public java.lang.String getId() {
-		return getStr("id");
-	}
-
-	public M setName(java.lang.String name) {
-		set("name", name);
-		return (M)this;
-	}
-	
-	public java.lang.String getName() {
-		return getStr("name");
-	}
-
-	public M setSex(java.lang.String sex) {
-		set("sex", sex);
-		return (M)this;
-	}
-	
-	public java.lang.String getSex() {
-		return getStr("sex");
-	}
-
-	public M setCardNum(java.lang.String cardNum) {
-		set("card_num", cardNum);
-		return (M)this;
-	}
-	
-	public java.lang.String getCardNum() {
-		return getStr("card_num");
-	}
-
-	public M setPhone(java.lang.String phone) {
-		set("phone", phone);
-		return (M)this;
-	}
-	
-	public java.lang.String getPhone() {
-		return getStr("phone");
-	}
-
-	public M setCtime(java.util.Date ctime) {
-		set("ctime", ctime);
-		return (M)this;
-	}
-	
-	public java.util.Date getCtime() {
-		return get("ctime");
-	}
-
-	public M setBirthday(java.lang.String birthday) {
-		set("birthday", birthday);
-		return (M)this;
-	}
-	
-	public java.lang.String getBirthday() {
-		return getStr("birthday");
-	}
-
-	public M setAge(java.lang.String age) {
-		set("age", age);
-		return (M)this;
-	}
-	
-	public java.lang.String getAge() {
-		return getStr("age");
-	}
-
-	public M setCardType(java.lang.String cardType) {
-		set("card_type", cardType);
-		return (M)this;
-	}
-	
-	public java.lang.String getCardType() {
-		return getStr("card_type");
-	}
-
-	public M setNationality(java.lang.String nationality) {
-		set("nationality", nationality);
-		return (M)this;
-	}
-	
-	public java.lang.String getNationality() {
-		return getStr("nationality");
-	}
-
-	public M setNation(java.lang.String nation) {
-		set("nation", nation);
-		return (M)this;
-	}
-	
-	public java.lang.String getNation() {
-		return getStr("nation");
-	}
-
-	public M setMarry(java.lang.String marry) {
-		set("marry", marry);
-		return (M)this;
-	}
-	
-	public java.lang.String getMarry() {
-		return getStr("marry");
-	}
-
-	public M setProfessional(java.lang.String professional) {
-		set("professional", professional);
-		return (M)this;
-	}
-	
-	public java.lang.String getProfessional() {
-		return getStr("professional");
-	}
-
-	public M setAddress(java.lang.String address) {
-		set("address", address);
-		return (M)this;
-	}
-	
-	public java.lang.String getAddress() {
-		return getStr("address");
-	}
-
-	public M setTempPatientId(java.lang.String tempPatientId) {
-		set("temp_patient_id", tempPatientId);
-		return (M)this;
-	}
-	
-	public java.lang.String getTempPatientId() {
-		return getStr("temp_patient_id");
-	}
-
-	public M setStatus(java.lang.Integer status) {
-		set("status", status);
-		return (M)this;
-	}
-	
-	public java.lang.Integer getStatus() {
-		return getInt("status");
-	}
-
-	public M setInstitutionId(java.lang.String institutionId) {
-		set("institution_id", institutionId);
-		return (M)this;
-	}
-	
-	public java.lang.String getInstitutionId() {
-		return getStr("institution_id");
-	}
-
-	public M setAnamnesis(java.lang.String anamnesis) {
-		set("anamnesis", anamnesis);
-		return (M)this;
-	}
-	
-	public java.lang.String getAnamnesis() {
-		return getStr("anamnesis");
-	}
-
-	public M setFamilyIll(java.lang.String familyIll) {
-		set("family_ill", familyIll);
-		return (M)this;
-	}
-	
-	public java.lang.String getFamilyIll() {
-		return getStr("family_ill");
-	}
-
-	public M setCreatedAt(java.util.Date createdAt) {
-		set("createdAt", createdAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getCreatedAt() {
-		return get("createdAt");
-	}
-
-	public M setUpdatedAt(java.util.Date updatedAt) {
-		set("updatedAt", updatedAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getUpdatedAt() {
-		return get("updatedAt");
-	}
-
-	public M setExt(java.lang.String ext) {
-		set("ext", ext);
-		return (M)this;
-	}
-	
-	public java.lang.String getExt() {
-		return getStr("ext");
-	}
-
-}

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

@@ -1,156 +0,0 @@
-package com.zskk.model.base;
-
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.IBean;
-
-/**
- * Generated by JFinal, do not modify this file.
- */
-@SuppressWarnings({"serial", "unchecked"})
-public abstract class BaseReport<M extends BaseReport<M>> extends Model<M> implements IBean {
-
-	public M setId(java.lang.String id) {
-		set("id", id);
-		return (M)this;
-	}
-	
-	public java.lang.String getId() {
-		return getStr("id");
-	}
-
-	public M setReportDatetime(java.util.Date reportDatetime) {
-		set("report_datetime", reportDatetime);
-		return (M)this;
-	}
-	
-	public java.util.Date getReportDatetime() {
-		return get("report_datetime");
-	}
-
-	public M setDescription(java.lang.String description) {
-		set("description", description);
-		return (M)this;
-	}
-	
-	public java.lang.String getDescription() {
-		return getStr("description");
-	}
-
-	public M setImpression(java.lang.String impression) {
-		set("impression", impression);
-		return (M)this;
-	}
-	
-	public java.lang.String getImpression() {
-		return getStr("impression");
-	}
-
-	public M setImgUrl(java.lang.String imgUrl) {
-		set("img_url", imgUrl);
-		return (M)this;
-	}
-	
-	public java.lang.String getImgUrl() {
-		return getStr("img_url");
-	}
-
-	public M setExamId(java.lang.String examId) {
-		set("exam_id", examId);
-		return (M)this;
-	}
-	
-	public java.lang.String getExamId() {
-		return getStr("exam_id");
-	}
-
-	public M setCreatedAt(java.util.Date createdAt) {
-		set("createdAt", createdAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getCreatedAt() {
-		return get("createdAt");
-	}
-
-	public M setReportDoctorId(java.lang.String reportDoctorId) {
-		set("report_doctor_id", reportDoctorId);
-		return (M)this;
-	}
-	
-	public java.lang.String getReportDoctorId() {
-		return getStr("report_doctor_id");
-	}
-
-	public M setReviewDoctorId(java.lang.String reviewDoctorId) {
-		set("review_doctor_id", reviewDoctorId);
-		return (M)this;
-	}
-	
-	public java.lang.String getReviewDoctorId() {
-		return getStr("review_doctor_id");
-	}
-
-	public M setQrCode(java.lang.String qrCode) {
-		set("qr_code", qrCode);
-		return (M)this;
-	}
-	
-	public java.lang.String getQrCode() {
-		return getStr("qr_code");
-	}
-
-	public M setReportResult(java.lang.String reportResult) {
-		set("report_result", reportResult);
-		return (M)this;
-	}
-	
-	public java.lang.String getReportResult() {
-		return getStr("report_result");
-	}
-
-	public M setReviewDatetime(java.util.Date reviewDatetime) {
-		set("review_datetime", reviewDatetime);
-		return (M)this;
-	}
-	
-	public java.util.Date getReviewDatetime() {
-		return get("review_datetime");
-	}
-
-	public M setConfirmDoctorId(java.lang.String confirmDoctorId) {
-		set("confirm_doctor_id", confirmDoctorId);
-		return (M)this;
-	}
-	
-	public java.lang.String getConfirmDoctorId() {
-		return getStr("confirm_doctor_id");
-	}
-
-	public M setConfirmDatetime(java.util.Date confirmDatetime) {
-		set("confirm_datetime", confirmDatetime);
-		return (M)this;
-	}
-	
-	public java.util.Date getConfirmDatetime() {
-		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");
-	}
-
-}

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

@@ -1,156 +0,0 @@
-package com.zskk.model.base;
-
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.IBean;
-
-/**
- * Generated by JFinal, do not modify this file.
- */
-@SuppressWarnings({"serial", "unchecked"})
-public abstract class BaseStudies<M extends BaseStudies<M>> extends Model<M> implements IBean {
-
-	public M setId(java.lang.String id) {
-		set("id", id);
-		return (M)this;
-	}
-	
-	public java.lang.String getId() {
-		return getStr("id");
-	}
-
-	public M setStudyuid(java.lang.String studyuid) {
-		set("studyuid", studyuid);
-		return (M)this;
-	}
-	
-	public java.lang.String getStudyuid() {
-		return getStr("studyuid");
-	}
-
-	public M setPatientId(java.lang.String patientId) {
-		set("patient_id", patientId);
-		return (M)this;
-	}
-	
-	public java.lang.String getPatientId() {
-		return getStr("patient_id");
-	}
-
-	public M setStudyid(java.lang.String studyid) {
-		set("studyid", studyid);
-		return (M)this;
-	}
-	
-	public java.lang.String getStudyid() {
-		return getStr("studyid");
-	}
-
-	public M setAccessionNum(java.lang.String accessionNum) {
-		set("accession_num", accessionNum);
-		return (M)this;
-	}
-	
-	public java.lang.String getAccessionNum() {
-		return getStr("accession_num");
-	}
-
-	public M setStudydate(java.lang.String studydate) {
-		set("studydate", studydate);
-		return (M)this;
-	}
-	
-	public java.lang.String getStudydate() {
-		return getStr("studydate");
-	}
-
-	public M setCtime(java.util.Date ctime) {
-		set("ctime", ctime);
-		return (M)this;
-	}
-	
-	public java.util.Date getCtime() {
-		return get("ctime");
-	}
-
-	public M setUtime(java.util.Date utime) {
-		set("utime", utime);
-		return (M)this;
-	}
-	
-	public java.util.Date getUtime() {
-		return get("utime");
-	}
-
-	public M setModality(java.lang.String modality) {
-		set("modality", modality);
-		return (M)this;
-	}
-	
-	public java.lang.String getModality() {
-		return getStr("modality");
-	}
-
-	public M setStatus(java.lang.Integer status) {
-		set("status", status);
-		return (M)this;
-	}
-	
-	public java.lang.Integer getStatus() {
-		return getInt("status");
-	}
-
-	public M setPatientAge(java.lang.String patientAge) {
-		set("patient_age", patientAge);
-		return (M)this;
-	}
-	
-	public java.lang.String getPatientAge() {
-		return getStr("patient_age");
-	}
-
-	public M setInstitutionName(java.lang.String institutionName) {
-		set("institution_name", institutionName);
-		return (M)this;
-	}
-	
-	public java.lang.String getInstitutionName() {
-		return getStr("institution_name");
-	}
-
-	public M setInstitutionId(java.lang.String institutionId) {
-		set("institution_id", institutionId);
-		return (M)this;
-	}
-	
-	public java.lang.String getInstitutionId() {
-		return getStr("institution_id");
-	}
-
-	public M setCreatedAt(java.util.Date createdAt) {
-		set("createdAt", createdAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getCreatedAt() {
-		return get("createdAt");
-	}
-
-	public M setUpdatedAt(java.util.Date updatedAt) {
-		set("updatedAt", updatedAt);
-		return (M)this;
-	}
-	
-	public java.util.Date getUpdatedAt() {
-		return get("updatedAt");
-	}
-
-	public M setExt(java.lang.String ext) {
-		set("ext", ext);
-		return (M)this;
-	}
-	
-	public java.lang.String getExt() {
-		return getStr("ext");
-	}
-
-}

+ 87 - 0
DataFusion/src/com/zskk/service/DataService.java

@@ -0,0 +1,87 @@
+package com.zskk.service;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.jfinal.kit.PropKit;
+
+import okhttp3.FormBody;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+
+public class DataService {
+	
+    private static String GET_EXAM_URL = "https://risserver3.pacsonline.cn/butt/getExam";
+    
+    private static String SAVE_REPORT_URL = "https://risserver3.pacsonline.cn/butt/saveReport";
+	
+    private static final OkHttpClient OKHTTP_CLIENT = new OkHttpClient();
+    
+    /**
+     * 获取未出报告的检查列表
+     * @param instutionId
+     * @param number
+     */
+    public JSONArray getExamList(Integer number) {
+    	Map <String,String> map = new HashMap<String,String>();
+    	map.put("institution_id", PropKit.get("institution_id"));
+    	map.put("num", number.toString());
+		String content = postWithParameters(GET_EXAM_URL, map);
+	    JSONObject jsonObject = JSON.parseObject(content);
+	    if (!jsonObject.getString("msg").equals("success")) {
+			return null;
+		}
+		JSONArray jsonArray = JSON.parseArray(jsonObject.getString("data"));		
+		return jsonArray;
+		
+	}
+    
+    /**
+     * 写入报告
+     * @param instutionId
+     * @param number
+     */
+    public void saveReport(Map <String,String> map) {
+		postWithParameters(SAVE_REPORT_URL, map);
+		
+	}
+    
+    public static String postWithParameters(String url, Map<String, String> map) {
+    	
+    	FormBody.Builder formbody = new FormBody.Builder();
+    	
+    	for (Map.Entry<String, String> entry : map.entrySet()) {
+    		formbody.add(entry.getKey(), entry.getValue());
+		}
+		RequestBody requestBody = formbody.build();
+		
+		Request request = new Request.Builder()
+		        .url(url)
+		        .post(requestBody)
+		        .build();
+
+		    try (Response response = OKHTTP_CLIENT.newCall(request).execute()) {
+		      if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
+		      String content = response.body().string();
+		      return content;
+		    } catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return null;
+			}	
+	}
+    
+    public static void main(String[] args) {
+    	Map <String,String> map = new HashMap<String,String>();
+    	map.put("institution_id", "47600001");
+    	map.put("num", "10");
+		postWithParameters(GET_EXAM_URL, map);
+	}
+
+}

+ 3 - 1
DataFusion/src/com/zskk/service/ServiceFactory.java

@@ -18,7 +18,9 @@ public class ServiceFactory {
 	 */
 	public static void init(){
 		CLASS_MAP.put(ThreadPoolService.class, 	        Duang.duang(ThreadPoolService.class));
-		CLASS_MAP.put(WeixinService.class, 	            Duang.duang(WeixinService .class));
+
+		CLASS_MAP.put(DataService.class, 	            Duang.duang(DataService .class));
+
 	}
 	
 	@SuppressWarnings("unchecked")

+ 0 - 1
DataFusion/src/com/zskk/service/ThreadPoolService.java

@@ -6,7 +6,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
-//import com.pacs.tools.LogUtil;
 
 /**
  * 线程池服务

+ 0 - 70
DataFusion/src/com/zskk/service/WeixinService.java

@@ -1,70 +0,0 @@
-package com.zskk.service;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-
-
-public class WeixinService {
-	static {
-//		PropKit.use("config.txt");
-//		ServiceFactory.init();
-//		DruidPlugin plugin = new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"), PropKit.get("password").trim());
-//		ActiveRecordPlugin arp = new ActiveRecordPlugin(plugin); 		
-//		_MappingKit.mapping(arp);
-//		plugin.start();
-//		arp.start();
-
-	}
-	private static final PoolingHttpClientConnectionManager POOL_CM = new PoolingHttpClientConnectionManager();
-
-	private static final String CAHR_CODE = "UTF-8";
-
-	// 获取访问TOKEN
-	private static final String WEIXIN_QRCODE = "http://wechat.pacsonline.cn/wx_patient/api/unifyGetWxQrcode?reportId=%s";
-
-	/*
-	 * 获取用户信息
-	 */
-	public String requestWeixinQrcode(String reportid) {
-		String url = String.format(WEIXIN_QRCODE, reportid);
-		String content = doGet(url);
-		return content;
-	}
-	
-	private String doGet(String url) {
-		StringBuilder apiLog = new StringBuilder();
-		apiLog.append(url).append("\t").append("params:").append("");
-		CloseableHttpClient client = HttpClients.custom().setConnectionManager(POOL_CM).build();
-		String content = null; // 返回内容
-		try {
-			HttpGet get = new HttpGet(url);
-
-			CloseableHttpResponse response = null;
-			try {
-				response = client.execute(get);
-				int code = response.getStatusLine().getStatusCode();
-				if (code == 200) {
-					content = IOUtils.toString(response.getEntity().getContent(), CAHR_CODE);
-				} else {
-					content = "{\"40013\":" + code + "}";
-				}
-			} finally {
-				if (response != null) {
-					response.close();
-				}
-			}
-		} catch (Exception e) {
-//			LogUtil.netEaseError(e.getMessage(), e);
-			content = "{\"40013\":1000}";
-		}
-		// 记录日志
-		apiLog.append("\t").append("result:").append(content);
-//		LogUtil.netEaseDebug(apiLog.toString());
-		return content;
-	}
-
-}

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

@@ -3,77 +3,83 @@ package com.zskk.task;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.util.List;
-import java.util.UUID;
+import java.util.HashMap;
+import java.util.Map;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.jfinal.plugin.activerecord.Db;
 import com.jfinal.plugin.activerecord.Record;
 import com.jfinal.plugin.cron4j.ITask;
+import com.zskk.service.DataService;
 import com.zskk.service.ServiceFactory;
-import com.zskk.model.Doctors;
-import com.zskk.model.PatientInfos;
-import com.zskk.model.Report;
-import com.zskk.model.Studies;
-import com.zskk.service.WeixinService;
-import com.zskk.model.Exams;
-
+import com.zskk.service.ThreadPoolService;
 
 public class DataTask implements ITask {
 
 	@Override
 	public void run() {
 		// TODO Auto-generated method stub
-		try {
-			List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=44000003 order by createdAt desc limit 50");
-			for (Exams exams2 : exams) {
-				try {
-				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
-				Record recordTemp = Db.use("connected").findFirst("select * from v_all_img_idx@PACSINTERFACE where F_STU_UID=?",studies.getStudyuid());
-				if (recordTemp == null) {
-					continue;
-				}
-				
-				Record record = Db.use("connected").findFirst("select * from yxjK where STUDYUID=?",recordTemp.getStr("F_STU_NO"));
 
-				
-				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(record.getStr("IMPRESSION"));
-				report.setDescription(record.getStr("DESCRIPTION"));
-				report.setExamId(exams2.getId());
-				report.setCreatedAt(new Date());
-				report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
-				report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
-				report.setReviewDatetime(parseStringToDate(record.getStr("REPORTDATE")));
-				report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
-				report.setConfirmDatetime(parseStringToDate(record.getStr("REPORTDATE")));
-				report.save();
-				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
-				patientInfos.setName(record.getStr("PATIENTNAME"));
-				patientInfos.setPhone(record.getStr("PHONE")==null?"":record.getStr("PHONE"));
-				patientInfos.setCardNum(record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
-				patientInfos.update();
-				exams2.setApplicationDepartment(record.getStr("DEPATMENT"));
-				exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
-				exams2.setExamStatus(9);
-				exams2.update();
-				WeixinService wService = new WeixinService();
-				wService.requestWeixinQrcode(report.getId());
-				} catch (Exception e) {
-					// TODO: handle exception
-					continue;
-				}
+		DataService dService = ServiceFactory.getService(DataService.class);
+        JSONArray jsonArray = dService.getExamList(50);	
+        for (Object object : jsonArray) {
+			JSONObject jsonObject = JSON.parseObject(object.toString());
+			Record recordTemp = Db.use("connected").findFirst("select * from v_all_img_idx@PACSINTERFACE where F_STU_UID=?",jsonObject.getString("studyuid"));
+			if (recordTemp == null) {
+				continue;
 			}
-		} catch (Exception e) {
-			// TODO: handle exception
-		}
-		
+			
+			Record record = Db.use("connected").findFirst("select * from yxjK where STUDYUID=?",recordTemp.getStr("F_STU_NO"));
+			if (record == null) {
+				continue;
+			}
+			if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
+				continue;
+			}
+			Map<String, String> params = new HashMap<>();
+			params.put("exam_id", jsonObject.getString("id"));
+			//报告医生姓名
+			params.put("report_doctor_name", record.getStr("REPORTDOCTOR"));
+			//报告时间
+			params.put("report_datetime", record.getStr("REPORTDATE"));
+			//审核医生姓名
+			params.put("review_doctor_name", record.getStr("REVIEWDOCTOR"));
+			//审核时间
+			params.put("review_datetime", record.getStr("REPORTDATE"));
+			//确认医生姓名
+			params.put("confirm_doctor_name", record.getStr("REVIEWDOCTOR"));
+			//确认时间
+			params.put("confirm_datetime", record.getStr("REPORTDATE"));
+			//意见建议
+			params.put("impression", record.getStr("IMPRESSION"));
+			//影像所见
+			params.put("description", record.getStr("DESCRIPTION"));
+			//exams表
+			//申请科室
+			params.put("application_department", record.getStr("DEPATMENT"));
+			//申请医生
+			params.put("application_doctor", record.getStr("CLINICALDOCTOR"));
+			//临床诊断
+			params.put("clin_diag", "");
+			//症状
+			params.put("clin_symp", "");
+			//patient_infos表
+			//患者姓名
+			params.put("name", record.getStr("PATIENTNAME"));
+			//患者手机号
+			params.put("phone", record.getStr("PHONE")==null?"":record.getStr("PHONE"));
+			//患者身份证号
+			params.put("card_num", record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
+			//检查结果1阴2阳
+			params.put("report_result", "0");
+			//门诊号住院号
+			params.put("hopitalized_no", "");
+			ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
+			tService.execute(() -> {
+				dService.saveReport(params);
+			});	
+        }
 	}
 
 
@@ -83,36 +89,29 @@ public class DataTask implements ITask {
 		
 	}
 	
-	private String creatId() {
-		UUID id=UUID.randomUUID();
-        String[] idd = id.toString().split("-");
-        return idd[0]+idd[1]+idd[2];
-	}
-	
-	private String getDoctorIdByName(String name) {
-		if (name == null) {
-			return null;
-		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=44000003 and realname<>''",name);
-		if (doctors == null) {
-			return null;
-		}
-		return doctors.getId();
-	}
-	
-	private Date parseStringToDate(String dateStr) {
+	/**
+	 * 日期字符串格式转换
+	 * @param dateStr
+	 * @return
+	 */
+	private String parseStringToDate(String dateStr) {
 		if (dateStr == null) {
-			return new Date();
+			return "";
 		}
-		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat sdf= new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
 	    Date date = null;
+	    String timeString = null;
 		try {
 			date = sdf.parse(dateStr);
+			SimpleDateFormat sdf2= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+			timeString = sdf2.format(date);
 		} catch (ParseException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-        return date;
+
+        return timeString;
 	}
-	
+
 }

+ 0 - 13
DataFusion/src/com/zskk/tools/JettyServer.java

@@ -1,13 +0,0 @@
-package com.zskk.tools;
-
-
-import com.jfinal.core.JFinal;
-
-
-public class JettyServer {
-
-	public static void main(String[] args) {
-		JFinal.start("WebRoot", 10000, "/", 5);
-	}
-
-}

+ 0 - 58
DataFusion/src/com/zskk/tools/_JFinalDemoGenerator.java

@@ -1,58 +0,0 @@
-package com.zskk.tools;
-
-import javax.sql.DataSource;
-import com.jfinal.kit.PathKit;
-import com.jfinal.kit.PropKit;
-import com.jfinal.plugin.activerecord.generator.Generator;
-import com.jfinal.plugin.druid.DruidPlugin;
-import com.zskk.config.ZskkConfig;
-
-/**
- * 本 demo 仅表达最为粗浅的 jfinal 用法,更为有价值的实用的企业级用法
- * 详见 JFinal 俱乐部: http://jfinal.com/club
- * 
- * 在数据库表有任何变动时,运行一下 main 方法,极速响应变化进行代码重构
- */
-public class _JFinalDemoGenerator {
-	
-	public static DataSource getDataSource() {
-		PropKit.use("config.properties");
-		DruidPlugin druidPlugin = ZskkConfig.createZskkDruidPlugin();
-		druidPlugin.start();
-		return druidPlugin.getDataSource();
-	}
-	
-	public static void main(String[] args) {
-		
-		// base model 所使用的包名
-		String baseModelPackageName = "com.zskk.model.base";
-		// base model 文件保存路径
-		String baseModelOutputDir = PathKit.getWebRootPath() + "/../src/com/zskk/model/base";
-		
-		// model 所使用的包名 (MappingKit 默认使用的包名)
-		String modelPackageName = "com.zskk.model";
-		// model 文件保存路径 (MappingKit 与 DataDictionary 文件默认保存路径)
-		String modelOutputDir = baseModelOutputDir + "/..";
-		
-		// 创建生成器
-		Generator generator = new Generator(getDataSource(), baseModelPackageName, baseModelOutputDir, modelPackageName, modelOutputDir);
-		// 设置是否生成链式 setter 方法
-		generator.setGenerateChainSetter(false);
-		// 添加不需要生成的表名
-		generator.addExcludedTable("bodypart","constant","department","device","doctor_class","dr_cla_permission","exam_class","exam_project","exam_subclass","institution","manager","menu","messages","operating","remote_application","report_record","series","sys_logs","sys_menus","templates","bbs","images","open_application","oss_callbacks","user","user_bind","version","wechat_bind","every_studies","remote_contact","remote_cost","remote_order","remote_water","send_message","wechat_pay_log","default_cost","remote_water_log","wechat_refund_log");
-		// 设置是否在 Model 中生成 dao 对象
-		generator.setGenerateDaoInModel(true);
-		// 设置是否生成链式 setter 方法
-		generator.setGenerateChainSetter(true);
-		// 设置是否生成字典文件
-		generator.setGenerateDataDictionary(true);
-		// 设置需要被移除的表名前缀用于生成modelName。例如表名 "osc_user",移除前缀 "osc_"后生成的model名为 "User"而非 OscUser
-		generator.setRemovedTableNamePrefixes("t_");
-		// 生成
-		generator.generate();
-	}
-}
-
-
-
-