| | |
| | | public R submit(@Valid @RequestBody User user) { |
| | | CacheUtil.clear(USER_CACHE); |
| | | //资格审查 |
| | | String body = InvestigateUtil.httpGetOne(user.getCardid()); |
| | | JSONObject jsonObject = new JSONObject(body); |
| | | String data = jsonObject.get("data").toString(); |
| | | JSONObject jsonData = new JSONObject(data); |
| | | JSONArray res = jsonData.getJSONArray("res"); |
| | | if (res.length()==0){ |
| | | //没有数据正常 |
| | | user.setExaminationType("0"); |
| | | }else { |
| | | user.setExaminationType("1"); |
| | | user.setExaminationMx(res.getJSONObject(0).get("zdrylbjh").toString()); |
| | | } |
| | | // String body = InvestigateUtil.httpGetOne(user.getCardid()); |
| | | // JSONObject jsonObject = new JSONObject(body); |
| | | // String data = jsonObject.get("data").toString(); |
| | | // JSONObject jsonData = new JSONObject(data); |
| | | // JSONArray res = jsonData.getJSONArray("res"); |
| | | // if (res.length()==0){ |
| | | // //没有数据正常 |
| | | // user.setExaminationType("0"); |
| | | // }else { |
| | | // user.setExaminationType("1"); |
| | | // user.setExaminationMx(res.getJSONObject(0).get("zdrylbjh").toString()); |
| | | // } |
| | | return R.status(userService.submit(user)); |
| | | } |
| | | |