| | |
| | | package org.springblade.modules.system.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.InvestigateUtil; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | |
| | | @ApiOperation(value = "列表", notes = "传入account和realName") |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<IPage<UserVO>> page(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | user.setAccount("admin"); |
| | | IPage<User> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return R.data(UserWrapper.build().pageVO(pages)); |
| | | } |
| | |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R submit(@Valid @RequestBody User user) { |
| | | CacheUtil.clear(USER_CACHE); |
| | | //资格审查 |
| | | String data = InvestigateUtil.httpGet(user.getCardid()); |
| | | JSONObject jsonObject = JSONObject.parseObject(data); |
| | | Object data1 = jsonObject.get("data"); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(data1.toString()); |
| | | List<Map<String,Object>> res = (List<Map<String,Object>>)jsonObject1.get("res"); |
| | | if(res.size()>0) { |
| | | int count = (int) res.stream().filter(map -> map.get("zdxsfzqkry") != null).count(); |
| | | res.forEach(map -> { |
| | | if (null != map.get("zdxsfzqkry")) { |
| | | user.setExaminationMx(map.get("zdxsfzqkry").toString()); |
| | | } |
| | | }); |
| | | if (count > 0) { |
| | | user.setExaminationType("1"); |
| | | } else { |
| | | user.setExaminationType("0"); |
| | | } |
| | | }else { |
| | | //没有数据正常 |
| | | user.setExaminationType("0"); |
| | | } |
| | | return R.status(userService.submit(user)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 17) |
| | | @ApiOperation(value = "查看平台详情", notes = "传入id") |
| | | @GetMapping("/platform-detail") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<UserVO> platformDetail(User user) { |
| | | return R.data(userService.platformDetail(user)); |
| | | } |