commit 26dc0ba0bcff25224b45c6e0c227282c1430dc37
Author: CL <2502239547@qq.com>
Date: Thu Feb 23 10:44:56 2023 +0800
first commit 20230223
diff --git a/sfj/DA/.idea/.gitignore b/sfj/DA/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/sfj/DA/.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/sfj/DA/.idea/libraries/classbean.xml b/sfj/DA/.idea/libraries/classbean.xml
new file mode 100644
index 0000000..3aabb63
--- /dev/null
+++ b/sfj/DA/.idea/libraries/classbean.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfj/DA/.idea/libraries/lib.xml b/sfj/DA/.idea/libraries/lib.xml
new file mode 100644
index 0000000..d567211
--- /dev/null
+++ b/sfj/DA/.idea/libraries/lib.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfj/DA/.idea/misc.xml b/sfj/DA/.idea/misc.xml
new file mode 100644
index 0000000..e208459
--- /dev/null
+++ b/sfj/DA/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfj/DA/.idea/modules.xml b/sfj/DA/.idea/modules.xml
new file mode 100644
index 0000000..5be920b
--- /dev/null
+++ b/sfj/DA/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfj/DA/DA.iml b/sfj/DA/DA.iml
new file mode 100644
index 0000000..e7446a7
--- /dev/null
+++ b/sfj/DA/DA.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sfj/DA/DWSW_Action.java b/sfj/DA/DWSW_Action.java
new file mode 100644
index 0000000..16150f4
--- /dev/null
+++ b/sfj/DA/DWSW_Action.java
@@ -0,0 +1,343 @@
+package com.api.sfj.DA;
+
+
+import com.api.sfj.DA.util.CreatXML;
+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.api.sfj.DA.util.JY_action.filename;
+import static com.api.sfj.DA.util.JY_action.fjFilename;
+import static com.api.sfj.DA.util.ZipFile.zipu;
+
+/**
+ * d党委收文
+ * 2020-10-14
+ */
+@SuppressWarnings("all")
+public class DWSW_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) {
+ BaseBean bb = new BaseBean();
+ RecordSet rs = new RecordSet();
+ //=====================================================================读取主表数据
+ String requestid = requestinfo.getRequestid(); //请求ID
+ bb.writeLog("====党委收文单========START-->requestid--->"+requestid);
+ String src = requestinfo.getRequestManager().getSrc();
+ bb.writeLog("====党委收文单=====src--->"+src);
+ //当前操作类型 submit:提交/reject:退回
+ String workflowid = requestinfo.getWorkflowid(); //流程ID
+ String tablename = requestinfo.getRequestManager().getBillTableName();//表单名称
+ String sql = "select * from "+tablename+" where requestid = "+requestid;
+ rs.execute(sql);
+ rs.writeLog(sql);
+ HashMap map = new HashMap(); // 依据说明
+ HashMap mapList = new HashMap(); // 归档文件
+ SimpleDateFormat fomat = new SimpleDateFormat("yyyyMMddHHmmss");
+ String time = fomat.format(new Date());
+ bb.writeLog("time--->"+time);
+ UUID uuid = UUID.randomUUID();
+ bb.writeLog("uuid--->"+uuid);
+ String str = uuid.toString().replaceAll("-","");
+
+ String fj ="";
+ String ofdwj ="";
+ String wjbt="";
+ if (rs.next()){
+
+ String ljdjid = rs.getString("ljdjid"); // 来件登记id
+ String swbh = rs.getString("swbh"); //收文编号
+ String swrq = rs.getString("swrq"); //收文日期
+ String lwjg = rs.getString("lwjg"); // 来文机关
+ String lwbh = rs.getString("lwbh"); // 来文编号
+
+
+ wjbt = rs.getString("wjbt"); //文件标题
+ String zsdw = rs.getString("zsdw"); //主送单位
+ String csdw = rs.getString("csdw"); //抄送单位
+ int mj = rs.getInt("mj"); //密级
+ String hj = rs.getString("hj"); // 缓急
+
+ String zw = rs.getString("zw"); // 正文
+ ofdwj = rs.getString("ofdwj"); // ofd文件
+ fj =rs.getString("xgfj"); //相关附件
+
+ String xzcs = rs.getString("xzcs"); //选择处室
+ String xzqtcs = rs.getString("xzqtcs");//选择其他处室
+ String xzblry = rs.getString("xzblry");//选择办理人员
+
+ Date date = new Date();
+ String da = new SimpleDateFormat("yyyy-MM-dd").format(date).replaceAll("-","");
+ String doctype="0";//收文类型
+
+ String mjstr="";
+ if(mj==0){
+ mjstr="非涉密";
+ }else if(mj==1){
+ mjstr="机密";
+ }else if(mj==2){
+ mjstr="秘密";
+ }
+ map.put("dh",time+"-"+requestid); //档号,归档存储文件文件夹名称
+ map.put("bt",wjbt); //标题
+ map.put("bh",lwbh);//文号
+// map.put("zrz",lwjg); //责任者
+ map.put("rq",swrq.replaceAll("-","")); //日期
+ map.put("ys",1);
+ mapList.put("dh",str); //UUID档号
+ mapList.put("bt",wjbt); //文件标题
+
+
+ String depName="select departmentname from hrmdepartment where id="+48;
+ String zrzName ="";
+ try {
+ rs.execute(depName);
+ rs.writeLog(depName);
+ rs.next();
+ zrzName = rs.getString("departmentname");
+ }catch (Exception e){
+ bb.writeLog(""+e);
+ }
+
+
+
+ String createrId="SELECT CREATER FROM workflow_requestbase WHERE REQUESTID="+requestid;
+ String jgryid ="";
+ try {
+ rs.execute(createrId);
+ rs.writeLog(createrId);
+ rs.next();
+ jgryid = rs.getString("CREATER");
+ }catch (Exception e){
+ bb.writeLog(""+e);
+ }
+
+ String createrName="SELECT LASTNAME FROM hrmresource WHERE id=(SELECT CREATER FROM workflow_requestbase WHERE REQUESTID="+requestid+")";
+ String jgryName ="";
+ try {
+ rs.execute(createrName);
+ rs.writeLog(createrName);
+ rs.next();
+ jgryName = rs.getString("LASTNAME");
+ }catch (Exception e){
+ bb.writeLog(""+e);
+ }
+
+ String createrDepName="SELECT b.DEPARTMENTNAME FROM hrmresource a,hrmdepartment b WHERE a.departmentid = b.id AND a.ID=(SELECT CREATER FROM workflow_requestbase WHERE REQUESTID="+requestid+")";
+ String jgryBmName ="";
+ try {
+ rs.execute(createrDepName);
+ rs.writeLog(createrDepName);
+ rs.next();
+ jgryBmName = rs.getString("DEPARTMENTNAME");
+ }catch (Exception e){
+ bb.writeLog(""+e);
+ }
+
+ String nodeInfoSql="SELECT a.id,b.nodename,a.lastname,a.departmentname,a.receivedate,a.receivetime,a.operatedate,a.operatetime FROM (SELECT a.nodeid,a.receivedate,a.receivetime,a.operatedate,a.operatetime,c.lastname,a.requestid,c.id,c.departmentid,d.departmentname FROM workflow_currentoperator a,workflow_nodebase b,hrmresource c,hrmdepartment d" +
+ " WHERE a.nodeid=b.id AND a.processuser=c.id AND d.id=c.departmentid and a.requestid="+requestid+") a right JOIN (SELECT id ,nodename FROM workflow_nodebase WHERE id in(SELECT nodeid FROM workflow_currentoperator WHERE requestid="+requestid+")) b ON a.nodeid=b.id order by nodeid";
+ List