|  |  | 
 |  |  | package com.ruoyi.web.controller.smartor; | 
 |  |  |  | 
 |  |  | import com.github.pagehelper.ISelect; | 
 |  |  | import com.ruoyi.common.annotation.Log; | 
 |  |  | import com.ruoyi.common.core.controller.BaseController; | 
 |  |  | import com.ruoyi.common.core.domain.AjaxResult; | 
 |  |  | 
 |  |  | import com.ruoyi.common.core.page.TableDataInfo; | 
 |  |  | import com.ruoyi.common.enums.BusinessType; | 
 |  |  | import com.ruoyi.common.exception.base.BaseException; | 
 |  |  | import com.ruoyi.common.utils.PageUtils; | 
 |  |  | import com.ruoyi.common.utils.poi.ExcelUtil; | 
 |  |  | import com.smartor.domain.HeLibrary; | 
 |  |  | import com.smartor.domain.HeLibraryVO; | 
 |  |  | import com.smartor.domain.SvyLibTemplateReq; | 
 |  |  | import com.smartor.domain.SvyLibTemplateVO; | 
 |  |  | import com.smartor.service.IHeLibraryService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.apache.commons.collections4.CollectionUtils; | 
 |  |  | import org.apache.commons.lang3.ObjectUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
 |  |  | 
 |  |  |     //@PreAuthorize("@ss.hasPermi('system:library:list')") | 
 |  |  |     @PostMapping("/list") | 
 |  |  |     public TableDataInfo list(@RequestBody HeLibrary heLibrary) { | 
 |  |  |         startPage(); | 
 |  |  |         PageUtils.startPageByPost(heLibrary.getPageNum(), heLibrary.getPageSize()); | 
 |  |  |         List<HeLibrary> list = heLibraryService.selectHeLibraryList(heLibrary); | 
 |  |  |         return getDataTable(list); | 
 |  |  |         if (CollectionUtils.isNotEmpty(list)) { | 
 |  |  |             //获取total | 
 |  |  |             long total = PageUtils.count(new ISelect() { | 
 |  |  |                 @Override | 
 |  |  |                 public void doSelect() { | 
 |  |  |                     heLibrary.setPageNum(null); | 
 |  |  |                     heLibrary.setPageSize(null); | 
 |  |  |                     heLibraryService.selectHeLibraryList(heLibrary); | 
 |  |  |                 } | 
 |  |  |             }); | 
 |  |  |  | 
 |  |  |             return getDataTable2(total, list); | 
 |  |  |         } | 
 |  |  |         return getDataTable2(0, list); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** |