yxh
8 天以前 edbfa6b1a3a45e79cb17b06f3798535c3b1ba395
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -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());
@@ -855,7 +853,9 @@
            }
            map.put("发票识别", null);
            map.put("识别人", null);
            map.put("税额", serviceFunddetailShared.getTaxamount());
            // 明细“税额”按“扣税合计”口径:劳务个税 + 增值税 + 城建税,
            // 与主表“税额合计”(PretaxCost − TaxedCost)对齐;v1 历史数据增值税/城建税为 0,取值与改造前一致。
            map.put("税额", totalTaxOf(serviceFunddetailShared));
            long qtuuid = IdGeneratorUtils.nextId();
            map.put("其他附件", "");
            if (StringUtils.isNotEmpty(annexfiles)) {
@@ -898,6 +898,23 @@
        allMap.put("formson_0832", list);
        allMap.put("annexfilesList", annexfilesList);
        return allMap;
    }
    /**
     * 明细上传协友的“税额” = 劳务个税 + 增值税 + 城建税(扣税合计口径)。
     * <p>
     * 背景:2026-11 新增增值税、城建税后,主表“税额合计”取 `PretaxCost − TaxedCost`,
     * 天然包含这两项;若明细仍只发劳务个税,致远里“税额合计 ≠ 明细税额之和”(差增值税+城建税)。
     * v1 历史数据的增值税/城建税均为 0,取值与改造前完全一致。
     */
    private static BigDecimal totalTaxOf(ServiceFunddetailShared detail) {
        if (detail == null) {
            return BigDecimal.ZERO.setScale(2, BigDecimal.ROUND_HALF_UP);
        }
        BigDecimal tax = detail.getTaxamount() == null ? BigDecimal.ZERO : BigDecimal.valueOf(detail.getTaxamount());
        BigDecimal vat = detail.getVatAmount() == null ? BigDecimal.ZERO : BigDecimal.valueOf(detail.getVatAmount());
        BigDecimal city = detail.getCityTaxAmount() == null ? BigDecimal.ZERO : BigDecimal.valueOf(detail.getCityTaxAmount());
        return tax.add(vat).add(city).setScale(2, BigDecimal.ROUND_HALF_UP);
    }
