Commit 54d5ece5bca68e6f1f7b06536bb7f238e4b6cb8f
1 parent
c1a4682e7b
Exists in
master
and in
2 other branches
手机号查询档案,产检未匹配到预约数据bug修改
Showing 1 changed file with 24 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
54d5ece
... | ... | @@ -107,18 +107,29 @@ |
107 | 107 | @RequestMapping(value = "/bookArchive/history",method = RequestMethod.GET) |
108 | 108 | @TokenRequired |
109 | 109 | public void getBookArchive(HttpServletResponse response, String idCard,String cardNum,String phone, HttpServletRequest request){ |
110 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
111 | - ArchiveDataQuery query = new ArchiveDataQuery(); | |
112 | - query.setIdCard(idCard); | |
113 | - query.setCardNum(cardNum); | |
114 | - query.setPhone(phone); | |
115 | - | |
116 | 110 | if (StringUtils.isEmpty(idCard) && StringUtils.isEmpty(cardNum) && StringUtils.isEmpty(phone)) |
117 | 111 | { |
118 | 112 | writeJson(response,"{\"errormsg\": \"参数为空\",\"errorcode\": 4097}"); |
119 | 113 | return; |
120 | 114 | } |
121 | 115 | |
116 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
117 | + ArchiveDataQuery query = new ArchiveDataQuery(); | |
118 | + //目前phone参数没有传 | |
119 | + if(StringUtils.isNotEmpty(idCard)){ | |
120 | + if(idCard.length() == 11 && idCard.startsWith("1")){ | |
121 | + query.setPhone(idCard); | |
122 | + }else{ | |
123 | + query.setIdCard(idCard); | |
124 | + } | |
125 | + } | |
126 | + //如果phone传了 | |
127 | + if(StringUtils.isNotEmpty(phone)){ | |
128 | + query.setPhone(phone); | |
129 | + } | |
130 | + query.setCardNum(cardNum); | |
131 | + | |
132 | + | |
122 | 133 | List<ArchiveData> list = archiveDataServicer.query(query.convertToQuery()); |
123 | 134 | |
124 | 135 | if (CollectionUtils.isEmpty(list) && StringUtils.isNotEmpty(cardNum)) |
... | ... | @@ -286,6 +297,13 @@ |
286 | 297 | writeString(response,"success"); |
287 | 298 | } |
288 | 299 | |
300 | + /** | |
301 | + * 小程序预约直接建档 | |
302 | + * @param response | |
303 | + * @param archiveUser | |
304 | + * @param healthResort | |
305 | + * @param archiveHistoryDTO | |
306 | + */ | |
289 | 307 | @RequestMapping(value = "/confirmArchive",method = RequestMethod.POST) |
290 | 308 | public void confirmArchive(HttpServletResponse response, |
291 | 309 | String archiveUser, |