| | |
| | | * 偏离单文件末尾的模式:P+数字 |
| | | */ |
| | | private static final String P_NUMBER_PATTERN = "(?i)P\\d+"; |
| | | //static String[] encodings = {"UTF-8","GBK", "GB2312", "ISO-8859-1"}; |
| | | private String getFileKey(){ |
| | | return "dncimpfile-"+ AuthUtil.getUserId(); |
| | | } |
| | |
| | | result = parseProgramListByCharset(byteInsStream,Charset.forName(encoding)); |
| | | log.error("使用编码 {} 解析成功 ",encoding); |
| | | break; |
| | | }catch (ServiceException se) { |
| | | log.error("数据不正确异常:",se); |
| | | break; |
| | | } catch (Exception e) { |
| | | byteInsStream.reset(); |
| | | log.error("使用编码 {} 解析失败: ",encoding,e); |
| | | log.error("使用编码 {} 解析失败:",encoding,e); |
| | | } |
| | | } |
| | | if(result != null) { |
| | |
| | | @Transactional |
| | | public void dncFileAccept(String ids) throws IOException { |
| | | List<Long> acceptIdList = Func.toLongList(ids); |
| | | // |
| | | NcProgramExchange exchange; |
| | | |
| | | String filekey = getFileKey(); |
| | | String zipFileName = bladeRedis.get(filekey); |
| | | log.info("filekey={},文件名={}",filekey,zipFileName); |