| | |
| | | user.setJurisdiction(one.getId().toString()); |
| | | } |
| | | //新增 |
| | | userService.save(user); |
| | | boolean stats = userService.save(user); |
| | | if (stats) { |
| | | //内网同步 |
| | | String s = "insert into blade_user(" + |
| | | "id,tenant_id,code,account,password,real_name,phone,sex,role_id,dept_id," + |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }else { |
| | | //修改 |
| | | User user1 = userService.getById(user.getId()); |
| | | user.setPassword(user1.getPassword()); |
| | | user.setUpdateTime(new Date()); |
| | | userService.updateById(user); |
| | | |
| | | boolean b = userService.updateById(user); |
| | | if (b) { |
| | | String s1 = |
| | | "update blade_user set account = " + "'" + user.getAccount() + "'" |
| | | + ",code = " + "'" + user.getCode() + "'" |
| | |
| | | + ",cardid = " + "'" + user.getCardid() + "'" |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | |
| | | //返回 |
| | |
| | | dispatcherList.forEach(dispatcher1 -> { |
| | | dispatcher1.setStatus(1); |
| | | dispatcher1.setUpdateTime(new Date()); |
| | | dispatcherService.updateById(dispatcher1); |
| | | |
| | | boolean b = dispatcherService.updateById(dispatcher1); |
| | | if (b) { |
| | | String s1 = |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | String s1 = |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //新增 |
| | | if (null!=user.getRtime()){ |
| | |
| | | experience.setCardid(user.getCardid()); |
| | | experience.setSecurityid(user.getId().toString()); |
| | | //新增 |
| | | experienceService.save(experience); |
| | | |
| | | boolean save = experienceService.save(experience); |
| | | if (save) { |
| | | //内网同步 |
| | | String s = "insert into sys_experience(id,name,entryTime,departureTime,leaving,cardId,companyname,securityId) " + |
| | | "values(" + "'" + experience.getId() + "'" + |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | |
| | | boolean status = userService.updateById(user); |
| | | //qfqk 数据推送 |
| | | if (status){ |
| | | myAsyncService.updateUserByQfqk(user); |
| | | } |
| | | |
| | | //内网更新 |
| | | String s1 = |
| | | "update blade_user set status = " + "'" + user.getStatus() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | |
| | | return R.success("修改成功"); |
| | | } |
| | | } |
| | |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | String s1 = |
| | |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",hold = " + "'" + user.getHold() + "'" |
| | | + ",cell = " + "'" + user.getCell() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指纹图片上传 |
| | | * |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | |
| | | + " " + "where id = " + "'" + user.getId() + "';" + |
| | | "update sys_accreditation_records set status = " + "'" + accreditationRecords1.getStatus() + "'" + |
| | | " " + "where id = " + "'" + accreditationRecords1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //返回 |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",user_type = " + "'" + user.getUserType() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | myAsyncService.deleteUserByQfqk(user1); |
| | | //内网同步 |
| | | String s1 = "update blade_user set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(userService.removeUser(ids)); |
| | | } |
| | |
| | | String s1 = "update blade_user set status = " + user2.getStatus() + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" + |
| | | " where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | //人员离职后修改派遣记录,修改从业记录 |
| | | updateUserDispatcherExp(user2); |
| | |
| | | //1.群访群控数据推送(异步) |
| | | if (status) { |
| | | myAsyncService.qfqkUserSave(user); |
| | | } |
| | | |
| | | |
| | | //2.内网数据推送 |
| | | String s = "insert into blade_user(" + |
| | | "id,tenant_id,account,password,name,real_name,avatar,email,phone,sex," + |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | |
| | | //获取从业记录 |
| | | // List<Experience> experiences = (List<Experience>) userMap.get("userPractitionersInfo"); |
| | |
| | | |
| | | /** |
| | | * 修改派遣记录,修改从业记录 |
| | | * |
| | | * @param user |
| | | */ |
| | | private void updateUserDispatcherExp(User user) { |
| | |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | } |
| | | |
| | |
| | | String s1 = |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //新增 |
| | | if (null!=user.getRtime()){ |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 用户详情 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保安员导出 |
| | | * |
| | | * @param response |
| | | * @param user 查询条件 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保安员账号校验 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 年龄分布查询 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询登录密码还是 123456 的单位信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getNotUpdatePwdInfo") |