智慧保安后台管理-外网项目备份
tangzy
2021-09-24 6086ab8dc9d544edd9f259055574c714e84ff7d2
src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -166,8 +166,8 @@
   @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);
   }
   /**
@@ -192,33 +192,34 @@
//         }
//      }
      //根据 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("成功");
   }
@@ -243,7 +244,7 @@
      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 =