智慧保安后台管理-外网
Administrator
2021-11-23 d4ad4cd6c127aa5944685c4aa098e0015139e1a4
src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -318,6 +318,14 @@
         }
      }
      //如果是异常标记
      if (null!=user.getExaminationType() && !user.getExaminationType().equals("")){
         if (user.getExaminationType().equals("1")) {
            //吊销保安证
            user.setHold("3");
         }
      }
      user.setPassword(user1.getPassword());
      userService.updateById(user);
      String rtime;
@@ -394,6 +402,7 @@
            + ",registered = " + "'" + user.getRegistered() + "'"
            + ",securitynumber = " + "'" + user.getSecuritynumber() + "'"
            + ",hold = " + "'" + user.getHold() + "'"
            + ",cell = " + "'" + user.getCell() + "'"
            + " " + "where id = " + "'" + user.getId() + "'";
      FtpUtil.sqlFileUpload(s1);
      return R.success("修改成功");
@@ -904,6 +913,8 @@
         if (null!=user.getCell() && !user.getCell().equals("")) {
            if (user.getCell().equals("2")){
               list.forEach(user2 -> {
                  //判断是否在本单位,如果是本单位,则不能再次新增
                  if(!user2.getDeptId().equals(user.getDeptId())) {
                  user2.setStatus(2);
                  //先将原有人员离职  cell 1:手动录入  2:自动录入
                  userService.updateById(user2);
@@ -911,7 +922,12 @@
                  String s1 = "update blade_user set status = " + user2.getStatus() +
                     " where id = " + "'" + user2.getId() + "'";
                  FtpUtil.sqlFileUpload(s1);
                  }else {
                     throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
                  }
               });
            }else {
               throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
            }
         }else {
            throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));