⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cataloguecreater.java

📁 dgbas公文管理核心java源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                    Element adjustReason = XmlUtil.createElement(document,
                        ADJUST_REASON_ATG, catalogue.getAdjustReason());
                    archive.appendChild(adjustReason);
                }
                if (catalogue.getAuditedDestoryWord() != null) {
                    Element auditedDestoryDocumentNo = XmlUtil.
                        createElement(
                        document, AUDITED_DESTORY_DOCUMENT_TAG,
                        catalogue.getAuditedDestoryWord());
                    archive.appendChild(auditedDestoryDocumentNo);
                }
                if (catalogue.getDestoryDate() != null) {
                    Element destoryDate = XmlUtil.createElement(document,
                        DESTORY_DATE_TAG, formatDate(catalogue.getDestoryDate()));
                    archive.appendChild(destoryDate);
                }
                if (catalogue.getDecryptDate() != null) {
                    Element decryptDate = XmlUtil.createElement(document,
                        DECYPT_DATE_TAG, formatDate(catalogue.getDecryptDate()));
                    archive.appendChild(decryptDate);
                }
                if (catalogue.getTransferNote() != null) {
                    Element transferNote = XmlUtil.createElement(document,
                        TRNASFER_NOTE_TAG, catalogue.getTransferNote());
                    archive.appendChild(transferNote);
                }
                if (catalogue.getExtendTransferDate() != null) {
                    Element extendTransferDate = XmlUtil.createElement(document,
                        EXTNED_TRANSFER_DATE_TAG,
                        formatDate(catalogue.getExtendTransferDate()));
                    archive.appendChild(extendTransferDate);
                }
                if (catalogue.getTransferDate() != null) {
                    Element transferDate = XmlUtil.createElement(document,
                        TRANSFER_DATE, formatDate(catalogue.getTransferDate()));
                    archive.appendChild(transferDate);
                }
                if (catalogue.getSendWord() != null) {
                    Element sendWord = XmlUtil.createElement(document,
                        SEND_WORD_TAG, catalogue.getSendWord());
                    archive.appendChild(sendWord);
                }
                if (catalogue.getReceiveWord() != null) {
                    Element receiveWord = XmlUtil.createElement(document,
                        RECEIVE_WORD_TAG, catalogue.getReceiveWord());
                    archive.appendChild(receiveWord);
                }
                if (catalogue.getIssueWord() != null) {
                    Element transferWord = XmlUtil.createElement(document,
                        TRANSFR_WORD_TAG, catalogue.getIssueWord());
                    archive.appendChild(transferWord);
                }
                if (catalogue.getYearNo() != null) {
                    Element yearNo = XmlUtil.createElement(document,
                        YEAR_NO_TAG, catalogue.getYearNo());
                    archive.appendChild(yearNo);
                }
                if (catalogue.getCategoryNo() != null) {
                    Element categoryNo = XmlUtil.createElement(document,
                        CATEGORY_NO_TAG, catalogue.getCategoryNo());
                    archive.appendChild(categoryNo);
                }
                if (catalogue.getCaseNo() != null) {
                    Element caseNo = XmlUtil.createElement(document,
                        CASE_NO_TAG, catalogue.getCaseNo());
                    archive.appendChild(caseNo);
                }
                if (catalogue.getVolumeNo() != null) {
                    Element volumeNo = XmlUtil.createElement(document,
                        VOLUME_NO_TAG, catalogue.getVolumeNo());
                    archive.appendChild(volumeNo);
                }
                if (catalogue.getItemNo() != null) {
                    Element itemNo = XmlUtil.createElement(document,
                        ITEM_NO_TAG, catalogue.getItemNo());
                    archive.appendChild(itemNo);
                }
                if (catalogue.getEletronicsNo() != null) {
                    Element eletronicsNo = XmlUtil.createElement(document,
                        ELETRONICS_NO_TAG, catalogue.getEletronicsNo());
                    archive.appendChild(eletronicsNo);
                }
                if (catalogue.getEletronicsPath() != null) {
                    Element eletronicsPath = XmlUtil.createElement(document,
                        ELETRONICS_PATH_TAG, catalogue.getEletronicsPath());
                    archive.appendChild(eletronicsPath);
                }
                if (catalogue.getEletronicsName() != null) {
                }
                if (catalogue.getMicroficheNo() != null) {
                    Element microficheNo = XmlUtil.createElement(document,
                        MICROFICHE_NO_TAG, catalogue.getMicroficheNo());
                    archive.appendChild(microficheNo);
                }
                if (catalogue.getDocumentCreateDate() != null) {
                    Element createDate = XmlUtil.createElement(document,
                        CREATE_DATE_TAG,
                        formatDate(catalogue.getDocumentCreateDate()));
                    archive.appendChild(createDate);
                }
                if (catalogue.getMediaType() != null) {
                    Element mediaType = XmlUtil.createElement(document,
                        MEDIA_TYPE_TAG, catalogue.getMediaType());
                    archive.appendChild(mediaType);
                }
                if (catalogue.getAmount() != 0) {
                    Element amount = XmlUtil.createElement(document,
                        AMOUNT_TAG,
                        catalogue.getAmount());
                    archive.appendChild(amount);
                }
                if (catalogue.getUnit() != null) {
                    Element unit = XmlUtil.createElement(document, UNIT_TAG,
                        catalogue.getUnit());
                    archive.appendChild(unit);
                }
                if (format == NONE_SUBMIT_FORMAT) {
                    if (catalogue.getUndertakerName() != null) {
                        Element undertakerName = XmlUtil.createElement(document, UNDERTAKER_NAME_TAG,
                            catalogue.getUndertakerName());
                        archive.appendChild(undertakerName);
                    }
                    if (catalogue.getDepartmentName() != null) {
                        Element departmentName = XmlUtil.createElement(document, DEPARTMENT_NAME_TAG,
                            catalogue.getDepartmentName());
                        archive.appendChild(departmentName);
                    }
                    if (catalogue.getCreater() != null) {
                        Element creater = XmlUtil.createElement(document, CREATER_TAG,
                            catalogue.getCreater());
                        archive.appendChild(creater);
                    }
                    if (catalogue.getPrimaryFileNo() != null) {
                        Element primaryArchiveNo = XmlUtil.createElement(document, PRIMARY_FILENO_TAG,
                            catalogue.getPrimaryFileNo());
                        archive.appendChild(primaryArchiveNo);
                    }
                    if (catalogue.isMerage()) {
                        Element merge = XmlUtil.createElement(document, MERAGE_TAG,
                            "Y");
                        archive.appendChild(merge);
                    }
                }

                root.appendChild(archive);
            }
            document.appendChild(root);
            return document;
        }
        catch (DOMException ex) {
            System.out.println(ex); 	
            return null;
        }
        catch (XmlException ex) {
            System.out.println(ex); 	
            return null;
        }
    }

    private String formatDate(Date date) {
        StringBuffer buffer = new StringBuffer();
        String emptyString = "                       ";
        String year = String.valueOf(DateUtil.getYearForTW(date));
        String month = String.valueOf(DateUtil.getMonth(date));
        String day = String.valueOf(DateUtil.getDay(date));
        if (year.length() == 2) {
            year = "0" + year;
        }
        if (month.length() == 1) {
            month = "0" + month;
        }
        if (day.length() == 1) {
            day = "0" + day;
        }
        buffer.append(year);
        buffer.append(emptyString);
        buffer.append(month);
        buffer.append(day);
        return buffer.toString();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -