| | |
| | | import com.ruoyi.cwgl.domain.FundFlow; |
| | | import com.ruoyi.cwgl.service.IFundFlowService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | |
| | | { |
| | | return toAjax(fundFlowService.confirmFundFlow(id)); |
| | | } |
| | | |
| | | /** |
| | | * 导入资金流水Excel |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:fundFlow:import')") |
| | | @Log(title = "资金流水", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file ) throws Exception |
| | | { |
| | | ExcelUtil<FundFlow> util = new ExcelUtil<FundFlow>(FundFlow.class); |
| | | List<FundFlow> fundFlowList = util.importExcel(file.getInputStream()); |
| | | String message = fundFlowService.importFundFlow(fundFlowList); |
| | | return AjaxResult.success(message); |
| | | } |
| | | |
| | | /** |
| | | * 下载导入资金流水模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:fundFlow:import')") |
| | | @GetMapping("/importTemplate") |
| | | public AjaxResult importTemplate(String exportKey) |
| | | { |
| | | fundFlowService.importTemplate(exportKey); |
| | | return AjaxResult.success("导出请求成功,请稍后点击下载...!"); |
| | | } |
| | | } |