Browse Source

新增对接E10

yuhai.wen 1 year ago
parent
commit
f567472258
22 changed files with 879 additions and 3 deletions
  1. 5 0
      bpm-client-http/pom.xml
  2. 1 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/RestTemplateUtil.java
  3. 87 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebService.java
  4. 28 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebServicePortType.java
  5. 126 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client.java
  6. 33 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/ReceiveRequestInfoByJsonDto.java
  7. 9 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/WebServiceRequestInfo.java
  8. 51 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/common/HttpClient.java
  9. 327 0
      bpm-client-http/src/main/java/com/srm/bpm/facde/oa/common/HttpClientPoolUtil.java
  10. 102 2
      bpm-core/src/main/java/com/srm/bpm/facade/rest/BillFlowRestController.java
  11. 28 0
      bpm-core/src/main/java/com/srm/bpm/facade/rest/ThirdPartBillController.java
  12. 7 0
      bpm-core/src/main/java/com/srm/bpm/infra/dao/ToaBillDao.java
  13. 7 0
      bpm-core/src/main/java/com/srm/bpm/infra/service/ToaBillService.java
  14. 1 0
      bpm-core/src/main/java/com/srm/bpm/infra/service/impl/FormThirdItemLogicImpl.java
  15. 14 0
      bpm-core/src/main/java/com/srm/bpm/infra/service/impl/ToaBillServiceImpl.java
  16. 1 0
      bpm-core/src/main/java/com/srm/bpm/logic/converts/ProcessBasicConvert.java
  17. 6 0
      bpm-core/src/main/java/com/srm/bpm/logic/service/BillLogic.java
  18. 11 0
      bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillLogicImpl.java
  19. 2 0
      bpm-core/src/main/java/com/srm/bpm/logic/vo/BillItemVO.java
  20. 29 0
      bpm-core/src/main/resources/mapper/bpm/infra/ToaBillDao.xml
  21. 2 1
      bpm-server/src/main/java/com/BpmApplication.java
  22. 2 0
      pom.xml

+ 5 - 0
bpm-client-http/pom.xml

@@ -26,5 +26,10 @@
26 26
             <artifactId>fastjson</artifactId>
27 27
             <version>1.2.76</version>
28 28
         </dependency>
29
+        <dependency>
30
+            <groupId>org.apache.httpcomponents</groupId>
31
+            <artifactId>httpclient</artifactId>
32
+        </dependency>
29 33
     </dependencies>
34
+
30 35
 </project>

+ 1 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/RestTemplateUtil.java

@@ -4,6 +4,7 @@ package com.srm.bpm.facde;
4 4
 
5 5
 import com.alibaba.fastjson.JSON;
6 6
 import com.alibaba.fastjson.JSONObject;
7
+import com.srm.bpm.facde.dto.BillItemDTO;
7 8
 import com.srm.common.data.rest.R;
8 9
 
9 10
 import org.springframework.http.HttpEntity;

+ 87 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebService.java

@@ -0,0 +1,87 @@
1
+package com.srm.bpm.facde.oa;
2
+
3
+import javax.xml.namespace.QName;
4
+import javax.xml.ws.Service;
5
+import javax.xml.ws.WebEndpoint;
6
+import javax.xml.ws.WebServiceClient;
7
+import javax.xml.ws.WebServiceFeature;
8
+import java.net.MalformedURLException;
9
+import java.net.URL;
10
+
11
+/**
12
+ * This class was generated by Apache CXF 3.3.5
13
+ * 2023-11-08
14
+ * Generated source version: 3.3.5
15
+ *
16
+ */
17
+@WebServiceClient(name = "OfsTodoDataWebService",
18
+        wsdlLocation = WebServiceRequestInfo.oaRequestAddress+"/services/OfsTodoDataWebService?wsdl",
19
+        targetNamespace = "webservices.ofs.weaver.com.cn")
20
+public class OfsTodoDataWebService extends Service {
21
+
22
+    public final static URL WSDL_LOCATION;
23
+
24
+    public final static QName SERVICE = new QName("webservices.ofs.weaver.com.cn", "OfsTodoDataWebService");
25
+    public final static QName OfsTodoDataWebServiceHttpPort = new QName("webservices.ofs.weaver.com.cn", "OfsTodoDataWebServiceHttpPort");
26
+    static {
27
+        URL url = null;
28
+        try {
29
+            url = new URL(WebServiceRequestInfo.oaRequestAddress+"/services/OfsTodoDataWebService?wsdl");
30
+        } catch (MalformedURLException e) {
31
+            java.util.logging.Logger.getLogger(OfsTodoDataWebService.class.getName())
32
+                    .log(java.util.logging.Level.INFO,
33
+                            "Can not initialize the default wsdl from {0}", WebServiceRequestInfo.oaRequestAddress+"/services/OfsTodoDataWebService?wsdl");
34
+        }
35
+        WSDL_LOCATION = url;
36
+    }
37
+
38
+    public OfsTodoDataWebService(URL wsdlLocation) {
39
+        super(wsdlLocation, SERVICE);
40
+    }
41
+
42
+    public OfsTodoDataWebService(URL wsdlLocation, QName serviceName) {
43
+        super(wsdlLocation, serviceName);
44
+    }
45
+
46
+    public OfsTodoDataWebService() {
47
+        super(WSDL_LOCATION, SERVICE);
48
+    }
49
+
50
+    public OfsTodoDataWebService(WebServiceFeature ... features) {
51
+        super(WSDL_LOCATION, SERVICE, features);
52
+    }
53
+
54
+    public OfsTodoDataWebService(URL wsdlLocation, WebServiceFeature ... features) {
55
+        super(wsdlLocation, SERVICE, features);
56
+    }
57
+
58
+    public OfsTodoDataWebService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
59
+        super(wsdlLocation, serviceName, features);
60
+    }
61
+
62
+
63
+
64
+
65
+    /**
66
+     *
67
+     * @return
68
+     *     returns OfsTodoDataWebServicePortType
69
+     */
70
+    @WebEndpoint(name = "OfsTodoDataWebServiceHttpPort")
71
+    public OfsTodoDataWebServicePortType getOfsTodoDataWebServiceHttpPort() {
72
+        return super.getPort(OfsTodoDataWebServiceHttpPort, OfsTodoDataWebServicePortType.class);
73
+    }
74
+
75
+    /**
76
+     *
77
+     * @param features
78
+     *     A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
79
+     * @return
80
+     *     returns OfsTodoDataWebServicePortType
81
+     */
82
+    @WebEndpoint(name = "OfsTodoDataWebServiceHttpPort")
83
+    public OfsTodoDataWebServicePortType getOfsTodoDataWebServiceHttpPort(WebServiceFeature... features) {
84
+        return super.getPort(OfsTodoDataWebServiceHttpPort, OfsTodoDataWebServicePortType.class, features);
85
+    }
86
+
87
+}

