| | |
| | | } |
| | | //startPage(); |
| | | List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE); |
| | | //根据经办人筛选 |
| | | if (StringUtils.isNotBlank(spFinancialExpensesIn.getUsername())) { |
| | | list = list.stream().filter(reimbursementOut -> reimbursementOut.getUsername().contains(spFinancialExpensesIn.getUsername())).collect(Collectors.toList()); // 按name字段过滤 |
| | | } |
| | | |
| | | //根据金额筛选 |
| | | if (spFinancialExpensesIn.getMoney() != null) { |
| | | list = list.stream().filter(reimbursementOut -> new BigDecimal(reimbursementOut.getAmountrequested()) == new BigDecimal(spFinancialExpensesIn.getMoney())).collect(Collectors.toList()); |
| | | } |
| | | //根据创建时间排序 |
| | | Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() { |
| | | @Override |
| | | public int compare(SpFinancialExpensesReimbursementOut o1, SpFinancialExpensesReimbursementOut o2) { |
| | |
| | | } |
| | | |
| | | } |
| | | //001审批通过之后,就需要把“办公室主任”的名字填上 |
| | | if (checkFundVO.getFlowconclusion() == 1 && user.getUserId().equals("001")) { |
| | | serviceReimbursement.setOfficedirector(user.getNickName()); |
| | | } |
| | | |
| | | serviceReimbursementService.updateById(serviceReimbursement); |
| | | |
| | |
| | | Map dataMap = new HashMap(); |
| | | getData(dataMap, id); |
| | | String filePath = getClass().getResource("/template/").getPath(); |
| | | log.info("下载地址是啥???{}", filePath); |
| | | System.out.println(filePath); |
| | | //设置模本装置方法和路径,FreeMarker支持多种模板装载方法。可以重servlet,classpath,数据库教程装载, |
| | | configuration.setDirectoryForTemplateLoading(new File(filePath)); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | String newTime = String.valueOf(Calendar.getInstance().getTimeInMillis()); |
| | | String name = "差旅费报销申请单_" + dataMap.get("XM") + "_" + newTime; |
| | | String name = "差旅费报销申请单_" + dataMap.get("JSR") + "_" + newTime; |
| | | |
| | | //输出文档路径及名称 |
| | | File outFile = new File(RuoYiConfig.getProfile() + "/download/wordtemplate/" + name + ".doc"); |