@SuppressWarnings("unchecked") public String checkCardNo(FppsWechat paramFppsWechat) { String str1 = paramFppsWechat.getStrXml(); Map localMap = parseXML(str1, null); String str2 = (String) localMap.get("SeqNo"); paramFppsWechat.setStrMap(localMap); List localList = this.fppsWechatDao.checkCardNo(paramFppsWechat); HashMap localHashMap = new HashMap(); localHashMap.put("SeqNo", str2); String str3 = "1"; String str4 = "校验失败"; if ((localList != null) && (localList.size() > 0) && (localList.get(0) != null)) { str3 = "0"; str4 = "校验成功"; } localHashMap.put("ResultCode", str3); localHashMap.put("ResultMessage", str4); return buildResponse(localHashMap, null); }
@SuppressWarnings("unchecked") public String getqxlb(FppsWechat fppswechat) { String s = fppswechat.getStrXml(); Map map = parseXML(s, null); String s1 = (String) map.get("SeqNo"); String s2 = (String) map.get("DevID"); fppswechat.setStrMap(map); List list = fppsWechatDao.getqxlb(fppswechat); HashMap hashmap = new HashMap(); hashmap.put("SeqNo", s1); Object obj = null; String s3 = "0"; String s5 = "多于一个门锁权限,请选择门锁"; if (list != null && list.size() > 0 && list.get(0) != null) { Object obj1 = new ArrayList(); for (int i = 0; i < list.size(); i++) if (list.get(i) != null) ((List) (obj1)).add(list.get(i)); if (((List) (obj1)).size() == 1) { Map map1 = (Map) ((List) (obj1)).get(0); String s7 = (String) map1.get("DevID"); FppsDevice fppsdevice1 = new FppsDevice(); HashMap hashmap2 = new HashMap(); hashmap2.put("mode", "1"); hashmap2.put("devGwUuid", s7); fppsdevice1.setStrMap(hashmap2); int l = service.proOpenDoor(fppsdevice1).intValue(); s5 = "命令已下发"; hashmap.put("ResultCode", s3); hashmap.put("ResultMessage", s5); return buildResponse(hashmap, null); } if (StringUtils.hasText(s2)) { boolean flag = false; int j = 0; do { if (j >= ((List) (obj1)).size()) break; Map map2 = (Map) ((List) (obj1)).get(j); String s8 = (String) map2.get("DevID"); if (s2.equals(s8)) { flag = true; break; } j++; } while (true); if (flag) { FppsDevice fppsdevice = new FppsDevice(); HashMap hashmap1 = new HashMap(); hashmap1.put("mode", "1"); hashmap1.put("devGwUuid", s2); fppsdevice.setStrMap(hashmap1); int k = service.proOpenDoor(fppsdevice).intValue(); s5 = "命令已下发"; hashmap.put("ResultCode", s3); hashmap.put("ResultMessage", s5); return buildResponse(hashmap, null); } else { s3 = "1"; s5 = "此用户无相应的开门权限"; hashmap.put("ResultCode", s3); hashmap.put("ResultMessage", s5); return buildResponse(hashmap, null); } } else { hashmap.put("ResultCode", s3); hashmap.put("ResultMessage", s5); obj1 = ViewData.getrows(((List) (obj1)), 3); return buildResponse(hashmap, ((List) (obj1))); } } else { String s4 = "1"; String s6 = "此用户无相应的开门权限"; hashmap.put("ResultCode", s4); hashmap.put("ResultMessage", s6); return buildResponse(hashmap, null); } }