| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "查看详情", notes = "传入id") |
| | | @GetMapping("/detail") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<UserVO> detail(User user) { |
| | | User detail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | return R.data(UserWrapper.build().entityVO(detail)); |
| | |
| | | public R submit(@Valid @RequestBody User user) { |
| | | CacheUtil.clear(USER_CACHE); |
| | | //资格审查 |
| | | String body = InvestigateUtil.httpGet(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("zdxsfzqkry").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)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | @GetMapping("/updateUser") |
| | | public R updateUser(String hold,String cardid) { |
| | | userService.updateUser(hold, cardid); |
| | | public R updateUser(String hold,String cardid,String holdv) { |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式 |
| | | String time = df.format(new Date()); |
| | | userService.updateUser(hold, cardid,holdv,time); |
| | | return R.success("吊销成功"); |
| | | } |
| | | |