Commit 6293fc37539d5e7939f4926d69fe08976d5484df
1 parent
7781b19b2d
Exists in
master
and in
8 other branches
修改新电子病历
Showing 5 changed files with 34 additions and 11 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.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/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/session/strategy/LocalCacheSessionStrategy.java
- platform-resource/resources/config-dev.properties
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
6293fc3
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | SieveQuery sieveQuery = new SieveQuery(); |
166 | 166 | sieveQuery.setYn(YnEnums.YES.getId()); |
167 | 167 | Date endDate = DateUtil.addDay(new Date(), -146); |
168 | - sieveQuery.setLastMensesStart(endDate); | |
168 | + sieveQuery.setLastMensesEnd(endDate); | |
169 | 169 | List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); |
170 | 170 | if (CollectionUtils.isNotEmpty(list)) { |
171 | 171 | for (SieveModel sieveModel : list) { |
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | PatientsQuery patientsQuery = new PatientsQuery(); |
190 | 190 | patientsQuery.setYn(YnEnums.YES.getId()); |
191 | 191 | patientsQuery.setType(1); |
192 | - patientsQuery.setLastMensesStart(endDate); | |
192 | + patientsQuery.setLastMensesEnd(endDate); | |
193 | 193 | List<Patients> patientses = queryPatient(patientsQuery); |
194 | 194 | for (Patients patients : patientses) { |
195 | 195 | patients.setType(3); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
6293fc3
1 | 1 | package com.lyms.platform.operate.web; |
2 | 2 | |
3 | +import com.lyms.platform.common.utils.DateUtil; | |
4 | +import com.lyms.platform.common.utils.JsonUtil; | |
3 | 5 | import com.lyms.platform.permission.model.Users; |
4 | 6 | import com.lyms.platform.permission.service.UsersService; |
7 | +import com.lyms.platform.pojo.Patients; | |
5 | 8 | import org.springframework.context.ApplicationContext; |
6 | 9 | import org.springframework.context.support.ClassPathXmlApplicationContext; |
7 | 10 | |
11 | +import java.util.Calendar; | |
12 | +import java.util.Date; | |
13 | + | |
8 | 14 | /** |
9 | 15 | * Created by Administrator on 2016/8/22 0022. |
10 | 16 | */ |
11 | 17 | public class Test{ |
12 | 18 | |
13 | 19 | public static void main(String[] args){ |
14 | - ApplicationContext applicationContext=new ClassPathXmlApplicationContext("spring/applicationContext-dal.xml"); | |
15 | - UsersService usersMapper= applicationContext.getBean(UsersService.class); | |
16 | - Users users=new Users(); | |
17 | - users.setName("测试双master"); | |
18 | - usersMapper.addUsers(users); | |
20 | + Patients patients=new Patients(); | |
21 | + patients.setId("1111"); | |
22 | + patients.setBirth(DateUtil.parseYMD("2016-4-12")); | |
23 | + String s= JsonUtil.obj2Str(patients); | |
24 | + System.out.println(s); | |
25 | + | |
26 | + System.out.println(DateUtil.getymdhm(JsonUtil.jkstr2Obj(s, Patients.class).getBirth())); | |
27 | + | |
19 | 28 | } |
20 | 29 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
6293fc3
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | import com.lyms.platform.common.utils.Assert; |
10 | 10 | import com.lyms.platform.common.utils.DateUtil; |
11 | 11 | import com.lyms.platform.common.utils.ExcelUtil; |
12 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
12 | 13 | import com.lyms.platform.operate.web.request.*; |
13 | 14 | import com.lyms.platform.operate.web.result.*; |
14 | 15 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
... | ... | @@ -527,7 +528,7 @@ |
527 | 528 | antExQuery.setPid(patients.getPid()); |
528 | 529 | antExQuery.setYn(YnEnums.YES.getId()); |
529 | 530 | antExQuery.setHospitalId(null); |
530 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), true); | |
531 | + | |
531 | 532 | //复诊次数 |
532 | 533 | int i = antExService.queryAntenatalExaminationCount(antExQuery.convertToQuery()); |
533 | 534 | antExChuQuery.setPid(patients.getPid()); |
... | ... | @@ -575,6 +576,7 @@ |
575 | 576 | riskPatientsResult.setServiceType(ServiceTypeEnums.getTitleById(patients.getServiceType())); |
576 | 577 | riskPatientsResult.setServiceStatus(ServiceStatusEnums.getNameById(patients.getServiceStatus())); |
577 | 578 | riskPatientsResult.setcTime(nextCheckTime); |
579 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), true); | |
578 | 580 | riskPatientsResult.setrFactor(highScoreResult.gethighRiskStr()); |
579 | 581 | riskPatientsResult.setrLevel(highScoreResult.filter(highScoreResult.getLevel())); |
580 | 582 | riskPatientsResult.sethScore(highScoreResult.getScore()); |
... | ... | @@ -751,8 +753,8 @@ |
751 | 753 | |
752 | 754 | OutputStream out = response.getOutputStream(); |
753 | 755 | ExcelUtil.toExcel(out, datas, cnames); |
754 | - } catch (IOException e) { | |
755 | - e.printStackTrace(); | |
756 | + } catch (Exception e) { | |
757 | + ExceptionUtils.catchException(e,e.getMessage()); | |
756 | 758 | } |
757 | 759 | } |
758 | 760 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/session/strategy/LocalCacheSessionStrategy.java
View file @
6293fc3
... | ... | @@ -92,7 +92,9 @@ |
92 | 92 | } |
93 | 93 | return loginContext; |
94 | 94 | } |
95 | - | |
95 | + public static void main(String[] args){ | |
96 | + System.out.print(MD5Utils.md5("123456").toUpperCase()); | |
97 | + } | |
96 | 98 | @Override |
97 | 99 | public LoginContext register(String userId, String phone, String account, String pwd) { |
98 | 100 | LoginContext loginContext = new LoginContext(); |
platform-resource/resources/config-dev.properties
View file @
6293fc3
... | ... | @@ -22,6 +22,16 @@ |
22 | 22 | mysql.maxpoolsize=5 |
23 | 23 | mysql.initialpoolsize=2 |
24 | 24 | mysql.minpoolsize=2 |
25 | + | |
26 | + | |
27 | + | |
28 | + | |
29 | +mysql.master.db.name=platform | |
30 | +mysql.master.db.password=platform123 | |
31 | +mysql.master.driver=com.mysql.jdbc.Driver | |
32 | +mysql.master.jdbcurl=jdbc:mysql://192.168.5.250:3306/platform?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 | |
33 | + | |
34 | + | |
25 | 35 | redis.servers=localhost:6379 |
26 | 36 | |
27 | 37 |