Commit 5225644ed21f953109ca811230dfcb97db204240
1 parent
8939072c16
Exists in
master
and in
6 other branches
乐陵住院添加查询号
Showing 4 changed files with 39 additions and 15 deletions
- platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/ConnTools.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientMarkRequest.java
- platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml
platform-operate-api/src/main/java/com/lyms/hospitalapi/llfy/ConnTools.java
View file @
5225644
... | ... | @@ -11,9 +11,12 @@ |
11 | 11 | */ |
12 | 12 | public class ConnTools { |
13 | 13 | private static String hisDirverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; |
14 | - private static String hisUrl = "jdbc:sqlserver://192.168.25.10; DatabaseName=his08"; | |
15 | - private static String hisUser = "ms"; | |
16 | - private static String hisPassword = "llfyhis123."; | |
14 | + // private static String hisUrl = "jdbc:sqlserver://192.168.25.10; DatabaseName=xlhhis"; | |
15 | + // private static String hisUser = "ms"; | |
16 | + // private static String hisPassword = "llfyhis123."; | |
17 | + private static String hisUrl = "jdbc:sqlserver://192.168.5.133; DatabaseName=xlhhis"; | |
18 | + private static String hisUser = "sa"; | |
19 | + private static String hisPassword = "123.com"; | |
17 | 20 | |
18 | 21 | public static Connection makeHisConnection() { |
19 | 22 | Connection conn = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java
View file @
5225644
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | import com.lyms.platform.query.PatientsQuery; |
20 | 20 | import org.apache.commons.collections.CollectionUtils; |
21 | 21 | import org.apache.commons.collections.map.HashedMap; |
22 | +import org.apache.commons.lang.StringUtils; | |
22 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 24 | import org.springframework.stereotype.Component; |
24 | 25 | |
25 | 26 | |
... | ... | @@ -399,13 +400,14 @@ |
399 | 400 | |
400 | 401 | public List<Patients> setPatientIds(PatientMarkRequest patientMarkRequest, PatientsQuery patientsQuery, String hospitalId) { |
401 | 402 | //根据查询号、当前孕周进行查询 |
402 | - if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()) { | |
403 | + if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()|| StringUtils.isNotEmpty(patientMarkRequest.getQueryNo())) { | |
403 | 404 | if (null != patientMarkRequest.getcDueWeekStart()) { |
404 | 405 | patientsQuery.setLastMensesEnd(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(patientMarkRequest.getcDueWeekStart() * 7))); |
405 | 406 | } |
406 | 407 | if (null != patientMarkRequest.getcDueWeekEnd()) { |
407 | 408 | patientsQuery.setLastMensesStart(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(patientMarkRequest.getcDueWeekEnd() * 7) - 6)); |
408 | 409 | } |
410 | + patientsQuery.setQueryNo(StringUtils.isEmpty(patientMarkRequest.getQueryNo()) ? null : patientMarkRequest.getQueryNo()); | |
409 | 411 | patientsQuery.setHospitalId(hospitalId); |
410 | 412 | return patientsService.queryPatient1(patientsQuery, "modpatientsQueryified"); |
411 | 413 | } else { |
... | ... | @@ -676,8 +678,8 @@ |
676 | 678 | parentIds.add(pa.getId()); |
677 | 679 | } |
678 | 680 | patientMarkHospQuery.setPatientIds((String[]) parentIds.toArray(new String[parentIds.size()])); |
679 | - } else if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()) { | |
680 | - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
681 | + } else if (null != patientMarkRequest.getcDueWeekStart() || null != patientMarkRequest.getcDueWeekEnd()||StringUtils.isNotEmpty(patientMarkRequest.getQueryNo())) { | |
682 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(new ArrayList()); | |
681 | 683 | } |
682 | 684 | |
683 | 685 | if (patientMarkRequest.getType() == 2) {//2-回院提醒 |
... | ... | @@ -729,7 +731,7 @@ |
729 | 731 | patientMarkHospQuery.setSort("hospit_date"); |
730 | 732 | patientMarkHospQuery.setNeed("y"); |
731 | 733 | patientMarkHospQuery.setOffset(offset); |
732 | - patientMarkHospQuery.setLimit(100); | |
734 | + patientMarkHospQuery.setLimit(2); | |
733 | 735 | patientMarkHospQuery.setPage(page); |
734 | 736 | |
735 | 737 | List<PatientMarkHospital> patientMarkHospitals = patientMarkHospitalService.queryPatientMarkHospital(patientMarkHospQuery); |
... | ... | @@ -739,8 +741,8 @@ |
739 | 741 | } |
740 | 742 | synUpdateHisData(ps); |
741 | 743 | } |
742 | - if (patientMarkHospQuery.getCount() > page * 100) { | |
743 | - synLlHisData((page + 1) * 100, page + 1); | |
744 | + if (patientMarkHospQuery.getCount() > page * 2) { | |
745 | + synLlHisData((page + 1) * 2, page + 1); | |
744 | 746 | } |
745 | 747 | } |
746 | 748 | |
... | ... | @@ -758,11 +760,9 @@ |
758 | 760 | String inHospDiagn = map.get("inHospDiagn"); |
759 | 761 | int hospType = getHospitType(inHospDiagn); |
760 | 762 | ps.setHospitStatus(2); |
761 | - if (ps.getHospitStatus() == null) { | |
762 | - ps.setHospitType(hospType); | |
763 | - } else if (hospType == 1) {//当住院方式为分娩方式时 | |
764 | - ps.setHospitType(hospType); | |
765 | - } | |
763 | + ps.setHospitType(hospType); | |
764 | + String inHospDate = map.get("inHospDate"); | |
765 | + ps.setHospitDate(DateUtil.parseYMDHMS(inHospDate)); | |
766 | 766 | } |
767 | 767 | patientMarkHospitalService.updatePatientMarkHospital(ps); |
768 | 768 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientMarkRequest.java
View file @
5225644
... | ... | @@ -41,6 +41,18 @@ |
41 | 41 | * 预约记录创建结束时间 |
42 | 42 | */ |
43 | 43 | private Date makeEndDate; |
44 | + /** | |
45 | + * 查询号 | |
46 | + */ | |
47 | + private String queryNo; | |
48 | + | |
49 | + public String getQueryNo() { | |
50 | + return queryNo; | |
51 | + } | |
52 | + | |
53 | + public void setQueryNo(String queryNo) { | |
54 | + this.queryNo = queryNo; | |
55 | + } | |
44 | 56 | |
45 | 57 | public Integer getType() { |
46 | 58 | return type; |
platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml
View file @
5225644
... | ... | @@ -180,7 +180,15 @@ |
180 | 180 | <property name="cronExpression" value="0 0 0/1 * * ?"></property> |
181 | 181 | </bean> |
182 | 182 | |
183 | + <!-- 配置项目启动后任务就执行一次 --> | |
184 | + <bean id="rsh_simpleTrigger1" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"> | |
185 | + <property name="jobDetail" ref="synLlHisData" /> | |
186 | + <property name="startDelay" value="500" /> | |
187 | + <property name="repeatInterval" value="0" /> | |
188 | + <property name="repeatCount" value="0" /> | |
189 | + </bean> | |
183 | 190 | |
191 | + | |
184 | 192 | <!-- 总调度,用于启动定时器 --> |
185 | 193 | <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> |
186 | 194 | <property name="triggers" > |
... | ... | @@ -191,7 +199,8 @@ |
191 | 199 | <ref bean="correctSieveOrderTrigger"/> |
192 | 200 | <ref bean="autoInsertIdTrigger"/> |
193 | 201 | <!--乐陵住院系统同步--> |
194 | - <!--<ref bean="synLlHisDataTrigger"/>--> | |
202 | + <ref bean="synLlHisDataTrigger"/> | |
203 | + <ref bean="rsh_simpleTrigger1" /> | |
195 | 204 | <!--<ref bean="qhdFmTrigger"/>--> |
196 | 205 | <!--<ref bean="dzfyFmTrigger"/>--> |
197 | 206 | <!--<ref bean="crisisTrigger"/>--> |