| | |
| | | @ApiOperation(value = "列表", notes = "传入account和realName") |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<IPage<UserVO>> page(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) { |
| | | 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)); |
| | | IPage<UserVO> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId())); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | |
| | | // } |
| | | // } |
| | | |
| | | //根据 deptId 查询dept信息,公安管理员 |
| | | Dept dept = iDeptService.getById(user.getDeptId()); |
| | | Long sid = 1123598813738675201L; |
| | | if (dept.getParentId().equals(sid)) { |
| | | //获取辖区的数据 |
| | | Jurisdiction jurisdiction = new Jurisdiction(); |
| | | jurisdiction.setDeptName(dept.getDeptName()); |
| | | Jurisdiction one = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction)); |
| | | user.setJurisdiction(one.getId().toString()); |
| | | } |
| | | user.setRoleId("1412226235153731586"); |
| | | // //根据 deptId 查询dept信息,公安管理员 |
| | | // Dept dept = iDeptService.getById(user.getDeptId()); |
| | | // Long sid = 1123598813738675201L; |
| | | // if (dept.getParentId().equals(sid)) { |
| | | // //获取辖区的数据 |
| | | // Jurisdiction jurisdiction = new Jurisdiction(); |
| | | // jurisdiction.setDeptName(dept.getDeptName()); |
| | | // Jurisdiction one = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction)); |
| | | // user.setJurisdiction(one.getId().toString()); |
| | | // } |
| | | //user.setRoleId("1412226235153731586"); |
| | | userService.submit(user); |
| | | // String birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday()); |
| | | String rtime = null; |
| | | if (null != user.getRtime()) { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime()); |
| | | } |
| | | String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid,nativePlace,nation,education," + |
| | | "politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,jurisdiction) " + |
| | | "values(" + "'" + user.getId() + "'" + "," + "'" + 000000 + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," + |
| | | "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | "," + "'" + user.getDeptId() + "'" + "," + "'" + user.getCardid() + "'" + "," + "'" + user.getNativeplace() + "'" + "," + "'" |
| | | + user.getNation() + "'" + "," + "'" + user.getEducation() + "'" + "," + "'" + user.getPoliticaloutlook() + "'" + "," + "'" + user.getHealstats() + "'" |
| | | + "," + "'" + user.getHeight() + "'" + "," + "'" + user.getAddress() + "'" + "," + "'" + user.getRegistered() + "'" + "," + |
| | | "'" + rtime + "'" + "," + "'" + user.getSecuritynumber() + "'" + "," + "'" + user.getHold() + "'" + "," + "'" + user.getJurisdiction() + "'"+ ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | // String rtime = null; |
| | | // if (null != user.getRtime()) { |
| | | // rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime()); |
| | | // } |
| | | // user.setIsDeleted(0); |
| | | // String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid,nativePlace,nation,education," + |
| | | // "politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,jurisdiction,is_deleted) " + |
| | | // "values(" + "'" + user.getId() + "'" + "," + "'" + 000000 + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | // "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," + |
| | | // "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | // "," + "'" + user.getDeptId() + "'" + "," + "'" + user.getCardid() + "'" + "," + "'" + user.getNativeplace() + "'" + "," + "'" |
| | | // + user.getNation() + "'" + "," + "'" + user.getEducation() + "'" + "," + "'" + user.getPoliticaloutlook() + "'" + "," + "'" + user.getHealstats() + "'" |
| | | // + "," + "'" + user.getHeight() + "'" + "," + "'" + user.getAddress() + "'" + "," + "'" + user.getRegistered() + "'" + "," + |
| | | // "'" + rtime + "'" + "," + "'" + user.getSecuritynumber() + "'" + "," + "'" + user.getHold() + "'" + "," + "'" + user.getJurisdiction() + "'"+"," + "'" +user.getIsDeleted() + "'"+ ")"; |
| | | // FtpUtil.sqlFileUpload(s); |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | if (user.getRtime() == null) { |
| | | rtime = null; |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime()); |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | } |
| | | |
| | | String s1 = |