Commit 64e07c68684de0ddf06229737fdc4032b808bc57
1 parent
25e329c4a7
Exists in
master
and in
1 other branch
PC-查询登陆账号是否存在
PC-查询同vtype类型字code典编码是否重复 PC-查询同一家医院科室名称是否重复
Showing 3 changed files with 77 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
View file @
64e07c6
1 | 1 | package com.lyms.talkonlineweb.controller; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
3 | 4 | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
4 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
... | ... | @@ -190,6 +191,29 @@ |
190 | 191 | lymsLogsCrud.setType(1); |
191 | 192 | lymsLogsCrudService.save(lymsLogsCrud); |
192 | 193 | |
194 | + } | |
195 | + | |
196 | + /** | |
197 | + * PC-查询同一家医院科室名称是否重复 | |
198 | + * @param hid 所属医院 | |
199 | + * @param dname 科室名称 | |
200 | + * @return true 可以使用,false已经存在 | |
201 | + */ | |
202 | + @GetMapping("getDepartByParam") | |
203 | + public BaseResponse getDepartByParam(Integer hid,String dname){ | |
204 | + BaseResponse baseResponse=new BaseResponse(); | |
205 | + try { | |
206 | + QueryWrapper<LymsHdepart> queryWrapper=new QueryWrapper<>(); | |
207 | + queryWrapper.eq("hid", hid); | |
208 | + queryWrapper.eq("dname", dname); | |
209 | + LymsHdepart lymsHdepart=lymsHdepartService.getOne(queryWrapper); | |
210 | + baseResponse.setObject(null==lymsHdepart?true:false); | |
211 | + baseResponse.setErrormsg("成功"); | |
212 | + } catch (Exception e) { | |
213 | + baseResponse.setErrormsg("失败"); | |
214 | + e.printStackTrace(); | |
215 | + } | |
216 | + return baseResponse; | |
193 | 217 | } |
194 | 218 | |
195 | 219 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java
View file @
64e07c6
1 | 1 | package com.lyms.talkonlineweb.controller; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
3 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
4 | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
5 | 6 | import com.lyms.talkonlineweb.domain.LymsDict; |
6 | 7 | import com.lyms.talkonlineweb.domain.LymsHdepart; |
8 | +import com.lyms.talkonlineweb.domain.LymsUser; | |
7 | 9 | import com.lyms.talkonlineweb.domain.Regions; |
8 | 10 | import com.lyms.talkonlineweb.result.BaseResponse; |
9 | 11 | import com.lyms.talkonlineweb.service.LymsDictService; |
... | ... | @@ -75,6 +77,13 @@ |
75 | 77 | return baseResponse; |
76 | 78 | } |
77 | 79 | |
80 | + /** | |
81 | + * 字典列表展示 | |
82 | + * @param dict | |
83 | + * @param current | |
84 | + * @param size | |
85 | + * @return | |
86 | + */ | |
78 | 87 | @GetMapping("sltDict") |
79 | 88 | public BaseResponse sltDepartLst(LymsDict dict, int current, int size){ |
80 | 89 | BaseResponse baseResponse=new BaseResponse(); |
... | ... | @@ -82,6 +91,29 @@ |
82 | 91 | Page<LymsDict> departPage=lymsDictService.page(page, Wrappers.query(dict).orderByDesc("sort")); |
83 | 92 | baseResponse.setObject(departPage); |
84 | 93 | |
94 | + return baseResponse; | |
95 | + } | |
96 | + | |
97 | + /** | |
98 | + * PC-查询同vtype类型字code典编码是否重复 | |
99 | + * @param vtype 所属类型 | |
100 | + * @param code 编码 | |
101 | + * @return true 可以使用,false已经存在 | |
102 | + */ | |
103 | + @GetMapping("getDictByParam") | |
104 | + public BaseResponse getDictByParam(Integer vtype,Integer code){ | |
105 | + BaseResponse baseResponse=new BaseResponse(); | |
106 | + try { | |
107 | + QueryWrapper<LymsDict> queryWrapper=new QueryWrapper<>(); | |
108 | + queryWrapper.eq("vtype", vtype); | |
109 | + queryWrapper.eq("code", code); | |
110 | + LymsDict dict=lymsDictService.getOne(queryWrapper); | |
111 | + baseResponse.setObject(null==dict?true:false); | |
112 | + baseResponse.setErrormsg("成功"); | |
113 | + } catch (Exception e) { | |
114 | + baseResponse.setErrormsg("失败"); | |
115 | + e.printStackTrace(); | |
116 | + } | |
85 | 117 | return baseResponse; |
86 | 118 | } |
87 | 119 |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
64e07c6
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
7 | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
8 | 8 | import com.lyms.talkonlineweb.annotation.TokenRequired; |
9 | +import com.lyms.talkonlineweb.domain.LymsAttention; | |
9 | 10 | import com.lyms.talkonlineweb.domain.LymsPermission; |
10 | 11 | import com.lyms.talkonlineweb.domain.LymsUser; |
11 | 12 | import com.lyms.talkonlineweb.domain.UserroleInfo; |
... | ... | @@ -29,6 +30,7 @@ |
29 | 30 | import org.springframework.web.bind.annotation.*; |
30 | 31 | |
31 | 32 | import javax.servlet.http.HttpSession; |
33 | +import java.sql.Wrapper; | |
32 | 34 | import java.util.*; |
33 | 35 | import java.util.concurrent.TimeUnit; |
34 | 36 | |
... | ... | @@ -300,6 +302,25 @@ |
300 | 302 | baseResponse.setErrormsg(e.getMessage()); |
301 | 303 | } |
302 | 304 | |
305 | + return baseResponse; | |
306 | + } | |
307 | + | |
308 | + /** | |
309 | + * PC-查询登陆账号是否存在 | |
310 | + * @param login 账号 | |
311 | + * @return true 可以使用,false已经存在 | |
312 | + */ | |
313 | + @GetMapping("getLoginUserByLogin") | |
314 | + public BaseResponse getLoginUserByLogin(String login){ | |
315 | + BaseResponse baseResponse=new BaseResponse(); | |
316 | + try { | |
317 | + LymsUser user=lymsUserService.getOne(new QueryWrapper<LymsUser>().eq("login", login)); | |
318 | + baseResponse.setObject(null==user?true:false); | |
319 | + baseResponse.setErrormsg("成功"); | |
320 | + } catch (Exception e) { | |
321 | + baseResponse.setErrormsg("失败"); | |
322 | + e.printStackTrace(); | |
323 | + } | |
303 | 324 | return baseResponse; |
304 | 325 | } |
305 | 326 |