Commit ad801a181899b0577ddb8c3759424532e9be3b2e
1 parent
b4040e1038
Exists in
master
and in
6 other branches
初诊复诊随访表导出接口
Showing 1 changed file with 42 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
ad801a1
... | ... | @@ -4,6 +4,8 @@ |
4 | 4 | import com.lyms.platform.common.annotation.TokenRequired; |
5 | 5 | import com.lyms.platform.common.base.BaseController; |
6 | 6 | import com.lyms.platform.common.base.LoginContext; |
7 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
8 | +import com.lyms.platform.common.result.BaseListResponse; | |
7 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
8 | 10 | import com.lyms.platform.common.result.BaseResponse; |
9 | 11 | import com.lyms.platform.common.utils.StringUtils; |
10 | 12 | |
... | ... | @@ -125,7 +127,27 @@ |
125 | 127 | } |
126 | 128 | } |
127 | 129 | |
130 | + | |
128 | 131 | /** |
132 | + *初诊随访表打印接口 | |
133 | + * @param id | |
134 | + * @param request | |
135 | + * @return | |
136 | + */ | |
137 | + @RequestMapping(value = "/printExChuData", method = RequestMethod.GET) | |
138 | + @TokenRequired | |
139 | + public BaseResponse printExChuData(@RequestParam("id") String id, HttpServletRequest request){ | |
140 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
141 | + if(loginState == null){ | |
142 | + System.out.println("用户未登录!"); | |
143 | + return new BaseListResponse().setErrormsg("失败").setErrorcode(ErrorCodeConstants.USER_NOT_EXISTS); | |
144 | + } | |
145 | + Map<String, Object> map = viewFacade.exChuData(id, loginState.getId()); | |
146 | + return new BaseObjectResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(map); | |
147 | + } | |
148 | + | |
149 | + | |
150 | + /** | |
129 | 151 | * 下载复诊word |
130 | 152 | * |
131 | 153 | * @param id |
... | ... | @@ -168,6 +190,26 @@ |
168 | 190 | e.printStackTrace(); |
169 | 191 | } |
170 | 192 | } |
193 | + | |
194 | + /** | |
195 | + *复诊随访表打印接口 | |
196 | + * @param id | |
197 | + * @param request | |
198 | + * @return | |
199 | + */ | |
200 | + @RequestMapping(value = "/printExFuData", method = RequestMethod.GET) | |
201 | + @TokenRequired | |
202 | + public BaseResponse printExFuData(@RequestParam("id") String id,@RequestParam("num") int num, HttpServletRequest request){ | |
203 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
204 | + if(loginState == null){ | |
205 | + System.out.println("用户未登录!"); | |
206 | + return new BaseListResponse().setErrormsg("失败").setErrorcode(ErrorCodeConstants.USER_NOT_EXISTS); | |
207 | + } | |
208 | + Map<String, Object> map = viewFacade.exFuData(id, num, loginState.getId()); | |
209 | + return new BaseObjectResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(map); | |
210 | + } | |
211 | + | |
212 | + | |
171 | 213 | |
172 | 214 | /** |
173 | 215 | * 导出高危孕产妇专案管理 |