commit 341c397375bce9ab9282f92c4d16030f49d34b28
Author: CL <2502239547@qq.com>
Date: Mon Apr 17 10:19:27 2023 +0800
档案对接
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -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
diff --git a/.idea/artifacts/shoufagongwen.xml b/.idea/artifacts/shoufagongwen.xml
new file mode 100644
index 0000000..a7cbd3b
--- /dev/null
+++ b/.idea/artifacts/shoufagongwen.xml
@@ -0,0 +1,8 @@
+
+
+ $PROJECT_DIR$/../../WEAVER/ecology/WEB-INF/lib
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..9de3c4a
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..6560a98
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/classbean.xml b/.idea/libraries/classbean.xml
new file mode 100644
index 0000000..bfcf648
--- /dev/null
+++ b/.idea/libraries/classbean.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml
new file mode 100644
index 0000000..ccfcd39
--- /dev/null
+++ b/.idea/libraries/lib.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..3725f55
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..c66ee77
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/shoufagongwen/com/api/files/GD_Action.class b/out/production/shoufagongwen/com/api/files/GD_Action.class
new file mode 100644
index 0000000..cecfd62
Binary files /dev/null and b/out/production/shoufagongwen/com/api/files/GD_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/FWCB_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/FWCB_Action.class
new file mode 100644
index 0000000..9097559
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/FWCB_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCPD_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCPD_Action.class
new file mode 100644
index 0000000..9e6aa47
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCPD_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCYD_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCYD_Action.class
new file mode 100644
index 0000000..8430de4
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/JWJCYD_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/SWBLCPD_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/SWBLCPD_Action.class
new file mode 100644
index 0000000..5084103
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/SWBLCPD_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/YZSQ_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/YZSQ_Action.class
new file mode 100644
index 0000000..3c417d1
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/YZSQ_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/CreatXML.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/CreatXML.class
new file mode 100644
index 0000000..2858d79
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/CreatXML.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/DaHttpAction.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/DaHttpAction.class
new file mode 100644
index 0000000..f6aebac
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/DaHttpAction.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GDS_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GDS_Action.class
new file mode 100644
index 0000000..5b5b308
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GDS_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GD_Action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GD_Action.class
new file mode 100644
index 0000000..49e3d4b
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/GD_Action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/JY_action.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/JY_action.class
new file mode 100644
index 0000000..7c7f418
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/JY_action.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipFile.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipFile.class
new file mode 100644
index 0000000..9629ed5
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipFile.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipUtil.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipUtil.class
new file mode 100644
index 0000000..95fb233
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/ZipUtil.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/demo.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/demo.class
new file mode 100644
index 0000000..7a1a14c
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/demo.class differ
diff --git a/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/test.class b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/test.class
new file mode 100644
index 0000000..ef04681
Binary files /dev/null and b/out/production/shoufagongwen/com/engine/workflow/web/danganfiles/DA/util/test.class differ
diff --git a/out/production/shoufagongwen/rebel.xml b/out/production/shoufagongwen/rebel.xml
new file mode 100644
index 0000000..a7abe20
--- /dev/null
+++ b/out/production/shoufagongwen/rebel.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ shoufagongwen
+
+
+
+
+
+
+
diff --git a/shoufagongwen.iml b/shoufagongwen.iml
new file mode 100644
index 0000000..90d593e
--- /dev/null
+++ b/shoufagongwen.iml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/api/files/GD_Action.java b/src/com/api/files/GD_Action.java
new file mode 100644
index 0000000..73e795d
--- /dev/null
+++ b/src/com/api/files/GD_Action.java
@@ -0,0 +1,180 @@
+package com.api.files;
+
+
+
+import com.engine.workflow.web.danganfiles.DA.util.DaHttpAction;
+import weaver.conn.RecordSet;
+import weaver.general.BaseBean;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 调用归档的方法,建模表单的按钮触发
+ */
+@Path("/inter/file")
+public class GD_Action {
+
+
+
+ @GET
+ @Path("/dofiling")
+ @Produces(MediaType.TEXT_PLAIN)
+ public String interfile (@Context HttpServletRequest request, @Context HttpServletResponse response){
+ BaseBean bb = new BaseBean();
+ String id =request.getParameter("id");
+ bb.writeLog("进入方法--归档执行开始"+id);
+ RecordSet rs = new RecordSet();
+// String depidSql="SELECT b.id as depid FROM hrmresource a,hrmdepartment b WHERE a.departmentid = b.id AND a.ID=(select creater FROM workflow_requestbase WHERE REQUESTID=(select lcid from uf_dagd where id="+id+"))";
+ String depidSql="select ssbm from uf_dagd where id="+id;
+ String depid ="";
+ try {
+ rs.executeQuery(depidSql);
+ if ( rs.next()){
+ depid = rs.getString("ssbm");
+ bb.writeLog("执行部门语句----"+depidSql);
+ }
+ }catch (Exception e){
+ bb.writeLog("执行部门语句失败----"+e);
+ }
+
+ //查询归档记录表
+ String sql ="select * from uf_dagd where id="+id;
+ int gdzt =-1;
+ try {
+ rs.executeQuery(sql);
+ if (rs.next()){
+ gdzt = rs.getInt("gdzt");
+ bb.writeLog("执行语句----"+sql);
+ }
+ }catch (Exception e){
+ bb.writeLog("执行语句失败----"+e);
+ e.printStackTrace();
+ }
+
+ bb.writeLog("状态信息"+gdzt);
+ boolean success = false;
+ int i = 10;
+ //判断文件归档状态,0为未归档
+ bb.writeLog("归档状态"+gdzt);
+ if(gdzt==0){
+
+ String filename = rs.getString("wjjmc");
+ String filepath = rs.getString("wjlj");
+ String sfwlb = rs.getString("sfwlb");
+ //执行档案归档文件上传方法
+
+ bb.writeLog("文件相关信息"+filename+"--"+filepath+"--"+sfwlb);
+ DaHttpAction daHttpAction = new DaHttpAction();
+
+ try {
+ bb.writeLog("进入daHttpAction.doit方法");
+ i= daHttpAction.doit(filename,filepath,sfwlb,depid);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ bb.writeLog("返回信息str"+i);
+ //将记录表中的未归档状态修改为归档="
+ if(i!=0){
+ bb.writeLog("上传出问题了-----"+i);
+ }else if(i==0){
+ String upsql = "update uf_dagd set gdzt =1 where id="+id;
+ RecordSet rs1 = new RecordSet();
+ bb.writeLog("sql--->"+upsql);
+ success = rs1.executeUpdate(upsql);
+ bb.writeLog("上传成功-----"+success);
+ }
+ }
+
+//除0 以外的所有返回信息都是错误
+ return i+"";
+ }
+
+ @GET
+ @Path("/dofilings")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map interfiles (@Context HttpServletRequest request, @Context HttpServletResponse response) {
+ BaseBean bb = new BaseBean();
+ String id = request.getParameter("id");
+ bb.writeLog("进入方法--归档执行开始" + id);
+ RecordSet rs = new RecordSet();
+ String[] arr = id.split(",");
+ int i = 10;
+ int successCount = 0;
+ int deftCount = 0;
+ for (int y = 0; y < arr.length; y++) {
+ boolean success = false;
+ String depidSql="select ssbm from uf_dagd where id="+arr[y];
+ String depid ="";
+ try {
+ rs.executeQuery(depidSql);
+ if (rs.next()){
+ depid = rs.getString("ssbm");
+ bb.writeLog("执行部门语句----"+depidSql);
+ }
+ }catch (Exception e){
+ bb.writeLog("执行部门语句失败----"+e);
+ }
+
+ //查询归档记录表
+ String sql = "select * from uf_dagd where id=" + arr[y];
+ int gdzt = -1;
+ try {
+ rs.executeQuery(sql);
+ if (rs.next()){
+ gdzt = rs.getInt("gdzt");
+ bb.writeLog("执行语句----" + sql);
+ }
+ } catch (Exception e) {
+ bb.writeLog("执行语句失败----" + e);
+ e.printStackTrace();
+ }
+
+
+ bb.writeLog("状态信息" + gdzt);
+ //判断文件归档状态,0为未归档
+ bb.writeLog("归档状态" + gdzt);
+ if (gdzt == 0) {
+ String filename = rs.getString("wjjmc");
+ String filepath = rs.getString("wjlj");
+ String sfwlb = rs.getString("sfwlb");
+ //执行档案归档文件上传方法
+ bb.writeLog("文件相关信息" + filename + "--" + filepath + "--" + sfwlb);
+ DaHttpAction daHttpAction = new DaHttpAction();
+
+ try {
+ bb.writeLog("进入daHttpAction.doit方法");
+ i = daHttpAction.doit(filename,filepath,sfwlb,depid);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ bb.writeLog("返回信息str" + i);
+ //将记录表中的未归档状态修改为归档="
+ if (i != 0) {
+ deftCount += 1;
+ bb.writeLog("归档出问题了----->" + i);
+ } else if (i == 0) {
+ successCount += 1;
+ String upsql = "update uf_dagd set gdzt =1 where id=" + arr[y];
+ RecordSet rs1 = new RecordSet();
+ bb.writeLog("sql--->" + upsql);
+ success = rs1.executeUpdate(upsql);
+ bb.writeLog("上传成功更新数据库----->"+success);
+ }
+
+ }
+ }
+//除0 以外的所有返回信息都是错误
+ HashMap resultMap = new HashMap<>();
+ resultMap.put("successCount", successCount);
+ resultMap.put("deftCount", deftCount);
+ return resultMap;
+ }
+}
diff --git a/src/com/engine/workflow/web/danganfiles/DA/FWCB_Action.java b/src/com/engine/workflow/web/danganfiles/DA/FWCB_Action.java
new file mode 100644
index 0000000..ff5b579
--- /dev/null
+++ b/src/com/engine/workflow/web/danganfiles/DA/FWCB_Action.java
@@ -0,0 +1,373 @@
+package com.engine.workflow.web.danganfiles.DA;
+
+
+import com.engine.workflow.web.danganfiles.DA.util.CreatXML;
+import org.apache.ibatis.jdbc.SQL;
+import weaver.conn.RecordSet;
+import weaver.general.BaseBean;
+import weaver.interfaces.workflow.action.Action;
+import weaver.soa.workflow.request.RequestInfo;
+
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.zip.ZipOutputStream;
+
+import static com.engine.workflow.web.danganfiles.DA.util.JY_action.filename;
+import static com.engine.workflow.web.danganfiles.DA.util.JY_action.fjFilename;
+import static com.engine.workflow.web.danganfiles.DA.util.ZipFile.zipu;
+/**
+ * 发文呈报
+ * 2020-10-14
+ */
+@SuppressWarnings("all")
+public class FWCB_Action implements Action {
+
+ 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;
+
+ }
+
+ @Override
+ public String execute(RequestInfo requestinfo) {
+ String creatorid = requestinfo.getCreatorid();
+
+ String sqls="select departmentid FROM HrmResource where lastname=?";
+ RecordSet recordSet2=new RecordSet();
+ recordSet2.execute(sqls,creatorid);
+ if(recordSet2.next()){
+ String departmentid = recordSet2.getString("departmentid");
+ }
+
+ BaseBean bb = new BaseBean();
+ RecordSet rs = new RecordSet();
+ List