From fdc9651c4b83c18e044a3a9ac6b5e019ffa6328d Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 04 七月 2025 16:56:03 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java index e8adf33..482865a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java @@ -20,7 +20,6 @@ import com.ruoyi.project.domain.vo.SpFinancialExpensesIn; import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut; import com.ruoyi.project.service.*; -import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysUserService; import com.ruoyi.web.controller.enums.PersonType; @@ -165,6 +164,7 @@ if (APPLICATIONENDTIME == null) { APPLICATIONENDTIME = ""; } + //startPage(); List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE, checkstatus, donorname); //鏍规嵁缁忓姙浜虹瓫閫� @@ -175,6 +175,10 @@ if (spFinancialExpensesIn.getMoney() != null) { list = list.stream().filter(reimbursementOut -> new BigDecimal(reimbursementOut.getAmountrequested()).compareTo(new BigDecimal(spFinancialExpensesIn.getMoney())) == 0).collect(Collectors.toList()); + } + //鏍规嵁涓氬姟缁勭瓫閫� + if (StringUtils.isNotBlank(spFinancialExpensesIn.getDeptnos())) { + list = list.stream().filter(reimbursementOut -> reimbursementOut.getDeptmentno().contains(spFinancialExpensesIn.getDeptnos())).collect(Collectors.toList()); // 鎸塶ame瀛楁杩囨护 } //鏍规嵁鍒涘缓鏃堕棿鎺掑簭 Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() { @@ -316,7 +320,6 @@ serviceReimbursement.setFlowlevel(0L); serviceReimbursement.setBackflowlevel(0L); } - } if (!postids.contains(2) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) { @@ -331,6 +334,32 @@ serviceFundflow.setFlowlevel(serviceFundflowrules.get(0).getFlowlevel() - 1); serviceFundflowService.save(serviceFundflow); + + + SysUser sysUser = null; + if (serviceReimbursement.getFlowlevel() == 0L) { + //缁勯暱淇℃伅 + SysUser su = new SysUser(); + su.setNickName(serviceReimbursement.getManagername()); + List<SysUser> sysUserList = sysUserService.selectUserList(su); + if (sysUserList.size() > 0) { + sysUser = sysUserList.get(0); + } + } else if (serviceReimbursement.getFlowlevel() == 1L) { + //闄堟厱鍗庝俊鎭� + sysUser = sysUserService.selectUserByUserName("047"); + } + ConcurrentHashMap map = new ConcurrentHashMap(); + ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>(); + map.put("鎻愪氦浜猴細", loginUser.getUser().getUserName()); + map.put("鎻愪氦鏃堕棿锛�", new Date()); + map.put("鍐呭锛�", serviceReimbursement.getReason()); + contentList.add(map); + DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); + dingTalkReqVo.setTitle("宸梾瀹℃壒淇℃伅"); + dingTalkReqVo.setNumber(sysUser != null ? sysUser.getPhonenumber() : ""); + dingTalkReqVo.setContents(contentList); + dingTalkService.sendNotification(dingTalkReqVo); } serviceReimbursementService.updateById(serviceReimbursement); @@ -762,7 +791,7 @@ throw new ServiceException("涓嬭浇澶辫触锛岀敤鎴蜂俊鎭嚭閿�", HttpStatus.NO_CONTENT); } - Date dt = rdInfoByItem.get(0).getCreateTime(); + Date dt = rdInfoByItem.get(0).getApplyTime(); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String date = formatter.format(dt); String time = date.substring(0, 10); -- Gitblit v1.9.3