@@ -1585,6 +1602,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());
@@ -1685,10 +1724,23 @@
            //通过受益人名称,将税前、税后的值相加
            Map<String, Double> sumAmount = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname, Collectors.summingDouble(ServiceFunddetail::getAmount)));
            Map<String, Double> sumTaxdAmount = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname, Collectors.summingDouble(ServiceFunddetail::getTaxedamount)));
            // 新增口径:增值税、城建税、劳务税前、劳务个税按受益人合计
            Map<String, Double> sumVat = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname,
                    Collectors.summingDouble(d -> d.getVatAmount() == null ? 0.0 : d.getVatAmount())));
            Map<String, Double> sumCityTax = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname,
                    Collectors.summingDouble(d -> d.getCityTaxAmount() == null ? 0.0 : d.getCityTaxAmount())));
            Map<String, Double> sumLaborPretax = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname,
                    Collectors.summingDouble(d -> d.getLaborPretaxAmount() == null ? 0.0 : d.getLaborPretaxAmount())));
            Map<String, Double> sumTax = serviceFunddetails.stream().collect(Collectors.groupingBy(ServiceFunddetail::getBeneficiaryname,
                    Collectors.summingDouble(d -> d.getTaxamount() == null ? 0.0 : d.getTaxamount())));
            for (String key : sumAmount.keySet()) {
                ServiceFunddetailExcel serviceFunddetailExcel = new ServiceFunddetailExcel();
                serviceFunddetailExcel.setAmount(sumAmount.getOrDefault(key, 0.0));
                serviceFunddetailExcel.setVatAmount(sumVat.getOrDefault(key, 0.0));
                serviceFunddetailExcel.setCityTaxAmount(sumCityTax.getOrDefault(key, 0.0));
                serviceFunddetailExcel.setLaborPretaxAmount(sumLaborPretax.getOrDefault(key, 0.0));
                serviceFunddetailExcel.setTaxamount(sumTax.getOrDefault(key, 0.0));
                serviceFunddetailExcel.setTaxedamount(sumTaxdAmount.getOrDefault(key, 0.0));
                for (ServiceFunddetail serviceFunddetail2 : serviceFunddetails) {
                    if (serviceFunddetail2.getBeneficiaryname().equals(key)) {
@@ -1784,10 +1836,13 @@
        String filePath = RuoYiConfig.getDownloadPath() + ajaxResult.get("msg");
        List<VExpertfeeDonor> list2 = vExpertfeeDonorMapper.selectVExpertfeeDonorList2(faxId);
        // 打印模板视图不含“增值税 / 城建税 / 劳务税前”,按 fund_tax_id 从明细表汇总后回填
        fillDonorTaxAmounts(list2, faxId);
        ExcelUtil<VExpertfeeDonor> util2 = new ExcelUtil<VExpertfeeDonor>(VExpertfeeDonor.class);
        AjaxResult ajaxResult2 = util2.exportExcel(list2, "VExpertfeeDonor");
        List<VExpertfeeExpert> list3 = vExpertfeeExpertMapper.selectVExpertfeeExpertListByFaxId(faxId);
        fillExpertTaxAmounts(list3, faxId);
        ExcelUtil<VExpertfeeExpert> util3 = new ExcelUtil<VExpertfeeExpert>(VExpertfeeExpert.class);
        AjaxResult ajaxResult3 = util3.exportExcel(list3, "vExpertfeeExpert");
@@ -1798,14 +1853,155 @@
        String name = "专家费汇总单" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xlsx";
        // mergeExcel 内部会写文件、校验结果,并在 finally 里清理 3 个临时 sheet 文件
        mergeExcel(list1, RuoYiConfig.getDownloadPath() + name);
        for (String path : list1) {
            new File(RuoYiConfig.getDownloadPath() + path).delete();
        }
        Map<String, Object> map = new HashMap<>();
        map.put("downloadUrl", "/profile/download/" + name);
        map.put("downloadName", name);
        return map;
    }
    /**
     * 专家费汇总单打印(专家明细 sheet):回填增值税 / 城建税 / 劳务税前,并把视图的「扣税金额」拆回劳务个税。
     * <p>
     * 口径说明:
     * <ul>
     *   <li>视图 {@code v_expertfee_expert} 的 {@code TaxAmount} 已改为
     *       <b>增值税 + 城建税 + 劳务个税</b>(2026-11-12 业务方修改),而打印要分别展示,
     *       因此 {@code 劳务个税 = TaxAmount − 增值税 − 城建税};</li>
     *   <li>增值税/城建税/劳务税前 视图未单独提供,按 <b>与视图相同的分组</b>
     *       (受益人 + 证件号 + 卡号 + 开户行 + 单位)从 {@code service_funddetail} 汇总后匹配回填;</li>
     *   <li>「合计」行按各行的值累加(不依赖视图 UNION 的合计列)。</li>
     * </ul>
     */
    private void fillExpertTaxAmounts(List<VExpertfeeExpert> rows, Integer fundTaxId) {
        if (CollectionUtils.isEmpty(rows)) {
            return;
        }
        Map<String, FundTaxAmountSum> sumMap = toSumMap(serviceFundMapper.selectTaxSumByBeneficiary(fundTaxId.longValue()));
        BigDecimal vatTotal = BigDecimal.ZERO;
        BigDecimal cityTotal = BigDecimal.ZERO;
        BigDecimal laborTotal = BigDecimal.ZERO;
        BigDecimal laborTaxTotal = BigDecimal.ZERO;
        for (VExpertfeeExpert row : rows) {
            if (isTotalRow(row.getBeneficiaryname())) {
                continue;
            }
            FundTaxAmountSum s = sumMap.get(expertGroupKey(row));
            BigDecimal vat = s == null ? BigDecimal.ZERO : nvl(s.getVatAmount());
            BigDecimal city = s == null ? BigDecimal.ZERO : nvl(s.getCityTaxAmount());
            BigDecimal labor = s == null ? BigDecimal.ZERO : nvl(s.getLaborPretaxAmount());
            // 视图的扣税金额含增值税、城建税,这里拆回劳务个税
            BigDecimal laborTax = nvl(row.getTaxamount()).subtract(vat).subtract(city);
            row.setVatAmount(vat);
            row.setCityTaxAmount(city);
            row.setLaborPretaxAmount(labor);
            row.setTaxamount(laborTax);
            vatTotal = vatTotal.add(vat);
            cityTotal = cityTotal.add(city);
            laborTotal = laborTotal.add(labor);
            laborTaxTotal = laborTaxTotal.add(laborTax);
        }
        for (VExpertfeeExpert row : rows) {
            if (isTotalRow(row.getBeneficiaryname())) {
                row.setVatAmount(vatTotal);
                row.setCityTaxAmount(cityTotal);
                row.setLaborPretaxAmount(laborTotal);
                row.setTaxamount(laborTaxTotal);
            }
        }
    }
    /**
     * 专家费汇总单打印(捐献者 sheet):同 {@link #fillExpertTaxAmounts},分组为「捐献者 + 案例ID」。
     */
    private void fillDonorTaxAmounts(List<VExpertfeeDonor> rows, Integer fundTaxId) {
        if (CollectionUtils.isEmpty(rows)) {
            return;
        }
        Map<String, FundTaxAmountSum> sumMap = toSumMap(serviceFundMapper.selectTaxSumByDonor(fundTaxId.longValue()));
        BigDecimal vatTotal = BigDecimal.ZERO;
        BigDecimal cityTotal = BigDecimal.ZERO;
        BigDecimal laborTotal = BigDecimal.ZERO;
        BigDecimal laborTaxTotal = BigDecimal.ZERO;
        for (VExpertfeeDonor row : rows) {
            if (isTotalRow(row.getDonorname())) {
                continue;
            }
            FundTaxAmountSum s = sumMap.get(donorGroupKey(row.getDonorname(), row.getInfoid()));
            BigDecimal vat = s == null ? BigDecimal.ZERO : nvl(s.getVatAmount());
            BigDecimal city = s == null ? BigDecimal.ZERO : nvl(s.getCityTaxAmount());
            BigDecimal labor = s == null ? BigDecimal.ZERO : nvl(s.getLaborPretaxAmount());
            BigDecimal laborTax = nvl(row.getTaxamount()).subtract(vat).subtract(city);
            row.setVatAmount(vat);
            row.setCityTaxAmount(city);
            row.setLaborPretaxAmount(labor);
            row.setTaxamount(laborTax);
            vatTotal = vatTotal.add(vat);
            cityTotal = cityTotal.add(city);
            laborTotal = laborTotal.add(labor);
            laborTaxTotal = laborTaxTotal.add(laborTax);
        }
        for (VExpertfeeDonor row : rows) {
            if (isTotalRow(row.getDonorname())) {
                row.setVatAmount(vatTotal);
                row.setCityTaxAmount(cityTotal);
                row.setLaborPretaxAmount(laborTotal);
                row.setTaxamount(laborTaxTotal);
            }
        }
    }
    private static Map<String, FundTaxAmountSum> toSumMap(List<FundTaxAmountSum> sums) {
        Map<String, FundTaxAmountSum> map = new HashMap<>();
        if (!CollectionUtils.isEmpty(sums)) {
            for (FundTaxAmountSum s : sums) {
                map.put(s.getGroupKey(), s);
            }
        }
        return map;
    }
    /**
     * 专家明细分组键,必须与视图 {@code v_expertfee_expert} 的 GROUP BY 完全一致:
     * BeneficiaryName + IDCardNo + BankCardNo + DepositBank + UnitName。
     */
    private static String expertGroupKey(VExpertfeeExpert row) {
        return joinKey(row.getBeneficiaryname(), row.getIdcardno(), row.getBankcardno(),
                row.getDepositbank(), row.getUnitname());
    }
    /**
     * 捐献者分组键,与视图 {@code v_expertfee_donor} 的 GROUP BY 一致:DonorName + InfoID。
     */
    private static String donorGroupKey(String donorname, Long infoid) {
        return joinKey(donorname, infoid == null ? "" : String.valueOf(infoid));
    }
    /**
     * 用 "|" 拼接分组键;null 统一按空串处理(与 SQL 的 IFNULL(x,'') 对齐)
     */
    private static String joinKey(Object... parts) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < parts.length; i++) {
            if (i > 0) {
                sb.append('|');
            }
            Object p = parts[i];
            sb.append(p == null ? "" : String.valueOf(p).trim());
        }
        return sb.toString();
    }
    /**
     * 打印里的「合计」行
     */
    private static boolean isTotalRow(String name) {
        return name != null && "合计".equals(name.trim());
    }
    private static BigDecimal nvl(BigDecimal value) {
        return value == null ? BigDecimal.ZERO : value;
    }
