Commit 98bd711f00c30cad0e3abc145a943260754b0d13
1 parent
23552786e9
Exists in
master
and in
6 other branches
回院提醒失败bug修改
Showing 5 changed files with 34 additions and 38 deletions
- platform-common/src/main/java/com/lyms/platform/common/datasource/aop/DynamicDataSourceAspect.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
- platform-operate-api/src/main/resources/log4j_config.xml
platform-common/src/main/java/com/lyms/platform/common/datasource/aop/DynamicDataSourceAspect.java
View file @
98bd711
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
98bd711
1 | 1 | package com.lyms.platform.operate.web; |
2 | 2 | |
3 | -import com.lyms.platform.common.utils.DateUtil; | |
4 | 3 | import net.sourceforge.pinyin4j.PinyinHelper; |
5 | 4 | import org.apache.log4j.Logger; |
5 | +import org.springframework.util.StopWatch; | |
6 | 6 | |
7 | 7 | import java.util.*; |
8 | 8 | |
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | private static org.apache.log4j.Logger log = Logger.getLogger("HTTP-INVOKE"); |
15 | 15 | |
16 | 16 | public static void main(String[] args) throws Exception{ |
17 | + StopWatch stopWatch = new StopWatch("time"); | |
17 | 18 | String[] arr={ "王二六","张三", "李四", "王五","赵六", "JAVA", "123","怡情"}; |
18 | 19 | List<String> names = new ArrayList<>(); |
19 | 20 | names.add("张明"); |
20 | 21 | |
21 | 22 | |
22 | 23 | |
... | ... | @@ -26,14 +27,18 @@ |
26 | 27 | names.add("阿明"); |
27 | 28 | names.add("落叶"); |
28 | 29 | names.add("王平"); |
30 | + stopWatch.start("action start"); | |
29 | 31 | Arrays.sort(arr,new ComparatorPinYin()); |
30 | 32 | for (String string : arr) { |
31 | - // System.out.println(string); | |
33 | + System.out.println(string); | |
32 | 34 | } |
35 | + Thread.sleep(1000); | |
33 | 36 | Collections.sort(names,new ComparatorPinYin()); |
34 | 37 | for (String string : names) { |
35 | 38 | System.out.println(string); |
36 | 39 | } |
40 | + stopWatch.stop(); | |
41 | + System.out.println(stopWatch.toString()); | |
37 | 42 | } |
38 | 43 | /** |
39 | 44 | * 功能:实现汉语拼音序比较 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java
View file @
98bd711
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | 3 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
4 | +import com.lyms.platform.common.enums.PatientSerEnums; | |
4 | 5 | import com.lyms.platform.common.result.BaseResponse; |
5 | 6 | import com.lyms.platform.common.utils.StringUtils; |
6 | 7 | import com.lyms.platform.permission.model.PatientService; |
... | ... | @@ -59,8 +60,15 @@ |
59 | 60 | patientServiceService.updatePatientService(ps); |
60 | 61 | } else {//新增 |
61 | 62 | patientService.setId(UUID.randomUUID().toString().replace("-", "")); |
62 | - //默认待领取 | |
63 | - patientService.setStatus(1); | |
63 | + int serType = patientService.getSerType(); | |
64 | + // 1高危精准指导、5-专家咨询默认已经领取 | |
65 | + if(serType == PatientSerEnums.SerTypeEnums.gwjzzd.getId()||serType == PatientSerEnums.SerTypeEnums.zjzx.getId()){ | |
66 | + //默认已领取 | |
67 | + patientService.setStatus(2); | |
68 | + }else{ | |
69 | + //默认待领取 | |
70 | + patientService.setStatus(1); | |
71 | + } | |
64 | 72 | patientServiceService.addPatientService(patientService); |
65 | 73 | } |
66 | 74 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
View file @
98bd711
1 | 1 | package com.lyms.platform.operate.web.worker; |
2 | 2 | |
3 | -import com.lyms.platform.biz.service.*; | |
3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
4 | +import com.lyms.platform.biz.service.MatDeliverService; | |
5 | +import com.lyms.platform.biz.service.PatientsService; | |
6 | +import com.lyms.platform.biz.service.PostReviewService; | |
4 | 7 | import com.lyms.platform.common.enums.ServiceStatusEnums; |
5 | 8 | import com.lyms.platform.common.enums.ServiceTypeEnums; |
6 | 9 | import com.lyms.platform.common.enums.TaiShuEnums; |
7 | 10 | import com.lyms.platform.common.enums.YnEnums; |
8 | 11 | import com.lyms.platform.common.utils.DateUtil; |
9 | 12 | import com.lyms.platform.operate.web.facade.PatientFacade; |
10 | -import com.lyms.platform.operate.web.facade.SmsConfigFacade; | |
11 | 13 | import com.lyms.platform.operate.web.result.QuanChanResult; |
12 | 14 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
13 | 15 | import com.lyms.platform.permission.model.Users; |
... | ... | @@ -25,7 +27,6 @@ |
25 | 27 | import org.apache.commons.lang.math.NumberUtils; |
26 | 28 | import org.slf4j.Logger; |
27 | 29 | import org.slf4j.LoggerFactory; |
28 | -import org.springframework.beans.factory.annotation.Autowired; | |
29 | 30 | import org.springframework.data.domain.Sort; |
30 | 31 | import org.springframework.util.StopWatch; |
31 | 32 | |
32 | 33 | |
33 | 34 | |
... | ... | @@ -57,15 +58,15 @@ |
57 | 58 | String hospital, |
58 | 59 | UsersService usersService, |
59 | 60 | PostReviewService postReviewService, |
60 | - MatDeliverService matDeliverService,PatientsService patientsService,OrganizationService organizationService,BasicConfigService basicConfigService) { | |
61 | + MatDeliverService matDeliverService, PatientsService patientsService, OrganizationService organizationService, BasicConfigService basicConfigService) { | |
61 | 62 | this.patientses = patientses; |
62 | 63 | this.matDeliverService = matDeliverService; |
63 | 64 | this.postReviewService = postReviewService; |
64 | - this.patientsService=patientsService; | |
65 | + this.patientsService = patientsService; | |
65 | 66 | this.hospital = hospital; |
66 | 67 | this.usersService = usersService; |
67 | - this.organizationService=organizationService; | |
68 | - this.basicConfigService=basicConfigService; | |
68 | + this.organizationService = organizationService; | |
69 | + this.basicConfigService = basicConfigService; | |
69 | 70 | } |
70 | 71 | |
71 | 72 | |
72 | 73 | |
... | ... | @@ -122,12 +123,12 @@ |
122 | 123 | //增加查询本次产程条数 |
123 | 124 | postReviewQuery.setStart(patients.getFmDate()); |
124 | 125 | |
125 | - PatientsQuery patientsQuery=new PatientsQuery(); | |
126 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
126 | 127 | patientsQuery.setYn(YnEnums.YES.getId()); |
127 | 128 | patientsQuery.setPid(patients.getPid()); |
128 | 129 | patientsQuery.setLastMensesStart(patients.getFmDate()); |
129 | - List<Patients> patientses =patientsService.queryPatient(patientsQuery); | |
130 | - if(CollectionUtils.isNotEmpty(patientses)){ | |
130 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
131 | + if (CollectionUtils.isNotEmpty(patientses)) { | |
131 | 132 | postReviewQuery.setEnd(patientses.get(0).getLastMenses()); |
132 | 133 | } |
133 | 134 | |
134 | 135 | |
... | ... | @@ -137,13 +138,12 @@ |
137 | 138 | Users users = usersService.getUsers(NumberUtils.toInt(withList.get(0).getProdDoctor())); |
138 | 139 | if (null != users) { |
139 | 140 | chanResult.setCheckDoctor(users.getName()); |
140 | - }else{ | |
141 | + } else { | |
141 | 142 | chanResult.setCheckDoctor(withList.get(0).getProdDoctor()); |
142 | 143 | } |
143 | 144 | } |
144 | 145 | String nextCheckTime = ""; |
145 | - if (CollectionUtils.isNotEmpty(withList)) | |
146 | - { | |
146 | + if (CollectionUtils.isNotEmpty(withList)) { | |
147 | 147 | chanResult.setcTimes(withList.size()); |
148 | 148 | if (null != withList.get(0).getNextCheckTime()) { |
149 | 149 | nextCheckTime = DateUtil.getyyyy_MM_dd(withList.get(0).getNextCheckTime()); |
150 | 150 | |
... | ... | @@ -153,9 +153,9 @@ |
153 | 153 | withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
154 | 154 | if (CollectionUtils.isNotEmpty(withList)) { |
155 | 155 | //本院产后复查次数不为空 |
156 | - if(null!=patients.getPostViewTimes()){ | |
156 | + if (null != patients.getPostViewTimes()) { | |
157 | 157 | chanResult.setcHTimes(patients.getPostViewTimes()); |
158 | - }else{ | |
158 | + } else { | |
159 | 159 | chanResult.setcHTimes(withList.size()); |
160 | 160 | } |
161 | 161 | } |
platform-operate-api/src/main/resources/log4j_config.xml
View file @
98bd711
... | ... | @@ -95,25 +95,7 @@ |
95 | 95 | <appender-ref ref="SYNC_DATA"/> |
96 | 96 | </appender> |
97 | 97 | |
98 | - <!-- 下面是打印mybatis语句的配置--> | |
99 | - <logger name="com.mybatis" additivity="true"> | |
100 | - <level value="DEBUG" /> | |
101 | - </logger> | |
102 | - <logger name="java.sql.Connection" additivity="true"> | |
103 | - <level value="DEBUG" /> | |
104 | - </logger> | |
105 | - <logger name="java.sql.Statement" additivity="true"> | |
106 | - <level value="DEBUG" /> | |
107 | - </logger> | |
108 | - <logger name="java.sql.PreparedStatement" additivity="true"> | |
109 | - <level value="DEBUG" /> | |
110 | - </logger> | |
111 | - <logger name="java.sql.ResultSet" additivity="true"> | |
112 | - <level value="DEBUG" /> | |
113 | - </logger> | |
114 | - <!-- 打印mybatis语句的配置结束--> | |
115 | 98 | |
116 | - | |
117 | 99 | <logger name="SYNC_DATA" additivity="false"> |
118 | 100 | <level value="info" /> |
119 | 101 | <appender-ref ref="ASYNC_SYNC_DATA" /> |
... | ... | @@ -140,7 +122,7 @@ |
140 | 122 | |
141 | 123 | <!-- Root Logger --> |
142 | 124 | <root> |
143 | - <priority value="debug" /> | |
125 | + <priority value="INFO" /> | |
144 | 126 | <appender-ref ref="STDOUT" /> |
145 | 127 | <appender-ref ref="Error" /> |
146 | 128 | </root> |