Administrator
2022-06-10 7b291d619aa70e5bb33f2b1caabe7f4b0bd003d9
src/main/java/org/springblade/modules/FTP/DataHanlder.java
@@ -60,6 +60,19 @@
      hanlder.iDeptService = this.iDeptService;
   }
   /**
    * 保安员审查
    * @param json
    */
   public static void handlerUserExamine(String json) {
      User user = JSON.parseObject(json, User.class);
      //获取用户cardid
      User user1 = hanlder.userService.getById(user.getId());
      //用户审查
      hanlder.myAsyncService.checkUserExamineByCardNo(user1);
   }
   /**
    * 获取保安员证编号
    * @param json
@@ -203,7 +216,7 @@
   }
   /**
    * 数据处理
    * 数据处理(单个保安员新增)
    * @param json
    */
   public static void handler(String json){
@@ -214,6 +227,8 @@
         Map map = JSON.parseObject(s, Map.class);
         Object user = map.get("user");
         User user1 = JSON.parseObject(user.toString(), User.class);
         System.out.println("user1 = " + user1);
         //获取 uuid
         String uuid = user1.getReasonForLeav();
         //用户数据校验
@@ -279,8 +294,9 @@
         }
         Map<String, Object> map1 = new HashMap<>(1);
         map1.put(uuid,result1);
         System.out.println("用户新增:开始向外网推送数据............");
         //向外网发送数据
         FtpUtil.objectFileUpload(map1);
         FtpUtil.objectFileUpload(map1,uuid);
      }
   }
@@ -307,7 +323,7 @@
                  one.setUpdateTime(new Date());
                  //离职
                  hanlder.userService.updateById(one);
                  //内网同步
                  //同步外网
                  String s1 = "update blade_user set status = " + one.getStatus() +
                     ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(one.getUpdateTime()) + "'" +
                     " where id = " + "'" + one.getId() + "'";
@@ -315,6 +331,8 @@
                  //人员离职后修改派遣记录,修改从业记录
                  hanlder.updateUserDispatcherExp(one);
                  //返回
                  return new Result(200,null,"");
               }
            }
            return new Result(400,null,user.getRealName() + "已在其他单位导入");