@@ -1854,7 +2050,7 @@
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("userName", "opo");
        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
        map.put("loginName", "OPO系统审批");
        map.put("loginName", "OPO系统");
        JSONObject jsonObj = new JSONObject(map);
@@ -1930,41 +2126,115 @@
        return id;
    }
    /**
     * 把 3 个 sheet 的临时导出文件合并成一个「专家费汇总单」。
     * <p>
     * 修复点(2026-11-12):
     * <ol>
     *   <li>原实现用 {@code cell.getStringCellValue()} 复制单元格,遇到数字单元格会抛
     *       {@code IllegalStateException: Cannot get a STRING value from a NUMERIC cell},
     *       而外层 catch 把异常吞掉 → 接口仍返回下载地址,但合并文件没生成,前端下载 404;</li>
     *   <li>原实现没有关闭输入/输出流,Windows 上临时文件被锁定,删不掉(残留 *_vExpertfee*.xlsx);</li>
     *   <li>失败时不再静默,抛业务异常让前端看到真实原因。</li>
     * </ol>
     */
    public void mergeExcel(List<String> files, String outputFile) {
        try {
            Workbook resultWorkbook = new XSSFWorkbook();
        File outFile = new File(outputFile);
        try (Workbook resultWorkbook = new XSSFWorkbook()) {
            // 表头与数据两种样式,避免每个单元格都新建样式(原实现每格一个样式,文件会变大)
            CellStyle headerStyle = createMergeCellStyle(resultWorkbook, true);
            CellStyle bodyStyle = createMergeCellStyle(resultWorkbook, false);
            for (String file : files) {
                InputStream is1 = new FileInputStream(RuoYiConfig.getDownloadPath() + file);
                Workbook workbook1 = new XSSFWorkbook(is1);
                Sheet sheet1 = workbook1.getSheetAt(0);
                // 复制第一个文件的Sheet
                Sheet newSheet1 = resultWorkbook.createSheet(file.substring(0, file.indexOf(".")));
                for (Row row : sheet1) {
                    Row newRow = newSheet1.createRow(row.getRowNum());
                    int columns = row.getLastCellNum();
                    for (int i = 0; i < columns; i++) {
                        newSheet1.setColumnWidth(i, 5000);
                        Cell cell = row.getCell(i);
                        Cell newCell = newRow.createCell(cell.getColumnIndex());
                        newCell.setCellValue(cell.getStringCellValue());
                        // 创建单元格样式
                        CellStyle style = resultWorkbook.createCellStyle();
                        style.setAlignment(HorizontalAlignment.CENTER); // 水平居中
                        style.setVerticalAlignment(VerticalAlignment.CENTER); // 垂直居中
                        if (row.getRowNum() == 0) {
                            // 设置第一行背景色
                            style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
                            style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
                File srcFile = new File(RuoYiConfig.getDownloadPath() + file);
                try (InputStream is1 = new FileInputStream(srcFile);
                     Workbook workbook1 = new XSSFWorkbook(is1)) {
                    Sheet sheet1 = workbook1.getSheetAt(0);
                    String sheetName = file.contains(".") ? file.substring(0, file.indexOf(".")) : file;
                    Sheet newSheet = resultWorkbook.createSheet(sheetName);
                    for (Row row : sheet1) {
                        Row newRow = newSheet.createRow(row.getRowNum());
                        short columns = row.getLastCellNum();
                        for (int i = 0; i < columns; i++) {
                            newSheet.setColumnWidth(i, 5000);
                            Cell newCell = newRow.createCell(i);
                            copyCellValue(row.getCell(i), newCell);
                            newCell.setCellStyle(row.getRowNum() == 0 ? headerStyle : bodyStyle);
                        }
                        newCell.setCellStyle(style);
                    }
                }
            }
            FileOutputStream out = new FileOutputStream(outputFile);
            resultWorkbook.write(out);
            // 先写临时文件再改名,避免下载到写了一半的文件
            File tmpFile = new File(outputFile + ".tmp");
            try (FileOutputStream out = new FileOutputStream(tmpFile)) {
                resultWorkbook.write(out);
            }
            if (!tmpFile.renameTo(outFile) && !tmpFile.equals(outFile)) {
                // rename 失败(目标被占用等)时退化为直接写目标文件
                try (FileOutputStream out = new FileOutputStream(outFile)) {
                    resultWorkbook.write(out);
                }
                tmpFile.delete();
            }
        } catch (Exception e) {
            e.printStackTrace();
            log.error("生成专家费汇总单失败,outputFile={}", outputFile, e);
            throw new ServiceException("生成专家费汇总单失败:" + e.getMessage());
        } finally {
            // 合并完成后清理临时 sheet 文件(失败时也尝试清理,避免残留)
            for (String file : files) {
                File tmp = new File(RuoYiConfig.getDownloadPath() + file);
                if (tmp.exists() && !tmp.delete()) {
                    log.warn("临时导出文件未能删除:{}", tmp.getAbsolutePath());
                }
            }
        }
        if (!outFile.exists() || outFile.length() == 0) {
            throw new ServiceException("生成专家费汇总单失败:文件未生成");
        }
    }
    /**
     * 合并用的单元格样式(表头灰底、正文白底),统一居中
     */
    private static CellStyle createMergeCellStyle(Workbook workbook, boolean header) {
        CellStyle style = workbook.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        if (header) {
            style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
            style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
        }
        return style;
    }
    /**
     * 按单元格实际类型复制值:数字按数字、日期按日期、公式按公式,空单元格保持为空。
     * 原实现只支持字符串单元格,遇到金额(数字)就抛异常。
     */
    private static void copyCellValue(Cell source, Cell target) {
        if (source == null) {
            target.setBlank();
            return;
        }
        switch (source.getCellType()) {
            case STRING:
                target.setCellValue(source.getStringCellValue());
                break;
            case NUMERIC:
                if (DateUtil.isCellDateFormatted(source)) {
                    target.setCellValue(source.getDateCellValue());
                } else {
                    target.setCellValue(source.getNumericCellValue());
                }
                break;
            case BOOLEAN:
                target.setCellValue(source.getBooleanCellValue());
                break;
            case FORMULA:
                target.setCellFormula(source.getCellFormula());
                break;
            default:
                target.setBlank();
                break;
        }
    }