com.ruoyi.common.utils.poi.ExcelUtil Java Examples

The following examples show how to use com.ruoyi.common.utils.poi.ExcelUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SysJobLogController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "调度日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:job:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysJobLog jobLog)
{
    List<SysJobLog> list = jobLogService.selectJobLogList(jobLog);
    ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
    return util.exportExcel(list, "调度日志");
}
 
Example #2
Source File: DemoOperateController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 导出
 */
@PostMapping("/export")
@ResponseBody
public AjaxResult export(UserOperateModel user)
{
    List<UserOperateModel> list = new ArrayList<UserOperateModel>(users.values());
    ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
    return util.exportExcel(list, "用户数据");
}
 
Example #3
Source File: SysOperlogController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
@GetMapping("/export")
public AjaxResult export(SysOperLog operLog)
{
    List<SysOperLog> list = operLogService.selectOperLogList(operLog);
    ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
    return util.exportExcel(list, "操作日志");
}
 
Example #4
Source File: SysJobController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
/**
 * 导出定时任务列表
 */
@PreAuthorize("@ss.hasPermi('monitor:job:export')")
@Log(title = "定时任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(SysJob sysJob)
{
    List<SysJob> list = jobService.selectJobList(sysJob);
    ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
    return util.exportExcel(list, "定时任务");
}
 
Example #5
Source File: SysLogininforController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "登陆日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
@GetMapping("/export")
public AjaxResult export(SysLogininfor logininfor)
{
    List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
    ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
    return util.exportExcel(list, "登陆日志");
}
 
Example #6
Source File: SysRoleController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:role:export')")
@GetMapping("/export")
public AjaxResult export(SysRole role)
{
    List<SysRole> list = roleService.selectRoleList(role);
    ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
    return util.exportExcel(list, "角色数据");
}
 
Example #7
Source File: SysUserController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:user:export')")
@GetMapping("/export")
public AjaxResult export(SysUser user)
{
    List<SysUser> list = userService.selectUserList(user);
    ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
    return util.exportExcel(list, "用户数据");
}
 
Example #8
Source File: SysUserController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('system:user:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
    ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
    List<SysUser> userList = util.importExcel(file.getInputStream());
    LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
    String operName = loginUser.getUsername();
    String message = userService.importUser(userList, updateSupport, operName);
    return AjaxResult.success(message);
}
 
Example #9
Source File: SysConfigController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:config:export')")
@GetMapping("/export")
public AjaxResult export(SysConfig config)
{
    List<SysConfig> list = configService.selectConfigList(config);
    ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
    return util.exportExcel(list, "参数数据");
}
 
Example #10
Source File: SysDictTypeController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictType dictType)
{
    List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
    ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
    return util.exportExcel(list, "字典类型");
}
 
Example #11
Source File: SysPostController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:post:export')")
@GetMapping("/export")
public AjaxResult export(SysPost post)
{
    List<SysPost> list = postService.selectPostList(post);
    ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
    return util.exportExcel(list, "岗位数据");
}
 
Example #12
Source File: SysDictDataController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictData dictData)
{
    List<SysDictData> list = dictDataService.selectDictDataList(dictData);
    ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
    return util.exportExcel(list, "字典数据");
}
 
Example #13
Source File: SysJobLogController.java    From RuoYi-Vue with MIT License 5 votes vote down vote up
/**
 * 导出定时任务调度日志列表
 */
@PreAuthorize("@ss.hasPermi('monitor:job:export')")
@Log(title = "任务调度日志", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(SysJobLog sysJobLog)
{
    List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
    ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
    return util.exportExcel(list, "调度日志");
}
 
Example #14
Source File: SysOperlogController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:operlog:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysOperLog operLog)
{
    List<SysOperLog> list = operLogService.selectOperLogList(operLog);
    ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
    return util.exportExcel(list, "操作日志");
}
 
Example #15
Source File: SysJobController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "定时任务", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:job:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysJob job)
{
    List<SysJob> list = jobService.selectJobList(job);
    ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
    return util.exportExcel(list, "定时任务");
}
 