+ 28 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebServicePortType.java

@@ -0,0 +1,28 @@
1
+package com.srm.bpm.facde.oa;
2
+
3
+import javax.jws.WebMethod;
4
+import javax.jws.WebParam;
5
+import javax.jws.WebResult;
6
+import javax.jws.WebService;
7
+import javax.xml.bind.annotation.XmlSeeAlso;
8
+import javax.xml.ws.RequestWrapper;
9
+import javax.xml.ws.ResponseWrapper;
10
+
11
+/**
12
+ * This class was generated by Apache CXF 3.3.5
13
+ * 2020-11-09T08:21:10.273+08:00
14
+ * Generated source version: 3.3.5
15
+ *
16
+ */
17
+@WebService(targetNamespace = "webservices.ofs.weaver.com.cn", name = "OfsTodoDataWebServicePortType")
18
+
19
+public interface OfsTodoDataWebServicePortType {
20
+
21
+    @WebMethod
22
+    @WebResult(name = "out", targetNamespace = "webservices.ofs.weaver.com.cn")
23
+    public String receiveRequestInfoByJson(
24
+
25
+            @WebParam(name = "requestdata", targetNamespace = "webservices.ofs.weaver.com.cn")
26
+                    String requestdata
27
+    );
28
+}

+ 126 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client.java

@@ -0,0 +1,126 @@
1
+
2
+package com.srm.bpm.facde.oa;
3
+
4
+/**
5
+ * Please modify this class to meet your needs
6
+ * This class is not complete
7
+ */
8
+
9
+import com.alibaba.fastjson.JSONObject;
10
+import com.srm.bpm.facde.oa.common.HttpClient;
11
+
12
+
13
+import javax.xml.namespace.QName;
14
+import java.io.File;
15
+import java.net.MalformedURLException;
16
+import java.net.URL;
17
+import java.text.SimpleDateFormat;
18
+import java.util.HashMap;
19
+import java.util.Map;
20
+
21
+/**
22
+ * This class was generated by Apache CXF 3.3.5
23
+ * 2020-11-09T08:21:10.187+08:00
24
+ * Generated source version: 3.3.5
25
+ *
26
+ */
27
+public final class OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client {
28
+
29
+    private static final QName SERVICE_NAME = new QName("webservices.ofs.weaver.com.cn", "OfsTodoDataWebService");
30
+
31
+    public OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client() {
32
+    }
33
+
34
+    public static void main(String args[]) throws Exception {
35
+//        URL wsdlURL = OfsTodoDataWebService.WSDL_LOCATION;
36
+//        if (args.length > 0 && args[0] != null && !"".equals(args[0])) {
37
+//            File wsdlFile = new File(args[0]);
38
+//            try {
39
+//                if (wsdlFile.exists()) {
40
+//                    wsdlURL = wsdlFile.toURI().toURL();
41
+//                } else {
42
+//                    wsdlURL = new URL(args[0]);
43
+//                }
44
+//            } catch (MalformedURLException e) {
45
+//                e.printStackTrace();
46
+//            }
47
+//        }
48
+//
49
+//        OfsTodoDataWebService ss = new OfsTodoDataWebService(wsdlURL, SERVICE_NAME);
50
+//        OfsTodoDataWebServicePortType port = ss.getOfsTodoDataWebServiceHttpPort();
51
+//        {
52
+//        System.out.println("Invoking getOfsTodoDataWebService...");
53
+        String requestData = "{syscode:\"SRM\",flowid:\"11081626\",requestname:\"11081626-SRM-idea\",workflowcode:\"1234\",workflowname:\"系列报价审批流程-新\",nodename:\"节点名称\",pcurl:\"/login\",appurl:\"\",isremark:\"0\",viewtype:\"0\",creator:\"2204653\",createdatetime:\"2023-11-08 11:37:23\",receiver:\"1234\",receivedatetime:\"2023-09-09 19:43:43\"}";
54
+//        String _getOfsTodoDataWebService__return = OfsTodoDataWebService(requestData);
55
+//        //System.out.println("getOfsTodoDataWebService.result=" + _getOfsTodoDataWebService__return);
56
+//        }
57
+//        System.exit(0);
58
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client s1 = new OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
59
+        String result= s1.ofsTodoDatabyEten(requestData,"c519566af47405039201b672939626bd");
60
+        System.out.println("result="+result);
61
+
62
+    }
63
+    //E8统一待办
64
+    public  String OfsTodoDataWebService(String requestData) {
65
+        URL wsdlURL = OfsTodoDataWebService.WSDL_LOCATION;
66
+        OfsTodoDataWebService ss = new OfsTodoDataWebService(wsdlURL, SERVICE_NAME);
67
+        OfsTodoDataWebServicePortType port = ss.getOfsTodoDataWebServiceHttpPort();
68
+        String _OfsTodoDataWebService__return = port.receiveRequestInfoByJson(requestData);
69
+        System.out.println("getOfsTodoDataWebService.result=" + _OfsTodoDataWebService__return);
70
+        return _OfsTodoDataWebService__return;
71
+
72
+    }
73
+    //E10统一待办
74
+    public String ofsTodoDatabyEten(String EtenRequestData,String token){
75
+        Map<String, String> headMap = new HashMap<String, String>();
76
+        headMap.put("content-Type", "application/json");
77
+        String result="";
78
+        try {
79
+            result=HttpClient.post(WebServiceRequestInfo.oaEtenAddress+"/papi/openapi/sapi/open_intunifytodo/server_engine/receiveRequestInfoByJson?access_token="+token,EtenRequestData,headMap);
80
+            System.out.println("result="+result);
81
+            JSONObject jsonObject = JSONObject.parseObject(result);
82
+            String message = jsonObject.getString("message");
83
+            JSONObject s1 = JSONObject.parseObject(message);
84
+            String errcode = s1.getString("errcode");
85
+            String errmsg = s1.getString("errmsg");
86
+            if (!"200".equals(errcode)){
87
+                result=jsonObject.toJSONString();
88
+            }else{
89
+                result=errmsg;
90
+            }
91
+
92
+        } catch (Exception e) {
93
+            e.printStackTrace();
94
+        }
95
+
96
+        return result;
97
+    }
98
+
99
+    public  String getRequestData (ReceiveRequestInfoByJsonDto receiveRequestInfoByJsonDto,String isremark){
100
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
101
+        JSONObject json = new JSONObject();
102
+        json.put("syscode", receiveRequestInfoByJsonDto.getSyscode());
103
+        json.put("flowid", receiveRequestInfoByJsonDto.getFlowid());
104
+        json.put("requestname", receiveRequestInfoByJsonDto.getRequestname());
105
+        json.put("workflowcode",receiveRequestInfoByJsonDto.getWorkflowcode());
106
+        json.put("workflowname", receiveRequestInfoByJsonDto.getWorkflowname());
107
+        json.put("nodename", receiveRequestInfoByJsonDto.getNodename());
108
+        json.put("pcurl", "/interOAingleLogin?accountName="+receiveRequestInfoByJsonDto.getReceiver()+"&bill_id="+receiveRequestInfoByJsonDto.getFlowid()+"&is_oa="+isremark);
109
+        json.put("appurl", "/interOAingleLogin?accountName="+receiveRequestInfoByJsonDto.getReceiver()+"&bill_id="+receiveRequestInfoByJsonDto.getFlowid()+"&is_oa="+isremark);
110
+        json.put("isremark", isremark);
111
+        if (isremark.equals("0")){
112
+            json.put("viewtype", "0");
113
+        }else{
114
+            json.put("viewtype", "1");
115
+        }
116
+        json.put("creator", receiveRequestInfoByJsonDto.getCreator());
117
+        json.put("createdatetime", receiveRequestInfoByJsonDto.getCreatedatetime()+" 00:00:00");
118
+        json.put("receiver", receiveRequestInfoByJsonDto.getReceiver());
119
+        json.put("receivedatetime", receiveRequestInfoByJsonDto.getReceivedatetime()+" 00:00:00");
120
+        json.put("receivets",System.currentTimeMillis());
121
+        System.out.println("RequestData="+json.toJSONString());
122
+        return json.toJSONString();
123
+    }
124
+
125
+
126
+}

