智慧保安后台管理-外网
Administrator
2021-09-27 345d17cf82e1bbc1fbfbeec10193c2bed59cd674
src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -164,12 +164,13 @@
         user.setHold("2");
         user.setDispatch("1");
         user.setStatus(1);
         user.setExaminationType("0");
         user.setIsDeleted(0);
         iUserService.save(user);
         //内网数据同步
         String rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
         String s = "insert into blade_user(id,tenant_id,account,password,real_name,role_id,dept_id,create_time,status,is_deleted,cardid,hold,dispatch) " +
         String s = "insert into blade_user(id,tenant_id,account,password,real_name,role_id,dept_id,create_time,status,is_deleted,cardid,hold,examination_type,dispatch) " +
            "values(" + "'" + user.getId() + "'" +
            "," + "'" + user.getTenantId() + "'" +
            "," + "'" + user.getAccount() + "'" +
@@ -182,6 +183,7 @@
            "," + "'" + user.getIsDeleted() + "'" +
            "," + "'" + user.getCardid() + "'" +
            "," + "'" + user.getHold() + "'" +
            "," + "'" + user.getExaminationType() + "'" +
            "," + "'" + user.getDispatch() + "'" + ")";
         FtpUtil.sqlFileUpload(s);
@@ -216,6 +218,17 @@
   @PostMapping("/inster")
   @ApiOperation(value = "新增", notes = "传入zc")
   public R inster(@Valid @RequestBody Zc zc) {
      //获取用户名,判断该用户名是否已注册,或已有用户
      //查询注册表中是否有相同的注册信息
      Zc zc1 = zcService.getAuditSuccessInfo(zc.getUsername());
      if (null!=zc1){
         throw new com.aliyun.oss.ServiceException(StringUtil.format("当前用户名 [{}] 已被注册!", zc.getUsername()));
      }
      //查询用户表中未删除,未离职的用户信息
      User user = iUserService.getUserInfo(zc.getUsername());
      if (null!=user){
         throw new com.aliyun.oss.ServiceException(StringUtil.format("当前用户名 [{}] 已被注册!", zc.getUsername()));
      }
      //当前时间
      SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      String times = df.format(new Date());