刘韬 5 lat temu
rodzic
commit
d10c375226

+ 3 - 0
.gitignore

@@ -7,6 +7,9 @@
 # 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*

+ 5 - 5
DataFusion/.classpath

@@ -2,11 +2,6 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="res"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
-		<attributes>
-			<attribute name="module" value="true"/>
-		</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"/>
@@ -34,5 +29,10 @@
 	<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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+		<attributes>
+			<attribute name="owner.project.facets" value="java"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
 </classpath>

+ 0 - 12
DataFusion/.settings/.jsdtscope

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebRoot"/>
-	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
-		<attributes>
-			<attribute name="hide" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
-	<classpathentry kind="output" path=""/>
-</classpath>

+ 0 - 8
DataFusion/.settings/org.eclipse.jdt.core.prefs

@@ -1,8 +0,0 @@
-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.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=10

+ 0 - 16
DataFusion/.settings/org.eclipse.wst.common.component

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
-        
-    <wb-module deploy-name="DataFusion">
-                
-        <wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>
-                
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/res"/>
-                
-        <property name="context-root" value="DataFusion"/>
-                
-        <property name="java-output-path" value="/DataFusion/WebRoot/WEB-INF/classes"/>
-            
-    </wb-module>
-    
-</project-modules>

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

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
-  <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"/>
-</faceted-project>

+ 0 - 1
DataFusion/.settings/org.eclipse.wst.jsdt.ui.superType.container

@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary

+ 0 - 1
DataFusion/.settings/org.eclipse.wst.jsdt.ui.superType.name

@@ -1 +0,0 @@
-Window

+ 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

+ 3 - 0
DataFusion/jfinal_demo.log

@@ -19,3 +19,6 @@
 
 2019-10-31 14:44:16
 [WARN]-[Thread: qtp697960108-18]-[com.jfinal.core.ActionHandler.handle()]: 404 Action Not Found: /view
+
+2019-11-14 12:21:37
+[WARN]-[Thread: qtp1948863195-22]-[com.jfinal.core.ActionHandler.handle()]: 404 Action Not Found: /

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