+ 33 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/ReceiveRequestInfoByJsonDto.java

@@ -0,0 +1,33 @@
1
+package com.srm.bpm.facde.oa;
2
+
3
+import lombok.Data;
4
+
5
+import java.io.Serializable;
6
+import java.time.LocalDateTime;
7
+
8
+/**
9
+ * <p></p>
10
+ *
11
+ * @author yuhai
12
+ * @version 1.0
13
+ * @since JDK 1.8
14
+ */
15
+@Data
16
+public class ReceiveRequestInfoByJsonDto implements Serializable {
17
+
18
+    private String syscode;
19
+    private String flowid;
20
+    private String requestname;
21
+    private String workflowcode;
22
+    private String workflowname;
23
+    private String nodename;
24
+    private String pcurl;
25
+    private String appurl;
26
+    private String isremark; //0 待办 2 已办 4办结 8:抄送(待阅)-1:删除
27
+    private String viewtype;  //0 未读 1 已读
28
+    private String creator; //创建人
29
+    private String createdatetime; //创建日期
30
+    private String receiver; //接收人
31
+    private String receivedatetime;//接收日期时间
32
+    private String receivets;//毫秒级时间戳
33
+}

+ 9 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/WebServiceRequestInfo.java

@@ -0,0 +1,9 @@
1
+package com.srm.bpm.facde.oa;
2
+
3
+public class WebServiceRequestInfo {
4
+
5
+public static final String oaRequestAddress = "http://172.16.0.36"; //正式环境
6
+// public static final String oaRequestAddress = "http://172.16.0.37:8081"; //测试环境
7
+
8
+public static final String oaEtenAddress="http://uoa.jqh.cc:20600";
9
+}

+ 51 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/common/HttpClient.java

@@ -0,0 +1,51 @@
1
+package com.srm.bpm.facde.oa.common;
2
+
3
+import java.util.Map;
4
+
5
+/**
6
+ *
7
+ *<p>Title:SdkClient</p>
8
+ *<p>Description:客户端调用工具类</p>
9
+ *<p>Company:京泉华技术股份有限公司</p>
10
+ * @author zhangzhe
11
+ * @date 2021年04月23日
12
+ */
13
+public class HttpClient {
14
+
15
+
16
+	/**
17
+	 *
18
+	 * @Title:get
19
+	 * @Description:get请求
20
+	 * @param:@param url
21
+	 * @param:@param headMap
22
+	 * @param:@return
23
+	 * @param:@throws Exception
24
+	 * @return:String
25
+	 * @throws
26
+	 *
27
+	 */
28
+	public static String get(String url,Map<String, String> headMap) throws Exception{
29
+		return HttpClientPoolUtil.get(url, headMap);
30
+	}
31
+
32
+	/**
33
+	 *
34
+	 * @Title:post
35
+	 * @Description:post请求
36
+	 * @param:@param url
37
+	 * @param:@param data JSON序列化后的参数 JSON.toJSONString(xxx)
38
+	 * @param:@param headMap
39
+	 * @param:@return
40
+	 * @param:@throws Exception
41
+	 * @return:String
42
+	 * @throws
43
+	 *
44
+	 */
45
+	public static String post(String url,String data,Map<String, String> headMap) throws Exception{
46
+		return HttpClientPoolUtil.post(url, data, headMap);
47
+	}
48
+
49
+
50
+}
51
+

+ 327 - 0
bpm-client-http/src/main/java/com/srm/bpm/facde/oa/common/HttpClientPoolUtil.java

@@ -0,0 +1,327 @@
1
+package com.srm.bpm.facde.oa.common;
2
+
3
+import org.apache.http.HeaderElement;
4
+import org.apache.http.HeaderElementIterator;
5
+import org.apache.http.HttpEntity;
6
+import org.apache.http.HttpResponse;
7
+import org.apache.http.client.config.RequestConfig;
8
+import org.apache.http.client.methods.*;
9
+import org.apache.http.client.protocol.HttpClientContext;
10
+import org.apache.http.config.Registry;
11
+import org.apache.http.config.RegistryBuilder;
12
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
13
+import org.apache.http.conn.socket.ConnectionSocketFactory;
14
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
15
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
16
+import org.apache.http.entity.StringEntity;
17
+import org.apache.http.impl.client.CloseableHttpClient;
18
+import org.apache.http.impl.client.HttpClients;
19
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
20
+import org.apache.http.message.BasicHeaderElementIterator;
21
+import org.apache.http.protocol.HTTP;
22
+import org.apache.http.protocol.HttpContext;
23
+import org.apache.http.util.EntityUtils;
24
+
25
+import javax.net.ssl.SSLContext;
26
+import javax.net.ssl.TrustManager;
27
+import javax.net.ssl.X509TrustManager;
28
+import java.nio.charset.Charset;
29
+import java.security.KeyManagementException;
30
+import java.security.NoSuchAlgorithmException;
31
+import java.util.Map;
32
+import java.util.Map.Entry;
33
+
34
+/**
35
+ *
36
+ *<p>Title:HttpClientPoolUtil</p>
37
+ *<p>Description:客户端调用工具类</p>
38
+ *<p>Description:httpClient线程池工具类</p>
39
+ * @author zhangzhe
40
+ * @date 2021年04月23日
41
+ */
42
+public class HttpClientPoolUtil {
43
+
44
+	private static Class mc = HttpClientPoolUtil.class;
45
+	public static CloseableHttpClient httpClient = null;
46
+
47
+	/**
48
+	 * 初始化连接池
49
+	 * @throws NoSuchAlgorithmException
50
+	 * @throws KeyManagementException
51
+	 */
52
+	public static synchronized void initPools() throws KeyManagementException, NoSuchAlgorithmException {
53
+
54
+		if (httpClient == null) {
55
+			//采用绕过验证的方式处理https请求
56
+			SSLContext sslcontext = createIgnoreVerifySSL();
57
+			//设置协议http和https对应的处理socket链接工厂的对象
58
+			Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
59
+					.register("http", PlainConnectionSocketFactory.INSTANCE)
60
+					.register("https", new SSLConnectionSocketFactory(sslcontext,SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER))
61
+					.build();
62
+			PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
63
+			cm.setDefaultMaxPerRoute(20);
64
+			cm.setMaxTotal(500);
65
+			httpClient = HttpClients.custom().setKeepAliveStrategy(defaultStrategy).setConnectionManager(cm).build();
66
+		}
67
+	}
68
+
69
+	/**
70
+	 * Http connection keepAlive 设置
71
+	 */
72
+	public static ConnectionKeepAliveStrategy defaultStrategy = new ConnectionKeepAliveStrategy() {
73
+		public long getKeepAliveDuration(HttpResponse response, HttpContext context) {
74
+			HeaderElementIterator it = new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));
75
+			int keepTime = 30;
76
+			while (it.hasNext()) {
77
+				HeaderElement he = it.nextElement();
78
+				String param = he.getName();
79
+				String value = he.getValue();
80
+				if (value != null && param.equalsIgnoreCase("timeout")) {
81
+					try {
82
+						return Long.parseLong(value) * 1000;
83
+					} catch (Exception e) {
84
+						e.printStackTrace();
85
+					}
86
+				}
87
+			}
88
+			return keepTime * 1000;
89
+		}
90
+	};
91
+
92
+	/**
93
+	 * 绕过验证
94
+	 *
95
+	 * @return
96
+	 * @throws NoSuchAlgorithmException
97
+	 * @throws KeyManagementException
98
+	 */
99
+	public static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException {
100
+		SSLContext sc = SSLContext.getInstance("SSLv3");
101
+
102
+		// 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法
103
+		X509TrustManager trustManager = new X509TrustManager() {
104
+
105
+			public void checkClientTrusted(
106
+					java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
107
+					String paramString) {
108
+			}
109
+
110
+
111
+			public void checkServerTrusted(
112
+					java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
113
+					String paramString) {
114
+			}
115
+
116
+
117
+			public java.security.cert.X509Certificate[] getAcceptedIssuers() {
118
+				return null;
119
+			}
120
+		};
121
+
122
+		sc.init(null, new TrustManager[] { trustManager }, null);
123
+		return sc;
124
+	}
125
+
126
+	/**
127
+	 * 创建请求
128
+	 *
129
+	 * @param url 请求url
130
+	 * @param methodName 请求的方法类型
131
+	 * @param headMap 请求头
132
+	 * @return
133
+	 * @throws NoSuchAlgorithmException
134
+	 * @throws KeyManagementException
135
+	 */
136
+	public static HttpRequestBase getRequest(String url, String methodName,Map<String, String> headMap)
137
+			throws KeyManagementException, NoSuchAlgorithmException {
138
+		if (httpClient == null) {
139
+			initPools();
140
+		}
141
+		HttpRequestBase method = null;
142
+		RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(30 * 1000).setConnectTimeout(30 * 1000)
143
+				.setConnectionRequestTimeout(30 * 1000).setExpectContinueEnabled(false).build();
144
+
145
+		if (HttpPut.METHOD_NAME.equalsIgnoreCase(methodName)) {
146
+			method = new HttpPut(url);
147
+		} else if (HttpPost.METHOD_NAME.equalsIgnoreCase(methodName)) {
148
+			method = new HttpPost(url);
149
+		} else if (HttpGet.METHOD_NAME.equalsIgnoreCase(methodName)) {
150
+			method = new HttpGet(url);
151
+		} else if (HttpDelete.METHOD_NAME.equalsIgnoreCase(methodName)) {
152
+			method = new HttpDelete(url);
153
+		} else {
154
+			method = new HttpPost(url);
155
+		}
156
+		if(!headMap.isEmpty()){
157
+			for(Entry<String, String> value:headMap.entrySet()){
158
+				method.addHeader(value.getKey(), value.getValue());
159
+			}
160
+		}
161
+		method.setConfig(requestConfig);
162
+		return method;
163
+	}
164
+
165
+
166
+	/**
167
+	 * 执行GET 请求
168
+	 *
169
+	 * @param url
170
+	 * @return
171
+	 */
172
+	public static String get(String url,Map<String, String> headMap) throws Exception{
173
+		HttpEntity httpEntity = null;
174
+		HttpRequestBase method = null;
175
+		String responseBody = "";
176
+		try {
177
+			if (httpClient == null) {
178
+				initPools();
179
+			}
180
+			method = getRequest(url, HttpGet.METHOD_NAME,headMap);
181
+			HttpContext context = HttpClientContext.create();
182
+			CloseableHttpResponse httpResponse = httpClient.execute(method, context);
183
+			httpEntity = httpResponse.getEntity();
184
+			if (httpEntity != null) {
185
+				responseBody = EntityUtils.toString(httpEntity, "UTF-8");
186
+			}
187
+		} catch (Exception e) {
188
+			if(method != null){
189
+				method.abort();
190
+			}
191
+			throw e;
192
+		} finally {
193
+			if (httpEntity != null) {
194
+				try {
195
+					EntityUtils.consumeQuietly(httpEntity);
196
+				} catch (Exception e) {
197
+					throw e;
198
+				}
199
+			}
200
+		}
201
+		return responseBody;
202
+	}
203
+
204
+	/**
205
+	 * 执行http post请求 默认采用Content-Type:application/json,Accept:application/json
206
+	 *
207
+	 * @param url 请求地址
208
+	 * @param data  请求数据
209
+	 * @param data  请求头
210
+	 * @return
211
+	 */
212
+	public static String post(String url, String data,Map<String, String> headMap) throws Exception{
213
+		HttpEntity httpEntity = null;
214
+		HttpEntityEnclosingRequestBase method = null;
215
+		String responseBody = "";
216
+		try {
217
+			if (httpClient == null) {
218
+				initPools();
219
+			}
220
+			method = (HttpEntityEnclosingRequestBase) getRequest(url, HttpPost.METHOD_NAME,headMap);
221
+			method.setEntity(new StringEntity(data,Charset.forName("UTF-8")));
222
+			HttpContext context = HttpClientContext.create();
223
+			CloseableHttpResponse httpResponse = httpClient.execute(method, context);
224
+//			ZcLogs.WriteLog(mc, "httpResponse:"+httpResponse.toString());
225
+			httpEntity = httpResponse.getEntity();
226
+			if (httpEntity != null) {
227
+				responseBody = EntityUtils.toString(httpEntity, "UTF-8");
228
+			}
229
+
230
+		} catch (Exception e) {
231
+			if(method != null){
232
+				method.abort();
233
+			}
234
+			throw e;
235
+		} finally {
236
+			if (httpEntity != null) {
237
+				try {
238
+					EntityUtils.consumeQuietly(httpEntity);
239
+				} catch (Exception e) {
240
+					throw e;
241
+				}
242
+			}
243
+		}
244
+		return responseBody;
245
+	}
246
+
247
+	/**
248
+	 * 执行http put请求 默认采用Content-Type:application/json,Accept:application/json
249
+	 *
250
+	 * @param url 请求地址
251
+	 * @param data  请求数据
252
+	 * @param data  请求头
253
+	 * @return
254
+	 */
255
+	public static String put(String url, String data,Map<String, String> headMap) throws Exception{
256
+		HttpEntity httpEntity = null;
257
+		HttpEntityEnclosingRequestBase method = null;
258
+		String responseBody = "";
259
+		try {
260
+			if (httpClient == null) {
261
+				initPools();
262
+			}
263
+			method = (HttpEntityEnclosingRequestBase) getRequest(url, HttpPut.METHOD_NAME,headMap);
264
+			method.setEntity(new StringEntity(data,Charset.forName("UTF-8")));
265
+			HttpContext context = HttpClientContext.create();
266
+			CloseableHttpResponse httpResponse = httpClient.execute(method, context);
267
+			httpEntity = httpResponse.getEntity();
268
+			if (httpEntity != null) {
269
+				responseBody = EntityUtils.toString(httpEntity, "UTF-8");
270
+			}
271
+
272
+		} catch (Exception e) {
273
+			if(method != null){
274
+				method.abort();
275
+			}
276
+			throw e;
277
+		} finally {
278
+			if (httpEntity != null) {
279
+				try {
280
+					EntityUtils.consumeQuietly(httpEntity);
281
+				} catch (Exception e) {
282
+					throw e;
283
+				}
284
+			}
285
+		}
286
+		return responseBody;
287
+	}
288
+
289
+	/**
290
+	 * 执行DELETE 请求
291
+	 *
292
+	 * @param url
293
+	 * @return
294
+	 */
295
+	public static String delete(String url,Map<String, String> headMap) throws Exception{
296
+		HttpEntity httpEntity = null;
297
+		HttpRequestBase method = null;
298
+		String responseBody = "";
299
+		try {
300
+			if (httpClient == null) {
301
+				initPools();
302
+			}
303
+			method = getRequest(url, HttpDelete.METHOD_NAME,headMap);
304
+			HttpContext context = HttpClientContext.create();
305
+			CloseableHttpResponse httpResponse = httpClient.execute(method, context);
306
+			httpEntity = httpResponse.getEntity();
307
+			if (httpEntity != null) {
308
+				responseBody = EntityUtils.toString(httpEntity, "UTF-8");
309
+			}
310
+		} catch (Exception e) {
311
+			if(method != null){
312
+				method.abort();
313
+			}
314
+			throw e;
315
+		} finally {
316
+			if (httpEntity != null) {
317
+				try {
318
+					EntityUtils.consumeQuietly(httpEntity);
319
+				} catch (Exception e) {
320
+					throw e;
321
+				}
322
+			}
323
+		}
324
+		return responseBody;
325
+	}
326
+
327
+}