Example #16
Source File: SysLogininforController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "登陆日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:logininfor:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysLogininfor logininfor)
{
    List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
    ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
    return util.exportExcel(list, "登陆日志");
}
 
Example #17
Source File: SysRoleController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:role:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysRole role)
{
    List<SysRole> list = roleService.selectRoleList(role);
    ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
    return util.exportExcel(list, "角色数据");
}
 
Example #18
Source File: SysUserController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:user:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysUser user)
{
    List<SysUser> list = userService.selectUserList(user);
    ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
    return util.exportExcel(list, "用户数据");
}
 
Example #19
Source File: SysUserController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
@RequiresPermissions("system:user:import")
@PostMapping("/importData")
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
    ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
    List<SysUser> userList = util.importExcel(file.getInputStream());
    String operName = getSysUser().getLoginName();
    String message = userService.importUser(userList, updateSupport, operName);
    return AjaxResult.success(message);
}
 
Example #20
Source File: SysUserController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@RequiresPermissions("system:user:view")
@GetMapping("/importTemplate")
@ResponseBody
public AjaxResult importTemplate()
{
    ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
    return util.importTemplateExcel("用户数据");
}
 
Example #21
Source File: SysConfigController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:config:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysConfig config)
{
    List<SysConfig> list = configService.selectConfigList(config);
    ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
    return util.exportExcel(list, "参数数据");
}
 
Example #22
Source File: SysDictTypeController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:dict:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysDictType dictType)
{

    List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
    ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
    return util.exportExcel(list, "字典类型");
}
 
Example #23
Source File: SysPostController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:post:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysPost post)
{
    List<SysPost> list = postService.selectPostList(post);
    ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
    return util.exportExcel(list, "岗位数据");
}
 
Example #24
Source File: SysDictDataController.java    From ruoyiplus with MIT License 5 votes vote down vote up
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:dict:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysDictData dictData)
{
    List<SysDictData> list = dictDataService.selectDictDataList(dictData);
    ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
    return util.exportExcel(list, "字典数据");
}
 
Example #25
Source File: StoreGoodsCateController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 导出商城商品分类列表
 */
@RequiresPermissions("shop:cate:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(StoreGoodsCate storeGoodsCate)
{
    List<StoreGoodsCate> list = storeGoodsCateService.selectStoreGoodsCateList(storeGoodsCate);
    ExcelUtil<StoreGoodsCate> util = new ExcelUtil<StoreGoodsCate>(StoreGoodsCate.class);
    return util.exportExcel(list, "cate");
}
 
Example #26
Source File: DemoOperateController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 下载模板
 */
@GetMapping("/importTemplate")
@ResponseBody
public AjaxResult importTemplate()
{
    ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
    return util.importTemplateExcel("用户数据");
}
 
Example #27
Source File: DemoOperateController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 导入数据
 */
@PostMapping("/importData")
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
    ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
    List<UserOperateModel> userList = util.importExcel(file.getInputStream());
    String message = importUser(userList, updateSupport);
    return AjaxResult.success(message);
}
 
Example #28
Source File: SysOperlogController.java    From supplierShop with MIT License 5 votes vote down vote up
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:operlog:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysOperLog operLog)
{
    List<SysOperLog> list = operLogService.selectOperLogList(operLog);
    ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
    return util.exportExcel(list, "操作日志");
}
 
Example #29
Source File: SysLogininforController.java    From supplierShop with MIT License 5 votes vote down vote up
@Log(title = "登陆日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:logininfor:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysLogininfor logininfor)
{
    List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
    ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
    return util.exportExcel(list, "登陆日志");
}
 
Example #30
Source File: StoreCouponController.java    From supplierShop with MIT License 5 votes vote down vote up
/**
 * 导出优惠券主列表
 */
@RequiresPermissions("shop:coupon:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(StoreCoupon storeCoupon)
{
    List<StoreCoupon> list = storeCouponService.selectStoreCouponList(storeCoupon);
    ExcelUtil<StoreCoupon> util = new ExcelUtil<StoreCoupon>(StoreCoupon.class);
    return util.exportExcel(list, "coupon");
}