| | |
| | | import net.sf.json.JSONObject; |
| | | import org.apache.commons.codec.Charsets; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.config.FileConfig; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.common.excel.CustomCellWriteHeightConfig; |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | + ",cardid = " + "'" + user.getCardid() + "'" |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(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() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //新增 |
| | | if (null != user.getRtime()) { |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | |
| | |
| | | //内网更新 |
| | | String s1 = |
| | | "update blade_user set status = " + "'" + user.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | |
| | | return R.success("修改成功"); |
| | | } |
| | | } |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | String s1 = |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | if (!states) { |
| | | return R.data(201,null,"保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!"); |
| | |
| | | + ",cell = " + "'" + user.getCell() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | //填写你文件上传的地址以及相应信息 |
| | | String url = "http://61.131.136.25:2081"; |
| | | String access = "zhbaadmin"; |
| | | String secret = "zhbapassword"; |
| | | String bucket = "zhba"; |
| | | String url = FileConfig.url; |
| | | String access = FileConfig.access; |
| | | String secret = FileConfig.secret; |
| | | String bucket = FileConfig.bucket; |
| | | MinioClient minioClient = |
| | | MinioClient.builder() |
| | | .endpoint(url) |
| | |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | //外围url |
| | | String urls = "http://61.131.136.25:2081/zhba/" + newName; |
| | | String urls = FileConfig.url + "/zhba/" + newName; |
| | | //内网 |
| | | String inUrl = FtpConfig.ip + "/zhba/" + newName; |
| | | //返回 |
| | |
| | | "update sys_accreditation_records set status = " + "'" + accreditationRecords1.getStatus() + "'" + |
| | | " " + "where id = " + "'" + accreditationRecords1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //返回 |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | //qfqk 同步 |
| | | myAsyncService.deleteUserByQfqk(user1); |
| | | //内网同步 |
| | | String s1 = "update blade_user set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | String s1 = "update blade_user set is_deleted = 1" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(userService.removeUser(ids)); |
| | | } |
| | |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" + |
| | | " where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | //人员离职后修改派遣记录,修改从业记录 |
| | | updateUserDispatcherExp(user2); |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | } |
| | | |
| | |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //新增 |
| | | if (null != user.getRtime()) { |
| | |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | |