| | |
| | | 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; |
| | |
| | | if (APPLICATIONENDTIME == null) { |
| | | APPLICATIONENDTIME = ""; |
| | | } |
| | | |
| | | //startPage(); |
| | | List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE, checkstatus, donorname); |
| | | //根据经办人筛选 |
| | |
| | | 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()); // 按name字段过滤 |
| | | } |
| | | //根据创建时间排序 |
| | | Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() { |
| | |
| | | serviceReimbursement.setFlowlevel(0L); |
| | | serviceReimbursement.setBackflowlevel(0L); |
| | | } |
| | | |
| | | } |
| | | |
| | | if (!postids.contains(2) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) { |
| | |
| | | |
| | | 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); |
| | |
| | | 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); |