liusheng
3 天以前 fdc9651c4b83c18e044a3a9ac6b5e019ffa6328d
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()); // 按name字段过滤
        }
        //根据创建时间排序
        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);
@@ -489,8 +518,8 @@
                }
            }
            //001审批通过之后,就需要把“办公室主任”的名字填上
            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("001")) {
            //053审批通过之后,就需要把“办公室主任”的名字填上
            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
                serviceReimbursement.setOfficedirector(user.getNickName());
                serviceReimbursement.setUploadStates(1);
            }
@@ -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);