+ 102 - 2
bpm-core/src/main/java/com/srm/bpm/facade/rest/BillFlowRestController.java

@@ -4,7 +4,9 @@ package com.srm.bpm.facade.rest;
4 4
 
5 5
 import com.google.common.base.Strings;
6 6
 import com.google.common.collect.Maps;
7
-
7
+import com.srm.bpm.logic.vo.BillItemVO;
8
+import com.srm.bpm.facde.oa.OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client;
9
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
8 10
 import com.srm.bpm.logic.dto.BillActionParamDTO;
9 11
 import com.srm.bpm.logic.dto.ValidationResultDTO;
10 12
 import com.srm.bpm.logic.service.BillLogic;
@@ -12,7 +14,6 @@ import com.srm.bpm.logic.service.BillNextNodeLogic;
12 14
 import com.srm.bpm.logic.service.BillPrintLogic;
13 15
 import com.srm.bpm.logic.service.LoginUserHolder;
14 16
 import com.srm.bpm.logic.vo.BillApprovalHistoryVO;
15
-import com.srm.bpm.logic.vo.BillItemVO;
16 17
 import com.srm.common.data.exception.RbException;
17 18
 import com.srm.common.data.rest.R;
18 19
 
@@ -129,6 +130,35 @@ public class BillFlowRestController {
129 130
                 .nextApprover(nextApproverStr)
130 131
                 .build();
131 132
         this.billLogic.agreeFlow(actionParam);
133
+        /*
134
+         * 链接OA统一待办审批
135
+         * Author : yuhai
136
+         * date : 2023-11-08
137
+         * */
138
+        BillItemVO billItemVO = new BillItemVO();
139
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client o1 = new  OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
140
+        billItemVO.setId(billId);
141
+        //发送已办
142
+        billItemVO.setStatus(2);
143
+        billItemVO.setTaskid(taskId);
144
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos2 = billLogic.findrequestInfo(billItemVO);
145
+//        String token =billLogic.getToken4();
146
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos2){
147
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"2");
148
+//            o1.ofsTodoDatabyEten(requestdata,token);
149
+            o1.OfsTodoDataWebService(requestdata);
150
+        }
151
+//        //发送待办
152
+        billItemVO.setStatus(1);
153
+        billItemVO.setTaskid(taskId);
154
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos1 = billLogic.findrequestInfo(billItemVO);
155
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos1){
156
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"0");
157
+//           o1.ofsTodoDatabyEten(requestdata,token);
158
+           o1.OfsTodoDataWebService(requestdata);
159
+        }
160
+
161
+
132 162
         return R.empty();
