Commit e10e8170f70b7d7fe2b886720dee86b213798e82
1 parent
0131ed198c
Exists in
master
and in
1 other branch
commit
Showing 1 changed file with 36 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
e10e817
... | ... | @@ -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.result.BaseResponse; | |
8 | +import com.lyms.platform.common.utils.JsonUtil; | |
7 | 9 | import com.lyms.platform.common.utils.MessageUtil; |
8 | 10 | import com.lyms.platform.common.utils.PropertiesUtils; |
9 | 11 | import com.lyms.platform.pojo.ArchiveData; |
10 | 12 | |
... | ... | @@ -20,7 +22,9 @@ |
20 | 22 | import java.io.IOException; |
21 | 23 | import java.io.UnsupportedEncodingException; |
22 | 24 | import java.net.URLEncoder; |
25 | +import java.util.HashMap; | |
23 | 26 | import java.util.List; |
27 | +import java.util.Map; | |
24 | 28 | |
25 | 29 | /** |
26 | 30 | * Created by riecard on 2016/10/18. |
... | ... | @@ -49,6 +53,37 @@ |
49 | 53 | } |
50 | 54 | |
51 | 55 | |
56 | + | |
57 | + /** | |
58 | + * 获取预约建档的病史信息 | |
59 | + * | |
60 | + * @param idCard 证件号 | |
61 | + * @return | |
62 | + */ | |
63 | + @RequestMapping(value = "/bookArchive/history",method = RequestMethod.GET) | |
64 | + public void getBookArchive(HttpServletResponse response, String idCard,String cardNum,String phone){ | |
65 | + ArchiveDataQuery query = new ArchiveDataQuery(); | |
66 | + query.setIdCard(idCard); | |
67 | + query.setCardNum(cardNum); | |
68 | + query.setPhone(phone); | |
69 | + List<ArchiveData> list = archiveDataServicer.query(query.convertToQuery()); | |
70 | + if (list!=null && list.size() > 0) { | |
71 | + Map map = JsonUtil.str2Obj(list.get(0).getJsonData(), HashMap.class); | |
72 | + if(null!=map&&map.containsKey("history")){ | |
73 | + Object h =map.get("history"); | |
74 | + if(null!=h){ | |
75 | + writeJson(response,JsonUtil.obj2JsonString(h)); | |
76 | + }else{ | |
77 | + writeJson(response, "{\"errormsg\": \"没有查询到数据\",\"errorcode\": 4097}"); | |
78 | + } | |
79 | + }else{ | |
80 | + writeJson(response,"{\"errormsg\": \"没有查询到数据\",\"errorcode\": 4097}"); | |
81 | + } | |
82 | + } else { | |
83 | + writeJson(response,"{\"errormsg\": \"没有查询到数据\",\"errorcode\": 4097}"); | |
84 | + } | |
85 | + } | |
86 | + | |
52 | 87 | @RequestMapping(value = "/bookArchive",method = RequestMethod.POST) |
53 | 88 | public void addBookArchive(HttpServletResponse response, |
54 | 89 | String idCard, |
... | ... | @@ -58,7 +93,7 @@ |
58 | 93 | String cardNum, |
59 | 94 | String phone) { |
60 | 95 | ArchiveData data = new ArchiveData(); |
61 | - data.setId(hospitalId+":"+idCard); | |
96 | + data.setId(hospitalId + ":" + idCard); | |
62 | 97 | data.setHospitalId(hospitalId); |
63 | 98 | data.setIdCard(idCard); |
64 | 99 | data.setName(name); |