Commit dcdafd62f5a7adf904f6ddf3b1e52bda307ee3c4
1 parent
35b9a87d84
Exists in
master
and in
6 other branches
问卷调查
Showing 1 changed file with 26 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/QuestionFacade.java
View file @
dcdafd6
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | 3 | |
4 | +import com.lyms.platform.biz.service.AntenatalExaminationService; | |
4 | 5 | import com.lyms.platform.biz.service.BasicConfigService; |
5 | 6 | import com.lyms.platform.biz.service.PatientsService; |
6 | 7 | import com.lyms.platform.biz.service.QuestionService; |
7 | 8 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
8 | 9 | import com.lyms.platform.common.enums.QuestionEnums; |
10 | +import com.lyms.platform.common.enums.YnEnums; | |
9 | 11 | import com.lyms.platform.common.result.BaseObjectResponse; |
10 | 12 | import com.lyms.platform.common.result.BaseResponse; |
11 | 13 | |
12 | 14 | |
... | ... | @@ -14,9 +16,11 @@ |
14 | 16 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
15 | 17 | import com.lyms.platform.permission.service.OrganizationService; |
16 | 18 | import com.lyms.platform.permission.service.UsersService; |
19 | +import com.lyms.platform.pojo.AntExChuModel; | |
17 | 20 | import com.lyms.platform.pojo.Patients; |
18 | 21 | import com.lyms.platform.pojo.QuestionModel; |
19 | 22 | |
23 | +import com.lyms.platform.query.AntExChuQuery; | |
20 | 24 | import com.lyms.platform.query.QuestionQuery; |
21 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
22 | 26 | import org.springframework.stereotype.Component; |
23 | 27 | |
... | ... | @@ -37,10 +41,14 @@ |
37 | 41 | |
38 | 42 | @Autowired |
39 | 43 | private PatientsService patientsService; |
44 | + | |
40 | 45 | @Autowired |
41 | 46 | private OrganizationService organizationService; |
42 | 47 | |
43 | 48 | @Autowired |
49 | + private AntenatalExaminationService antenatalExaminationService; | |
50 | + | |
51 | + @Autowired | |
44 | 52 | private UsersService usersService; |
45 | 53 | |
46 | 54 | @Autowired |
47 | 55 | |
48 | 56 | |
49 | 57 | |
... | ... | @@ -91,15 +99,31 @@ |
91 | 99 | |
92 | 100 | data.put("questions",questionModel.getQuestions()); |
93 | 101 | data.put("trouble",questionModel.getTrouble()); |
94 | - data.put("score",questionModel.getScore()); | |
102 | + data.put("score", questionModel.getScore()); | |
95 | 103 | |
104 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
105 | + antExChuQuery.setPid(patients.getPid()); | |
106 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
107 | + String yunChi = ""; | |
108 | + String chanChi = ""; | |
109 | + List<AntExChuModel> chuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
110 | + if (CollectionUtils.isNotEmpty(chuModelList)) | |
111 | + { | |
112 | + AntExChuModel chuModel = chuModelList.get(0); | |
113 | + yunChi = chuModel.getPregnancyTimes() == null ? "" : chuModel.getPregnancyTimes()+""; | |
114 | + chanChi = chuModel.getProdTime() == null ? "" : chuModel.getProdTime()+""; | |
115 | + } | |
96 | 116 | |
117 | + data.put("yunChi",yunChi); | |
118 | + data.put("chanChi",chanChi); | |
119 | + | |
120 | + | |
97 | 121 | data.put("investDate",DateUtil.getyyyy_MM_dd1(questionModel.getInvestDate())); |
98 | 122 | data.put("investigator", CommonsHelper.getUserName(questionModel.getInvestigator(), usersService)); |
99 | 123 | data.put("hospital", CommonsHelper.getHospitalName(questionModel.getInvestHospitalId(), organizationService)); |
100 | 124 | |
101 | 125 | |
102 | - data.put("content",QuestionEnums.getContentByScore(questionModel.getScore())); | |
126 | + data.put("content", QuestionEnums.getContentByScore(questionModel.getScore())); | |
103 | 127 | String diary = ""; |
104 | 128 | if (questionModel.getScore() != null && questionModel.getScore() > 10) |
105 | 129 | { |