133 163
     }
134 164
 
@@ -197,6 +227,25 @@ public class BillFlowRestController {
197 227
                 .taskId(taskId).opinion(opinion).formData(formData)
198 228
                 .build();
199 229
         this.billLogic.refuseFlow(actionParam);
230
+        /*
231
+         * 链接OA统一待办拒收
232
+         * Author : yuhai
233
+         * date : 2023-11-08
234
+         * */
235
+        BillItemVO billItemVO = new BillItemVO();
236
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client o1 = new  OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
237
+
238
+        billItemVO.setId(billId);
239
+//        //发送已办
240
+       billItemVO.setStatus(3);
241
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos2 = billLogic.findrequestInfo(billItemVO);
242
+//        String token=billLogic.getToken4();
243
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos2){
244
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"2");
245
+//            System.out.println("拒绝requestData:"+requestdata);
246
+            o1.OfsTodoDataWebService(requestdata);
247
+//            o1.ofsTodoDatabyEten(requestdata,token);
248
+        }
200 249
         return R.empty();
201 250
     }
202 251
 
@@ -227,6 +276,35 @@ public class BillFlowRestController {
227 276
                 .targetTaskId(targetTaskId)
228 277
                 .build();
229 278
         this.billLogic.repulseFlow(actionParam);
279
+        /*
280
+         * 链接OA统一待办打回
281
+         * Author : yuhai
282
+         * date : 2023-11-08
283
+         * */
284
+        BillItemVO billItemVO = new BillItemVO();
285
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client o1 = new  OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
286
+//
287
+        billItemVO.setId(billId);
288
+//        //发送已办
289
+        billItemVO.setStatus(12);
290
+        billItemVO.setTaskid(taskId);
291
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos2 = billLogic.findrequestInfo(billItemVO);
292
+//        String token = billLogic.getToken4();
293
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos2){
294
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"2");
295
+//            System.out.println("打回已办requestdata="+requestdata);
296
+           o1.OfsTodoDataWebService(requestdata);
297
+//            o1.ofsTodoDatabyEten(requestdata,token);
298
+        }
299
+//        //发送待办
300
+        billItemVO.setStatus(1);
301
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos1 = billLogic.findrequestInfo(billItemVO);
302
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos1){
303
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"0");
304
+            System.out.println("打回待办requestdata="+requestdata);
305
+            o1.OfsTodoDataWebService(requestdata);
306
+//            o1.ofsTodoDatabyEten(requestdata,token);
307
+        }
230 308
         return R.empty();
231 309
     }
232 310
 
@@ -250,6 +328,28 @@ public class BillFlowRestController {
250 328
                 .taskId(taskId).opinion(opinion)
251 329
                 .build();
252 330
         this.billLogic.recallFlow(actionParam);
331
+        /*
332
+         * 链接OA统一待办撤销
333
+         * Author : yuhai
334
+         * date : 2023-11-08
335
+         * */
336
+        BillItemVO billItemVO = new BillItemVO();
337
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client o1 = new  OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
338
+//
339
+        billItemVO.setId(billId);
340
+//        //发送已办
341
+        billItemVO.setStatus(7);
342
+        billItemVO.setTaskid(taskId);
343
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos2 = billLogic.findrequestInfo(billItemVO);
344
+//        String token = billLogic.getToken4();
345
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos2){
346
+            String requestdata =o1.getRequestData(requestInfoByJsonDto,"2");
347
+//            System.out.println("打回已办requestdata="+requestdata);
348
+            o1.OfsTodoDataWebService(requestdata);
349
+//            o1.ofsTodoDatabyEten(requestdata,token);
350
+        }
351
+
352
+
253 353
         return R.empty();
254 354
     }
255 355
 

+ 28 - 0
bpm-core/src/main/java/com/srm/bpm/facade/rest/ThirdPartBillController.java

@@ -2,10 +2,14 @@
2 2
 
3 3
 package com.srm.bpm.facade.rest;
4 4
 
5
+import com.alibaba.fastjson.JSON;
6
+import com.alibaba.fastjson.JSONArray;
5 7
 import com.google.common.base.Strings;
6 8
 
7 9
 import com.alibaba.fastjson.JSONObject;
8 10
 import com.srm.bpm.facde.dto.BillItemDTO;
11
+import com.srm.bpm.facde.oa.OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client;
12
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
9 13
 import com.srm.bpm.infra.service.FormThirdItemLogic;
10 14
 import com.srm.bpm.logic.converts.BillBasicConvert;
11 15
 import com.srm.bpm.logic.service.BillLogic;
@@ -20,6 +24,8 @@ import org.springframework.web.bind.annotation.RestController;
20 24
 
21 25
 import lombok.RequiredArgsConstructor;
22 26
 