@@ -44,17 +44,17 @@ public class ZskkConfig extends JFinalConfig {
 	@Override
 	public void configPlugin(Plugins me) {
 		// 配置数据库连接池插件
-//		DruidPlugin druidPluginZskk = createZskkDruidPlugin();
-//		me.add(druidPluginZskk);
+		DruidPlugin druidPluginZskk = createZskkDruidPlugin();
+		me.add(druidPluginZskk);
 //
 ////		// 配置ActiveRecord插件
-//		ActiveRecordPlugin arpZskk = new ActiveRecordPlugin("zskk", druidPluginZskk);
-//		arpZskk.setDialect(new MysqlDialect());
+		ActiveRecordPlugin arpZskk = new ActiveRecordPlugin("zskk", druidPluginZskk);
+		arpZskk.setDialect(new MysqlDialect());
 //
 //
 //		 //所有映射在 MappingKit 中自动化搞定
-//		_MappingKit.mapping(arpZskk);
-//		me.add(arpZskk);
+		_MappingKit.mapping(arpZskk);
+		me.add(arpZskk);
 		// 配置数据库连接池插件
 //		DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
 //		me.add(druidPluginConnected);

+ 79 - 59
DataFusion/src/com/zskk/control/ViewController.java

@@ -5,6 +5,8 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.jfinal.core.Controller;
 import com.jfinal.kit.HttpKit;
 import com.jfinal.plugin.activerecord.Db;
@@ -15,7 +17,6 @@ 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;
 
 
 public class ViewController extends Controller {
@@ -53,72 +54,82 @@ public class ViewController extends Controller {
 	public void getReport() {
 
 		try {
-
+			
 			String readData = HttpKit.readData(getRequest());
-			XmlHelper xmlHelper = XmlHelper.of(readData);
-
-			String studyuid = xmlHelper.getString("//studyuid");
+			JSONObject jsonObject = JSON.parseObject(readData);
+			
+			String studyuid = jsonObject.getString("studyuid");
 
 			Studies studiesFind = Studies.dao.use("zskk").findFirst("SELECT * FROM studies WHERE studyuid=?", studyuid);
 			
 			if (studiesFind != null) {
-				
+				this.renderJson(Boolean.TRUE);
+				return;
 			}
+			String patientid = jsonObject.getString("patientid");
 			
-			PatientInfos patientInfos = new PatientInfos().use("zskk");
-			patientInfos.setId(creatId());
+			PatientInfos patientInfosFind = PatientInfos.dao.use("zskk").findFirst("SELECT * FROM patient_infos WHERE temp_patient_id=?", patientid);
 			
-			String patientname = xmlHelper.getString("//patientname");
 
-			patientInfos.setName(patientname);
-			
-			String patientsex = xmlHelper.getString("//patientsex");
+			String patientage = jsonObject.getString("patientage");
 
-			patientInfos.setSex(patientsex);
-			
-			String idcard = xmlHelper.getString("//idcard");
+			String idcard = jsonObject.getString("idcard");
 
-			patientInfos.setCardNum(idcard);
-			
-			String phone = xmlHelper.getString("//phone");
+			if (patientInfosFind == null) {
+				PatientInfos patientInfos = new PatientInfos().use("zskk");
 
-			patientInfos.setPhone(phone);
-			
-			String birthdate = xmlHelper.getString("//birthdate");
+				patientInfos.setId(creatId());
+				
+				String patientname = jsonObject.getString("patientname");
 
-			patientInfos.setBirthday(birthdate);
-			
-			String patientage = xmlHelper.getString("//patientage");
+				patientInfos.setName(patientname);
+				
+				String patientsex = jsonObject.getString("patientsex");
 
-			patientInfos.setAge(patientage);
-			
-			String patientid = xmlHelper.getString("//patientid");
+				patientInfos.setSex(patientsex);
+				
 
-			patientInfos.setAge(patientid);
-			
-			patientInfos.setStatus(1);
-			
-			patientInfos.setInstitutionId("15000004");
-			
-			patientInfos.setCreatedAt(new Date());
-			
-			patientInfos.setUpdatedAt(new Date());
-			
-			patientInfos.save();
+				patientInfos.setCardNum(idcard);
+				
+				String phone = jsonObject.getString("phone");
+
+				patientInfos.setPhone(phone);
+				
+				String birthdate = jsonObject.getString("birthdate");
+
+				patientInfos.setBirthday(birthdate);
+				
+
+				patientInfos.setAge(patientage);
+				
+				patientInfos.setTempPatientId(patientid);
+				
+				patientInfos.setStatus(1);
+				
+				patientInfos.setInstitutionId("15000004");
+				
+				patientInfos.setCreatedAt(new Date());
+				
+				patientInfos.setUpdatedAt(new Date());
+				
+				patientInfos.save();
+				
+				patientInfosFind = patientInfos;
+			}
 			
 			Studies studies = new Studies().use("zskk");
 			
 			studies.setId(creatId());
 			
-			studies.setStudyid(studyuid);
+			studies.setStudyuid(studyuid);
 			
-			studies.setPatientId(patientInfos.getId());
+			studies.setPatientId(patientInfosFind.getId());
 			
-			String accessionNumber = xmlHelper.getString("//accessionNumber");
+			String accessionNumber = jsonObject.getString("accnum");
 
 			studies.setAccessionNum(accessionNumber);
 			
-			String modality = xmlHelper.getString("//modality");
+			String modality = jsonObject.getString("modality");
 
 			studies.setModality(modality);
 
@@ -138,7 +149,7 @@ public class ViewController extends Controller {
 			
 			exams.setId(creatId());
 			
-			exams.setPatientId(patientInfos.getId());
+			exams.setPatientId(patientInfosFind.getId());
 			
 			exams.setPatientNum(idcard);
 			
@@ -158,14 +169,18 @@ public class ViewController extends Controller {
 			
 			exams.setUpdatedAt(new Date());
 			
-			String department = xmlHelper.getString("//department");
+			String department = jsonObject.getString("department");
 
 			exams.setApplicationDepartment(department);
 			
-			String clinicaldoctor = xmlHelper.getString("//clinicaldoctor");
+			String clinicaldoctor = jsonObject.getString("clinicaldoctor");
 
 			exams.setApplicationDoctor(clinicaldoctor);
 			
+			String operateuserid = jsonObject.getString("operateuserid");
+
+			exams.setRegister(operateuserid);
+			
 			exams.setExamStatus(9);
 			
 			exams.save();
@@ -174,17 +189,13 @@ public class ViewController extends Controller {
 			
 			report.setId(creatId());
 			
-			String reportdate = xmlHelper.getString("//reportdate");
+			String reportdate = jsonObject.getString("reportdate");
 
 			report.setReportDatetime(parseStringToDate(reportdate));
 			
-			String description = xmlHelper.getString("//description");
+			String description = jsonObject.getString("description");
 			
-			String impression = xmlHelper.getString("//impression");
-
-			if (impression == null && description == null) {
-				return;
-			}
+			String impression = jsonObject.getString("diagnosis");
 			
 			report.setImpression(impression);
 			
@@ -192,11 +203,11 @@ public class ViewController extends Controller {
 			report.setExamId(exams.getId());
 			report.setCreatedAt(new Date());
 			
-			String reportdoctor = xmlHelper.getString("//reportdoctor");
+			String reportdoctor = jsonObject.getString("reportdoctor");
 
 			report.setReportDoctorId(getDoctorIdByName(reportdoctor));
 			
-			String reviewdoctor = xmlHelper.getString("//reviewdoctor");
+			String reviewdoctor = jsonObject.getString("reviewdoctor");
 
 			report.setReviewDoctorId(getDoctorIdByName(reviewdoctor));
 			report.setReviewDatetime(parseStringToDate(reportdate));
@@ -206,7 +217,7 @@ public class ViewController extends Controller {
 
 			WeixinService wService = new WeixinService();
 			wService.requestWeixinQrcode(report.getId());
-			this.renderText(readData);
+			this.renderJson(Boolean.TRUE);
 
 		} catch (Exception e) {
 			// TODO Auto-generated catch block
@@ -224,21 +235,30 @@ public class ViewController extends Controller {
 
 	private String getDoctorIdByName(String name) {
 		if (name == null) {
-			return "1";
+			return null;
 		}
 		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=15000004 and realname<>''", name);
 		if (doctors == null) {
-			return "1";
+			Doctors newDoctors = new Doctors().use("zskk");
+			newDoctors.setId(creatId());
+			newDoctors.setUsername("none");
+			newDoctors.setRealname(name);
+			newDoctors.setPassword("123456");
+			newDoctors.setInstitutionId("15000004");
+			newDoctors.setCreatedAt(new Date());
+			newDoctors.setUpdatedAt(new Date());
+			newDoctors.save();
+			return newDoctors.getId();
 		}
 		return doctors.getId();
 	}
 
 
-	private static Date parseStringToDate(String dateStr) {
+	private Date parseStringToDate(String dateStr) {
 		if (dateStr == null) {
 			return new Date();
 		}
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
 		Date date = null;
 		try {
 			date = sdf.parse(dateStr);

+ 1 - 1
DataFusion/src/com/zskk/service/WeixinService.java

@@ -26,7 +26,7 @@ public class WeixinService {
 	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";
+	private static final String WEIXIN_QRCODE = "http://47.104.6.21:8080/wx_patient/api/unifyGetWxQrcode?reportId=%s";
 
 	/*
 	 * 获取用户信息

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

@@ -36,7 +36,8 @@ public class _JFinalDemoGenerator {
 		
 		// 创建生成器
 		Generator generator = new Generator(getDataSource(), baseModelPackageName, baseModelOutputDir, modelPackageName, modelOutputDir);
-		// 设置是否生成链式 setter 方法
+//		
+//		// 设置是否生成链式 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","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");