Commit 6bc83b89844e2c4b625fb98a6d16df39bb34ea5a
1 parent
3593520240
Exists in
master
and in
6 other branches
区分常用
Showing 2 changed files with 44 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
6bc83b8
... | ... | @@ -1176,6 +1176,15 @@ |
1176 | 1176 | // private String hivktSelect; |
1177 | 1177 | map.put("syjgSelect", StringUtils.isNotEmpty(data.getSyjgSelect())?SYJGEums.getTitle(data.getSyjgSelect()):""); |
1178 | 1178 | map.put("hivktSelect", StringUtils.isNotEmpty(data.getHivktSelect())?SYJGEums.getTitle(data.getHivktSelect()):""); |
1179 | +// {\"yesOrNo\":\"yes\",\"yg\":true,\"bg\":true,\"azb\":true,\"md\":true,\"qt\":true,\"qtText\":\"bdfgsf\"} | |
1180 | + map.put("infectDiseases", ""); | |
1181 | + | |
1182 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getInfectDiseases())) { | |
1183 | + Map map1 = JsonUtil.jkstr2Obj(data.getInfectDiseases(), Map.class); | |
1184 | + map.put("infectDiseases", FunvCommonUtil.reslove(map1, new StringBuilder())); | |
1185 | + } | |
1186 | + | |
1187 | + | |
1179 | 1188 | //既往史 |
1180 | 1189 | String pastHistory = ""; |
1181 | 1190 | if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getPastHistory())) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
6bc83b8
... | ... | @@ -217,6 +217,10 @@ |
217 | 217 | content.put("ft", "腹痛"); |
218 | 218 | content.put("tt", "头痛"); |
219 | 219 | content.put("ft", "腹痛"); |
220 | + content.put("yg", "乙肝"); | |
221 | + content.put("bg", "丙肝"); | |
222 | + content.put("azb", "艾滋病"); | |
223 | + content.put("md", "梅毒"); | |
220 | 224 | |
221 | 225 | jiwangshicontent.put("26cac65c-a040-4898-b7da-8deed3ba0ec3", "循环系统类"); |
222 | 226 | jiwangshicontent.put("b26889c5-d2a7-4ae1-af32-84f92440e05f", "呼吸系统类"); |
... | ... | @@ -229,6 +233,37 @@ |
229 | 233 | } |
230 | 234 | |
231 | 235 | private static final String YES_OR_NO = "yesOrNo"; |
236 | + | |
237 | + | |
238 | + public static String reslove(Map map, StringBuilder sb){ | |
239 | + if (null == map) { | |
240 | + return null; | |
241 | + } | |
242 | + if ("yes".equals(map.get(YES_OR_NO))) { | |
243 | + Set<Map.Entry<String, Object>> m = map.entrySet(); | |
244 | + Iterator<Map.Entry<String, Object>> it = m.iterator(); | |
245 | + while (it.hasNext()) { | |
246 | + Map.Entry<String, Object> ma = it.next(); | |
247 | + if (ma.getKey().equals(YES_OR_NO)) { | |
248 | + continue; | |
249 | + } | |
250 | + if ("true".equals(ma.getValue() + "")) { | |
251 | + if (content.containsKey(ma.getKey())) { | |
252 | + sb.append(content.get(ma.getKey())).append(','); | |
253 | + } | |
254 | + } | |
255 | + } | |
256 | + if (map.containsKey("qtText")) { | |
257 | + sb.append(map.get("qtText")); | |
258 | + } | |
259 | + if (sb.toString().endsWith(",")) { | |
260 | + return sb.substring(0, sb.length() - 1); | |
261 | + } | |
262 | + } else if ("no".equals(map.get(YES_OR_NO))) { | |
263 | + sb.append("无"); | |
264 | + } | |
265 | + return sb.toString(); | |
266 | + } | |
232 | 267 | |
233 | 268 | /** |
234 | 269 | * 解析病史方法(注意:逗号使用的是中文逗号) |