27
+import java.util.List;
28
+
23 29
 /**
24 30
  * <p> </p>
25 31
  *
@@ -46,6 +52,28 @@ public class ThirdPartBillController {
46 52
         }
47 53
         final String toForm = formThirdItemLogic.analysisToForm(jsonObject.getString("data"), processId);
48 54
         final BillItemVO billItem = billLogic.startFlow(processId, billId, toForm, nextApprover,billCode);
55
+        /*
56
+         * 链接OA统一webservices.ofs.weaver.com.cn
57
+         * Author : yuhai
58
+         * date : 2023-11-08
59
+         * */
60
+        BillItemVO billItemVO = new BillItemVO();
61
+        billItemVO.setId(billItem.getId());
62
+        List<ReceiveRequestInfoByJsonDto> requestInfoByJsonDtos2 = billLogic.findrequestInfo(billItemVO);
63
+//        String token =billLogic.getToken4();
64
+        OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client o1= new OfsTodoDataWebServicePortType_OfsTodoDataWebServiceHttpPort_Client();
65
+        for (ReceiveRequestInfoByJsonDto requestInfoByJsonDto:requestInfoByJsonDtos2){
66
+            if ("1".equals(requestInfoByJsonDto.getIsremark())){
67
+                String  requestData = o1.getRequestData(requestInfoByJsonDto,"0");
68
+                  o1.OfsTodoDataWebService(requestData);
69
+       //         o1.ofsTodoDatabyEten(requestData,token);
70
+            }
71
+
72
+        }
73
+
74
+
75
+
76
+
49 77
         return R.ok(billBasicConvert.billItemVOToDTO(billItem));
50 78
     }
51 79
 

+ 7 - 0
bpm-core/src/main/java/com/srm/bpm/infra/dao/ToaBillDao.java

@@ -3,12 +3,14 @@
3 3
 package com.srm.bpm.infra.dao;
4 4
 
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
6 7
 import com.srm.bpm.infra.entity.ToaBillEntity;
7 8
 import com.srm.bpm.logic.query.list.ApprovedBillQuery;
8 9
 import com.srm.bpm.logic.query.list.CcBillQuery;
9 10
 import com.srm.bpm.logic.query.list.DraftBillQuery;
10 11
 import com.srm.bpm.logic.query.list.MeCreateBillQuery;
11 12
 import com.srm.bpm.logic.query.list.TodoBillQuery;
13
+import com.srm.bpm.logic.vo.BillItemVO;
12 14
 import com.srm.common.base.infra.dao.BaseDao;
13 15
 import com.srm.bpm.infra.po.BillItemPO;
14 16
 import com.srm.bpm.infra.po.ProcessGridPO;
@@ -80,4 +82,9 @@ public interface ToaBillDao extends BaseDao<ToaBillEntity> {
80 82
     List<BillItemPO> selectAllByQuery( Page page,@Param("query")DraftBillQuery query);
81 83
 
82 84
     List<ProcessGridPO> selectTodoCateSiez(@Param("approver") String var1, @Param("statusList") List<Integer> var2);
85
+
86
+     List<ReceiveRequestInfoByJsonDto> findrequestInfo(BillItemVO billItemVO);
87
+
88
+    //获取token
89
+    String getToken4();
83 90
 }

+ 7 - 0
bpm-core/src/main/java/com/srm/bpm/infra/service/ToaBillService.java

@@ -3,12 +3,14 @@
3 3
 package com.srm.bpm.infra.service;
4 4
 
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
6 7
 import com.srm.bpm.infra.entity.ToaBillEntity;
7 8
 import com.srm.bpm.logic.query.list.ApprovedBillQuery;
8 9
 import com.srm.bpm.logic.query.list.CcBillQuery;
9 10
 import com.srm.bpm.logic.query.list.DraftBillQuery;
10 11
 import com.srm.bpm.logic.query.list.MeCreateBillQuery;
11 12
 import com.srm.bpm.logic.query.list.TodoBillQuery;
13
+import com.srm.bpm.logic.vo.BillItemVO;
12 14
 import com.srm.common.base.infra.service.BaseService;
13 15
 import com.srm.bpm.infra.po.BillItemPO;
14 16
 import com.srm.bpm.infra.po.ProcessGridPO;
@@ -87,4 +89,9 @@ public interface ToaBillService extends BaseService<ToaBillEntity> {
87 89
     List<BillItemPO> findAllByQuery(Page page, DraftBillQuery query);
88 90
 
89 91
     List<ProcessGridPO> findTodoCateSize(String userCode, List<Integer> statusList);
92
+
93
+    public List<ReceiveRequestInfoByJsonDto> findrequestInfo(BillItemVO billItemVO);
94
+
95
+    //获取token
96
+    String getToken4();
90 97
 }

+ 1 - 0
bpm-core/src/main/java/com/srm/bpm/infra/service/impl/FormThirdItemLogicImpl.java

@@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSONObject;
12 12
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
13 13
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
14 14
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
15
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
15 16
 import com.srm.bpm.infra.entity.FormThirdEntity;
16 17
 import com.srm.bpm.infra.entity.FormThirdItemEntity;
17 18
 import com.srm.bpm.infra.entity.ToaFormEntity;

+ 14 - 0
bpm-core/src/main/java/com/srm/bpm/infra/service/impl/ToaBillServiceImpl.java

@@ -3,11 +3,13 @@
3 3
 package com.srm.bpm.infra.service.impl;
4 4
 
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
6 7
 import com.srm.bpm.logic.query.list.ApprovedBillQuery;
7 8
 import com.srm.bpm.logic.query.list.CcBillQuery;
8 9
 import com.srm.bpm.logic.query.list.DraftBillQuery;
9 10
 import com.srm.bpm.logic.query.list.MeCreateBillQuery;
10 11
 import com.srm.bpm.logic.query.list.TodoBillQuery;
12
+import com.srm.bpm.logic.vo.BillItemVO;
11 13
 import com.srm.common.base.infra.service.impl.BaseServiceImpl;
12 14
 import com.srm.bpm.infra.dao.ToaBillDao;
13 15
 import com.srm.bpm.infra.entity.ToaBillEntity;
@@ -114,4 +116,16 @@ public class ToaBillServiceImpl extends BaseServiceImpl<ToaBillDao, ToaBillEntit
114 116
     public List<ProcessGridPO> findTodoCateSize(String userCode, List<Integer> statusList) {
115 117
         return this.baseMapper.selectTodoCateSiez(userCode,statusList);
116 118
     }
119
+
120
+    @Override
121
+    public List<ReceiveRequestInfoByJsonDto> findrequestInfo(BillItemVO billItemVO) {
122
+        return this.baseMapper.findrequestInfo(billItemVO);
123
+    }
124
+
125
+    @Override
126
+    public String getToken4() {
127
+        return this.baseMapper.getToken4();
128
+    }
129
+
130
+
117 131
 }

