Commit bb5267f1741f822cf821690986adb50bdb12d052
1 parent
35499a6d3a
Exists in
master
and in
6 other branches
秦皇岛就诊卡密码
Showing 1 changed file with 74 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
bb5267f
... | ... | @@ -3531,14 +3531,85 @@ |
3531 | 3531 | * return ""; |
3532 | 3532 | * } |
3533 | 3533 | */ |
3534 | +// @RequestMapping(value = "/qhd/getVcCardNoPwd", method = RequestMethod.GET) | |
3535 | +// @ResponseBody | |
3536 | +// public String getVcCardNoPwd(@RequestParam(required = true) String kid) { | |
3537 | +// Map<String, String> map = new HashMap<String, String>(); | |
3538 | +// map.put("kid", kid); | |
3539 | +// String s = HttpClientUtil.doGet("http://localhost:9090/qhd/getVcCardNoPwd", map, "utf-8", null); | |
3540 | +// return s; | |
3541 | +// } | |
3542 | + | |
3543 | + | |
3534 | 3544 | @RequestMapping(value = "/qhd/getVcCardNoPwd", method = RequestMethod.GET) |
3535 | 3545 | @ResponseBody |
3536 | 3546 | public String getVcCardNoPwd(@RequestParam(required = true) String kid) { |
3537 | 3547 | Map<String, String> map = new HashMap<String, String>(); |
3538 | - map.put("kid", kid); | |
3539 | - String s = HttpClientUtil.doGet("http://localhost:9090/qhd/getVcCardNoPwd", map, "utf-8", null); | |
3540 | - return s; | |
3548 | + StringBuffer stringBuffer = new StringBuffer(kid); | |
3549 | + kid = stringBuffer.reverse().toString(); | |
3550 | + System.out.println(kid); | |
3551 | + map.put("uid", kid); | |
3552 | + //String s = HttpClientUtil.doGet("http://localhost:5000/qhdcard", map, "utf-8", null); | |
3553 | + String s = "{\"resultCode\":\"0\",\"resultDesc\":null,\"resultData\":[{\"id\":0,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"A0A3A52CCB35\"},{\"id\":0,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"A52CCB35C6A2\"},{\"id\":1,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"C05B83212D91\"},{\"id\":1,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"83212D919914\"},{\"id\":2,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"36BD712D3812\"},{\"id\":2,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"712D3812C75F\"},{\"id\":3,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"1EEC2C61C4D8\"},{\"id\":3,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"2C61C4D80C81\"},{\"id\":4,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"9046C0293980\"},{\"id\":4,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"C02939800BA4\"},{\"id\":5,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"9A1DDC0EEC5F\"},{\"id\":5,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"DC0EEC5F8491\"},{\"id\":6,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"67ECCC098E4A\"},{\"id\":6,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"CC098E4A909D\"},{\"id\":7,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"F2828558B094\"},{\"id\":7,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"8558B094B0A5\"},{\"id\":8,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"B1C88A73FFDC\"},{\"id\":8,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"8A73FFDC91A8\"},{\"id\":9,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"C2E05035FC18\"},{\"id\":9,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"5035FC18AD9B\"},{\"id\":10,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":10,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":11,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":11,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":12,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":12,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":13,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":13,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":14,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":14,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":15,\"uid\":\"33221100\",\"type\":\"A\",\"pwd\":\"FFFFFFFFFFFF\"},{\"id\":15,\"uid\":\"33221100\",\"type\":\"B\",\"pwd\":\"FFFFFFFFFFFF\"}]}"; | |
3554 | + System.out.println(s); | |
3555 | + if (StringUtils.isNotEmpty(s)) | |
3556 | + { | |
3557 | + List<Pwd> pwds = JsonUtil.jsonToList(s,Pwd.class); | |
3558 | + if (CollectionUtils.isNotEmpty(pwds)) | |
3559 | + { | |
3560 | + for (Pwd pwd : pwds) | |
3561 | + { | |
3562 | + if (pwd.getId() == 0 && "A".equals(pwd.getType())) | |
3563 | + { | |
3564 | + return pwd.getPwd(); | |
3565 | + } | |
3566 | + } | |
3567 | + } | |
3568 | + } | |
3569 | + return ""; | |
3541 | 3570 | } |
3571 | + | |
3572 | + | |
3573 | + class Pwd{ | |
3574 | + private int id; | |
3575 | + private String uid; | |
3576 | + private String type; | |
3577 | + private String pwd; | |
3578 | + | |
3579 | + public int getId() { | |
3580 | + return id; | |
3581 | + } | |
3582 | + | |
3583 | + public void setId(int id) { | |
3584 | + this.id = id; | |
3585 | + } | |
3586 | + | |
3587 | + public String getUid() { | |
3588 | + return uid; | |
3589 | + } | |
3590 | + | |
3591 | + public void setUid(String uid) { | |
3592 | + this.uid = uid; | |
3593 | + } | |
3594 | + | |
3595 | + public String getType() { | |
3596 | + return type; | |
3597 | + } | |
3598 | + | |
3599 | + public void setType(String type) { | |
3600 | + this.type = type; | |
3601 | + } | |
3602 | + | |
3603 | + public String getPwd() { | |
3604 | + return pwd; | |
3605 | + } | |
3606 | + | |
3607 | + public void setPwd(String pwd) { | |
3608 | + this.pwd = pwd; | |
3609 | + } | |
3610 | + } | |
3611 | + | |
3612 | + | |
3542 | 3613 | |
3543 | 3614 | |
3544 | 3615 | @RequestMapping(value = "/setNumberCode", method = RequestMethod.GET) |