| | |
| | | else { |
| | | for (int i = files.length-1; i >=0 ; i--) { |
| | | String fileName = files[i].getName(); |
| | | String substring1 = fileName.substring(0, 2); |
| | | System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+":读取到文件 = " + fileName); |
| | | if (fileName.contains("nq")) { |
| | | if (substring1.contains("nq")) { |
| | | //把文件下载到本地 |
| | | long l = System.currentTimeMillis(); |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserNameIn, ftpPasswordIn, ftpPort, ftpPath, localPath, fileName); |
| | |
| | | else { |
| | | for (int i = files.length-1; i >=0 ; i--) { |
| | | String fileName = files[i].getName(); |
| | | String substring = fileName.substring(0, 2); |
| | | System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+":读取到文件 = " + fileName); |
| | | if (fileName.contains("ni")) { |
| | | if (substring.contains("ni")) { |
| | | // InputStream is = ftp.retrieveFileStream(new String(fileName.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING)); |
| | | //把文件下载到本地 |
| | | long l = System.currentTimeMillis(); |
| | |
| | | else { |
| | | for (int i = files.length-1; i >=0 ; i--) { |
| | | String fileName = files[i].getName(); |
| | | String substring = fileName.substring(0, 2); |
| | | System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+":读取到文件 = " + fileName); |
| | | if (fileName.contains("nl")) { |
| | | if (substring.contains("nl")) { |
| | | //把文件下载到本地 |
| | | long l = System.currentTimeMillis(); |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserNameIn, ftpPasswordIn, ftpPort, ftpPath, localPath, fileName); |
| | |
| | | } |
| | | if (result1.getCode()==203){ |
| | | //保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请! 内网用户已存在情况 |
| | | user.setHold("2"); |
| | | user.setSecuritynumber(""); |
| | | user.setId(result.getUserId()); |
| | | //先查询当前库是否有改用户? |
| | | User user2 = userService.getById(result.getUserId()); |
| | |
| | | else { |
| | | for (int i = files.length-1; i >=0 ; i--) { |
| | | String fileName = files[i].getName(); |
| | | String substring = fileName.substring(0, 2); |
| | | System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+":读取到文件 = " + fileName); |
| | | if (fileName.contains("nt")) { |
| | | if (substring.contains("nt")) { |
| | | //把文件下载到本地 |
| | | long l = System.currentTimeMillis(); |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserNameIn, ftpPasswordIn, ftpPort, ftpPath, localPath, fileName); |
| | |
| | | } |
| | | } else if (result.getCode() == 203) { |
| | | //保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请! 用户为新增 |
| | | users.setHold("2"); |
| | | users.setSecuritynumber(""); |
| | | //新增 |
| | | users.setId(result.getUserId()); |
| | | //插入数据库 |
| | |
| | | handlerLogService.save(handlerLog); |
| | | } else if (result.getCode() == 204) { |
| | | //保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请! 内网用户已存在情况 |
| | | users.setHold("2"); |
| | | users.setSecuritynumber(""); |
| | | users.setId(result.getUserId()); |
| | | //先查询当前库是否有改用户? |
| | | User user2 = userService.getById(result.getUserId()); |