Commit 4fac95722303d4e1b14434526d46bbe5c5de2079
1 parent
079f85936c
Exists in
master
and in
1 other branch
update
Showing 3 changed files with 85 additions and 5 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java
View file @
4fac957
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | import org.springframework.web.bind.annotation.ResponseBody; |
14 | 14 | |
15 | 15 | import javax.servlet.http.HttpServletRequest; |
16 | +import javax.servlet.http.HttpServletResponse; | |
16 | 17 | import javax.validation.Valid; |
17 | 18 | |
18 | 19 | /** |
19 | 20 | |
... | ... | @@ -37,10 +38,29 @@ |
37 | 38 | @RequestMapping(value = "/regionalWomenList", method = RequestMethod.GET) |
38 | 39 | @ResponseBody |
39 | 40 | @TokenRequired |
40 | - public BaseResponse queryAllResidents(@Valid ResidentsArchiveQueryRequest queryRequest,HttpServletRequest request) { | |
41 | + public BaseResponse queryAllResidents(@Valid ResidentsArchiveQueryRequest queryRequest, | |
42 | + HttpServletRequest request) { | |
41 | 43 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
42 | 44 | return residentsFacade.queryResidentsArchives(queryRequest,loginState.getId()); |
43 | 45 | } |
46 | + | |
47 | + | |
48 | + /** | |
49 | + * 妇女健康档案管理数据导出接口 | |
50 | + * @param queryRequest | |
51 | + * @param request | |
52 | + * @param response | |
53 | + */ | |
54 | + @RequestMapping(value = "/regionalWomenExport", method = RequestMethod.GET) | |
55 | + @ResponseBody | |
56 | + @TokenRequired | |
57 | + public void regionalResidentsExport(@Valid ResidentsArchiveQueryRequest queryRequest, | |
58 | + HttpServletRequest request, | |
59 | + HttpServletResponse response) { | |
60 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
61 | + residentsFacade.regionaResidentsExport(queryRequest,loginState.getId(),response); | |
62 | + } | |
63 | + | |
44 | 64 | |
45 | 65 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
4fac957
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | param.setVcCardNo(vcCardNo); |
56 | 56 | param.setCertificateTypeId(certificateTypeId); |
57 | 57 | param.setCardNo(cardNo); |
58 | - return residentsArchiveFacade.queryResidentsArchive(param,loginState.getId()); | |
58 | + return residentsArchiveFacade.queryResidentsArchive(param , loginState.getId()); | |
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
... | ... | @@ -169,6 +169,20 @@ |
169 | 169 | return residentsArchiveFacade.womenGuildSms(womenGuideSmsRequest, loginState.getId()); |
170 | 170 | } |
171 | 171 | |
172 | + /** | |
173 | + * 删除单条居民建档 | |
174 | + * @param id | |
175 | + * @param request | |
176 | + * @return | |
177 | + */ | |
178 | + @RequestMapping(value = "/deleteResidentsArchive", method = RequestMethod.DELETE) | |
179 | + @ResponseBody | |
180 | + @TokenRequired | |
181 | + public BaseResponse deleteArchive(@RequestParam("id") String id, | |
182 | + HttpServletRequest request) { | |
183 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
184 | + return residentsArchiveFacade.deleteArchive(id,loginState.getId()); | |
185 | + } | |
172 | 186 | |
173 | 187 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
4fac957
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
4 | +import com.lyms.platform.common.enums.YnEnums; | |
5 | +import com.lyms.platform.pojo.BasicConfig; | |
3 | 6 | import org.apache.commons.lang.StringUtils; |
4 | 7 | |
5 | 8 | import java.util.HashMap; |
... | ... | @@ -19,7 +22,11 @@ |
19 | 22 | public static String YES = "是"; |
20 | 23 | public static String NO = "否"; |
21 | 24 | |
22 | - //返回中间四位数为*号的手机号 | |
25 | + /** | |
26 | + * 返回中间四位数为*号的手机号 | |
27 | + * @param phone | |
28 | + * @return | |
29 | + */ | |
23 | 30 | public static String getXingPhone(String phone){ |
24 | 31 | if (StringUtils.isNotEmpty(phone)){ |
25 | 32 | String a = phone.substring(0,3)+"****"+phone.substring(7,11); |
26 | 33 | |
... | ... | @@ -78,8 +85,39 @@ |
78 | 85 | return ""; |
79 | 86 | } |
80 | 87 | |
81 | -/* private static final Map<String, String> content = new HashMap<>(); | |
88 | + /** | |
89 | + * 获取生日(****年**月**日) | |
90 | + * @param b | |
91 | + * @return | |
92 | + */ | |
93 | + public static String getBirthday(String b){ | |
94 | + if (b!=null){ | |
95 | + String year = b.substring(0,4); | |
96 | + String mouth = b.substring(5,7); | |
97 | + String day = b.substring(8,10); | |
98 | + return year + "年" + mouth + "月" + day + "日"; | |
99 | + } | |
100 | + return null; | |
101 | + } | |
82 | 102 | |
103 | + /** | |
104 | + * 获取基础基础名称 | |
105 | + * @param id 基础类型ID | |
106 | + * @param basicConfigService | |
107 | + * @return | |
108 | + */ | |
109 | + public static String getBaseicConfigByid(String id,BasicConfigService basicConfigService) { | |
110 | + if (StringUtils.isNotEmpty(id)){ | |
111 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
112 | + if (basicConfig!=null && basicConfig.getYn()!= YnEnums.NO.getId()){ | |
113 | + return basicConfig.getName(); | |
114 | + } | |
115 | + } | |
116 | + return ""; | |
117 | + } | |
118 | + | |
119 | + private static final Map<String, String> content = new HashMap<>(); | |
120 | + | |
83 | 121 | static { |
84 | 122 | content.put("ycxjbs", "遗传性疾病史"); |
85 | 123 | content.put("jsjbs", "精神疾病史"); |
86 | 124 | |
87 | 125 | |
... | ... | @@ -104,9 +142,17 @@ |
104 | 142 | content.put("qmsgm", "青霉素过敏"); |
105 | 143 | content.put("xfmsgm", "先锋霉素过敏"); |
106 | 144 | content.put("halywgm", "磺胺类药物过敏"); |
107 | - }*/ | |
145 | + } | |
108 | 146 | |
147 | + public static String findName(Map map){ | |
148 | + StringBuilder sb = new StringBuilder(); | |
109 | 149 | |
150 | + | |
151 | + | |
152 | + | |
153 | + | |
154 | + return ""; | |
155 | + } | |
110 | 156 | |
111 | 157 | |
112 | 158 | } |