yxh
22 小时以前 8c215c8be0f5076e8c95daf1b2203440ca7dfcad
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -545,7 +545,7 @@
            //记录一下,下一级的审批,以便于下一级退回后,发起者提交时,能再提到当前审批层级
            serviceFund.setBackflowlevel(FlowLevel);
        } //else {
        } else {
            CheckFlag = 2;
            if (CheckFlag == 2) {
                //应医院要求如果出现退回,直接退到发起者
@@ -559,27 +559,25 @@
                    FlowLevel = 0;
                }
            }
            SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
            //审批未通过:单据信息 + 审批人/审批时间/意见(意见 = "审批未通过。" + 驳回意见)
            List<ConcurrentHashMap<String, Object>> contentList = FundNotifyMessageBuilder.newRows();
            FundNotifyMessageBuilder.addBillInfo(contentList, serviceFund.getApplytype(),
                    serviceFund.getUsername(), serviceFund.getPretaxcost(), serviceFund.getDonorname(),
                    FundNotifyMessageBuilder.billNo(serviceFund.getBh(), serviceFund.getId()));
            FundNotifyMessageBuilder.addAuditResult(contentList, loginUser.getUser().getNickName(), new Date(),
                    FundNotifyMessageBuilder.opinion(FundNotifyMessageBuilder.CONCLUSION_REJECT,
                            checkFundVO.getFlowcontent()));
            try {
                DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
                dingTalkReqVo.setTitle(FundNotifyMessageBuilder.TITLE);
                dingTalkReqVo.setNumber(sysUser.getPhonenumber());
                dingTalkReqVo.setContents(contentList);
                dingTalkService.sendNotification(dingTalkReqVo);
            } catch (Exception e) {
                log.error("费用---审批未通过钉钉通知失败,fundId={}", serviceFund.getId(), e);
            }
        //}
        }
        SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
        //审批未通过:单据信息 + 审批人/审批时间/意见(意见 = "审批未通过。" + 驳回意见)
        List<ConcurrentHashMap<String, Object>> contentList = FundNotifyMessageBuilder.newRows();
        FundNotifyMessageBuilder.addBillInfo(contentList, serviceFund.getApplytype(),
                serviceFund.getUsername(), serviceFund.getPretaxcost(), serviceFund.getDonorname(),
                FundNotifyMessageBuilder.billNo(serviceFund.getBh(), serviceFund.getId()));
        FundNotifyMessageBuilder.addAuditResult(contentList, loginUser.getUser().getNickName(), new Date(),
                FundNotifyMessageBuilder.opinion(checkFundVO.getFlowconclusion()+"",
                        checkFundVO.getFlowcontent()));
        try {
            DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
            dingTalkReqVo.setTitle(FundNotifyMessageBuilder.TITLE);
            dingTalkReqVo.setNumber(sysUser.getPhonenumber());
            dingTalkReqVo.setContents(contentList);
            dingTalkService.sendNotification(dingTalkReqVo);
        } catch (Exception e) {
            log.error("费用---审批未通过钉钉通知失败,fundId={}", serviceFund.getId(), e);
        }
        serviceFund.setRecordstatus(RecordStatus);
        serviceFund.setFlowlevel(FlowLevel.longValue());
        //  serviceFund.setBackflowlevel(serviceFund.getFlowlevel());
@@ -1585,6 +1583,28 @@
            // 保存详情数据
            for (ServiceFunddetailVO serviceFunddetailVO : serviceFunddetails) {
                // 2026-10-15:附件文件名规范二次校验(与前端 fileNameCheck 同口径;只校验本次变更的附件,历史附件放行)
                java.util.Set<String> existingNames = new java.util.HashSet<>();
                if (serviceFunddetailVO.getId() != null) {
                    ServiceFunddetail oldDetail = serviceFunddetailMapper.selectById(serviceFunddetailVO.getId());
                    if (oldDetail != null) {
                        existingNames.addAll(com.ruoyi.project.common.AttachmentNameValidator
                                .collectNames(oldDetail.getInvoicefiles()));
                        existingNames.addAll(com.ruoyi.project.common.AttachmentNameValidator
                                .collectNames(oldDetail.getAnnexfiles()));
                    }
                }
                String invoiceJson = CollectionUtils.isEmpty(serviceFunddetailVO.getInvoicefilesList())
                        ? serviceFunddetailVO.getInvoicefiles()
                        : JSON.toJSONString(serviceFunddetailVO.getInvoicefilesList());
                String annexJson = CollectionUtils.isEmpty(serviceFunddetailVO.getAnnexfilesList())
                        ? serviceFunddetailVO.getAnnexfiles()
                        : JSON.toJSONString(serviceFunddetailVO.getAnnexfilesList());
                String nameError = com.ruoyi.project.common.AttachmentNameValidator
                        .checkJsonListForUpdate(existingNames, invoiceJson, annexJson);
                if (nameError != null) {
                    throw new BaseException("附件文件名不符合要求,无法保存:" + nameError);
                }
                //去掉身份证的首尾空格
                if (StringUtils.isNotEmpty(serviceFunddetailVO.getIdcardno())) {
                    serviceFunddetailVO.setIdcardno(serviceFunddetailVO.getIdcardno().trim());