Commit 76e5dd554ce018cf451860a2c81dfc3209d75650
1 parent
9f2baf4673
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 45 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HosptialHighRiskController.java
View file @
76e5dd5
| ... | ... | @@ -103,8 +103,22 @@ |
| 103 | 103 | LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); |
| 104 | 104 | return hosptialHighRiskFacade.addHosptialOpinions(request, loginState.getId()); |
| 105 | 105 | } |
| 106 | - | |
| 107 | 106 | /** |
| 107 | + * 修改 医院自定义处理意见 和 指导意见内容 | |
| 108 | + * | |
| 109 | + * @param request | |
| 110 | + * @param httpServletRequest | |
| 111 | + * @Author: 武涛涛 | |
| 112 | + * @Date: 2020/7/18 13:41 | |
| 113 | + */ | |
| 114 | + @RequestMapping(method = RequestMethod.POST, value = "/updateHosptialOpinions") | |
| 115 | + @ResponseBody | |
| 116 | + @TokenRequired | |
| 117 | + public BaseResponse updateHosptialOpinions(@Valid @RequestBody HosptialOpinions request, HttpServletRequest httpServletRequest) { | |
| 118 | + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); | |
| 119 | + return hosptialHighRiskFacade.updateHosptialOpinions(request, loginState.getId()); | |
| 120 | + } | |
| 121 | + /** | |
| 108 | 122 | * 根据医院自定义处理意见 和 指导意见内容 |
| 109 | 123 | * |
| 110 | 124 | * @param request |
| ... | ... | @@ -133,7 +147,6 @@ |
| 133 | 147 | @ResponseBody |
| 134 | 148 | public BaseResponse deleteHosptialOpinionsById(@PathVariable("id") String id, HttpServletRequest request) { |
| 135 | 149 | return hosptialHighRiskFacade.deleteHosptialOpinionsById(id); |
| 136 | - | |
| 137 | 150 | } |
| 138 | 151 | |
| 139 | 152 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/HosptialHighRiskFacade.java
View file @
76e5dd5
| ... | ... | @@ -185,6 +185,36 @@ |
| 185 | 185 | } |
| 186 | 186 | return baseResponse; |
| 187 | 187 | } |
| 188 | + /** | |
| 189 | + * 修改 医院自定义处理意见 和 指导意见内容 | |
| 190 | + * | |
| 191 | + * @param ho | |
| 192 | + * @param userId | |
| 193 | + * @Author: 武涛涛 | |
| 194 | + * @Date: 2020/7/18 13:41 | |
| 195 | + */ | |
| 196 | + public BaseResponse updateHosptialOpinions(HosptialOpinions ho, int userId) { | |
| 197 | + BaseResponse baseResponse = new BaseResponse(); | |
| 198 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 199 | + | |
| 200 | + if(StringUtils.isNotEmpty(ho.getId())){ | |
| 201 | + HosptialOpinions hosptialOpinions = hosptialOpinionsService.getOneHosptialOpinionsById(ho.getId()); | |
| 202 | + if( hosptialOpinions != null ){ | |
| 203 | + hosptialOpinions.setIsUse("1"); //1 下拉框显示,2下拉框不显示 | |
| 204 | + hosptialOpinions.setDoctorId(userId); | |
| 205 | + hosptialOpinions.setHospitalId(hospitalId); | |
| 206 | + hosptialOpinions.setContent(ho.getContent()); | |
| 207 | + hosptialOpinionsService.updateHosptialOpinions(hosptialOpinions); | |
| 208 | + baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 209 | + baseResponse.setErrormsg("修改成功"); | |
| 210 | + }else{ | |
| 211 | + baseResponse.setErrorcode(ErrorCodeConstants.DONT_DELETE); | |
| 212 | + baseResponse.setErrormsg("修改失败,缺少ID"); | |
| 213 | + } | |
| 214 | + } | |
| 215 | + | |
| 216 | + return baseResponse; | |
| 217 | + } | |
| 188 | 218 | |
| 189 | 219 | /** |
| 190 | 220 | * 根据用户id查询自定义高危 |