| | |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.system.importExcel.TBankFlowImportExcel; |
| | | import com.ruoyi.system.model.TBankFlow; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @ApiOperation(value = "获取银行流水列表") |
| | | @PostMapping("/list") |
| | | public R<PageInfo<TBankFlow>> list(@RequestBody TBankFlowQuery query) { |
| | | query.setBusinessDeptId(SecurityUtils.getBusinessDeptId()); |
| | | return R.ok(flowService.pageList(query)); |
| | | } |
| | | |
| | |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | int size = list.size(); |
| | |
| | | } |
| | | } |
| | | }).sheet().doRead(); |
| | | |
| | | |
| | | // 导出导入结果 |
| | | HttpServletResponse response = WebUtils.response(); |
| | | response.setContentType("application/vnd.ms-excel;charset=utf-8"); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | if (failList.size() > 0) { |
| | | EasyExcel.write(response.getOutputStream(), TBankFlowImportExcel.class).sheet("Sheet1").doWrite(failList); |
| | | } else { |
| | |
| | | failList.add(result); |
| | | EasyExcel.write(response.getOutputStream(), TBankFlowImportExcel.class).sheet("Sheet1").doWrite(failList); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("银行流水返回结果导出失败"); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("getByBankSerialNumber") |
| | | public R<List<TBankFlow>> searchByBankSerialNumber(@RequestParam String bankSerialNumber){ |
| | | List<TBankFlow> tBankFlows = flowService.searchByBankSerialNumber(bankSerialNumber); |
| | | return R.ok(tBankFlows); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |