| | |
| | | |
| | | |
| | | |
| | | // /** |
| | | // * |
| | | // * @return |
| | | // */ |
| | | // @GetMapping("/investigate/byUser") |
| | | // public R investigateByUser(){ |
| | | // //查询用户数据,未删除的 |
| | | // List<User> users = userService.getAllUserList(); |
| | | // //遍历 |
| | | // users.forEach(InvestigateUtil.consumerWithIndex((user,index) ->{ |
| | | // if (index==80){ |
| | | // try { |
| | | // Thread.sleep(500); |
| | | // } catch (InterruptedException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | // String body = InvestigateUtil.httpGet(user.getCardid()); |
| | | // JSONObject jsonObject = new JSONObject(body); |
| | | // Object data = jsonObject.get("data"); |
| | | // JSONObject jsonData = new JSONObject(data.toString()); |
| | | // JSONArray res = jsonData.getJSONArray("res"); |
| | | // if (res.length()==0){ |
| | | // //没有数据正常 |
| | | // user.setExaminationType("0"); |
| | | // }else { |
| | | // user.setExaminationType("1"); |
| | | // user.setExaminationMx(res.getJSONObject(0).get("zdxsfzqkry").toString()); |
| | | // } |
| | | // //更新用户数据 |
| | | // userService.updateById(user); |
| | | // })); |
| | | // return R.data(users.size()); |
| | | // } |
| | | |
| | | /** |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/investigate/byUser") |
| | | public R investigateByUser(){ |
| | | //查询用户数据,未删除的 |
| | | List<User> users = userService.getAllUserList(); |
| | | //查询用户数据,未删除的,未审核的 |
| | | List<User> users = userService.getNotAuditAllUserList(); |
| | | //遍历 |
| | | users.forEach(InvestigateUtil.consumerWithIndex((user,index) ->{ |
| | | if (index==80){ |
| | |
| | | user.setExaminationType("0"); |
| | | }else { |
| | | user.setExaminationType("1"); |
| | | user.setExaminationMx(res.getJSONObject(0).get("zdxsfzqkry").toString()); |
| | | for (int i = 0; i < res.length(); i++) { |
| | | if(res.getJSONObject(i).get("zdxsfzqkry").toString()!=null |
| | | && res.getJSONObject(i).get("zdxsfzqkry").toString()!=""){ |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdxsfzqkry").toString()); |
| | | //更新用户数据 |
| | | userService.updateById(user); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | //更新用户数据 |
| | | userService.updateById(user); |
| | |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | @GetMapping("/page-security") |
| | | public R<IPage<UserVO>> pageSecurity(@ApiIgnore UserVO user, Query query, Long deptId, BladeUser bladeUser) { |
| | | public R<IPage<UserVO>> pageSecurity(@ApiIgnore UserVO user, Query query) { |
| | | user.setAccount("admin"); |
| | | IPage<UserVO> pages = userService.selectUserPageSecurity(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | IPage<UserVO> pages = userService.selectUserPageSecurity(Condition.getPage(query), user); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | @SqlParser(filter = true) |
| | | List<UserVO> selectUserPageSecurity(IPage<UserVO> page, @Param("user") UserVO user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId); |
| | | List<UserVO> selectUserPageSecurity(IPage<UserVO> page, @Param("user") UserVO user); |
| | | |
| | | /** |
| | | * 查询所有未注销用户 |
| | | * @return |
| | | */ |
| | | List<User> getAllUserList(); |
| | | |
| | | /** |
| | | * 查询用户数据,未删除的,未审核的 |
| | | * @return |
| | | */ |
| | | List<User> getNotAuditAllUserList(); |
| | | } |
| | |
| | | <result column="hold" property="hold"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="securitynumber" property="securitynumber"/> |
| | | <result column="examination_type" property="examinationType"/> |
| | | <result column="examination_mx" property="examinationMx"/> |
| | | <result column="fingerprint" property="fingerprint"/> |
| | | <result column="photo" property="photo"/> |
| | | <result column="dispatch" property="dispatch"/> |
| | |
| | | <if test="user.nativeplace!=null and user.nativeplace != ''"> |
| | | and nativeplace = #{user.nativeplace} |
| | | </if> |
| | | <if test="user.examinationType!=null and user.examinationType != ''"> |
| | | and examination_type = #{user.examinationType} |
| | | </if> |
| | | <if test="user.sex!=null and user.sex != ''"> |
| | | and sex = #{user.sex} |
| | | </if> |
| | |
| | | bu.is_deleted = 0 |
| | | and |
| | | bd.dept_category = 1 |
| | | <if test="user.tenantId!=null and user.tenantId != ''"> |
| | | and bu.tenant_id = #{user.tenantId} |
| | | </if> |
| | | <if test="user.account!=null and user.account != ''"> |
| | | and bu.account != #{user.account} |
| | | </if> |
| | | <if test="user.cardid!=null and user.cardid != ''"> |
| | | and bu.cardid like concat(concat('%', #{user.cardid}),'%') |
| | | </if> |
| | |
| | | </if> |
| | | <if test="user.securitynumber!=null and user.securitynumber != ''"> |
| | | and bu.securitynumber = #{user.securitynumber} |
| | | </if> |
| | | <if test="deptIdList!=null and deptIdList.size>0"> |
| | | and id in ( |
| | | SELECT |
| | | user_id |
| | | FROM |
| | | blade_user_dept |
| | | WHERE |
| | | dept_id IN |
| | | <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | <if test="user.useName==null or user.useName==''"> |
| | | order by bu.id |
| | |
| | | select id,cardid from blade_user where is_deleted = 0 |
| | | </select> |
| | | |
| | | <!--查询用户数据,未删除的,未审核的--> |
| | | <select id="getNotAuditAllUserList" resultType="org.springblade.modules.system.entity.User"> |
| | | select id,cardid from blade_user where is_deleted = 0 |
| | | and (examination_type!='0' or examination_type is null) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | /** |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | IPage<UserVO> selectUserPageSecurity(IPage<UserVO> page, UserVO user, Long deptId, String s); |
| | | IPage<UserVO> selectUserPageSecurity(IPage<UserVO> page, UserVO user); |
| | | |
| | | /** |
| | | * 查询所有未注销用户 |
| | | * @return |
| | | */ |
| | | List<User> getAllUserList(); |
| | | |
| | | /** |
| | | * 查询用户数据,未删除的,未审核的 |
| | | * @return |
| | | */ |
| | | List<User> getNotAuditAllUserList(); |
| | | } |
| | |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | @Override |
| | | public IPage<UserVO> selectUserPageSecurity(IPage<UserVO> page, UserVO user, Long deptId, String tenantId) { |
| | | List<Long> deptIdList = SysCache.getDeptChildIds(deptId); |
| | | return page.setRecords(baseMapper.selectUserPageSecurity(page, user, deptIdList, tenantId)); |
| | | public IPage<UserVO> selectUserPageSecurity(IPage<UserVO> page, UserVO user) { |
| | | return page.setRecords(baseMapper.selectUserPageSecurity(page, user)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public List<User> getAllUserList() { |
| | | return baseMapper.getAllUserList(); |
| | | } |
| | | |
| | | /** |
| | | * 查询用户数据,未删除的,未审核的 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> getNotAuditAllUserList() { |
| | | return baseMapper.getNotAuditAllUserList(); |
| | | } |
| | | } |