Commit 2b1e6c39364fc3aafaca899dbf1de4a175f61716
1 parent
36d124b92b
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 42 additions and 24 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
View file @
2b1e6c3
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.service.BabyBookbuildingService; |
4 | 4 | import com.lyms.platform.biz.service.SmsTemplateService; |
5 | +import com.lyms.platform.common.annotation.TokenRequired; | |
5 | 6 | import com.lyms.platform.common.base.BaseController; |
6 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 8 | import com.lyms.platform.common.enums.*; |
... | ... | @@ -57,6 +58,7 @@ |
57 | 58 | */ |
58 | 59 | @RequestMapping(method = RequestMethod.POST, value = "/addOrUpSmsConfig") |
59 | 60 | @ResponseBody |
61 | + @TokenRequired | |
60 | 62 | public BaseResponse addOrUpSmsConfig(@Valid @RequestBody SmsConfigRequest request) { |
61 | 63 | if (!StringUtils.isEmpty(request.getId())) |
62 | 64 | { |
... | ... | @@ -74,6 +76,7 @@ |
74 | 76 | */ |
75 | 77 | @RequestMapping(method = RequestMethod.PUT, value = "/updateDeptPrefix") |
76 | 78 | @ResponseBody |
79 | + @TokenRequired | |
77 | 80 | public BaseObjectResponse updateDeptPrefix(@RequestParam() String hid,@RequestParam()Integer deptId,@RequestParam() String deptPrefix) { |
78 | 81 | return smsConfigFacade.updateDeptPrefix(hid, deptId, deptPrefix); |
79 | 82 | } |
... | ... | @@ -88,6 +91,7 @@ |
88 | 91 | */ |
89 | 92 | @RequestMapping(method = RequestMethod.GET, value = "/queryDeptByHid/{hid}") |
90 | 93 | @ResponseBody |
94 | + @TokenRequired | |
91 | 95 | public BaseResponse queryDeptByHid(@PathVariable("hid") Integer hid) { |
92 | 96 | return smsConfigFacade.queryDeptByHid(hid); |
93 | 97 | } |
... | ... | @@ -99,6 +103,7 @@ |
99 | 103 | */ |
100 | 104 | @RequestMapping(method = RequestMethod.GET, value = "/querySmsConfigByHid/{hid}") |
101 | 105 | @ResponseBody |
106 | + @TokenRequired | |
102 | 107 | public BaseResponse querySmsConfigByHid(@PathVariable("hid") String hid) { |
103 | 108 | return smsConfigFacade.querySmsConfigByHid(hid); |
104 | 109 | } |
... | ... | @@ -110,6 +115,7 @@ |
110 | 115 | */ |
111 | 116 | @RequestMapping(method = RequestMethod.GET, value = "/getDeptPrefix/{hid}") |
112 | 117 | @ResponseBody |
118 | + @TokenRequired | |
113 | 119 | public BaseResponse getDeptPrefix(@PathVariable("hid") String hid) { |
114 | 120 | return smsConfigFacade.getDeptPrefix(hid); |
115 | 121 | } |
... | ... | @@ -120,6 +126,7 @@ |
120 | 126 | */ |
121 | 127 | @RequestMapping(value = "/getServiceTreeData", method = RequestMethod.GET) |
122 | 128 | @ResponseBody |
129 | + @TokenRequired | |
123 | 130 | public List<Map> getServiceTreeData() { |
124 | 131 | List<Map> list = SmsServiceEnums.getSmsServiceTree(-1); |
125 | 132 | return list; |
... | ... | @@ -132,6 +139,7 @@ |
132 | 139 | */ |
133 | 140 | @RequestMapping(value = "/queryHospitalConfig/{hid}", method = RequestMethod.GET) |
134 | 141 | @ResponseBody |
142 | + @TokenRequired | |
135 | 143 | public BaseResponse queryHospitalConfig(@PathVariable("hid") String hid) { |
136 | 144 | return smsConfigFacade.queryHospitalConfig(hid); |
137 | 145 | } |
... | ... | @@ -142,6 +150,7 @@ |
142 | 150 | */ |
143 | 151 | @RequestMapping(value = "/addOrUpdateHospitalConfig", method = RequestMethod.PUT) |
144 | 152 | @ResponseBody |
153 | + @TokenRequired | |
145 | 154 | public BaseResponse addOrUpdateHospitalConfig( |
146 | 155 | @RequestParam(required = true) String hospitalName, |
147 | 156 | @RequestParam(required = false) String shortCode, |
... | ... | @@ -163,6 +172,7 @@ |
163 | 172 | */ |
164 | 173 | @RequestMapping(value = "/queryHighConfigLib", method = RequestMethod.GET) |
165 | 174 | @ResponseBody |
175 | + @TokenRequired | |
166 | 176 | public BaseResponse updateHospitalConfig() { |
167 | 177 | List<Map> highLibs = new ArrayList(); |
168 | 178 | |
... | ... | @@ -184,6 +194,7 @@ |
184 | 194 | */ |
185 | 195 | @RequestMapping(value = "/queryConfigHospitals", method = RequestMethod.GET) |
186 | 196 | @ResponseBody |
197 | + @TokenRequired | |
187 | 198 | public BaseResponse queryConfigHospitals(@RequestParam(required = false) String provinceId, |
188 | 199 | @RequestParam(required = false) String cityId, |
189 | 200 | @RequestParam(required = false) String areaId, |
... | ... | @@ -212,6 +223,7 @@ |
212 | 223 | */ |
213 | 224 | @RequestMapping(value = "/querySmsList", method = RequestMethod.GET) |
214 | 225 | @ResponseBody |
226 | + @TokenRequired | |
215 | 227 | public BaseResponse querySmsList(@RequestParam(required = false) String hospitalName, |
216 | 228 | @RequestParam(required = false) String phone, |
217 | 229 | @RequestParam(required = false) Integer smsType, |
... | ... | @@ -238,6 +250,7 @@ |
238 | 250 | * @param actualTime |
239 | 251 | */ |
240 | 252 | @RequestMapping(value = "/exportSmsList", method = RequestMethod.GET) |
253 | + @TokenRequired | |
241 | 254 | public void exportSmsList(HttpServletResponse httpServletResponse,@RequestParam(required = false) String hospitalName, |
242 | 255 | @RequestParam(required = false) String phone, |
243 | 256 | @RequestParam(required = false) Integer smsType, |
... | ... | @@ -265,6 +278,7 @@ |
265 | 278 | */ |
266 | 279 | @RequestMapping(value = "/queryMsgList", method = RequestMethod.GET) |
267 | 280 | @ResponseBody |
281 | + @TokenRequired | |
268 | 282 | public BaseResponse queryMsgList(@RequestParam(required = false) String hospitalId, |
269 | 283 | @RequestParam(required = false) String phone, |
270 | 284 | @RequestParam(required = false) Integer smsType, |
... | ... | @@ -289,6 +303,7 @@ |
289 | 303 | * @param actualTime |
290 | 304 | */ |
291 | 305 | @RequestMapping(value = "/exportMsgList", method = RequestMethod.GET) |
306 | + @TokenRequired | |
292 | 307 | public void exportMsgList(HttpServletResponse httpServletResponse,@RequestParam(required = false) String hospitalId, |
293 | 308 | @RequestParam(required = false) String phone, |
294 | 309 | @RequestParam(required = false) Integer smsType, |
... | ... | @@ -306,6 +321,7 @@ |
306 | 321 | |
307 | 322 | @RequestMapping(value = "/sendBabyBuildSms", method = RequestMethod.GET) |
308 | 323 | @ResponseBody |
324 | + @TokenRequired | |
309 | 325 | public String sendBabyBuildSms() { |
310 | 326 | BabyModelQuery babyModelQuery = new BabyModelQuery(); |
311 | 327 | List<String> hospitalIds = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
2b1e6c3
... | ... | @@ -114,8 +114,31 @@ |
114 | 114 | |
115 | 115 | patientsQuery.setNorFactor(Boolean.TRUE); |
116 | 116 | |
117 | + | |
118 | + PatientsQuery query = new PatientsQuery(); | |
119 | + query.setYn(YnEnums.YES.getId()); | |
120 | + query.setBuildTypeList(patientsQuery.getBuildTypeList()); | |
121 | + query.setHospitalId(patientsQuery.getHospitalId()); | |
122 | + query.setDueStatus(patientsQuery.getDueStatus()); | |
123 | + //高危等级 | |
124 | + query.setrLevel(patientsQuery.getrLevel()); | |
125 | + //产检医生 | |
126 | + query.setLastCheckEmployeeId(patientsQuery.getLastCheckEmployeeId()); | |
127 | + query.setDueDateStart(patientsQuery.getDueDateStart()); | |
128 | + query.setDueDateEnd(patientsQuery.getDueDateEnd()); | |
129 | + | |
130 | + query.setBookbuildingDateStart(patientsQuery.getBookbuildingDateStart()); | |
131 | + query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd()); | |
132 | + query.setoRiskFactor("true"); | |
133 | + | |
134 | + query.setType(patientsQuery.getType()); | |
135 | + | |
136 | + //单个高危因素孕产妇条数 | |
137 | + int riskPatientCount = patientsService.queryPatientCount(query); | |
138 | + | |
117 | 139 | //总的孕妇条数 |
118 | 140 | int allPatientCount = patientsService.queryPatientCount(patientsQuery); |
141 | + allPatientCount+=allPatientCount; | |
119 | 142 | |
120 | 143 | List<RiskReportResult> results = new ArrayList<>(); |
121 | 144 | |
... | ... | @@ -159,7 +182,7 @@ |
159 | 182 | } |
160 | 183 | } |
161 | 184 | |
162 | - results.addAll(getOtherRiskCount(allPatientCount,patientsQuery)); | |
185 | + results.addAll(getOtherRiskCount(riskPatientCount,allPatientCount,patientsQuery)); | |
163 | 186 | |
164 | 187 | Collections.sort(results,new RiskReportResult()); |
165 | 188 | |
166 | 189 | |
... | ... | @@ -172,30 +195,9 @@ |
172 | 195 | * 自定义高危因素统计 |
173 | 196 | * @return |
174 | 197 | */ |
175 | - private List<RiskReportResult> getOtherRiskCount( int allPatientCount,PatientsQuery patientsQuery) | |
198 | + private List<RiskReportResult> getOtherRiskCount(int riskPatientCount, int allPatientCount,PatientsQuery patientsQuery) | |
176 | 199 | { |
177 | 200 | List<RiskReportResult> results = new ArrayList<>(); |
178 | - | |
179 | - PatientsQuery query = new PatientsQuery(); | |
180 | - query.setYn(YnEnums.YES.getId()); | |
181 | - query.setBuildTypeList(patientsQuery.getBuildTypeList()); | |
182 | - query.setHospitalId(patientsQuery.getHospitalId()); | |
183 | - query.setDueStatus(patientsQuery.getDueStatus()); | |
184 | - //高危等级 | |
185 | - query.setrLevel(patientsQuery.getrLevel()); | |
186 | - //产检医生 | |
187 | - query.setLastCheckEmployeeId(patientsQuery.getLastCheckEmployeeId()); | |
188 | - query.setDueDateStart(patientsQuery.getDueDateStart()); | |
189 | - query.setDueDateEnd(patientsQuery.getDueDateEnd()); | |
190 | - | |
191 | - query.setBookbuildingDateStart(patientsQuery.getBookbuildingDateStart()); | |
192 | - query.setBookbuildingDateEnd(patientsQuery.getBookbuildingDateEnd()); | |
193 | - query.setoRiskFactor("true"); | |
194 | - | |
195 | - query.setType(patientsQuery.getType()); | |
196 | - | |
197 | - //单个高危因素孕产妇条数 | |
198 | - int riskPatientCount = patientsService.queryPatientCount(query); | |
199 | 201 | if (riskPatientCount > 0) |
200 | 202 | { |
201 | 203 | RiskReportResult risk = new RiskReportResult(); |