当前位置: 首页 > news >正文

傻瓜式网站广告设计专业有什么可从事的工作

傻瓜式网站,广告设计专业有什么可从事的工作,织梦怎么更新网站html,重庆公司章程在哪里可以查询打印问题描述 测试出来一个问题#xff0c;使用地市的角色#xff0c;导出数据然后超过了20w的数据#xff0c;提示报错#xff0c;我还以为是偶然的问题#xff0c;然后是发现是普遍的问题#xff0c;本地环境复现了#xff0c;然后是#xff0c;这个功能是三套角色…问题描述 测试出来一个问题使用地市的角色导出数据然后超过了20w的数据提示报错我还以为是偶然的问题然后是发现是普遍的问题本地环境复现了然后是这个功能是三套角色分别是集团省份地市。我用集团省份角色查了这个地市导出数据没有问题然后我就好奇了。 报错问题 2024-10-22 15:17:05.612 ERROR 38604 --- [ XNIO-1 task-38] c.a.a.c.AssetDetailsQueryLocalController : exceptions message:68 2024-10-22 15:18:59.375 INFO 38604 --- [ XNIO-1 task-38] cn.chinaunicom.ams.utils.EasyExcelUtils : 压缩完成耗时5877 ms 2024-10-22 15:18:59.504 ERROR 38604 --- [ XNIO-1 task-38] cn.chinaunicom.core.util.CephUtil : exceptions message:java.io.FileInputStream.open0(Native Method) 2024-10-22 15:18:59.511 ERROR 38604 --- [ XNIO-1 task-38] cn.chinaunicom.core.util.CephUtil : exceptions message:上传文件:对象名export\2024\10\22\资产明细报表_20241022_151557260.xlsx全路径file/ams/export\2024\10\22\资产明细报表_20241022_151557260.xlsx 2024-10-22 15:18:59.512 ERROR 38604 --- [ XNIO-1 task-38] c.a.a.c.AssetDetailsQueryLocalController : exceptions message:cn.chinaunicom.core.util.CephUtil.uploadExportFile(CephUtil.java:191)代码描述 /*** 资产全量报表查询-导出资产全量报表信息 期间查询* param response* param request* param requestBody*/ResponseBodyPostMapping(/exportDetailViewListPeriodName)ApiOperation(value 资产全量报表查询-导出资产全量报表信息, notes 资产全量报表查询-导出资产全量报表信息)OperateLog(资产全量报表查询-导出资产全量报表信息)RsaDecrypt(msg 查询失败, isModuleSign true, moduleName AssetDetailsQueryAllRequestBody)public void exportDetailViewListPeriodName(AssetDetailsQueryLocalRequestBody requestBody,HttpServletResponse response, HttpServletRequest request) {try {//j后台取值 账簿信息ListString bookTypeCodeList constantAbtOracleService.getBookTypeCodes(1);/*** 账簿后台获取*/if(bookTypeCodeList.size() 1){requestBody.setBookTypeCode(bookTypeCodeList.get(0));}String condition assetDetailsQueryLocalService.queryViewListForExportcondition(requestBody);if(StringUtils.isNotBlank(requestBody.getManufacturerName())){requestBody.setManufacturerName(URLDecoder.decode(requestBody.getManufacturerName()));}long start System.currentTimeMillis();int count 0;//批量资产编号String[] assetNumberStr null;if (requestBody.getAssetNumbers() ! null !().equals(requestBody.getAssetNumbers())) {assetNumberStr requestBody.getAssetNumbers().split(,);}requestBody.setAssetNumberStr(assetNumberStr);//批量资产标签号String[] tagNumberStr null;if (requestBody.getTagNumbers() ! null !().equals(requestBody.getTagNumbers())) {tagNumberStr requestBody.getTagNumbers().split(,);}requestBody.setTagNumberStr(tagNumberStr);Date nowTime new Date();// 往数据库存储的路径不含配置的前缀路径String dbSavePath export File.separator new SimpleDateFormat(yyyy).format(nowTime) File.separator new SimpleDateFormat(MM).format(nowTime) File.separator new SimpleDateFormat(dd).format(nowTime) File.separator;// 临时文件实际保存路径String fileSavePath ExportExcelUtils.getImplementTemplate(request) dbSavePath;// 获取保存路径,没有对应目录的话自行创建String savePath FileUtil.createDir(fileSavePath);Date d new Date();SimpleDateFormat sdf new SimpleDateFormat(yyyyMMdd_HHmmssSSS);String dateNowStr sdf.format(d);AssetExportFile exportFile new AssetExportFile();String fileName;String fileType;String fileNameInfo;fileNameInfo 资产明细报表_;fileNamefileNameInfodateNowStr;exportFile.setFileName(fileName);//导出临时文件的命名String filePathFront savePath 资产明细报表_ dateNowStr;// 数据库里存的文件路径即上传到云平台的文件命名exportFile.setFilePath(filePathFront);NowUser nowUser WebUtil.getNowUser();exportFile.setCreatedBy(nowUser.getStaffId());Date date new Date();SimpleDateFormat sdf1 new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);//导出文件记录中新增一条记录exportFile.setCreatedDate(sdf1.format(date));exportFile.setExportStatus(FlowUtils.EXPORT_START);exportFile.setCreateName(nowUser.getStaffName());exportFile.setFileCondition(condition);final int file1 exportFileService.insertExportFile(exportFile);String exportFileId exportFile.getId();// String endChar requestBody.getBookTypeCode().substring(3,5);String endChar assetDetailsQueryAllService.getTableNameByBookTypeCode(requestBody.getBookTypeCode());String periodName requestBody.getPeriodName().replace(-,);requestBody.setTableName(CAMS_ASSET_DETAIL_ endChar_periodName);//1、根据查询条件获取集合-erpListAssetDetailsExcel resultnew ArrayList();//返回结果//开始查询的行数long startTime System.currentTimeMillis();try{//1、根据查询条件获取集合-erpresult assetDetailsQueryLocalService.queryViewListForExportPeriodName(requestBody);}catch(Exception exception){log.error(导出数据异常 exception);}long endTime System.currentTimeMillis();countresult.size();if(countFlowUtils.COUNT_FOR_TYPE){//生成zip格式fileNamefileNameInfodateNowStr.zip;fileTypeFlowUtils.ZIP_TYPE;exportFile.setFileType(fileType);}else{// 生成xlsx格式fileName fileNameInfodateNowStr.xlsx;fileTypeFlowUtils.XLSX_TYPE;exportFile.setFileType(fileType);}exportFile.setFileName(fileName);// 导出临时文件最终命名和路径String finalFilePath filePathFront . fileType;//上传到服务器的实际文件的命名String finalFileName dbSavePath 资产明细报表_ dateNowStr . fileType;// 数据库里存的文件路径即上传到云平台的文件命名exportFile.setFilePath(finalFileName);log.error(exceptions message:{}, String.valueOf((endTime - startTime) / 1000));//一个excel的总数据量int oneExcelSize FlowUtils.ONE_EXCEL_SIZE;//需导出的总数据量int resultCount result.size();//计算需要导出的excel的个数int excelCount resultCount%oneExcelSize0?resultCount/oneExcelSize:(resultCount/oneExcelSize 1);//声明fileList大小为excelCountfinal ListFile resultFileList new ArrayList(excelCount);EasyExcelUtils easyExcelUtils new EasyExcelUtils();if (excelCount1){// 多个文件多线程并发写入for(int i0;iexcelCount;i){resultFileList.add(null);}for(int i0;iexcelCount;i){final int index i;// 按每个excel的数据量大小来切分查询结果listfinal ListAssetDetailsExcel res resultCount(index1)*oneExcelSize?result.subList(index*oneExcelSize,resultCount):result.subList(index*oneExcelSize,(index1)*oneExcelSize);//文件命名String excelFileName savePath资产明细报表_dateNowStr-String.valueOf(i1).xlsx;File file new File(excelFileName);resultFileList.set(index,file);EasyExcel.write(excelFileName,AssetDetailsExcel.class).sheet(sheet).doWrite(res);}// 压缩文件final File file easyExcelUtils.compressFile(resultFileList, true, exportFileId, filePathFront);} else {EasyExcel.write(finalFilePath,AssetDetailsExcel.class).sheet(sheet).doWrite(result);}//文件上传到慧企平台 --todoCephUtil.uploadExportFile(finalFileName, finalFilePath);//文件上传到慧企平台后删除临时文件 todoboolean resultTemp valueSetController.executeFile(finalFilePath);// 更新导出文件记录exportFile.setId(exportFileId);exportFile.setExportStatus(FlowUtils.EXPORT_DONE);exportFileService.updateStatusFileNameById(exportFile);long end System.currentTimeMillis();} catch (Exception e) {log.error(exceptions message:{},e.getStackTrace());}}/*** 本地文件上传到ceph** param objName 上传上去的对象名经测试长度不能超1024* param fileAllPath 将要上传的本地文件全路径* return*/public static boolean uploadExportFile(String objName, String fileAllPath) throws IOException {FileInputStream fis null;try {AmazonS3 conn connCeph();File file new File(fileAllPath);int imageSize 0;try {fis new FileInputStream(file);imageSize fis.available();} catch (Exception e) {log.error(exceptions message:{},e.getStackTrace());}ObjectMetadata om new ObjectMetadata();om.setContentLength(imageSize);conn.putObject(DEFAULT_BUCKET_NAME, objName, fis, om);if (ONLINE.equals(true)) {fis new FileInputStream(file);AmazonS3 conn2 connCeph2();conn2.putObject(DEFAULT_BUCKET_NAME2, objName, fis, om);log.error(exceptions message:{}, 上传文件:对象名 objName 全路径 fileAllPath);return true;}} catch (Exception e) {log.error(exceptions message:{}, 上传文件:对象名 objName 全路径 fileAllPath);} finally {fis.close();}return false;}问题处理 真的找了好久想到了一个思路才发现了问题处理首先这个报错提示是找不到文件然后开始倒查。首先这个功能是有三套前端两套后端然后这也是我后面反应过来的问题问题是出现在地市的角色上地市角色使用本功能因为数据量在20w增加一个条件之后导出了300条数据直到我一条一条debug发现提示找不到文件然后在删除文件之前我去debug找了具体的问题。 直到发现了这个问题我才想起来之前我改了一版修改的是最大的文件数是从100000变成了300000然后发现我只改了一个静态变量只改了一个文件的判断是不是最多条的数量但是一个excel中的最大条数还是100000然后就提示报错了该说不说这个问题我真的找了好久因为确实是文件找不到报错的地方。
http://www.hkea.cn/news/14467982/

相关文章:

  • 中国专业的网站建设网页制作的开发平台
  • 网站备案被取消网站开发都用什么软件
  • 网站建设要哪些工作视频拍摄教程
  • 西安建站网站盐城高端网站建设
  • 狮城app更多网站dedecms可以做什么网站
  • 找人做企业网站 注意什么互动营销网站
  • 郑州市制作网站的公司中国能建旗下公司排名
  • 淄博网站制作怎么收费湛江住房和城乡建设局网站
  • 淘宝导购网站怎么做微信平台开发多少钱
  • 衡阳网站设计ss0734做招商网站
  • 有哪些专门做展会创意的网站安卓优化大师历史版本
  • 天津seo网站管理网站设计贵不贵
  • 网站开发 项目规划 怎么写seo免费诊断联系方式
  • 宁波网站建设哪家快公司有网站有什么好处
  • wordpress4.9+多站点湛江网站建设电话
  • 懒人建站微网站入口
  • 学校二级网站建设2014中文网站seo排名名单
  • 如何美化wordpress主题wordpress优化服务器
  • 深圳网站做优化哪家公司好c2c模式的特点类似于现实商务世界中的跳蚤市场
  • 手机制作网站的软件有哪些威海推广
  • 网站文章页做百度小程序wordpress分页插件下载
  • 网站备案文件防止域名失效 请牢记
  • 上海自助建站费用公司seo推广营销网站
  • 在网站建设工作会议上的讲话网站标题可以修改吗
  • 安徽城乡住房建设厅网站哈尔滨品牌网站建设
  • 工程类招聘网站哪个好专业网站建设全包
  • 城市建设的网站 政策法规自学网站平面设计
  • 重庆seo整站优化系统微信公众号的h5网站开发6
  • 电子商务网站开发实南宁网站建公司电话
  • 类似云盘 网站开发杭州网站建设交易