+ 1 - 0
bpm-core/src/main/java/com/srm/bpm/logic/converts/ProcessBasicConvert.java

@@ -6,6 +6,7 @@ import com.srm.bpm.facde.dto.BaseProcessDTO;
6 6
 import com.srm.bpm.facde.dto.ProcessDTO;
7 7
 import com.srm.bpm.facde.dto.ProcessGridDTO;
8 8
 import com.srm.bpm.facde.dto.ProcessTypeDTO;
9
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
9 10
 import com.srm.bpm.infra.entity.ProcessDesingerEntity;
10 11
 import com.srm.bpm.infra.entity.ProcessTypeEntity;
11 12
 import com.srm.bpm.infra.entity.ToaProcessEntity;

+ 6 - 0
bpm-core/src/main/java/com/srm/bpm/logic/service/BillLogic.java

@@ -2,6 +2,7 @@
2 2
 
3 3
 package com.srm.bpm.logic.service;
4 4
 
5
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
5 6
 import com.srm.bpm.infra.entity.BillTaskEntity;
6 7
 import com.srm.bpm.infra.entity.ToaBillEntity;
7 8
 import com.srm.bpm.infra.po.ProcessDetailPO;
@@ -255,4 +256,9 @@ public interface BillLogic {
255 256
     Pair<List<BillItemVO>, Long> findAllByQuery(Integer pageNo, Integer pageSize, DraftBillQuery query);
256 257
 
257 258
     List<ProcessTypeVO> findTodoCateSize();
259
+
260
+    List<ReceiveRequestInfoByJsonDto> findrequestInfo(BillItemVO billItemVO);
261
+
262
+    //获取token
263
+    String getToken4();
258 264
 }

+ 11 - 0
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillLogicImpl.java

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
18 18
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
19 19
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
20 20
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
21
+import com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto;
21 22
 import com.srm.bpm.infra.entity.BillBizDataEntity;
22 23
 import com.srm.bpm.infra.entity.BillDataJsonEntity;
23 24
 import com.srm.bpm.infra.entity.BillTaskEntity;
@@ -2018,4 +2019,14 @@ public class BillLogicImpl implements BillLogic {
2018 2019
             return Collections.emptyList();
2019 2020
         }
2020 2021
     }
2022
+
2023
+    @Override
2024
+    public List<ReceiveRequestInfoByJsonDto> findrequestInfo(BillItemVO billItemVO) {
2025
+        return billService.findrequestInfo(billItemVO);
2026
+    }
2027
+
2028
+    @Override
2029
+    public String getToken4() {
2030
+        return billService.getToken4();
2031
+    }
2021 2032
 }

+ 2 - 0
bpm-core/src/main/java/com/srm/bpm/logic/vo/BillItemVO.java

@@ -109,6 +109,8 @@ public class BillItemVO implements Serializable {
109 109
     private String approveLink;
110 110
     private Integer assistant;
111 111
 
112
+    private String taskid;
113
+
112 114
     public static BillItemVO toVO(ToaBillEntity bill, ProcessDetailPO processDetailPO) {
113 115
         final BillItemVO billVO = new BillItemVO();
114 116
         billVO.setCode(bill.getCode());

+ 29 - 0
bpm-core/src/main/resources/mapper/bpm/infra/ToaBillDao.xml

@@ -284,4 +284,33 @@
284 284
         GROUP BY tp.id
285 285
     </select>
286 286
 
287
+    <select id="findrequestInfo" resultType="com.srm.bpm.facde.oa.ReceiveRequestInfoByJsonDto">
288
+        select DISTINCT 'SRM' syscode,toa.id as flowid,title as requestname,pro.id as workflowcode,pro.name as workflowname,task.node_name as nodename,'/test.jsp' pcurl,'' appurl,task.node_status isremark,'0' viewtype, su1.accountname as creator,from_unixtime(toa.creation_time/1000,'%Y-%m-%d') as createdatetime,
289
+        su2.accountname receiver,DATE_FORMAT(NOW(),'%Y-%m-%d') as receivedatetime
290
+        from
291
+        toa_bill toa
292
+        inner join bill_task task on  toa.id =task.bill_id
293
+        inner join bill_task tasknode on task.bill_id = tasknode.bill_id and task.task_id = tasknode.task_id
294
+        inner join sp_user su1 on su1.id=toa.sender
295
+        inner join sp_user su2 on su2.id=task.user_code
296
+        inner join toa_process pro on pro.id = toa.process_id
297
+        where toa.id=#{id}
298
+        <if test="status != null and status != ''">
299
+            AND tasknode.node_status = #{status}
300
+        </if>
301
+        <if test="status ==1 and  taskid != ''"  >
302
+            AND task.task_id != #{taskid} AND task.node_status = #{status} AND task.is_deleted=0
303
+        </if>
304
+        <if test="status ==2 and taskid != ''">
305
+            AND task.task_id = #{taskid}
306
+        </if>
307
+        ORDER BY task.id desc
308
+    </select>
309
+
310
+    <select id="getToken4" resultType="java.lang.String">
311
+        select tokenString
312
+        from plmtoken where id=4
313
+    </select>
314
+
315
+
287 316
 </mapper>

+ 2 - 1
bpm-server/src/main/java/com/BpmApplication.java

@@ -5,6 +5,7 @@ package com;
5 5
 import org.activiti.spring.boot.SecurityAutoConfiguration;
6 6
 import org.springframework.boot.SpringApplication;
7 7
 import org.springframework.boot.autoconfigure.SpringBootApplication;
8
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
8 9
 
9 10
 /**
10 11
  * <p> </p>
@@ -13,7 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
13 14
  * @version 1.0
14 15
  * @since JDK 1.8
15 16
  */
16
-@SpringBootApplication(exclude= {SecurityAutoConfiguration.class})
17
+@SpringBootApplication(exclude= {SecurityAutoConfiguration.class, DataSourceAutoConfiguration.class})
17 18
 public class BpmApplication {
18 19
 
19 20
     public static void main(String[] args) {

+ 2 - 0
pom.xml

@@ -21,4 +21,6 @@
21 21
         <module>bpm-client-base</module>
22 22
         <module>bpm-client-http</module>
23 23
     </modules>
24
+
25
+
24 26
 </project>