<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 一、概述 導出的數據量特別大的時候,系統需要消耗大量計算時間的情況下,可以采用異步導出數據的方案來提升用戶體驗; 平臺提供了完整的解決方案來實現異步導出機制; ## 二、方案 參考異步任務的技術特性:[后端框架/SprigBoot/核心技術/異步任務](%E5%90%8E%E7%AB%AF%E6%A1%86%E6%9E%B6/SprigBoot/%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF/%E5%BC%82%E6%AD%A5%E4%BB%BB%E5%8A%A1.md) 相關配置: ``` rayframework.path.static-exported-local-root-path=/usr/lib/app/resource/exported/ rayframework.url.static-exported-local-access-url=http://dns/rayapp ``` 導出的業務代碼: ``` @RayServiceMethod public ResponseObject exportAll() throws Exception { exportAgentCardAction.exportAction(model, asynOrderExecutor.startExportOrder("導出代理卡片", model)); return responseObj; } ``` ``` @Component public class ExportAgentCardAction extends BaseAsynAction { @Autowired private CardInfoDao cardInfoDao; @Autowired private SysStaffRelationDao sysStaffRelationDao; @Async public void exportAction(RayModel model, SysAsynOrder sysAsynOrder) throws Exception { List<Long> myAgentList = sysStaffRelationDao.getStaffIdListByRelatedStaffIdAndRelationType(model.getCurLoginData().getCurStaffId(), RayiotSysStaffRelationType.parent_agent); myAgentList.add(model.getCurLoginData().getCurStaffId()); List<CardInfo> cardinfoList = cardInfoDao.findByTerminalAgentStaffIn(myAgentList); String[] paths = asynOrderExecutor.generatingExportedFilePaths(); excelExportProcessor.export(paths[0], new ExportExcelCallback() { @Override public String buildExcelObject(XSSFSheet sheet, Object... exportedDataObjects) throws Exception { int i = 0; Row title = sheet.createRow(i); title.createCell(0).setCellValue("序號"); title.createCell(1).setCellValue("用戶碼"); title.createCell(2).setCellValue("Iccid碼"); title.createCell(3).setCellValue("接入碼"); List<CardInfo> dataList = (List<CardInfo>) exportedDataObjects[0]; for (CardInfo cardinfo : cardinfoList) { //省略業務邏輯代碼 } return null; } }, cardinfoList); asynOrderExecutor.completeExportOrder(sysAsynOrder, paths[1], "完成", AsynOrderStatus.EXECUTED_SUCCESS); } } ``` 這樣,就實現了異步導出,在下載訂單列表里面,即可查看生成的文件情況,如果生成完成,即可得到生成的文件鏈接,下載即可;
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看