档案对接
commit
341c397375
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1,8 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="shoufagongwen">
|
||||
<output-path>$PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib</output-path>
|
||||
<root id="archive" name="shoufagongwen.jar">
|
||||
<element id="module-output" name="shoufagongwen" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/../../WEAVER/oadata792/DAGD/FWCB/141ee86a29024bf4933aaee0448c31b6/20230317085448-358358/520bfa83-c507-4afb-bd34-3aad46f3f265" charset="US-ASCII" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,36 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="date" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="classbean">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../../WEAVER/ecology/classbean" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="WEAVER-JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/shoufagongwen.iml" filepath="$PROJECT_DIR$/shoufagongwen.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>shoufagongwen</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Project/shoufagongwen/out/production/shoufagongwen">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="JRebel" name="JRebel">
|
||||
<configuration>
|
||||
<option name="ideModuleStorage">
|
||||
<map>
|
||||
<entry key="com.zeroturnaround.jrebel.FormatVersion" value="7.0.0" />
|
||||
<entry key="jrebelEnabled" value="true" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1681435666880" />
|
||||
<entry key="rebelXmlGenerationInvariantToken" value="PGFwcGxpY2F0aW9uIGdlbmVyYXRlZC1ieT0iaW50ZWxsaWoiPjxpZD5zaG91ZmFnb25nd2VuPC9pZD48Y2xhc3NwYXRoPjxkaXIgbmFtZT0iRDovUHJvamVjdC9zaG91ZmFnb25nd2VuL291dC9wcm9kdWN0aW9uL3Nob3VmYWdvbmd3ZW4iPjwvZGlyPjwvY2xhc3NwYXRoPjwvYXBwbGljYXRpb24+" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="version" value="7" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="classbean" level="project" />
|
||||
<orderEntry type="library" name="lib" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,456 @@
|
||||
package com.engine.workflow.web.danganfiles.DA.util;
|
||||
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.OutputFormat;
|
||||
import org.dom4j.io.XMLWriter;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.*;
|
||||
|
||||
public class CreatXML {
|
||||
|
||||
|
||||
//
|
||||
// public static void main(String[] args) {
|
||||
// Long start = System.currentTimeMillis();
|
||||
// HashMap map = new HashMap();
|
||||
// // createGDWJXml("","D:/WEAVER/DA",map);
|
||||
// // createYJSMXml();
|
||||
// System.out.println("运行时间:"+ (System.currentTimeMillis() - start));
|
||||
// }
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String fileName="1e01r515g45g5g015.zip";
|
||||
// String fileNameNoEx = getFileNameNoEx(fileName);
|
||||
// System.out.println(fileNameNoEx);
|
||||
//
|
||||
// }
|
||||
|
||||
public static String getFileNameNoEx(String filename) {
|
||||
|
||||
if ((filename != null) && (filename.length() > 0)) {
|
||||
|
||||
int dot = filename.lastIndexOf('.');
|
||||
|
||||
if ((dot >-1) && (dot < (filename.length()))) {
|
||||
|
||||
return filename.substring(0, dot);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return filename;
|
||||
|
||||
}
|
||||
|
||||
public static boolean isEmpty(String str) {
|
||||
if ("".equals(str) || str == null) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成xml方法
|
||||
*/
|
||||
public void createGDWJXml(String path, HashMap<String, Object> map) throws Exception {
|
||||
|
||||
BaseBean bs = new BaseBean();
|
||||
bs.writeLog("进入xml生成方法---归档文件");
|
||||
|
||||
bs.writeLog("进入xml生成方法---归档文件---" + map);
|
||||
|
||||
bs.writeLog("进入xml生成方法---归档文件---准备执行sql");
|
||||
String fj = map.get("fj").toString();
|
||||
|
||||
|
||||
|
||||
bs.writeLog("创建document对象");
|
||||
// 1、创建document对象
|
||||
Document document = DocumentHelper.createDocument();
|
||||
// 2、创建根节点rss
|
||||
Element root = document.addElement("root");
|
||||
// 3、向rss节点添加version属性
|
||||
// root.addAttribute("version", "2.0");
|
||||
// 4、生成子节点及子节点内容
|
||||
Element v1 = root.addElement("电子文件移交存储数据包");
|
||||
Element v2 = v1.addElement("文件实体");
|
||||
Element w1 = v2.addElement("档号");
|
||||
Element w2 = v2.addElement("题名");
|
||||
Element w3 = v2.addElement("并列题名");
|
||||
Element w4 = v2.addElement("类别");
|
||||
Element w5 = v2.addElement("主题词或关键字");
|
||||
Element w6 = v2.addElement("人名");
|
||||
Element w7 = v2.addElement("文件编号");
|
||||
Element w8 = v2.addElement("责任者");
|
||||
Element w9 = v2.addElement("保管期限");
|
||||
Element w10 = v2.addElement("机构或问题");
|
||||
Element w11 = v2.addElement("控制标识");
|
||||
Element w12 = v2.addElement("日期");
|
||||
Element w13 = v2.addElement("文种");
|
||||
Element w14 = v2.addElement("主送");
|
||||
Element w15 = v2.addElement("抄送");
|
||||
Element w16 = v2.addElement("密级");
|
||||
Element w17 = v2.addElement("保密期限");
|
||||
Element w18 = v2.addElement("页数");
|
||||
Element w19 = v2.addElement("附注");
|
||||
Element w20 = v2.addElement("脱机载体编号");
|
||||
//正文 稿本块
|
||||
Element g21 = v2.addElement("稿本块");
|
||||
Element g211 = g21.addElement("稿本");
|
||||
Element g2111 = g211.addElement("稿本类型");
|
||||
Element g2112 = g211.addElement("稿本文件");
|
||||
Element g2113 = g211.addElement("文件标识符");
|
||||
|
||||
g2111.setText("正文");
|
||||
w18.setText("1");
|
||||
// g2112.setText("正文文件");
|
||||
// g2113.setText("正文标识符");
|
||||
|
||||
String aq = getfilename(map.get("zw").toString()).get(0).get("gbwj").toString();
|
||||
String aq2 = getfilename(map.get("zw").toString()).get(0).get("bsf").toString();
|
||||
bs.writeLog("---------------------------正文稿本文件" + aq + "---" + aq2);
|
||||
|
||||
g2112.setText(aq);
|
||||
String fileNameNoEx = getFileNameNoEx(aq2);
|
||||
g2113.setText(fileNameNoEx);
|
||||
//附件稿本块
|
||||
bs.writeLog("获取附件"+map.get("fj").toString());
|
||||
if(map.get("fj").toString()=="0" && "0".equals(map.get("fj").toString())){
|
||||
// Element g311 = g21.addElement("稿本");
|
||||
// Element g3111 = g311.addElement("稿本类型");
|
||||
// Element g3112 = g311.addElement("稿本文件");
|
||||
// Element g3113 = g311.addElement("文件标识符");
|
||||
// g3111.setText("附件");
|
||||
// g3112.setText("");
|
||||
// g3113.setText("");
|
||||
bs.writeLog("---------------------------没有附件");
|
||||
}else{
|
||||
int i = getfilename(map.get("fj").toString()).size();
|
||||
for (int o = 0; o < i; o++) {
|
||||
Element g312 = g21.addElement("稿本");
|
||||
g312.addElement("稿本类型").setText("附件");
|
||||
g312.addElement("稿本文件").setText(getfilename(map.get("fj").toString()).get(o).get("gbwj").toString());
|
||||
g312.addElement("文件标识符").setText(getFileNameNoEx(getfilename(map.get("fj").toString()).get(o).get("bsf").toString()));
|
||||
}
|
||||
String zwofd = map.get("zwofd").toString();
|
||||
if (!isEmpty(zwofd)){
|
||||
bs.writeLog("zwofd不为空-->"+zwofd);
|
||||
int y = getfilename(zwofd).size();
|
||||
if (y>0){
|
||||
for (int o = 0; o < y; o++) {
|
||||
Element g312 = g21.addElement("稿本");
|
||||
g312.addElement("稿本类型").setText("附件");
|
||||
g312.addElement("稿本文件").setText(getfilename(map.get("zwofd").toString()).get(o).get("gbwj").toString());
|
||||
g312.addElement("文件标识符").setText(getFileNameNoEx(getfilename(map.get("zwofd").toString()).get(o).get("bsf").toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bs.writeLog("---------------------------附件稿本文件" );
|
||||
|
||||
// Element g311 = g21.addElement("稿本");
|
||||
// Element g3111 = g311.addElement("稿本类型");
|
||||
// Element g3112 = g311.addElement("稿本文件");
|
||||
// Element g3113 = g311.addElement("文件标识符");
|
||||
// g3111.setText("附件");
|
||||
// g3112.setText("文件");
|
||||
// g3113.setText("uuid");
|
||||
//处理单稿本块
|
||||
|
||||
Element g411 = g21.addElement("稿本");
|
||||
Element g4111 = g411.addElement("稿本类型");
|
||||
Element g4112 = g411.addElement("稿本文件");
|
||||
Element g4113 = g411.addElement("文件标识符");
|
||||
g4111.setText("处理单");
|
||||
bs.writeLog(map.get("zw").toString());
|
||||
g4112.setText(getfilename(map.get("zw").toString()).get(0).get("gbwj").toString());
|
||||
g4113.setText(map.get("cld").toString());
|
||||
//附件稿本块
|
||||
// bs.writeLog("-----------------------处理单稿本文件" +cldname+"(2)");
|
||||
|
||||
List<Map<String, Object>> nodeInfoList = (List<Map<String, Object>>)map.get("nodeInfoList");
|
||||
bs.writeLog("-----进入生成xmlAction-----nodeInfoList-->" +nodeInfoList);
|
||||
|
||||
int size = nodeInfoList.size();
|
||||
bs.writeLog("--nodeInfoList--size-->" +size);
|
||||
|
||||
if (size==0){
|
||||
Element w22 = v2.addElement("流程跟踪");//需要循环节点信息
|
||||
w22.addElement("环节名称");
|
||||
w22.addElement("办理人");
|
||||
w22.addElement("办理部门");
|
||||
w22.addElement("接收时间");
|
||||
w22.addElement("当前状态");
|
||||
w22.addElement("完成时间");
|
||||
}else {
|
||||
for (int i = 0; i < nodeInfoList.size(); i++) {
|
||||
//a.id,b.nodename,a.lastname,a.departmentname,a.receivedate,a.receivetime,a.operatedate,a.operatetime
|
||||
Element w22 = v2.addElement("流程跟踪");//需要循环节点信息
|
||||
w22.addElement("环节名称").setText(nodeInfoList.get(i).get("nodename").toString());
|
||||
w22.addElement("办理人").setText(nodeInfoList.get(i).get("lastname").toString());
|
||||
w22.addElement("办理部门").setText(nodeInfoList.get(i).get("departmentname").toString());
|
||||
String receivedate = nodeInfoList.get(i).get("receivedate").toString();
|
||||
String receivetime = nodeInfoList.get(i).get("receivetime").toString();
|
||||
String receivet = receivedate+" "+receivetime;
|
||||
bs.writeLog("--接收时间-->" +receivet);
|
||||
w22.addElement("接收时间").setText(receivet);
|
||||
String operatedate = nodeInfoList.get(i).get("operatedate").toString();
|
||||
String operatetime = nodeInfoList.get(i).get("operatetime").toString();
|
||||
String operate = operatedate+" "+operatetime;
|
||||
bs.writeLog("--完成时间-->" +operate);
|
||||
String id = nodeInfoList.get(i).get("id").toString();
|
||||
if (isEmpty(id)){
|
||||
bs.writeLog("--id为空-->" +id);
|
||||
w22.addElement("当前状态").setText("未完成");
|
||||
}else {
|
||||
bs.writeLog("--id不为空-->" +id);
|
||||
w22.addElement("当前状态").setText("已完成");
|
||||
}
|
||||
w22.addElement("完成时间").setText(operate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
w1.setText(map.get("dh").toString());
|
||||
w2.setText(map.get("bt").toString());
|
||||
// w3.setText("");
|
||||
// w4.setText("");
|
||||
// w5.setText("");
|
||||
// w6.setText("");
|
||||
// w7.setText("");
|
||||
w8.setText(map.get("zrz").toString());
|
||||
|
||||
// w9.setText("");
|
||||
w10.setText(map.get("jghwt").toString());
|
||||
// w11.setText("控制");
|
||||
w11.setText(map.get("kzbs").toString());
|
||||
w12.setText(map.get("rq").toString());
|
||||
w13.setText(map.get("wz").toString());
|
||||
// w14.setText("");
|
||||
// w15.setText("");
|
||||
w16.setText(map.get("mj").toString());
|
||||
// w17.setText("");
|
||||
// w18.setText("1");
|
||||
// w19.setText("");
|
||||
// w20.setText("");
|
||||
Element v3 = v1.addElement("业务实体块");
|
||||
Element w31 = v3.addElement("业务实体");
|
||||
Element w311 = w31.addElement("机构人员标识符");
|
||||
Element w312 = w31.addElement("业务行为");
|
||||
Element w313 = w31.addElement("行为时间");
|
||||
Element w314 = w31.addElement("文件标识符");
|
||||
|
||||
w311.setText(map.get("jgryid").toString());
|
||||
w312.setText("归档");
|
||||
Date date = new Date();
|
||||
w313.setText(date.toString());
|
||||
w314.setText(fileNameNoEx);
|
||||
|
||||
// w311.setText("");
|
||||
// w312.setText("");
|
||||
// w313.setText("");
|
||||
// w314.setText("");
|
||||
|
||||
Element v4 = v1.addElement("机构人员实体块");
|
||||
Element v41 = v4.addElement("机构人员实体");
|
||||
Element v411 = v41.addElement("机构人员标识符");
|
||||
Element v412 = v41.addElement("机构名称");
|
||||
Element v413 = v41.addElement("人员名称");
|
||||
v411.setText(map.get("jgryid").toString());
|
||||
v412.setText(map.get("jgryBmName").toString());
|
||||
v413.setText(map.get("jgryName").toString());
|
||||
if (size==0){
|
||||
bs.writeLog("--size==0--机构人员实体块-->" );
|
||||
}else {
|
||||
for (int i = 0; i < nodeInfoList.size(); i++) {
|
||||
String id = nodeInfoList.get(i).get("id").toString();
|
||||
if (isEmpty(id)){
|
||||
bs.writeLog("--id为空不插入机构人员数据-->" +id);
|
||||
}else {
|
||||
bs.writeLog("--id不为空-->" +id);
|
||||
Element v42 = v4.addElement("机构人员实体");
|
||||
Element v421 = v42.addElement("机构人员标识符");
|
||||
Element v422 = v42.addElement("机构名称");
|
||||
Element v423 = v42.addElement("人员名称");
|
||||
v421.setText(nodeInfoList.get(i).get("id").toString());
|
||||
v422.setText(nodeInfoList.get(i).get("departmentname").toString());
|
||||
v423.setText(nodeInfoList.get(i).get("lastname").toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// v411.setText("");
|
||||
// v412.setText("");
|
||||
// v413.setText("");
|
||||
|
||||
Element v5 = v1.addElement("实体关系块");
|
||||
Element v51 = v5.addElement("实体关系");
|
||||
Element v511 = v51.addElement("实体标识");
|
||||
Element v512 = v51.addElement("文件标识符");
|
||||
v511.setText(map.get("dh").toString());
|
||||
v512.setText(fileNameNoEx);
|
||||
Element v52 = v5.addElement("实体关系");
|
||||
v52.addElement("实体标识").setText(map.get("dh").toString());
|
||||
v52.addElement("文件标识符").setText(map.get("cld").toString());
|
||||
if(map.get("fj").toString()=="0" && "0".equals(map.get("fj").toString())){
|
||||
// v511.setText(map.get("dh").toString());
|
||||
// v512.setText(fileNameNoEx);
|
||||
}else {
|
||||
int y = getfilename(map.get("fj").toString()).size();
|
||||
for (int i = 0; i < y; i++) {
|
||||
Element v53 = v5.addElement("实体关系");
|
||||
v53.addElement("实体标识").setText(map.get("dh").toString());
|
||||
v53.addElement("文件标识符").setText(getFileNameNoEx(getfilename(map.get("fj").toString()).get(i).get("bsf").toString()));
|
||||
}
|
||||
String zwofd = map.get("zwofd").toString();
|
||||
if (!isEmpty(zwofd)){
|
||||
int z = getfilename(zwofd).size();
|
||||
if(z>0){
|
||||
for (int i = 0; i < z; i++) {
|
||||
Element v53 = v5.addElement("实体关系");
|
||||
v53.addElement("实体标识").setText(map.get("dh").toString());
|
||||
v53.addElement("文件标识符").setText(getFileNameNoEx(getfilename(map.get("zwofd").toString()).get(i).get("bsf").toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
bs.writeLog("进入xml生成方法----22-");
|
||||
////文档实体块--文档详细信息
|
||||
bs.writeLog("进入xml生成方法");
|
||||
|
||||
// 5、设置生成xml的格式
|
||||
OutputFormat format = OutputFormat.createPrettyPrint();
|
||||
// 设置编码格式
|
||||
format.setEncoding("UTF-8");
|
||||
|
||||
|
||||
// 6、生成xml文件
|
||||
File file = new File(path + "/gdwj.xml");
|
||||
file.createNewFile();
|
||||
bs.writeLog("进入xml生成方法----33");
|
||||
XMLWriter writer = new XMLWriter(new FileOutputStream(file), format);
|
||||
// 设置是否转义,默认使用转义字符
|
||||
writer.setEscapeText(false);
|
||||
writer.write(document);
|
||||
writer.close();
|
||||
bs.writeLog("生成gdwj.xml成功");
|
||||
bs.writeLog("进入xml生成方法----44生成gdwj.xml成功");
|
||||
|
||||
}
|
||||
|
||||
public void createYJSMXml(String path, HashMap<String, Object> map) throws Exception {
|
||||
|
||||
BaseBean bs = new BaseBean();
|
||||
bs.writeLog("进入xml生成方法-----11+依据说明");
|
||||
|
||||
|
||||
bs.writeLog("进入xml生成方法-----22----1+依据说明");
|
||||
// 1、创建document对象
|
||||
Document document = DocumentHelper.createDocument();
|
||||
// 2、创建根节点rss
|
||||
Element root = document.addElement("root");
|
||||
// 3、向rss节点添加version属性
|
||||
// root.addAttribute("version", "2.0");
|
||||
// 4、生成子节点及子节点内容
|
||||
Element v1 = root.addElement("电子文件移交说明及目录描述");
|
||||
Element v2 = v1.addElement("目录描述");
|
||||
bs.writeLog("依据说明-----");
|
||||
Element w1 = v2.addElement("档号");
|
||||
Element w2 = v2.addElement("题名");
|
||||
Element w3 = v2.addElement("文件编号");
|
||||
Element w4 = v2.addElement("责任者");
|
||||
Element w5 = v2.addElement("日期");
|
||||
Element w6 = v2.addElement("页数");
|
||||
bs.writeLog("进入xml生成方法-----33----1+依据说明" + map);
|
||||
|
||||
w1.setText(map.get("dh").toString());
|
||||
w2.setText(map.get("bt").toString());
|
||||
w3.setText(map.get("bh").toString());
|
||||
w4.setText(map.get("zrz").toString());
|
||||
w5.setText(map.get("rq").toString());
|
||||
w6.setText(map.get("ys").toString());
|
||||
|
||||
bs.writeLog("进入xml生成方法----222");
|
||||
// 5、设置生成xml的格式
|
||||
OutputFormat format = OutputFormat.createPrettyPrint();
|
||||
// 设置编码格式
|
||||
format.setEncoding("UTF-8");
|
||||
|
||||
|
||||
// 6、生成xml文件
|
||||
File file = new File(path + "/yjsm.xml");
|
||||
file.createNewFile();
|
||||
|
||||
bs.writeLog("进入xml生成方法----33" + file);
|
||||
XMLWriter writer = new XMLWriter(new FileOutputStream(file), format);
|
||||
// 设置是否转义,默认使用转义字符
|
||||
writer.setEscapeText(false);
|
||||
writer.write(document);
|
||||
writer.close();
|
||||
bs.writeLog("生成yjsm.xml成功");
|
||||
bs.writeLog("进入xml生成方法-----22----1+生成yjsm.xml成功");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数信息返回文件名,及标识符
|
||||
* @param fj
|
||||
* @return
|
||||
*/
|
||||
public static List<HashMap> getfilename(String fj) {
|
||||
BaseBean bs = new BaseBean();
|
||||
bs.writeLog("==11=进入查询方法-->fj"+fj);
|
||||
List<HashMap> list = new ArrayList<>();
|
||||
// HashMap map = new HashMap();
|
||||
String[] arr = fj.split(",");
|
||||
bs.writeLog("==22=进入查询方法");
|
||||
// RecordSet rs3 = new RecordSet();
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
RecordSet rs3 = new RecordSet();
|
||||
// String docdetail = "select top(1) im.filerealpath,do.imagefilename,im.iszip from imagefile im left join docimagefile do on im.imagefileid = do.imagefileid where docid=" + arr[i] + " order by versionid desc";
|
||||
String docdetail = "SELECT filerealpath,docimagefile.imagefilename,iszip FROM imagefile LEFT JOIN docimagefile ON imagefile.imagefileid = docimagefile.imagefileid WHERE docid = "+arr[i]+" ORDER BY versionid DESC";
|
||||
rs3.execute(docdetail);
|
||||
HashMap<String, String> map = new HashMap();
|
||||
// List<String> list = new ArrayList<>();
|
||||
bs.writeLog("==22=" + docdetail);
|
||||
if (rs3.next()) {
|
||||
String filerealpath = rs3.getString("filerealpath");
|
||||
String imagefilename = rs3.getString("imagefilename");
|
||||
bs.writeLog("==33=" + filerealpath + "---" + imagefilename);
|
||||
int index = filerealpath.lastIndexOf("/");
|
||||
int index2 = imagefilename.lastIndexOf(".");
|
||||
String zipPath = filerealpath.substring(index + 1); //压缩文件名
|
||||
|
||||
String newname = imagefilename.substring(0, index2);
|
||||
bs.writeLog("==44=" + zipPath + "---" + newname);
|
||||
map.put("bsf", zipPath);
|
||||
map.put("gbwj", newname);
|
||||
|
||||
bs.writeLog("==45=" + map);
|
||||
}
|
||||
list.add(map);
|
||||
|
||||
}
|
||||
bs.writeLog("=55==" + list);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,144 @@
|
||||
package com.engine.workflow.web.danganfiles.DA.util;;//package com.api.sfj.DA.util;
|
||||
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
import org.apache.tools.zip.ZipOutputStream;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Properties;
|
||||
import java.util.zip.CRC32;
|
||||
import java.util.zip.CheckedOutputStream;
|
||||
|
||||
/**
|
||||
* 文件压缩
|
||||
* zip
|
||||
*/
|
||||
public class ZipFile {
|
||||
// public static void main(String[] args)
|
||||
// throws Exception {
|
||||
// File f = new File("D:\\WEAVER\\20200928144159323");
|
||||
// ZipOutputStream out = new ZipOutputStream(new FileOutputStream(
|
||||
// "d:\\WEAVER\\20200928144159323.zip"));
|
||||
// zip(out, f, null);
|
||||
// System.out.println("zip done");
|
||||
// out.close();
|
||||
// }
|
||||
public static void zip(ZipOutputStream out, File f, String base)
|
||||
throws Exception {
|
||||
System.out.println("zipping " + f.getAbsolutePath());
|
||||
if (f.isDirectory()) {
|
||||
File[] fc = f.listFiles();
|
||||
if (base != null)
|
||||
out.putNextEntry(new ZipEntry(base + "/"));
|
||||
base = base == null ? "" : base + "/";
|
||||
for (int i = 0; i < fc.length; i++) {
|
||||
zip(out, fc[i], base + fc[i].getName());
|
||||
}
|
||||
} else {
|
||||
out.putNextEntry(new ZipEntry(base));
|
||||
FileInputStream in = new FileInputStream(f);
|
||||
int b;
|
||||
while ((b = in.read()) != -1)
|
||||
out.write(b);
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* linux压缩文件
|
||||
* @param srcPathName
|
||||
* @param zipFileName
|
||||
*/
|
||||
public static void zipu(String srcPathName, String zipFileName)
|
||||
{
|
||||
File file = new File(srcPathName);
|
||||
File zipFile = new File(zipFileName);
|
||||
if (!file.exists()) throw new RuntimeException(srcPathName + "不存在!");
|
||||
try
|
||||
{
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(zipFile);
|
||||
CheckedOutputStream cos = new CheckedOutputStream(fileOutputStream, new CRC32());
|
||||
ZipOutputStream out = new ZipOutputStream(cos);
|
||||
Properties pro=System.getProperties();
|
||||
String osName=pro.getProperty("os.name");
|
||||
if("Linux".equals(osName)||"linux".equals(osName)){
|
||||
out.setEncoding("GBK");//设置文件名编码方式
|
||||
}else{
|
||||
out.setEncoding(System.getProperty("sun.jnu.encoding"));//设置文件名编码方式
|
||||
}
|
||||
|
||||
String basedir = "";
|
||||
compress(file, out, basedir);
|
||||
out.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* inputFileName 输入一个文件夹
|
||||
* zipFileName 输出一个压缩文件夹
|
||||
*/
|
||||
private static void compress(File file, ZipOutputStream out, String basedir)
|
||||
{
|
||||
/* 判断是目录还是文件 */
|
||||
if (file.isDirectory())
|
||||
{
|
||||
// System.out.println("压缩:" + basedir + file.getName());
|
||||
compressDirectory(file, out, basedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
// System.out.println("压缩:" + basedir + file.getName());
|
||||
compressFile(file, out, basedir);
|
||||
}
|
||||
}
|
||||
|
||||
/** 压缩一个目录 */
|
||||
private static void compressDirectory(File dir, ZipOutputStream out, String basedir)
|
||||
{
|
||||
if (!dir.exists()) return;
|
||||
|
||||
File[] files = dir.listFiles();
|
||||
for (int i = 0; i < files.length; i++)
|
||||
{
|
||||
/* 递归 */
|
||||
compress(files[i], out, basedir + dir.getName() + "/");
|
||||
}
|
||||
}
|
||||
|
||||
/** 压缩一个文件 */
|
||||
private static void compressFile(File file, ZipOutputStream out, String basedir)
|
||||
{
|
||||
if (!file.exists())
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
|
||||
ZipEntry entry = new ZipEntry(basedir + file.getName());
|
||||
Properties pro=System.getProperties();
|
||||
String osName=pro.getProperty("os.name");
|
||||
if("Linux".equals(osName)||"linux".equals(osName)) {
|
||||
entry.setUnixMode(644);
|
||||
}
|
||||
out.putNextEntry(entry);
|
||||
int count;
|
||||
byte data[] = new byte[8192];
|
||||
while ((count = bis.read(data, 0, 8192)) != -1)
|
||||
{
|
||||
out.write(data, 0, count);
|
||||
}
|
||||
bis.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.engine.workflow.web.danganfiles.DA.util;
|
||||
|
||||
/**
|
||||
* @author:CL
|
||||
* @date:2023/4/3 15:28
|
||||
*/
|
||||
public class demo {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>shoufagongwen</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Project/shoufagongwen/out/production/shoufagongwen">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
Loading…
Reference in New Issue