commit 77c3e5833e5a44cfffc9776fe6ca00094b3c263f Author: 黄正国 <438926402@qq.com> Date: Thu Dec 18 10:34:48 2025 +0800 2025-12-18康农种业项目初始化 diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/fadada.properties b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/fadada.properties new file mode 100644 index 0000000..51198ea --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/fadada.properties @@ -0,0 +1,23 @@ +profile=prod +prod.appId=00000515 +prod.appSecret=HA8FU5HYTS6UT1SUVPBWSYXR71WWAMWA +prod.serverUrl=https://api.fadada.com/api/v5/ +prod.openId=b04cdce3f5f94e828659ad1a29a43d46 +#prod.notification=http://116.63.183.3/seeyon/rest/flow/notification/ +#prod.oatoken=http://116.63.183.3/seeyon/rest/token/ +#prod.restname=fadada +#prod.restpassword=46e0b5e8-6100-4d3f-a7a1-0aebbecd2df8 +prod.notification=http://223.75.120.166:8888/seeyon/rest/flow/notification/ +prod.oatoken=http://223.75.120.166:8888/seeyon/rest/token/ +prod.restname=fadada +prod.restpassword=eb2cbc53-136e-4f91-b150-4f3def61552b + +#profile=prod +test.appId=00000991 +test.appSecret=UJUABDKUSTGDYVGBSG1MAAALOO1Z9754 +test.serverUrl=https://uat-api.fadada.com/api/v5/ +test.openId=d9241ef7886b46919952b224838c7b06 +test.notification=http://39.103.213.20/seeyon/rest/flow/notification/ +test.oatoken=http://39.103.213.20/seeyon/rest/token/ +test.restname=xiuba +test.restpassword=b70c6492-65b5-4695-8176-eefb8748b0a9 \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/pluginCfg.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/pluginCfg.xml new file mode 100644 index 0000000..bf5e0ab --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/pluginCfg.xml @@ -0,0 +1,6 @@ + + + fadadaSys + 法大大集成 + 20230625 + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-ctrl.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-ctrl.xml new file mode 100644 index 0000000..17755f4 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-ctrl.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-dao.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-dao.xml new file mode 100644 index 0000000..20b4fc4 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-dao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-event.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-event.xml new file mode 100644 index 0000000..ef600bd --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-event.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-node.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-node.xml new file mode 100644 index 0000000..e742624 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-node.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-server.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-server.xml new file mode 100644 index 0000000..57e313b --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-server.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-servlet.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-servlet.xml new file mode 100644 index 0000000..c884ace --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-servlet.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-task.xml b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-task.xml new file mode 100644 index 0000000..e4f7e5c --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/fadadaSys/spring/spring-task.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/pluginCfg.xml b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/pluginCfg.xml new file mode 100644 index 0000000..f3ce3d3 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/pluginCfg.xml @@ -0,0 +1,6 @@ + + + src_region_serialnum + 销售合同地区流水号自动生成 + 20220830 + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-dao.xml b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-dao.xml new file mode 100644 index 0000000..4a6cc22 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-dao.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-event.xml b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-event.xml new file mode 100644 index 0000000..fd9b92b --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/src_region_serialnum/spring/spring-event.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/fadada.properties b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/fadada.properties new file mode 100644 index 0000000..51198ea --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/fadada.properties @@ -0,0 +1,23 @@ +profile=prod +prod.appId=00000515 +prod.appSecret=HA8FU5HYTS6UT1SUVPBWSYXR71WWAMWA +prod.serverUrl=https://api.fadada.com/api/v5/ +prod.openId=b04cdce3f5f94e828659ad1a29a43d46 +#prod.notification=http://116.63.183.3/seeyon/rest/flow/notification/ +#prod.oatoken=http://116.63.183.3/seeyon/rest/token/ +#prod.restname=fadada +#prod.restpassword=46e0b5e8-6100-4d3f-a7a1-0aebbecd2df8 +prod.notification=http://223.75.120.166:8888/seeyon/rest/flow/notification/ +prod.oatoken=http://223.75.120.166:8888/seeyon/rest/token/ +prod.restname=fadada +prod.restpassword=eb2cbc53-136e-4f91-b150-4f3def61552b + +#profile=prod +test.appId=00000991 +test.appSecret=UJUABDKUSTGDYVGBSG1MAAALOO1Z9754 +test.serverUrl=https://uat-api.fadada.com/api/v5/ +test.openId=d9241ef7886b46919952b224838c7b06 +test.notification=http://39.103.213.20/seeyon/rest/flow/notification/ +test.oatoken=http://39.103.213.20/seeyon/rest/token/ +test.restname=xiuba +test.restpassword=b70c6492-65b5-4695-8176-eefb8748b0a9 \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/pluginCfg.xml b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/pluginCfg.xml new file mode 100644 index 0000000..c125d72 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/pluginCfg.xml @@ -0,0 +1,6 @@ + + + updateErCode + 二维码更新 + 20231019 + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-ctrl.xml b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-ctrl.xml new file mode 100644 index 0000000..277621f --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-ctrl.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-dao.xml b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-dao.xml new file mode 100644 index 0000000..dc69ba6 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-dao.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-server.xml b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-server.xml new file mode 100644 index 0000000..8694495 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-server.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-servlet.xml b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-servlet.xml new file mode 100644 index 0000000..01505f0 --- /dev/null +++ b/seeyon/WEB-INF/cfgHome/plugin/updateErCode/spring/spring-servlet.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/formQueryBtn.css b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/formQueryBtn.css new file mode 100644 index 0000000..ae96722 --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/formQueryBtn.css @@ -0,0 +1,27 @@ +.customButton_class_box { + width: 100%; + line-height: 24px; + height:24px; + color: #1f85ec; + cursor: pointer; + font-family: "Microsoft YaHei"!important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-break:keep-all; +} +.customButton_box_content{ + width: 100%; + height: 24px; + box-sizing: border-box; + -webkit-box-sizing : border-box; + -moz-box-sizing : border-box; + text-align: center; + outline: none; + border: 1px solid #1f85ec; + background-color: #fff; + border-radius: 15px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; +} + diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/img/icon16.png b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/img/icon16.png new file mode 100644 index 0000000..e43def3 Binary files /dev/null and b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/img/icon16.png differ diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setCondition.css b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setCondition.css new file mode 100644 index 0000000..6e08db4 --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setCondition.css @@ -0,0 +1,13 @@ +.relation_container .panel_bottom .zidong_guanlian .guanlian_map{ + padding-left: 10px; +} +.relation_container .panel_bottom .zidong_guanlian .guanlian_map .error-title{ + margin: 0 2px; + visibility: hidden; +} +.relation_container .panel_bottom .zidong_guanlian .guanlian_map .error-title.active{ + visibility: visible; +} +.relation_container .biz_groupguanlian .div_sel3.active{ + border-color: red; +} \ No newline at end of file diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setTemplate.css b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setTemplate.css new file mode 100644 index 0000000..a87540a --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/css/setTemplate.css @@ -0,0 +1,87 @@ +body{ + font-family: "microsoft yahei"; +} +#tab { + height: 26px; + width: 100%; + border-bottom: 1px solid #666666; + margin-bottom: 5px; +} +#tab span { + height: 30px; + line-height: 30px; + width: 50%; + font-size: 14px; + text-align: center; + color: #666666; + margin-right: 20px; + padding: 0 5px 0 5px; + cursor: pointer; +} +#tab span.select { + border-bottom: 2px solid #2453b3; + color: #2453b3; +} + +.list{ + list-style: none; + margin: 0; + padding: 0; + font-size: 14px; + height: 310px; + overflow: auto; +} +.list .active{ + background-color: #1F85EC; + border: 1px solid #1F85EC; + color: #ffffff; +} + +.list li{ + cursor: pointer; + margin: 3px 0 3px 0; +} +.list span{ + display: inline-block; + background: url("img/icon16.png") -32px -240px no-repeat scroll transparent; + margin-right: 2px; + vertical-align: middle; + width: 16px; + height: 16px; +} +.search-box { + height: 20px; + margin: 10px 0 10px 0; + position: relative; +} +.cap-icon-sousuo { + position: absolute; + top: 2px; + left: 170px; + color: #1F85EC; + font-size: 20px; + line-height: 20px; + cursor: pointer; +} +.cap-icon-sousuo:before { + content: ""; + background: url("img/icon16.png") -192px -176px no-repeat; + height: 16px; + line-height: 16px; + width: 16px; + font-size: 12px; + display: block; + position: absolute; + top: 5px; + margin-left: 2px; +} +.search-input { + background: #FFFFFF; + border: 1px solid #D4D4D4; + border-radius: 100px; + min-height: 20px; + width: 150px; + padding-right: 35px; + padding-left: 10px; + outline: none; +} diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/html/setTemplate.html b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/html/setTemplate.html new file mode 100644 index 0000000..edb3554 --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/html/setTemplate.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+ 选择底表 +
+ +
+ + +
+ + + \ No newline at end of file diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow.js b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow.js new file mode 100644 index 0000000..323611b --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow.js @@ -0,0 +1,128 @@ +(function(f){ + var nameSpace = 'field_32489273489134023'; + if(!window[nameSpace]){ + var Builder = f(); + window[nameSpace] = { + instance: {} + }; + window[nameSpace].init = function (options) { + window[nameSpace].instance[options.privateId] = new Builder(options); + }; + } +})(function(){ + /** + * 构造函数 + * @param options + * @constructor + */ + function App(options) { + var self = this; + //初始化参数 + self.initParams(options); + //初始化dom + self.initDom(); + //事件 + self.events(); + } + + App.prototype = { + initParams : function (options) { + var self = this; + self.adaptation = options.adaptation; + self.adaptation.formMessage = options.formMessage; + self.privateId = options.privateId; + self.messageObj = options.getData; + self.preUrl = options.url_prefix; + }, + initDom : function () { + var self = this; + dynamicLoading.css(self.preUrl + 'css/formQueryBtn.css'); + self.appendChildDom(); + }, + events : function () { + var self = this; + // 监听是否数据刷新 + self.adaptation.ObserverEvent.listen('Event' + self.privateId, function() { + self.messageObj = self.adaptation.childrenGetData(self.privateId); + self.appendChildDom(); + }); + }, + appendChildDom : function () { + var self = this; + var domStructure = '
'+ + '
'+ self.messageObj.display.escapeHTML() +'
'+ + '
'; + document.querySelector('#' + self.privateId).innerHTML = domStructure; + var jumpFun = function() { + var result = confirm('是否更新实名认证二维码!'); + //var url = urlSrc+"/zhxz/zyYcsq?sn=SK-20230808-001"; + var contentDataId= self.messageObj.formdata.alldata.content.contentDataId; // 原表单id + var title= self.messageObj.formdata.alldata.content.title; // 模板名称 + var userId= self.messageObj.formdata.alldata.user.id; // 当前用户id + var name= self.messageObj.formdata.alldata.user.name; // 当前用户名称 + var loginName= self.messageObj.formdata.alldata.user.loginName; // 当前用户账号 + var auth= self.messageObj.formdata.auth; + if(result){ + $.ajax({ + //请求url + contentType:"application/json", + url: 'http://223.75.120.166:8888/seeyon/newErCodeServlet', + //请求参数 + data: {"id":contentDataId}, + //请求类型 + type: 'POST', + //响应体结果设置 + dataType: 'json', + //成功的回调函数 + success: function(data){ + if("200"==data.code){ + alert(data.msg); + }else{ + alert(data.msg); + } + }, + //失败的回调函数 + error: function(){ + alert("二维码更新失败!"); + } + }); + }else{ + + + } + }; + document.querySelector('.' + self.privateId).removeEventListener('click', jumpFun); + document.querySelector('.' + self.privateId).addEventListener('click', jumpFun); + //渲染隐藏权限 + if (self.messageObj.auth === 'hide') { + document.querySelector('#' + self.privateId).innerHTML = '
***
'; + } + } + }; + + var dynamicLoading = { + css: function(path) { + if(!path || path.length === 0) { + throw new Error('argument "path" is required !'); + } + var head = document.getElementsByTagName('head')[0]; + var link = document.createElement('link'); + link.href = path; + link.rel = 'stylesheet'; + link.type = 'text/css'; + head.appendChild(link); + }, + js: function(path) { + if(!path || path.length === 0) { + throw new Error('argument "path" is required !'); + } + var head = document.getElementsByTagName('head')[0]; + var script = document.createElement('script'); + script.src = path; + script.type = 'text/javascript'; + head.appendChild(script); + } + } + + return App; +}); \ No newline at end of file diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow2.js b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow2.js new file mode 100644 index 0000000..78fca46 --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/openUnflow2.js @@ -0,0 +1,29 @@ +(function(factory){ + var nameSpace = 'field_4793655815239859651'; + // 解决当前页面有多个相同自定义控件产生冲突的问题 + if(!window[nameSpace]){ + var Builder = factory(); + window[nameSpace] = { + instance: {} + }; + window[nameSpace].init = function (options) { + // 存放当前对象的实例,privateId不同,所有不会重复 + window[nameSpace].instance[options.privateId] = new Builder(options); + }; + } + +})(function(){ + + /** + * 构造函数 + * @param options + * @constructor + */ + function App(options) { + alert("初始化自定义控件"); + } + + + + return App; +}); diff --git a/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/setTemplate.js b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/setTemplate.js new file mode 100644 index 0000000..bc6bb40 --- /dev/null +++ b/seeyon/apps_res/cap/customCtrlResources/openUnflowResources/js/setTemplate.js @@ -0,0 +1,99 @@ +var unflowList, param, loading, process; +$(document).ready(function() { + param = initParam().params;// 获取页面参数 + // 处理进度条 + process = top.$.progressBar({ + text : "加载中..." + }); + loading = true; + getUnflowList(); +}); + + +// 获取底表 +function getUnflowList() { + $.ajax({ + url : "/seeyon/rest/cap4/unflow/select", + async : true, + success : function(data) { + // 处理进度条 + if (loading) + process.close(); + loading = false; + //data = JSON.parse(data); + var result = data.data; + unflowList = result; + for (var i = 0; i < result.length; i++) { + $("#queryList ul").append( + $("
  • " + + result[i].name + + "
  • ").attr("info", + JSON.stringify(result[i]))); + } + $("#queryList ul").delegate( + "li", + "click", + function() { + $(this).siblings().removeClass('active').end() + .addClass('active'); + }); + if (param && param.id) { // 激活当前项 + $('#' + param.id).trigger('click'); + } + } + }); +} + +// 搜索 +function search() { + var searchValue = $("#search_query").val(); + $("#queryList ul").empty(); + for (var i = 0; i < unflowList.length; i++) { + if (unflowList[i].name.indexOf(searchValue) != -1) { + $("#queryList ul").append( + $("
  • " + + unflowList[i].name + "
  • ").attr( + "info", JSON.stringify(unflowList[i]))); + } + } +} + +// 返回参数获取 +function getResult() { + return JSON.parse($("#queryList ul").find(".active").attr("info") + || "{}"); +} + +// --------------------以下为固定方法,需要实现返回参数获取-------------- + +// 获取弹窗传递过来的参数 +function initParam() { + var obj = window.parentDialogObj && (window.parentDialogObj["ctrlDialog"]);// 获取窗口对象 + if (obj && obj.getTransParams) { + // 然后通过V5方法获取弹窗传递过来的参数 + return obj.getTransParams(); + } +} + +// 确定按钮调用方法,返回需要的json数据 +function OK() { + var result = getResult(); + + if (param && param.designId !== result.designId) + return { + valid : true, + data : { + customParam : { + templateId : result, + mapping : null + } + } + }; + + return { + valid : true, + data : result + }; +} \ No newline at end of file diff --git a/src/SIMSUN.TTC b/src/SIMSUN.TTC new file mode 100644 index 0000000..5f22ce3 Binary files /dev/null and b/src/SIMSUN.TTC differ diff --git a/src/com/fasc/open/api/bean/base/BaseBean.java b/src/com/fasc/open/api/bean/base/BaseBean.java new file mode 100644 index 0000000..450c59e --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BaseBean.java @@ -0,0 +1,12 @@ +package com.fasc.open.api.bean.base; + +import java.io.Serializable; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class BaseBean implements Serializable { + private static final long serialVersionUID = 1L; + +} diff --git a/src/com/fasc/open/api/bean/base/BaseHttpRes.java b/src/com/fasc/open/api/bean/base/BaseHttpRes.java new file mode 100644 index 0000000..8d8c8b2 --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BaseHttpRes.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * @date 2021/12/17 10:28:55 + */ +public class BaseHttpRes extends BaseBean{ + private Integer httpStatusCode; + + public Integer getHttpStatusCode() { + return httpStatusCode; + } + + public void setHttpStatusCode(Integer httpStatusCode) { + this.httpStatusCode = httpStatusCode; + } +} diff --git a/src/com/fasc/open/api/bean/base/BasePageReq.java b/src/com/fasc/open/api/bean/base/BasePageReq.java new file mode 100644 index 0000000..9ad72e5 --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BasePageReq.java @@ -0,0 +1,26 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * 2021/9/11 15:19:05 + */ +public class BasePageReq extends BaseReq { + private Integer listPageNo; + private Integer listPageSize; + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getListPageSize() { + return listPageSize; + } + + public void setListPageSize(Integer listPageSize) { + this.listPageSize = listPageSize; + } +} diff --git a/src/com/fasc/open/api/bean/base/BasePageRes.java b/src/com/fasc/open/api/bean/base/BasePageRes.java new file mode 100644 index 0000000..8166c89 --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BasePageRes.java @@ -0,0 +1,44 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * 2021/9/11 15:31:15 + */ +public class BasePageRes { + private Integer listPageNo; + private Integer countInPage; + private Integer listPageCount; + private Integer totalCount; + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public Integer getListPageCount() { + return listPageCount; + } + + public void setListPageCount(Integer listPageCount) { + this.listPageCount = listPageCount; + } + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getCountInPage() { + return countInPage; + } + + public void setCountInPage(Integer countInPage) { + this.countInPage = countInPage; + } +} diff --git a/src/com/fasc/open/api/bean/base/BaseReq.java b/src/com/fasc/open/api/bean/base/BaseReq.java new file mode 100644 index 0000000..9bf2a9a --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BaseReq.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class BaseReq extends BaseBean { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } +} diff --git a/src/com/fasc/open/api/bean/base/BaseRes.java b/src/com/fasc/open/api/bean/base/BaseRes.java new file mode 100644 index 0000000..136022a --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BaseRes.java @@ -0,0 +1,55 @@ +package com.fasc.open.api.bean.base; + +import com.fasc.open.api.constants.RequestConstants; +import org.apache.http.HttpStatus; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class BaseRes extends BaseHttpRes { + + private String code; + + private String msg; + + private T data; + + public BaseRes() { + } + + public boolean isSuccess() { + return getHttpStatusCode() != null + && getHttpStatusCode().equals(HttpStatus.SC_OK) + && RequestConstants.SUCCESS_CODE.equals(code); + } + + public BaseRes(String code, String msg) { + this.code = code; + this.msg = msg; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } +} diff --git a/src/com/fasc/open/api/bean/base/BaseResponseEntity.java b/src/com/fasc/open/api/bean/base/BaseResponseEntity.java new file mode 100644 index 0000000..ce50246 --- /dev/null +++ b/src/com/fasc/open/api/bean/base/BaseResponseEntity.java @@ -0,0 +1,35 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * 2021/9/9 21:34:22 + */ +public class BaseResponseEntity extends BaseHttpRes { + private byte[] content; + private String contentType; + private String data; + + public byte[] getContent() { + return content; + } + + public void setContent(byte[] content) { + this.content = content; + } + + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } +} diff --git a/src/com/fasc/open/api/bean/base/HttpInfoRes.java b/src/com/fasc/open/api/bean/base/HttpInfoRes.java new file mode 100644 index 0000000..95b8e12 --- /dev/null +++ b/src/com/fasc/open/api/bean/base/HttpInfoRes.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.bean.base; + +/** + * @author Fadada + * @date 2021/12/17 10:55:15 + */ +public class HttpInfoRes extends BaseHttpRes { + private String body; + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + + public static HttpInfoRes getInstance() { + return new HttpInfoRes(); + } +} diff --git a/src/com/fasc/open/api/bean/common/Actor.java b/src/com/fasc/open/api/bean/common/Actor.java new file mode 100644 index 0000000..08db293 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/Actor.java @@ -0,0 +1,120 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/16 16:34:09 + */ +public class Actor extends BaseBean { + private String actorId; + private String actorType; + private String actorName; + private List permissions; + private String actorOpenId; + private String actorFDDId; + private List actorCorpMembers; + private String identNameForMatch; + private String certType; + private String certNoForMatch; + private String accountName; + private Notification notification; + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getActorName() { + return actorName; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public String getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(String actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public String getActorFDDId() { + return actorFDDId; + } + + public void setActorFDDId(String actorFDDId) { + this.actorFDDId = actorFDDId; + } + + public List getActorCorpMembers() { + return actorCorpMembers; + } + + public void setActorCorpMembers(List actorCorpMembers) { + this.actorCorpMembers = actorCorpMembers; + } + + public String getIdentNameForMatch() { + return identNameForMatch; + } + + public void setIdentNameForMatch(String identNameForMatch) { + this.identNameForMatch = identNameForMatch; + } + + public String getCertNoForMatch() { + return certNoForMatch; + } + + public void setCertNoForMatch(String certNoForMatch) { + this.certNoForMatch = certNoForMatch; + } + + public Notification getNotification() { + return notification; + } + + public void setNotification(Notification notification) { + this.notification = notification; + } + + public String getCertType() { + return certType; + } + + public void setCertType(String certType) { + this.certType = certType; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } +} diff --git a/src/com/fasc/open/api/bean/common/ActorCorp.java b/src/com/fasc/open/api/bean/common/ActorCorp.java new file mode 100644 index 0000000..257e3d8 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/ActorCorp.java @@ -0,0 +1,64 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 14:31:32 + */ +public class ActorCorp extends BaseBean { + private String actorCorpId; + private CorpIdentInfo corpIdentInfo; + private CorpInfoExtend corpInfoExtend; + private String operatorId; + private UserIdentInfo operatorIdentInfo; + private UserInfoExtend operatorInfoExtend; + + public String getActorCorpId() { + return actorCorpId; + } + + public void setActorCorpId(String actorCorpId) { + this.actorCorpId = actorCorpId; + } + + public CorpIdentInfo getCorpIdentInfo() { + return corpIdentInfo; + } + + public void setCorpIdentInfo(CorpIdentInfo corpIdentInfo) { + this.corpIdentInfo = corpIdentInfo; + } + + public CorpInfoExtend getCorpInfoExtend() { + return corpInfoExtend; + } + + public void setCorpInfoExtend(CorpInfoExtend corpInfoExtend) { + this.corpInfoExtend = corpInfoExtend; + } + + public String getOperatorId() { + return operatorId; + } + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + public UserIdentInfo getOperatorIdentInfo() { + return operatorIdentInfo; + } + + public void setOperatorIdentInfo(UserIdentInfo operatorIdentInfo) { + this.operatorIdentInfo = operatorIdentInfo; + } + + public UserInfoExtend getOperatorInfoExtend() { + return operatorInfoExtend; + } + + public void setOperatorInfoExtend(UserInfoExtend operatorInfoExtend) { + this.operatorInfoExtend = operatorInfoExtend; + } +} diff --git a/src/com/fasc/open/api/bean/common/ActorCorpMember.java b/src/com/fasc/open/api/bean/common/ActorCorpMember.java new file mode 100644 index 0000000..95f18f8 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/ActorCorpMember.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.bean.common; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class ActorCorpMember { + private String memberId; + + public String getMemberId() { + return memberId; + } + + public void setMemberId(String memberId) { + this.memberId = memberId; + } +} diff --git a/src/com/fasc/open/api/bean/common/ActorUser.java b/src/com/fasc/open/api/bean/common/ActorUser.java new file mode 100644 index 0000000..8521198 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/ActorUser.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 14:31:32 + */ +public class ActorUser extends BaseBean { + private String actorUserId; + private UserIdentInfo userIdentInfo; + private UserInfoExtend userInfoExtend; + + public String getActorUserId() { + return actorUserId; + } + + public void setActorUserId(String actorUserId) { + this.actorUserId = actorUserId; + } + + public UserIdentInfo getUserIdentInfo() { + return userIdentInfo; + } + + public void setUserIdentInfo(UserIdentInfo userIdentInfo) { + this.userIdentInfo = userIdentInfo; + } + + public UserInfoExtend getUserInfoExtend() { + return userInfoExtend; + } + + public void setUserInfoExtend(UserInfoExtend userInfoExtend) { + this.userInfoExtend = userInfoExtend; + } +} diff --git a/src/com/fasc/open/api/bean/common/CorpIdentInfo.java b/src/com/fasc/open/api/bean/common/CorpIdentInfo.java new file mode 100644 index 0000000..96f2eac --- /dev/null +++ b/src/com/fasc/open/api/bean/common/CorpIdentInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 14:32:05 + */ +public class CorpIdentInfo extends BaseBean { + private String corpName; + private String corpIdentType; + private String corpIdentNo; + private String legalRepName; + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpIdentType() { + return corpIdentType; + } + + public void setCorpIdentType(String corpIdentType) { + this.corpIdentType = corpIdentType; + } + + public String getCorpIdentNo() { + return corpIdentNo; + } + + public void setCorpIdentNo(String corpIdentNo) { + this.corpIdentNo = corpIdentNo; + } + + public String getLegalRepName() { + return legalRepName; + } + + public void setLegalRepName(String legalRepName) { + this.legalRepName = legalRepName; + } +} diff --git a/src/com/fasc/open/api/bean/common/CorpInfoExtend.java b/src/com/fasc/open/api/bean/common/CorpInfoExtend.java new file mode 100644 index 0000000..5e2bbbf --- /dev/null +++ b/src/com/fasc/open/api/bean/common/CorpInfoExtend.java @@ -0,0 +1,55 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/15 13:51:55 + */ +public class CorpInfoExtend extends BaseBean { + private String bankName; + private String bankBranchName; + private String bankAccountNo; + private String bankProvinceName; + private String bankCityName; + + public String getBankName() { + return bankName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public String getBankBranchName() { + return bankBranchName; + } + + public void setBankBranchName(String bankBranchName) { + this.bankBranchName = bankBranchName; + } + + public String getBankAccountNo() { + return bankAccountNo; + } + + public void setBankAccountNo(String bankAccountNo) { + this.bankAccountNo = bankAccountNo; + } + + public String getBankProvinceName() { + return bankProvinceName; + } + + public void setBankProvinceName(String bankProvinceName) { + this.bankProvinceName = bankProvinceName; + } + + public String getBankCityName() { + return bankCityName; + } + + public void setBankCityName(String bankCityName) { + this.bankCityName = bankCityName; + } +} diff --git a/src/com/fasc/open/api/bean/common/Field.java b/src/com/fasc/open/api/bean/common/Field.java new file mode 100644 index 0000000..35cfd1d --- /dev/null +++ b/src/com/fasc/open/api/bean/common/Field.java @@ -0,0 +1,182 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/16 16:36:13 + */ +public class Field extends BaseBean { + private String fieldId; + private String fieldName; + private String fieldKey; + private FieldPosition position; + private String fieldType; + private FieldTextSingleLine fieldTextSingleLine; + private FieldTextMultiLine fieldTextMultiLine; + private FieldCheckBox fieldCheckBox; + private FieldRemarkSign fieldRemarkSign; + private Boolean moveable; + private FieldNumber fieldNumber; + private FieldIdCard fieldIdCard; + private FieldFillDate fieldFillDate; + private FieldMultiRadio fieldMultiRadio; + private FieldPicture fieldPicture; + private FieldSelectBox fieldSelectBox; + private FieldTable fieldTable; + private FieldPersonSign fieldPersonSign; + private FieldCorpSeal fieldCorpSeal; + + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public FieldPosition getPosition() { + return position; + } + + public void setPosition(FieldPosition position) { + this.position = position; + } + + public String getFieldType() { + return fieldType; + } + + public void setFieldType(String fieldType) { + this.fieldType = fieldType; + } + + public FieldTextSingleLine getFieldTextSingleLine() { + return fieldTextSingleLine; + } + + public void setFieldTextSingleLine(FieldTextSingleLine fieldTextSingleLine) { + this.fieldTextSingleLine = fieldTextSingleLine; + } + + public FieldTextMultiLine getFieldTextMultiLine() { + return fieldTextMultiLine; + } + + public void setFieldTextMultiLine(FieldTextMultiLine fieldTextMultiLine) { + this.fieldTextMultiLine = fieldTextMultiLine; + } + + public FieldCheckBox getFieldCheckBox() { + return fieldCheckBox; + } + + public void setFieldCheckBox(FieldCheckBox fieldCheckBox) { + this.fieldCheckBox = fieldCheckBox; + } + + public FieldRemarkSign getFieldRemarkSign() { + return fieldRemarkSign; + } + + public void setFieldRemarkSign(FieldRemarkSign fieldRemarkSign) { + this.fieldRemarkSign = fieldRemarkSign; + } + + public Boolean getMoveable() { + return moveable; + } + + public void setMoveable(Boolean moveable) { + this.moveable = moveable; + } + + public FieldNumber getFieldNumber() { + return fieldNumber; + } + + public void setFieldNumber(FieldNumber fieldNumber) { + this.fieldNumber = fieldNumber; + } + + public FieldIdCard getFieldIdCard() { + return fieldIdCard; + } + + public void setFieldIdCard(FieldIdCard fieldIdCard) { + this.fieldIdCard = fieldIdCard; + } + + public FieldFillDate getFieldFillDate() { + return fieldFillDate; + } + + public void setFieldFillDate(FieldFillDate fieldFillDate) { + this.fieldFillDate = fieldFillDate; + } + + public FieldMultiRadio getFieldMultiRadio() { + return fieldMultiRadio; + } + + public void setFieldMultiRadio(FieldMultiRadio fieldMultiRadio) { + this.fieldMultiRadio = fieldMultiRadio; + } + + public FieldPicture getFieldPicture() { + return fieldPicture; + } + + public void setFieldPicture(FieldPicture fieldPicture) { + this.fieldPicture = fieldPicture; + } + + public FieldSelectBox getFieldSelectBox() { + return fieldSelectBox; + } + + public void setFieldSelectBox(FieldSelectBox fieldSelectBox) { + this.fieldSelectBox = fieldSelectBox; + } + + public FieldTable getFieldTable() { + return fieldTable; + } + + public void setFieldTable(FieldTable fieldTable) { + this.fieldTable = fieldTable; + } + + public FieldPersonSign getFieldPersonSign() { + return fieldPersonSign; + } + + public void setFieldPersonSign(FieldPersonSign fieldPersonSign) { + this.fieldPersonSign = fieldPersonSign; + } + + public FieldCorpSeal getFieldCorpSeal() { + return fieldCorpSeal; + } + + public void setFieldCorpSeal(FieldCorpSeal fieldCorpSeal) { + this.fieldCorpSeal = fieldCorpSeal; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldCheckBox.java b/src/com/fasc/open/api/bean/common/FieldCheckBox.java new file mode 100644 index 0000000..d498860 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldCheckBox.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 9:46:32 + */ +public class FieldCheckBox extends BaseBean { + private Boolean required; + private Boolean defaultValue; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public Boolean getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(Boolean defaultValue) { + this.defaultValue = defaultValue; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldCorpSeal.java b/src/com/fasc/open/api/bean/common/FieldCorpSeal.java new file mode 100644 index 0000000..97cfe22 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldCorpSeal.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.bean.common; + +public class FieldCorpSeal { + + private Integer width; + private Integer height; + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldFillDate.java b/src/com/fasc/open/api/bean/common/FieldFillDate.java new file mode 100644 index 0000000..50a1f82 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldFillDate.java @@ -0,0 +1,86 @@ +package com.fasc.open.api.bean.common; + +public class FieldFillDate { + + private Boolean required; + private String defaultValue; + private String dateFormat; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getDateFormat() { + return dateFormat; + } + + public void setDateFormat(String dateFormat) { + this.dateFormat = dateFormat; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldIdCard.java b/src/com/fasc/open/api/bean/common/FieldIdCard.java new file mode 100644 index 0000000..49493ae --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldIdCard.java @@ -0,0 +1,77 @@ +package com.fasc.open.api.bean.common; + +public class FieldIdCard { + + private Boolean required; + private String defaultValue; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldMultiCheckbox.java b/src/com/fasc/open/api/bean/common/FieldMultiCheckbox.java new file mode 100644 index 0000000..1a95744 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldMultiCheckbox.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.bean.common; + +import java.util.List; + +public class FieldMultiCheckbox { + + private Boolean required; + private List option; + private List defaultValue; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public List getOption() { + return option; + } + + public void setOption(List option) { + this.option = option; + } + + public List getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(List defaultValue) { + this.defaultValue = defaultValue; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldMultiRadio.java b/src/com/fasc/open/api/bean/common/FieldMultiRadio.java new file mode 100644 index 0000000..33cff3e --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldMultiRadio.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.bean.common; + +import java.util.List; + +public class FieldMultiRadio { + + private Boolean required; + private List option; + private List defaultValue; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public List getOption() { + return option; + } + + public void setOption(List option) { + this.option = option; + } + + public List getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(List defaultValue) { + this.defaultValue = defaultValue; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldNumber.java b/src/com/fasc/open/api/bean/common/FieldNumber.java new file mode 100644 index 0000000..1ffb034 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldNumber.java @@ -0,0 +1,76 @@ +package com.fasc.open.api.bean.common; + +public class FieldNumber { + private Boolean required; + private String defaultValue; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldPersonSign.java b/src/com/fasc/open/api/bean/common/FieldPersonSign.java new file mode 100644 index 0000000..ff37486 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldPersonSign.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.bean.common; + +public class FieldPersonSign { + + private Integer width; + private Integer height; + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldPicture.java b/src/com/fasc/open/api/bean/common/FieldPicture.java new file mode 100644 index 0000000..b9e52e9 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldPicture.java @@ -0,0 +1,41 @@ +package com.fasc.open.api.bean.common; + +public class FieldPicture { + + private Boolean required; + private String defaultValue; + private Integer width; + private Integer height; + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldPosition.java b/src/com/fasc/open/api/bean/common/FieldPosition.java new file mode 100644 index 0000000..402df8a --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldPosition.java @@ -0,0 +1,74 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 9:49:10 + */ +public class FieldPosition extends BaseBean { + private String positionMode; + private Integer positionPageNo; + private String positionX; + private String positionY; + private String positionKeyword; + private String keywordOffsetX; + private String keywordOffsetY; + + public String getKeywordOffsetX() { + return keywordOffsetX; + } + + public void setKeywordOffsetX(String keywordOffsetX) { + this.keywordOffsetX = keywordOffsetX; + } + + public String getKeywordOffsetY() { + return keywordOffsetY; + } + + public void setKeywordOffsetY(String keywordOffsetY) { + this.keywordOffsetY = keywordOffsetY; + } + + public String getPositionMode() { + return positionMode; + } + + public void setPositionMode(String positionMode) { + this.positionMode = positionMode; + } + + public Integer getPositionPageNo() { + return positionPageNo; + } + + public void setPositionPageNo(Integer positionPageNo) { + this.positionPageNo = positionPageNo; + } + + public String getPositionX() { + return positionX; + } + + public void setPositionX(String positionX) { + this.positionX = positionX; + } + + public String getPositionY() { + return positionY; + } + + public void setPositionY(String positionY) { + this.positionY = positionY; + } + + public String getPositionKeyword() { + return positionKeyword; + } + + public void setPositionKeyword(String positionKeyword) { + this.positionKeyword = positionKeyword; + } +} + diff --git a/src/com/fasc/open/api/bean/common/FieldRemarkSign.java b/src/com/fasc/open/api/bean/common/FieldRemarkSign.java new file mode 100644 index 0000000..fe9c10e --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldRemarkSign.java @@ -0,0 +1,67 @@ +package com.fasc.open.api.bean.common; + +public class FieldRemarkSign { + private String defaultValue; + private String tips; + private Boolean editable; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Boolean getEditable() { + return editable; + } + + public void setEditable(Boolean editable) { + this.editable = editable; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldSelectBox.java b/src/com/fasc/open/api/bean/common/FieldSelectBox.java new file mode 100644 index 0000000..375c61b --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldSelectBox.java @@ -0,0 +1,88 @@ +package com.fasc.open.api.bean.common; + +import java.util.List; + +public class FieldSelectBox { + + private Boolean required; + private List option; + private String defaultValue; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public List getOption() { + return option; + } + + public void setOption(List option) { + this.option = option; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldTable.java b/src/com/fasc/open/api/bean/common/FieldTable.java new file mode 100644 index 0000000..3cdd9b1 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldTable.java @@ -0,0 +1,145 @@ +package com.fasc.open.api.bean.common; + +import java.util.List; + +public class FieldTable { + private Boolean required; + + private List header; + + private Integer requiredCount; + + private String fontType; + + private Integer fontSize; + + private String alignment; + + private String headerPosition; + + private Integer rows; + + private Integer cols; + + private Integer rowHeight; + + private List widths; + + private Boolean dynamicFilling; + + private List> defaultValue; + + private Boolean hideHeader; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public List getHeader() { + return header; + } + + public void setHeader(List header) { + this.header = header; + } + + public Integer getRequiredCount() { + return requiredCount; + } + + public void setRequiredCount(Integer requiredCount) { + this.requiredCount = requiredCount; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } + + public String getHeaderPosition() { + return headerPosition; + } + + public void setHeaderPosition(String headerPosition) { + this.headerPosition = headerPosition; + } + + public Integer getRows() { + return rows; + } + + public void setRows(Integer rows) { + this.rows = rows; + } + + public Integer getCols() { + return cols; + } + + public void setCols(Integer cols) { + this.cols = cols; + } + + public Integer getRowHeight() { + return rowHeight; + } + + public void setRowHeight(Integer rowHeight) { + this.rowHeight = rowHeight; + } + + public List getWidths() { + return widths; + } + + public void setWidths(List widths) { + this.widths = widths; + } + + public Boolean getDynamicFilling() { + return dynamicFilling; + } + + public void setDynamicFilling(Boolean dynamicFilling) { + this.dynamicFilling = dynamicFilling; + } + + public List> getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(List> defaultValue) { + this.defaultValue = defaultValue; + } + + public Boolean getHideHeader() { + return hideHeader; + } + + public void setHideHeader(Boolean hideHeader) { + this.hideHeader = hideHeader; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldTextMultiLine.java b/src/com/fasc/open/api/bean/common/FieldTextMultiLine.java new file mode 100644 index 0000000..b786465 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldTextMultiLine.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 9:46:32 + */ +public class FieldTextMultiLine extends BaseBean { + private Boolean required; + private String defaultValue; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/FieldTextSingleLine.java b/src/com/fasc/open/api/bean/common/FieldTextSingleLine.java new file mode 100644 index 0000000..16b459b --- /dev/null +++ b/src/com/fasc/open/api/bean/common/FieldTextSingleLine.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 9:46:32 + */ +public class FieldTextSingleLine extends BaseBean { + private Boolean required; + private String defaultValue; + private String tips; + private Integer width; + private Integer height; + private String fontType; + private Integer fontSize; + private String alignment; + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getTips() { + return tips; + } + + public void setTips(String tips) { + this.tips = tips; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public String getFontType() { + return fontType; + } + + public void setFontType(String fontType) { + this.fontType = fontType; + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + } + + public String getAlignment() { + return alignment; + } + + public void setAlignment(String alignment) { + this.alignment = alignment; + } +} diff --git a/src/com/fasc/open/api/bean/common/Notification.java b/src/com/fasc/open/api/bean/common/Notification.java new file mode 100644 index 0000000..db7a3bf --- /dev/null +++ b/src/com/fasc/open/api/bean/common/Notification.java @@ -0,0 +1,59 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 14:35:51 + */ +public class Notification extends BaseBean { + private Boolean sendNotification; + private String notifyWay; + private String notifyAddress; + private Boolean appointAccount; + + public Boolean getSendNotification() { + return sendNotification; + } + + public void setSendNotification(Boolean sendNotification) { + this.sendNotification = sendNotification; + } + + public String getNotifyWay() { + return notifyWay; + } + + public void setNotifyWay(String notifyWay) { + this.notifyWay = notifyWay; + } + + public String getNotifyAddress() { + return notifyAddress; + } + + public void setNotifyAddress(String notifyAddress) { + this.notifyAddress = notifyAddress; + } + + public static Notification getInstance(boolean sendNotification, String notifyWay, String notifyAddress) { + return new Notification(sendNotification, notifyWay, notifyAddress); + } + + public Notification(Boolean sendNotification, String notifyWay, String notifyAddress) { + this.sendNotification = sendNotification; + this.notifyWay = notifyWay; + this.notifyAddress = notifyAddress; + } + + public Notification() { + } + + public Boolean getAppointAccount() { + return appointAccount; + } + + public void setAppointAccount(Boolean appointAccount) { + this.appointAccount = appointAccount; + } +} diff --git a/src/com/fasc/open/api/bean/common/OpenId.java b/src/com/fasc/open/api/bean/common/OpenId.java new file mode 100644 index 0000000..db2b209 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/OpenId.java @@ -0,0 +1,36 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 9:28:18 + */ +public class OpenId extends BaseBean { + private String idType; + private String openId; + + public String getIdType() { + return idType; + } + + public void setIdType(String idType) { + this.idType = idType; + } + + public String getOpenId() { + return openId; + } + + public void setOpenId(String openId) { + this.openId = openId; + } + + public static OpenId getInstance(String idType, + String id) { + OpenId openId = new OpenId(); + openId.setIdType(idType); + openId.setOpenId(id); + return openId; + } +} diff --git a/src/com/fasc/open/api/bean/common/UserIdentInfo.java b/src/com/fasc/open/api/bean/common/UserIdentInfo.java new file mode 100644 index 0000000..f758aa9 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/UserIdentInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 14:32:05 + */ +public class UserIdentInfo extends BaseBean { + private String userName; + private String identType; + private String identNo; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getIdentType() { + return identType; + } + + public void setIdentType(String identType) { + this.identType = identType; + } + + public String getIdentNo() { + return identNo; + } + + public void setIdentNo(String identNo) { + this.identNo = identNo; + } +} diff --git a/src/com/fasc/open/api/bean/common/UserInfoExtend.java b/src/com/fasc/open/api/bean/common/UserInfoExtend.java new file mode 100644 index 0000000..8c4b6a2 --- /dev/null +++ b/src/com/fasc/open/api/bean/common/UserInfoExtend.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.bean.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/15 13:49:58 + */ +public class UserInfoExtend extends BaseBean { + private String bankAccountNo; + private String mobile; + + public String getBankAccountNo() { + return bankAccountNo; + } + + public void setBankAccountNo(String bankAccountNo) { + this.bankAccountNo = bankAccountNo; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + +} diff --git a/src/com/fasc/open/api/config/HttpConfig.java b/src/com/fasc/open/api/config/HttpConfig.java new file mode 100644 index 0000000..83b4399 --- /dev/null +++ b/src/com/fasc/open/api/config/HttpConfig.java @@ -0,0 +1,114 @@ +package com.fasc.open.api.config; + +/** + * @author Fadada + * 2021/9/8 17:53:20 + */ +public class HttpConfig { + /** + * http连接超时时间 + */ + private Integer connectTimeout; + /** + * http读超时时间 + */ + private Integer readTimeout; + /** + * httpclient 每路由(域名)最大的连接数 + */ + private Integer defaultMaxPerRoute; + /** + * httpclient socket最大的连接数 + */ + private Integer defaultSocketMaxTotal; + /** + * http是否打开代理 + */ + private Boolean proxyFlag = false; + /** + * http代理ip + */ + private String proxyHost; + /** + * http代理端口号 + */ + private Integer proxyPort; + + + public HttpConfig() { + } + + public HttpConfig(int connectTimeout, int readTimeout, Boolean proxyFlag, String proxyHost, Integer proxyPort) { + this.connectTimeout = connectTimeout; + this.readTimeout = readTimeout; + this.proxyFlag = proxyFlag; + this.proxyHost = proxyHost; + this.proxyPort = proxyPort; + } + + public HttpConfig(int connectTimeout, int readTimeout, Boolean proxyFlag, String proxyHost, Integer proxyPort, Integer defaultMaxPerRoute, Integer defaultSocketMaxTotal) { + this.connectTimeout = connectTimeout; + this.readTimeout = readTimeout; + this.proxyFlag = proxyFlag; + this.proxyHost = proxyHost; + this.proxyPort = proxyPort; + this.defaultMaxPerRoute = defaultMaxPerRoute; + this.defaultSocketMaxTotal = defaultSocketMaxTotal; + } + + public Integer getDefaultMaxPerRoute() { + return defaultMaxPerRoute; + } + + public void setDefaultMaxPerRoute(Integer defaultMaxPerRoute) { + this.defaultMaxPerRoute = defaultMaxPerRoute; + } + + public Integer getDefaultSocketMaxTotal() { + return defaultSocketMaxTotal; + } + + public void setDefaultSocketMaxTotal(Integer defaultSocketMaxTotal) { + this.defaultSocketMaxTotal = defaultSocketMaxTotal; + } + + public Integer getConnectTimeout() { + return connectTimeout; + } + + public void setConnectTimeout(Integer connectTimeout) { + this.connectTimeout = connectTimeout; + } + + public Integer getReadTimeout() { + return readTimeout; + } + + public void setReadTimeout(Integer readTimeout) { + this.readTimeout = readTimeout; + } + + public Boolean getProxyFlag() { + return proxyFlag; + } + + public void setProxyFlag(Boolean proxyFlag) { + this.proxyFlag = proxyFlag; + } + + public String getProxyHost() { + return proxyHost; + } + + public void setProxyHost(String proxyHost) { + this.proxyHost = proxyHost; + } + + public Integer getProxyPort() { + return proxyPort; + } + + public void setProxyPort(Integer proxyPort) { + this.proxyPort = proxyPort; + } +} diff --git a/src/com/fasc/open/api/constants/EUIConstants.java b/src/com/fasc/open/api/constants/EUIConstants.java new file mode 100644 index 0000000..b173bdf --- /dev/null +++ b/src/com/fasc/open/api/constants/EUIConstants.java @@ -0,0 +1,8 @@ +package com.fasc.open.api.constants; + +public class EUIConstants { + private EUIConstants() { + } + public static final String SERVICE_AUTHORIZE = "/authorize/list?"; + +} diff --git a/src/com/fasc/open/api/constants/OpenApiUrlConstants.java b/src/com/fasc/open/api/constants/OpenApiUrlConstants.java new file mode 100644 index 0000000..0095d86 --- /dev/null +++ b/src/com/fasc/open/api/constants/OpenApiUrlConstants.java @@ -0,0 +1,165 @@ +package com.fasc.open.api.constants; + +/** + * @author Fadada + * 2021/9/8 15:24:46 + */ +public class OpenApiUrlConstants { + private OpenApiUrlConstants() { + } + + /*serviceClient*/ + public static final String SERVICE_GET_ACCESS_TOKEN = "POST /service/get-access-token"; + + + /*UserClient*/ + public static final String USER_DISABLE = "POST /user/disable"; + public static final String USER_ENABLE = "POST /user/enable"; + public static final String USER_UNBIND = "POST /user/unbind"; + public static final String USER_GET = "POST /user/get"; + public static final String USER_GET_IDENTITY_INFO = "POST /user/get-identity-info"; + public static final String USER_GET_IDENT_TRANSACTION_ID = "POST /user/get-ident-transaction-id"; + public static final String USER_GET_THREE_ELEMENT_VERIFY_URL = "POST /user/three-element-verify/get-url"; + public static final String USER_GET_FOUR_ELEMENT_VERIFY_URL = "POST /user/four-element-verify/get-url"; + public static final String USER_GET_IDCARD_IMAGE_DOWNLOAD_URL = "POST /user/element-verify/get-idcard-image-download-url"; + public static final String USER_GET_OCR_ID_CARD = "POST /user/ocr/id-card"; + + /*corpClient*/ + public static final String CORP_DISABLE = "POST /corp/disable"; + public static final String CORP_ENABLE = "POST /corp/enable"; + public static final String CORP_GET = "POST /corp/get"; + public static final String CORP_GET_IDENTITY_INFO = "POST /corp/get-identity-info"; + public static final String CORP_UNBIND= "POST /corp/unbind"; + public static final String CORP_GET_IDENTIFIED_STATUS= "POST /corp/get-identified-status"; + public static final String CORP_GET_IDENT_TRANSACTION_ID= "POST /corp/get-ident-transaction-id"; + + public static final String COUNTERPART_GET_LIST = "POST /counterpart/get-list"; + + + /*docClient*/ + public static final String FILE_UPLOAD_BY_URL = "POST /file/upload-by-url"; + public static final String FILE_GET_UPLOAD_URL = "POST /file/get-upload-url"; + public static final String FILE_PROCESS = "POST /file/process"; + public static final String OCR_EDIT_GET_COMPARE_URL = "POST /ocr/edit/get-compare-url"; + public static final String OCR_EDIT_GET_RESULT_COMPARE_URL = "POST /ocr/edit/compare-result-url"; + public static final String OCR_EDIT_GET_EXAMINE_URL = "POST /ocr/edit/get-examine-url"; + public static final String OCR_EDIT_GET_RESULT_EXAMINE_URL = "POST /ocr/edit/examine-result-url"; + public static final String DOC_POST_FILE_VERIFY_SIGN = "POST /file/verify-sign"; + + + + /*templateClient*/ + public static final String DOC_TEMPLATE_GET_LIST = "POST /doc-template/get-list"; + public static final String DOC_TEMPLATE_GET_DETAIL = "POST /doc-template/get-detail"; + public static final String SIGN_TEMPLATE_GET_LIST = "POST /sign-template/get-list"; + public static final String SIGN_TEMPLATE_GET_DETAIL = "POST /sign-template/get-detail"; + public static final String SIGN_TEMPLATE_GET_CREATE_URL = "POST /template/create/get-url"; + public static final String SIGN_TEMPLATE_GET_EDIT_URL = "POST /template/edit/get-url"; + public static final String SIGN_TEMPLATE_GET_PREVIEW_URL = "POST /template/preview/get-url"; + public static final String SIGN_TEMPLATE_GET_MANAGE_URL = "POST /template/manage/get-url"; + public static final String APP_DOC_TEMPLATE_GET_LIST = "POST /app-doc-template/get-list"; + public static final String APP_DOC_TEMPLATE_GET_DETAIL = "POST /app-doc-template/get-detail"; + public static final String APP_SIGN_TEMPLATE_GET_LIST = "POST /app-sign-template/get-list"; + public static final String APP_SIGN_TEMPLATE_GET_DETAIL = "POST /app-sign-template/get-detail"; + public static final String APP_TEMPLATE_CREATE_GET_URL = "POST /app-template/create/get-url"; + public static final String APP_TEMPLATE_EDIT_GET_URL = "POST /app-template/edit/get-url"; + public static final String APP_TEMPLATE_PREVIEW_GET_URL = "POST /app-template/preview/get-url"; + public static final String APP_FIELD_CREATE = "POST /app-field/create"; + public static final String APP_FIELD_MODIFY = "POST /app-field/modify"; + public static final String APP_FIELD_SET_STATUS = "POST /app-field/set-status"; + public static final String APP_FIELD_GET_LIST = "POST /app-field/get-list"; + public static final String APP_DOC_TEMPLATE_SET_STATUS = "POST /app-doc-template/set-status"; + public static final String APP_DOC_TEMPLATE_DELETE = "POST /app-doc-template/delete"; + public static final String APP_DOC_SIGN_TEMPLATE_SET_STATUS = "POST /app-sign-template/set-status"; + public static final String APP_DOC_SIGN_TEMPLATE_DELETE = "POST /app-sign-template/delete"; + public static final String SET_DOC_TEMPLATE_STATUS = "POST /doc-template/set-status"; + public static final String DELETE_DOC_TEMPLATE = "POST /doc-template/delete"; + public static final String SET_SIGN_TEMPLATE_STATUS = "POST /sign-template/set-status"; + public static final String DELETE_SIGN_TEMPLATE = "POST /sign-template/delete"; + + + /*signTaskClient*/ + public static final String SIGN_TASK_CREATE = "POST /sign-task/create"; + public static final String SIGN_TASK_CREATE_WITH_TEMPLATE = "POST /sign-task/create-with-template"; + public static final String SIGN_TASK_DOC_ADD = "POST /sign-task/doc/add"; + public static final String SIGN_TASK_DOC_DELETE = "POST /sign-task/doc/delete"; + public static final String SIGN_TASK_FIELD_ADD = "POST /sign-task/field/add"; + public static final String SIGN_TASK_FIELD_DELETE = "POST /sign-task/field/delete"; + public static final String SIGN_TASK_FIELD_FILL_VALUES = "POST /sign-task/field/fill-values"; + public static final String SIGN_TASK_ATTACH_ADD = "POST /sign-task/attach/add"; + public static final String SIGN_TASK_ATTACH_DELETE = "POST /sign-task/attach/delete"; + public static final String SIGN_TASK_ACTOR_ADD = "POST /sign-task/actor/add"; + public static final String SIGN_TASK_ACTOR_DELETE = "POST /sign-task/actor/delete"; + public static final String SIGN_TASK_START = "POST /sign-task/start"; + public static final String SIGN_TASK_CANCEL = "POST /sign-task/cancel"; + public static final String SIGN_TASK_DOC_FINALIZE = "POST /sign-task/doc-finalize"; + public static final String SIGN_TASK_BLOCK = "POST /sign-task/block"; + public static final String SIGN_TASK_UNBLOCK = "POST /sign-task/unblock"; + public static final String SIGN_TASK_URGE = "POST /sign-task/urge"; + public static final String SIGN_TASK_GET_DETAIL = "POST /sign-task/app/get-detail"; + public static final String SIGN_TASK_OWNER_GET_LIST = "POST /sign-task/owner/get-list"; + public static final String SIGN_TASK_OWNER_GET_DOWNLOAD_URL = "POST /sign-task/owner/get-download-url"; + public static final String SIGN_TASK_ACTOR_GET_URL="POST /sign-task/actor/get-url"; + public static final String SIGN_TASK_CATALOG_LIST="POST /sign-task-catalog/list"; + public static final String SIGN_TASK_FIELD_LIST = "POST /sign-task/field/list"; + public static final String SIGN_TASK_ACTOR_LIST = "POST /sign-task/actor/list"; + public static final String SIGN_TASK_GET_APPROVAL_INFO = "POST /sign-task/get-approval-info"; + public static final String SIGN_TASK_GET_BATCH_SIGN_URL = "POST /sign-task/get-batch-sign-url"; + public static final String SIGN_TASK_GET_EDIT_URL = "POST /sign-task/get-edit-url"; + public static final String SIGN_TASK_GET_PREVIEW_URL = "POST /sign-task/get-preview-url"; + public static final String GET_SIGN_TASK_DOWNLOAD_EVIDENCE_REPORT_URL = "POST /sign-task/evidence-report/get-download-url"; + public static final String SIGN_TASK_DELETE = "POST /sign-task/delete"; + public static final String SIGN_TASK_FINISH = "POST /sign-task/finish"; + public static final String SIGN_TASK_GET_BUSINESS_TYPE_LIST = "POST /sign-task/business-type/get-list"; + public static final String SIGN_TASK_ACTOR_GET_FACE_PICTURE = "POST /sign-task/actor/get-face-picture"; + public static final String SIGN_TASK_ABOLISH = "POST /sign-task/abolish"; + public static final String GET_SIGN_TASK_OWNER_SLICING_TICKET_ID = "POST /sign-task/owner/get-slicing-ticket-id"; + public static final String GET_SIGN_TASK_OWNER_PIC_DOWNLOAD_URL = "POST /sign-task/owner/get-pic-download-url"; + public static final String GET_AUDIO_VIDEO_DOWNLOAD_URL = "POST /sign-task/actor/get-audio-video-download-url"; + + + /*EUI*/ + public static final String BILLING_GET_BILL_URL = "POST /billing/get-bill-url"; + public static final String APP_PAGE_RESOURCE_GET_URL = "POST /app-page-resource/get-url"; + public static final String USER_PAGE_RESOURCE_GET_URL = "POST /user-page-resource/get-url"; + public static final String USER_GET_AUTH_URL = "POST /user/get-auth-url"; + public static final String CORP_GET_AUTH_URL = "POST /corp/get-auth-url"; + + /*OrgClient*/ + public static final String CORP_DEPT_GET_LIST = "POST /corp/dept/get-list"; + public static final String CORP_DEPT_GET_DETAIL = "POST /corp/dept/get-detail"; + public static final String CORP_DEPT_CREATE = "POST /corp/dept/create"; + public static final String CORP_DEPT_MODIFY = "POST /corp/dept/modify"; + public static final String CORP_DEPT_DELETE = "POST /corp/dept/delete"; + public static final String CORP_MEMBER_GET_LIST = "POST /corp/member/get-list"; + public static final String CORP_MEMBER_GET_DETAIL = "POST /corp/member/get-detail"; + public static final String CORP_MEMBER_CREATE = "POST /corp/member/create"; + public static final String CORP_MEMBER_ACTIVE_URL = "POST /corp/member/get-active-url"; + public static final String CORP_MEMBER_MODIFY = "POST /corp/member/modify"; + public static final String CORP_MEMBER_SET_DEPT = "POST /corp/member/set-dept"; + public static final String CORP_MEMBER_SET_STATUS = "POST /corp/member/set-status"; + public static final String CORP_MEMBER_DELETE = "POST /corp/member/delete"; + public static final String GET_ORG_MANAGER_URL = "POST /corp/organization/manage/get-url"; + + + /*SealClient*/ + public static final String SEAL_GET_LIST = "POST /seal/get-list"; + public static final String SEAL_GET_USER_LIST = "POST /seal/get-user-list"; + public static final String SEAL_GET_DETAIL = "POST /seal/get-detail"; + public static final String SEAL_GET_APPOINTED_URL = "POST /seal/manage/get-appointed-seal-url"; + public static final String GET_USER_SEAL_LIST = "POST /seal/user/get-list"; + public static final String SEAL_GET_CREATE_URL = "POST /seal/create/get-url"; + public static final String SEAL_GET_VERIFY_LIST = "POST /seal/verify/get-list"; + public static final String SEAL_MODIFY = "POST /seal/modify"; + public static final String SEAL_GET_GRANT_URL = "POST /seal/grant/get-url"; + public static final String SEAL_CANCEL_GRANT = "POST /seal/grant/cancel"; + public static final String SEAL_SET_STATUS = "POST /seal/set-status"; + public static final String SEAL_DELETE = "POST /seal/delete"; + public static final String SEAL_GET_MANAGE_URL = "POST /seal/manage/get-url"; + public static final String SEAL_GET_FREE_SIGN_URL = "POST /seal/free-sign/get-url"; + public static final String PERSONAL_SEAL_GET_LIST = "POST /personal-seal/get-list"; + public static final String PERSONAL_SEAL_GET_FREE_SIGN_URL = "POST /personal-seal/free-sign/get-url"; + public static final String CANCEL_SEAL_FREE_SIGN = "POST /seal/free-sign/cancel"; + public static final String CANCEL_PERSONAL_SEAL_FREE_SIGN = "POST /personal-seal/free-sign/cancel"; + +} diff --git a/src/com/fasc/open/api/constants/RequestConstants.java b/src/com/fasc/open/api/constants/RequestConstants.java new file mode 100644 index 0000000..e3fca6f --- /dev/null +++ b/src/com/fasc/open/api/constants/RequestConstants.java @@ -0,0 +1,81 @@ +package com.fasc.open.api.constants; + + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class RequestConstants { + + private RequestConstants() { + } + + + /** + * 企业控制台创建应用后得到的应用ID + */ + public static final String APP_ID = "X-FASC-App-Id"; + /** + * FASC.openApi子版本号。如当前版本为:5.1 + */ + public static final String API_SUB_VERSION = "X-FASC-Api-SubVersion"; + + public static final String CURRENT_SUB_VERSION = "5.1"; + /** + * 签名算法类型:固定HMAC-SHA256 + */ + public static final String SIGN_TYPE = "X-FASC-Sign-Type"; + /** + * 请求参数的签名值 + */ + public static final String SIGN = "X-FASC-Sign"; + /** + * 时间戳(yyyy-MM-dd HH:mm:ss.sss),时间戳必须是保证是当前时间,同时跟法大大这边的服务器时间正负不能相差5分钟 + */ + public static final String TIMESTAMP = "X-FASC-Timestamp"; + /** + * 随机数(32位, 10分钟内不能重复请求) + */ + public static final String NONCE = "X-FASC-Nonce"; + /** + * 平台令牌,通过获取令牌接口返回 + */ + public static final String ACCESS_TOKEN = "X-FASC-AccessToken"; + /** + * 请求参数的集合,除公共请求参数都必须放在这个参数中传递(除文件,字节流等),json字符串. + */ + public static final String DATA_KEY = "bizContent"; + + /** + * + */ + public static final String GRANT_TYPE = "X-FASC-Grant-Type"; + + public static final String FDD_REQEUST_ID = "X-FASC-Request-Id"; + + + /** + * 默认授权类型 + **/ + public static final String CLIENT_CREDENTIAL = "client_credential"; + + public static final String SUCCESS_CODE = "100000"; + + public static final int SUCCESS_CODE_200 = 200; + + + /** + * 字符集 + **/ + public static final String CHARSET_UTF8 = "UTF-8"; + public static final String CHARSET_GBK = "GBK"; + + /** + * HTTP请求相关 + **/ + public static final String METHOD_POST = "POST"; + public static final String METHOD_GET = "GET"; + + public static final String EUI_TIMESTAMP = "timestamp"; + public static final String EUI_SIGNATURE = "signature"; +} diff --git a/src/com/fasc/open/api/enums/common/ActorPermissionEnum.java b/src/com/fasc/open/api/enums/common/ActorPermissionEnum.java new file mode 100644 index 0000000..a225f67 --- /dev/null +++ b/src/com/fasc/open/api/enums/common/ActorPermissionEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum ActorPermissionEnum { + + FILL("fill", "填写和确认内容"), + SIGN("sign", "确定签署"), + CC("cc", "抄送方"), +; + private String code; + private String remark; + + ActorPermissionEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/common/ActorTypeEnum.java b/src/com/fasc/open/api/enums/common/ActorTypeEnum.java new file mode 100644 index 0000000..40321da --- /dev/null +++ b/src/com/fasc/open/api/enums/common/ActorTypeEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum ActorTypeEnum { + + CORP("corp", "企业"), + PERSON("person", "个人"); + + private String code; + private String remark; + + ActorTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/common/AuthFailedReasonEnum.java b/src/com/fasc/open/api/enums/common/AuthFailedReasonEnum.java new file mode 100644 index 0000000..348f94b --- /dev/null +++ b/src/com/fasc/open/api/enums/common/AuthFailedReasonEnum.java @@ -0,0 +1,36 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * @date 2021/12/15 15:16:27 + */ +public enum AuthFailedReasonEnum { + + + /** + * 本次授权失败原因: + * user_ident_info_mismatch: 个人身份信息匹配失败; + * corp_ident_info_mismatch: 企业身份信息匹配失败; + * reject: 企业经办人操作不允许授权。 + */ + USER_IDENT_INFO_MISMATCH("user_ident_info_mismatch", "个人身份信息匹配失败"), + CORP_IDENT_INFO_MISMATCH("corp_ident_info_mismatch", "企业身份信息匹配失败"), + REJECT("reject", "企业经办人操作不允许授权"); + + private String code; + private String remark; + + AuthFailedReasonEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/common/AuthResultEnum.java b/src/com/fasc/open/api/enums/common/AuthResultEnum.java new file mode 100644 index 0000000..3765475 --- /dev/null +++ b/src/com/fasc/open/api/enums/common/AuthResultEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * @date 2021/12/15 14:10:15 + */ +public enum AuthResultEnum { + /** + * 本次授权操作结果 + * success: 成功; + * fail: 失败。 + */ + + SUCCESS("success", "成功"), + FAIL("fail", "失败"); + + private String code; + private String remark; + + AuthResultEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/common/EuiEnvironmentEnum.java b/src/com/fasc/open/api/enums/common/EuiEnvironmentEnum.java new file mode 100644 index 0000000..347843f --- /dev/null +++ b/src/com/fasc/open/api/enums/common/EuiEnvironmentEnum.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.enums.common; + +/** + *@ClassName: EnvironmentEnum + *@Description: 环境枚举 + *@Author: hukc@fadada.com + *@Date: 2022/3/24 16:06 + */ +public enum EuiEnvironmentEnum { + UAT("UAT", "https://%s.uat-e.fadada.com"), + PROD("PROD", "https://%s.e.fadada.com"); + /** + * 字段值 + */ + private String value; + /** + * 字段值的实际意义 + */ + private String valueInFact; + + public String getValue() { + return value; + } + + public String getValueInFact() { + return valueInFact; + } + + EuiEnvironmentEnum(String value, String valueInFact) { + this.value = value; + this.valueInFact = valueInFact; + } +} diff --git a/src/com/fasc/open/api/enums/common/FieldTypeEnum.java b/src/com/fasc/open/api/enums/common/FieldTypeEnum.java new file mode 100644 index 0000000..102bc28 --- /dev/null +++ b/src/com/fasc/open/api/enums/common/FieldTypeEnum.java @@ -0,0 +1,43 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum FieldTypeEnum { + + PERSON_SIGN("person_sign", "个人签名"), + CORP_SEAL("corp_seal", "企业印章"), + CORP_SEAL_CROSS_PAGE("corp_seal_cross_page", "企业骑缝章"), + DATE_SIGN("date_sign", "日期戳"), + + TEXT_SINGLE_LINE("text_single_line", "单行文本"), + TEXT_MULTI_LINE("text_multi_line", "多行文本"), + NUMBER("number", "数字控件"), + ID_CARD("id_card", "身份证号控件"), + FILL_DATE("fill_date", "填写日期控件"), + MULTI_RADIO("multi_radio", "单选框-多项控件"), + MULTI_CHECKBOX("multi_checkbox", "复选框-多项控件"), + CHECK_BOX("check_box", "复选框"), + REMARK_SIGN("remark_sign", "备注区"), + SELECT_BOX("select_box", "下拉选择项控件"), + PICTURE("picture", "图片"), + TABLE("table", "表格"), + ; + + private String code; + private String remark; + + FieldTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/common/IdTypeEnum.java b/src/com/fasc/open/api/enums/common/IdTypeEnum.java new file mode 100644 index 0000000..d2c802a --- /dev/null +++ b/src/com/fasc/open/api/enums/common/IdTypeEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * @date 2021/12/15 11:20:27 + */ +public enum IdTypeEnum { + /** + * 主体类型: + * corp: 企业 + * person: 个人 + */ + + CORP("corp", "企业"), + PERSON("person", "个人"); + + private String code; + private String remark; + + IdTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/common/NotifyWayEnum.java b/src/com/fasc/open/api/enums/common/NotifyWayEnum.java new file mode 100644 index 0000000..fb15079 --- /dev/null +++ b/src/com/fasc/open/api/enums/common/NotifyWayEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * 2021/9/23 11:20:11 + */ +public enum NotifyWayEnum { + /** + * 通知方式: + * mobile: 手机 + * email: 邮箱 + */ + MOBILE("mobile", "手机号"), + EMAIL("email", "邮箱"); + + private String code; + private String remark; + + NotifyWayEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/common/PositionModeEnum.java b/src/com/fasc/open/api/enums/common/PositionModeEnum.java new file mode 100644 index 0000000..8cbad3a --- /dev/null +++ b/src/com/fasc/open/api/enums/common/PositionModeEnum.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.enums.common; + +/** + * @author Fadada + * @date 2021/12/6 9:50:53 + */ +public enum PositionModeEnum { + /** + * 定位模式: + * pixel: 像素值;计算方法参考[文档页面坐标定位计算方法](#文档页面坐标定位计算方法)。 + * keyword: 关键字定位 + */ + PIXEL("pixel", "像素值"), + + KEYWORD("keyword", "关键字定位"); + + private String code; + private String remark; + + PositionModeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/corp/CorpAuthScopeEnum.java b/src/com/fasc/open/api/enums/corp/CorpAuthScopeEnum.java new file mode 100644 index 0000000..ec360ec --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpAuthScopeEnum.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:13:29 + */ +public enum CorpAuthScopeEnum { + + IDENT_INFO("ident_info", "实名信息"), + SEAL_INFO("seal_info", "印章及用印员"), + SIGN_TASK_INIT("signtask_init", "签署任务创建及发起"), + SIGN_TASK_INFO("signtask_info", "签署任务"), + SIGN_TASK_FILE("signtask_file", "签署文件"), + TEMPLATE("template", "模板"), + ORGANIZATION("organization", "组织"), + ; + + private String code; + private String remark; + + CorpAuthScopeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/CorpAvailableStatusEnum.java b/src/com/fasc/open/api/enums/corp/CorpAvailableStatusEnum.java new file mode 100644 index 0000000..9fb0c5f --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpAvailableStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum CorpAvailableStatusEnum { + + DISABLE("disable", "禁用状态"), + ENABLE("enable", "启用状态"), + ; + + private String code; + private String remark; + + CorpAvailableStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/CorpBindingStatusEnum.java b/src/com/fasc/open/api/enums/corp/CorpBindingStatusEnum.java new file mode 100644 index 0000000..93334c5 --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpBindingStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum CorpBindingStatusEnum { + + UNAUTHORIZED("unauthorized", "未授权"), + AUTHORIZED("authorized", "已授权"), + ; + + private String code; + private String remark; + + CorpBindingStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/CorpIdentMethodEnum.java b/src/com/fasc/open/api/enums/corp/CorpIdentMethodEnum.java new file mode 100644 index 0000000..fa33a01 --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpIdentMethodEnum.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:19:25 + */ +public enum CorpIdentMethodEnum { + /** + * 企业实名认证时所选择的认证方案: + * legal_rep: 法定代表人身份认证 (企业经办人为法定代表人时,可选法定代表人身份认证) + * deputy_auth: 法定代表人授权认证 (企业经办人为代理人时,可选法定代表人授权认证) + * payment: 企业对公账户认证 (使用企业在银行开立的对公账户验证并通过打款验证其关系) + * offline: 纸质材料审核认证 (企业线上提供资料提交进行预审,并在线下提供材料进行审核,周期较长)。 + */ + + LEGAL_REP("legal_rep", "法定代表人身份认证"), + DEPUTY_AUTH("deputy_auth", "法定代表人授权认证"), + PAYMENT("payment", "企业对公账户认证"), + OFFLINE("offline", "纸质材料审核认证"); + + private String code; + private String remark; + + CorpIdentMethodEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/corp/CorpIdentProcessStatusEnum.java b/src/com/fasc/open/api/enums/corp/CorpIdentProcessStatusEnum.java new file mode 100644 index 0000000..726a52d --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpIdentProcessStatusEnum.java @@ -0,0 +1,41 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:15:39 + */ +public enum CorpIdentProcessStatusEnum { + /** + * 企业实名认证状态: + * no_start: 未认证 + * identifying: 认证中 + * checking: 审核中 + * checked: 初审通过 + * success: 认证通过 + * failed: 认证不通过 + */ + + NO_START("no_start", "未认证"), + IDENTIFYING("identifying", "认证中"), + CHECKING("checking", "审核中"), + CHECKED("checked", "初审通过"), + SUCCESS("success", "认证通过"), + FAILED("failed", "认证不通过"); + + private String code; + private String remark; + + CorpIdentProcessStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/corp/CorpIdentStatusEnum.java b/src/com/fasc/open/api/enums/corp/CorpIdentStatusEnum.java new file mode 100644 index 0000000..86dd9aa --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpIdentStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum CorpIdentStatusEnum { + + UNIDENTIFIED("unidentified", "未认证"), + IDENTIFIED("identified", "已认证且有效"), + ; + + private String code; + private String remark; + + CorpIdentStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/CorpIdentTypeEnum.java b/src/com/fasc/open/api/enums/corp/CorpIdentTypeEnum.java new file mode 100644 index 0000000..9fd65f9 --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpIdentTypeEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/9/23 10:12:54 + */ +public enum CorpIdentTypeEnum { + + OTHER("other", "其他类型"), + + CORP("corp", "企业"), + + INDIVIDUAL_BIZ("individual_biz", "个体工商户"), + + GOVERNMENT("government", "政府和事业单位"); + + private String code; + private String remark; + + CorpIdentTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/CorpNonEditableInfoEnum.java b/src/com/fasc/open/api/enums/corp/CorpNonEditableInfoEnum.java new file mode 100644 index 0000000..a49e2ae --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/CorpNonEditableInfoEnum.java @@ -0,0 +1,25 @@ +package com.fasc.open.api.enums.corp; + +public enum CorpNonEditableInfoEnum { + + CORP_NAME("corpName", "企业名称"), + CORP_IDENT_TYPE("corpIdentType", "企业类型"), + CORP_IDENT_NO("corpIdentNo", "企业统一信用代码"), + ; + + private String code; + private String remark; + + CorpNonEditableInfoEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/corp/OperatorTypeEnum.java b/src/com/fasc/open/api/enums/corp/OperatorTypeEnum.java new file mode 100644 index 0000000..4374ccb --- /dev/null +++ b/src/com/fasc/open/api/enums/corp/OperatorTypeEnum.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.enums.corp; + +/** + * @author Fadada + * 2021/10/21 12:18:00 + */ +public enum OperatorTypeEnum { + /** + * 企业认证经办人身份类型: + * legal_rep: 企业法定代表人 + * deputy_auth: 企业授权代理人 + */ + LEGAL_REP("legal_rep", "企业法定代表人"), + DEPUTY_AUTH("deputy_auth", "企业普通代理人"); + + private String code; + private String remark; + + OperatorTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/doc/FileTypeEnum.java b/src/com/fasc/open/api/enums/doc/FileTypeEnum.java new file mode 100644 index 0000000..d79b34e --- /dev/null +++ b/src/com/fasc/open/api/enums/doc/FileTypeEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.doc; + +/** + * @author Fadada + * @date 2021/12/16 10:22:33 + */ +public enum FileTypeEnum { + + DOC("doc", "文档"), + ATTACH("attach", "附件"), + ; + + private String code; + private String remark; + + FileTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/eui/ResourceIdActionEnum.java b/src/com/fasc/open/api/enums/eui/ResourceIdActionEnum.java new file mode 100644 index 0000000..00dad1d --- /dev/null +++ b/src/com/fasc/open/api/enums/eui/ResourceIdActionEnum.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.enums.eui; + +/** + * @author Fadada + * @date 2021/12/18 13:52:18 + */ +public enum ResourceIdActionEnum { + + EDIT("EDIT", "编辑"), + PREVIEW("PREVIEW", "预览"), + SIGN("SIGN", "填/签"), + MANAGE("MANAGE", "管理"), + CREATE("CREATE", "新增"), + ; + + private String code; + private String remark; + + ResourceIdActionEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/eui/ResourceIdEnum.java b/src/com/fasc/open/api/enums/eui/ResourceIdEnum.java new file mode 100644 index 0000000..6090578 --- /dev/null +++ b/src/com/fasc/open/api/enums/eui/ResourceIdEnum.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.enums.eui; + +/** + * @author Fadada + * @date 2021/12/18 13:52:18 + */ +public enum ResourceIdEnum { + + SEAL("SEAL", "印章"), + SIGN_TASK("SIGNTASK", "签署任务"), + APP_TEMPLATE("APPTEMPLATE", "应用模板"), + TEMPLATE("TEMPLATE", "模板"), + ORGANIZATION("ORGANIZATION", "组织"); + + private String code; + private String remark; + + ResourceIdEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/eui/UrlTypeEnum.java b/src/com/fasc/open/api/enums/eui/UrlTypeEnum.java new file mode 100644 index 0000000..89d90db --- /dev/null +++ b/src/com/fasc/open/api/enums/eui/UrlTypeEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.eui; + +/** + * @author Fadada + * @date 2021/12/18 13:52:18 + */ +public enum UrlTypeEnum { + + /** + * 计费页面类型: + * account: 账户信息 + * order: 套餐订购 + */ + ACCOUNT("account", "账户信息"), + ORDER("order", "套餐订购"); + + private String code; + private String remark; + + UrlTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/event/CallbackEventEnum.java b/src/com/fasc/open/api/enums/event/CallbackEventEnum.java new file mode 100644 index 0000000..1cc4ded --- /dev/null +++ b/src/com/fasc/open/api/enums/event/CallbackEventEnum.java @@ -0,0 +1,56 @@ +package com.fasc.open.api.enums.event; + +import java.util.Objects; + +/** + * @author Fadada + * 2021/10/21 15:37:11 + */ +public enum CallbackEventEnum { + /** + * 回调事件枚举 + */ + USER_AUTHORIZE("user-authorize", "用户授权事件"), + CORP_AUTHORIZE("corp-authorize", "企业授权事件"), + SIGN_TASK_JOINED("sign-task-joined", "签署任务加入事件"), + SIGN_TASK_FILLED("sign-task-filled", "签署任务填写事件"), + SIGN_TASK_FILL_REJECTED("sign-task-fill-rejected", "签署任务拒填事件"), + SIGN_TASK_SIGNED("sign-task-signed", "签署任务签署事件"), + SIGN_TASK_SIGN_FAILED("sign-task-sign-failed", "签署任务签署失败事件"), + SIGN_TASK_SIGN_REJECTED("sign-task-sign-rejected", "签署任务拒签事件"), + SIGN_TASK_FINISHED("sign-task-finished", "签署任务完成事件"), + SIGN_TASK_CANCELED("sign-task-canceled", "签署任务撤销事件"), + SIGN_TASK_EXPIRE("sign-task-expire","签署任务过期事件"); + + private String eventCode; + private String eventName; + + CallbackEventEnum(String eventCode, String eventName) { + this.eventCode = eventCode; + this.eventName = eventName; + } + + public String getEventCode() { + return eventCode; + } + + public String getEventName() { + return eventName; + } + + /** + * 根据事件编码返回指定枚举 + * + * @param eventCode 事件编码 + * @return 事件枚举 + */ + public static CallbackEventEnum getCallbackEventEnum(String eventCode) { + for (CallbackEventEnum callbackEventEnum : CallbackEventEnum.values()) { + if (Objects.equals(callbackEventEnum.eventCode, eventCode)) { + return callbackEventEnum; + } + } + return null; + } + +} diff --git a/src/com/fasc/open/api/enums/http/SignTypeEnum.java b/src/com/fasc/open/api/enums/http/SignTypeEnum.java new file mode 100644 index 0000000..30f4a2b --- /dev/null +++ b/src/com/fasc/open/api/enums/http/SignTypeEnum.java @@ -0,0 +1,22 @@ +package com.fasc.open.api.enums.http; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public enum SignTypeEnum { + /** + * SHA256 + */ + HMAC_SHA256("HMAC-SHA256"); + + private String type; + + SignTypeEnum(String type) { + this.type = type; + } + + public String getType() { + return type; + } +} diff --git a/src/com/fasc/open/api/enums/org/MemberStatusEnum.java b/src/com/fasc/open/api/enums/org/MemberStatusEnum.java new file mode 100644 index 0000000..32a9a1c --- /dev/null +++ b/src/com/fasc/open/api/enums/org/MemberStatusEnum.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.enums.org; + +/** + * @author Fadada + * @date 2021/12/16 10:22:33 + */ +public enum MemberStatusEnum { + + INACTIVE("inactive", "未激活"), + DISABLED("disabled", "已禁用"), + ACTIVATED("activated", "已激活"), + ; + + private String code; + private String remark; + + MemberStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/org/SetMemberDeptsModeEnum.java b/src/com/fasc/open/api/enums/org/SetMemberDeptsModeEnum.java new file mode 100644 index 0000000..9606df4 --- /dev/null +++ b/src/com/fasc/open/api/enums/org/SetMemberDeptsModeEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.org; + +/** + * @author zhoufucheng + * @date 2022/12/5 17:17 + */ +public enum SetMemberDeptsModeEnum { + COVER("cover", "覆盖"), + APPEND("append", "追加"), + ; + + private String code; + private String remark; + + SetMemberDeptsModeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/org/SetMemberStatusEnum.java b/src/com/fasc/open/api/enums/org/SetMemberStatusEnum.java new file mode 100644 index 0000000..9c58179 --- /dev/null +++ b/src/com/fasc/open/api/enums/org/SetMemberStatusEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.org; + +/** + * @author zhoufucheng + * @date 2022/12/5 18:45 + */ +public enum SetMemberStatusEnum { + ENABLE("enable", "启用"), + DISABLE("disable", "禁用"), + ; + + private String code; + private String remark; + + SetMemberStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/seal/CertCaOrgEnum.java b/src/com/fasc/open/api/enums/seal/CertCaOrgEnum.java new file mode 100644 index 0000000..4dd9a91 --- /dev/null +++ b/src/com/fasc/open/api/enums/seal/CertCaOrgEnum.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.enums.seal; + +/** + * @author Fadada + * @date 2021/12/16 10:22:33 + */ +public enum CertCaOrgEnum { + + CFCA("CFCA", "中国金融认证中心"), + ZXCA("ZXCA", "山东豸信认证服务有限公司"), + CSCA("CSCA", "世纪数码CA"), + ; + + private String code; + private String remark; + + CertCaOrgEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/seal/CertEncryptTypeEnum.java b/src/com/fasc/open/api/enums/seal/CertEncryptTypeEnum.java new file mode 100644 index 0000000..d11ad3b --- /dev/null +++ b/src/com/fasc/open/api/enums/seal/CertEncryptTypeEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.seal; + +/** + * @author Fadada + * @date 2021/12/16 10:22:33 + */ +public enum CertEncryptTypeEnum { + + SM2("SM2", "国密证书"), + RSA("RSA", "标准证书"), + ; + + private String code; + private String remark; + + CertEncryptTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/seal/SealCategoryTypeEnum.java b/src/com/fasc/open/api/enums/seal/SealCategoryTypeEnum.java new file mode 100644 index 0000000..4f7a813 --- /dev/null +++ b/src/com/fasc/open/api/enums/seal/SealCategoryTypeEnum.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.enums.seal; + +/** + * @date 2022年07月03日 23:47 + */ +public enum SealCategoryTypeEnum { + OFFICIAL_SEAL("official_seal", "法定名称章"), + CONTRACT_SEAL("contract_seal", "合同专用章"), + HR_SEAL("hr_seal", "人事专用章"), + FINANCIAL_SEAL("financial_seal", "财务专用章"), + LEGAL_REPRESENTATIVE_SEAL("legal_representative_seal", "法定代表人名章"), + OTHER("other", "其他"), + ; + + private String categoryType; + private String desc; + + SealCategoryTypeEnum(String categoryType, String desc) { + this.categoryType = categoryType; + this.desc = desc; + } + + public String getCategoryType() { + return categoryType; + } + + public String getDesc() { + return desc; + } +} diff --git a/src/com/fasc/open/api/enums/seal/SetSealStatusEnum.java b/src/com/fasc/open/api/enums/seal/SetSealStatusEnum.java new file mode 100644 index 0000000..21de630 --- /dev/null +++ b/src/com/fasc/open/api/enums/seal/SetSealStatusEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.seal; + +/** + * @author zhoufucheng + * @date 2022/12/5 20:21 + */ +public enum SetSealStatusEnum { + ENABLE("enable", "启用"), + DISABLE("disable", "禁用"), + ; + + private String code; + private String remark; + + SetSealStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/BlockStatusEnum.java b/src/com/fasc/open/api/enums/signtask/BlockStatusEnum.java new file mode 100644 index 0000000..3f801d7 --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/BlockStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.signtask; + +/** + * @author Fadada + * 2021/9/23 11:11:38 + */ +public enum BlockStatusEnum { + + BLOCKED("blocked", "阻塞中"), + UNBLOCKED("unblocked", "未阻塞"), + ; + + private String code; + private String remark; + + BlockStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/FillStatusEnum.java b/src/com/fasc/open/api/enums/signtask/FillStatusEnum.java new file mode 100644 index 0000000..7614559 --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/FillStatusEnum.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.enums.signtask; + +/** + * @author Fadada + * 2021/9/23 11:11:38 + */ +public enum FillStatusEnum { + + WAIT_FILL("wait_fill", "待填写"), + FILLED("filled", "已填写"), + FILL_REJECTED("fill_rejected", "已拒填"), + ; + + private String code; + private String remark; + + FillStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/JoinStatusEnum.java b/src/com/fasc/open/api/enums/signtask/JoinStatusEnum.java new file mode 100644 index 0000000..9905687 --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/JoinStatusEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.signtask; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum JoinStatusEnum { + + NO_JOIN("no_join", "未加入"), + JOINED("joined", "已加入"); + + private String code; + private String remark; + + JoinStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/SignFieldStatusEnum.java b/src/com/fasc/open/api/enums/signtask/SignFieldStatusEnum.java new file mode 100644 index 0000000..60e5157 --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/SignFieldStatusEnum.java @@ -0,0 +1,22 @@ +package com.fasc.open.api.enums.signtask; + +public enum SignFieldStatusEnum { + STAMPED("stamped", "已盖章"), + UN_STAMPED("unstamped", "未盖章"); + + private String code; + private String remark; + + SignFieldStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/SignStatusEnum.java b/src/com/fasc/open/api/enums/signtask/SignStatusEnum.java new file mode 100644 index 0000000..740f6ba --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/SignStatusEnum.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.enums.signtask; + +/** + * @author Fadada + * 2021/9/23 11:11:38 + */ +public enum SignStatusEnum { + + WAIT_SIGN("wait_sign", "待签署"), + SIGNED("signed", "已签署"), + SIGN_REJECTED("sign_rejected", "已拒签"), + ; + + private String code; + private String remark; + + SignStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/SignTaskStatusEnum.java b/src/com/fasc/open/api/enums/signtask/SignTaskStatusEnum.java new file mode 100644 index 0000000..7851cad --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/SignTaskStatusEnum.java @@ -0,0 +1,35 @@ +package com.fasc.open.api.enums.signtask; + +/** + * @author Fadada + * 2021/9/23 11:11:38 + */ +public enum SignTaskStatusEnum { + + TASK_CREATED("task_created", "任务已创建"), + FILL_PROGRESS("fill_progress", "填写进行中"), + FILL_COMPLETED("fill_completed", "填写已完成"), + SIGN_PROGRESS("sign_progress", "签署进行中"), + SIGN_COMPLETED("sign_completed", "签署已完成"), + TASK_FINISHED("task_finished", "任务已结束"), + TASK_TERMINATED("task_terminated", "任务异常停止"), + TASK_ABOLISHING("abolishing", "作废中"), + TASK_REVOKED("revoked", "任务已作废"), + ; + + private String code; + private String remark; + + SignTaskStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/signtask/SignerVerifyMethodsEnum.java b/src/com/fasc/open/api/enums/signtask/SignerVerifyMethodsEnum.java new file mode 100644 index 0000000..d5d8a8c --- /dev/null +++ b/src/com/fasc/open/api/enums/signtask/SignerVerifyMethodsEnum.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.enums.signtask; + +public enum SignerVerifyMethodsEnum { + PW("pw", "签署密码验证"), + SMS("sms", "短信验证码"), + FACE("face", "刷脸验证"), + AUDIO_VIDEO("audio_video", "互动视频签") + ; + + + private String code; + private String remark; + + SignerVerifyMethodsEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/com/fasc/open/api/enums/template/DocTemplateStatusEnum.java b/src/com/fasc/open/api/enums/template/DocTemplateStatusEnum.java new file mode 100644 index 0000000..73bee6a --- /dev/null +++ b/src/com/fasc/open/api/enums/template/DocTemplateStatusEnum.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.enums.template; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum DocTemplateStatusEnum { + /** + * 文档模板状态: + * invalid: 停用 + * valid: 启用 + */ + INVALID("invalid", "停用"), + VALID("valid", "启用"); + + private String code; + private String remark; + + DocTemplateStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/template/SetFieldStatusEnum.java b/src/com/fasc/open/api/enums/template/SetFieldStatusEnum.java new file mode 100644 index 0000000..4008c12 --- /dev/null +++ b/src/com/fasc/open/api/enums/template/SetFieldStatusEnum.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.enums.template; + +/** + * @author zhoufucheng + * @date 2022/12/5 20:21 + */ +public enum SetFieldStatusEnum { + ENABLE("enable", "启用"), + DISABLE("disable", "禁用"), + ; + + private String code; + private String remark; + + SetFieldStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/template/SignTemplateStatusEnum.java b/src/com/fasc/open/api/enums/template/SignTemplateStatusEnum.java new file mode 100644 index 0000000..edec62b --- /dev/null +++ b/src/com/fasc/open/api/enums/template/SignTemplateStatusEnum.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.enums.template; + +/** + * @author Fadada + * 2021/9/23 11:04:43 + */ +public enum SignTemplateStatusEnum { + + /** + * 签署模板状态: + * invalid: 停用 + * valid: 启用 + */ + INVALID("invalid", "停用"), + VALID("valid", "启用"), + DRAFT("draft", "草稿"); + + + private String code; + private String remark; + + SignTemplateStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/template/SignerSignMethodEnum.java b/src/com/fasc/open/api/enums/template/SignerSignMethodEnum.java new file mode 100644 index 0000000..778c188 --- /dev/null +++ b/src/com/fasc/open/api/enums/template/SignerSignMethodEnum.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.enums.template; + +/** + * @author Fadada + * 2021/9/23 11:03:29 + */ +public enum SignerSignMethodEnum { + + UNLIMITED("unlimited", "不限制"), + STANDARD("standard", "使用标准签名"), + HAND_WRITE("hand_write", "使用手绘签名"), + AI_HAND_WRITE("ai_hand_write", "AI手绘签名") + ; + + private String code; + private String remark; + + SignerSignMethodEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/NonEditableInfoEnum.java b/src/com/fasc/open/api/enums/user/NonEditableInfoEnum.java new file mode 100644 index 0000000..3675f96 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/NonEditableInfoEnum.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.enums.user; + +/** + * @author zhoufucheng + * @date 2022/11/30 14:31 + */ +public enum NonEditableInfoEnum { + ACCOUNT_NAME("accountName", "个人用户的法大大帐号"), + USER_NAME("userName", "姓名"), + USER_IDENT_TYPE("userIdentType", "证件类型"), + USER_IDENT_NO("userIdentNo", "证件号码"), + MOBILE("mobile", "手机号"), + BANK_ACCOUNT_NO("bankAccountNo", "银行卡号"), + + ; + + private String code; + private String remark; + + NonEditableInfoEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/UserAuthScopeEnum.java b/src/com/fasc/open/api/enums/user/UserAuthScopeEnum.java new file mode 100644 index 0000000..534fca2 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserAuthScopeEnum.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/10/23 16:13:29 + */ +public enum UserAuthScopeEnum { + + IDENT_INFO("ident_info", "实名信息"), + SIGN_TASK_INIT("signtask_init", "签署任务创建及发起"), + SIGN_TASK_INFO("signtask_info", "签署任务"), + SIGN_TASK_FILE("signtask_file", "签署文件"), + SEAL_INFO("seal_info", "个人签名"), + ; + + private String code; + private String remark; + + UserAuthScopeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/UserAvailableStatusEnum.java b/src/com/fasc/open/api/enums/user/UserAvailableStatusEnum.java new file mode 100644 index 0000000..40e9138 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserAvailableStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum UserAvailableStatusEnum { + + DISABLE("disable", "禁用状态"), + ENABLE("enable", "启用状态"), + ; + + private String code; + private String remark; + + UserAvailableStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/UserBindingStatusEnum.java b/src/com/fasc/open/api/enums/user/UserBindingStatusEnum.java new file mode 100644 index 0000000..bd1d8ba --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserBindingStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum UserBindingStatusEnum { + + UNAUTHORIZED("unauthorized", "未授权"), + AUTHORIZED("authorized", "已授权"), + ; + + private String code; + private String remark; + + UserBindingStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/UserIdentMethodEnum.java b/src/com/fasc/open/api/enums/user/UserIdentMethodEnum.java new file mode 100644 index 0000000..f0eaa57 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserIdentMethodEnum.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/10/23 16:08:40 + */ +public enum UserIdentMethodEnum { + /** + * 用户实名认证时所选择的认证方案: + * mobile: 实名手机号认证 (该方案校验的是用户在电信运营商绑定的真实姓名、身份证号码、手机号及对应的短信验证码) + * face: 人脸识别认证 (该方案校验的是用户的真实姓名、身份证号码和人脸比对) + * bank: 个人银行卡认证 (该方案校验的是用户在银行绑定的真实姓名、身份证号码、银行卡卡号、预留在银行的手机号及对应的短信验证码) + * offline: 人工审核认证 (该方案主要为特殊人群提供的人工审核通道,如部分用户因为特殊原因,无法在其他方案下完成认证。例如:手机不可用、人脸比对不成功、外国人等)。 + */ + + MOBILE("mobile", "实名手机号认证"), + FACE("face", "人脸识别认证"), + BANK("bank", "个人银行卡认证"), + OFFLINE("offline", "人工审核认证"); + + private String code; + private String remark; + + UserIdentMethodEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } + +} diff --git a/src/com/fasc/open/api/enums/user/UserIdentStatusEnum.java b/src/com/fasc/open/api/enums/user/UserIdentStatusEnum.java new file mode 100644 index 0000000..6df4628 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserIdentStatusEnum.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/10/23 16:28:03 + */ +public enum UserIdentStatusEnum { + + UNIDENTIFIED("unidentified", "未认证"), + IDENTIFIED("identified", "已认证且有效"), + ; + + private String code; + private String remark; + + UserIdentStatusEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/enums/user/UserIdentTypeEnum.java b/src/com/fasc/open/api/enums/user/UserIdentTypeEnum.java new file mode 100644 index 0000000..904d782 --- /dev/null +++ b/src/com/fasc/open/api/enums/user/UserIdentTypeEnum.java @@ -0,0 +1,35 @@ +package com.fasc.open.api.enums.user; + +/** + * @author Fadada + * 2021/9/23 10:12:04 + */ +public enum UserIdentTypeEnum { + /** + * 证件类型 : + * id_card: 身份证 + * passport: 护照 + * hk_macao: 港澳居民来往内地通行证 + * taiwan: 台湾居民来往大陆通行证 + */ + ID_CARD("id_card", "身份证"), + PASSPORT("passport", "护照"), + HK_MACAO("hk_macao", "港澳居民来往内地通行证"), + TAIWAN("taiwan", "台湾居民来往大陆通行证"); + + private String code; + private String remark; + + UserIdentTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public String getCode() { + return code; + } + + public String getRemark() { + return remark; + } +} diff --git a/src/com/fasc/open/api/exception/ApiException.java b/src/com/fasc/open/api/exception/ApiException.java new file mode 100644 index 0000000..528e0ed --- /dev/null +++ b/src/com/fasc/open/api/exception/ApiException.java @@ -0,0 +1,25 @@ +package com.fasc.open.api.exception; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class ApiException extends Exception { + + public ApiException() { + super(); + } + + public ApiException(String message, Throwable cause) { + super(message, cause); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(Throwable cause) { + super(cause); + } + +} diff --git a/src/com/fasc/open/api/stratey/DefaultJsonStrategy.java b/src/com/fasc/open/api/stratey/DefaultJsonStrategy.java new file mode 100644 index 0000000..7d79b96 --- /dev/null +++ b/src/com/fasc/open/api/stratey/DefaultJsonStrategy.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.stratey; + +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.utils.json.JacksonUtil; + +import java.lang.reflect.ParameterizedType; +import java.util.List; + +/** + * @author Fadada + * 2021/9/8 16:32:01 + */ +public class DefaultJsonStrategy implements JsonStrategy { + + @Override + public String toJson(Object object) throws ApiException { + return JacksonUtil.toJson(object); + } + + @Override + public T toJavaBean(String json, ParameterizedType parameterizedType) throws ApiException { + return JacksonUtil.toJavaBean(json, parameterizedType); + } + + @Override + public T toJavaBean(String json, Class clzz) throws ApiException { + return JacksonUtil.toJavaBean(json, clzz); + } + + @Override + public List toList(String json, Class clzz) throws ApiException { + return JacksonUtil.toList(json, clzz); + } +} diff --git a/src/com/fasc/open/api/stratey/JsonStrategy.java b/src/com/fasc/open/api/stratey/JsonStrategy.java new file mode 100644 index 0000000..853649d --- /dev/null +++ b/src/com/fasc/open/api/stratey/JsonStrategy.java @@ -0,0 +1,55 @@ +package com.fasc.open.api.stratey; + +import com.fasc.open.api.exception.ApiException; + +import java.lang.reflect.ParameterizedType; +import java.util.List; + +/** + * @author Fadada + * 2021/9/8 16:30:57 + */ +public interface JsonStrategy { + + /** + * 转成json串 + * + * @param object 序列化对象 + * @return json字符串 + * @throws ApiException 异常 + */ + String toJson(Object object) throws ApiException; + + /** + * 转成Java对象 + * + * @param json json串 + * @param parameterizedType 类型 + * @param 泛型 + * @return 泛型实例 + * @throws ApiException 异常 + */ + T toJavaBean(String json, ParameterizedType parameterizedType) throws ApiException; + + /** + * 转成Java对象 + * + * @param json json串 + * @param clzz 类名 + * @param 泛型 + * @return 泛型实例 + * @throws ApiException 异常 + */ + T toJavaBean(String json, Class clzz) throws ApiException; + + /** + * 转成列表 + * + * @param json json串 + * @param clzz 类名 + * @param 泛型 + * @return 泛型实例 + * @throws ApiException 异常 + */ + List toList(String json, Class clzz) throws ApiException; +} diff --git a/src/com/fasc/open/api/utils/ResultUtil.java b/src/com/fasc/open/api/utils/ResultUtil.java new file mode 100644 index 0000000..61c8a3e --- /dev/null +++ b/src/com/fasc/open/api/utils/ResultUtil.java @@ -0,0 +1,43 @@ +package com.fasc.open.api.utils; + + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.stratey.JsonStrategy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class ResultUtil { + + private static final Logger log = LoggerFactory.getLogger(ResultUtil.class); + + private ResultUtil() { + } + + /** + * 打日志 + * + * @param baseRes 响应base + * @param jsonStrategy 策率 + * @throws ApiException 异常 + */ + public static void printLog(BaseRes baseRes, JsonStrategy jsonStrategy) throws ApiException { + String json = null; + + if (baseRes != null) { + json = jsonStrategy.toJson(baseRes); + } + + if (baseRes != null && baseRes.isSuccess()) { + log.info("请求成功:{}", json); + } else { + log.info("请求失败:{}", json); + } + } + + +} diff --git a/src/com/fasc/open/api/utils/crypt/FddCryptUtil.java b/src/com/fasc/open/api/utils/crypt/FddCryptUtil.java new file mode 100644 index 0000000..404d548 --- /dev/null +++ b/src/com/fasc/open/api/utils/crypt/FddCryptUtil.java @@ -0,0 +1,86 @@ +package com.fasc.open.api.utils.crypt; + +import com.fasc.open.api.utils.string.StringUtil; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import javax.xml.bind.DatatypeConverter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.util.*; +import java.util.Map.Entry; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class FddCryptUtil { + + + private FddCryptUtil() { + } + + private static final Charset UTF8 = StandardCharsets.UTF_8; + + public static byte[] hmac256(byte[] key, String msg) throws Exception { + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec secretKeySpec = new SecretKeySpec(key, mac.getAlgorithm()); + mac.init(secretKeySpec); + return mac.doFinal(msg.getBytes(UTF8)); + } + + public static String sha256Hex(String s) throws Exception { + MessageDigest md = MessageDigest.getInstance("SHA-256"); + byte[] d = md.digest(s.getBytes(UTF8)); + return DatatypeConverter.printHexBinary(d).toLowerCase(); + } + + /** + * @param sortParam 排序后得参数字符串 + * @param timestamp 时间戳 + * @param appSecret 应用秘钥 + * @return 签名值 + * @throws Exception 异常 + */ + public static String sign(String sortParam, + String timestamp, + String appSecret) throws Exception { + //将排序后字符串转为sha256Hex + String signText = sha256Hex(sortParam); + // ************* 计算签名 ************* + byte[] secretSigning = hmac256((appSecret).getBytes(UTF8), timestamp); + //计算后得到签名 + return DatatypeConverter.printHexBinary(hmac256(secretSigning, signText)).toLowerCase(); + } + + + public static String sortParameters(Map parameters) { + if (parameters.isEmpty()) { + return null; + } + List removeKeys = new ArrayList<>(); + for (Entry entry : parameters.entrySet()) { + if (StringUtil.isBlank(entry.getValue())) { + removeKeys.add(entry.getKey()); + } + } + + for (String key : removeKeys) { + parameters.remove(key); + } + StringBuilder stringBuilder = new StringBuilder(); + SortedMap paramMap = new TreeMap<>(parameters); + int index = 0; + for (Entry entry : paramMap.entrySet()) { + stringBuilder.append(entry.getKey()).append("=").append(entry.getValue()); + index++; + if (index != parameters.size()) { + stringBuilder.append("&"); + } + } + return stringBuilder.toString(); + } + +} + diff --git a/src/com/fasc/open/api/utils/crypt/HashFile.java b/src/com/fasc/open/api/utils/crypt/HashFile.java new file mode 100644 index 0000000..5c18466 --- /dev/null +++ b/src/com/fasc/open/api/utils/crypt/HashFile.java @@ -0,0 +1,169 @@ +/** + * 包名:com.yq365.utils.crypt + * 文件名:com.yq365.utils.crypt + * 创建者:zyb + * 创建日:2015-3-9 + *

    + * CopyRight 2015 ShenZhen Fabigbig Technology Co.Ltd All Rights Reserved + */ +package com.fasc.open.api.utils.crypt; + +import com.fasc.open.api.exception.ApiException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.security.MessageDigest; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class HashFile { + private static Logger log = LoggerFactory.getLogger(HashFile.class); + private static char[] hexChar = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + + private HashFile() { + } + + /** + * @param filename 文件名称 + * @return 文件名称md值 + * @throws ApiException 异常 + */ + public static String getFileMd5(String filename) throws ApiException { + FileInputStream fis = null; + try { + fis = new FileInputStream(filename); + return getHash(fis, "MD5"); + } catch (Exception e) { + log.error("文件名MD5失败:{}", e.getMessage(), e); + throw new ApiException("文件名MD5失败"); + } finally { + if(fis != null) { + try { + fis.close(); + } catch (IOException e) { + log.error("文件流关闭异常 {}", e.getMessage(), e); + } + } + } + } + + /** + * @param file 对象 + * @return 文件名称md值 + * @throws ApiException 异常 + */ + public static String getFileMd5(File file) throws ApiException { + FileInputStream fis = null; + try { + fis = new FileInputStream(file); + return getHash(fis, "MD5"); + } catch (Exception e) { + log.error("文件MD5失败:{}", e.getMessage(), e); + throw new ApiException("文件MD5失败"); + } finally { + if(fis != null) { + try { + fis.close(); + } catch (IOException e) { + log.error("文件流关闭异常 {}", e.getMessage(), e); + } + } + } + } + + public static String getFileMd5(FileInputStream fis) throws ApiException { + return getHash(fis, "MD5"); + } + + public static String getFileMd5(byte[] dataBytes) throws ApiException { + return getHash(dataBytes, "MD5"); + } + + public static String getFileSha256(String filename) throws ApiException { + FileInputStream fis = null; + try { + fis = new FileInputStream(filename); + return getHash(fis, "SHA-256"); + } catch (Exception e) { + log.error("文件名称SHA256失败:{}", e.getMessage(), e); + throw new ApiException("文件名称SHA256失败"); + } finally { + if(fis != null) { + try { + fis.close(); + } catch (IOException e) { + log.error("文件流关闭异常 {}", e.getMessage(), e); + } + } + } + } + + public static String getFileSha256(File file) throws ApiException { + FileInputStream fis = null; + try { + fis = new FileInputStream(file); + return getHash(fis, "SHA-256"); + } catch (Exception e) { + log.error("文件SHA256失败:{}", e.getMessage(), e); + throw new ApiException("文件SHA256失败"); + } finally { + if(fis != null) { + try { + fis.close(); + } catch (IOException e) { + log.error("文件流关闭异常 {}", e.getMessage(), e); + } + } + } + } + + public static String getFileSha256(FileInputStream fis) throws ApiException { + return getHash(fis, "SHA-256"); + } + + public static String getFileSha256(byte[] dataBytes) throws ApiException { + return getHash(dataBytes, "SHA-256"); + } + + private static String getHash(InputStream inputStream, String hashType) throws ApiException { + MessageDigest messageDigest = null; + try { + byte[] buffer = new byte[1024]; + messageDigest = MessageDigest.getInstance(hashType); + int numRead; + while ((numRead = inputStream.read(buffer)) > 0) { + messageDigest.update(buffer, 0, numRead); + } + return toHexString(messageDigest.digest()); + } catch (Exception e) { + log.error("输入流获取Hash值失败:{}", e.getMessage(), e); + throw new ApiException("输入流获取Hash值失败"); + } + } + + private static String getHash(byte[] dataBytes, String hashType) throws ApiException { + MessageDigest messageDigest = null; + try { + messageDigest = MessageDigest.getInstance(hashType); + return toHexString(messageDigest.digest(dataBytes)); + } catch (Exception e) { + log.error("字节数据获取Hash值失败:{}", e.getMessage(), e); + throw new ApiException("字节数据获取Hash值失败"); + } + } + + private static String toHexString(byte[] b) { + StringBuilder sb = new StringBuilder(b.length * 2); + for (int i = 0; i < b.length; i++) { + sb.append(hexChar[((b[i] & 0xF0) >>> 4)]); + sb.append(hexChar[(b[i] & 0xF)]); + } + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/utils/date/DateUtil.java b/src/com/fasc/open/api/utils/date/DateUtil.java new file mode 100644 index 0000000..5913911 --- /dev/null +++ b/src/com/fasc/open/api/utils/date/DateUtil.java @@ -0,0 +1,262 @@ +package com.fasc.open.api.utils.date; + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class DateUtil { + private static final Logger log = LoggerFactory.getLogger(DateUtil.class); + + private DateUtil() { + } + + + /** + * @param dateStr 待转换的时间String + * @param pattern 转换的类型 + * @return 字符串转换成Date类型数据 + */ + public static Date convertStringToDate(String dateStr, String pattern) { + if (dateStr == null) { + return null; + } + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + Date date = null; + try { + date = sdf.parse(dateStr); + } catch (ParseException e) { + log.error("将指定格式的时间String转为Date类型发生异常", e); + } + return date; + } + + /** + * 实例SimpleDateFormat + * + * @param formatNum 1 yyyyMMdd + * 2 yyyy/MM/dd + * 3 yyyy-MM-dd + * 4 yyyy-MM-dd HH:mm:ss + * 5 yyyyMMddHHmmss + * 6 yyyy-MM-dd HH:mm:ss.sss + * 7 HH:mm + * 8 yyyy年MM月dd日 + * 9 yyyyMMddHHmmssSSS + * 10 yyyy年MM月dd日 HH:mm + * 11 yyyy-MM-dd HH + * 12 HH:mm:ss + * 13 yyyy/MM/dd HH:mm:ss + * 14 yyyy-MM-dd'T'HH:mm:ss+08:00 + * 15 yyyy-MM-dd HH:mm + * 16 yyyyMM + * 17 yyyy年MM月dd日hh时mm分 + * 18 yyyy/MM/ddHH:mm:ss + * @return + */ + private static SimpleDateFormat dateFormat(int formatNum) { + SimpleDateFormat dateFormatter = null; + switch (formatNum) { + case 1: + dateFormatter = new SimpleDateFormat("yyyyMMdd"); + break; + case 2: + dateFormatter = new SimpleDateFormat("yyyy/MM/dd"); + break; + case 3: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd"); + break; + case 4: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + break; + case 5: + dateFormatter = new SimpleDateFormat("yyyyMMddHHmmss"); + break; + case 6: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss"); + break; + case 7: + dateFormatter = new SimpleDateFormat("HH:mm"); + break; + case 8: + dateFormatter = new SimpleDateFormat("yyyy年MM月dd日"); + break; + case 9: + dateFormatter = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + break; + case 10: + dateFormatter = new SimpleDateFormat("yyyy年MM月dd日 HH:mm"); + break; + case 11: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH"); + break; + case 12: + dateFormatter = new SimpleDateFormat("HH:mm:ss"); + break; + case 13: + dateFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + break; + case 14: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+08:00"); + break; + case 15: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + break; + case 16: + dateFormatter = new SimpleDateFormat("yyyyMM"); + break; + case 17: + dateFormatter = new SimpleDateFormat("yyyy年MM月dd日HH时mm分"); + break; + case 18: + dateFormatter = new SimpleDateFormat("yyyy/MM/ddHH:mm:ss"); + break; + default: + dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + break; + } + return dateFormatter; + } + + /** + * 把string类型的日期转化为相应的格式 + * + * @param dateString 字符串日期 + * @param formatNum 需要按照哪种类型 + * 1 yyyyMMdd + * 2 yyyy/MM/dd + * 3 yyyy-MM-dd + * 4 yyyy-MM-dd HH:mm:ss + * 5 yyyyMMddHHmmss + * 6 yyyy-MM-dd HH:mm:ss.sss + * 7 HH:mm + * 8 yyyy年MM月dd日 + * 9 yyyyMMddHHmmssSSS + * 10 yyyy年MM月dd日 HH:mm + * 11 yyyy-MM-dd HH + * 12 HH:mm:ss + * 13 yyyy/MM/dd HH:mm:ss + * 14 yyyy-MM-dd'T'HH:mm:ss+08:00 + * 15 yyyy-MM-dd HH:mm + * 16 yyyyMM + * 17 yyyy年MM月dd日hh时mm分 + * 18 yyyy/MM/ddHH:mm:ss + * @return 日期 + */ + public static Date stringToDate(String dateString, int formatNum) { + if (dateString == null || dateString.length() == 0) { + throw new IllegalArgumentException("日期字符串为空"); + } + try { + return dateFormat(formatNum).parse(dateString); + } catch (Exception e) { + log.error("把string类型的日期转化为相应的格式发生异常", e); + return null; + } + } + + /** + * @param dateString 字符串日期 + * @param formatNum 需要按照哪种类型 + * 1 yyyyMMdd + * 2 yyyy/MM/dd + * 3 yyyy-MM-dd + * 4 yyyy-MM-dd HH:mm:ss + * 5 yyyyMMddHHmmss + * 6 yyyy-MM-dd HH:mm:ss.sss + * 7 HH:mm + * 8 yyyy年MM月dd日 + * 9 yyyyMMddHHmmssSSS + * 10 yyyy年MM月dd日 HH:mm + * 11 yyyy-MM-dd HH + * 12 HH:mm:ss + * 13 yyyy/MM/dd HH:mm:ss + * 14 yyyy-MM-dd'T'HH:mm:ss+08:00 + * 15 yyyy-MM-dd HH:mm + * 16 yyyyMM + * 17 yyyy年MM月dd日hh时mm分 + * 18 yyyy/MM/ddHH:mm:ss + * @return 时间戳 + */ + public static Timestamp stringToTimestamp(String dateString, int formatNum) { + if (dateString == null || dateString.length() == 0) { + throw new IllegalArgumentException("日期字符串为空"); + } + Date date = stringToDate(dateString, formatNum); + if (date != null) { + return new Timestamp(date.getTime()); + } + return null; + } + + /** + * @param time 字符串日期 + * @param formatNum 需要按照哪种类型 + * 1 yyyyMMdd + * 2 yyyy/MM/dd + * 3 yyyy-MM-dd + * 4 yyyy-MM-dd HH:mm:ss + * 5 yyyyMMddHHmmss + * 6 yyyy-MM-dd HH:mm:ss.sss + * 7 HH:mm + * 8 yyyy年MM月dd日 + * 9 yyyyMMddHHmmssSSS + * 10 yyyy年MM月dd日 HH:mm + * 11 yyyy-MM-dd HH + * 12 HH:mm:ss + * 13 yyyy/MM/dd HH:mm:ss + * 14 yyyy-MM-dd'T'HH:mm:ss+08:00 + * 15 yyyy-MM-dd HH:mm + * 16 yyyyMM + * 17 yyyy年MM月dd日hh时mm分 + * 18 yyyy/MM/ddHH:mm:ss + * @return 字符串 + */ + public static String timestamp2String(Timestamp time, int formatNum) { + if (time != null) { + Date date = time; + return dateToString(date, formatNum); + } + return null; + } + + /** + * 把string类型的日期转化为相应的格式 + * + * @param date 字符串日期 + * @param formatNum 1 yyyyMMdd + * 2 yyyy/MM/dd + * 3 yyyy-MM-dd + * 4 yyyy-MM-dd HH:mm:ss + * 5 yyyyMMddHHmmss + * 6 yyyy-MM-dd HH:mm:ss.sss + * 7 HH:mm + * 8 yyyy年MM月dd日 + * 9 yyyyMMddHHmmssSSS + * 10 yyyy年MM月dd日 HH:mm + * 11 yyyy-MM-dd HH + * 12 HH:mm:ss + * 14 yyyy-MM-ddTHH:mm:ss+08:00 + * 15 yyyy-MM-dd HH:mm + * 16 yyyyMM + * 17 yyyy年MM月dd日hh时mm分 + * 18 yyyy/MM/ddHH:mm:ss + * @return 日期字符串 + */ + public static String dateToString(Date date, int formatNum) { + String str = null; + if (date != null) { + str = dateFormat(formatNum).format(date); + } + return str; + } + +} diff --git a/src/com/fasc/open/api/utils/file/FileUtil.java b/src/com/fasc/open/api/utils/file/FileUtil.java new file mode 100644 index 0000000..c72b206 --- /dev/null +++ b/src/com/fasc/open/api/utils/file/FileUtil.java @@ -0,0 +1,59 @@ +package com.fasc.open.api.utils.file; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class FileUtil { + private FileUtil() { + } + + private static final Logger log = LoggerFactory.getLogger(FileUtil.class); + + /** + * 文件写入 + * + * @param fileBytes 文件字节数组 + * @param path 文件绝对路径 + * @param fileName 文件名称 + */ + public static void fileSink(byte[] fileBytes, String path, String fileName) { + File f = new File(path + fileName); + if (f.exists()) { + log.warn("文件已存在:{}", f.getAbsolutePath()); + return; + } + if (!f.getParentFile().exists()) { + f.getParentFile().mkdirs(); + } + FileOutputStream fos = null; + BufferedOutputStream bw = null; + try { + fos = new FileOutputStream(f); + bw = new BufferedOutputStream(fos); + bw.write(fileBytes); + bw.flush(); + } catch (Exception e) { + log.error("文件写入失败:{}", e.getMessage(), e); + } finally { + try { + if (bw != null) { + bw.close(); + } + if (fos != null) { + fos.close(); + } + } catch (IOException ex) { + log.error("文件流关闭异常:{}", ex.getMessage(), ex); + } + } + } +} diff --git a/src/com/fasc/open/api/utils/file/ZipUtil.java b/src/com/fasc/open/api/utils/file/ZipUtil.java new file mode 100644 index 0000000..b1ea761 --- /dev/null +++ b/src/com/fasc/open/api/utils/file/ZipUtil.java @@ -0,0 +1,85 @@ +package com.fasc.open.api.utils.file; + +import java.io.*; +import java.nio.charset.Charset; +import java.util.HashMap; +import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class ZipUtil { + private ZipUtil() { + } + + /** + * 解压压缩文件 (返回文件名 对应bytes)(GBK编码类型) + * + * @param bytes 字节数组 + * @return 文件名称对应字节 + * @throws Exception 异常 + */ + public static Map unZipByGbk(byte[] bytes) throws Exception { + Map fileNameByteMap = new HashMap<>(); + ZipInputStream zipInputStream = new ZipInputStream(new ByteArrayInputStream(bytes), Charset.forName("GBK")); + ZipEntry zipEntry = zipInputStream.getNextEntry(); + + while (zipEntry != null) { + if (zipEntry.isDirectory()) { + break; + } else { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + String fileName = zipEntry.getName(); + byte[] bufferBytes = new byte[1024]; + int len; + while ((len = zipInputStream.read(bufferBytes, 0, bufferBytes.length)) != -1) { + bos.write(bufferBytes, 0, len); + } + bos.flush(); + bos.close(); + zipInputStream.closeEntry(); + fileNameByteMap.put(fileName, bos.toByteArray()); + zipEntry = zipInputStream.getNextEntry(); + } + } + zipInputStream.close(); + return fileNameByteMap; + } + + + /** + * 解压到指定目录(GBK编码类型) + * + * @param bytes 字节数组 + * @param filePath 文件绝对路径 + * @throws Exception 异常 + */ + public static void unZipByGbk(byte[] bytes, String filePath) throws Exception { + ZipInputStream zipInputStream = new ZipInputStream(new ByteArrayInputStream(bytes), Charset.forName("GBK")); + ZipEntry zipEntry = zipInputStream.getNextEntry(); + + while (zipEntry != null) { + if (zipEntry.isDirectory()) { + continue; + } else { + String unZipFilePath = filePath + File.separator + zipEntry.getName(); + try (BufferedOutputStream bufferedOutputStream = + new BufferedOutputStream(new FileOutputStream(unZipFilePath));) { + byte[] bufferBytes = new byte[1024]; + int len; + while ((len = zipInputStream.read(bufferBytes, 0, bufferBytes.length)) != -1) { + bufferedOutputStream.write(bufferBytes, 0, len); + } + } + } + zipInputStream.closeEntry(); + zipEntry = zipInputStream.getNextEntry(); + } + zipInputStream.close(); + } + + +} diff --git a/src/com/fasc/open/api/utils/http/HttpUtil.java b/src/com/fasc/open/api/utils/http/HttpUtil.java new file mode 100644 index 0000000..3505e91 --- /dev/null +++ b/src/com/fasc/open/api/utils/http/HttpUtil.java @@ -0,0 +1,369 @@ +package com.fasc.open.api.utils.http; + +import com.fasc.open.api.bean.base.BaseResponseEntity; +import com.fasc.open.api.bean.base.HttpInfoRes; +import com.fasc.open.api.config.HttpConfig; +import com.fasc.open.api.constants.RequestConstants; +import com.fasc.open.api.exception.ApiException; +import org.apache.http.*; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.config.Registry; +import org.apache.http.config.RegistryBuilder; +import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.conn.socket.PlainConnectionSocketFactory; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.ssl.SSLContexts; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.net.ssl.SSLContext; +import java.io.File; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.SocketTimeoutException; +import java.net.URI; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class HttpUtil { + private static Logger log = LoggerFactory.getLogger(HttpUtil.class); + + private static int DEFAULT_MAX_PER_ROUTE = 350; + + private static int DEFAULT_SOCKET_MAX_TOTAL = 400; + + public static HttpConfig httpConfig; + + private static volatile CloseableHttpClient closeableHttpClient; + + private static Lock lock = new ReentrantLock(); + + private HttpUtil() { + } + + private static HttpGet getHttpGet(String url, Map params, String encode) { + StringBuilder buf = new StringBuilder(url); + if (params != null) { + // 地址增加?或者& + String flag = (url.indexOf('?') == -1) ? "?" : "&"; + // 添加参数 + for (Entry entry : params.entrySet()) { + buf.append(flag); + buf.append(entry.getKey()); + buf.append("="); + try { + String param = entry.getValue(); + if (param == null) { + param = ""; + } + buf.append(URLEncoder.encode(param, encode)); + } catch (UnsupportedEncodingException e) { + log.error("URLEncoder Error,encode=" + encode + ",param=" + entry.getValue(), e); + } + flag = "&"; + + } + } + return new HttpGet(buf.toString()); + } + + /** + * 上传文件 post + * + * @param url 请求地址 + * @param params 请求参数 + * @param files 请求文件 + * @return HttpPost + */ + private static HttpPost getHttpPost(String url, Map params, Map files) { + HttpPost httpPost = new HttpPost(url); + MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create(); + if (files != null && !files.isEmpty()) { + for (Entry kv : files.entrySet()) { + multipartEntityBuilder.addBinaryBody(kv.getKey(), kv.getValue()); + } + } + if (params != null && !params.isEmpty()) { + for (Entry entry : params.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + multipartEntityBuilder.addTextBody(key, value, ContentType.TEXT_PLAIN.withCharset(RequestConstants.CHARSET_UTF8)); + } + multipartEntityBuilder.setMode(HttpMultipartMode.RFC6532); + } + HttpEntity httpEntity = multipartEntityBuilder.build(); + httpPost.setEntity(httpEntity); + return httpPost; + } + + /** + * post请求 + * + * @param url 请求路径 + * @param params 请求参数 + * @return HttpPost + */ + private static HttpPost getHttpPost(String url, Map params, String charset) throws UnsupportedEncodingException { + HttpPost httpPost = new HttpPost(url); + if (params != null && !params.isEmpty()) { + List list = new ArrayList<>(); + for (Entry entry : params.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + BasicNameValuePair basicNameValuePair = new BasicNameValuePair(key, value); + list.add(basicNameValuePair); + } + UrlEncodedFormEntity httpEntity = new UrlEncodedFormEntity(list, charset); + httpPost.setEntity(httpEntity); + } + return httpPost; + } + + public static HttpInfoRes post(String url, Map reqHeader, Map params, + Map files) throws ApiException { + try { + // 初始化httpClient + CloseableHttpClient httpClient = getHttpClient(httpConfig); + // 创建http请求 设置请求参数 + HttpPost httpPost; + if (files == null || files.isEmpty()) { + httpPost = getHttpPost(url, params, RequestConstants.CHARSET_UTF8); + } else { + httpPost = getHttpPost(url, params, files); + } + httpPost.setConfig(getRequestConfig(httpConfig)); + return executeHttpRequest(httpClient, httpPost, reqHeader); + } catch (ApiException e) { + throw e; + } catch (Exception e) { + log.error("url=[{}] http请求失败:{}", url, e.getMessage(), e); + throw new ApiException("请求失败"); + } + } + + /** + * 获取client + * + * @param httpConfig http配置 + * @return CloseableHttpClient client + * @throws ApiException 异常 + */ + public static CloseableHttpClient getHttpClient(HttpConfig httpConfig) throws ApiException { + if(closeableHttpClient != null) { + return closeableHttpClient; + } + try { + lock.lock(); + if(closeableHttpClient != null) { + return closeableHttpClient; + } + Registry sfr = null; + if (httpConfig != null && Boolean.TRUE.equals(httpConfig.getProxyFlag())) { + sfr = RegistryBuilder.create() + .register("http", PlainConnectionSocketFactory.getSocketFactory()) + .register("https",SSLConnectionSocketFactory.getSocketFactory()) + .build(); + } else { + SSLContext ctx = SSLContexts.custom().useProtocol("TLSv1.2").build(); + SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(ctx); + sfr = RegistryBuilder.create() + .register("http", PlainConnectionSocketFactory.getSocketFactory()) + .register("https", sslsf != null ? sslsf : SSLConnectionSocketFactory.getSocketFactory()) + .build(); + } + PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(sfr); + Integer defaultMaxPerRoute = DEFAULT_MAX_PER_ROUTE; + Integer defaultSocketMaxTotal = DEFAULT_SOCKET_MAX_TOTAL; + if(httpConfig != null && httpConfig.getDefaultMaxPerRoute() != null && httpConfig.getDefaultMaxPerRoute() > 0) { + defaultMaxPerRoute = httpConfig.getDefaultMaxPerRoute(); + } + if(httpConfig != null && httpConfig.getDefaultSocketMaxTotal() != null && httpConfig.getDefaultSocketMaxTotal() > 0) { + defaultSocketMaxTotal = httpConfig.getDefaultSocketMaxTotal(); + } + connectionManager.setDefaultMaxPerRoute(defaultMaxPerRoute); + connectionManager.setMaxTotal(defaultSocketMaxTotal); + connectionManager.setValidateAfterInactivity(3000); + connectionManager.closeExpiredConnections(); + closeableHttpClient = HttpClients.custom().setConnectionManager(connectionManager).build(); + } catch (Exception e) { + log.error("HttpClient生成失败:{}", e.getMessage(), e); + throw new ApiException("HttpClient生成失败"); + } finally { + lock.unlock(); + } + return closeableHttpClient; + } + + + public static HttpInfoRes get(String url, Map reqHeader, Map params) throws ApiException { + // 初始化httpClient + CloseableHttpClient httpClient = getHttpClient(httpConfig); + // 创建http请求 设置请求参数 + HttpGet httpGet = getHttpGet(url, params, RequestConstants.CHARSET_UTF8); + // 设置超时时间、代理配置 + httpGet.setConfig(getRequestConfig(httpConfig)); + return executeHttpRequest(httpClient, httpGet, reqHeader); + } + + + public static HttpInfoRes executeHttpRequest(CloseableHttpClient client, HttpUriRequest request, Map reqHeader) throws ApiException { + CloseableHttpResponse response = null; + try { + if (reqHeader != null && !reqHeader.isEmpty()) { + for (Entry entry : reqHeader.entrySet()) { + request.addHeader(entry.getKey(), entry.getValue()); + } + } + response = client.execute(request); + reqesutAndResponseLog(request, response); + HttpInfoRes httpInfoRes = HttpInfoRes.getInstance(); + if (response.getEntity() != null) { + httpInfoRes.setBody(EntityUtils.toString(response.getEntity())); + } + httpInfoRes.setHttpStatusCode(response.getStatusLine().getStatusCode()); + return httpInfoRes; + } catch (SocketTimeoutException eto) { + log.error("请求链接超时:{}", eto.getMessage(), eto); + throw new ApiException("请求超时"); + } catch (Exception e) { + log.error("executeHttpRequest请求失败:{}", e.getMessage(), e); + throw new ApiException("请求失败"); + } finally { + if (response != null) { + try { + response.close(); + } catch (IOException e) { + log.error("CloseableHttpResponse关闭失败:{}", e.getMessage(), e); + } + } + } + } + + + /** + * 下载文件 + * + * @param url 请求路径 + * @param reqHeader 请求头 + * @param params 请求参数 + * @return ApiResponseEntity + * @throws ApiException 异常 + */ + public static BaseResponseEntity downLoadFiles(String url, Map reqHeader, Map params) throws ApiException { + BaseResponseEntity entity = new BaseResponseEntity(); + + CloseableHttpResponse response = null; + // 初始化httpClient + CloseableHttpClient httpClient = getHttpClient(httpConfig); + try { + // 创建http请求 设置请求参数 + HttpPost httpPost = getHttpPost(url, params, RequestConstants.CHARSET_UTF8); + if (reqHeader != null) { + for (Entry entry : reqHeader.entrySet()) { + httpPost.addHeader(entry.getKey(), entry.getValue()); + } + } + httpPost.setConfig(getRequestConfig(httpConfig)); + response = httpClient.execute(httpPost); + reqesutAndResponseLog(httpPost, response); + entity.setHttpStatusCode(response.getStatusLine().getStatusCode()); + HttpEntity respEntity = response.getEntity(); + Header contentType = respEntity.getContentType(); + + if (contentType.getValue().contains(ContentType.APPLICATION_JSON.getMimeType())) { + entity.setData(EntityUtils.toString(respEntity)); + } else { + byte[] bytes = EntityUtils.toByteArray(response.getEntity()); + entity.setContent(bytes); + entity.setContentType(contentType.getValue()); + } + } catch (Exception e) { + log.error("文件下载失败:{}", e.getMessage(), e); + throw new ApiException("文件下载失败"); + } finally { + if (response != null) { + try { + response.close(); + } catch (IOException e) { + log.error("CloseableHttpResponse关闭失败:{}", e.getMessage(), e); + } + } + } + + return entity; + } + + + /** + * 请求响应日志打印 + * + * @param request 请求 + * @param response 响应 + */ + private static void reqesutAndResponseLog(HttpUriRequest request, HttpResponse response) { + + // 请求url + URI uri = request.getURI(); + if (uri != null) { + log.info("request url = [{}]", uri.toString()); + } + + // 获取请求头里面的nonce + Header[] requestHeaders = request.getHeaders(RequestConstants.NONCE); + + if (requestHeaders != null && requestHeaders.length > 0) { + log.info("request header {}= [{}]", RequestConstants.NONCE, requestHeaders[0].getValue()); + } + + // 获取响应头里面的requestId + Header[] responseHeaders = response.getHeaders(RequestConstants.FDD_REQEUST_ID); + if (responseHeaders != null && responseHeaders.length > 0) { + log.info("response header {}= [{}]", RequestConstants.FDD_REQEUST_ID, responseHeaders[0].getValue()); + } + } + + /** + * 设置超时时间和代理 + * + * @return 请求配置 + */ + private static RequestConfig getRequestConfig(HttpConfig httpConfig) { + RequestConfig.Builder custom = RequestConfig.custom(); + if (httpConfig != null) { + if (httpConfig.getReadTimeout() != null) { + custom.setSocketTimeout(httpConfig.getReadTimeout()); + } + if (httpConfig.getConnectTimeout() != null) { + custom.setConnectTimeout(httpConfig.getConnectTimeout()); + } + // 设置代理 + if (Boolean.TRUE.equals(httpConfig.getProxyFlag())) { + HttpHost proxy = new HttpHost(httpConfig.getProxyHost(), httpConfig.getProxyPort(), "http"); + custom.setProxy(proxy); + } + } + return custom.build(); + } +} diff --git a/src/com/fasc/open/api/utils/json/JacksonUtil.java b/src/com/fasc/open/api/utils/json/JacksonUtil.java new file mode 100644 index 0000000..24acf5d --- /dev/null +++ b/src/com/fasc/open/api/utils/json/JacksonUtil.java @@ -0,0 +1,107 @@ +package com.fasc.open.api.utils.json; + +import com.fasc.open.api.exception.ApiException; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.text.SimpleDateFormat; +import java.util.List; + +/** + * @author Fadada + * 2021/9/8 16:28:16 + */ +public class JacksonUtil { + private JacksonUtil() { + } + + private static final Logger log = LoggerFactory.getLogger(JacksonUtil.class); + + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + static { + /** + * 序列化忽略为null属性 + */ + OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); + + // 取消时间的转化格式,默认是时间戳,可以取消,同时需要设置要表现的时间格式 + OBJECT_MAPPER.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + OBJECT_MAPPER.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); + + // 对于空的对象转json的时候不抛出错误 + OBJECT_MAPPER.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + + // 禁用遇到未知属性抛出异常 + OBJECT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + OBJECT_MAPPER.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); + OBJECT_MAPPER.enable(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT); + + + OBJECT_MAPPER.enable(JsonParser.Feature.ALLOW_COMMENTS); + OBJECT_MAPPER.enable(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES); + OBJECT_MAPPER.enable(JsonParser.Feature.ALLOW_SINGLE_QUOTES); + + } + + public static String toJson(Object object) throws ApiException { + // 针对的是转义字符串 + try { + if (object instanceof String) { + JsonNode jsonNode = OBJECT_MAPPER.readTree(String.valueOf(object)); + return OBJECT_MAPPER.writeValueAsString(jsonNode); + } else { + return OBJECT_MAPPER.writeValueAsString(object); + } + } catch (Exception e) { + log.error("toJson失败:{}", e.getMessage(), e); + throw new ApiException("toJson失败"); + } + } + + public static T toJavaBean(String json, final ParameterizedType parameterizedType) throws ApiException { + if (json == null) { + return null; + } + try { + return OBJECT_MAPPER.readValue(json, new TypeReference() { + @Override + public Type getType() { + return parameterizedType; + } + }); + } catch (JsonProcessingException e) { + log.error("toJavaBean失败:{}", e.getMessage(), e); + throw new ApiException("toJavaBean失败"); + } + } + + + public static T toJavaBean(String json, Class clzz) throws ApiException { + try { + return OBJECT_MAPPER.readValue(json, clzz); + } catch (JsonProcessingException e) { + log.error("toJavaBean失败:{}", e.getMessage(), e); + throw new ApiException("toJavaBean失败"); + } + } + + public static List toList(String json, Class clzz) throws ApiException { + JavaType javaType = OBJECT_MAPPER.getTypeFactory().constructParametricType(List.class, clzz); + try { + return OBJECT_MAPPER.readValue(json, javaType); + } catch (JsonProcessingException e) { + log.error("toList失败:{}", e.getMessage(), e); + throw new ApiException("toList失败"); + } + } + +} diff --git a/src/com/fasc/open/api/utils/json/ParameterizedTypeBaseRes.java b/src/com/fasc/open/api/utils/json/ParameterizedTypeBaseRes.java new file mode 100644 index 0000000..e03a00e --- /dev/null +++ b/src/com/fasc/open/api/utils/json/ParameterizedTypeBaseRes.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.utils.json; + +import com.fasc.open.api.bean.base.BaseRes; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class ParameterizedTypeBaseRes implements ParameterizedType { + Class clazz; + + public ParameterizedTypeBaseRes(Class clz) { + clazz = clz; + } + + @Override + public Type[] getActualTypeArguments() { + return new Type[]{clazz}; + } + + @Override + public Type getRawType() { + return BaseRes.class; + } + + @Override + public Type getOwnerType() { + return null; + } +} diff --git a/src/com/fasc/open/api/utils/random/UUIDGenerator.java b/src/com/fasc/open/api/utils/random/UUIDGenerator.java new file mode 100644 index 0000000..a2e2a68 --- /dev/null +++ b/src/com/fasc/open/api/utils/random/UUIDGenerator.java @@ -0,0 +1,45 @@ +/** + * com.yq365.utils.random + * UUIDGenetrator.java + */ +package com.fasc.open.api.utils.random; + +import java.util.UUID; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class UUIDGenerator { + private UUIDGenerator() { + } + + /** + * 获得一个UUID + * + * @return String UUID + */ + public static String getUuid() { + String s = UUID.randomUUID().toString(); + //去掉“-”符号 + return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24); + } + + /** + * 获得指定数目的UUID + * + * @param number int 需要获得的UUID数量 + * @return String[] UUID数组 + */ + public static String[] getUuid(int number) { + if (number < 1) { + return new String[0]; + } + String[] ss = new String[number]; + for (int i = 0; i < number; i++) { + ss[i] = getUuid(); + } + return ss; + } + +} \ No newline at end of file diff --git a/src/com/fasc/open/api/utils/string/StringUtil.java b/src/com/fasc/open/api/utils/string/StringUtil.java new file mode 100644 index 0000000..c607805 --- /dev/null +++ b/src/com/fasc/open/api/utils/string/StringUtil.java @@ -0,0 +1,93 @@ +package com.fasc.open.api.utils.string; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class StringUtil { + private StringUtil() { + } + + /** + * 为空 + * + * @param cs 字符串 + * @return 是否为空 + */ + public static boolean isEmpty(CharSequence cs) { + return cs == null || cs.length() == 0; + } + + /** + * 不为空 + * + * @param cs 字符串 + * @return 是否不为空 + */ + public static boolean isNotEmpty(CharSequence cs) { + return !isEmpty(cs); + } + + /** + * 为null或者空 + * + * @param cs 字符串 + * @return 是否为null或空 + */ + public static boolean isBlank(CharSequence cs) { + int strLen; + if (cs != null && (strLen = cs.length()) != 0) { + for (int i = 0; i < strLen; ++i) { + if (!Character.isWhitespace(cs.charAt(i))) { + return false; + } + } + + return true; + } else { + return true; + } + } + + /** + * 不为null或者空 + * + * @param cs 字符串 + * @return 是否不为null或空 + */ + public static boolean isNotBlank(CharSequence cs) { + return !isBlank(cs); + } + + /** + * 去除前后空格 + * + * @param str 字符串 + * @return 字符串 + */ + public static String trim(String str) { + return str == null ? null : str.trim(); + } + + /** + * 去除空格后长度为0就返回null + * + * @param str 字符串 + * @return 字符串 + */ + public static String trimToNull(String str) { + String ts = trim(str); + return isEmpty(ts) ? null : ts; + } + + /** + * 去除空格,为null返回空字符串 + * + * @param str 字符串 + * @return 字符串 + */ + public static String trimToEmpty(String str) { + return str == null ? "" : str.trim(); + } + +} diff --git a/src/com/fasc/open/api/v5_1/client/CorpClient.java b/src/com/fasc/open/api/v5_1/client/CorpClient.java new file mode 100644 index 0000000..43f9582 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/CorpClient.java @@ -0,0 +1,56 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.corp.*; +import com.fasc.open.api.v5_1.res.common.ECorpAuthUrlRes; +import com.fasc.open.api.v5_1.res.corp.*; + +/** + * @author Fadada + * 2021/10/16 16:48:09 + */ +public class CorpClient { + private OpenApiClient openApiClient; + + public CorpClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getCorpAuthUrl(GetCorpAuthResourceUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_GET_AUTH_URL, ECorpAuthUrlRes.class); + } + + public BaseRes disable(DisableCorpReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_DISABLE, Void.class); + } + + public BaseRes enable(EnableCorpReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_ENABLE, Void.class); + } + + public BaseRes get(GetCorpReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_GET, CorpRes.class); + } + + public BaseRes getIdentityInfo(GetCorpIdentityInfoReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_GET_IDENTITY_INFO, CorpIdentityInfoRes.class); + } + + public BaseRes unbind(CorpUnbindReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_UNBIND, Void.class); + } + + public BaseRes getIdentifiedStatus(GetIdentifiedStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_GET_IDENTIFIED_STATUS, GetIdentifiedStatusRes.class); + } + /**查询相对方**/ + public BaseRes getCounterpartList(GetCounterpartListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.COUNTERPART_GET_LIST, GetCounterpartListRes.class); + } + /** OP支撑:获取实名认证流水号**/ + public BaseRes getCorpIdentTransactionId(GetCorpIdentTransactionIdReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_GET_IDENT_TRANSACTION_ID, GetCorpIdentTransactionIdRes.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/DocClient.java b/src/com/fasc/open/api/v5_1/client/DocClient.java new file mode 100644 index 0000000..33bcfcf --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/DocClient.java @@ -0,0 +1,41 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.v5_1.req.doc.FileProcessReq; +import com.fasc.open.api.v5_1.req.doc.FileVerifySignReq; +import com.fasc.open.api.v5_1.req.doc.GetUploadUrlReq; +import com.fasc.open.api.v5_1.req.doc.UploadFileByUrlReq; +import com.fasc.open.api.v5_1.res.doc.FileProcessRes; +import com.fasc.open.api.v5_1.res.doc.FileVerifySignRes; +import com.fasc.open.api.v5_1.res.doc.GetUploadUrlRes; +import com.fasc.open.api.v5_1.res.doc.UploadFileByUrlRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class DocClient { + private OpenApiClient openApiClient; + + public DocClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes uploadFileByUrl(UploadFileByUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.FILE_UPLOAD_BY_URL, UploadFileByUrlRes.class); + } + + public BaseRes getUploadFileUrl(GetUploadUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.FILE_GET_UPLOAD_URL, GetUploadUrlRes.class); + } + + public BaseRes process(FileProcessReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.FILE_PROCESS, FileProcessRes.class); + } + /** 文档验签 **/ + public BaseRes fileVerifySign(FileVerifySignReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.DOC_POST_FILE_VERIFY_SIGN, FileVerifySignRes.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/EUIClient.java b/src/com/fasc/open/api/v5_1/client/EUIClient.java new file mode 100644 index 0000000..f69fc55 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/EUIClient.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.corp.GetCorpAuthResourceUrlReq; +import com.fasc.open.api.v5_1.req.eui.GetAppPageResourceUrlReq; +import com.fasc.open.api.v5_1.req.eui.GetBillUrlReq; +import com.fasc.open.api.v5_1.req.eui.GetUserPageResourceUrlReq; +import com.fasc.open.api.v5_1.res.common.ECorpAuthUrlRes; +import com.fasc.open.api.v5_1.res.common.EUrlRes; +import com.fasc.open.api.v5_1.res.eui.GetPageResourceUrlRes; + +public class EUIClient { + private OpenApiClient openApiClient; + + public EUIClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getBillUrl(GetBillUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.BILLING_GET_BILL_URL, EUrlRes.class); + } + + public BaseRes getAppPageResourceUrl(GetAppPageResourceUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_PAGE_RESOURCE_GET_URL, GetPageResourceUrlRes.class); + } + + public BaseRes getUserPageResourceUrl(GetUserPageResourceUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_PAGE_RESOURCE_GET_URL, GetPageResourceUrlRes.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/OCRClient.java b/src/com/fasc/open/api/v5_1/client/OCRClient.java new file mode 100644 index 0000000..f3a0b4f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/OCRClient.java @@ -0,0 +1,35 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.doc.*; +import com.fasc.open.api.v5_1.res.doc.*; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class OCRClient { + private OpenApiClient openApiClient; + + public OCRClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getCompareUrl(GetCompareUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.OCR_EDIT_GET_COMPARE_URL, GetCompareUrlRes.class); + } + + public BaseRes getCompareResultUrl(GetCompareResultUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.OCR_EDIT_GET_RESULT_COMPARE_URL, GetCompareResultUrlRes.class); + } + + public BaseRes getExamineUrl(GetExamineUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.OCR_EDIT_GET_EXAMINE_URL, GetExamineUrlRes.class); + } + + public BaseRes getExamineResultUrl(GetExamineResultUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.OCR_EDIT_GET_RESULT_EXAMINE_URL, GetExamineResultUrlRes.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/OpenApiClient.java b/src/com/fasc/open/api/v5_1/client/OpenApiClient.java new file mode 100644 index 0000000..2a418da --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/OpenApiClient.java @@ -0,0 +1,307 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.bean.base.BaseResponseEntity; +import com.fasc.open.api.bean.base.HttpInfoRes; +import com.fasc.open.api.config.HttpConfig; +import com.fasc.open.api.constants.RequestConstants; +import com.fasc.open.api.enums.http.SignTypeEnum; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.stratey.DefaultJsonStrategy; +import com.fasc.open.api.stratey.JsonStrategy; +import com.fasc.open.api.utils.crypt.FddCryptUtil; +import com.fasc.open.api.utils.http.HttpUtil; +import com.fasc.open.api.utils.json.ParameterizedTypeBaseRes; +import com.fasc.open.api.utils.random.UUIDGenerator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class OpenApiClient { + + private final Logger log = LoggerFactory.getLogger(OpenApiClient.class); + + + private final String appId; + private final String appSecret; + private final String serverUrl; + + /** + * 请求服务端签名加密方式,目前仅支持HMAC-SHA256,请勿修改 + */ + private String signType = SignTypeEnum.HMAC_SHA256.getType(); + + /** + * json串策率 + */ + private JsonStrategy jsonStrategy; + + /** + * http配置 + */ + private HttpConfig httpConfig; + + public OpenApiClient(String appId, String appSecret, String serverUrl) { + this.appId = appId; + this.appSecret = appSecret; + this.serverUrl = serverUrl; + } + + public HttpConfig getHttpConfig() { + return httpConfig; + } + + public void setHttpConfig(HttpConfig httpConfig) { + if (httpConfig != null) { + this.httpConfig = httpConfig; + HttpUtil.httpConfig = this.httpConfig; + } + } + + public String getSignType() { + return signType; + } + + public void setSignType(String signType) { + if (signType != null) { + this.signType = signType; + } + } + + public void setJsonStrategy(JsonStrategy jsonStrategy) { + if (jsonStrategy != null) { + this.jsonStrategy = jsonStrategy; + } + } + + public JsonStrategy getJsonStrategy() { + if (this.jsonStrategy == null) { + this.jsonStrategy = new DefaultJsonStrategy(); + } + return this.jsonStrategy; + } + + public String getAppId() { + return appId; + } + + public String getAppSecret() { + return appSecret; + } + + /** + * 根据请求返回实体类 + * + * @param req 请求实体 + * @param path 请求路径 + * @param clzz 指定响应实体类 + * @param 响应实体泛型 + * @return BaseRsp + * @throws ApiException API异常 + */ + BaseRes invokeApi(BaseReq req, String path, Class clzz) throws ApiException { + return this.httpRequest(req, path, null, clzz); + } + + + /** + * 根据请求返回实体类 + * + * @param req 请求实体 + * @param path 请求路径 + * @param clzz 指定响应实体类 + * @param 响应实体泛型 + * @return BaseRsp + * @throws ApiException API异常 + */ + BaseRes> invokeApiList(BaseReq req, String path, Class clzz) throws ApiException { + return this.httpRequestList(req, path, clzz); + } + + + /** + * 上传文件返回实体类 + * + * @param req 请求实体 + * @param path 请求路径 + * @param files 请求文件 + * @param clzz 指定响应实体类 + * @param 响应实体泛型 + * @return BaseRsp + * @throws ApiException API异常 + */ + BaseRes invokeApi(BaseReq req, String path, Map files, Class clzz) throws ApiException { + return httpRequest(req, path, files, clzz); + } + + /** + * 下载返回对应实体类 + * + * @param req 请求实体 + * @param path 请求路径 + * @return BaseRes + * @throws ApiException API异常 + */ + BaseRes invokeApiDownload(BaseReq req, String path) throws ApiException { + String accessToken = req.getAccessToken(); + Map bodyMap = getBodyMap(req); + Map headerMap = getSign(getHeaderMap(accessToken), bodyMap); + String method = getMethod(path); + path = path.replace(method, "").trim(); + String url = serverUrl + path; + + BaseResponseEntity baseResponseEntity = request(url, headerMap, bodyMap); + BaseRes res; + + if (baseResponseEntity.getData() != null) { + res = getJsonStrategy().toJavaBean(baseResponseEntity.getData(), BaseRes.class); + } else { + res = new BaseRes(); + res.setData(baseResponseEntity); + } + res.setHttpStatusCode(baseResponseEntity.getHttpStatusCode()); + return res; + } + + private BaseRes> httpRequestList(BaseReq req, String path, Class clzz) + throws ApiException { + HttpInfoRes httpInfoRes = this.httpRequest(req, path, null); + if (httpInfoRes == null) { + return null; + } + + BaseRes baseRes = getJsonStrategy().toJavaBean(httpInfoRes.getBody(), BaseRes.class); + baseRes.setHttpStatusCode(httpInfoRes.getHttpStatusCode()); + Object data = baseRes.getData(); + if (data != null) { + String jsonStr; + if (data instanceof String) { + jsonStr = String.valueOf(data); + } else { + jsonStr = getJsonStrategy().toJson(data); + } + List lists = getJsonStrategy().toList(jsonStr, clzz); + baseRes.setData(lists); + } + return baseRes; + } + + private BaseRes httpRequest(BaseReq req, String path, Map files, Class clzz) + throws ApiException { + HttpInfoRes httpInfoRes = this.httpRequest(req, path, files); + if (httpInfoRes == null) { + return null; + } + BaseRes baseRes = getJsonStrategy().toJavaBean(httpInfoRes.getBody(), new ParameterizedTypeBaseRes(clzz)); + baseRes.setHttpStatusCode(httpInfoRes.getHttpStatusCode()); + return baseRes; + } + + private HttpInfoRes httpRequest(BaseReq req, String path, Map files) throws ApiException { + String accessToken = req == null ? null : req.getAccessToken(); + HashMap bodyMap = getBodyMap(req); + Map headerMap = getSign(getHeaderMap(accessToken), bodyMap); + String method = getMethod(path); + path = path.replace(method, "").trim(); + String url = serverUrl + path; + return request(url, method, headerMap, bodyMap, files); + } + + private String getMethod(String path) { + String method; + if (path.startsWith(RequestConstants.METHOD_POST)) { + method = RequestConstants.METHOD_POST; + } else if (path.startsWith(RequestConstants.METHOD_GET)) { + method = RequestConstants.METHOD_GET; + } else { + throw new IllegalArgumentException("path值非法"); + } + return method; + } + + + private Map getSign(Map headerMap, Map bodyMap) { + try { + Map signMap = new HashMap(headerMap); + if (null != bodyMap) { + signMap.putAll(bodyMap); + } + String sortParam = FddCryptUtil.sortParameters(signMap); + String sign = FddCryptUtil.sign(sortParam, headerMap.get(RequestConstants.TIMESTAMP), appSecret); + headerMap.put(RequestConstants.SIGN, sign); + } catch (Exception e) { + log.error("计算签名失败:{}", e.getMessage(), e); + } + return headerMap; + } + + + private HashMap getHeaderMap(String accessToken) { + HashMap paraMap = new HashMap(); + paraMap.put(RequestConstants.APP_ID, appId); + paraMap.put(RequestConstants.API_SUB_VERSION, RequestConstants.CURRENT_SUB_VERSION); + paraMap.put(RequestConstants.SIGN_TYPE, signType); + if (accessToken != null) { + paraMap.put(RequestConstants.ACCESS_TOKEN, accessToken); + paraMap.remove(RequestConstants.DATA_KEY); + } else { + paraMap.put(RequestConstants.GRANT_TYPE, RequestConstants.CLIENT_CREDENTIAL); + } + + paraMap.put(RequestConstants.TIMESTAMP, String.valueOf(System.currentTimeMillis())); + paraMap.put(RequestConstants.NONCE, UUIDGenerator.getUuid()); + return paraMap; + + + } + + private HashMap getBodyMap(BaseReq req) throws ApiException { + if (req == null) { + return new HashMap<>(); + } + String bizContent; + req.setAccessToken(null); + bizContent = getJsonStrategy().toJson(req); + + HashMap bodyMap = new HashMap(1); + bodyMap.put(RequestConstants.DATA_KEY, bizContent); + return bodyMap; + } + + + private HttpInfoRes request(String url, String method, Map headerMap, Map bodyMap, Map fileMap) throws ApiException { + try { + if (RequestConstants.METHOD_GET.equals(method)) { + return HttpUtil.get(url, headerMap, bodyMap); + } else if (RequestConstants.METHOD_POST.equals(method)) { + return HttpUtil.post(url, headerMap, bodyMap, fileMap); + } + return null; + } catch (ApiException apie) { + throw apie; + } catch (Exception e) { + log.error("http请求失败:{}", e.getMessage(), e); + throw new ApiException("http请求失败"); + } + } + + + private BaseResponseEntity request(String url, Map headerMap, Map bodyMap) throws ApiException { + try { + return HttpUtil.downLoadFiles(url, headerMap, bodyMap); + } catch (Exception e) { + log.error("httpDownLoad请求失败:{}", e.getMessage(), e); + throw new ApiException("httpDownLoad请求失败"); + } + } + +} diff --git a/src/com/fasc/open/api/v5_1/client/OrgClient.java b/src/com/fasc/open/api/v5_1/client/OrgClient.java new file mode 100644 index 0000000..63b2979 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/OrgClient.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.org.*; +import com.fasc.open.api.v5_1.res.org.*; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class OrgClient { + + private OpenApiClient openApiClient; + + public OrgClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + /**部门相关接口*/ + public BaseRes> getCorpDeptList(GetCorpDeptListReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.CORP_DEPT_GET_LIST, CorpDeptInfo.class); + } + + public BaseRes getCorpDeptDetail(GetCorpDeptDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_DEPT_GET_DETAIL, GetCorpDeptDetailRes.class); + } + + public BaseRes createCorpDept(CreateCorpDeptReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_DEPT_CREATE, CreateCorpDeptRes.class); + } + + public BaseRes modifyCorpDept(ModifyCorpDeptReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_DEPT_MODIFY, Void.class); + } + + public BaseRes deleteCorpDept(DeleteCorpDeptReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_DEPT_DELETE, Void.class); + } + + /** 企业成员相关接口 */ + public BaseRes getMemberList(GetMemberListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_GET_LIST, GetMemberListRes.class); + } + + public BaseRes getCorpMemberDetail(GetCorpMemberDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_GET_DETAIL, GetCorpMemberDetailRes.class); + } + + public BaseRes> createCorpMember(CreateCorpMemberReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.CORP_MEMBER_CREATE, SimpleEmployeeInfo.class); + } + + public BaseRes> getCorpMemberActiveUrl(GetCorpMemberActiveUrlReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.CORP_MEMBER_ACTIVE_URL, SimpleEmployeeInfo.class); + } + + public BaseRes modifyCorpMember(ModifyCorpMemberReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_MODIFY, Void.class); + } + + public BaseRes setCorpMemberDept(SetCorpMemberDeptReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_SET_DEPT, Void.class); + } + + public BaseRes setCorpMemberStatus(SetCorpMemberStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_SET_STATUS, Void.class); + } + + public BaseRes deleteCorpMember(DeleteCorpMemberReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MEMBER_DELETE, Void.class); + } + + /** 企业管理链接 */ + public BaseRes getCorpOrgManageUrl(GetCorpOrgManageUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_ORG_MANAGER_URL, GetCorpOrgManageUrlRes.class); + } + +} diff --git a/src/com/fasc/open/api/v5_1/client/SealClient.java b/src/com/fasc/open/api/v5_1/client/SealClient.java new file mode 100644 index 0000000..ab00c40 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/SealClient.java @@ -0,0 +1,95 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.v5_1.req.seal.*; +import com.fasc.open.api.v5_1.req.template.CancelPersonalSealFreeSignReq; +import com.fasc.open.api.v5_1.req.template.CancelSealFreeSignReq; +import com.fasc.open.api.v5_1.res.seal.*; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class SealClient { + + private OpenApiClient openApiClient; + + public SealClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getSealList(GetSealListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_LIST, GetSealListRes.class); + } + + public BaseRes getSealDetail(GetSealDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_DETAIL, GetSealDetailRes.class); + } + + public BaseRes getAppointedSealUrl(GetAppointedSealUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_APPOINTED_URL, GetAppointedSealUrlRes.class); + } + + public BaseRes getSealUserList(GetSealUserListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_USER_LIST, GetSealUserListRes.class); + } + + public BaseRes getUserSealList(GetUserSealListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_USER_SEAL_LIST, GetUserSealListRes.class); + } + + public BaseRes getSealCreateUrl(GetSealCreateUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_CREATE_URL, GetSealCreateUrlRes.class); + } + + public BaseRes getSealVerifyList(GetSealVerifyListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_VERIFY_LIST, GetSealVerifyListRes.class); + } + + public BaseRes modifySeal(ModifySealReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_MODIFY, Void.class); + } + + public BaseRes getSealGrantUrl(GetSealGrantUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_GRANT_URL, GetSealGrantUrlRes.class); + } + + public BaseRes cancelSealGrant(CancelSealGrantReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_CANCEL_GRANT, Void.class); + } + + public BaseRes setSealStatus(SetSealStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_SET_STATUS, Void.class); + } + + public BaseRes deleteSeal(SealDeleteReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_DELETE, Void.class); + } + + public BaseRes getSealManageUrl(GetSealManageUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_MANAGE_URL, GetSealManageUrlRes.class); + } + + public BaseRes getSealFreeSignUrl(GetSealFreeSignUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SEAL_GET_FREE_SIGN_URL, GetSealFreeSignUrlRes.class); + } + + public BaseRes getPersonalSealList(GetPersonalSealListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.PERSONAL_SEAL_GET_LIST, GetPersonalSealListRes.class); + } + public BaseRes getPersonalSealFreeSignUrl(GetPersonalSealFreeSignUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.PERSONAL_SEAL_GET_FREE_SIGN_URL, GetSealFreeSignUrlRes.class); + } + + /**解除印章免验证签**/ + public BaseRes cancelSealFreeSign(CancelSealFreeSignReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CANCEL_SEAL_FREE_SIGN, Void.class); + } + + /**解除签名免验证签**/ + public BaseRes cancelPersonalSealFreeSign(CancelPersonalSealFreeSignReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.CANCEL_PERSONAL_SEAL_FREE_SIGN, Void.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/ServiceClient.java b/src/com/fasc/open/api/v5_1/client/ServiceClient.java new file mode 100644 index 0000000..74e86dc --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/ServiceClient.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.v5_1.res.service.AccessTokenRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class ServiceClient { + private OpenApiClient openApiClient; + + public ServiceClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getAccessToken() throws ApiException { + return openApiClient.invokeApi(null, OpenApiUrlConstants.SERVICE_GET_ACCESS_TOKEN, AccessTokenRes.class); + } + +} diff --git a/src/com/fasc/open/api/v5_1/client/SignTaskClient.java b/src/com/fasc/open/api/v5_1/client/SignTaskClient.java new file mode 100644 index 0000000..761c2e5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/SignTaskClient.java @@ -0,0 +1,179 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.signtask.*; +import com.fasc.open.api.v5_1.res.signtask.*; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 17:10:09 + */ +public class SignTaskClient { + private OpenApiClient openApiClient; + + public SignTaskClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes create(CreateSignTaskReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_CREATE, CreateSignTaskRes.class); + } + + public BaseRes createWithTemplate(CreateWithTemplateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_CREATE_WITH_TEMPLATE, CreateSignTaskRes.class); + } + + public BaseRes addDoc(AddDocReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_DOC_ADD, Void.class); + } + + public BaseRes deleteDoc(DeleteDocReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_DOC_DELETE, Void.class); + } + + public BaseRes addField(AddFieldReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_FIELD_ADD, Void.class); + } + + public BaseRes deleteField(DeleteFieldReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_FIELD_DELETE, Void.class); + } + + public BaseRes addAttach(AddAttachReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ATTACH_ADD, Void.class); + } + + public BaseRes deleteAttach(DeleteAttachReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ATTACH_DELETE, Void.class); + } + + public BaseRes addActor(AddActorsReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ACTOR_ADD, Void.class); + } + + public BaseRes deleteActor(DeleteActorReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ACTOR_DELETE, Void.class); + } + + public BaseRes start(SignTaskBaseReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_START, Void.class); + } + + public BaseRes fillFieldValues(FillFieldValuesReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_FIELD_FILL_VALUES, Void.class); + } + + public BaseRes finalizeDoc(SignTaskBaseReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_DOC_FINALIZE, Void.class); + } + + public BaseRes block(BlockReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_BLOCK, Void.class); + } + + public BaseRes unblock(UnblockReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_UNBLOCK, Void.class); + } + + public BaseRes cancel(SignTaskCancelReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_CANCEL, Void.class); + } + + public BaseRes getDetail(SignTaskBaseReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_GET_DETAIL, SignTaskDetailRes.class); + } + + public BaseRes getOwnerList(GetOwnerSignTaskListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_OWNER_GET_LIST, GetSignTaskListRes.class); + } + + public BaseRes getOwnerDownloadUrl(GetOwnerDownloadUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_OWNER_GET_DOWNLOAD_URL, OwnerDownloadUrlRes.class); + } + + public BaseRes signTaskActorGetUrl(SignTaskActorGetUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ACTOR_GET_URL, SignTaskActorGetUrlRes.class); + } + + public BaseRes> signTaskCataloglist(SignTaskCatalogListReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.SIGN_TASK_CATALOG_LIST, SignTaskCatalogListRes.class); + } + + public BaseRes listSignTaskField(ListSignTaskFieldReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_FIELD_LIST, ListSignTaskFieldRes.class); + } + + public BaseRes> listSignTaskActor(ListSignTaskActorReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.SIGN_TASK_ACTOR_LIST, ListSignTaskActorRes.class); + } + + public BaseRes getApprovalInfo(GetApprovalInfoReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_GET_APPROVAL_INFO, GetApprovalInfoRes.class); + } + + public BaseRes getBatchSignUrl(GetBatchSignUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_GET_BATCH_SIGN_URL, BatchSignUrlRes.class); + } + + public BaseRes getSignTaskEditUrl(GetSignTaskUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_GET_EDIT_URL, GetSignTaskEditUrlRes.class); + } + + public BaseRes getSignTaskPreviewUrl(GetSignTaskUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_GET_PREVIEW_URL, GetSignTaskPreviewUrlRes.class); + } + + public BaseRes signTaskUrge(SignTaskBaseReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_URGE, Void.class); + } + /** 获取签署任务公证处保全报告 **/ + public BaseRes getDownloadEvidenceReport(GetDownloadEvidenceReportUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_SIGN_TASK_DOWNLOAD_EVIDENCE_REPORT_URL, GetDownloadEvidenceReportRes.class); + } + + /** 删除签署任务 **/ + public BaseRes signTaskDelete(DeleteSignTaskReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_DELETE, Void.class); + } + + /** 结束签署任务 **/ + public BaseRes signTaskFinish(FinishSignTaskReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_FINISH, Void.class); + } + + /** 查询签署业务类型列表 **/ + public BaseRes> getSignTaskBusinessTypeList(GetSignTaskBusinessTypeListReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.SIGN_TASK_GET_BUSINESS_TYPE_LIST, GetSignTaskBusinessTypeListRes.class); + } + + /** 查询参与方签署底图 **/ + public BaseRes getSignTaskFacePicture(GetSignTaskFacePictureReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ACTOR_GET_FACE_PICTURE, GetSignTaskFacePictureRes.class); + } + + /** 作废签署任务 **/ + public BaseRes abolishSignTask(CancelSignTaskCreateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TASK_ABOLISH, CancelSignTaskCreateRes.class); + } + /** 签署文档切图 **/ + public BaseRes getSignTaskOwnerSlicingTicketId(GetSignTaskSlicingDocReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_SIGN_TASK_OWNER_SLICING_TICKET_ID, GetSignTaskPicDocTicketRes.class); + } + + /** 获取图片版签署文档下载地址 **/ + public BaseRes getSignTaskOwnerPicDownloadUrl(GetSignTaskPicDocTicketReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_SIGN_TASK_OWNER_PIC_DOWNLOAD_URL, GetSignTaskDocRes.class); + } + + /** 获取参与方签署音视频下载地址 **/ + public BaseRes getAudioVideoDownloadUrl(GetActorAudioVideoReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.GET_AUDIO_VIDEO_DOWNLOAD_URL, GetActorAudioVideoRes.class); + } + + + +} diff --git a/src/com/fasc/open/api/v5_1/client/TemplateClient.java b/src/com/fasc/open/api/v5_1/client/TemplateClient.java new file mode 100644 index 0000000..4160d8a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/TemplateClient.java @@ -0,0 +1,133 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.v5_1.req.template.*; +import com.fasc.open.api.v5_1.res.template.*; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/8 16:09:38 + */ +public class TemplateClient { + private OpenApiClient openApiClient; + + public TemplateClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes getDocTemplateList(GetDocTemplateListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.DOC_TEMPLATE_GET_LIST, DocTemplateListRes.class); + } + + public BaseRes getDocTemplateDetail(DocTemplateDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.DOC_TEMPLATE_GET_DETAIL, DocTemplateDetailRes.class); + } + + public BaseRes getSignTemplateList(GetSignTemplateListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_LIST, SignTemplateListRes.class); + } + + public BaseRes getSignTemplateDetail(SignTemplateDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_DETAIL, SignTemplateDetailRes.class); + } + + public BaseRes getTemplateCreateUrl(GetTemplateCreateUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_CREATE_URL, GetTemplateCreateUrlRes.class); + } + + public BaseRes getTemplateEditUrl(GetTemplateEditUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_EDIT_URL, GetTemplateEditUrlRes.class); + } + + public BaseRes getTemplatePreviewUrl(GetTemplatePreviewUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_PREVIEW_URL, GetTemplatePreviewUrlRes.class); + } + + public BaseRes getTemplateManageUrl(GetTemplateManageUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SIGN_TEMPLATE_GET_MANAGE_URL, GetTemplateManageUrlRes.class); + } + + public BaseRes getAppDocTemplates(GetAppDocTemplateListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_TEMPLATE_GET_LIST, AppDocTemplatePageListRes.class); + } + + public BaseRes getDocTemplateDetail(GetAppDocTemplateDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_TEMPLATE_GET_DETAIL, AppDocTemplateDetailRes.class); + } + + public BaseRes getAppSignTemplates(GetAppSignTemplateListReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_SIGN_TEMPLATE_GET_LIST, AppSignTemplatePageListRes.class); + } + + public BaseRes getAppSignTemplateDetail(GetAppSignTemplateDetailReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_SIGN_TEMPLATE_GET_DETAIL, AppSignTemplateDetailRes.class); + } + + public BaseRes getAppTemplateCreateUrl(GetAppTemplateCreateUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_TEMPLATE_CREATE_GET_URL, GetAppTemplateCreateUrlRes.class); + } + + public BaseRes getAppTemplateEditUrl(GetAppTemplateEditUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_TEMPLATE_EDIT_GET_URL, GetAppTemplateEditUrlRes.class); + } + + public BaseRes getAppTemplatePreviewUrl(GetAppTemplatePreviewUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_TEMPLATE_PREVIEW_GET_URL, GetAppTemplatePreviewUrlRes.class); + } + + public BaseRes createAppField(CreateAppFieldReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_FIELD_CREATE, Void.class); + } + + public BaseRes modifyAppField(ModifyAppFieldReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_FIELD_MODIFY, Void.class); + } + + public BaseRes setAppFieldStatus(SetAppFieldStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_FIELD_SET_STATUS, Void.class); + } + + public BaseRes> getAppFieldList(GetAppFieldListReq req) throws ApiException { + return openApiClient.invokeApiList(req, OpenApiUrlConstants.APP_FIELD_GET_LIST, GetAppFieldListRes.class); + } + /**启用/停用应用文档模板 **/ + public BaseRes setAppTemplateSetStatus(SetTemplateStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_TEMPLATE_SET_STATUS, Void.class); + } + /**删除应用文档模板 **/ + public BaseRes deleteAppTemplate(DeleteAppTemplateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_TEMPLATE_DELETE, Void.class); + } + /**启用/停用应用签署任务模板 **/ + public BaseRes setAppSignTemplateStatus(SetAppSignTemplateStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_SIGN_TEMPLATE_SET_STATUS, Void.class); + } + /**删除应用文档模板 **/ + public BaseRes deleteSignAppTemplate(DeleteSignAppTemplateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.APP_DOC_SIGN_TEMPLATE_DELETE, Void.class); + } + + /**启用/停用文档模板**/ + public BaseRes setDocTemplateStatus(SetDocTemplateStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SET_DOC_TEMPLATE_STATUS, Void.class); + } + + /**删除文档模板**/ + public BaseRes deleteDocTemplate(DeleteDocTemplateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.DELETE_DOC_TEMPLATE, Void.class); + } + + /**启用/停用签署模板**/ + public BaseRes setSignTemplateStatus(SetSignTemplateStatusReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.SET_SIGN_TEMPLATE_STATUS, Void.class); + } + + /**签署模板删除**/ + public BaseRes deleteSignTemplate(DeleteSignTemplateReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.DELETE_SIGN_TEMPLATE, Void.class); + } +} diff --git a/src/com/fasc/open/api/v5_1/client/UserClient.java b/src/com/fasc/open/api/v5_1/client/UserClient.java new file mode 100644 index 0000000..21f5903 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/client/UserClient.java @@ -0,0 +1,68 @@ +package com.fasc.open.api.v5_1.client; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.constants.OpenApiUrlConstants; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.req.user.*; +import com.fasc.open.api.v5_1.res.common.EUrlRes; +import com.fasc.open.api.v5_1.res.user.*; + +/** + * @author Fadada + * 2021/10/16 16:47:06 + */ +public class UserClient { + private OpenApiClient openApiClient; + + public UserClient(OpenApiClient openApiClient) { + this.openApiClient = openApiClient; + } + + public BaseRes disable(DisableUserReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_DISABLE, Void.class); + } + + public BaseRes enable(EnableUserReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_ENABLE, Void.class); + } + + public BaseRes get(GetUserReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET, UserRes.class); + } + + public BaseRes getIdentityInfo(GetUserIdentityInfoReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_IDENTITY_INFO, UserIdentityInfoRes.class); + } + + public BaseRes unbind(UserUnbindReq req) throws ApiException{ + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_UNBIND, Void.class); + } + + public BaseRes getUserAuthUrl(GetUserAuthUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_AUTH_URL, EUrlRes.class); + } + /** OP支撑:获取实名认证流水号**/ + public BaseRes getUserIdentTransactionId(GetUserIdentTransactionIdReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_IDENT_TRANSACTION_ID, GetUserTransactionDetailRes.class); + } + + /** 获取三要素校验接口**/ + public BaseRes getUserThreeElementVerifyUrl(GetUserThreeElementVerifyUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_THREE_ELEMENT_VERIFY_URL, GetUserThreeElementVerifyUrlReq.class); + } + /** 获取四要素校验接口**/ + public BaseRes getUserFourElementVerifyUrl(GetUserFourElementVerifyUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_FOUR_ELEMENT_VERIFY_URL, GetFourElementsVerifyUrlRes.class); + } + + /** 获取要素校验身份证图片下载链接**/ + public BaseRes getUserIdcardImageDownloadUrl(GetIdCardImageDownloadUrlReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_IDCARD_IMAGE_DOWNLOAD_URL, GetIdCardImageDownloadUrlRes.class); + } + + /** 个人认证授权管理-身份证OCR**/ + public BaseRes IdCardOcr(IdCardOcrReq req) throws ApiException { + return openApiClient.invokeApi(req, OpenApiUrlConstants.USER_GET_OCR_ID_CARD, IdCardOcrRes.class); + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/CorpIdentInfoReq.java b/src/com/fasc/open/api/v5_1/req/corp/CorpIdentInfoReq.java new file mode 100644 index 0000000..dff593b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/CorpIdentInfoReq.java @@ -0,0 +1,62 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +public class CorpIdentInfoReq extends BaseBean { + private String corpName; + private String corpIdentType; + private String corpIdentNo; + private String legalRepName; + private String license; + private List corpIdentMethod; + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpIdentType() { + return corpIdentType; + } + + public void setCorpIdentType(String corpIdentType) { + this.corpIdentType = corpIdentType; + } + + public String getCorpIdentNo() { + return corpIdentNo; + } + + public void setCorpIdentNo(String corpIdentNo) { + this.corpIdentNo = corpIdentNo; + } + + public String getLegalRepName() { + return legalRepName; + } + + public void setLegalRepName(String legalRepName) { + this.legalRepName = legalRepName; + } + + public String getLicense() { + return license; + } + + public void setLicense(String license) { + this.license = license; + } + + public List getCorpIdentMethod() { + return corpIdentMethod; + } + + public void setCorpIdentMethod(List corpIdentMethod) { + this.corpIdentMethod = corpIdentMethod; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/CorpUnbindReq.java b/src/com/fasc/open/api/v5_1/req/corp/CorpUnbindReq.java new file mode 100644 index 0000000..2e33b35 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/CorpUnbindReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +public class CorpUnbindReq extends BaseReq { + + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/DisableCorpReq.java b/src/com/fasc/open/api/v5_1/req/corp/DisableCorpReq.java new file mode 100644 index 0000000..5902cf2 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/DisableCorpReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/12/6 10:20:27 + */ +public class DisableCorpReq extends BaseReq { + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/EnableCorpReq.java b/src/com/fasc/open/api/v5_1/req/corp/EnableCorpReq.java new file mode 100644 index 0000000..3a0e06d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/EnableCorpReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/12/6 10:20:27 + */ +public class EnableCorpReq extends BaseReq { + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetCorpAuthResourceUrlReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetCorpAuthResourceUrlReq.java new file mode 100644 index 0000000..848d749 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetCorpAuthResourceUrlReq.java @@ -0,0 +1,141 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/7/19 15:48 + */ +public class GetCorpAuthResourceUrlReq extends BaseReq { + private String clientCorpId; + + private String clientUserId; + + private String accountName; + + private CorpIdentInfoReq corpIdentInfo; + + private List corpNonEditableInfo; + + private OprIdentInfoReq oprIdentInfo; + + private String corpIdentType; + + private String corpName; + + private String corpIdentNo; + + private Boolean corpIdentInfoMatch; + + private List authScopes; + + private String redirectUrl; + + private List oprNonEditableInfo; + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public CorpIdentInfoReq getCorpIdentInfo() { + return corpIdentInfo; + } + + public void setCorpIdentInfo(CorpIdentInfoReq corpIdentInfo) { + this.corpIdentInfo = corpIdentInfo; + } + + public List getCorpNonEditableInfo() { + return corpNonEditableInfo; + } + + public void setCorpNonEditableInfo(List corpNonEditableInfo) { + this.corpNonEditableInfo = corpNonEditableInfo; + } + + public OprIdentInfoReq getOprIdentInfo() { + return oprIdentInfo; + } + + public void setOprIdentInfo(OprIdentInfoReq oprIdentInfo) { + this.oprIdentInfo = oprIdentInfo; + } + + public String getClientCorpId() { + return clientCorpId; + } + + public void setClientCorpId(String clientCorpId) { + this.clientCorpId = clientCorpId; + } + + public String getCorpIdentType() { + return corpIdentType; + } + + public void setCorpIdentType(String corpIdentType) { + this.corpIdentType = corpIdentType; + } + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpIdentNo() { + return corpIdentNo; + } + + public void setCorpIdentNo(String corpIdentNo) { + this.corpIdentNo = corpIdentNo; + } + + public Boolean getCorpIdentInfoMatch() { + return corpIdentInfoMatch; + } + + public void setCorpIdentInfoMatch(Boolean corpIdentInfoMatch) { + this.corpIdentInfoMatch = corpIdentInfoMatch; + } + + public List getAuthScopes() { + return authScopes; + } + + public void setAuthScopes(List authScopes) { + this.authScopes = authScopes; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public List getOprNonEditableInfo() { + return oprNonEditableInfo; + } + + public void setOprNonEditableInfo(List oprNonEditableInfo) { + this.oprNonEditableInfo = oprNonEditableInfo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentTransactionIdReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentTransactionIdReq.java new file mode 100644 index 0000000..c98c940 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentTransactionIdReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetCorpIdentTransactionIdReq extends BaseReq { + + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentityInfoReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentityInfoReq.java new file mode 100644 index 0000000..76ad080 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetCorpIdentityInfoReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * 2021/10/16 17:39:36 + */ +public class GetCorpIdentityInfoReq extends BaseReq { + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetCorpReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetCorpReq.java new file mode 100644 index 0000000..eb9243f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetCorpReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * 2021/9/11 14:07:49 + */ +public class GetCorpReq extends BaseReq { + private String openCorpId; + + private String clientCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getClientCorpId() { + return clientCorpId; + } + + public void setClientCorpId(String clientCorpId) { + this.clientCorpId = clientCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetCounterpartListReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetCounterpartListReq.java new file mode 100644 index 0000000..fabc86b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetCounterpartListReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetCounterpartListReq extends BaseReq { + private String openCorpId; + + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/corp/GetIdentifiedStatusReq.java b/src/com/fasc/open/api/v5_1/req/corp/GetIdentifiedStatusReq.java new file mode 100644 index 0000000..df3dfca --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/GetIdentifiedStatusReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author hukc + * @date 2022年11月18日 + */ +public class GetIdentifiedStatusReq extends BaseReq { + private String corpName; + private String corpIdentNo; + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpIdentNo() { + return corpIdentNo; + } + + public void setCorpIdentNo(String corpIdentNo) { + this.corpIdentNo = corpIdentNo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/corp/OprIdentInfoReq.java b/src/com/fasc/open/api/v5_1/req/corp/OprIdentInfoReq.java new file mode 100644 index 0000000..c4ddc33 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/corp/OprIdentInfoReq.java @@ -0,0 +1,62 @@ +package com.fasc.open.api.v5_1.req.corp; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +public class OprIdentInfoReq extends BaseBean { + private String userName; + private String userIdentType; + private String userIdentNo; + private String mobile; + private String bankAccountNo; + private List oprIdentMethod; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserIdentType() { + return userIdentType; + } + + public void setUserIdentType(String userIdentType) { + this.userIdentType = userIdentType; + } + + public String getUserIdentNo() { + return userIdentNo; + } + + public void setUserIdentNo(String userIdentNo) { + this.userIdentNo = userIdentNo; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getBankAccountNo() { + return bankAccountNo; + } + + public void setBankAccountNo(String bankAccountNo) { + this.bankAccountNo = bankAccountNo; + } + + public List getOprIdentMethod() { + return oprIdentMethod; + } + + public void setOprIdentMethod(List oprIdentMethod) { + this.oprIdentMethod = oprIdentMethod; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/FddFileUrl.java b/src/com/fasc/open/api/v5_1/req/doc/FddFileUrl.java new file mode 100644 index 0000000..02680a7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/FddFileUrl.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class FddFileUrl extends BaseBean { + private String fileType; + private String fddFileUrl; + private String fileName; + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public String getFddFileUrl() { + return fddFileUrl; + } + + public void setFddFileUrl(String fddFileUrl) { + this.fddFileUrl = fddFileUrl; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/FileProcessReq.java b/src/com/fasc/open/api/v5_1/req/doc/FileProcessReq.java new file mode 100644 index 0000000..b8780f6 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/FileProcessReq.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class FileProcessReq extends BaseReq { + private List fddFileUrlList; + + public List getFddFileUrlList() { + return fddFileUrlList; + } + + public void setFddFileUrlList(List fddFileUrlList) { + this.fddFileUrlList = fddFileUrlList; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/FileVerifySignReq.java b/src/com/fasc/open/api/v5_1/req/doc/FileVerifySignReq.java new file mode 100644 index 0000000..513ce2e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/FileVerifySignReq.java @@ -0,0 +1,25 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; + +public class FileVerifySignReq extends BaseReq { + + private String fileId; + private String fileHash; + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getFileHash() { + return fileHash; + } + + public void setFileHash(String fileHash) { + this.fileHash = fileHash; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/GetCompareResultUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/GetCompareResultUrlReq.java new file mode 100644 index 0000000..a9ca66c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/GetCompareResultUrlReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 15:53 + */ +public class GetCompareResultUrlReq extends BaseReq { + private OpenId initiator; + private String compareId; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getCompareId() { + return compareId; + } + + public void setCompareId(String compareId) { + this.compareId = compareId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/GetCompareUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/GetCompareUrlReq.java new file mode 100644 index 0000000..6234c35 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/GetCompareUrlReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 15:46 + */ +public class GetCompareUrlReq extends BaseReq { + private OpenId initiator; + private String originFileId; + private String targetFileId; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getOriginFileId() { + return originFileId; + } + + public void setOriginFileId(String originFileId) { + this.originFileId = originFileId; + } + + public String getTargetFileId() { + return targetFileId; + } + + public void setTargetFileId(String targetFileId) { + this.targetFileId = targetFileId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/GetExamineResultUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/GetExamineResultUrlReq.java new file mode 100644 index 0000000..c89a510 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/GetExamineResultUrlReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 16:03 + */ +public class GetExamineResultUrlReq extends BaseReq { + private OpenId initiator; + private String examineId; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getExamineId() { + return examineId; + } + + public void setExamineId(String examineId) { + this.examineId = examineId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/GetExamineUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/GetExamineUrlReq.java new file mode 100644 index 0000000..017ebc1 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/GetExamineUrlReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 16:01 + */ +public class GetExamineUrlReq extends BaseReq { + private OpenId initiator; + private String fileId; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/GetUploadUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/GetUploadUrlReq.java new file mode 100644 index 0000000..4b43fb5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/GetUploadUrlReq.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.v5_1.req.doc; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetUploadUrlReq extends BaseReq { + + private String fileType; + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/doc/UploadFileByUrlReq.java b/src/com/fasc/open/api/v5_1/req/doc/UploadFileByUrlReq.java new file mode 100644 index 0000000..7ae68f8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/doc/UploadFileByUrlReq.java @@ -0,0 +1,26 @@ +package com.fasc.open.api.v5_1.req.doc; + +import com.fasc.open.api.bean.base.BaseReq; + +public class UploadFileByUrlReq extends BaseReq { + + private String fileType; + + private String fileUrl; + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/eui/GetAppPageResourceUrlReq.java b/src/com/fasc/open/api/v5_1/req/eui/GetAppPageResourceUrlReq.java new file mode 100644 index 0000000..7ac8ca2 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/eui/GetAppPageResourceUrlReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.eui; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetAppPageResourceUrlReq extends BaseReq { + private OpenId ownerId; + private GetPageResourceUrlResource resource; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public GetPageResourceUrlResource getResource() { + return resource; + } + + public void setResource(GetPageResourceUrlResource resource) { + this.resource = resource; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/eui/GetBillUrlReq.java b/src/com/fasc/open/api/v5_1/req/eui/GetBillUrlReq.java new file mode 100644 index 0000000..4734146 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/eui/GetBillUrlReq.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.req.eui; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * @date 2021/12/15 15:03:06 + */ +public class GetBillUrlReq extends BaseReq { + private OpenId openId; + private String urlType; + private String redirectUrl; + private String clientUserId; + + public OpenId getOpenId() { + return openId; + } + + public void setOpenId(OpenId openId) { + this.openId = openId; + } + + public String getUrlType() { + return urlType; + } + + public void setUrlType(String urlType) { + this.urlType = urlType; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/eui/GetPageResourceUrlResource.java b/src/com/fasc/open/api/v5_1/req/eui/GetPageResourceUrlResource.java new file mode 100644 index 0000000..e60405e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/eui/GetPageResourceUrlResource.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.eui; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetPageResourceUrlResource extends BaseBean { + private String resourceId; + private String action; + private String params; + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/eui/GetUserPageResourceUrlReq.java b/src/com/fasc/open/api/v5_1/req/eui/GetUserPageResourceUrlReq.java new file mode 100644 index 0000000..f747237 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/eui/GetUserPageResourceUrlReq.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.eui; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetUserPageResourceUrlReq extends BaseReq { + private String openCorpId; + private String clientUserId; + private GetPageResourceUrlResource resource; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public GetPageResourceUrlResource getResource() { + return resource; + } + + public void setResource(GetPageResourceUrlResource resource) { + this.resource = resource; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/eui/OpenCorpAuthUrlReq.java b/src/com/fasc/open/api/v5_1/req/eui/OpenCorpAuthUrlReq.java new file mode 100644 index 0000000..2f73a7b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/eui/OpenCorpAuthUrlReq.java @@ -0,0 +1,51 @@ +package com.fasc.open.api.v5_1.req.eui; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + *@ClassName: OpenCorpAuthenticationUrlReq + *@Description: + *@Author: hukc@fadada.com + *@Date: 2022/3/24 15:29 + */ +public class OpenCorpAuthUrlReq extends BaseReq { + + private String clientCorpId; + private String corpName; + private String redirectUrl; + private String authScopes; + + + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getAuthScopes() { + return authScopes; + } + + public void setAuthScopes(String authScopes) { + this.authScopes = authScopes; + } + + public String getClientCorpId() { + return clientCorpId; + } + + public void setClientCorpId(String clientCorpId) { + this.clientCorpId = clientCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/CreateCorpDeptReq.java b/src/com/fasc/open/api/v5_1/req/org/CreateCorpDeptReq.java new file mode 100644 index 0000000..1debb9b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/CreateCorpDeptReq.java @@ -0,0 +1,50 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/23 15:22 + */ +public class CreateCorpDeptReq extends BaseReq { + + private String openCorpId; + + private Long parentDeptId; + + private String deptName; + + private Integer deptOrderNum; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getParentDeptId() { + return parentDeptId; + } + + public void setParentDeptId(Long parentDeptId) { + this.parentDeptId = parentDeptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Integer getDeptOrderNum() { + return deptOrderNum; + } + + public void setDeptOrderNum(Integer deptOrderNum) { + this.deptOrderNum = deptOrderNum; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/CreateCorpMemberReq.java b/src/com/fasc/open/api/v5_1/req/org/CreateCorpMemberReq.java new file mode 100644 index 0000000..e420dd3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/CreateCorpMemberReq.java @@ -0,0 +1,41 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.v5_1.res.org.EmployeeInfo; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:22 + */ +public class CreateCorpMemberReq extends BaseReq { + + private String openCorpId; + private List employeeInfos; + private Boolean notifyActiveByEmail; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getEmployeeInfos() { + return employeeInfos; + } + + public void setEmployeeInfos(List employeeInfos) { + this.employeeInfos = employeeInfos; + } + + public Boolean getNotifyActiveByEmail() { + return notifyActiveByEmail; + } + + public void setNotifyActiveByEmail(Boolean notifyActiveByEmail) { + this.notifyActiveByEmail = notifyActiveByEmail; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/DeleteCorpDeptReq.java b/src/com/fasc/open/api/v5_1/req/org/DeleteCorpDeptReq.java new file mode 100644 index 0000000..c01ffb0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/DeleteCorpDeptReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/23 15:51 + */ +public class DeleteCorpDeptReq extends BaseReq { + + private String openCorpId; + + private Long deptId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/DeleteCorpMemberReq.java b/src/com/fasc/open/api/v5_1/req/org/DeleteCorpMemberReq.java new file mode 100644 index 0000000..30a09cb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/DeleteCorpMemberReq.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:45 + */ +public class DeleteCorpMemberReq extends BaseReq { + + private String openCorpId; + private List memberIds; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getMemberIds() { + return memberIds; + } + + public void setMemberIds(List memberIds) { + this.memberIds = memberIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptDetailReq.java b/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptDetailReq.java new file mode 100644 index 0000000..7cfa6d3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptDetailReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/22 17:58 + */ +public class GetCorpDeptDetailReq extends BaseReq { + + private String openCorpId; + + private Long deptId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptListReq.java b/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptListReq.java new file mode 100644 index 0000000..c403062 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetCorpDeptListReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/22 17:33 + */ +public class GetCorpDeptListReq extends BaseReq { + + private String openCorpId; + + private Long parentDeptId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getParentDeptId() { + return parentDeptId; + } + + public void setParentDeptId(Long parentDeptId) { + this.parentDeptId = parentDeptId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberActiveUrlReq.java b/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberActiveUrlReq.java new file mode 100644 index 0000000..2099165 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberActiveUrlReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:24 + */ +public class GetCorpMemberActiveUrlReq extends BaseReq { + + private String openCorpId; + + private List memberIds; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getMemberIds() { + return memberIds; + } + + public void setMemberIds(List memberIds) { + this.memberIds = memberIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberDetailReq.java b/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberDetailReq.java new file mode 100644 index 0000000..329c4f5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetCorpMemberDetailReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/23 17:00 + */ +public class GetCorpMemberDetailReq extends BaseReq { + + private String openCorpId; + + private Long memberId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetCorpOrgManageUrlReq.java b/src/com/fasc/open/api/v5_1/req/org/GetCorpOrgManageUrlReq.java new file mode 100644 index 0000000..9dd5e09 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetCorpOrgManageUrlReq.java @@ -0,0 +1,49 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 18:12 + */ +public class GetCorpOrgManageUrlReq extends BaseReq { + + private String openCorpId; + private String clientUserId; + private List modules; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public List getModules() { + return modules; + } + + public void setModules(List modules) { + this.modules = modules; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetMemberListFilter.java b/src/com/fasc/open/api/v5_1/req/org/GetMemberListFilter.java new file mode 100644 index 0000000..24bcf39 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetMemberListFilter.java @@ -0,0 +1,36 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseBean; +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetMemberListFilter extends BaseBean { + private String roleType; + private Long deptId; + private Boolean fetchChild; + + public String getRoleType() { + return roleType; + } + + public void setRoleType(String roleType) { + this.roleType = roleType; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public Boolean getFetchChild() { + return fetchChild; + } + + public void setFetchChild(Boolean fetchChild) { + this.fetchChild = fetchChild; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/GetMemberListReq.java b/src/com/fasc/open/api/v5_1/req/org/GetMemberListReq.java new file mode 100644 index 0000000..afd87f6 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/GetMemberListReq.java @@ -0,0 +1,56 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetMemberListReq extends BaseReq { + + private String ownerId; + private String openCorpId; + private GetMemberListFilter listFilter; + private Integer listPageNo; + private Integer listPageSize; + + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(String ownerId) { + this.ownerId = ownerId; + } + + public GetMemberListFilter getListFilter() { + return listFilter; + } + + public void setListFilter(GetMemberListFilter listFilter) { + this.listFilter = listFilter; + } + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getListPageSize() { + return listPageSize; + } + + public void setListPageSize(Integer listPageSize) { + this.listPageSize = listPageSize; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/ModifyCorpDeptReq.java b/src/com/fasc/open/api/v5_1/req/org/ModifyCorpDeptReq.java new file mode 100644 index 0000000..1dad561 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/ModifyCorpDeptReq.java @@ -0,0 +1,50 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/23 15:23 + */ +public class ModifyCorpDeptReq extends BaseReq { + + private String openCorpId; + + private Long deptId; + + private String deptName; + + private Integer deptOrderNum; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Integer getDeptOrderNum() { + return deptOrderNum; + } + + public void setDeptOrderNum(Integer deptOrderNum) { + this.deptOrderNum = deptOrderNum; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/ModifyCorpMemberReq.java b/src/com/fasc/open/api/v5_1/req/org/ModifyCorpMemberReq.java new file mode 100644 index 0000000..f32ade7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/ModifyCorpMemberReq.java @@ -0,0 +1,76 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:37 + */ +public class ModifyCorpMemberReq extends BaseReq { + + private String openCorpId; + private Long memberId; + private String memberName; + private String internalIdentifier; + private String memberEmail; + private String memberMobile; + private List memberDeptIds; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public String getMemberMobile() { + return memberMobile; + } + + public void setMemberMobile(String memberMobile) { + this.memberMobile = memberMobile; + } + + public List getMemberDeptIds() { + return memberDeptIds; + } + + public void setMemberDeptIds(List memberDeptIds) { + this.memberDeptIds = memberDeptIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberDeptReq.java b/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberDeptReq.java new file mode 100644 index 0000000..f2fd478 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberDeptReq.java @@ -0,0 +1,49 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:39 + */ +public class SetCorpMemberDeptReq extends BaseReq { + + private String openCorpId; + private List memberIds; + private List memberDeptIds; + private String model; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getMemberIds() { + return memberIds; + } + + public void setMemberIds(List memberIds) { + this.memberIds = memberIds; + } + + public List getMemberDeptIds() { + return memberDeptIds; + } + + public void setMemberDeptIds(List memberDeptIds) { + this.memberDeptIds = memberDeptIds; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberStatusReq.java b/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberStatusReq.java new file mode 100644 index 0000000..8fb24e1 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/org/SetCorpMemberStatusReq.java @@ -0,0 +1,40 @@ +package com.fasc.open.api.v5_1.req.org; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:42 + */ +public class SetCorpMemberStatusReq extends BaseReq { + + private String openCorpId; + private List memberIds; + private String memberStatus; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getMemberIds() { + return memberIds; + } + + public void setMemberIds(List memberIds) { + this.memberIds = memberIds; + } + + public String getMemberStatus() { + return memberStatus; + } + + public void setMemberStatus(String memberStatus) { + this.memberStatus = memberStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/CancelSealGrantReq.java b/src/com/fasc/open/api/v5_1/req/seal/CancelSealGrantReq.java new file mode 100644 index 0000000..eacd302 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/CancelSealGrantReq.java @@ -0,0 +1,39 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @Date: 2022/10/8 + */ + +public class CancelSealGrantReq extends BaseReq { + + private String openCorpId; + private Long sealId; + private Long memberId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetAppointedSealUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetAppointedSealUrlReq.java new file mode 100644 index 0000000..114ad54 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetAppointedSealUrlReq.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: zhupintian + * @Date: 2022/10/8 + */ +public class GetAppointedSealUrlReq extends BaseReq { + + private String openCorpId; + private Long sealId; + private String clientUserId; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealFreeSignUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealFreeSignUrlReq.java new file mode 100644 index 0000000..d23f4ef --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealFreeSignUrlReq.java @@ -0,0 +1,66 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:52 + */ +public class GetPersonalSealFreeSignUrlReq extends BaseReq { + private String openUserId; + private List sealIds; + private String businessId; + private String email; + private String redirectUrl; + private String expiresTime; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } + + public List getSealIds() { + return sealIds; + } + + public void setSealIds(List sealIds) { + this.sealIds = sealIds; + } + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealListReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealListReq.java new file mode 100644 index 0000000..76e0da8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetPersonalSealListReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:43 + */ +public class GetPersonalSealListReq extends BaseReq { + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealCreateUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealCreateUrlReq.java new file mode 100644 index 0000000..e41198b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealCreateUrlReq.java @@ -0,0 +1,74 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealCreateUrlReq extends BaseReq { + + private String openCorpId; + private String sealName; + private String categoryType; + private String sealTag; + private String createSerialNo; + private String clientUserId; + private String redirectUrl; + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getSealTag() { + return sealTag; + } + + public void setSealTag(String sealTag) { + this.sealTag = sealTag; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealDetailReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealDetailReq.java new file mode 100644 index 0000000..a8e0937 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealDetailReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.seal; + + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealDetailReq extends BaseReq { + + private String openCorpId; + private Long sealId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealFreeSignUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealFreeSignUrlReq.java new file mode 100644 index 0000000..49b0af7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealFreeSignUrlReq.java @@ -0,0 +1,75 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @Author: zfc + * @Date: 2022/11/30 + */ +public class GetSealFreeSignUrlReq extends BaseReq { + private String openCorpId; + private List sealIds; + private String businessId; + private String email; + private String clientUserId; + private String redirectUrl; + private String expiresTime; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public List getSealIds() { + return sealIds; + } + + public void setSealIds(List sealIds) { + this.sealIds = sealIds; + } + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealGrantUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealGrantUrlReq.java new file mode 100644 index 0000000..33e4f9c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealGrantUrlReq.java @@ -0,0 +1,91 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealGrantUrlReq extends BaseReq { + + private String openCorpId; + private Long sealId; + private MemberInfo memberInfo; + private String clientUserId; + private String redirectUrl; + + public static class MemberInfo { + private List memberIds; + private String grantStartTime; + private String grantEndTime; + + public List getMemberIds() { + return memberIds; + } + + public void setMemberIds(List memberIds) { + this.memberIds = memberIds; + } + + public String getGrantStartTime() { + return grantStartTime; + } + + public void setGrantStartTime(String grantStartTime) { + this.grantStartTime = grantStartTime; + } + + public String getGrantEndTime() { + return grantEndTime; + } + + public void setGrantEndTime(String grantEndTime) { + this.grantEndTime = grantEndTime; + } + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public MemberInfo getMemberInfo() { + return memberInfo; + } + + public void setMemberInfo(MemberInfo memberInfo) { + this.memberInfo = memberInfo; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} + + + diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealListFilter.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealListFilter.java new file mode 100644 index 0000000..5d69c0c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealListFilter.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealListFilter extends BaseBean { + private List categoryType; + + public List getCategoryType() { + return categoryType; + } + + public void setCategoryType(List categoryType) { + this.categoryType = categoryType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealListReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealListReq.java new file mode 100644 index 0000000..4c7d716 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealListReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealListReq extends BaseReq { + + private String ownerId; + private String openCorpId; + private GetSealListFilter listFilter; + @Deprecated + public String getOwnerId() { + return ownerId; + } + @Deprecated + public void setOwnerId(String ownerId) { + this.ownerId = ownerId; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public GetSealListFilter getListFilter() { + return listFilter; + } + + public void setListFilter(GetSealListFilter listFilter) { + this.listFilter = listFilter; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealManageUrlReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealManageUrlReq.java new file mode 100644 index 0000000..180e6d9 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealManageUrlReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealManageUrlReq extends BaseReq { + + private String openCorpId; + private String clientUserId; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListFilter.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListFilter.java new file mode 100644 index 0000000..aab13de --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListFilter.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealUserListFilter extends BaseBean { + private List categoryType; + + public List getCategoryType() { + return categoryType; + } + + public void setCategoryType(List categoryType) { + this.categoryType = categoryType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListReq.java new file mode 100644 index 0000000..5cc453d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealUserListReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealUserListReq extends BaseReq { + + private String ownerId; + private String openCorpId; + private GetSealUserListFilter listFilter; + + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(String ownerId) { + this.ownerId = ownerId; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public GetSealUserListFilter getListFilter() { + return listFilter; + } + + public void setListFilter(GetSealUserListFilter listFilter) { + this.listFilter = listFilter; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetSealVerifyListReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetSealVerifyListReq.java new file mode 100644 index 0000000..3f2a776 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetSealVerifyListReq.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealVerifyListReq extends BaseReq { + + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/GetUserSealListReq.java b/src/com/fasc/open/api/v5_1/req/seal/GetUserSealListReq.java new file mode 100644 index 0000000..f945101 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/GetUserSealListReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2022/11/24 13:55 + */ +public class GetUserSealListReq extends BaseReq { + + private String openCorpId; + private Long memberId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/ModifySealReq.java b/src/com/fasc/open/api/v5_1/req/seal/ModifySealReq.java new file mode 100644 index 0000000..8bfeca9 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/ModifySealReq.java @@ -0,0 +1,57 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ + +public class ModifySealReq extends BaseReq { + + private String openCorpId; + private Long sealId; + private String sealName; + private String sealTag; + private String categoryType; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getSealTag() { + return sealTag; + } + + public void setSealTag(String sealTag) { + this.sealTag = sealTag; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/SealDeleteReq.java b/src/com/fasc/open/api/v5_1/req/seal/SealDeleteReq.java new file mode 100644 index 0000000..ff70527 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/SealDeleteReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: zhupintian + * @Date: 2022/10/8 + */ +public class SealDeleteReq extends BaseReq { + + private String openCorpId; + private Long sealId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/seal/SetSealStatusReq.java b/src/com/fasc/open/api/v5_1/req/seal/SetSealStatusReq.java new file mode 100644 index 0000000..fc9b54e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/seal/SetSealStatusReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.seal; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @Author: zhupintian + * @Date: 2022/10/8 + */ +public class SetSealStatusReq extends BaseReq { + + private String openCorpId; + private Long sealId; + private String sealStatus; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealStatus() { + return sealStatus; + } + + public void setSealStatus(String sealStatus) { + this.sealStatus = sealStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/ActorAttachInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/ActorAttachInfo.java new file mode 100644 index 0000000..777ff3c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/ActorAttachInfo.java @@ -0,0 +1,24 @@ +package com.fasc.open.api.v5_1.req.signtask; + +public class ActorAttachInfo { + + private String actorAttachName; + + private Boolean required = false; + + public String getActorAttachName() { + return actorAttachName; + } + + public void setActorAttachName(String actorAttachName) { + this.actorAttachName = actorAttachName; + } + + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddActorSignConfigInfoReq.java b/src/com/fasc/open/api/v5_1/req/signtask/AddActorSignConfigInfoReq.java new file mode 100644 index 0000000..b020e34 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddActorSignConfigInfoReq.java @@ -0,0 +1,13 @@ +package com.fasc.open.api.v5_1.req.signtask; + +public class AddActorSignConfigInfoReq extends SignConfigInfoBase{ + private Integer orderNo; + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddActorsInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsInfo.java new file mode 100644 index 0000000..8907c61 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsInfo.java @@ -0,0 +1,53 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class AddActorsInfo extends BaseBean { + + private Actor actor; + + private List fillFields; + + private List signFields; + + private AddSignConfigInfo signConfigInfo; + + public Actor getActor() { + return actor; + } + + public void setActor(Actor actor) { + this.actor = actor; + } + + public List getFillFields() { + return fillFields; + } + + public void setFillFields(List fillFields) { + this.fillFields = fillFields; + } + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } + + public AddSignConfigInfo getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(AddSignConfigInfo signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddActorsReq.java b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsReq.java new file mode 100644 index 0000000..038e535 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsReq.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class AddActorsReq extends SignTaskBaseReq { + + private List actors; + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddActorsTempInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsTempInfo.java new file mode 100644 index 0000000..c8ee854 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddActorsTempInfo.java @@ -0,0 +1,54 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class AddActorsTempInfo extends BaseBean { + + private Actor actor; + + private List fillFields; + + private List signFields; + + private TemplateSignConfigInfoReq signConfigInfo; + + + public Actor getActor() { + return actor; + } + + public void setActor(Actor actor) { + this.actor = actor; + } + + public List getFillFields() { + return fillFields; + } + + public void setFillFields(List fillFields) { + this.fillFields = fillFields; + } + + public TemplateSignConfigInfoReq getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(TemplateSignConfigInfoReq signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddAttachInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddAttachInfo.java new file mode 100644 index 0000000..59c47f0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddAttachInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 16:23:15 + */ +public class AddAttachInfo extends BaseBean { + private String attachId; + private String attachName; + private String attachFileId; + + public String getAttachId() { + return attachId; + } + + public void setAttachId(String attachId) { + this.attachId = attachId; + } + + public String getAttachName() { + return attachName; + } + + public void setAttachName(String attachName) { + this.attachName = attachName; + } + + public String getAttachFileId() { + return attachFileId; + } + + public void setAttachFileId(String attachFileId) { + this.attachFileId = attachFileId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddAttachReq.java b/src/com/fasc/open/api/v5_1/req/signtask/AddAttachReq.java new file mode 100644 index 0000000..112dd15 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddAttachReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class AddAttachReq extends SignTaskBaseReq { + private List attachs; + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddDocInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddDocInfo.java new file mode 100644 index 0000000..da68035 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddDocInfo.java @@ -0,0 +1,58 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:24:04 + */ +public class AddDocInfo extends BaseBean { + private String docId; + private String docName; + private String docFileId; + private String docTemplateId; + private List docFields; + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } + + public String getDocFileId() { + return docFileId; + } + + public void setDocFileId(String docFileId) { + this.docFileId = docFileId; + } + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddDocReq.java b/src/com/fasc/open/api/v5_1/req/signtask/AddDocReq.java new file mode 100644 index 0000000..0ab5b7a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddDocReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class AddDocReq extends SignTaskBaseReq { + private List docs; + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddFieldInfo.java new file mode 100644 index 0000000..cbe6534 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddFieldInfo.java @@ -0,0 +1,31 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; + +import java.util.List; + +/** + * @author Fadada + * @date 2021/12/6 11:30:58 + */ +public class AddFieldInfo extends BaseBean { + private String docId; + private List docFields; + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddFieldReq.java b/src/com/fasc/open/api/v5_1/req/signtask/AddFieldReq.java new file mode 100644 index 0000000..a5956cf --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddFieldReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * @date 2021/12/6 11:30:13 + */ +public class AddFieldReq extends SignTaskBaseReq { + private List fields; + private String actorId; + + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorFieldInfo.java new file mode 100644 index 0000000..b6b7bb5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorFieldInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/23 17:35:52 + */ +public class AddFillActorFieldInfo extends BaseBean { + private Integer fieldDocId; + private String fieldId; + private String fieldName; + private String fieldValue; + + public Integer getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(Integer fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorInfo.java new file mode 100644 index 0000000..e9dedb8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddFillActorInfo.java @@ -0,0 +1,40 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:35:16 + */ +public class AddFillActorInfo extends BaseBean { + private Actor fillActor; + private Integer orderNo; + private List actorFields; + + public Actor getFillActor() { + return fillActor; + } + + public void setFillActor(Actor fillActor) { + this.fillActor = fillActor; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public List getActorFields() { + return actorFields; + } + + public void setActorFields(List actorFields) { + this.actorFields = actorFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddFillFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddFillFieldInfo.java new file mode 100644 index 0000000..077ed3b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddFillFieldInfo.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class AddFillFieldInfo extends BaseBean { + + private String fieldDocId; + private String fieldId; + private String fieldName; + private String fieldValue; + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorFieldInfo.java new file mode 100644 index 0000000..9467171 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorFieldInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/23 17:35:58 + */ +public class AddSignActorFieldInfo extends BaseBean { + private Integer fieldDocId; + private String fieldId; + private String fieldName; + + public Integer getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(Integer fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorInfo.java new file mode 100644 index 0000000..1d4eec3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignActorInfo.java @@ -0,0 +1,85 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:35:26 + */ +public class AddSignActorInfo extends BaseBean { + private Actor signActor; + private Integer orderNo; + private Boolean blockHere; + private Boolean requestVerifyFree; + private List verifyMethods; + private Boolean corpOperatorSign; + private String signerSignMethod; + private List actorFields; + + public Actor getSignActor() { + return signActor; + } + + public void setSignActor(Actor signActor) { + this.signActor = signActor; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getCorpOperatorSign() { + return corpOperatorSign; + } + + public void setCorpOperatorSign(Boolean corpOperatorSign) { + this.corpOperatorSign = corpOperatorSign; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public List getActorFields() { + return actorFields; + } + + public void setActorFields(List actorFields) { + this.actorFields = actorFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfo.java new file mode 100644 index 0000000..661a279 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfo.java @@ -0,0 +1,139 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class AddSignConfigInfo extends BaseBean { + + private Integer orderNo; + private Boolean blockHere; + private Boolean requestVerifyFree; + private String signerSignMethod; + private List verifyMethods; + private Boolean requestMemberSign; + private Boolean joinByLink; + private Boolean readingToEnd; + private String readingTime; + private String certType; + private Boolean identifiedView; + private Boolean resizeSeal; + private List audioVideoInfo; + private List actorAttachInfos; + + public Boolean getRequestMemberSign() { + return requestMemberSign; + } + + public void setRequestMemberSign(Boolean requestMemberSign) { + this.requestMemberSign = requestMemberSign; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getJoinByLink() { + return joinByLink; + } + + public void setJoinByLink(Boolean joinByLink) { + this.joinByLink = joinByLink; + } + + public Boolean getReadingToEnd() { + return readingToEnd; + } + + public void setReadingToEnd(Boolean readingToEnd) { + this.readingToEnd = readingToEnd; + } + + public String getReadingTime() { + return readingTime; + } + + public void setReadingTime(String readingTime) { + this.readingTime = readingTime; + } + + public Boolean getIdentifiedView() { + return identifiedView; + } + + public void setIdentifiedView(Boolean identifiedView) { + this.identifiedView = identifiedView; + } + + public Boolean getResizeSeal() { + return resizeSeal; + } + + public void setResizeSeal(Boolean resizeSeal) { + this.resizeSeal = resizeSeal; + } + + public String getCertType() { + return certType; + } + + public void setCertType(String certType) { + this.certType = certType; + } + + public List getAudioVideoInfo() { + return audioVideoInfo; + } + + public void setAudioVideoInfo(List audioVideoInfo) { + this.audioVideoInfo = audioVideoInfo; + } + + public List getActorAttachInfos() { + return actorAttachInfos; + } + + public void setActorAttachInfos(List actorAttachInfos) { + this.actorAttachInfos = actorAttachInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfoWithTemp.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfoWithTemp.java new file mode 100644 index 0000000..3030c26 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigInfoWithTemp.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class AddSignConfigInfoWithTemp extends BaseBean { + + private Boolean blockHere; + private Boolean requestVerifyFree; + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigTempInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigTempInfo.java new file mode 100644 index 0000000..a4b4e7c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignConfigTempInfo.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class AddSignConfigTempInfo extends BaseBean { + + private Boolean blockHere; + private Boolean requestVerifyFree; + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/AddSignFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/AddSignFieldInfo.java new file mode 100644 index 0000000..185be96 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/AddSignFieldInfo.java @@ -0,0 +1,64 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class AddSignFieldInfo extends BaseBean { + private String fieldDocId; + private String fieldId; + private String fieldName; + private Long sealId; + private Boolean moveable; + private String createSerialNo; + + public Boolean getMoveable() { + return moveable; + } + + public void setMoveable(Boolean moveable) { + this.moveable = moveable; + } + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/BlockReq.java b/src/com/fasc/open/api/v5_1/req/signtask/BlockReq.java new file mode 100644 index 0000000..b1f361b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/BlockReq.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class BlockReq extends SignTaskBaseReq { + + private String actorId; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/BusinessScene.java b/src/com/fasc/open/api/v5_1/req/signtask/BusinessScene.java new file mode 100644 index 0000000..af03a50 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/BusinessScene.java @@ -0,0 +1,24 @@ +package com.fasc.open.api.v5_1.req.signtask; + +public class BusinessScene { + + private String businessId; + + private String transReferenceId; + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getTransReferenceId() { + return transReferenceId; + } + + public void setTransReferenceId(String transReferenceId) { + this.transReferenceId = transReferenceId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/BusinessSceneInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/BusinessSceneInfo.java new file mode 100644 index 0000000..85a1068 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/BusinessSceneInfo.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 11:09:38 + */ +public class BusinessSceneInfo extends BaseBean { + private String businessId; + private String transReferenceId; + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getTransReferenceId() { + return transReferenceId; + } + + public void setTransReferenceId(String transReferenceId) { + this.transReferenceId = transReferenceId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CancelSignTaskCreateReq.java b/src/com/fasc/open/api/v5_1/req/signtask/CancelSignTaskCreateReq.java new file mode 100644 index 0000000..c20e6a9 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CancelSignTaskCreateReq.java @@ -0,0 +1,406 @@ +package com.fasc.open.api.v5_1.req.signtask; + + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.ActorCorpMember; +import com.fasc.open.api.bean.common.Field; +import com.fasc.open.api.bean.common.Notification; + +import java.util.List; + +public class CancelSignTaskCreateReq extends BaseReq { + + private String signTaskId; + + private AbolishedInitiator abolishedInitiator; + + private String docSource; + + private String reason; + + private List docs; + + private List actors; + + private Boolean autoStart; + + private String signTaskSubject; + + private String expiresTime; + + private Long businessTypeId; + + private String businessCode; + + private String catalogId; + + private BusinessScene businessScene; + + private String certCAOrg; + + public static class AbolishedInitiator { + private String initiatorId; + private String actorId; + + public String getInitiatorId() { + return initiatorId; + } + + public void setInitiatorId(String initiatorId) { + this.initiatorId = initiatorId; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + } + + public static class CancelDoc { + private String docId; + + private String docName; + + private String docFileId; + + private List docFields; + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } + + public String getDocFileId() { + return docFileId; + } + + public void setDocFileId(String docFileId) { + this.docFileId = docFileId; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } + } + + public static class CancelSignTaskActor { + private CancelActor actor; + + private List signFields; + + private CancelSignConfigInfo signConfigInfo; + + public CancelActor getActor() { + return actor; + } + + public void setActor(CancelActor actor) { + this.actor = actor; + } + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } + + public CancelSignConfigInfo getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(CancelSignConfigInfo signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } + } + + public static class CancelActor { + private String actorId; + + private String actorType; + + private String actorName; + + private List permissions; + + private String actorOpenId; + + private String actorFDDId; + + private List actorCorpMembers; + + private String identNameForMatch; + + private String certNoForMatch; + + private String certType; + + private String accountName; + + private Notification notification; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public String getActorName() { + return actorName; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public String getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(String actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public String getActorFDDId() { + return actorFDDId; + } + + public void setActorFDDId(String actorFDDId) { + this.actorFDDId = actorFDDId; + } + + public List getActorCorpMembers() { + return actorCorpMembers; + } + + public void setActorCorpMembers(List actorCorpMembers) { + this.actorCorpMembers = actorCorpMembers; + } + + public String getIdentNameForMatch() { + return identNameForMatch; + } + + public void setIdentNameForMatch(String identNameForMatch) { + this.identNameForMatch = identNameForMatch; + } + + public String getCertNoForMatch() { + return certNoForMatch; + } + + public void setCertNoForMatch(String certNoForMatch) { + this.certNoForMatch = certNoForMatch; + } + + public Notification getNotification() { + return notification; + } + + public void setNotification(Notification notification) { + this.notification = notification; + } + + public String getCertType() { + return certType; + } + + public void setCertType(String certType) { + this.certType = certType; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + } + + public static class CancelSignActorField { + + private String fieldDocId; + + private String fieldId; + + private Long sealId; + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + } + + public static class CancelSignConfigInfo { + private Boolean requestVerifyFree; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public AbolishedInitiator getAbolishedInitiator() { + return abolishedInitiator; + } + + public void setAbolishedInitiator(AbolishedInitiator abolishedInitiator) { + this.abolishedInitiator = abolishedInitiator; + } + + public String getDocSource() { + return docSource; + } + + public void setDocSource(String docSource) { + this.docSource = docSource; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } + + public Boolean getAutoStart() { + return autoStart; + } + + public void setAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } + + public Long getBusinessTypeId() { + return businessTypeId; + } + + public void setBusinessTypeId(Long businessTypeId) { + this.businessTypeId = businessTypeId; + } + + public String getCatalogId() { + return catalogId; + } + + public void setCatalogId(String catalogId) { + this.catalogId = catalogId; + } + + public BusinessScene getBusinessScene() { + return businessScene; + } + + public void setBusinessScene(BusinessScene businessScene) { + this.businessScene = businessScene; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getBusinessCode() { + return businessCode; + } + + public void setBusinessCode(String businessCode) { + this.businessCode = businessCode; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateAttachInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateAttachInfo.java new file mode 100644 index 0000000..91ee0a3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateAttachInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/18 13:33:29 + */ +public class CreateAttachInfo extends BaseBean { + private Integer attachId; + private String attachName; + private String attachFileId; + + public Integer getAttachId() { + return attachId; + } + + public void setAttachId(Integer attachId) { + this.attachId = attachId; + } + + public String getAttachName() { + return attachName; + } + + public void setAttachName(String attachName) { + this.attachName = attachName; + } + + public String getAttachFileId() { + return attachFileId; + } + + public void setAttachFileId(String attachFileId) { + this.attachFileId = attachFileId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskBaseReq.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskBaseReq.java new file mode 100644 index 0000000..104a7d4 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskBaseReq.java @@ -0,0 +1,119 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/13 11:40:45 + */ +public class CreateSignTaskBaseReq extends BaseReq { + private String signTaskSubject; + private String signDocType; + private OpenId initiator; + private String expiresTime; + private Boolean autoStart; + private Boolean autoFillFinalize; + private String certCAOrg; + private BusinessSceneInfo businessScene; + private Boolean autoFinish; + private String catalogId; + private Long businessTypeId; + private String businessCode; + + public String getSignDocType() { + return signDocType; + } + + public void setSignDocType(String signDocType) { + this.signDocType = signDocType; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } + + public Boolean getAutoFillFinalize() { + return autoFillFinalize; + } + + public void setAutoFillFinalize(Boolean autoFillFinalize) { + this.autoFillFinalize = autoFillFinalize; + } + + public BusinessSceneInfo getBusinessScene() { + return businessScene; + } + + public void setBusinessScene(BusinessSceneInfo businessScene) { + this.businessScene = businessScene; + } + + public Boolean getAutoStart() { + return autoStart; + } + + public void setAutoStart(Boolean autoStart) { + this.autoStart = autoStart; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public Boolean getAutoFinish() { + return autoFinish; + } + + public void setAutoFinish(Boolean autoFinish) { + this.autoFinish = autoFinish; + } + + public String getCatalogId() { + return catalogId; + } + + public void setCatalogId(String catalogId) { + this.catalogId = catalogId; + } + + public Long getBusinessTypeId() { + return businessTypeId; + } + + public void setBusinessTypeId(Long businessTypeId) { + this.businessTypeId = businessTypeId; + } + + public String getBusinessCode() { + return businessCode; + } + + public void setBusinessCode(String businessCode) { + this.businessCode = businessCode; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskReq.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskReq.java new file mode 100644 index 0000000..42b6130 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateSignTaskReq.java @@ -0,0 +1,56 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 11:40:45 + */ +public class CreateSignTaskReq extends CreateSignTaskBaseReq { + private Boolean signInOrder; + private List docs; + private List attachs; + private List actors; + private DocSignConfigInfoReq signConfigInfo; + + public DocSignConfigInfoReq getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(DocSignConfigInfoReq signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } + + public Boolean getSignInOrder() { + return signInOrder; + } + + public void setSignInOrder(Boolean signInOrder) { + this.signInOrder = signInOrder; + } + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFieldValueInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFieldValueInfo.java new file mode 100644 index 0000000..ad4a530 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFieldValueInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 17:10:56 + */ +public class CreateWithTemplateFieldValueInfo extends BaseBean { + private Integer fieldDocId; + private String fieldId; + private String fieldName; + private String fieldValue; + + public Integer getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(Integer fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFillActorInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFillActorInfo.java new file mode 100644 index 0000000..fcde82c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateFillActorInfo.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 13:38:56 + */ +public class CreateWithTemplateFillActorInfo extends BaseBean { + private Actor fillActor; + private List actorFields; + + public Actor getFillActor() { + return fillActor; + } + + public void setFillActor(Actor fillActor) { + this.fillActor = fillActor; + } + + public List getActorFields() { + return actorFields; + } + + public void setActorFields(List actorFields) { + this.actorFields = actorFields; + } +} + diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateReq.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateReq.java new file mode 100644 index 0000000..d3cd2c7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class CreateWithTemplateReq extends CreateSignTaskBaseReq { + private String signTemplateId; + private List actors; + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateSignActorInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateSignActorInfo.java new file mode 100644 index 0000000..da830c0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/CreateWithTemplateSignActorInfo.java @@ -0,0 +1,49 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:35:26 + */ +public class CreateWithTemplateSignActorInfo extends BaseBean { + private Actor signActor; + private Boolean blockHere; + private Boolean requestVerifyFree; + private List verifyMethods; + + public Actor getSignActor() { + return signActor; + } + + public void setSignActor(Actor signActor) { + this.signActor = signActor; + } + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteActorReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteActorReq.java new file mode 100644 index 0000000..1b17159 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteActorReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class DeleteActorReq extends SignTaskBaseReq { + private List actorIds; + + public List getActorIds() { + return actorIds; + } + + public void setActorIds(List actorIds) { + this.actorIds = actorIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteAttachReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteAttachReq.java new file mode 100644 index 0000000..eddffa2 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteAttachReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class DeleteAttachReq extends SignTaskBaseReq { + private List attachIds; + + public List getAttachIds() { + return attachIds; + } + + public void setAttachIds(List attachIds) { + this.attachIds = attachIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteDocReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteDocReq.java new file mode 100644 index 0000000..8883806 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteDocReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class DeleteDocReq extends SignTaskBaseReq { + private List docIds; + + public List getDocIds() { + return docIds; + } + + public void setDocIds(List docIds) { + this.docIds = docIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldInfo.java new file mode 100644 index 0000000..c3eb662 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldInfo.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * @date 2021/12/6 11:30:58 + */ +public class DeleteFieldInfo extends BaseBean { + private String docId; + private List fieldIds; + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public List getFieldIds() { + return fieldIds; + } + + public void setFieldIds(List fieldIds) { + this.fieldIds = fieldIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldReq.java new file mode 100644 index 0000000..70fdd00 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteFieldReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * @date 2021/12/6 11:30:13 + */ +public class DeleteFieldReq extends SignTaskBaseReq { + private List fields; + + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DeleteSignTaskReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DeleteSignTaskReq.java new file mode 100644 index 0000000..80b7ff3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DeleteSignTaskReq.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.v5_1.req.signtask; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class DeleteSignTaskReq extends BaseReq { + + private String signTaskId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DocFieldValueInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/DocFieldValueInfo.java new file mode 100644 index 0000000..1c243ba --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DocFieldValueInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/6 14:24:34 + */ +public class DocFieldValueInfo extends BaseBean { + private String docId; + private String fieldId; + private String fieldKey; + private String fieldValue; + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DocSignConfigInfoReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DocSignConfigInfoReq.java new file mode 100644 index 0000000..b69e3dc --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DocSignConfigInfoReq.java @@ -0,0 +1,7 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +public class DocSignConfigInfoReq extends SignConfigInfoBase{ + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/DownloadFilesReq.java b/src/com/fasc/open/api/v5_1/req/signtask/DownloadFilesReq.java new file mode 100644 index 0000000..95b3a01 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/DownloadFilesReq.java @@ -0,0 +1,26 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author Fadada + * 2021/9/11 16:10:08 + */ +public class DownloadFilesReq extends SignTaskBaseReq { + private Integer id; + private String fileType; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/FillFieldValuesReq.java b/src/com/fasc/open/api/v5_1/req/signtask/FillFieldValuesReq.java new file mode 100644 index 0000000..ed73218 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/FillFieldValuesReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class FillFieldValuesReq extends SignTaskBaseReq { + private List docFieldValues; + + public List getDocFieldValues() { + return docFieldValues; + } + + public void setDocFieldValues(List docFieldValues) { + this.docFieldValues = docFieldValues; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/FinishSignTaskReq.java b/src/com/fasc/open/api/v5_1/req/signtask/FinishSignTaskReq.java new file mode 100644 index 0000000..92a028a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/FinishSignTaskReq.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +public class FinishSignTaskReq extends BaseReq { + private String signTaskId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetActorAudioVideoReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetActorAudioVideoReq.java new file mode 100644 index 0000000..a6a8b8a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetActorAudioVideoReq.java @@ -0,0 +1,25 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetActorAudioVideoReq extends BaseReq { + + private String signTaskId; + private String actorId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetApprovalInfoReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetApprovalInfoReq.java new file mode 100644 index 0000000..32fc26e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetApprovalInfoReq.java @@ -0,0 +1,8 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class GetApprovalInfoReq extends SignTaskBaseReq{ +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetBatchSignUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetBatchSignUrlReq.java new file mode 100644 index 0000000..efddd03 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetBatchSignUrlReq.java @@ -0,0 +1,69 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +import java.util.List; + +public class GetBatchSignUrlReq extends BaseReq { + + private OpenId ownerId; + + private Long memberId; + + private String clientUserId; + + private List signTaskIds; + + private String redirectUrl; + + private String redirectMiniAppUrl; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public List getSignTaskIds() { + return signTaskIds; + } + + public void setSignTaskIds(List signTaskIds) { + this.signTaskIds = signTaskIds; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getRedirectMiniAppUrl() { + return redirectMiniAppUrl; + } + + public void setRedirectMiniAppUrl(String redirectMiniAppUrl) { + this.redirectMiniAppUrl = redirectMiniAppUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetDownloadEvidenceReportUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetDownloadEvidenceReportUrlReq.java new file mode 100644 index 0000000..847693b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetDownloadEvidenceReportUrlReq.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetDownloadEvidenceReportUrlReq extends BaseReq { + private String signTaskId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetFieldUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetFieldUrlReq.java new file mode 100644 index 0000000..32b410e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetFieldUrlReq.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.common.UserIdentInfo; +import com.fasc.open.api.bean.common.UserInfoExtend; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class GetFieldUrlReq extends SignTaskBaseReq { + private String openUserId; + private UserIdentInfo userIdentInfo; + private UserInfoExtend userInfoExtend; + private String redirectUrl; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } + + public UserIdentInfo getUserIdentInfo() { + return userIdentInfo; + } + + public void setUserIdentInfo(UserIdentInfo userIdentInfo) { + this.userIdentInfo = userIdentInfo; + } + + public UserInfoExtend getUserInfoExtend() { + return userInfoExtend; + } + + public void setUserInfoExtend(UserInfoExtend userInfoExtend) { + this.userInfoExtend = userInfoExtend; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerDownloadUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerDownloadUrlReq.java new file mode 100644 index 0000000..eb20672 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerDownloadUrlReq.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class GetOwnerDownloadUrlReq extends SignTaskBaseReq { + private OpenId ownerId; + private String id; + private String fileType; + private String customName; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public String getCustomName() { + return customName; + } + + public void setCustomName(String customName) { + this.customName = customName; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerSignTaskListReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerSignTaskListReq.java new file mode 100644 index 0000000..f1550d8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetOwnerSignTaskListReq.java @@ -0,0 +1,57 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class GetOwnerSignTaskListReq extends BaseReq { + + private OpenId ownerId; + private String ownerRole; + private SignTaskListFilter listFilter; + private Integer listPageNo; + private Integer listPageSize; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public String getOwnerRole() { + return ownerRole; + } + + public void setOwnerRole(String ownerRole) { + this.ownerRole = ownerRole; + } + + public SignTaskListFilter getListFilter() { + return listFilter; + } + + public void setListFilter(SignTaskListFilter listFilter) { + this.listFilter = listFilter; + } + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getListPageSize() { + return listPageSize; + } + + public void setListPageSize(Integer listPageSize) { + this.listPageSize = listPageSize; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskBusinessTypeListReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskBusinessTypeListReq.java new file mode 100644 index 0000000..cfdc616 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskBusinessTypeListReq.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.v5_1.req.signtask; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetSignTaskBusinessTypeListReq extends BaseReq { + + private String openCorpId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskFacePictureReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskFacePictureReq.java new file mode 100644 index 0000000..80b5d88 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskFacePictureReq.java @@ -0,0 +1,26 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetSignTaskFacePictureReq extends BaseReq { + + private String signTaskId; + + private String actorId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskPicDocTicketReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskPicDocTicketReq.java new file mode 100644 index 0000000..da71a1f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskPicDocTicketReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetSignTaskPicDocTicketReq extends BaseReq { + + private String slicingTicketId; + + public String getSlicingTicketId() { + return slicingTicketId; + } + + public void setSlicingTicketId(String slicingTicketId) { + this.slicingTicketId = slicingTicketId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskSlicingDocReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskSlicingDocReq.java new file mode 100644 index 0000000..1b3580e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskSlicingDocReq.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +public class GetSignTaskSlicingDocReq extends BaseReq { + + private OpenId ownerId; + + private String signTaskId; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskUrlReq.java new file mode 100644 index 0000000..ca0495c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetSignTaskUrlReq.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.req.signtask; + + +public class GetSignTaskUrlReq extends SignTaskBaseReq { + + private String redirectUrl; + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/GetUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/GetUrlReq.java new file mode 100644 index 0000000..fc6421f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/GetUrlReq.java @@ -0,0 +1,35 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class GetUrlReq extends SignTaskBaseReq { + private String actorType; + private String actorId; + private String redirectUrl; + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskActorReq.java b/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskActorReq.java new file mode 100644 index 0000000..67715e9 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskActorReq.java @@ -0,0 +1,8 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ListSignTaskActorReq extends SignTaskBaseReq { +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskFieldReq.java b/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskFieldReq.java new file mode 100644 index 0000000..3a37156 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/ListSignTaskFieldReq.java @@ -0,0 +1,10 @@ +package com.fasc.open.api.v5_1.req.signtask; + + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ListSignTaskFieldReq extends SignTaskBaseReq { + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/Position.java b/src/com/fasc/open/api/v5_1/req/signtask/Position.java new file mode 100644 index 0000000..01d55c0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/Position.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +public class Position extends BaseBean { + private Integer positionPageNo; + private String positionX; + private String positionY; + + public Integer getPositionPageNo() { + return positionPageNo; + } + + public void setPositionPageNo(Integer positionPageNo) { + this.positionPageNo = positionPageNo; + } + + public String getPositionX() { + return positionX; + } + + public void setPositionX(String positionX) { + this.positionX = positionX; + } + + public String getPositionY() { + return positionY; + } + + public void setPositionY(String positionY) { + this.positionY = positionY; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignConfigInfoBase.java b/src/com/fasc/open/api/v5_1/req/signtask/SignConfigInfoBase.java new file mode 100644 index 0000000..8e68a13 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignConfigInfoBase.java @@ -0,0 +1,125 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +public class SignConfigInfoBase extends BaseBean { + private Integer orderNo; + private Boolean blockHere; + private Boolean requestVerifyFree; + private Boolean requestMemberSign; + private List verifyMethods; + private Boolean joinByLink; + private String signerSignMethod; + private Boolean readingToEnd; + private String readingTime; + private Boolean identifiedView; + private Boolean resizeSeal; + private List audioVideoInfo; + private List actorAttachInfos; + + public Boolean getRequestMemberSign() { + return requestMemberSign; + } + + public void setRequestMemberSign(Boolean requestMemberSign) { + this.requestMemberSign = requestMemberSign; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public Boolean getReadingToEnd() { + return readingToEnd; + } + + public void setReadingToEnd(Boolean readingToEnd) { + this.readingToEnd = readingToEnd; + } + + public String getReadingTime() { + return readingTime; + } + + public void setReadingTime(String readingTime) { + this.readingTime = readingTime; + } + + public Boolean getBlockHere() { + return blockHere; + } + + public void setBlockHere(Boolean blockHere) { + this.blockHere = blockHere; + } + + public Boolean getRequestVerifyFree() { + return requestVerifyFree; + } + + public void setRequestVerifyFree(Boolean requestVerifyFree) { + this.requestVerifyFree = requestVerifyFree; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getJoinByLink() { + return joinByLink; + } + + public void setJoinByLink(Boolean joinByLink) { + this.joinByLink = joinByLink; + } + + public Boolean getIdentifiedView() { + return identifiedView; + } + + public void setIdentifiedView(Boolean identifiedView) { + this.identifiedView = identifiedView; + } + + public Boolean getResizeSeal() { + return resizeSeal; + } + + public void setResizeSeal(Boolean resizeSeal) { + this.resizeSeal = resizeSeal; + } + + public List getAudioVideoInfo() { + return audioVideoInfo; + } + + public void setAudioVideoInfo(List audioVideoInfo) { + this.audioVideoInfo = audioVideoInfo; + } + + public List getActorAttachInfos() { + return actorAttachInfos; + } + + public void setActorAttachInfos(List actorAttachInfos) { + this.actorAttachInfos = actorAttachInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignFieldRes.java b/src/com/fasc/open/api/v5_1/req/signtask/SignFieldRes.java new file mode 100644 index 0000000..9519c13 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignFieldRes.java @@ -0,0 +1,61 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +//import javafx.geometry.Pos; + +public class SignFieldRes extends BaseBean { + private String signFieldStatus; + private String fieldDocId; + private String fieldId; + private String fieldName; + private Boolean moveable; + private Position position; + + public String getSignFieldStatus() { + return signFieldStatus; + } + + public void setSignFieldStatus(String signFieldStatus) { + this.signFieldStatus = signFieldStatus; + } + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public Boolean getMoveable() { + return moveable; + } + + public void setMoveable(Boolean moveable) { + this.moveable = moveable; + } + + public Position getPosition() { + return position; + } + + public void setPosition(Position position) { + this.position = position; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskActorGetUrlReq.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskActorGetUrlReq.java new file mode 100644 index 0000000..66c6584 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskActorGetUrlReq.java @@ -0,0 +1,40 @@ +package com.fasc.open.api.v5_1.req.signtask; + +public class SignTaskActorGetUrlReq extends SignTaskBaseReq{ + private String actorId; + private String clientUserId; + private String redirectMiniAppUrl; + private String redirectUrl; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getRedirectMiniAppUrl() { + return redirectMiniAppUrl; + } + + public void setRedirectMiniAppUrl(String redirectMiniAppUrl) { + this.redirectMiniAppUrl = redirectMiniAppUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskBaseReq.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskBaseReq.java new file mode 100644 index 0000000..cd5f536 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskBaseReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class SignTaskBaseReq extends BaseReq { + private String signTaskId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCancelReq.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCancelReq.java new file mode 100644 index 0000000..3895533 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCancelReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2023/3/22 14:14 + */ +public class SignTaskCancelReq extends BaseReq { + private String signTaskId; + private String terminationNote; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getTerminationNote() { + return terminationNote; + } + + public void setTerminationNote(String terminationNote) { + this.terminationNote = terminationNote; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCatalogListReq.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCatalogListReq.java new file mode 100644 index 0000000..cb2d971 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCatalogListReq.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class SignTaskCatalogListReq extends BaseReq { + private OpenId ownerId; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCcActorInfo.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCcActorInfo.java new file mode 100644 index 0000000..697d6cf --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskCcActorInfo.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +/** + * @author Fadada + * 2021/10/18 14:45:32 + */ +public class SignTaskCcActorInfo extends BaseBean { + private Actor ccActor; + + public Actor getCcActor() { + return ccActor; + } + + public void setCcActor(Actor ccActor) { + this.ccActor = ccActor; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/SignTaskListFilter.java b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskListFilter.java new file mode 100644 index 0000000..07232da --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/SignTaskListFilter.java @@ -0,0 +1,40 @@ +package com.fasc.open.api.v5_1.req.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class SignTaskListFilter extends BaseBean { + private String signTaskSubject; + private List signTaskStatus; + private String transReferenceId; + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public List getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(List signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getTransReferenceId() { + return transReferenceId; + } + + public void setTransReferenceId(String transReferenceId) { + this.transReferenceId = transReferenceId; + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/TemplateSignConfigInfoReq.java b/src/com/fasc/open/api/v5_1/req/signtask/TemplateSignConfigInfoReq.java new file mode 100644 index 0000000..e76607c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/TemplateSignConfigInfoReq.java @@ -0,0 +1,4 @@ +package com.fasc.open.api.v5_1.req.signtask; + +public class TemplateSignConfigInfoReq extends SignConfigInfoBase { +} diff --git a/src/com/fasc/open/api/v5_1/req/signtask/UnblockReq.java b/src/com/fasc/open/api/v5_1/req/signtask/UnblockReq.java new file mode 100644 index 0000000..703ce47 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/signtask/UnblockReq.java @@ -0,0 +1,18 @@ +package com.fasc.open.api.v5_1.req.signtask; + +/** + * @author Fadada + * 2021/9/11 16:03:06 + */ +public class UnblockReq extends SignTaskBaseReq { + private String actorId; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + +} diff --git a/src/com/fasc/open/api/v5_1/req/template/CancelPersonalSealFreeSignReq.java b/src/com/fasc/open/api/v5_1/req/template/CancelPersonalSealFreeSignReq.java new file mode 100644 index 0000000..788587e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/CancelPersonalSealFreeSignReq.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class CancelPersonalSealFreeSignReq extends BaseReq { + private String openUserId; + private Long sealId; + private String businessId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/template/CancelSealFreeSignReq.java b/src/com/fasc/open/api/v5_1/req/template/CancelSealFreeSignReq.java new file mode 100644 index 0000000..58eb752 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/CancelSealFreeSignReq.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class CancelSealFreeSignReq extends BaseReq { + private String openCorpId; + private Long sealId; + private String businessId; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/template/CreateAppFieldReq.java b/src/com/fasc/open/api/v5_1/req/template/CreateAppFieldReq.java new file mode 100644 index 0000000..952a57a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/CreateAppFieldReq.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:49 + */ +public class CreateAppFieldReq extends BaseReq { + private String fieldKey; + private String fieldName; + private String fieldType; + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldType() { + return fieldType; + } + + public void setFieldType(String fieldType) { + this.fieldType = fieldType; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/DeleteAppTemplateReq.java b/src/com/fasc/open/api/v5_1/req/template/DeleteAppTemplateReq.java new file mode 100644 index 0000000..1fe232b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DeleteAppTemplateReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class DeleteAppTemplateReq extends BaseReq { + + private String appDocTemplateId; + + public String getAppDocTemplateId() { + return appDocTemplateId; + } + + public void setAppDocTemplateId(String appDocTemplateId) { + this.appDocTemplateId = appDocTemplateId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/DeleteDocTemplateReq.java b/src/com/fasc/open/api/v5_1/req/template/DeleteDocTemplateReq.java new file mode 100644 index 0000000..96f7497 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DeleteDocTemplateReq.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.req.template; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class DeleteDocTemplateReq extends BaseReq { + + /** + * 文档模板id + */ + private String docTemplateId; + + /** + * 法大大平台为该企业在该应用appId范围内分配的唯一标识。长度最大64个字符 + */ + private String openCorpId; + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/DeleteSignAppTemplateReq.java b/src/com/fasc/open/api/v5_1/req/template/DeleteSignAppTemplateReq.java new file mode 100644 index 0000000..8d41a79 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DeleteSignAppTemplateReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class DeleteSignAppTemplateReq extends BaseReq { + + private String appSignTemplateId; + + public String getAppSignTemplateId() { + return appSignTemplateId; + } + + public void setAppSignTemplateId(String appSignTemplateId) { + this.appSignTemplateId = appSignTemplateId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/DeleteSignTemplateReq.java b/src/com/fasc/open/api/v5_1/req/template/DeleteSignTemplateReq.java new file mode 100644 index 0000000..df8b5b4 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DeleteSignTemplateReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class DeleteSignTemplateReq extends BaseReq { + + /** + * 签署模板id + */ + private String signTemplateId; + + /** + * 法大大平台为该企业在该应用appId范围内分配的唯一标识。长度最大64个字符 + */ + private String openCorpId; + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/template/DocTemplateDetailReq.java b/src/com/fasc/open/api/v5_1/req/template/DocTemplateDetailReq.java new file mode 100644 index 0000000..ff1d6ec --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DocTemplateDetailReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class DocTemplateDetailReq extends BaseReq { + private OpenId ownerId; + private String docTemplateId; + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/DocTemplateListFilterInfo.java b/src/com/fasc/open/api/v5_1/req/template/DocTemplateListFilterInfo.java new file mode 100644 index 0000000..912c5f2 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/DocTemplateListFilterInfo.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 15:17:57 + */ +public class DocTemplateListFilterInfo extends BaseBean { + private String docTemplateName; + + public String getDocTemplateName() { + return docTemplateName; + } + + public void setDocTemplateName(String docTemplateName) { + this.docTemplateName = docTemplateName; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateDetailReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateDetailReq.java new file mode 100644 index 0000000..f31612e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateDetailReq.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:18 + */ +public class GetAppDocTemplateDetailReq extends BaseReq { + private String appDocTemplateId; + + public String getAppDocTemplateId() { + return appDocTemplateId; + } + + public void setAppDocTemplateId(String appDocTemplateId) { + this.appDocTemplateId = appDocTemplateId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateListReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateListReq.java new file mode 100644 index 0000000..48a3dab --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppDocTemplateListReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BasePageReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:06 + */ +public class GetAppDocTemplateListReq extends BasePageReq { + private ListFilterInfo listFilter; + + public ListFilterInfo getListFilter() { + return listFilter; + } + + public void setListFilter(ListFilterInfo listFilter) { + this.listFilter = listFilter; + } + + public static class ListFilterInfo { + private String appDocTemplateName; + + public String getAppDocTemplateName() { + return appDocTemplateName; + } + + public void setAppDocTemplateName(String appDocTemplateName) { + this.appDocTemplateName = appDocTemplateName; + } + } +} + diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppFieldListReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppFieldListReq.java new file mode 100644 index 0000000..cafa2e5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppFieldListReq.java @@ -0,0 +1,11 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:55 + */ +public class GetAppFieldListReq extends BaseReq { + +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateDetailReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateDetailReq.java new file mode 100644 index 0000000..d088f9e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateDetailReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:29 + */ +public class GetAppSignTemplateDetailReq extends BaseReq { + private String appSignTemplateId; + + public String getAppSignTemplateId() { + return appSignTemplateId; + } + + public void setAppSignTemplateId(String appSignTemplateId) { + this.appSignTemplateId = appSignTemplateId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateListReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateListReq.java new file mode 100644 index 0000000..d1483e9 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppSignTemplateListReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BasePageReq; +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:25 + */ +public class GetAppSignTemplateListReq extends BasePageReq { + private ListFilterInfo listFilter; + + public ListFilterInfo getListFilter() { + return listFilter; + } + + public void setListFilter(ListFilterInfo listFilter) { + this.listFilter = listFilter; + } + + public static class ListFilterInfo { + private String appSignTemplateName; + + public String getAppSignTemplateName() { + return appSignTemplateName; + } + + public void setAppSignTemplateName(String appSignTemplateName) { + this.appSignTemplateName = appSignTemplateName; + } + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateCreateUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateCreateUrlReq.java new file mode 100644 index 0000000..c812809 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateCreateUrlReq.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:41 + */ +public class GetAppTemplateCreateUrlReq extends BaseReq { + private String type; + private String createSerialNo; + private String redirectUrl; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateEditUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateEditUrlReq.java new file mode 100644 index 0000000..60268aa --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplateEditUrlReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:43 + */ +public class GetAppTemplateEditUrlReq extends BaseReq { + private String appTemplateId; + private String redirectUrl; + + public String getAppTemplateId() { + return appTemplateId; + } + + public void setAppTemplateId(String appTemplateId) { + this.appTemplateId = appTemplateId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetAppTemplatePreviewUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplatePreviewUrlReq.java new file mode 100644 index 0000000..cebf791 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetAppTemplatePreviewUrlReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:45 + */ +public class GetAppTemplatePreviewUrlReq extends BaseReq { + private String appTemplateId; + private String redirectUrl; + + public String getAppTemplateId() { + return appTemplateId; + } + + public void setAppTemplateId(String appTemplateId) { + this.appTemplateId = appTemplateId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetDocTemplateListReq.java b/src/com/fasc/open/api/v5_1/req/template/GetDocTemplateListReq.java new file mode 100644 index 0000000..098b5be --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetDocTemplateListReq.java @@ -0,0 +1,29 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BasePageReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class GetDocTemplateListReq extends BasePageReq { + private OpenId ownerId; + private DocTemplateListFilterInfo listFilter; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public DocTemplateListFilterInfo getListFilter() { + return listFilter; + } + + public void setListFilter(DocTemplateListFilterInfo listFilter) { + this.listFilter = listFilter; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetSignTemplateListReq.java b/src/com/fasc/open/api/v5_1/req/template/GetSignTemplateListReq.java new file mode 100644 index 0000000..781570a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetSignTemplateListReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BasePageReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class GetSignTemplateListReq extends BasePageReq { + + private OpenId ownerId; + private SignTemplateListFilterInfo listFilter; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public SignTemplateListFilterInfo getListFilter() { + return listFilter; + } + + public void setListFilter(SignTemplateListFilterInfo listFilter) { + this.listFilter = listFilter; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetTemplateCreateUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetTemplateCreateUrlReq.java new file mode 100644 index 0000000..242d3bb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetTemplateCreateUrlReq.java @@ -0,0 +1,48 @@ +package com.fasc.open.api.v5_1.req.template; + + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/8/5 11:07:53 + */ +public class GetTemplateCreateUrlReq extends BaseReq { + + private String openCorpId; + private String type; + private String redirectUrl; + private String createSerialNo; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetTemplateEditUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetTemplateEditUrlReq.java new file mode 100644 index 0000000..4d8ee34 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetTemplateEditUrlReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/8/5 11:07:53 + */ +public class GetTemplateEditUrlReq extends BaseReq { + + private String openCorpId; + private String templateId; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetTemplateManageUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetTemplateManageUrlReq.java new file mode 100644 index 0000000..7141e95 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetTemplateManageUrlReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.template; + + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/8/5 11:07:53 + */ +public class GetTemplateManageUrlReq extends BaseReq { + + private String openCorpId; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/GetTemplatePreviewUrlReq.java b/src/com/fasc/open/api/v5_1/req/template/GetTemplatePreviewUrlReq.java new file mode 100644 index 0000000..0a9d4e5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/GetTemplatePreviewUrlReq.java @@ -0,0 +1,39 @@ +package com.fasc.open.api.v5_1.req.template; + + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/8/5 11:07:53 + */ +public class GetTemplatePreviewUrlReq extends BaseReq { + + private String openCorpId; + private String templateId; + private String redirectUrl; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/ModifyAppFieldReq.java b/src/com/fasc/open/api/v5_1/req/template/ModifyAppFieldReq.java new file mode 100644 index 0000000..29445aa --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/ModifyAppFieldReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:52 + */ +public class ModifyAppFieldReq extends BaseReq{ + private String fieldKey; + private String fieldName; + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SetAppFieldStatusReq.java b/src/com/fasc/open/api/v5_1/req/template/SetAppFieldStatusReq.java new file mode 100644 index 0000000..4f6bd62 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SetAppFieldStatusReq.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:53 + */ +public class SetAppFieldStatusReq extends BaseReq { + private String fieldKey; + private String fieldStatus; + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getFieldStatus() { + return fieldStatus; + } + + public void setFieldStatus(String fieldStatus) { + this.fieldStatus = fieldStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SetAppSignTemplateStatusReq.java b/src/com/fasc/open/api/v5_1/req/template/SetAppSignTemplateStatusReq.java new file mode 100644 index 0000000..f20e93a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SetAppSignTemplateStatusReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class SetAppSignTemplateStatusReq extends BaseReq { + + /** + * 签署模板id + */ + private String appSignTemplateId; + + /** + * 设置应用签署任务模板状态为启用或停用:invalid: 停用,valid: 启用 + */ + private String appSignTemplateStatus; + + public String getAppSignTemplateId() { + return appSignTemplateId; + } + + public void setAppSignTemplateId(String appSignTemplateId) { + this.appSignTemplateId = appSignTemplateId; + } + + public String getAppSignTemplateStatus() { + return appSignTemplateStatus; + } + + public void setAppSignTemplateStatus(String appSignTemplateStatus) { + this.appSignTemplateStatus = appSignTemplateStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SetDocTemplateStatusReq.java b/src/com/fasc/open/api/v5_1/req/template/SetDocTemplateStatusReq.java new file mode 100644 index 0000000..473f05f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SetDocTemplateStatusReq.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.template; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class SetDocTemplateStatusReq extends BaseReq { + + /** + * 法大大平台为该企业在该应用appId范围内分配的唯一标识。长度最大64个字符 + */ + private String openCorpId; + + /** + * 文档模板id + */ + private String docTemplateId; + + /** + * 设置应用文档任务模板状态为启用或停用:invalid: 停用,valid: 启用 + */ + private String docTemplateStatus; + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public String getDocTemplateStatus() { + return docTemplateStatus; + } + + public void setDocTemplateStatus(String docTemplateStatus) { + this.docTemplateStatus = docTemplateStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SetSignTemplateStatusReq.java b/src/com/fasc/open/api/v5_1/req/template/SetSignTemplateStatusReq.java new file mode 100644 index 0000000..0ad61f4 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SetSignTemplateStatusReq.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class SetSignTemplateStatusReq extends BaseReq { + + /** + * 法大大平台为该企业在该应用appId范围内分配的唯一标识。长度最大64个字符 + */ + private String openCorpId; + + /** + * 模板id + */ + private String signTemplateId; + + /** + * 设置模板状态为启用或停用:invalid: 停用,valid: 启用 + */ + private String signTemplateStatus; + + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } + + public String getSignTemplateStatus() { + return signTemplateStatus; + } + + public void setSignTemplateStatus(String signTemplateStatus) { + this.signTemplateStatus = signTemplateStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SetTemplateStatusReq.java b/src/com/fasc/open/api/v5_1/req/template/SetTemplateStatusReq.java new file mode 100644 index 0000000..0bb6d5b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SetTemplateStatusReq.java @@ -0,0 +1,25 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; + +public class SetTemplateStatusReq extends BaseReq { + + private String appDocTemplateId; + private String appDocTemplateStatus; + + public String getAppDocTemplateId() { + return appDocTemplateId; + } + + public void setAppDocTemplateId(String appDocTemplateId) { + this.appDocTemplateId = appDocTemplateId; + } + + public String getAppDocTemplateStatus() { + return appDocTemplateStatus; + } + + public void setAppDocTemplateStatus(String appDocTemplateStatus) { + this.appDocTemplateStatus = appDocTemplateStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/template/SignTemplateDetailReq.java b/src/com/fasc/open/api/v5_1/req/template/SignTemplateDetailReq.java new file mode 100644 index 0000000..a7382e5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SignTemplateDetailReq.java @@ -0,0 +1,30 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class SignTemplateDetailReq extends BaseReq { + private OpenId ownerId; + private String signTemplateId; + + public OpenId getOwnerId() { + return ownerId; + } + + public void setOwnerId(OpenId ownerId) { + this.ownerId = ownerId; + } + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } +} + diff --git a/src/com/fasc/open/api/v5_1/req/template/SignTemplateListFilterInfo.java b/src/com/fasc/open/api/v5_1/req/template/SignTemplateListFilterInfo.java new file mode 100644 index 0000000..4a5a686 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/template/SignTemplateListFilterInfo.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.req.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 15:17:57 + */ +public class SignTemplateListFilterInfo extends BaseBean { + private String signTemplateName; + private String signTemplateStatus; + + public String getSignTemplateName() { + return signTemplateName; + } + + public void setSignTemplateName(String signTemplateName) { + this.signTemplateName = signTemplateName; + } + + public String getSignTemplateStatus() { + return signTemplateStatus; + } + + public void setSignTemplateStatus(String signTemplateStatus) { + this.signTemplateStatus = signTemplateStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/DisableUserReq.java b/src/com/fasc/open/api/v5_1/req/user/DisableUserReq.java new file mode 100644 index 0000000..f5fa6d5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/DisableUserReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/12/6 10:20:27 + */ +public class DisableUserReq extends BaseReq { + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/EnableUserReq.java b/src/com/fasc/open/api/v5_1/req/user/EnableUserReq.java new file mode 100644 index 0000000..b564391 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/EnableUserReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * @date 2021/12/6 10:20:27 + */ +public class EnableUserReq extends BaseReq { + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/GetIdCardImageDownloadUrlReq.java b/src/com/fasc/open/api/v5_1/req/user/GetIdCardImageDownloadUrlReq.java new file mode 100644 index 0000000..3b74f19 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetIdCardImageDownloadUrlReq.java @@ -0,0 +1,17 @@ +package com.fasc.open.api.v5_1.req.user; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetIdCardImageDownloadUrlReq extends BaseReq { + + private String verifyId ; + + public String getVerifyId() { + return verifyId; + } + + public void setVerifyId(String verifyId) { + this.verifyId = verifyId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserAuthUrlReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserAuthUrlReq.java new file mode 100644 index 0000000..f169f4a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserAuthUrlReq.java @@ -0,0 +1,102 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/16 17:38:58 + */ +public class GetUserAuthUrlReq extends BaseReq { + private String clientUserId; + private String userName; + private String userIdentType; + private String userIdentNo; + private Boolean userIdentInfoMatch; + private List authScopes; + private String redirectUrl; + private String accountName; + private UserIdentInfoReq userIdentInfo; + private List nonEditableInfo; + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public UserIdentInfoReq getUserIdentInfo() { + return userIdentInfo; + } + + public void setUserIdentInfo(UserIdentInfoReq userIdentInfo) { + this.userIdentInfo = userIdentInfo; + } + + public List getNonEditableInfo() { + return nonEditableInfo; + } + + public void setNonEditableInfo(List nonEditableInfo) { + this.nonEditableInfo = nonEditableInfo; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserIdentType() { + return userIdentType; + } + + public void setUserIdentType(String userIdentType) { + this.userIdentType = userIdentType; + } + + public String getUserIdentNo() { + return userIdentNo; + } + + public void setUserIdentNo(String userIdentNo) { + this.userIdentNo = userIdentNo; + } + + public Boolean getUserIdentInfoMatch() { + return userIdentInfoMatch; + } + + public void setUserIdentInfoMatch(Boolean userIdentInfoMatch) { + this.userIdentInfoMatch = userIdentInfoMatch; + } + + public List getAuthScopes() { + return authScopes; + } + + public void setAuthScopes(List authScopes) { + this.authScopes = authScopes; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserFourElementVerifyUrlReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserFourElementVerifyUrlReq.java new file mode 100644 index 0000000..9652f80 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserFourElementVerifyUrlReq.java @@ -0,0 +1,108 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +public class GetUserFourElementVerifyUrlReq extends BaseReq { + private OpenId initiator; + + private String clientUserId; + + private String userName; + + private String userIdentNo; + + private String bankAccountNo; + + private String mobile; + + private String redirectUrl; + + private Boolean idCardImage; + + private String faceSide; + + private String nationalEmblemSide; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserIdentNo() { + return userIdentNo; + } + + public void setUserIdentNo(String userIdentNo) { + this.userIdentNo = userIdentNo; + } + + public String getBankAccountNo() { + return bankAccountNo; + } + + public void setBankAccountNo(String bankAccountNo) { + this.bankAccountNo = bankAccountNo; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public Boolean getIdCardImage() { + return idCardImage; + } + + public void setIdCardImage(Boolean idCardImage) { + this.idCardImage = idCardImage; + } + + public String getFaceSide() { + return faceSide; + } + + public void setFaceSide(String faceSide) { + this.faceSide = faceSide; + } + + public String getNationalEmblemSide() { + return nationalEmblemSide; + } + + public void setNationalEmblemSide(String nationalEmblemSide) { + this.nationalEmblemSide = nationalEmblemSide; + } +} + + diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserIdentTransactionIdReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserIdentTransactionIdReq.java new file mode 100644 index 0000000..0eca7c3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserIdentTransactionIdReq.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetUserIdentTransactionIdReq extends BaseReq { + + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserIdentityInfoReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserIdentityInfoReq.java new file mode 100644 index 0000000..798acf6 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserIdentityInfoReq.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * 2021/10/16 17:39:36 + */ +public class GetUserIdentityInfoReq extends BaseReq { + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserReq.java new file mode 100644 index 0000000..3477e5f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserReq.java @@ -0,0 +1,32 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +/** + * @author Fadada + * 2021/9/11 14:07:49 + */ +public class GetUserReq extends BaseReq { + private String clientUserId; + + private String openUserId; + + public GetUserReq() { + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/GetUserThreeElementVerifyUrlReq.java b/src/com/fasc/open/api/v5_1/req/user/GetUserThreeElementVerifyUrlReq.java new file mode 100644 index 0000000..c50a15e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/GetUserThreeElementVerifyUrlReq.java @@ -0,0 +1,97 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +public class GetUserThreeElementVerifyUrlReq extends BaseReq { + + private OpenId initiator; + + private String clientUserId; + + private String userName; + + private String userIdentNo; + + private String mobile; + + private String redirectUrl; + + private Boolean idCardImage; + + private String faceSide; + + private String nationalEmblemSide; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserIdentNo() { + return userIdentNo; + } + + public void setUserIdentNo(String userIdentNo) { + this.userIdentNo = userIdentNo; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getRedirectUrl() { + return redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public Boolean getIdCardImage() { + return idCardImage; + } + + public void setIdCardImage(Boolean idCardImage) { + this.idCardImage = idCardImage; + } + + public String getFaceSide() { + return faceSide; + } + + public void setFaceSide(String faceSide) { + this.faceSide = faceSide; + } + + public String getNationalEmblemSide() { + return nationalEmblemSide; + } + + public void setNationalEmblemSide(String nationalEmblemSide) { + this.nationalEmblemSide = nationalEmblemSide; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/req/user/IdCardOcrReq.java b/src/com/fasc/open/api/v5_1/req/user/IdCardOcrReq.java new file mode 100644 index 0000000..d8f591c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/IdCardOcrReq.java @@ -0,0 +1,38 @@ +package com.fasc.open.api.v5_1.req.user; + + +import com.fasc.open.api.bean.base.BaseReq; +import com.fasc.open.api.bean.common.OpenId; + +public class IdCardOcrReq extends BaseReq { + + private OpenId initiator; + + private String faceSide; + + private String nationalEmblemSide; + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getFaceSide() { + return faceSide; + } + + public void setFaceSide(String faceSide) { + this.faceSide = faceSide; + } + + public String getNationalEmblemSide() { + return nationalEmblemSide; + } + + public void setNationalEmblemSide(String nationalEmblemSide) { + this.nationalEmblemSide = nationalEmblemSide; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/UserIdentInfoReq.java b/src/com/fasc/open/api/v5_1/req/user/UserIdentInfoReq.java new file mode 100644 index 0000000..85d62fb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/UserIdentInfoReq.java @@ -0,0 +1,65 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * 个人参与方对象 + */ +public class UserIdentInfoReq extends BaseBean { + private String userName; + private String userIdentType; + private String userIdentNo; + private String mobile; + private String bankAccountNo; + private List identMethod; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserIdentType() { + return userIdentType; + } + + public void setUserIdentType(String userIdentType) { + this.userIdentType = userIdentType; + } + + public String getUserIdentNo() { + return userIdentNo; + } + + public void setUserIdentNo(String userIdentNo) { + this.userIdentNo = userIdentNo; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getBankAccountNo() { + return bankAccountNo; + } + + public void setBankAccountNo(String bankAccountNo) { + this.bankAccountNo = bankAccountNo; + } + + public List getIdentMethod() { + return identMethod; + } + + public void setIdentMethod(List identMethod) { + this.identMethod = identMethod; + } +} diff --git a/src/com/fasc/open/api/v5_1/req/user/UserUnbindReq.java b/src/com/fasc/open/api/v5_1/req/user/UserUnbindReq.java new file mode 100644 index 0000000..a789899 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/req/user/UserUnbindReq.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.req.user; + +import com.fasc.open.api.bean.base.BaseReq; + +public class UserUnbindReq extends BaseReq { + private String openUserId; + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/common/ECorpAuthUrlRes.java b/src/com/fasc/open/api/v5_1/res/common/ECorpAuthUrlRes.java new file mode 100644 index 0000000..40e1262 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/common/ECorpAuthUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/7/19 15:46 + */ +public class ECorpAuthUrlRes extends BaseBean { + private String authUrl; + + public String getAuthUrl() { + return authUrl; + } + + public void setAuthUrl(String authUrl) { + this.authUrl = authUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/common/EUrlRes.java b/src/com/fasc/open/api/v5_1/res/common/EUrlRes.java new file mode 100644 index 0000000..6e4fe30 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/common/EUrlRes.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.res.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/15 14:04:46 + */ +public class EUrlRes extends BaseBean { + private String authUrl; + private String eUrl; + private String authShortUrl; + + public String geteUrl() { + return eUrl; + } + + public void seteUrl(String eUrl) { + this.eUrl = eUrl; + } + + public String getAuthUrl() { + return authUrl; + } + + public void setAuthUrl(String authUrl) { + this.authUrl = authUrl; + } + + public String getAuthShortUrl() { + return authShortUrl; + } + + public void setAuthShortUrl(String authShortUrl) { + this.authShortUrl = authShortUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/common/PUrlRes.java b/src/com/fasc/open/api/v5_1/res/common/PUrlRes.java new file mode 100644 index 0000000..11d0c8a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/common/PUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2021/12/15 14:04:46 + */ +public class PUrlRes extends BaseBean { + private String pUrl; + + public String getpUrl() { + return pUrl; + } + + public void setpUrl(String pUrl) { + this.pUrl = pUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/common/UrlRes.java b/src/com/fasc/open/api/v5_1/res/common/UrlRes.java new file mode 100644 index 0000000..ccc5cec --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/common/UrlRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.common; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/16 17:47:36 + */ +public class UrlRes extends BaseBean { + private String eUrl; + private String cloudUrl; + + public String geteUrl() { + return eUrl; + } + + public void seteUrl(String eUrl) { + this.eUrl = eUrl; + } + + public String getCloudUrl() { + return cloudUrl; + } + + public void setCloudUrl(String cloudUrl) { + this.cloudUrl = cloudUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/corp/CorpIdentityInfoRes.java b/src/com/fasc/open/api/v5_1/res/corp/CorpIdentityInfoRes.java new file mode 100644 index 0000000..d5de18f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/corp/CorpIdentityInfoRes.java @@ -0,0 +1,111 @@ +package com.fasc.open.api.v5_1.res.corp; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.CorpIdentInfo; +import com.fasc.open.api.bean.common.CorpInfoExtend; + +/** + * @author Fadada + * 2021/10/16 17:50:32 + */ +public class CorpIdentityInfoRes extends BaseBean { + private String openCorpId; + private String corpIdentStatus; + private CorpIdentInfo corpIdentInfo; + private CorpInfoExtend corpIdentInfoExtend; + private String corpIdentMethod; + private String operatorType; + private String operatorId; + private String operatorIdentMethod; + private String identSubmitTime; + private String identSuccessTime; + private String fddId; + + public String getFddId() { + return fddId; + } + + public void setFddId(String fddId) { + this.fddId = fddId; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getCorpIdentStatus() { + return corpIdentStatus; + } + + public void setCorpIdentStatus(String corpIdentStatus) { + this.corpIdentStatus = corpIdentStatus; + } + + public CorpIdentInfo getCorpIdentInfo() { + return corpIdentInfo; + } + + public void setCorpIdentInfo(CorpIdentInfo corpIdentInfo) { + this.corpIdentInfo = corpIdentInfo; + } + + public CorpInfoExtend getCorpIdentInfoExtend() { + return corpIdentInfoExtend; + } + + public void setCorpIdentInfoExtend(CorpInfoExtend corpIdentInfoExtend) { + this.corpIdentInfoExtend = corpIdentInfoExtend; + } + + public String getCorpIdentMethod() { + return corpIdentMethod; + } + + public void setCorpIdentMethod(String corpIdentMethod) { + this.corpIdentMethod = corpIdentMethod; + } + + public String getOperatorType() { + return operatorType; + } + + public void setOperatorType(String operatorType) { + this.operatorType = operatorType; + } + + public String getOperatorId() { + return operatorId; + } + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + public String getOperatorIdentMethod() { + return operatorIdentMethod; + } + + public void setOperatorIdentMethod(String operatorIdentMethod) { + this.operatorIdentMethod = operatorIdentMethod; + } + + public String getIdentSubmitTime() { + return identSubmitTime; + } + + public void setIdentSubmitTime(String identSubmitTime) { + this.identSubmitTime = identSubmitTime; + } + + public String getIdentSuccessTime() { + return identSuccessTime; + } + + public void setIdentSuccessTime(String identSuccessTime) { + this.identSuccessTime = identSuccessTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/corp/CorpRes.java b/src/com/fasc/open/api/v5_1/res/corp/CorpRes.java new file mode 100644 index 0000000..0e07854 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/corp/CorpRes.java @@ -0,0 +1,75 @@ +package com.fasc.open.api.v5_1.res.corp; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 14:07:49 + */ +public class CorpRes extends BaseBean { + private String clientCorpId; + private String clientCorpName; + private String bindingStatus; + private List authScope; + private String identStatus; + private String availableStatus; + private String openCorpId; + + public String getClientCorpId() { + return clientCorpId; + } + + public void setClientCorpId(String clientCorpId) { + this.clientCorpId = clientCorpId; + } + + public String getClientCorpName() { + return clientCorpName; + } + + public void setClientCorpName(String clientCorpName) { + this.clientCorpName = clientCorpName; + } + + public String getBindingStatus() { + return bindingStatus; + } + + public void setBindingStatus(String bindingStatus) { + this.bindingStatus = bindingStatus; + } + + public List getAuthScope() { + return authScope; + } + + public void setAuthScope(List authScope) { + this.authScope = authScope; + } + + public String getIdentStatus() { + return identStatus; + } + + public void setIdentStatus(String identStatus) { + this.identStatus = identStatus; + } + + public String getAvailableStatus() { + return availableStatus; + } + + public void setAvailableStatus(String availableStatus) { + this.availableStatus = availableStatus; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/corp/GetCorpIdentTransactionIdRes.java b/src/com/fasc/open/api/v5_1/res/corp/GetCorpIdentTransactionIdRes.java new file mode 100644 index 0000000..bf954b5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/corp/GetCorpIdentTransactionIdRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.corp; + +public class GetCorpIdentTransactionIdRes { + + private String transactionId; + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/corp/GetCounterpartListRes.java b/src/com/fasc/open/api/v5_1/res/corp/GetCounterpartListRes.java new file mode 100644 index 0000000..eb4273b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/corp/GetCounterpartListRes.java @@ -0,0 +1,48 @@ +package com.fasc.open.api.v5_1.res.corp; + +import java.util.List; + +public class GetCounterpartListRes { + + private List counterpartInfos; + + + public static class CounterpartInfo { + private String corpName; + private String corpIdentNo; + private String status; + + public String getCorpName() { + return corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpIdentNo() { + return corpIdentNo; + } + + public void setCorpIdentNo(String corpIdentNo) { + this.corpIdentNo = corpIdentNo; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + } + + + public List getCounterpartInfos() { + return counterpartInfos; + } + + public void setCounterpartInfos(List counterpartInfos) { + this.counterpartInfos = counterpartInfos; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/corp/GetIdentifiedStatusRes.java b/src/com/fasc/open/api/v5_1/res/corp/GetIdentifiedStatusRes.java new file mode 100644 index 0000000..739b696 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/corp/GetIdentifiedStatusRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.corp; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zfc + * @date 2022年11月18日 + */ +public class GetIdentifiedStatusRes extends BaseBean { + private boolean identStatus; + + public boolean isIdentStatus() { + return identStatus; + } + + public void setIdentStatus(boolean identStatus) { + this.identStatus = identStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/FileId.java b/src/com/fasc/open/api/v5_1/res/doc/FileId.java new file mode 100644 index 0000000..495a453 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/FileId.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class FileId extends BaseBean { + private String fileId; + private String fileType; + private String fddFileUrl; + private String fileName; + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public String getFddFileUrl() { + return fddFileUrl; + } + + public void setFddFileUrl(String fddFileUrl) { + this.fddFileUrl = fddFileUrl; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/FileProcessRes.java b/src/com/fasc/open/api/v5_1/res/doc/FileProcessRes.java new file mode 100644 index 0000000..88785bc --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/FileProcessRes.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class FileProcessRes extends BaseBean { + private List fileIdList; + + public List getFileIdList() { + return fileIdList; + } + + public void setFileIdList(List fileIdList) { + this.fileIdList = fileIdList; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/FileVerifySignRes.java b/src/com/fasc/open/api/v5_1/res/doc/FileVerifySignRes.java new file mode 100644 index 0000000..9d2df34 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/FileVerifySignRes.java @@ -0,0 +1,34 @@ +package com.fasc.open.api.v5_1.res.doc; + +import java.util.List; + +public class FileVerifySignRes { + + private Boolean verifyResult; + private String reason; + private List signatureInfos; + + public Boolean getVerifyResult() { + return verifyResult; + } + + public void setVerifyResult(Boolean verifyResult) { + this.verifyResult = verifyResult; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public List getSignatureInfos() { + return signatureInfos; + } + + public void setSignatureInfos(List signatureInfos) { + this.signatureInfos = signatureInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/GetCompareResultUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/GetCompareResultUrlRes.java new file mode 100644 index 0000000..fd71557 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/GetCompareResultUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 15:57 + */ +public class GetCompareResultUrlRes extends BaseBean { + private String compareUrl; + + public String getCompareUrl() { + return compareUrl; + } + + public void setCompareUrl(String compareUrl) { + this.compareUrl = compareUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/GetCompareUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/GetCompareUrlRes.java new file mode 100644 index 0000000..769fe91 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/GetCompareUrlRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 15:48 + */ +public class GetCompareUrlRes extends BaseBean { + private String compareId; + private String compareUrl; + + public String getCompareId() { + return compareId; + } + + public void setCompareId(String compareId) { + this.compareId = compareId; + } + + public String getCompareUrl() { + return compareUrl; + } + + public void setCompareUrl(String compareUrl) { + this.compareUrl = compareUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/GetExamineResultUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/GetExamineResultUrlRes.java new file mode 100644 index 0000000..acccf56 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/GetExamineResultUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 16:04 + */ +public class GetExamineResultUrlRes extends BaseBean { + private String examineUrl; + + public String getExamineUrl() { + return examineUrl; + } + + public void setExamineUrl(String examineUrl) { + this.examineUrl = examineUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/GetExamineUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/GetExamineUrlRes.java new file mode 100644 index 0000000..bdabbdb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/GetExamineUrlRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/28 0028 16:02 + */ +public class GetExamineUrlRes extends BaseBean { + private String examineId; + private String examineUrl; + + public String getExamineId() { + return examineId; + } + + public void setExamineId(String examineId) { + this.examineId = examineId; + } + + public String getExamineUrl() { + return examineUrl; + } + + public void setExamineUrl(String examineUrl) { + this.examineUrl = examineUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/GetUploadUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/GetUploadUrlRes.java new file mode 100644 index 0000000..3b15f5d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/GetUploadUrlRes.java @@ -0,0 +1,18 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +public class GetUploadUrlRes extends BaseBean { + + private String fddFileUrl; + + private String uploadUrl; + + public String getFddFileUrl() { + return fddFileUrl; + } + + public String getUploadUrl() { + return uploadUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/SignatureInfosRes.java b/src/com/fasc/open/api/v5_1/res/doc/SignatureInfosRes.java new file mode 100644 index 0000000..fe8b25e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/SignatureInfosRes.java @@ -0,0 +1,68 @@ +package com.fasc.open.api.v5_1.res.doc; + +public class SignatureInfosRes { + + private String signer; + private String signedonTime; + private String authority; + private Boolean timestampFlag; + private String timestampTime; + private Boolean timestampVerifyFlag; + private Boolean integrityFlag; + + public String getSigner() { + return signer; + } + + public void setSigner(String signer) { + this.signer = signer; + } + + public String getSignedonTime() { + return signedonTime; + } + + public void setSignedonTime(String signedonTime) { + this.signedonTime = signedonTime; + } + + public String getAuthority() { + return authority; + } + + public void setAuthority(String authority) { + this.authority = authority; + } + + public Boolean getTimestampFlag() { + return timestampFlag; + } + + public void setTimestampFlag(Boolean timestampFlag) { + this.timestampFlag = timestampFlag; + } + + public String getTimestampTime() { + return timestampTime; + } + + public void setTimestampTime(String timestampTime) { + this.timestampTime = timestampTime; + } + + public Boolean getTimestampVerifyFlag() { + return timestampVerifyFlag; + } + + public void setTimestampVerifyFlag(Boolean timestampVerifyFlag) { + this.timestampVerifyFlag = timestampVerifyFlag; + } + + public Boolean getIntegrityFlag() { + return integrityFlag; + } + + public void setIntegrityFlag(Boolean integrityFlag) { + this.integrityFlag = integrityFlag; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/UploadFileByUrlRes.java b/src/com/fasc/open/api/v5_1/res/doc/UploadFileByUrlRes.java new file mode 100644 index 0000000..48f0482 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/UploadFileByUrlRes.java @@ -0,0 +1,16 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +public class UploadFileByUrlRes extends BaseBean { + + private String fddFileUrl; + + public String getFddFileUrl() { + return fddFileUrl; + } + + public void setFddFileUrl(String fddFileUrl) { + this.fddFileUrl = fddFileUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/doc/UploadInstantRes.java b/src/com/fasc/open/api/v5_1/res/doc/UploadInstantRes.java new file mode 100644 index 0000000..190807d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/doc/UploadInstantRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.doc; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 15:11:32 + */ +public class UploadInstantRes extends BaseBean { + private String fileId; + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/eui/GetPageResourceUrlRes.java b/src/com/fasc/open/api/v5_1/res/eui/GetPageResourceUrlRes.java new file mode 100644 index 0000000..6a4b19f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/eui/GetPageResourceUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.eui; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetPageResourceUrlRes extends BaseBean { + private String resourceUrl; + + public String getResourceUrl() { + return resourceUrl; + } + + public void setResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/CorpAuthorizedInfo.java b/src/com/fasc/open/api/v5_1/res/event/CorpAuthorizedInfo.java new file mode 100644 index 0000000..3f0056d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/CorpAuthorizedInfo.java @@ -0,0 +1,130 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class CorpAuthorizedInfo extends BaseBean { + private String eventTime; + private String openCorpId; + private String operatorId; + private String authResult; + private String authFailedReason; + private List authScope; + private String corpIdentProcessStatus; + private String corpIdentMethod; + private String corpIdentFailedReason; + private String operatorIdentProcessStatus; + private String operatorIdentMethod; + private String operatorIdentFailedReason; + private String clientCorpId; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getOpenCorpId() { + return openCorpId; + } + + public void setOpenCorpId(String openCorpId) { + this.openCorpId = openCorpId; + } + + public String getOperatorId() { + return operatorId; + } + + public void setOperatorId(String operatorId) { + this.operatorId = operatorId; + } + + public String getAuthResult() { + return authResult; + } + + public void setAuthResult(String authResult) { + this.authResult = authResult; + } + + public String getAuthFailedReason() { + return authFailedReason; + } + + public void setAuthFailedReason(String authFailedReason) { + this.authFailedReason = authFailedReason; + } + + public List getAuthScope() { + return authScope; + } + + public void setAuthScope(List authScope) { + this.authScope = authScope; + } + + public String getCorpIdentProcessStatus() { + return corpIdentProcessStatus; + } + + public void setCorpIdentProcessStatus(String corpIdentProcessStatus) { + this.corpIdentProcessStatus = corpIdentProcessStatus; + } + + public String getCorpIdentMethod() { + return corpIdentMethod; + } + + public void setCorpIdentMethod(String corpIdentMethod) { + this.corpIdentMethod = corpIdentMethod; + } + + public String getCorpIdentFailedReason() { + return corpIdentFailedReason; + } + + public void setCorpIdentFailedReason(String corpIdentFailedReason) { + this.corpIdentFailedReason = corpIdentFailedReason; + } + + public String getOperatorIdentProcessStatus() { + return operatorIdentProcessStatus; + } + + public void setOperatorIdentProcessStatus(String operatorIdentProcessStatus) { + this.operatorIdentProcessStatus = operatorIdentProcessStatus; + } + + public String getOperatorIdentMethod() { + return operatorIdentMethod; + } + + public void setOperatorIdentMethod(String operatorIdentMethod) { + this.operatorIdentMethod = operatorIdentMethod; + } + + public String getOperatorIdentFailedReason() { + return operatorIdentFailedReason; + } + + public void setOperatorIdentFailedReason(String operatorIdentFailedReason) { + this.operatorIdentFailedReason = operatorIdentFailedReason; + } + + public String getClientCorpId() { + return clientCorpId; + } + + public void setClientCorpId(String clientCorpId) { + this.clientCorpId = clientCorpId; + } +} + diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskCanceledInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskCanceledInfo.java new file mode 100644 index 0000000..dd037a3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskCanceledInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskCanceledInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskFillRejectedInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskFillRejectedInfo.java new file mode 100644 index 0000000..26493e6 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskFillRejectedInfo.java @@ -0,0 +1,83 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskFillRejectedInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + private String actorId; + private OpenId actorOpenId; + private String fillRejectReason; + private String signRejectReason; + private String userName; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public OpenId getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(OpenId actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public String getFillRejectReason() { + return fillRejectReason; + } + + public void setFillRejectReason(String fillRejectReason) { + this.fillRejectReason = fillRejectReason; + } + + public String getSignRejectReason() { + return signRejectReason; + } + + public void setSignRejectReason(String signRejectReason) { + this.signRejectReason = signRejectReason; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskFilledInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskFilledInfo.java new file mode 100644 index 0000000..280f5b8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskFilledInfo.java @@ -0,0 +1,66 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskFilledInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + private String actorId; + private OpenId actorOpenId; + private String userName; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public OpenId getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(OpenId actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} + diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskFinishedInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskFinishedInfo.java new file mode 100644 index 0000000..c122837 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskFinishedInfo.java @@ -0,0 +1,37 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskFinishedInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskSignFailedInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignFailedInfo.java new file mode 100644 index 0000000..d6fdf07 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignFailedInfo.java @@ -0,0 +1,74 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * @date 2021/11/16 17:48:28 + */ +public class SignTaskSignFailedInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + private String actorId; + private OpenId actorOpenId; + private Boolean verifyFreeSign; + private String signFailedReason; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public OpenId getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(OpenId actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public Boolean getVerifyFreeSign() { + return verifyFreeSign; + } + + public void setVerifyFreeSign(Boolean verifyFreeSign) { + this.verifyFreeSign = verifyFreeSign; + } + + public String getSignFailedReason() { + return signFailedReason; + } + + public void setSignFailedReason(String signFailedReason) { + this.signFailedReason = signFailedReason; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskSignRejectedInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignRejectedInfo.java new file mode 100644 index 0000000..45420a5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignRejectedInfo.java @@ -0,0 +1,74 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskSignRejectedInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + private String actorId; + private OpenId actorOpenId; + private String signRejectReason; + private String userName; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public OpenId getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(OpenId actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public String getSignRejectReason() { + return signRejectReason; + } + + public void setSignRejectReason(String signRejectReason) { + this.signRejectReason = signRejectReason; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/SignTaskSignedInfo.java b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignedInfo.java new file mode 100644 index 0000000..8d32c58 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/SignTaskSignedInfo.java @@ -0,0 +1,74 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class SignTaskSignedInfo extends BaseBean { + private String eventTime; + private String signTaskId; + private String signTaskStatus; + private String actorId; + private OpenId actorOpenId; + private Boolean verifyFreeSign; + private String userName; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public OpenId getActorOpenId() { + return actorOpenId; + } + + public void setActorOpenId(OpenId actorOpenId) { + this.actorOpenId = actorOpenId; + } + + public Boolean getVerifyFreeSign() { + return verifyFreeSign; + } + + public void setVerifyFreeSign(Boolean verifyFreeSign) { + this.verifyFreeSign = verifyFreeSign; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/event/UserAuthorizedInfo.java b/src/com/fasc/open/api/v5_1/res/event/UserAuthorizedInfo.java new file mode 100644 index 0000000..de1adcb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/event/UserAuthorizedInfo.java @@ -0,0 +1,93 @@ +package com.fasc.open.api.v5_1.res.event; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/21 15:49:48 + */ +public class UserAuthorizedInfo extends BaseBean { + private String eventTime; + private String openUserId; + private String authResult; + private String authFailedReason; + private List authScope; + private String identProcessStatus; + private String identMethod; + private String identFailedReason; + private String clientUserId; + + public String getEventTime() { + return eventTime; + } + + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } + + public String getAuthResult() { + return authResult; + } + + public void setAuthResult(String authResult) { + this.authResult = authResult; + } + + public String getAuthFailedReason() { + return authFailedReason; + } + + public void setAuthFailedReason(String authFailedReason) { + this.authFailedReason = authFailedReason; + } + + public List getAuthScope() { + return authScope; + } + + public void setAuthScope(List authScope) { + this.authScope = authScope; + } + + public String getIdentProcessStatus() { + return identProcessStatus; + } + + public void setIdentProcessStatus(String identProcessStatus) { + this.identProcessStatus = identProcessStatus; + } + + public String getIdentMethod() { + return identMethod; + } + + public void setIdentMethod(String identMethod) { + this.identMethod = identMethod; + } + + public String getIdentFailedReason() { + return identFailedReason; + } + + public void setIdentFailedReason(String identFailedReason) { + this.identFailedReason = identFailedReason; + } + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/CorpDeptInfo.java b/src/com/fasc/open/api/v5_1/res/org/CorpDeptInfo.java new file mode 100644 index 0000000..fc9a914 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/CorpDeptInfo.java @@ -0,0 +1,48 @@ +package com.fasc.open.api.v5_1.res.org; + +/** + * @author Fadada + * @date 2022/11/23 15:53 + */ +public class CorpDeptInfo { + + private Long deptId; + + private String deptName; + + private Integer deptOrderNum; + + private Long parentDeptId; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Integer getDeptOrderNum() { + return deptOrderNum; + } + + public void setDeptOrderNum(Integer deptOrderNum) { + this.deptOrderNum = deptOrderNum; + } + + public Long getParentDeptId() { + return parentDeptId; + } + + public void setParentDeptId(Long parentDeptId) { + this.parentDeptId = parentDeptId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/CreateCorpDeptRes.java b/src/com/fasc/open/api/v5_1/res/org/CreateCorpDeptRes.java new file mode 100644 index 0000000..47b0a24 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/CreateCorpDeptRes.java @@ -0,0 +1,27 @@ +package com.fasc.open.api.v5_1.res.org; + +/** + * @author Fadada + * @date 2022/11/23 15:55 + */ +public class CreateCorpDeptRes { + + private Long deptId; + private Integer deptOrderNum; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public Integer getDeptOrderNum() { + return deptOrderNum; + } + + public void setDeptOrderNum(Integer deptOrderNum) { + this.deptOrderNum = deptOrderNum; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/EmployeeInfo.java b/src/com/fasc/open/api/v5_1/res/org/EmployeeInfo.java new file mode 100644 index 0000000..7d70920 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/EmployeeInfo.java @@ -0,0 +1,85 @@ +package com.fasc.open.api.v5_1.res.org; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class EmployeeInfo extends BaseBean { + private Long memberId; + private String memberName; + private String internalIdentifier; + private String memberEmail; + private String memberMobile; + private String memberStatus; + private List memberDeptIds; + private List roleType; + + + public String getMemberMobile() { + return memberMobile; + } + + public void setMemberMobile(String memberMobile) { + this.memberMobile = memberMobile; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public String getMemberStatus() { + return memberStatus; + } + + public void setMemberStatus(String memberStatus) { + this.memberStatus = memberStatus; + } + + public List getRoleType() { + return roleType; + } + + public void setRoleType(List roleType) { + this.roleType = roleType; + } + + public List getMemberDeptIds() { + return memberDeptIds; + } + + public void setMemberDeptIds(List memberDeptIds) { + this.memberDeptIds = memberDeptIds; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/GetCorpDeptDetailRes.java b/src/com/fasc/open/api/v5_1/res/org/GetCorpDeptDetailRes.java new file mode 100644 index 0000000..269ec02 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/GetCorpDeptDetailRes.java @@ -0,0 +1,45 @@ +package com.fasc.open.api.v5_1.res.org; + +/** + * @author Fadada + * @date 2022/11/23 15:54 + */ +public class GetCorpDeptDetailRes { + + private Long deptId; + private String deptName; + private Integer deptOrderNum; + private Long parentDeptId; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Integer getDeptOrderNum() { + return deptOrderNum; + } + + public void setDeptOrderNum(Integer deptOrderNum) { + this.deptOrderNum = deptOrderNum; + } + + public Long getParentDeptId() { + return parentDeptId; + } + + public void setParentDeptId(Long parentDeptId) { + this.parentDeptId = parentDeptId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/GetCorpMemberDetailRes.java b/src/com/fasc/open/api/v5_1/res/org/GetCorpMemberDetailRes.java new file mode 100644 index 0000000..a620ced --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/GetCorpMemberDetailRes.java @@ -0,0 +1,83 @@ +package com.fasc.open.api.v5_1.res.org; + +import java.util.List; + +/** + * @author Fadada + * @date 2022/11/23 17:48 + */ +public class GetCorpMemberDetailRes { + + private Long memberId; + private String memberName; + private String internalIdentifier; + private String memberEmail; + private String fddId; + private String memberStatus; + private List memberDeptIds; + private List roleType; + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public String getFddId() { + return fddId; + } + + public void setFddId(String fddId) { + this.fddId = fddId; + } + + public String getMemberStatus() { + return memberStatus; + } + + public void setMemberStatus(String memberStatus) { + this.memberStatus = memberStatus; + } + + public List getMemberDeptIds() { + return memberDeptIds; + } + + public void setMemberDeptIds(List memberDeptIds) { + this.memberDeptIds = memberDeptIds; + } + + public List getRoleType() { + return roleType; + } + + public void setRoleType(List roleType) { + this.roleType = roleType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/GetCorpOrgManageUrlRes.java b/src/com/fasc/open/api/v5_1/res/org/GetCorpOrgManageUrlRes.java new file mode 100644 index 0000000..09bc5d8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/GetCorpOrgManageUrlRes.java @@ -0,0 +1,18 @@ +package com.fasc.open.api.v5_1.res.org; + +/** + * @author Fadada + * @date 2022/11/23 18:10 + */ +public class GetCorpOrgManageUrlRes { + + private String resourceUrl; + + public String getResourceUrl() { + return resourceUrl; + } + + public void setResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/GetMemberListRes.java b/src/com/fasc/open/api/v5_1/res/org/GetMemberListRes.java new file mode 100644 index 0000000..3301c8d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/GetMemberListRes.java @@ -0,0 +1,57 @@ +package com.fasc.open.api.v5_1.res.org; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetMemberListRes extends BaseBean { + private List employeeInfos; + private Integer listPageNo; + private Integer countInPage; + private Integer listPageCount; + private Integer totalCount; + + public List getEmployeeInfos() { + return employeeInfos; + } + + public void setEmployeeInfos(List employeeInfos) { + this.employeeInfos = employeeInfos; + } + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getCountInPage() { + return countInPage; + } + + public void setCountInPage(Integer countInPage) { + this.countInPage = countInPage; + } + + public Integer getListPageCount() { + return listPageCount; + } + + public void setListPageCount(Integer listPageCount) { + this.listPageCount = listPageCount; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/org/SimpleEmployeeInfo.java b/src/com/fasc/open/api/v5_1/res/org/SimpleEmployeeInfo.java new file mode 100644 index 0000000..cc38db0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/org/SimpleEmployeeInfo.java @@ -0,0 +1,36 @@ +package com.fasc.open.api.v5_1.res.org; + +/** + * @author Fadada + * @date 2022/11/23 17:49 + */ +public class SimpleEmployeeInfo { + + private Long memberId; + private String memberActiveUrl; + private String memberActiveEmbedUrl; + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberActiveUrl() { + return memberActiveUrl; + } + + public void setMemberActiveUrl(String memberActiveUrl) { + this.memberActiveUrl = memberActiveUrl; + } + + public String getMemberActiveEmbedUrl() { + return memberActiveEmbedUrl; + } + + public void setMemberActiveEmbedUrl(String memberActiveEmbedUrl) { + this.memberActiveEmbedUrl = memberActiveEmbedUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/FreeSignInfo.java b/src/com/fasc/open/api/v5_1/res/seal/FreeSignInfo.java new file mode 100644 index 0000000..5aeb539 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/FreeSignInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:49 + */ +public class FreeSignInfo extends BaseBean { + private String businessId; + private String businessScene; + private String businessSceneExp; + private String expiresTime; + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getBusinessScene() { + return businessScene; + } + + public void setBusinessScene(String businessScene) { + this.businessScene = businessScene; + } + + public String getBusinessSceneExp() { + return businessSceneExp; + } + + public void setBusinessSceneExp(String businessSceneExp) { + this.businessSceneExp = businessSceneExp; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetAppointedSealUrlRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetAppointedSealUrlRes.java new file mode 100644 index 0000000..8c4ac88 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetAppointedSealUrlRes.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetAppointedSealUrlRes extends BaseBean { + + /** + * 指定印章的管理页面链接 + */ + private String appointedSealUrl; + + public String getAppointedSealUrl() { + return appointedSealUrl; + } + + public void setAppointedSealUrl(String appointedSealUrl) { + this.appointedSealUrl = appointedSealUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetListSealInfo.java b/src/com/fasc/open/api/v5_1/res/seal/GetListSealInfo.java new file mode 100644 index 0000000..86a4b19 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetListSealInfo.java @@ -0,0 +1,102 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetListSealInfo extends BaseBean { + private Long sealId; + private String sealName; + private String sealTag; + private String categoryType; + private String picFileUrl; + private String sealStatus; + private String createTime; + private String certCAOrg; + private String certEncryptType; + private List sealUsers; + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getPicFileUrl() { + return picFileUrl; + } + + public void setPicFileUrl(String picFileUrl) { + this.picFileUrl = picFileUrl; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getCertEncryptType() { + return certEncryptType; + } + + public void setCertEncryptType(String certEncryptType) { + this.certEncryptType = certEncryptType; + } + + public List getSealUsers() { + return sealUsers; + } + + public void setSealUsers(List sealUsers) { + this.sealUsers = sealUsers; + } + + public String getSealTag() { + return sealTag; + } + + public void setSealTag(String sealTag) { + this.sealTag = sealTag; + } + + public String getSealStatus() { + return sealStatus; + } + + public void setSealStatus(String sealStatus) { + this.sealStatus = sealStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetListSealUser.java b/src/com/fasc/open/api/v5_1/res/seal/GetListSealUser.java new file mode 100644 index 0000000..8ed5845 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetListSealUser.java @@ -0,0 +1,91 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetListSealUser extends BaseBean { + private Long memberId; + private String memberName; + private String internalIdentifier; + private String memberEmail; + private String memberMobile; + private String grantStatus; + private String grantTime; + private String grantStartTime; + private String grantEndTime; + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public String getMemberMobile() { + return memberMobile; + } + + public void setMemberMobile(String memberMobile) { + this.memberMobile = memberMobile; + } + + public String getGrantStatus() { + return grantStatus; + } + + public void setGrantStatus(String grantStatus) { + this.grantStatus = grantStatus; + } + + public String getGrantTime() { + return grantTime; + } + + public void setGrantTime(String grantTime) { + this.grantTime = grantTime; + } + + public String getGrantStartTime() { + return grantStartTime; + } + + public void setGrantStartTime(String grantStartTime) { + this.grantStartTime = grantStartTime; + } + + public String getGrantEndTime() { + return grantEndTime; + } + + public void setGrantEndTime(String grantEndTime) { + this.grantEndTime = grantEndTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetPersonalSealListRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetPersonalSealListRes.java new file mode 100644 index 0000000..2a84735 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetPersonalSealListRes.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:47 + */ +public class GetPersonalSealListRes extends BaseBean { + private List sealInfos; + + public List getSealInfos() { + return sealInfos; + } + + public void setSealInfos(List sealInfos) { + this.sealInfos = sealInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealCreateUrlRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealCreateUrlRes.java new file mode 100644 index 0000000..76a2f28 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealCreateUrlRes.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealCreateUrlRes extends BaseBean { + + /** + * 创建印章的页面链接 + */ + private String sealCreateUrl; + + public String getSealCreateUrl() { + return sealCreateUrl; + } + + public void setSealCreateUrl(String sealCreateUrl) { + this.sealCreateUrl = sealCreateUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealDetailRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealDetailRes.java new file mode 100644 index 0000000..4b6745c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealDetailRes.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealDetailRes extends BaseBean { + + private SealDetailInfo sealInfo; + + public SealDetailInfo getSealInfo() { + return sealInfo; + } + + public void setSealInfo(SealDetailInfo sealInfo) { + this.sealInfo = sealInfo; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealFreeSignUrlRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealFreeSignUrlRes.java new file mode 100644 index 0000000..1412598 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealFreeSignUrlRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:34 + */ +public class GetSealFreeSignUrlRes extends BaseBean { + private String freeSignUrl; + private String freeSignShortUrl; + + public String getFreeSignUrl() { + return freeSignUrl; + } + + public void setFreeSignUrl(String freeSignUrl) { + this.freeSignUrl = freeSignUrl; + } + + public String getFreeSignShortUrl() { + return freeSignShortUrl; + } + + public void setFreeSignShortUrl(String freeSignShortUrl) { + this.freeSignShortUrl = freeSignShortUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealGrantUrlRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealGrantUrlRes.java new file mode 100644 index 0000000..e3d2dc6 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealGrantUrlRes.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealGrantUrlRes extends BaseBean { + + /** + * 印章授权的页面链接 + */ + private String sealGrantUrl; + + public String getSealGrantUrl() { + return sealGrantUrl; + } + + public void setSealGrantUrl(String sealGrantUrl) { + this.sealGrantUrl = sealGrantUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealListRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealListRes.java new file mode 100644 index 0000000..cfb69de --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealListRes.java @@ -0,0 +1,22 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealListRes extends BaseBean { + + private List sealInfos; + + public List getSealInfos() { + return sealInfos; + } + + public void setSealInfos(List sealInfos) { + this.sealInfos = sealInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealManageUrlRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealManageUrlRes.java new file mode 100644 index 0000000..8bcf255 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealManageUrlRes.java @@ -0,0 +1,23 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealManageUrlRes extends BaseBean { + + /** + * 管理印章的页面链接 + */ + private String resourceUrl; + + public String getResourceUrl() { + return resourceUrl; + } + + public void setResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealUserListRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealUserListRes.java new file mode 100644 index 0000000..38c541e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealUserListRes.java @@ -0,0 +1,22 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetSealUserListRes extends BaseBean { + + private List sealUsers; + + public List getSealUsers() { + return sealUsers; + } + + public void setSealUsers(List sealUsers) { + this.sealUsers = sealUsers; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetSealVerifyListRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetSealVerifyListRes.java new file mode 100644 index 0000000..8fd3e9f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetSealVerifyListRes.java @@ -0,0 +1,116 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetSealVerifyListRes extends BaseBean { + + private List verifyInfos; + + public List getVerifyInfos() { + return verifyInfos; + } + + public void setVerifyInfos(List verifyInfos) { + this.verifyInfos = verifyInfos; + } + + public static class VerifyInfo { + /** + * 印章审核工单ID + */ + private Long verifyId; + + /** + * 印章名称 + */ + private String sealName; + + /** + * 印章类型:official_seal-法定名称章(公章), contract_seal-合同专用章, hr_seal-人事专用章, financial_seal-财务专用章, legal_representative_seal-法定代表人名章, other-其他 + */ + private String categoryType; + + /** + * 印章章模图片文件 + */ + private String picFileId; + + /** + * 印章图片地址 + */ + private String picFileUrl; + + /** + * 印章创建时间 + */ + private String createTime; + + /** + * 印章审核状态:verifing-审核中,verify_failed-审核不通过 + */ + private String verifyStatus; + + public Long getVerifyId() { + return verifyId; + } + + public void setVerifyId(Long verifyId) { + this.verifyId = verifyId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getPicFileId() { + return picFileId; + } + + public void setPicFileId(String picFileId) { + this.picFileId = picFileId; + } + + public String getPicFileUrl() { + return picFileUrl; + } + + public void setPicFileUrl(String picFileUrl) { + this.picFileUrl = picFileUrl; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getVerifyStatus() { + return verifyStatus; + } + + public void setVerifyStatus(String verifyStatus) { + this.verifyStatus = verifyStatus; + } + } + +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealInfo.java b/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealInfo.java new file mode 100644 index 0000000..97fb04a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealInfo.java @@ -0,0 +1,109 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetUserListSealInfo extends BaseBean { + private Long sealId; + private String sealName; + private String categoryType; + private String picFileUrl; + private String sealStatus; + private String certCAOrg; + private String certEncryptType; + private String grantTime; + private String grantStartTime; + private String grantEndTime; + private String grantStatus; + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getPicFileUrl() { + return picFileUrl; + } + + public void setPicFileUrl(String picFileUrl) { + this.picFileUrl = picFileUrl; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getCertEncryptType() { + return certEncryptType; + } + + public void setCertEncryptType(String certEncryptType) { + this.certEncryptType = certEncryptType; + } + + public String getSealStatus() { + return sealStatus; + } + + public void setSealStatus(String sealStatus) { + this.sealStatus = sealStatus; + } + + public String getGrantTime() { + return grantTime; + } + + public void setGrantTime(String grantTime) { + this.grantTime = grantTime; + } + + public String getGrantStartTime() { + return grantStartTime; + } + + public void setGrantStartTime(String grantStartTime) { + this.grantStartTime = grantStartTime; + } + + public String getGrantEndTime() { + return grantEndTime; + } + + public void setGrantEndTime(String grantEndTime) { + this.grantEndTime = grantEndTime; + } + + public String getGrantStatus() { + return grantStatus; + } + + public void setGrantStatus(String grantStatus) { + this.grantStatus = grantStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealUser.java b/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealUser.java new file mode 100644 index 0000000..ffb97df --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetUserListSealUser.java @@ -0,0 +1,67 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/13 + */ +public class GetUserListSealUser extends BaseBean { + private Long memberId; + private String memberName; + private String internalIdentifier; + private String memberEmail; + private String memberMobile; + + private List sealInfos; + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public List getSealInfos() { + return sealInfos; + } + + public void setSealInfos(List sealInfos) { + this.sealInfos = sealInfos; + } + + public String getMemberMobile() { + return memberMobile; + } + + public void setMemberMobile(String memberMobile) { + this.memberMobile = memberMobile; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/GetUserSealListRes.java b/src/com/fasc/open/api/v5_1/res/seal/GetUserSealListRes.java new file mode 100644 index 0000000..e1f14ac --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/GetUserSealListRes.java @@ -0,0 +1,22 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class GetUserSealListRes extends BaseBean { + + private List sealInfos; + + public List getSealInfos() { + return sealInfos; + } + + public void setSealInfos(List sealInfos) { + this.sealInfos = sealInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/PersonalSealInfo.java b/src/com/fasc/open/api/v5_1/res/seal/PersonalSealInfo.java new file mode 100644 index 0000000..7fe7b46 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/PersonalSealInfo.java @@ -0,0 +1,93 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/11/30 15:47 + */ +public class PersonalSealInfo extends BaseBean { + private Long sealId; + private String sealName; + private String categoryType; + private String picFileUrl; + private String sealStatus; + private String createTime; + private String certCAOrg; + private String certEncryptType; + private List freeSignInfos; + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getPicFileUrl() { + return picFileUrl; + } + + public void setPicFileUrl(String picFileUrl) { + this.picFileUrl = picFileUrl; + } + + public String getSealStatus() { + return sealStatus; + } + + public void setSealStatus(String sealStatus) { + this.sealStatus = sealStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getCertEncryptType() { + return certEncryptType; + } + + public void setCertEncryptType(String certEncryptType) { + this.certEncryptType = certEncryptType; + } + + public List getFreeSignInfos() { + return freeSignInfos; + } + + public void setFreeSignInfos(List freeSignInfos) { + this.freeSignInfos = freeSignInfos; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/SealDetailInfo.java b/src/com/fasc/open/api/v5_1/res/seal/SealDetailInfo.java new file mode 100644 index 0000000..847c96a --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/SealDetailInfo.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.v5_1.res.seal; + +import java.util.List; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class SealDetailInfo extends SealInfo { + /** + * 企业用印员列表 + */ + private List sealUsers; + + /** + * 授权免验证签信息列表 + */ + private List freeSignInfos; + + public List getSealUsers() { + return sealUsers; + } + + public void setSealUsers(List sealUsers) { + this.sealUsers = sealUsers; + } + + public List getFreeSignInfos() { + return freeSignInfos; + } + + public void setFreeSignInfos(List freeSignInfos) { + this.freeSignInfos = freeSignInfos; + } + + public static class FreeSignInfo{ + /** + * 免验证签场景码 + */ + private String businessId; + /** + * 免验证签业务场景 + */ + private String businessScene; + + private String businessSceneExp; + + private String expiresTime; + + public String getBusinessId() { + return businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getBusinessScene() { + return businessScene; + } + + public void setBusinessScene(String businessScene) { + this.businessScene = businessScene; + } + + public String getBusinessSceneExp() { + return businessSceneExp; + } + + public void setBusinessSceneExp(String businessSceneExp) { + this.businessSceneExp = businessSceneExp; + } + + public String getExpiresTime() { + return expiresTime; + } + + public void setExpiresTime(String expiresTime) { + this.expiresTime = expiresTime; + } + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/SealInfo.java b/src/com/fasc/open/api/v5_1/res/seal/SealInfo.java new file mode 100644 index 0000000..20f5aab --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/SealInfo.java @@ -0,0 +1,126 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class SealInfo extends BaseBean { + /** + * 印章ID,只有系统生成或审核通过的印章才返回 + */ + private Long sealId; + + /** + * 印章名称 + */ + private String sealName; + + /** + * 印章标签 + */ + private String sealTag; + + /** + * 印章类型:official_seal-法定名称章(公章), contract_seal-合同专用章, hr_seal-人事专用章, financial_seal-财务专用章, legal_representative_seal-法定代表人名章, other-其他 + */ + private String categoryType; + + /** + * 印章图片地址 + */ + private String picFileUrl; + + /** + * 印章状态,只有系统生成或审核通过的印章才返回:enable-已启用, disable-已停用, cancelled-已注销 + */ + private String sealStatus; + + /** + * 印章创建时间,精确到毫秒 + */ + private String createTime; + + /** + * 证书颁发机构:CFCA-中国金融认证中心, ZXCA-山东豸信认证服务有限公司, CSCA-世纪数码CA + */ + private String certCAOrg; + + /** + * 证书加密算法类型:国密证书-SM2, 标准证书-RSA + */ + private String certEncryptType; + + public Long getSealId() { + return sealId; + } + + public void setSealId(Long sealId) { + this.sealId = sealId; + } + + public String getSealName() { + return sealName; + } + + public void setSealName(String sealName) { + this.sealName = sealName; + } + + public String getSealTag() { + return sealTag; + } + + public void setSealTag(String sealTag) { + this.sealTag = sealTag; + } + + public String getCategoryType() { + return categoryType; + } + + public void setCategoryType(String categoryType) { + this.categoryType = categoryType; + } + + public String getPicFileUrl() { + return picFileUrl; + } + + public void setPicFileUrl(String picFileUrl) { + this.picFileUrl = picFileUrl; + } + + public String getSealStatus() { + return sealStatus; + } + + public void setSealStatus(String sealStatus) { + this.sealStatus = sealStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getCertEncryptType() { + return certEncryptType; + } + + public void setCertEncryptType(String certEncryptType) { + this.certEncryptType = certEncryptType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/seal/SealUserDetail.java b/src/com/fasc/open/api/v5_1/res/seal/SealUserDetail.java new file mode 100644 index 0000000..4a25330 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/seal/SealUserDetail.java @@ -0,0 +1,113 @@ +package com.fasc.open.api.v5_1.res.seal; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @Author: Fadada + * @Date: 2022/10/8 + */ +public class SealUserDetail extends BaseBean { + /** + * 企业成员ID + */ + private Long memberId; + + /** + * 成员名称 + */ + private String memberName; + + /** + * 成员在企业内部的标识符,如工号等,方便和业务系统对应 + */ + private String internalIdentifier; + + /** + * 企业成员邮箱 + */ + private String memberEmail; + + /** + * 操作授权的时间 + */ + private String grantTime; + + /** + * 该印章被授权用印员的生效时间,如授权长期有效则返回null + */ + private String grantStartTime; + + /** + * 该印章被授权用印员的失效时间,如授权长期有效则返回null + */ + private String grantEndTime; + + /** + * 授权状态:effective-生效中,ineffective-已失效 + */ + private String grantStatus; + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + + public String getInternalIdentifier() { + return internalIdentifier; + } + + public void setInternalIdentifier(String internalIdentifier) { + this.internalIdentifier = internalIdentifier; + } + + public String getMemberEmail() { + return memberEmail; + } + + public void setMemberEmail(String memberEmail) { + this.memberEmail = memberEmail; + } + + public String getGrantTime() { + return grantTime; + } + + public void setGrantTime(String grantTime) { + this.grantTime = grantTime; + } + + public String getGrantStartTime() { + return grantStartTime; + } + + public void setGrantStartTime(String grantStartTime) { + this.grantStartTime = grantStartTime; + } + + public String getGrantEndTime() { + return grantEndTime; + } + + public void setGrantEndTime(String grantEndTime) { + this.grantEndTime = grantEndTime; + } + + public String getGrantStatus() { + return grantStatus; + } + + public void setGrantStatus(String grantStatus) { + this.grantStatus = grantStatus; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/service/AccessTokenRes.java b/src/com/fasc/open/api/v5_1/res/service/AccessTokenRes.java new file mode 100644 index 0000000..a34aa25 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/service/AccessTokenRes.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.res.service; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/10 18:10:03 + */ +public class AccessTokenRes extends BaseBean { + + private String accessToken; + + /** + * 有效期截至时间(毫秒) + */ + private String expiresIn; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getExpiresIn() { + return expiresIn; + } + + public void setExpiresIn(String expiresIn) { + this.expiresIn = expiresIn; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/ApprovalInfoNode.java b/src/com/fasc/open/api/v5_1/res/signtask/ApprovalInfoNode.java new file mode 100644 index 0000000..97b1dee --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/ApprovalInfoNode.java @@ -0,0 +1,48 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ApprovalInfoNode extends BaseBean { + private Long nodeId; + private String approvalType; + private String nodeStatus; + private List approversInfo; + + public Long getNodeId() { + return nodeId; + } + + public void setNodeId(Long nodeId) { + this.nodeId = nodeId; + } + + public String getApprovalType() { + return approvalType; + } + + public void setApprovalType(String approvalType) { + this.approvalType = approvalType; + } + + public String getNodeStatus() { + return nodeStatus; + } + + public void setNodeStatus(String nodeStatus) { + this.nodeStatus = nodeStatus; + } + + public List getApproversInfo() { + return approversInfo; + } + + public void setApproversInfo(List approversInfo) { + this.approversInfo = approversInfo; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/BatchSignUrlRes.java b/src/com/fasc/open/api/v5_1/res/signtask/BatchSignUrlRes.java new file mode 100644 index 0000000..021f61c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/BatchSignUrlRes.java @@ -0,0 +1,18 @@ +package com.fasc.open.api.v5_1.res.signtask; + +/** + * @author Fadada + * @date 2022/11/4 13:47 + */ +public class BatchSignUrlRes { + + private String batchSignUrl; + + public String getBatchSignUrl() { + return batchSignUrl; + } + + public void setBatchSignUrl(String batchSignUrl) { + this.batchSignUrl = batchSignUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/CancelSignTaskCreateRes.java b/src/com/fasc/open/api/v5_1/res/signtask/CancelSignTaskCreateRes.java new file mode 100644 index 0000000..d5fb972 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/CancelSignTaskCreateRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class CancelSignTaskCreateRes { + + String abolishedSignTaskId; + + public String getAbolishedSignTaskId() { + return abolishedSignTaskId; + } + + public void setAbolishedSignTaskId(String abolishedSignTaskId) { + this.abolishedSignTaskId = abolishedSignTaskId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/CreateSignTaskRes.java b/src/com/fasc/open/api/v5_1/res/signtask/CreateSignTaskRes.java new file mode 100644 index 0000000..6eda592 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/CreateSignTaskRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/13 16:28:57 + */ +public class CreateSignTaskRes extends BaseBean { + private String signTaskId; + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetActorAudioVideoRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetActorAudioVideoRes.java new file mode 100644 index 0000000..2f0fff3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetActorAudioVideoRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetActorAudioVideoRes { + + private String downloadUrl; + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetApprovalInfoRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetApprovalInfoRes.java new file mode 100644 index 0000000..37caefa --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetApprovalInfoRes.java @@ -0,0 +1,92 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class GetApprovalInfoRes extends BaseBean { + private String signTaskId; + + private String signTaskSubject; + + private String approvalId; + + private String approvalSubject; + + private String applicantName; + + private String applicationTime; + + private String approvalStatus; + + private List approvalNode; + + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public String getApprovalId() { + return approvalId; + } + + public void setApprovalId(String approvalId) { + this.approvalId = approvalId; + } + + public String getApprovalSubject() { + return approvalSubject; + } + + public void setApprovalSubject(String approvalSubject) { + this.approvalSubject = approvalSubject; + } + + public String getApplicantName() { + return applicantName; + } + + public void setApplicantName(String applicantName) { + this.applicantName = applicantName; + } + + public String getApplicationTime() { + return applicationTime; + } + + public void setApplicationTime(String applicationTime) { + this.applicationTime = applicationTime; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public List getApprovalNode() { + return approvalNode; + } + + public void setApprovalNode(List approvalNode) { + this.approvalNode = approvalNode; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetDownloadEvidenceReportRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetDownloadEvidenceReportRes.java new file mode 100644 index 0000000..b66408e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetDownloadEvidenceReportRes.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +public class GetDownloadEvidenceReportRes extends BaseBean { + private String downloadUrl; + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskBusinessTypeListRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskBusinessTypeListRes.java new file mode 100644 index 0000000..4a69b04 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskBusinessTypeListRes.java @@ -0,0 +1,26 @@ +package com.fasc.open.api.v5_1.res.signtask; + + +import com.fasc.open.api.bean.base.BaseReq; + +public class GetSignTaskBusinessTypeListRes extends BaseReq { + + private Long businessTypeId; + private String businessTypeName; + + public Long getBusinessTypeId() { + return businessTypeId; + } + + public void setBusinessTypeId(Long businessTypeId) { + this.businessTypeId = businessTypeId; + } + + public String getBusinessTypeName() { + return businessTypeName; + } + + public void setBusinessTypeName(String businessTypeName) { + this.businessTypeName = businessTypeName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskDocRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskDocRes.java new file mode 100644 index 0000000..f50a7d7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskDocRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetSignTaskDocRes { + + private String downloadUrl; + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskEditUrlRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskEditUrlRes.java new file mode 100644 index 0000000..c745d1e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskEditUrlRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetSignTaskEditUrlRes { + + private String signTaskEditUrl; + + public String getSignTaskEditUrl() { + return signTaskEditUrl; + } + + public void setSignTaskEditUrl(String signTaskEditUrl) { + this.signTaskEditUrl = signTaskEditUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskFacePictureRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskFacePictureRes.java new file mode 100644 index 0000000..b6d2f6d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskFacePictureRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetSignTaskFacePictureRes{ + + private String picture; + + public String getPicture() { + return picture; + } + + public void setPicture(String picture) { + this.picture = picture; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskListRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskListRes.java new file mode 100644 index 0000000..6b24fe7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskListRes.java @@ -0,0 +1,57 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 16:44:09 + */ +public class GetSignTaskListRes extends BaseBean { + private List signTasks; + private Integer listPageNo; + private Integer countInPage; + private Integer listPageCount; + private Integer totalCount; + + public List getSignTasks() { + return signTasks; + } + + public void setSignTasks(List signTasks) { + this.signTasks = signTasks; + } + + public Integer getListPageNo() { + return listPageNo; + } + + public void setListPageNo(Integer listPageNo) { + this.listPageNo = listPageNo; + } + + public Integer getCountInPage() { + return countInPage; + } + + public void setCountInPage(Integer countInPage) { + this.countInPage = countInPage; + } + + public Integer getListPageCount() { + return listPageCount; + } + + public void setListPageCount(Integer listPageCount) { + this.listPageCount = listPageCount; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPicDocTicketRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPicDocTicketRes.java new file mode 100644 index 0000000..d14de11 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPicDocTicketRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetSignTaskPicDocTicketRes { + + private String slicingTicketId; + + public String getSlicingTicketId() { + return slicingTicketId; + } + + public void setSlicingTicketId(String slicingTicketId) { + this.slicingTicketId = slicingTicketId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPreviewUrlRes.java b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPreviewUrlRes.java new file mode 100644 index 0000000..87bd302 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/GetSignTaskPreviewUrlRes.java @@ -0,0 +1,14 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class GetSignTaskPreviewUrlRes { + + private String signTaskPreviewUrl; + + public String getSignTaskPreviewUrl() { + return signTaskPreviewUrl; + } + + public void setSignTaskPreviewUrl(String signTaskPreviewUrl) { + this.signTaskPreviewUrl = signTaskPreviewUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskActorRes.java b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskActorRes.java new file mode 100644 index 0000000..0d0279b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskActorRes.java @@ -0,0 +1,208 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.bean.common.Notification; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.stratey.DefaultJsonStrategy; +import com.fasc.open.api.stratey.JsonStrategy; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ListSignTaskActorRes extends BaseBean { + private String actorId; + private String actorType; + private String actorName; + private List permissions; + @JsonProperty("isInitiator") + private Boolean isInitiator; + private Integer signOrderNo; + private String identNameForMatch; + private String certNoForMatch; + private String joinStatus; + private String joinTime; + private String joinName; + private String joinIdentNo; + private String fillStatus; + private String fillTime; + private String signStatus; + private String actorNote; + private String signTime; + private String blockStatus; + private Notification notification; + private String readStatus; + private String readTime; + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public void setInitiator(Boolean initiator) { + isInitiator = initiator; + } + + public void setSignOrderNo(Integer signOrderNo) { + this.signOrderNo = signOrderNo; + } + + public void setIdentNameForMatch(String identNameForMatch) { + this.identNameForMatch = identNameForMatch; + } + + public void setCertNoForMatch(String certNoForMatch) { + this.certNoForMatch = certNoForMatch; + } + + public void setJoinStatus(String joinStatus) { + this.joinStatus = joinStatus; + } + + public void setJoinTime(String joinTime) { + this.joinTime = joinTime; + } + + public void setJoinName(String joinName) { + this.joinName = joinName; + } + + public void setJoinIdentNo(String joinIdentNo) { + this.joinIdentNo = joinIdentNo; + } + + public void setFillStatus(String fillStatus) { + this.fillStatus = fillStatus; + } + + public void setFillTime(String fillTime) { + this.fillTime = fillTime; + } + + public void setSignStatus(String signStatus) { + this.signStatus = signStatus; + } + + public void setActorNote(String actorNote) { + this.actorNote = actorNote; + } + + public void setSignTime(String signTime) { + this.signTime = signTime; + } + + public void setBlockStatus(String blockStatus) { + this.blockStatus = blockStatus; + } + + public void setNotification(Notification notification) { + this.notification = notification; + } + + public String getActorId() { + return actorId; + } + + public String getActorType() { + return actorType; + } + + public String getActorName() { + return actorName; + } + + public List getPermissions() { + return permissions; + } + + public Boolean getInitiator() { + return isInitiator; + } + + public Integer getSignOrderNo() { + return signOrderNo; + } + + public String getIdentNameForMatch() { + return identNameForMatch; + } + + public String getCertNoForMatch() { + return certNoForMatch; + } + + public String getJoinStatus() { + return joinStatus; + } + + public String getJoinTime() { + return joinTime; + } + + public String getJoinName() { + return joinName; + } + + public String getJoinIdentNo() { + return joinIdentNo; + } + + public String getFillStatus() { + return fillStatus; + } + + public String getFillTime() { + return fillTime; + } + + public String getSignStatus() { + return signStatus; + } + + public String getActorNote() { + return actorNote; + } + + public String getSignTime() { + return signTime; + } + + public String getBlockStatus() { + return blockStatus; + } + + public Notification getNotification() { + return notification; + } + + public String getReadStatus() { + return readStatus; + } + + public void setReadStatus(String readStatus) { + this.readStatus = readStatus; + } + + public String getReadTime() { + return readTime; + } + + public void setReadTime(String readTime) { + this.readTime = readTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFieldRes.java b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFieldRes.java new file mode 100644 index 0000000..2a84fc1 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFieldRes.java @@ -0,0 +1,39 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ListSignTaskFieldRes extends BaseBean { + private Long signTaskId; + private String signTaskSubject; + private List fillFields; + + public Long getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(Long signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public List getFillFields() { + return fillFields; + } + + public void setFillFields(List fillFields) { + this.fillFields = fillFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFillField.java b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFillField.java new file mode 100644 index 0000000..f17cd61 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/ListSignTaskFillField.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class ListSignTaskFillField extends BaseBean { + private String fieldId; + private String fieldName; + private String fieldValue; + private String fieldType; + private String actorId; + private String actorName; + private String docId; + private String docName; + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldValue() { + return fieldValue; + } + + public void setFieldValue(String fieldValue) { + this.fieldValue = fieldValue; + } + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getActorName() { + return actorName; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } + + public String getFieldType() { + return fieldType; + } + + public void setFieldType(String fieldType) { + this.fieldType = fieldType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/MiniAppInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/MiniAppInfo.java new file mode 100644 index 0000000..46c5761 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/MiniAppInfo.java @@ -0,0 +1,24 @@ +package com.fasc.open.api.v5_1.res.signtask; + +public class MiniAppInfo { + + private String wxOriginalId; + + private String path; + + public String getWxOriginalId() { + return wxOriginalId; + } + + public void setWxOriginalId(String wxOriginalId) { + this.wxOriginalId = wxOriginalId; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/signtask/NodeApproverInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/NodeApproverInfo.java new file mode 100644 index 0000000..bd434b0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/NodeApproverInfo.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class NodeApproverInfo extends BaseBean { + private String approverName; + private String approverStatus; + private String operateTime; + private String rejectNote; + + public String getApproverName() { + return approverName; + } + + public void setApproverName(String approverName) { + this.approverName = approverName; + } + + public String getApproverStatus() { + return approverStatus; + } + + public void setApproverStatus(String approverStatus) { + this.approverStatus = approverStatus; + } + + public String getOperateTime() { + return operateTime; + } + + public void setOperateTime(String operateTime) { + this.operateTime = operateTime; + } + + public String getRejectNote() { + return rejectNote; + } + + public void setRejectNote(String rejectNote) { + this.rejectNote = rejectNote; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/OwnerDownloadUrlRes.java b/src/com/fasc/open/api/v5_1/res/signtask/OwnerDownloadUrlRes.java new file mode 100644 index 0000000..386e2b5 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/OwnerDownloadUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/16 17:47:36 + */ +public class OwnerDownloadUrlRes extends BaseBean { + private String downloadUrl; + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskActorGetUrlRes.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskActorGetUrlRes.java new file mode 100644 index 0000000..6b32519 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskActorGetUrlRes.java @@ -0,0 +1,33 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +public class SignTaskActorGetUrlRes extends BaseBean { + private String actorSignTaskUrl; + private String actorSignTaskEmbedUrl; + private MiniAppInfo actorSignTaskMiniAppInfo; + + public String getActorSignTaskUrl() { + return actorSignTaskUrl; + } + + public void setActorSignTaskUrl(String actorSignTaskUrl) { + this.actorSignTaskUrl = actorSignTaskUrl; + } + + public String getActorSignTaskEmbedUrl() { + return actorSignTaskEmbedUrl; + } + + public void setActorSignTaskEmbedUrl(String actorSignTaskEmbedUrl) { + this.actorSignTaskEmbedUrl = actorSignTaskEmbedUrl; + } + + public MiniAppInfo getActorSignTaskMiniAppInfo() { + return actorSignTaskMiniAppInfo; + } + + public void setActorSignTaskMiniAppInfo(MiniAppInfo actorSignTaskMiniAppInfo) { + this.actorSignTaskMiniAppInfo = actorSignTaskMiniAppInfo; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskAttachRes.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskAttachRes.java new file mode 100644 index 0000000..a2f6998 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskAttachRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/13 16:29:37 + */ +public class SignTaskAttachRes extends BaseBean { + private String attachId; + private String attachName; + + public String getAttachId() { + return attachId; + } + + public void setAttachId(String attachId) { + this.attachId = attachId; + } + + public String getAttachName() { + return attachName; + } + + public void setAttachName(String attachName) { + this.attachName = attachName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskCatalogListRes.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskCatalogListRes.java new file mode 100644 index 0000000..6366365 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskCatalogListRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author hukc + * @date 2022年10月31日 + */ +public class SignTaskCatalogListRes extends BaseBean{ + private String catalogId; + private String catalogName; + + public String getCatalogId() { + return catalogId; + } + + public void setCatalogId(String catalogId) { + this.catalogId = catalogId; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActor.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActor.java new file mode 100644 index 0000000..7a8410b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActor.java @@ -0,0 +1,149 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.v5_1.req.signtask.SignFieldRes; + +import java.util.List; + +/** + * @author gongj + * @date 2022/7/12 + */ +public class SignTaskDetailActor extends BaseBean { + private SignTaskDetailActorInfo actorInfo; + private List signFields; + private String joinStatus; + private String joinTime; + private String fillStatus; + private String fillTime; + private String signStatus; + private String signTime; + private Integer signOrderNo; + private String blockStatus; + private String actorNote; + private String actorSignTaskUrl; + private String actorSignTaskEmbedUrl; + private String readStatus; + private String readTime; + + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } + + public String getActorNote() { + return actorNote; + } + + public void setActorNote(String actorNote) { + this.actorNote = actorNote; + } + + public String getActorSignTaskEmbedUrl() { + return actorSignTaskEmbedUrl; + } + + public void setActorSignTaskEmbedUrl(String actorSignTaskEmbedUrl) { + this.actorSignTaskEmbedUrl = actorSignTaskEmbedUrl; + } + + public SignTaskDetailActorInfo getActorInfo() { + return actorInfo; + } + + public void setActorInfo(SignTaskDetailActorInfo actorInfo) { + this.actorInfo = actorInfo; + } + + public String getJoinStatus() { + return joinStatus; + } + + public void setJoinStatus(String joinStatus) { + this.joinStatus = joinStatus; + } + + public String getJoinTime() { + return joinTime; + } + + public void setJoinTime(String joinTime) { + this.joinTime = joinTime; + } + + public String getFillStatus() { + return fillStatus; + } + + public void setFillStatus(String fillStatus) { + this.fillStatus = fillStatus; + } + + public String getFillTime() { + return fillTime; + } + + public void setFillTime(String fillTime) { + this.fillTime = fillTime; + } + + public String getSignStatus() { + return signStatus; + } + + public void setSignStatus(String signStatus) { + this.signStatus = signStatus; + } + + public String getSignTime() { + return signTime; + } + + public void setSignTime(String signTime) { + this.signTime = signTime; + } + + public Integer getSignOrderNo() { + return signOrderNo; + } + + public void setSignOrderNo(Integer signOrderNo) { + this.signOrderNo = signOrderNo; + } + + public String getBlockStatus() { + return blockStatus; + } + + public void setBlockStatus(String blockStatus) { + this.blockStatus = blockStatus; + } + + public String getActorSignTaskUrl() { + return actorSignTaskUrl; + } + + public void setActorSignTaskUrl(String actorSignTaskUrl) { + this.actorSignTaskUrl = actorSignTaskUrl; + } + + public String getReadStatus() { + return readStatus; + } + + public void setReadStatus(String readStatus) { + this.readStatus = readStatus; + } + + public String getReadTime() { + return readTime; + } + + public void setReadTime(String readTime) { + this.readTime = readTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActorInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActorInfo.java new file mode 100644 index 0000000..7110f77 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailActorInfo.java @@ -0,0 +1,59 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 16:53:59 + */ +public class SignTaskDetailActorInfo extends BaseBean { + private String actorId; + private String actorType; + private String actorName; + private List permissions; + @JsonProperty("isInitiator") + private Boolean isInitiator; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public String getActorName() { + return actorName; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public Boolean getInitiator() { + return isInitiator; + } + + public void setInitiator(Boolean initiator) { + isInitiator = initiator; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailFillActorInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailFillActorInfo.java new file mode 100644 index 0000000..6dde8b4 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailFillActorInfo.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +/** + * @author Fadada + * 2021/9/13 16:53:59 + */ +public class SignTaskDetailFillActorInfo extends BaseBean { + private Actor fillActor; + private Integer orderNo; + private String fillActorStatus; + private String actionTime; + + public Actor getFillActor() { + return fillActor; + } + + public void setFillActor(Actor fillActor) { + this.fillActor = fillActor; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getFillActorStatus() { + return fillActorStatus; + } + + public void setFillActorStatus(String fillActorStatus) { + this.fillActorStatus = fillActorStatus; + } + + public String getActionTime() { + return actionTime; + } + + public void setActionTime(String actionTime) { + this.actionTime = actionTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailRes.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailRes.java new file mode 100644 index 0000000..5d8f687 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailRes.java @@ -0,0 +1,265 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.OpenId; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/13 16:44:09 + */ +public class SignTaskDetailRes extends BaseBean { + private OpenId initiator; + private String signTaskId; + private String signTaskSubject; + private String storageType; + private String signDocType; + private String signTaskStatus; + private String createTime; + private String signTaskSource; + private String approvalStatus; + private String rejectNote; + private String businessTypeName; + private String businessCode; + private String templateId; + private String startTime; + private String finishTime; + private String deadlineTime; + private String terminationNote; + private String certCAOrg; + private Long businessTypeId; + private String revokeReason; + private Boolean autoFillFinalize; + private Boolean autoFinish; + private Boolean signInOrder; + private String abolishedSignTaskId; + private String originalSignTaskId; + private List docs; + private List attachs; + private List actors; + + public String getSignDocType() { + return signDocType; + } + + public void setSignDocType(String signDocType) { + this.signDocType = signDocType; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + + public OpenId getInitiator() { + return initiator; + } + + public void setInitiator(OpenId initiator) { + this.initiator = initiator; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } + + public String getSignTaskSource() { + return signTaskSource; + } + + public void setSignTaskSource(String signTaskSource) { + this.signTaskSource = signTaskSource; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getRejectNote() { + return rejectNote; + } + + public void setRejectNote(String rejectNote) { + this.rejectNote = rejectNote; + } + + public String getBusinessTypeName() { + return businessTypeName; + } + + public void setBusinessTypeName(String businessTypeName) { + this.businessTypeName = businessTypeName; + } + + public String getBusinessCode() { + return businessCode; + } + + public void setBusinessCode(String businessCode) { + this.businessCode = businessCode; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getFinishTime() { + return finishTime; + } + + public void setFinishTime(String finishTime) { + this.finishTime = finishTime; + } + + public String getDeadlineTime() { + return deadlineTime; + } + + public void setDeadlineTime(String deadlineTime) { + this.deadlineTime = deadlineTime; + } + + public String getTerminationNote() { + return terminationNote; + } + + public void setTerminationNote(String terminationNote) { + this.terminationNote = terminationNote; + } + + public Long getBusinessTypeId() { + return businessTypeId; + } + + public void setBusinessTypeId(Long businessTypeId) { + this.businessTypeId = businessTypeId; + } + + public String getRevokeReason() { + return revokeReason; + } + + public void setRevokeReason(String revokeReason) { + this.revokeReason = revokeReason; + } + + public Boolean getAutoFillFinalize() { + return autoFillFinalize; + } + + public void setAutoFillFinalize(Boolean autoFillFinalize) { + this.autoFillFinalize = autoFillFinalize; + } + + public Boolean getAutoFinish() { + return autoFinish; + } + + public void setAutoFinish(Boolean autoFinish) { + this.autoFinish = autoFinish; + } + + public Boolean getSignInOrder() { + return signInOrder; + } + + public void setSignInOrder(Boolean signInOrder) { + this.signInOrder = signInOrder; + } + + public String getAbolishedSignTaskId() { + return abolishedSignTaskId; + } + + public void setAbolishedSignTaskId(String abolishedSignTaskId) { + this.abolishedSignTaskId = abolishedSignTaskId; + } + + public String getOriginalSignTaskId() { + return originalSignTaskId; + } + + public void setOriginalSignTaskId(String originalSignTaskId) { + this.originalSignTaskId = originalSignTaskId; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailSignActorInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailSignActorInfo.java new file mode 100644 index 0000000..d815519 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDetailSignActorInfo.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Actor; + +/** + * @author Fadada + * 2021/9/13 16:53:01 + */ +public class SignTaskDetailSignActorInfo extends BaseBean { + private Actor signActor; + private Integer orderNo; + private String signActorStatus; + private String actionTime; + + public Actor getSignActor() { + return signActor; + } + + public void setSignActor(Actor signActor) { + this.signActor = signActor; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getSignActorStatus() { + return signActorStatus; + } + + public void setSignActorStatus(String signActorStatus) { + this.signActorStatus = signActorStatus; + } + + public String getActionTime() { + return actionTime; + } + + public void setActionTime(String actionTime) { + this.actionTime = actionTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDocRes.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDocRes.java new file mode 100644 index 0000000..9bb62e3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskDocRes.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/13 16:29:37 + */ +public class SignTaskDocRes extends BaseBean { + private String docId; + private String docName; + + public String getDocId() { + return docId; + } + + public void setDocId(String docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/signtask/SignTaskInfo.java b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskInfo.java new file mode 100644 index 0000000..460c155 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/signtask/SignTaskInfo.java @@ -0,0 +1,219 @@ +package com.fasc.open.api.v5_1.res.signtask; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/13 16:44:09 + */ +public class SignTaskInfo extends BaseBean { + + private String signTaskId; + private String transReferenceId; + private String signTaskSubject; + private String signTaskStatus; + private String initiatorName; + private String actorName; + private String createTime; + private String finishTime; + private String catalogName; + private Long catalogId; + private String deadlineTime; + private String startTime; + private String templateId; + private String businessCode; + private Long businessTypeId; + private String businessTypeName; + private String rejectNote; + private String approvalStatus; + private String signTaskSource; + private String terminationNote; + private String abolishedSignTaskId; + private String originalSignTaskId; + private String revokeReason; + + + public String getSignTaskId() { + return signTaskId; + } + + public void setSignTaskId(String signTaskId) { + this.signTaskId = signTaskId; + } + + public String getTransReferenceId() { + return transReferenceId; + } + + public void setTransReferenceId(String transReferenceId) { + this.transReferenceId = transReferenceId; + } + + public String getSignTaskSubject() { + return signTaskSubject; + } + + public void setSignTaskSubject(String signTaskSubject) { + this.signTaskSubject = signTaskSubject; + } + + public String getSignTaskStatus() { + return signTaskStatus; + } + + public void setSignTaskStatus(String signTaskStatus) { + this.signTaskStatus = signTaskStatus; + } + + public String getInitiatorName() { + return initiatorName; + } + + public void setInitiatorName(String initiatorName) { + this.initiatorName = initiatorName; + } + + public String getActorName() { + return actorName; + } + + public void setActorName(String actorName) { + this.actorName = actorName; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getFinishTime() { + return finishTime; + } + + public void setFinishTime(String finishTime) { + this.finishTime = finishTime; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public Long getCatalogId() { + return catalogId; + } + + public void setCatalogId(Long catalogId) { + this.catalogId = catalogId; + } + + public String getDeadlineTime() { + return deadlineTime; + } + + public void setDeadlineTime(String deadlineTime) { + this.deadlineTime = deadlineTime; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getBusinessCode() { + return businessCode; + } + + public void setBusinessCode(String businessCode) { + this.businessCode = businessCode; + } + + public String getBusinessTypeName() { + return businessTypeName; + } + + public void setBusinessTypeName(String businessTypeName) { + this.businessTypeName = businessTypeName; + } + + public String getRejectNote() { + return rejectNote; + } + + public void setRejectNote(String rejectNote) { + this.rejectNote = rejectNote; + } + + public String getApprovalStatus() { + return approvalStatus; + } + + public void setApprovalStatus(String approvalStatus) { + this.approvalStatus = approvalStatus; + } + + public String getSignTaskSource() { + return signTaskSource; + } + + public void setSignTaskSource(String signTaskSource) { + this.signTaskSource = signTaskSource; + } + + public String getTerminationNote() { + return terminationNote; + } + + public void setTerminationNote(String terminationNote) { + this.terminationNote = terminationNote; + } + + public Long getBusinessTypeId() { + return businessTypeId; + } + + public void setBusinessTypeId(Long businessTypeId) { + this.businessTypeId = businessTypeId; + } + + public String getAbolishedSignTaskId() { + return abolishedSignTaskId; + } + + public void setAbolishedSignTaskId(String abolishedSignTaskId) { + this.abolishedSignTaskId = abolishedSignTaskId; + } + + public String getOriginalSignTaskId() { + return originalSignTaskId; + } + + public void setOriginalSignTaskId(String originalSignTaskId) { + this.originalSignTaskId = originalSignTaskId; + } + + public String getRevokeReason() { + return revokeReason; + } + + public void setRevokeReason(String revokeReason) { + this.revokeReason = revokeReason; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/ActorInfo.java b/src/com/fasc/open/api/v5_1/res/template/ActorInfo.java new file mode 100644 index 0000000..b2fe8cb --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/ActorInfo.java @@ -0,0 +1,54 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author gongj + * @date 2022/6/22 + */ +public class ActorInfo extends BaseBean { + + private String actorId; + + private String actorType; + + @JsonProperty("isInitiator") + private Boolean isInitiator; + + private List permissions; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public Boolean getInitiator() { + return isInitiator; + } + + public void setInitiator(Boolean initiator) { + isInitiator = initiator; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/AppDocTemplateDetailRes.java b/src/com/fasc/open/api/v5_1/res/template/AppDocTemplateDetailRes.java new file mode 100644 index 0000000..9fd231b --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/AppDocTemplateDetailRes.java @@ -0,0 +1,49 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:19 + */ +public class AppDocTemplateDetailRes extends BaseBean { + private String appDocTemplateId; + private String appDocTemplateName; + private String appDocTemplateStatus; + private List docFields; + + public String getAppDocTemplateId() { + return appDocTemplateId; + } + + public void setAppDocTemplateId(String appDocTemplateId) { + this.appDocTemplateId = appDocTemplateId; + } + + public String getAppDocTemplateName() { + return appDocTemplateName; + } + + public void setAppDocTemplateName(String appDocTemplateName) { + this.appDocTemplateName = appDocTemplateName; + } + + public String getAppDocTemplateStatus() { + return appDocTemplateStatus; + } + + public void setAppDocTemplateStatus(String appDocTemplateStatus) { + this.appDocTemplateStatus = appDocTemplateStatus; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/AppDocTemplatePageListRes.java b/src/com/fasc/open/api/v5_1/res/template/AppDocTemplatePageListRes.java new file mode 100644 index 0000000..2f6d8a1 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/AppDocTemplatePageListRes.java @@ -0,0 +1,69 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BasePageRes; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:09 + */ +public class AppDocTemplatePageListRes extends BasePageRes { + private List appDocTemplates; + + public List getAppDocTemplates() { + return appDocTemplates; + } + + public void setAppDocTemplates(List appDocTemplates) { + this.appDocTemplates = appDocTemplates; + } + + public static class DocAppTemplate { + private String appDocTemplateId; + private String appDocTemplateName; + private String appDocTemplateStatus; + private String createTime; + private String updateTime; + + public String getAppDocTemplateId() { + return appDocTemplateId; + } + + public void setAppDocTemplateId(String appDocTemplateId) { + this.appDocTemplateId = appDocTemplateId; + } + + public String getAppDocTemplateName() { + return appDocTemplateName; + } + + public void setAppDocTemplateName(String appDocTemplateName) { + this.appDocTemplateName = appDocTemplateName; + } + + public String getAppDocTemplateStatus() { + return appDocTemplateStatus; + } + + public void setAppDocTemplateStatus(String appDocTemplateStatus) { + this.appDocTemplateStatus = appDocTemplateStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/AppSignTemplateDetailRes.java b/src/com/fasc/open/api/v5_1/res/template/AppSignTemplateDetailRes.java new file mode 100644 index 0000000..596f9e8 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/AppSignTemplateDetailRes.java @@ -0,0 +1,313 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:30 + */ +public class AppSignTemplateDetailRes extends BaseBean { + private String appSignTemplateId; + private String appSignTemplateName; + private String appSignTemplateStatus; + private String certCAOrg; + private Boolean signInOrder; + private List docs; + private List attachs; + private List actors; + + public String getAppSignTemplateId() { + return appSignTemplateId; + } + + public void setAppSignTemplateId(String appSignTemplateId) { + this.appSignTemplateId = appSignTemplateId; + } + + public String getAppSignTemplateName() { + return appSignTemplateName; + } + + public void setAppSignTemplateName(String appSignTemplateName) { + this.appSignTemplateName = appSignTemplateName; + } + + public String getAppSignTemplateStatus() { + return appSignTemplateStatus; + } + + public void setAppSignTemplateStatus(String appSignTemplateStatus) { + this.appSignTemplateStatus = appSignTemplateStatus; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public Boolean getSignInOrder() { + return signInOrder; + } + + public void setSignInOrder(Boolean signInOrder) { + this.signInOrder = signInOrder; + } + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } + + public static class Attach { + private Integer attachId; + private String attachName; + + public Integer getAttachId() { + return attachId; + } + + public void setAttachId(Integer attachId) { + this.attachId = attachId; + } + + public String getAttachName() { + return attachName; + } + + public void setAttachName(String attachName) { + this.attachName = attachName; + } + } + public static class Doc { + private Integer docId; + private String docName; + private List docFields; + + public Integer getDocId() { + return docId; + } + + public void setDocId(Integer docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } + } + + public static class SignTaskActor { + private ActorInfo actorInfo; + private List fillFields; + private List signFields; + private SignConfigInfo signConfigInfo; + + public ActorInfo getActorInfo() { + return actorInfo; + } + + public void setActorInfo(ActorInfo actorInfo) { + this.actorInfo = actorInfo; + } + + public List getFillFields() { + return fillFields; + } + + public void setFillFields(List fillFields) { + this.fillFields = fillFields; + } + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } + + public SignConfigInfo getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(SignConfigInfo signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } + } + + public static class ActorInfo { + private String actorId; + @JsonProperty("isInitiator") + private Boolean isInitiator; + private String actorType; + private List permissions; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public Boolean getIsInitiator() { + return isInitiator; + } + + public void setIsInitiator(Boolean isInitiator) { + this.isInitiator = isInitiator; + } + + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + } + public static class FillField { + private String fieldDocId; + private String fieldId; + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + } + + public static class SignField { + private String fieldDocId; + private String fieldId; + + public String getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(String fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + } + + public static class SignConfigInfo { + private Integer orderNo; + private Boolean requestMemberSign; + private String signerSignMethod; + private List verifyMethods; + private Boolean readingToEnd; + private String readingTime; + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public Boolean getRequestMemberSign() { + return requestMemberSign; + } + + public void setRequestMemberSign(Boolean requestMemberSign) { + this.requestMemberSign = requestMemberSign; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getReadingToEnd() { + return readingToEnd; + } + + public void setReadingToEnd(Boolean readingToEnd) { + this.readingToEnd = readingToEnd; + } + + public String getReadingTime() { + return readingTime; + } + + public void setReadingTime(String readingTime) { + this.readingTime = readingTime; + } + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/AppSignTemplatePageListRes.java b/src/com/fasc/open/api/v5_1/res/template/AppSignTemplatePageListRes.java new file mode 100644 index 0000000..18eddb0 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/AppSignTemplatePageListRes.java @@ -0,0 +1,69 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BasePageRes; + +import java.util.List; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:27 + */ +public class AppSignTemplatePageListRes extends BasePageRes { + private List appSignTemplates; + + public List getAppSignTemplates() { + return appSignTemplates; + } + + public void setAppSignTemplates(List appSignTemplates) { + this.appSignTemplates = appSignTemplates; + } + + public static class AppSignAppTemplate { + private String appSignTemplateId; + private String appSignTemplateName; + private String appSignTemplateStatus; + private String createTime; + private String updateTime; + + public String getAppSignTemplateId() { + return appSignTemplateId; + } + + public void setAppSignTemplateId(String appSignTemplateId) { + this.appSignTemplateId = appSignTemplateId; + } + + public String getAppSignTemplateName() { + return appSignTemplateName; + } + + public void setAppSignTemplateName(String appSignTemplateName) { + this.appSignTemplateName = appSignTemplateName; + } + + public String getAppSignTemplateStatus() { + return appSignTemplateStatus; + } + + public void setAppSignTemplateStatus(String appSignTemplateStatus) { + this.appSignTemplateStatus = appSignTemplateStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/AttachInfo.java b/src/com/fasc/open/api/v5_1/res/template/AttachInfo.java new file mode 100644 index 0000000..d50864c --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/AttachInfo.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 16:23:15 + */ +public class AttachInfo extends BaseBean { + private Integer attachId; + private String attachName; + + public Integer getAttachId() { + return attachId; + } + + public void setAttachId(Integer attachId) { + this.attachId = attachId; + } + + public String getAttachName() { + return attachName; + } + + public void setAttachName(String attachName) { + this.attachName = attachName; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/DocTemplateDetailRes.java b/src/com/fasc/open/api/v5_1/res/template/DocTemplateDetailRes.java new file mode 100644 index 0000000..f38aef7 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/DocTemplateDetailRes.java @@ -0,0 +1,76 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class DocTemplateDetailRes extends BaseBean { + private String docTemplateId; + private String docTemplateName; + private String docTemplateStatus; + private List docFields; + private String catalogName; + private String createSerialNo; + private String storageType; + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public String getDocTemplateName() { + return docTemplateName; + } + + public void setDocTemplateName(String docTemplateName) { + this.docTemplateName = docTemplateName; + } + + public String getDocTemplateStatus() { + return docTemplateStatus; + } + + public void setDocTemplateStatus(String docTemplateStatus) { + this.docTemplateStatus = docTemplateStatus; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/DocTemplateListInfo.java b/src/com/fasc/open/api/v5_1/res/template/DocTemplateListInfo.java new file mode 100644 index 0000000..ce70cf3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/DocTemplateListInfo.java @@ -0,0 +1,82 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 15:33:01 + */ +public class DocTemplateListInfo extends BaseBean { + private String docTemplateId; + private String docTemplateName; + private String docTemplateStatus; + private String createTime; + private String updateTime; + private String catalogName; + private String createSerialNo; + private String storageType; + + public String getDocTemplateId() { + return docTemplateId; + } + + public void setDocTemplateId(String docTemplateId) { + this.docTemplateId = docTemplateId; + } + + public String getDocTemplateName() { + return docTemplateName; + } + + public void setDocTemplateName(String docTemplateName) { + this.docTemplateName = docTemplateName; + } + + public String getDocTemplateStatus() { + return docTemplateStatus; + } + + public void setDocTemplateStatus(String docTemplateStatus) { + this.docTemplateStatus = docTemplateStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/DocTemplateListRes.java b/src/com/fasc/open/api/v5_1/res/template/DocTemplateListRes.java new file mode 100644 index 0000000..489cb50 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/DocTemplateListRes.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BasePageRes; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class DocTemplateListRes extends BasePageRes { + private List docTemplates; + + public List getDocTemplates() { + return docTemplates; + } + + public void setDocTemplates(List docTemplates) { + this.docTemplates = docTemplates; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/DocumentInfo.java b/src/com/fasc/open/api/v5_1/res/template/DocumentInfo.java new file mode 100644 index 0000000..ffa9d4e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/DocumentInfo.java @@ -0,0 +1,40 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.Field; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/18 11:31:59 + */ +public class DocumentInfo extends BaseBean { + private Integer docId; + private String docName; + private List docFields; + + public Integer getDocId() { + return docId; + } + + public void setDocId(Integer docId) { + this.docId = docId; + } + + public String getDocName() { + return docName; + } + + public void setDocName(String docName) { + this.docName = docName; + } + + public List getDocFields() { + return docFields; + } + + public void setDocFields(List docFields) { + this.docFields = docFields; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/FillActorFieldInfo.java b/src/com/fasc/open/api/v5_1/res/template/FillActorFieldInfo.java new file mode 100644 index 0000000..a0db845 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/FillActorFieldInfo.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/18 11:32:44 + */ +public class FillActorFieldInfo extends BaseBean { + private Integer fieldDocId; + private String fieldId; + + public Integer getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(Integer fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/template/FillActorInfo.java b/src/com/fasc/open/api/v5_1/res/template/FillActorInfo.java new file mode 100644 index 0000000..24e0e67 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/FillActorInfo.java @@ -0,0 +1,48 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/18 11:32:22 + */ +public class FillActorInfo extends BaseBean { + private String actorId; + private Integer orderNo; + private String actorIdentType; + private List fillActorFields; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getActorIdentType() { + return actorIdentType; + } + + public void setActorIdentType(String actorIdentType) { + this.actorIdentType = actorIdentType; + } + + public List getFillActorFields() { + return fillActorFields; + } + + public void setFillActorFields(List fillActorFields) { + this.fillActorFields = fillActorFields; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/template/GetAppFieldListRes.java b/src/com/fasc/open/api/v5_1/res/template/GetAppFieldListRes.java new file mode 100644 index 0000000..55a5ae3 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetAppFieldListRes.java @@ -0,0 +1,46 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:55 + */ +public class GetAppFieldListRes extends BaseBean { + private String fieldKey; + private String fieldName; + private String fieldType; + private String fieldStatus; + + public String getFieldKey() { + return fieldKey; + } + + public void setFieldKey(String fieldKey) { + this.fieldKey = fieldKey; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getFieldType() { + return fieldType; + } + + public void setFieldType(String fieldType) { + this.fieldType = fieldType; + } + + public String getFieldStatus() { + return fieldStatus; + } + + public void setFieldStatus(String fieldStatus) { + this.fieldStatus = fieldStatus; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateCreateUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateCreateUrlRes.java new file mode 100644 index 0000000..6221302 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateCreateUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:42 + */ +public class GetAppTemplateCreateUrlRes extends BaseBean { + private String appTemplateCreateUrl; + + public String getAppTemplateCreateUrl() { + return appTemplateCreateUrl; + } + + public void setAppTemplateCreateUrl(String appTemplateCreateUrl) { + this.appTemplateCreateUrl = appTemplateCreateUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateEditUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateEditUrlRes.java new file mode 100644 index 0000000..ccaf100 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplateEditUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:43 + */ +public class GetAppTemplateEditUrlRes extends BaseBean { + private String appTemplateEditUrl; + + public String getAppTemplateEditUrl() { + return appTemplateEditUrl; + } + + public void setAppTemplateEditUrl(String appTemplateEditUrl) { + this.appTemplateEditUrl = appTemplateEditUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetAppTemplatePreviewUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplatePreviewUrlRes.java new file mode 100644 index 0000000..0abbef1 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetAppTemplatePreviewUrlRes.java @@ -0,0 +1,19 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhoufucheng + * @date 2022/12/25 0025 19:45 + */ +public class GetAppTemplatePreviewUrlRes extends BaseBean { + private String appTemplatePreviewUrl; + + public String getAppTemplatePreviewUrl() { + return appTemplatePreviewUrl; + } + + public void setAppTemplatePreviewUrl(String appTemplatePreviewUrl) { + this.appTemplatePreviewUrl = appTemplatePreviewUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetTemplateCreateUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetTemplateCreateUrlRes.java new file mode 100644 index 0000000..4e35673 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetTemplateCreateUrlRes.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author zhupintian + * @date 2022/11/3 11:07:53 + */ +public class GetTemplateCreateUrlRes extends BaseBean { + + private String templateCreateUrl; + + public String getTemplateCreateUrl() { + return templateCreateUrl; + } + + public void setTemplateCreateUrl(String templateCreateUrl) { + this.templateCreateUrl = templateCreateUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetTemplateEditUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetTemplateEditUrlRes.java new file mode 100644 index 0000000..43ebe33 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetTemplateEditUrlRes.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2022/11/3 11:07:53 + */ +public class GetTemplateEditUrlRes extends BaseBean { + + private String templateEditUrl; + + public String getTemplateEditUrl() { + return templateEditUrl; + } + + public void setTemplateEditUrl(String templateEditUrl) { + this.templateEditUrl = templateEditUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetTemplateManageUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetTemplateManageUrlRes.java new file mode 100644 index 0000000..8f47777 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetTemplateManageUrlRes.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2022/11/3 11:07:53 + */ +public class GetTemplateManageUrlRes extends BaseBean { + + private String templateManageUrl; + + public String getTemplateManageUrl() { + return templateManageUrl; + } + + public void setTemplateManageUrl(String templateManageUrl) { + this.templateManageUrl = templateManageUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/GetTemplatePreviewUrlRes.java b/src/com/fasc/open/api/v5_1/res/template/GetTemplatePreviewUrlRes.java new file mode 100644 index 0000000..a1d81db --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/GetTemplatePreviewUrlRes.java @@ -0,0 +1,20 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * @date 2022/11/3 11:07:53 + */ +public class GetTemplatePreviewUrlRes extends BaseBean { + + private String templatePreviewUrl; + + public String getTemplatePreviewUrl() { + return templatePreviewUrl; + } + + public void setTemplatePreviewUrl(String templatePreviewUrl) { + this.templatePreviewUrl = templatePreviewUrl; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/SignActorFieldInfo.java b/src/com/fasc/open/api/v5_1/res/template/SignActorFieldInfo.java new file mode 100644 index 0000000..2d81422 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignActorFieldInfo.java @@ -0,0 +1,28 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/10/18 11:31:39 + */ +public class SignActorFieldInfo extends BaseBean { + private Integer fieldDocId; + private String fieldId; + + public Integer getFieldDocId() { + return fieldDocId; + } + + public void setFieldDocId(Integer fieldDocId) { + this.fieldDocId = fieldDocId; + } + + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/template/SignActorInfo.java b/src/com/fasc/open/api/v5_1/res/template/SignActorInfo.java new file mode 100644 index 0000000..aea8e06 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignActorInfo.java @@ -0,0 +1,66 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/10/18 11:31:21 + */ +public class SignActorInfo extends BaseBean { + private String actorId; + private Integer orderNo; + private String actorIdentType; + private Boolean corpOperatorSign; + private String signerSignMethod; + private List signActorFields; + + public String getActorId() { + return actorId; + } + + public void setActorId(String actorId) { + this.actorId = actorId; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getActorIdentType() { + return actorIdentType; + } + + public void setActorIdentType(String actorIdentType) { + this.actorIdentType = actorIdentType; + } + + public Boolean getCorpOperatorSign() { + return corpOperatorSign; + } + + public void setCorpOperatorSign(Boolean corpOperatorSign) { + this.corpOperatorSign = corpOperatorSign; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public List getSignActorFields() { + return signActorFields; + } + + public void setSignActorFields(List signActorFields) { + this.signActorFields = signActorFields; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/template/SignConfigInfo.java b/src/com/fasc/open/api/v5_1/res/template/SignConfigInfo.java new file mode 100644 index 0000000..970a853 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignConfigInfo.java @@ -0,0 +1,66 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author gongj + * @date 2022/6/22 + */ +public class SignConfigInfo extends BaseBean { + private Integer orderNo; + private String signerSignMethod; + private List verifyMethods; + private Boolean readingToEnd; + private Boolean requestMemberSign; + private String readingTime; + + public Boolean getRequestMemberSign() { + return requestMemberSign; + } + + public void setRequestMemberSign(Boolean requestMemberSign) { + this.requestMemberSign = requestMemberSign; + } + + public Integer getOrderNo() { + return orderNo; + } + + public void setOrderNo(Integer orderNo) { + this.orderNo = orderNo; + } + + public String getSignerSignMethod() { + return signerSignMethod; + } + + public void setSignerSignMethod(String signerSignMethod) { + this.signerSignMethod = signerSignMethod; + } + + public List getVerifyMethods() { + return verifyMethods; + } + + public void setVerifyMethods(List verifyMethods) { + this.verifyMethods = verifyMethods; + } + + public Boolean getReadingToEnd() { + return readingToEnd; + } + + public void setReadingToEnd(Boolean readingToEnd) { + this.readingToEnd = readingToEnd; + } + + public String getReadingTime() { + return readingTime; + } + + public void setReadingTime(String readingTime) { + this.readingTime = readingTime; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/SignTaskActorInfo.java b/src/com/fasc/open/api/v5_1/res/template/SignTaskActorInfo.java new file mode 100644 index 0000000..e8685ce --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignTaskActorInfo.java @@ -0,0 +1,47 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +public class SignTaskActorInfo extends BaseBean { + private ActorInfo actorInfo; + + private List fillFields; + + private List signFields; + + private SignConfigInfo signConfigInfo; + + public ActorInfo getActorInfo() { + return actorInfo; + } + + public void setActorInfo(ActorInfo actorInfo) { + this.actorInfo = actorInfo; + } + + public List getFillFields() { + return fillFields; + } + + public void setFillFields(List fillFields) { + this.fillFields = fillFields; + } + + public List getSignFields() { + return signFields; + } + + public void setSignFields(List signFields) { + this.signFields = signFields; + } + + public SignConfigInfo getSignConfigInfo() { + return signConfigInfo; + } + + public void setSignConfigInfo(SignConfigInfo signConfigInfo) { + this.signConfigInfo = signConfigInfo; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/template/SignTemplateDetailRes.java b/src/com/fasc/open/api/v5_1/res/template/SignTemplateDetailRes.java new file mode 100644 index 0000000..d007a4f --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignTemplateDetailRes.java @@ -0,0 +1,121 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class SignTemplateDetailRes extends BaseBean { + private String signTemplateId; + private String signTemplateName; + private String businessTypeName; + private String signTemplateStatus; + private String certCAOrg; + private Boolean signInOrder; + private List docs; + private List attachs; + private List actors; + private String catalogName; + private String createSerialNo; + private String storageType; + + public String getBusinessTypeName() { + return businessTypeName; + } + + public void setBusinessTypeName(String businessTypeName) { + this.businessTypeName = businessTypeName; + } + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } + + public String getSignTemplateName() { + return signTemplateName; + } + + public void setSignTemplateName(String signTemplateName) { + this.signTemplateName = signTemplateName; + } + + public String getSignTemplateStatus() { + return signTemplateStatus; + } + + public void setSignTemplateStatus(String signTemplateStatus) { + this.signTemplateStatus = signTemplateStatus; + } + + public List getDocs() { + return docs; + } + + public void setDocs(List docs) { + this.docs = docs; + } + + public Boolean getSignInOrder() { + return signInOrder; + } + + public void setSignInOrder(Boolean signInOrder) { + this.signInOrder = signInOrder; + } + + public List getActors() { + return actors; + } + + public void setActors(List actors) { + this.actors = actors; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + + public String getCertCAOrg() { + return certCAOrg; + } + + public void setCertCAOrg(String certCAOrg) { + this.certCAOrg = certCAOrg; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } +} + diff --git a/src/com/fasc/open/api/v5_1/res/template/SignTemplateListInfo.java b/src/com/fasc/open/api/v5_1/res/template/SignTemplateListInfo.java new file mode 100644 index 0000000..dc37d6d --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignTemplateListInfo.java @@ -0,0 +1,91 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BaseBean; + +/** + * @author Fadada + * 2021/9/11 15:33:01 + */ +public class SignTemplateListInfo extends BaseBean { + private String signTemplateId; + private String signTemplateName; + private String businessTypeName; + private String signTemplateStatus; + private String createTime; + private String updateTime; + private String catalogName; + private String createSerialNo; + private String storageType; + + public String getBusinessTypeName() { + return businessTypeName; + } + + public void setBusinessTypeName(String businessTypeName) { + this.businessTypeName = businessTypeName; + } + + public String getSignTemplateId() { + return signTemplateId; + } + + public void setSignTemplateId(String signTemplateId) { + this.signTemplateId = signTemplateId; + } + + public String getSignTemplateName() { + return signTemplateName; + } + + public void setSignTemplateName(String signTemplateName) { + this.signTemplateName = signTemplateName; + } + + public String getSignTemplateStatus() { + return signTemplateStatus; + } + + public void setSignTemplateStatus(String signTemplateStatus) { + this.signTemplateStatus = signTemplateStatus; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getCatalogName() { + return catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public String getCreateSerialNo() { + return createSerialNo; + } + + public void setCreateSerialNo(String createSerialNo) { + this.createSerialNo = createSerialNo; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/template/SignTemplateListRes.java b/src/com/fasc/open/api/v5_1/res/template/SignTemplateListRes.java new file mode 100644 index 0000000..bd62195 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/template/SignTemplateListRes.java @@ -0,0 +1,21 @@ +package com.fasc.open.api.v5_1.res.template; + +import com.fasc.open.api.bean.base.BasePageRes; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 15:16:27 + */ +public class SignTemplateListRes extends BasePageRes { + private List signTemplates; + + public List getSignTemplates() { + return signTemplates; + } + + public void setSignTemplates(List signTemplates) { + this.signTemplates = signTemplates; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/user/GetFourElementsVerifyUrlRes.java b/src/com/fasc/open/api/v5_1/res/user/GetFourElementsVerifyUrlRes.java new file mode 100644 index 0000000..05b1662 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/GetFourElementsVerifyUrlRes.java @@ -0,0 +1,13 @@ +package com.fasc.open.api.v5_1.res.user; + +public class GetFourElementsVerifyUrlRes { + private String verifyUrl; + + public String getVerifyUrl() { + return verifyUrl; + } + + public void setVerifyUrl(String verifyUrl) { + this.verifyUrl = verifyUrl; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/user/GetIdCardImageDownloadUrlRes.java b/src/com/fasc/open/api/v5_1/res/user/GetIdCardImageDownloadUrlRes.java new file mode 100644 index 0000000..a799341 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/GetIdCardImageDownloadUrlRes.java @@ -0,0 +1,13 @@ +package com.fasc.open.api.v5_1.res.user; + +public class GetIdCardImageDownloadUrlRes { + private String downloadUrl; + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/user/GetUserTransactionDetailRes.java b/src/com/fasc/open/api/v5_1/res/user/GetUserTransactionDetailRes.java new file mode 100644 index 0000000..4a0b7db --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/GetUserTransactionDetailRes.java @@ -0,0 +1,15 @@ +package com.fasc.open.api.v5_1.res.user; + + +public class GetUserTransactionDetailRes { + + private String transactionId; + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/user/IdCardOcrRes.java b/src/com/fasc/open/api/v5_1/res/user/IdCardOcrRes.java new file mode 100644 index 0000000..09ff254 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/IdCardOcrRes.java @@ -0,0 +1,76 @@ +package com.fasc.open.api.v5_1.res.user; + +public class IdCardOcrRes { + private String name; + private String identNo; + private String gender; + private String birthday; + private String nation; + private String address; + private String issueAuthority; + private String validPeriod; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getIdentNo() { + return identNo; + } + + public void setIdentNo(String identNo) { + this.identNo = identNo; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday; + } + + public String getNation() { + return nation; + } + + public void setNation(String nation) { + this.nation = nation; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getIssueAuthority() { + return issueAuthority; + } + + public void setIssueAuthority(String issueAuthority) { + this.issueAuthority = issueAuthority; + } + + public String getValidPeriod() { + return validPeriod; + } + + public void setValidPeriod(String validPeriod) { + this.validPeriod = validPeriod; + } +} \ No newline at end of file diff --git a/src/com/fasc/open/api/v5_1/res/user/UserIdentityInfoRes.java b/src/com/fasc/open/api/v5_1/res/user/UserIdentityInfoRes.java new file mode 100644 index 0000000..e78a118 --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/UserIdentityInfoRes.java @@ -0,0 +1,93 @@ +package com.fasc.open.api.v5_1.res.user; + +import com.fasc.open.api.bean.base.BaseBean; +import com.fasc.open.api.bean.common.UserIdentInfo; +import com.fasc.open.api.bean.common.UserInfoExtend; + +/** + * @author Fadada + * 2021/10/16 17:50:32 + */ +public class UserIdentityInfoRes extends BaseBean { + private String identStatus; + private UserIdentInfo userIdentInfo; + private UserInfoExtend userIdentInfoExtend; + private String identMethod; + private String identSubmitTime; + private String identSuccessTime; + private String openUserId; + private String fddId; + private String facePicture; + + public String getFddId() { + return fddId; + } + + public void setFddId(String fddId) { + this.fddId = fddId; + } + + public String getIdentStatus() { + return identStatus; + } + + public void setIdentStatus(String identStatus) { + this.identStatus = identStatus; + } + + public UserIdentInfo getUserIdentInfo() { + return userIdentInfo; + } + + public void setUserIdentInfo(UserIdentInfo userIdentInfo) { + this.userIdentInfo = userIdentInfo; + } + + public UserInfoExtend getUserIdentInfoExtend() { + return userIdentInfoExtend; + } + + public void setUserIdentInfoExtend(UserInfoExtend userIdentInfoExtend) { + this.userIdentInfoExtend = userIdentInfoExtend; + } + + public String getIdentMethod() { + return identMethod; + } + + public void setIdentMethod(String identMethod) { + this.identMethod = identMethod; + } + + public String getIdentSubmitTime() { + return identSubmitTime; + } + + public void setIdentSubmitTime(String identSubmitTime) { + this.identSubmitTime = identSubmitTime; + } + + public String getIdentSuccessTime() { + return identSuccessTime; + } + + public void setIdentSuccessTime(String identSuccessTime) { + this.identSuccessTime = identSuccessTime; + } + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } + + public String getFacePicture() { + return facePicture; + } + + public void setFacePicture(String facePicture) { + this.facePicture = facePicture; + } +} diff --git a/src/com/fasc/open/api/v5_1/res/user/UserRes.java b/src/com/fasc/open/api/v5_1/res/user/UserRes.java new file mode 100644 index 0000000..03e6b2e --- /dev/null +++ b/src/com/fasc/open/api/v5_1/res/user/UserRes.java @@ -0,0 +1,75 @@ +package com.fasc.open.api.v5_1.res.user; + +import com.fasc.open.api.bean.base.BaseBean; + +import java.util.List; + +/** + * @author Fadada + * 2021/9/11 14:07:49 + */ +public class UserRes extends BaseBean { + private String clientUserId; + private String clientUserName; + private String bindingStatus; + private List authScope; + private String identStatus; + private String availableStatus; + private String openUserId; + + public String getClientUserId() { + return clientUserId; + } + + public void setClientUserId(String clientUserId) { + this.clientUserId = clientUserId; + } + + public String getClientUserName() { + return clientUserName; + } + + public void setClientUserName(String clientUserName) { + this.clientUserName = clientUserName; + } + + public String getBindingStatus() { + return bindingStatus; + } + + public void setBindingStatus(String bindingStatus) { + this.bindingStatus = bindingStatus; + } + + public List getAuthScope() { + return authScope; + } + + public void setAuthScope(List authScope) { + this.authScope = authScope; + } + + public String getIdentStatus() { + return identStatus; + } + + public void setIdentStatus(String identStatus) { + this.identStatus = identStatus; + } + + public String getAvailableStatus() { + return availableStatus; + } + + public void setAvailableStatus(String availableStatus) { + this.availableStatus = availableStatus; + } + + public String getOpenUserId() { + return openUserId; + } + + public void setOpenUserId(String openUserId) { + this.openUserId = openUserId; + } +} diff --git a/src/com/seeyon/Main.java b/src/com/seeyon/Main.java new file mode 100644 index 0000000..69b3d0d --- /dev/null +++ b/src/com/seeyon/Main.java @@ -0,0 +1,8 @@ +package com.seeyon; + +public class Main { + + public static void main(String[] args) { + // write your code here + } +} diff --git a/src/com/seeyon/apps/fadadaSys/ctrl/QsStateController.java b/src/com/seeyon/apps/fadadaSys/ctrl/QsStateController.java new file mode 100644 index 0000000..f75c874 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/ctrl/QsStateController.java @@ -0,0 +1,110 @@ +package com.seeyon.apps.fadadaSys.ctrl; + + +import com.seeyon.apps.fadadaSys.server.ErCodeStateService; +import com.seeyon.apps.fadadaSys.task.AutoSendProcureTask; +import com.seeyon.ctp.common.controller.BaseController; +import com.seeyon.ctp.common.quartz.QuartzHolder; +import com.seeyon.ctp.util.annotation.NeedlessCheckLogin; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.sql.SQLException; + +/** + * Description + *

    定时任务控制器
    + * Copyright(c) Beijing Seeyon Software Co.,LTD + */ +public class QsStateController extends BaseController { + + @Autowired + private ErCodeStateService erCodeStateService; + + @Override + @NeedlessCheckLogin + public ModelAndView index(HttpServletRequest request, HttpServletResponse response) throws IOException { +// 用于执行定时任务的开启和关闭 + String opera = request.getParameter("task"); + String id = request.getParameter("id"); + if("start".equals(opera)) { + String time; + try { + time = request.getParameter("time"); + //time = "I-00,05"; + } catch (Exception e) { + super.rendJavaScript(response, "alert('获取配置出错');"); + return null; + } + if(null == time) { + super.rendJavaScript(response, "alert('请设置定时任务时间,启用D-开头,如D-03,15表示每天三点十五执行,如果间隔时间执行,请用I-开头,例如I-03,00表示每三个小时执行一次!');"); + return null; + } else if(time.startsWith("D-")) { + // D-开头,每天执行任务 + String[] arr = time.split("-"); + try { + Integer[] itime = getTime(arr); + AutoSendProcureTask.registerSyncTask(false, itime[0], itime[1]); + super.rendJavaScript(response, "alert('任务注册成功,每天" + itime[0] + "点," + itime[1] + "分执行');"); + return null; + } catch (Exception e) { + super.rendJavaScript(response, "alert('" + e.getMessage() + "');"); + return null; + } + } else if(time.startsWith("I-")) { + // i-开头,是间隔时间执行 + String[] arr = time.split("-"); + try { + Integer[] itime = getTime(arr); + AutoSendProcureTask.registerSyncTask(true, itime[0], itime[1]); + super.rendJavaScript(response, "alert('任务注册成功,间隔" + itime[0] + "小时," + itime[1] + "分钟执行');"); + return null; + } catch (Exception e) { + super.rendJavaScript(response, "alert('" + e.getMessage() + "');"); + return null; + } + } else { + super.rendJavaScript(response, "alert('请正确配置jydd.properties中的taskTime参数,如果定时执行,启用D-开头,如D-03,15表示每天三点十五执行,如果间隔时间执行,请用I-开头,例如I-03,00表示每三个小时执行一次!');"); + return null; + } + } else if("stop".equals(opera)){ + QuartzHolder.deleteQuartzJob(AutoSendProcureTask.jobName); + super.rendJavaScript(response, "alert('二维码状态监测任务已经终止!');"); + return null; + } else if("run".equals(opera)) { + System.out.println("执行方法"); + try { + erCodeStateService.updateErcodeState(); + } catch (Exception throwables) { + throwables.printStackTrace(); + } + return null; + } else { + super.rendJavaScript(response, "alert('参数有误,请联系开发人员!');"); + return null; + } + } + + private Integer[] getTime(String[] arr) throws Exception { + String time = arr[1]; + arr = time.split(","); + if(arr.length != 2) { + throw new Exception("小时和分钟请用逗号隔开"); + } + int our = Integer.valueOf(arr[0]); + int minute = Integer.valueOf(arr[1]); + if(our < 0 || our >= 24) { + throw new Exception("小时数必须在0~24之间"); + } + if(minute < 0 || minute >= 60) { + throw new Exception("分钟数必须在0~60之间"); + } + return new Integer[] {our, minute}; + } + + + +} diff --git a/src/com/seeyon/apps/fadadaSys/dao/FadadaDaoImpl.java b/src/com/seeyon/apps/fadadaSys/dao/FadadaDaoImpl.java new file mode 100644 index 0000000..6df1192 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/dao/FadadaDaoImpl.java @@ -0,0 +1,705 @@ +package com.seeyon.apps.fadadaSys.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.util.JDBCAgent; + +public class FadadaDaoImpl implements IFadadaDao{ + + private static final Log log = LogFactory.getLog(FadadaDaoImpl.class); + //formmain_0304 formmain_0089 + private String getNodeToken = "select field0125 as nodetoken from formmain_0089 where field0132 = ?"; + private String getDiaoRuNodeToken = "select field0142 as nodetoken from formmain_0264 where field0143 = ?"; + private String getShiMingNodeToken = "select field0014 as nodetoken from formmain_0307 where field0003 = ?"; + private String updateSignState = "UPDATE formmain_0089 SET field0131 = ?, field0136 = ?, field0086 = ?, field0084 = ? WHERE field0132 = ?"; + private String updateSellerstrSignState = "UPDATE formmain_0308 SET field0007 = ? WHERE field0003 = ?"; + private String updateSignDiaoRuState = "UPDATE formmain_0264 SET field0141 = ?, field0148 = ?, field0149 = ?, field0122 = ? WHERE field0143 = ?"; + private String updateSellerstrSignDiaoRuState = "UPDATE formmain_0309 SET field0007 = ? WHERE field0003 = ?"; + private String updateShiMingState = "UPDATE formmain_0307 SET field0007 = ? WHERE field0003 = ?"; + private String updateShiMingMsg = "UPDATE formmain_0307 SET field0016 = ?, field0018 = ?, field0017 = ?, field0026 = ? WHERE field0003 = ?"; +// private String getNodeToken = "select field0123 as nodeToken from formmain_0186 where field0124 = ?"; + private String getIdByObjectId = "SELECT * from ctp_affair WHERE OBJECT_ID = ?"; + //formmain_0135 formmain_0308 + private String addFile = "UPDATE formmain_0308 SET field0004 = ? WHERE id = ?"; + private String addDiaoRuFile = "UPDATE formmain_0309 SET field0004 = ? WHERE id = ?"; + private String getAttachmentId = "SELECT * FROM ctp_attachment WHERE SUB_REFERENCE = ?"; + private String findFaHuoDanBySignId = "SELECT * from formmain_0089 WHERE field0132 = ?"; + private String findTuiHuoDanBySignId = "SELECT * from formmain_0264 WHERE field0143 = ?"; + //formmain_0138 正 formmain_0307 + private String findPersonById = "SELECT * from formmain_0307 WHERE field0003 = ?"; + + private String updateShiMingErcode = "UPDATE formmain_0307 SET field0004 = ?, field0003 = ? WHERE id = ?"; + + private String saveSummaryId = "UPDATE formmain_0307 SET field0023 = ? WHERE field0003 = ?"; + + private String findErcodeState = "SELECT * from formmain_0307 WHERE field0007 = ?"; + + private String updateErcodeState = "UPDATE formmain_0307 SET field0026 = ? WHERE id = ?"; + + //正式 formmain_0089 formmain_0133 + private String findSummaryIdAndaffAirId = "SELECT * from formmain_0089 WHERE field0030 = ?"; + + private String updateFahuodanMsg = "UPDATE formmain_0089 SET field0132 = ?, field0127 = ? WHERE field0030 = ?"; + private String updateFahuodanFoundationMsg = "UPDATE formmain_0089 SET field0079 = ?, field0075 = ? ,field0001 = ?,field0128 = ?,field0129 = ? WHERE field0030 = ?"; + //正式 formmain_0308 formmain_0135 + private String updateTuisongMsg = "UPDATE formmain_0308 SET field0003 = ?, field0004 = ? WHERE id = ?"; + private String updateTuisongFoundationMsg = "UPDATE formmain_0308 SET field0001 = ?, field0002 = ?,field0015 = ? WHERE id = ?"; + + private String findTuisongId = "SELECT * from formmain_0308 WHERE field0003 = ?"; + + @Override + public String getNodeToken(String signTaskId) { + JDBCAgent agent = new JDBCAgent(); + String data = ""; + try { + StringBuilder sql = new StringBuilder(getNodeToken); + List p = new ArrayList(); + p.add(signTaskId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size() != 0){ + data = list.get(0).get("nodetoken").toString(); + } + } catch (BusinessException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return data; + } + + @Override + public String getDiaoRuNodeToken(String signTaskId) { + JDBCAgent agent = new JDBCAgent(); + String data = ""; + try { + StringBuilder sql = new StringBuilder(getDiaoRuNodeToken); + List p = new ArrayList(); + p.add(signTaskId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size() != 0){ + data = list.get(0).get("nodetoken").toString(); + } + } catch (BusinessException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return data; + } + + + /** + * 修改签署状态 + * @param signTaskId + * @return + */ + @Override + public int updateSignState(String signTaskId, Long state, String date, String formattedDate2, Long isDaoHuo) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateSignState); + List p = new ArrayList(); + p.add(state); + p.add(date); + p.add(formattedDate2); + p.add(isDaoHuo); + p.add(signTaskId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + /** + * 回传实名人员信息 + * @param signTaskId + * @return + */ + @Override + public int updateShiMingMsg(String signTaskId, String userName, String identNo, String mobile) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateShiMingMsg); + List p = new ArrayList(); + p.add(userName); + p.add(identNo); + p.add(mobile); + p.add("已认证"); + p.add(signTaskId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public int updateSellerstrSignState(String signTaskId, Long state) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateSellerstrSignState); + List p = new ArrayList(); + p.add(state); + p.add(signTaskId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + /** + * 修改调入单签署状态 + * @param signTaskId + * @return + */ + @Override + public int updateSignDiaoRuState(String signTaskId, Long state, String date, String formattedDate2, Long isDaoHuo) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateSignDiaoRuState); + List p = new ArrayList(); + p.add(state); + p.add(date); + p.add(formattedDate2); + p.add(isDaoHuo); + p.add(signTaskId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public int updateSellerstrSignDiaoRuState(String signTaskId, Long state) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateSellerstrSignDiaoRuState); + List p = new ArrayList(); + p.add(state); + p.add(signTaskId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public String getIdByObjectId(Long objectId) { + JDBCAgent agent = new JDBCAgent(); + String data = ""; + try { + StringBuilder sql = new StringBuilder(getIdByObjectId); + List p = new ArrayList(); + p.add(objectId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size() != 0){ + data = list.get(0).get("form_recordid").toString(); + } + } catch (BusinessException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return data; + } + + @Override + public int addFile(String id, String fileId) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(addFile); + List p = new ArrayList(); + p.add(fileId); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public int addDiaoRuFile(String id, String fileId) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(addDiaoRuFile); + List p = new ArrayList(); + p.add(fileId); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public String getAttachmentId(Long subReference) { + JDBCAgent agent = new JDBCAgent(); + String data = ""; + try { + StringBuilder sql = new StringBuilder(getAttachmentId); + List p = new ArrayList(); + p.add(subReference); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size() != 0){ + data = list.get(0).get("id").toString(); + } + } catch (BusinessException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return data; + } + + /** + * 修改认证状态 + * @param clientUserId + * @return + */ + @Override + public int updateShiMingState(String clientUserId, Long state) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateShiMingState); + List p = new ArrayList(); + p.add(state); + p.add(clientUserId); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public List> findFaHuoDanBySignId(String signId) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findFaHuoDanBySignId); + List p = new ArrayList(); + p.add(signId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + @Override + public List> findTuiHuoDanBySignId(String signId) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findTuiHuoDanBySignId); + List p = new ArrayList(); + p.add(signId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + @Override + public String getShiMingNodeToken(String clientUserId){ + JDBCAgent agent = new JDBCAgent(); + String data = ""; + try { + StringBuilder sql = new StringBuilder(getShiMingNodeToken); + List p = new ArrayList(); + p.add(clientUserId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size() != 0){ + data = list.get(0).get("nodetoken").toString(); + } + } catch (BusinessException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + // TODO Auto-generated catch block + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return data; + } + + @Override + public List> findPersonById(String id) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findPersonById); + List p = new ArrayList(); + p.add(id); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + @Override + public int updateShiMingErcode(Long id, String fileId, String bid) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateShiMingErcode); + List p = new ArrayList(); + p.add(fileId); + p.add(bid); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + /** + * 保存summaryID + * @param id + * @param summaryId + * @return + */ + @Override + public int saveSummaryId(String id, String summaryId) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(saveSummaryId); + List p = new ArrayList(); + p.add(summaryId); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public List> findErcodeState(String state) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findErcodeState); + List p = new ArrayList(); + //-5664519669788685422 + p.add(state); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + @Override + public int updateErcodeState(Long id, String state) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateErcodeState); + List p = new ArrayList(); + p.add(state); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public List> findSummaryIdAndaffAirId(String number) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findSummaryIdAndaffAirId); + List p = new ArrayList(); + p.add(number); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + @Override + public int updateFahuodanMsg(String number, String id, String erCode) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateFahuodanMsg); + List p = new ArrayList(); + p.add(id); + p.add(erCode); + p.add(number); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + + @Override + public int updateFahuodanFoundationMsg(String number, String customerName,String customerPhone, String customerId ) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateFahuodanFoundationMsg); + List p = new ArrayList(); + p.add(customerName); + p.add(customerPhone); + p.add(customerId); + p.add(customerName); + p.add(customerPhone); + p.add(number); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public int updateTuisongMsg(String number, String id, String erCode) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateTuisongMsg); + List p = new ArrayList(); + p.add(id); + p.add(erCode); + p.add(number); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + @Override + public int updateTuisongFoundationMsg(String number, String customerName,String customerPhone,String customerId) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateTuisongFoundationMsg); + List p = new ArrayList(); + p.add(customerName); + p.add(customerPhone); + p.add(customerId); + p.add(number); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } + + @Override + public List> findTuisongId(String signId) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(findTuisongId); + List p = new ArrayList(); + p.add(signId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + +} diff --git a/src/com/seeyon/apps/fadadaSys/dao/FahuodanDao.java b/src/com/seeyon/apps/fadadaSys/dao/FahuodanDao.java new file mode 100644 index 0000000..8c846d8 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/dao/FahuodanDao.java @@ -0,0 +1,78 @@ +package com.seeyon.apps.fadadaSys.dao; + +import com.seeyon.ctp.util.JDBCAgent; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FahuodanDao { + + private String getU8SendData = "select * from BILL6591687145622814754T WHERE CDLCODE = ?"; + private String getU8SendDataTables = "select * from BILL3772985794057815515B where SUMMARYID = ?"; + + /** + * u8发货单表头数据 + * @param code + * @return + * @throws SQLException + */ + public List> getU8SendData(String code) throws SQLException { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(getU8SendData); + List p = new ArrayList(); + p.add(code); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + + /** + * u8发货单明细数据 + * @param summaryId + * @return + * @throws SQLException + */ + public List> getU8SendDataTables(String summaryId) throws SQLException { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(getU8SendDataTables); + List p = new ArrayList(); + p.add(summaryId); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/dao/IFadadaDao.java b/src/com/seeyon/apps/fadadaSys/dao/IFadadaDao.java new file mode 100644 index 0000000..45d75e9 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/dao/IFadadaDao.java @@ -0,0 +1,59 @@ +package com.seeyon.apps.fadadaSys.dao; + +import java.util.List; +import java.util.Map; + +public interface IFadadaDao { + + public String getNodeToken(String signTaskId); + + public String getDiaoRuNodeToken(String signTaskId); + + public int updateSignState(String signTaskId, Long state, String date, String formattedDate2, Long isDaoHuo); + + public int updateSellerstrSignState(String signTaskId, Long state); + + public int updateSignDiaoRuState(String signTaskId, Long state, String date, String formattedDate2, Long isDaoHuo); + + public int updateSellerstrSignDiaoRuState(String signTaskId, Long state); + + public int updateShiMingState(String clientUserId, Long state); + + public int updateShiMingMsg(String signTaskId, String userName, String identNo, String mobile); + + public String getShiMingNodeToken(String clientUserId); + + public String getIdByObjectId(Long objectId); + + public int addFile(String id, String fileId); + + public int addDiaoRuFile(String id, String fileId); + + public String getAttachmentId(Long subReference); + + public List> findFaHuoDanBySignId(String signId); + + public List> findTuiHuoDanBySignId(String signId); + + public List> findPersonById(String id); + + public int updateShiMingErcode(Long id, String fileId, String bid); + + public int saveSummaryId(String id, String summaryId); + //查询未认证的单据 + public List> findErcodeState(String state); + //修改已过期二维码单据状态 + public int updateErcodeState(Long id, String state); + //查询发货单中summaryId和affairId + public List> findSummaryIdAndaffAirId(String number); + //修改发货单中签署id和二维码 + public int updateFahuodanMsg(String number, String id, String erCode); + //修改发货单中客户基本信息 + public int updateFahuodanFoundationMsg(String number, String customerName,String customerPhone,String customerId); + //修改推送流程中签署id和二维码 + public int updateTuisongMsg(String number, String id, String erCode); + //修改推送流程中签署id和二维码 + public int updateTuisongFoundationMsg(String number, String customerName,String customerPhone,String customerId); + //修改发货单签署id和二维码 + public List> findTuisongId(String signId); +} diff --git a/src/com/seeyon/apps/fadadaSys/event/ShiMingEvent.java b/src/com/seeyon/apps/fadadaSys/event/ShiMingEvent.java new file mode 100644 index 0000000..da50069 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/event/ShiMingEvent.java @@ -0,0 +1,188 @@ +package com.seeyon.apps.fadadaSys.event; + +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.constants.ApplicationCategoryEnum; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.organization.bo.V3xOrgMember; +import com.seeyon.ctp.organization.manager.OrgManager; +import com.seeyon.ctp.services.ServiceException; +import com.seeyon.ctp.workflow.event.AbstractWorkflowEvent; +import com.seeyon.ctp.workflow.event.WorkflowEventData; +import com.seeyon.v3x.services.flow.FlowFactory; +import com.seeyon.v3x.services.form.bean.FormExport; +import com.seeyon.v3x.services.form.bean.ValueExport; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * @author 蔡明聪 + */ +public class ShiMingEvent extends AbstractWorkflowEvent { + + private static Log log = LogFactory.getLog(ShiMingEvent.class); + + @Override + public String getId() { + return "shiMingEvent"; + } + + @Override + public String getLabel() { + return "自动发起实名认证"; + } + + @Override + public ApplicationCategoryEnum getAppName() { + return ApplicationCategoryEnum.form; + } + + @Autowired + FormDataApi4Cap4 formDataApi4Cap4; + + private FlowFactory flowFactory; + + public FlowFactory getFlowFactory() { + if (flowFactory == null) { + flowFactory = (FlowFactory) AppContext.getBean("flowFactory"); + } + return flowFactory; + } + + private OrgManager orgManager; + + public OrgManager getOrgManager() { + if (this.orgManager == null) { + this.orgManager = ((OrgManager) AppContext.getBean("orgManager")); + } + return orgManager; + } + + @Override + public void onProcessFinished(WorkflowEventData data) { + //获取流程表单中的数据 + Map businessData = data.getBusinessData(); + //客户名称 + Object custer = businessData.get("field0035"); + //客户手机号码 + Object custPhone = businessData.get("field0039"); + //客户联系人姓名 + Object custName = businessData.get("field0038"); + //专属业务员 + Object sellerstr = businessData.get("field0047"); + //联系人身份证号码 + Object custCard = businessData.get("field0108"); + V3xOrgMember member = null; + try { + member = getOrgManager().getMemberById(Long.parseLong(sellerstr.toString())); + } catch (BusinessException e) { + e.printStackTrace(); + } + //获取登录名 + String code = member.getV3xOrgPrincipal().getLoginName(); + String name = member.getName(); + Long orgDepartmentId = member.getOrgDepartmentId(); + businessData.put("orgDepartmentId", orgDepartmentId); + //设置主题名称 + Date date = new Date(); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + String formatDate = format.format(date); + businessData.put("formatDate", formatDate); + StringBuffer subject = new StringBuffer(); + subject.append(formatDate).append("_").append(name).append("_").append(custer).append("_").append("电子签实名认证"); + //发起流程 + try { + long affairId = getFlowFactory().sendCollaboration(code, "shimingrenzheng", subject.toString(), + setFormExport(businessData), null, null, null); + } catch (BusinessException e) { + e.printStackTrace(); + } catch (ServiceException e) { + e.printStackTrace(); + } + } + + /** + * 设置FormExport对象,设置表单中的数据 + * @param data 根据流程添加的人员数据 + * @return + */ + public FormExport setFormExport(Map data){ + FormExport formExport; + formExport = new FormExport(); + formExport.setValues(setValueExports(data)); + log.info("formExport"+formExport); + return formExport; + } + /** + * 设置ValueExport对象,设置每个控件中的数据。 + * @param data 根据流程添加的人员数据 + * @return + */ + public List setValueExports(Map data) { + List values = new ArrayList(); + ValueExport ve = new ValueExport(); + ve = new ValueExport(); + ve.setDisplayName("发起人员"); + ve.setValue(data.get("field0047").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("发起部门"); + ve.setValue(data.get("orgDepartmentId").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("发起日期"); + ve.setValue(data.get("formatDate").toString()); + values.add(ve); + Object custer = data.get("field0035"); + ve = new ValueExport(); + ve.setDisplayName("客户名称"); + if (custer == null || "".equals(custer)) { + ve.setValue(""); + } else { + ve.setValue(custer.toString()); + } + values.add(ve); + Object custPhone = data.get("field0039"); + ve = new ValueExport(); + ve.setDisplayName("客户联系人手机号"); + if (custPhone == null || "".equals(custPhone)) { + ve.setValue(""); + } else { + ve.setValue(custPhone.toString()); + } + values.add(ve); + Object custName = data.get("field0038"); + ve = new ValueExport(); + ve.setDisplayName("客户联系人姓名"); + if (custName == null || "".equals(custName)) { + ve.setValue(""); + } else { + ve.setValue(custName.toString()); + } + values.add(ve); + Object sellerstr = data.get("field0047"); + ve = new ValueExport(); + ve.setDisplayName("专属业务员"); + if (sellerstr == null || "".equals(sellerstr)) { + ve.setValue(""); + } else { + ve.setValue(sellerstr.toString()); + } + values.add(ve); + Object custCard = data.get("field0108"); + ve = new ValueExport(); + ve.setDisplayName("客户联系人身份证号"); + if (custCard == null || "".equals(custCard)) { + ve.setValue(""); + } else { + ve.setValue(custCard.toString()); + } + values.add(ve); + return values; + } +} + diff --git a/src/com/seeyon/apps/fadadaSys/kit/A8FolderKit.java b/src/com/seeyon/apps/fadadaSys/kit/A8FolderKit.java new file mode 100644 index 0000000..343b34c --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/kit/A8FolderKit.java @@ -0,0 +1,26 @@ +package com.seeyon.apps.fadadaSys.kit; + +import com.seeyon.ctp.common.SystemEnvironment; + +/** + * Description + *
    获取A8产品下面的文件夹路径
    + * Copyright(c) Beijing Seeyon Software Co.,LTD + */ +public class A8FolderKit { + + private static String SH_PROP = ""; + + /** + * Description: + *
    获取到A8的安装应用目录  seeyon
    + * @return + */ + public static String getPropFile() { + if("".equals(SH_PROP)) { + SH_PROP = SystemEnvironment.getApplicationFolder() + "/WEB-INF/cfgHome/plugin/fadadaSys/fadada.properties"; + } + return SH_PROP; + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/kit/DateKit.java b/src/com/seeyon/apps/fadadaSys/kit/DateKit.java new file mode 100644 index 0000000..9a56a01 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/kit/DateKit.java @@ -0,0 +1,293 @@ +package com.seeyon.apps.fadadaSys.kit; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 日期处理工具类 + * @Copyright Beijing Seeyon Software Co.,LTD + */ +public class DateKit { + + private static SimpleDateFormat simple = new SimpleDateFormat("yyyyMMdd"); + + private static SimpleDateFormat sixFormat = new SimpleDateFormat("yyMMdd"); + + private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + private static SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); + + private static SimpleDateFormat monthFormat = new SimpleDateFormat("yyyy-MM"); + + private static SimpleDateFormat weekDay = new SimpleDateFormat("MM-dd"); + + private static SimpleDateFormat hour = new SimpleDateFormat("HH:mm"); + + private static SimpleDateFormat detailDate = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + + + private static final String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五","星期六" }; + + public static int getYear(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Calendar.YEAR); + } + + public static String getSixDate() { + return getSixDate(null); + } + + public static String getSixDate(Date date) { + if(null == date) { + return sixFormat.format(new Date()); + } + return sixFormat.format(date); + } + + /** + * 获取这个时间属于一年的第几周 + * @param date + * @return + */ + public static int getWeekNum(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + int week = cal.get(Calendar.WEEK_OF_YEAR); + // 如果是星期天,那么需要减1 + if("星期日".equals(DateKit.getDayWeekName(date))) { + week -= 1; + } + return week; + } + + /** + * Description: + * + *
    +     * 获取一周
    +     * 
    + * + * @param date + * @return + */ + public static void getWeekInterval(Map param) { + Calendar cal = Calendar.getInstance(); + // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 + int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天 + if(1 == dayWeek) { + cal.add(Calendar.DAY_OF_MONTH, -1); + } + // System.out.println("要计算日期为:" + sdf.format(cal.getTime())); // 输出要计算日期 + // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 + cal.setFirstDayOfWeek(Calendar.MONDAY); + // 获得当前日期是一个星期的第几天 + int day = cal.get(Calendar.DAY_OF_WEEK); + // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 + cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); + param.put("startDate", cal.getTime()); + // System.out.println("所在周星期一的日期:" + imptimeBegin); + cal.add(Calendar.DATE, 6); + param.put("endDate", cal.getTime()); + // System.out.println("所在周星期日的日期:" + imptimeEnd); + } + + /** + * Description: + * + *
    +     * 根据传入的日期,获取当前日期所在的一周时间段
    +     * 
    + * + * @param date + * @return + */ + public static void getWeekInterval(Map param, Date now) { + Calendar cal = Calendar.getInstance(); + cal.setTime(now); + // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 + int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天 + if(1 == dayWeek) { + cal.add(Calendar.DAY_OF_MONTH, -1); + } + // System.out.println("要计算日期为:" + sdf.format(cal.getTime())); // 输出要计算日期 + // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 + cal.setFirstDayOfWeek(Calendar.MONDAY); + // 获得当前日期是一个星期的第几天 + int day = cal.get(Calendar.DAY_OF_WEEK); + // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 + cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); + String time = DateKit.getDayDate(cal.getTime()) + " 00:00:00"; + try { + param.put("beginDate", DateKit.getdayDate(time)); + } catch(Exception e) { + // TODO + } + // System.out.println("所在周星期一的日期:" + imptimeBegin); + cal.add(Calendar.DATE, 6); + time = DateKit.getDayDate(cal.getTime()) + " 23:59:59"; + try { + param.put("endDate", DateKit.getdayDate(time)); + } catch(Exception e) { + // + } + // System.out.println("所在周星期日的日期:" + imptimeEnd); + } + + public static String getSimpleDate(Date date) { + if(date == null) { + return ""; + } + return simple.format(date); + } + + /** + * 给日志格式化使用 + * @param date + * @return + */ + public static String getDate4Cal(Date date) { + if(date == null) { + return ""; + } + return hour.format(date); + } + + public static String getDateString(Date date) { + if(date == null) { + return ""; + } + return sdf.format(date); + } + + public static String getDayDate(Date date) { + if(date == null) { + return ""; + } + return dayFormat.format(date); + } + + public static String getWeekDay(Date date) { + if(date == null) { + return ""; + } + return weekDay.format(date); + } + + /** + * Description: + * + *
    +     * 获取多少天以后的日期
    +     * 
    + * + * @param day + * @return + */ + public static Date getDayAfter(int day) { + Calendar cal = Calendar.getInstance(); + cal.add(Calendar.DATE, day); + return cal.getTime(); + } + // 获得某天的几天后 + public static Date getDayAfter(Date d, int day) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + cal.add(Calendar.DATE, day); + return cal.getTime(); + } + + /** + * 获取一个月有多少天 + * @param year + * @param month + * @return + */ + public static int getDaysByYearMonth(int year, int month) { + Calendar a = Calendar.getInstance(); + a.set(Calendar.YEAR, year); + a.set(Calendar.MONTH, month); + a.set(Calendar.DATE, 1); + a.roll(Calendar.DATE, -1); + int maxDate = a.get(Calendar.DATE); + return maxDate; + } + + /** + * 获取今天是星期几 + * @param date + * @return + */ + public static String getDayWeekName(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1; + if(dayOfWeek < 0) + dayOfWeek = 0; + return dayNames[dayOfWeek]; + } + + /** + * 解析时间,先解析yyyy-MM-dd HH:mm:ss + * @param dateStr + * @return + * @throws ParseException + * @throws Exception + */ + public static Date getdayDate(String dateStr) throws Exception { + try { + return sdf.parse(dateStr); + } catch(Exception e) { + try { + return detailDate.parse(dateStr); + } catch(Exception e1) { + try { + return dayFormat.parse(dateStr); + } catch(Exception e2) { + try { + return simple.parse(dateStr); + } + catch(Exception e3) { + return monthFormat.parse(dateStr); + } + } + } + } + } + + /** + * 根据时间获取周区间字符串 + * @param now + * @return 第XX周:2018-08-27至2018-09-02 + */ + public static String getWeekNumAndDateZone(Date now) { + StringBuffer sb = new StringBuffer(); + sb.append("第"); + sb.append(getWeekNum(now)); + sb.append("周:"); + Map param = new HashMap(); + getWeekInterval(param, now); + Date beginDate = (Date)param.get("beginDate"); + Date endDate = (Date)param.get("endDate"); + sb.append(dayFormat.format(beginDate)); + sb.append("至"); + sb.append(dayFormat.format(endDate)); + return sb.toString(); + } + + /** + * 根据日期和时间获取一个返回该日期该时间的date + * @param d 日期 + * @param time 时间 HH:mm格式 + * @return d日期+time时间 + * @throws ParseException + */ + public static Date getDateFromTime(Date d, String time) throws ParseException { + String dateTime = dayFormat.format(d) + " " + time; + return detailDate.parse(dateTime); + } +} diff --git a/src/com/seeyon/apps/fadadaSys/kit/PropKit.java b/src/com/seeyon/apps/fadadaSys/kit/PropKit.java new file mode 100644 index 0000000..61264d9 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/kit/PropKit.java @@ -0,0 +1,85 @@ +package com.seeyon.apps.fadadaSys.kit; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 读取参数 + */ + +public class PropKit { + + private static long lastModify; + + private static ConcurrentHashMap props; + + public static final String PROFILE = "profile"; + + public static final String APPID = "appId"; + public static final String APPSECRET = "appSecret"; + public static final String SERVERURL = "serverUrl"; + public static final String OPENID = "openId"; + public static final String NOTIFICATION = "notification"; + public static final String OATOKEN = "oatoken"; + public static final String RESTNAME = "restname"; + public static final String RESTPASSWORD = "restpassword"; + + public static final String PROD_APPID = "prod.appId"; + public static final String PROD_APPSECRET = "prod.appSecret"; + public static final String PROD_SERVERURL = "prod.serverUrl"; + public static final String PROD_OPENID = "prod.openId"; + public static final String PROD_NOTIFICATION = "prod.notification"; + public static final String PROD_OATOKEN = "prod.oatoken"; + public static final String PROD_RESTNAME = "prod.restname"; + public static final String PROD_RESTPASSWORD = "prod.restpassword"; + + /** + * @return + * @throws IOException + * @throws FileNotFoundException + */ + public static String getProp(String key) throws FileNotFoundException, IOException { + File f = new File(A8FolderKit.getPropFile()); + if(null == props) { + props = new ConcurrentHashMap(); + } + if(f.lastModified() != lastModify) { + /** + * huangzhengguo + * 2022-10-18 + */ + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); +// Properties prop = PropertiesUtil.getFromFile((CtpLocalFile) f); + /** + * end + */ + String profile = prop.getProperty(PROFILE); + if("prod".equals(profile)) { + props.put(APPID, prop.getProperty(PROD_APPID)); + props.put(APPSECRET, prop.getProperty(PROD_APPSECRET)); + props.put(SERVERURL, prop.getProperty(PROD_SERVERURL)); + props.put(OPENID, prop.getProperty(PROD_OPENID)); + props.put(NOTIFICATION, prop.getProperty(PROD_NOTIFICATION)); + props.put(OATOKEN, prop.getProperty(PROD_OATOKEN)); + props.put(RESTNAME, prop.getProperty(PROD_RESTNAME)); + props.put(RESTPASSWORD, prop.getProperty(PROD_RESTPASSWORD)); + } else { + props.put(APPID, prop.getProperty(PROD_APPID)); + props.put(APPSECRET, prop.getProperty(PROD_APPSECRET)); + props.put(SERVERURL, prop.getProperty(PROD_SERVERURL)); + props.put(NOTIFICATION, prop.getProperty(PROD_NOTIFICATION)); + props.put(OPENID, prop.getProperty(PROD_OPENID)); + props.put(OATOKEN, prop.getProperty(PROD_OATOKEN)); + props.put(RESTNAME, prop.getProperty(PROD_RESTNAME)); + props.put(RESTPASSWORD, prop.getProperty(PROD_RESTPASSWORD)); + } + } + return props.get(key); + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/kit/StrKit.java b/src/com/seeyon/apps/fadadaSys/kit/StrKit.java new file mode 100644 index 0000000..7665509 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/kit/StrKit.java @@ -0,0 +1,251 @@ +package com.seeyon.apps.fadadaSys.kit; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +/** + * 字符处理工具类 + * @date 2018年5月23日上午9:05:01 + * @Copyright Beijing Seeyon Software Co.,LTD + */ +public class StrKit { + + public static String str(Object o) { + if(o == null) { + return null; + } + if(o instanceof Date) { + return DateKit.getDayDate((Date)o); + } + if(o instanceof Timestamp) { + return DateKit.getDayDate((Timestamp)o); + } + if(o instanceof String) { + return (String)o; + } + return o.toString(); + } + + public static String str(Object o, boolean null2Str) { + if(o == null && null2Str) { + return ""; + } + return str(o); + } + + public static float toFloat(Object o) { + if(o == null) { + return 0f; + } else if(o instanceof Float) { + return (Float)o; + } else if(o instanceof String) { + return Float.valueOf((String)o); + } else if(o instanceof BigDecimal) { + return ((BigDecimal)o).floatValue(); + } + return 0f; + } + + public static Long toLong(Object o) { + if(null == o) { + return 0L; + } else if(o instanceof Long) { + return (Long)o; + } else if(o instanceof String) { + if("".equals(o)) { + return 0L; + } + return Long.valueOf((String)o); + } else if(o instanceof BigDecimal) { + return ((BigDecimal)o).longValue(); + } + return 0L; + } + + /** + * 取int值,为空返回0 + * @param obj 对象 + * @return + */ + public static Integer toInteger(Object obj) { + if(obj == null) { + return 0; + } else if(obj instanceof Long){ + return ((Long)obj).intValue(); + } else if(obj instanceof BigDecimal) { + return ((BigDecimal)obj).intValue(); + }else if(obj instanceof String) { + String o = (String) obj; + if("".equals(o)) { + return 0; + } else { + try { + return Integer.valueOf((String) obj); + } catch(Exception e) { + return 0; + } + } + } else if(obj instanceof Integer) { + return (Integer) obj; + } + return 0; + } + + public static Date toDate(Object o) throws Exception { + if(null == o) { + return null; + } else if(o instanceof Date) { + return (Date)o; + } else if(o instanceof Timestamp) { + return ((Timestamp) o); + } else if(o instanceof String){ + return DateKit.getdayDate((String) o); + } + return null; + } + + public static List toList(Object o) { + if(o == null) { + return null; + } else if(o instanceof List) { + return (List) o; + } else { + return null; + } + } + + /** + * 判断对象是否为空 + * @param o + * @return + */ + public static boolean isNull(Object o) { + if(null == o) { + return true; + } + if(o instanceof String) { + return "".equals((String) o); + } + if(o instanceof Collection) { + // 集合数量为0 则为空 + return ((Collection) o).size() == 0; + } + return false; + } + + /** + * 删除最后一个字符 + * @param input + * @return + */ + public static String deleteLastChar(String input) { + if(isNull(input)) + return ""; + return input.substring(0, input.length() - 1); + + } + + /** + * 转换成 123,456,789的格式 + * @param inputString + * @param length + * @return + */ + public static String getListStr(String inputString, int length) { + if(isNull(inputString)) + return ""; + String str = ""; + List strList = getStrList(inputString, length); + for(String string : strList) { + str += string + ","; + } + return deleteLastChar(str); + } + + /** + * 把原始字符串分割成指定长度的字符串列表 + * + * @param inputString + * 原始字符串 + * @param length + * 指定长度 + * @return + */ + public static List getStrList(String inputString, int length) { + int size = inputString.length() / length; + if (inputString.length() % length != 0) { + size += 1; + } + return getStrList(inputString, length, size); + } + + /** + * 把原始字符串分割成指定长度的字符串列表 + * + * @param inputString + * 原始字符串 + * @param length + * 指定长度 + * @param size + * 指定列表大小 + * @return + */ + private static List getStrList(String inputString, int length, + int size) { + List list = new ArrayList(); + for (int index = 0; index < size; index++) { + String childStr = substring(inputString, index * length, + (index + 1) * length); + list.add(childStr); + } + return list; + } + + /** + * 分割字符串,如果开始位置大于字符串长度,返回空 + * + * @param str + * 原始字符串 + * @param f + * 开始位置 + * @param t + * 结束位置 + * @return + */ + private static String substring(String str, int f, int t) { + if (f > str.length()) + return null; + if (t > str.length()) { + return str.substring(f, str.length()); + } else { + return str.substring(f, t); + } + } + + public static String getFixedLengthStr(String str, int length) { + // 如果为空,返回全部都是0 + if(length < 1) { + return ""; + } + if(isNull(str)) { + return getZeor(length); + } + if(str.length() < length) { + return getZeor(length - str.length()) + str; + } + return str.substring(0, length); + } + + private static String getZeor(int length) { + String str = ""; + for(int i = 0; i < length; i++) { + str += "0"; + } + return str; + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/kit/from/CAP4FormKit.java b/src/com/seeyon/apps/fadadaSys/kit/from/CAP4FormKit.java new file mode 100644 index 0000000..45a7f55 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/kit/from/CAP4FormKit.java @@ -0,0 +1,204 @@ +package com.seeyon.apps.fadadaSys.kit.from; + +import java.util.List; +import java.util.Map; + +import com.seeyon.apps.fadadaSys.kit.StrKit; +import org.apache.commons.logging.Log; + +import com.seeyon.cap4.form.bean.FormBean; +import com.seeyon.cap4.form.bean.FormDataBean; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.cap4.form.bean.FormFieldBean; +import com.seeyon.cap4.form.bean.FormTableBean; +import com.seeyon.cap4.form.service.CAP4FormManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.log.CtpLogFactory; + + +/** + * Description + *
    
    + * @author FanGaowei
    + * Date 2018年1月23日 上午11:22:28
    + * Copyright(c) Beijing Seeyon Software Co.,LTD + */ +public class CAP4FormKit { + + private static final Log LOGGER = CtpLogFactory.getLog(CAP4FormKit.class); + + public static FormBean getFormBean(CAP4FormManager cap4FormManager, String code) { + FormBean formBean = null; + try { + formBean = cap4FormManager.getFormByFormCode(code); + } catch(BusinessException e) { + LOGGER.error("获取表单发生异常,编号:" + code, e); + } + return formBean; + } + + /** + * 根据表单的显示名称获取字段的值 + * @param bean + * @param disPlay + * @return + */ + public static Object getFieldValue(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + LOGGER.info("字段不存在:" + disPlay); + return null; + } + return bean.getFieldValue(field.getName()); + } + + + public static int getIntValue(FormDataBean bean, String disPlay) { + Object value = getFieldValue(bean, disPlay); + return StrKit.toInteger(value); + } + + public static String getFieldStrValue(FormDataBean bean, String disPlay) { + Object value = getFieldValue(bean, disPlay); + return StrKit.str(value, true); + } + + public static Object getFieldValueByName(FormDataBean bean, String fieldName) { + return bean.getFieldValue(fieldName); + } + + /** + * 根据表单的显示名称获取字段是 field000? + * @param bean + * @param disPlay + * @return + */ + public static String getFieldTaleId(FormBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getMasterTableBean(); + return getFieldTaleId(table, disPlay); + } + + /** + * 直接根据table来获取 + * @param table + * @param disPlay + * @return + */ + public static String getFieldTaleId(FormTableBean table, String disPlay) { + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + LOGGER.info("字段不存在:" + disPlay); + return null; + } + return field.getName(); + } + + public static String getFieldTaleId(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + return null; + } + return field.getName(); + } + + public static FormFieldBean getFieldBean(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(null == field) { + LOGGER.info("字段不存在:" + disPlay); + } + return field; + } + + + /** + * Description: + *
    
    +	 * @param bean 这里的bean必须是getMasterBean() 方法获取到的bean
    +	 * @param disPlay 
    +	 * @param value
    +	 */
    +	public static void setCellValue(FormDataBean bean, String disPlay, Object value) {
    +		FormFieldBean cell = CAP4FormKit.getFieldBean(bean, disPlay);
    +		if(cell != null) {
    +			bean.addFieldValue(cell.getName(), value);
    +		}
    +	}
    +	
    +	public static void setCellValue(FormDataSubBean bean, String disPlay, Object value) {
    +        FormFieldBean cell = CAP4FormKit.getFieldBean(bean, disPlay);
    +        if(cell != null) {
    +            bean.addFieldValue(cell.getName(), value);
    +        }
    +    }
    +	
    +	/**
    +	 * Description:
    +	 * 
    只适用于只有一个子表的表单
    + * @return + * @throws Exception + */ + public static List getSubBeans(FormDataMasterBean master) { + Map> subs = master.getSubTables(); + if(null == subs) { + return null; + } + for(String key : subs.keySet()) { + return subs.get(key); + } + return null; + } + + public static List getSubBeans(FormDataMasterBean master, String display) { + Map> subs = master.getSubTables(); + if(null == subs) { + return null; + } + for(String key : subs.keySet()) { + FormDataSubBean data = subs.get(key).get(0); + if(display.equals(data.getFormTable().getDisplay())) { + return subs.get(key); + } + } + LOGGER.info("表单不存在:" + display); + return null; + } + + /** + * Description: + *
    获取从表字段
    + * @param sub + * @param disPlay + * @return + */ + public static Object getSubFieldValue(FormDataSubBean sub, String disPlay) { + return getFieldValue(sub, disPlay); + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/ErCodeBGNode.java b/src/com/seeyon/apps/fadadaSys/node/ErCodeBGNode.java new file mode 100644 index 0000000..2ae1f56 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/ErCodeBGNode.java @@ -0,0 +1,672 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.dao.FahuodanDao; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.kit.from.CAP4FormKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.apps.fadadaSys.util.HTMLUtil; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.ctpenumnew.manager.EnumManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.organization.bo.V3xOrgDepartment; +import com.seeyon.ctp.organization.bo.V3xOrgMember; +import com.seeyon.ctp.organization.manager.OrgManager; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums.RunAction; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.sql.SQLException; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ErCodeBGNode extends BaseSuperNodeAction { + + private static Log log = LogFactory.getLog(ErCodeBGNode.class); + + @Override + public String getNodeId() { + return "ErCodeBGNode"; + } + + @Override + public String getNodeName() { + return "二维码变更超级节点"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private IFadadaDao iFadadaDao; + @Autowired + private FahuodanDao fahuodanDao; + + private OrgManager orgManager; + + public OrgManager getOrgManager() { + if (this.orgManager == null) { + this.orgManager = ((OrgManager) AppContext.getBean("orgManager")); + } + return orgManager; + } + + private EnumManager enumManagerNew; + + public void setEnumManagerNew(EnumManager enumManagerNew) { + this.enumManagerNew = enumManagerNew; + } + + protected FormDataApi4Cap4 formDataApi4Cap4; + + private AttachmentManager attachmentManager; + + public AttachmentManager getAttachmentManager() { + if(this.attachmentManager==null) { + this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); + } + return attachmentManager; + } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) throws BusinessException { + //进入超级审核节点 + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + SuperNodeResponse response = new SuperNodeResponse(); + log.info("开始处理单据"); + Map data = getFormData(params); + FormDataMasterBean master = (FormDataMasterBean) data.get("formDataBean"); + try { +// 获取表单数据 + Map htmlDate = getContractParameter(master); + //判断有多少个"同意",用来计算签名定位高度 + Object opinions = htmlDate.get("opinions"); + int height = countApprovals(opinions.toString()); +// List fahuoformDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); +// 生成HTML文件 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + String url = "contracTemplate.html"; + String fileName = sdf.format(new Date()); + String str = SystemEnvironment.getApplicationFolder(); + String htmlFile =str +"/contracTemplate/"+fileName+".html"; + HTMLUtil htmlUtil = new HTMLUtil(); + boolean bool = htmlUtil.JspToHtmlFile(url, htmlFile, htmlDate); + if(!bool) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("表单创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "表单创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "表单创建失败!!!"); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } +// 将生成的HTML文件转换成pdf文件 + String pdfFile= str+"/contracPDF/"+fileName+".pdf"; + htmlUtil.htmlToPdf(htmlFile, pdfFile); + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String fddFileUrl = fadadaUtuil.getUploadUrl(pdfFile); +// 调用文件处理接口,处理文件 + String fileId = fadadaUtuil.fileProcess(fddFileUrl, fileName+".pdf"); +// 创建并发起推送任务 + Map map = new HashMap(); + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); + int size = formDataSubBeans.size(); + map.put("subNum", formDataSubBeans.size()+""); +// 标题 + String con = "发货签收单"; + map.put("subject", con); +// 自定义文档表示 + map.put("docId", "docId1"); +// 上传附件名称 + map.put("docName", fileName+".pdf"); +// 调用接口返回的fileId + map.put("docFileId", fileId); +// 签署人信息表单获取 + String name = CAP4FormKit.getFieldStrValue(master, "客户联系人姓名"); + map.put("name", name); + String userNo = CAP4FormKit.getFieldStrValue(master, "联系人身份证号"); + if(userNo == null || "".equals(userNo)) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("身份证号不能为空"); + CAP4FormKit.setCellValue(master, "返回结果", "身份证号不能为空!!!"); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } + map.put("userNo", userNo); + String mobile = CAP4FormKit.getFieldStrValue(master, "客户联系人手机号码"); + map.put("mobile", mobile); + String create = fadadaUtuil.create(map, size, height); + String signUrl = fadadaUtuil.getSignUrl(create); + if("".equals(create)) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("任务创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "二维码创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "二维码创建失败!!!"); + }else { + String path = getQRCode(signUrl); + String qrc = fileUpload(path, summaryId); + response.setReturnCode(SuperNodeEnums.RunAction.FORWARD.getKey()); + response.setSuccess(false); + response.setReturnMsg("二维码生成成功!" ); + CAP4FormKit.setCellValue(master, "二维码", qrc); + CAP4FormKit.setCellValue(master, "token", token); + CAP4FormKit.setCellValue(master, "签署任务id", create); + CAP4FormKit.setCellValue(master, "返回结果", "二维码生成成功!"); + //修改发货单数据 + String number = CAP4FormKit.getFieldStrValue(master, "单据编号"); + log.info("单据编号为"+number); + List> summaryIdAndaffAirId = iFadadaDao.findSummaryIdAndaffAirId(number); + log.info("查询数据个数:"+summaryIdAndaffAirId.size()); + //summaryId + Object summaryId1 = summaryIdAndaffAirId.get(0).get("field0139"); + log.info("summaryId1:"+summaryId1); + //affAirId + Object affAirId = summaryIdAndaffAirId.get(0).get("field0140"); + log.info("affAirId:"+affAirId); + //上传二维码附件到发货单 + String qrc2 = fileUpload(path, summaryId1.toString()); + //修改发货单签署id和二维码 + int updateFahuodanMsgNum = iFadadaDao.updateFahuodanMsg(number, create, qrc2); + log.info("修改发货单签署id和二维码:"+updateFahuodanMsgNum); + String customerName = CAP4FormKit.getFieldStrValue(master, "客户联系人姓名"); + log.info("客户联系人姓名:"+customerName); + String customerPhone = CAP4FormKit.getFieldStrValue(master, "客户联系人手机号码"); + log.info("客户联系人手机号码:"+customerPhone); + String customerId = CAP4FormKit.getFieldStrValue(master, "联系人身份证号"); + log.info("联系人身份证号:"+customerId); + int updateFahuodanFoundationMsgNum = iFadadaDao.updateFahuodanFoundationMsg(number, customerName, customerPhone,customerId); + log.info("修改发货单签署id和二维码:"+updateFahuodanFoundationMsgNum); + //上传二维码附件到二维码推送单据 + String qrc3 = fileUpload(path, affAirId.toString()); + //原始id + String id = CAP4FormKit.getFieldStrValue(master, "ID"); + //查询二维码推送单据id + List> tuisongList = iFadadaDao.findTuisongId(id); + Object tuisongId = tuisongList.get(0).get("id"); + //修改发货单签署id和二维码 + iFadadaDao.updateTuisongMsg(tuisongId.toString(), create, qrc3); +// 修改发货单基础信息 + iFadadaDao.updateTuisongFoundationMsg(tuisongId.toString(), customerName, customerPhone,customerId); + } + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + } catch (Exception e) { + log.error("异常:"+ e); + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("异常:"+ e); + CAP4FormKit.setCellValue(master, "返回结果", "处理异常:"+ e); + // TODO Auto-generated catch block + e.printStackTrace(); + } + return response; + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + + + private Map getContractParameter(FormDataMasterBean master) throws ParseException, BusinessException{ + Map map = new HashMap<>(); + + List> list = new ArrayList>(); +// SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); +// 设置从表信息 + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); + for (FormDataSubBean formDataSubBean : formDataSubBeans) { + Map< String, Object> maps = new HashMap<>(); + maps.put("num", CAP4FormKit.getSubFieldValue(formDataSubBean, "序号")); + maps.put("categoryName",CAP4FormKit.getSubFieldValue(formDataSubBean, "品种名称")); + + Object stockCode = CAP4FormKit.getSubFieldValue(formDataSubBean, "U8存货编码"); + if (stockCode == null) { + maps.put("stockCode", ""); + } else { + maps.put("stockCode", stockCode); + } + + Object specification = CAP4FormKit.getSubFieldValue(formDataSubBean, "规格"); + if (specification == null) { + maps.put("specification", ""); + } else { + maps.put("specification", specification); + } + + Object units = CAP4FormKit.getSubFieldValue(formDataSubBean, "计量单位"); + if (units == null) { + maps.put("units", ""); + } else { + maps.put("units", units); + } + + Object quantityShipped = CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货数量"); + if (quantityShipped == null) { + maps.put("quantityShipped", ""); + } else { + maps.put("quantityShipped", quantityShipped); + } + + Object subFieldValue = CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货数量-袋"); + if (subFieldValue == null) { + maps.put("quantityShipped2", ""); + } else { + maps.put("quantityShipped2", subFieldValue); + } + + final Object unitPrice = CAP4FormKit.getSubFieldValue(formDataSubBean, "提货单价"); + if (unitPrice == null) { + maps.put("unitPrice", ""); + } else { + maps.put("unitPrice", unitPrice); + } + + + maps.put("shipmentsMoney", CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货金额")); + Object fieldValue = CAP4FormKit.getSubFieldValue(formDataSubBean, "实际到货数量"); + if (fieldValue == null) { + maps.put("number", ""); + } else { + maps.put("number", fieldValue); + } + + Object beizhu = CAP4FormKit.getSubFieldValue(formDataSubBean, "备注"); + if (beizhu == null || "".equals(beizhu)){ + maps.put("remark", ""); + } else { + maps.put("remark", beizhu); + } + + list.add(maps); + } +// 设置主表信息 + map.put("receiptNumber", CAP4FormKit.getFieldStrValue(master, "单据编号")); + map.put("title", CAP4FormKit.getFieldStrValue(master, "合同签订单位标题名称")); + String deptId = CAP4FormKit.getFieldStrValue(master, "发起部门"); + System.out.println(deptId); + map.put("deptId", deptId); + V3xOrgDepartment departmentById = getOrgManager().getDepartmentById(Long.parseLong(deptId)); + System.out.println(departmentById.getName()); + System.out.println(departmentById.getId()); + map.put("department", departmentById.getName()); + + String memberId = CAP4FormKit.getFieldStrValue(master, "发起人员"); + map.put("memberId", memberId); + V3xOrgMember memberById = getOrgManager().getMemberById(Long.parseLong(memberId)); + map.put("person", memberById.getName()); + + map.put("startDate", CAP4FormKit.getFieldStrValue(master, "发起日期")); + + //发货通知单和发货单日期处理 + String date1 = CAP4FormKit.getFieldStrValue(master, "发起日期"); + // 定义日期字符串的格式 + DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日"); + LocalDate date = LocalDate.parse(date1, inputFormatter); + String formattedDate1 = date.format(outputFormatter); + + // 将String类型的日期转换成LocalDate类型 + LocalDate date2 = LocalDate.parse(date1, inputFormatter); + // 使用LocalDate类将日期增加一天 + LocalDate nextDay = date.plusDays(1); + // 将计算后的LocalDate类型日期再转换成String类型 + String nextDayString = nextDay.format(inputFormatter); + LocalDate date3 = LocalDate.parse(nextDayString, inputFormatter); + String formattedDate2 = date3.format(outputFormatter); + + map.put("formattedDate1", formattedDate1); + map.put("formattedDate2", formattedDate2); + + + map.put("contractName", CAP4FormKit.getFieldStrValue(master, "选择合同")); + map.put("contractNumber", CAP4FormKit.getFieldStrValue(master, "合同编号")); + String sellerstr = CAP4FormKit.getFieldStrValue(master, "专属业务员"); + map.put("sellerstr1",sellerstr); + if("".equals(sellerstr)) { + map.put("seller", ""); + }else { + long userid = Long.parseLong(sellerstr); + V3xOrgMember member = getOrgManager().getMemberById(userid); + map.put("seller", member.getName()); + } + map.put("clientName", CAP4FormKit.getFieldStrValue(master, "客户名称")); + map.put("consigneeName", CAP4FormKit.getFieldStrValue(master, "客户联系人姓名")); + map.put("consigneeAddress", CAP4FormKit.getFieldStrValue(master, "收货地址")); + map.put("consigneePhone", CAP4FormKit.getFieldStrValue(master, "客户联系人手机号码")); + map.put("consigneeCard", CAP4FormKit.getFieldStrValue(master, "联系人身份证号")); + map.put("shipmentsExplain", CAP4FormKit.getFieldStrValue(master, "发货说明")); + map.put("isNumber", CAP4FormKit.getFieldStrValue(master, "是否与客户沟通并确认数量")); + map.put("fileUpload", CAP4FormKit.getFieldStrValue(master, "附件上传")); + map.put("logisticsFile", CAP4FormKit.getFieldStrValue(master, "物流单据附件")); + map.put("renwuId", CAP4FormKit.getFieldStrValue(master, "ID")); + String shipmentsWarehousestr = CAP4FormKit.getFieldStrValue(master, "发货仓库"); + map.put("shipmentsWarehousestr", shipmentsWarehousestr); + if("".equals(shipmentsWarehousestr)) { + map.put("shipmentsWarehouse", ""); + }else { + String shipmentsWarehouseLabel = enumManagerNew.getEnumItem(Long.parseLong(shipmentsWarehousestr)).getLabel(); + map.put("shipmentsWarehouse", shipmentsWarehouseLabel); + } + map.put("balance", CAP4FormKit.getFieldStrValue(master, "可用余额")); + map.put("shipmentsLaterBalance", CAP4FormKit.getFieldStrValue(master, "本次发货后可用余额")); + String shipmentsTypestr = CAP4FormKit.getFieldStrValue(master, "发货类型"); + map.put("shipmentsTypestr", shipmentsTypestr); + if("".equals(shipmentsTypestr)) { + map.put("shipmentsType", ""); + }else { + String shipmentsTypeLabel = enumManagerNew.getEnumItem(Long.parseLong(shipmentsTypestr)).getLabel(); + map.put("shipmentsType", shipmentsTypeLabel); + } + + map.put("quantityTotal", CAP4FormKit.getFieldStrValue(master, "本次发货数量合计")); + map.put("quantityDaiTotal", CAP4FormKit.getFieldStrValue(master, "本次发货数量袋合计")); + map.put("moneyTotal", CAP4FormKit.getFieldStrValue(master, "本次发货金额合计")); + map.put("logisticsExplain", CAP4FormKit.getFieldStrValue(master, "物流信息说明")); + String yijian = CAP4FormKit.getFieldStrValue(master, "审批意见"); + String output = yijian.replaceAll("\\[([^@]+) @signet@([^_]+)_[^ ]+@signet@ ([0-9-]+ [0-9:]+)]", "[$1 $2 $3]"); + String opinions = output.replaceAll("\\[", "[").replaceAll("\\]", "]
    "); + map.put("opinions", opinions); + map.put("shipmentsDetails", list); + + //发货单信息 + String shipmentsNo = CAP4FormKit.getFieldStrValue(master, "U8发货单号"); + map.put("shipmentsNo", shipmentsNo); + //发货单信息 + try { + List> u8SendData = fahuodanDao.getU8SendData(shipmentsNo); + System.out.println("发货单信息:"+u8SendData); + if (u8SendData.size() > 0) { + Map sendData = u8SendData.get(0); + System.out.println("发货单数据" + sendData); + Object ddate = sendData.get("ddate"); +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); +// String formatDate = format.format(); + map.put("shipmentsDate", ddate);//发货时间 + //销售部门 + Object cdepname = sendData.get("cdepname"); + if (cdepname == null || "".equals(cdepname)){ + map.put("shipmentsDept", ""); + } else { + map.put("shipmentsDept", cdepname); + } + //业务类型 + Object cbustype = sendData.get("cbustype"); + if (cbustype == null || "".equals(cbustype)){ + map.put("businessType", ""); + } else { + map.put("businessType", cbustype); + } + //销售类型 + Object cstname = sendData.get("cstname"); + if (cstname == null || "".equals(cstname)){ + map.put("salesType", ""); + } else { + map.put("salesType", cstname); + } + //客户简称 + Object ccusabbname = sendData.get("ccusabbname"); + if (ccusabbname == null || "".equals(ccusabbname)){ + map.put("masterName", ""); + } else { + map.put("masterName", ccusabbname); + } + + //客户级别名称 + Object cdefine1 = sendData.get("cdefine1"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("masterLev", ""); + } else { + map.put("masterLev", cdefine1); + } + //客户编码请求成功 + Object ccuscode = sendData.get("ccuscode"); + if (ccuscode == null || "".equals(ccuscode)){ + map.put("masterCode", ""); + } else { + map.put("masterCode", ccuscode); + } + //税率 + Object itaxrate = sendData.get("itaxrate"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("taxrate", ""); + } else { + map.put("taxrate", itaxrate); + } + //制单人 + Object createname = sendData.get("createname"); + if (createname == null || "".equals(createname)){ + map.put("creator", ""); + } else { + map.put("creator", createname); + } + List> datas = new ArrayList>(); + //明细表 + List> u8SendDataTables = fahuodanDao.getU8SendDataTables(sendData.get("summaryid").toString()); + System.out.println("发货单明细信息:"+u8SendData); + double sum = 0; + for (Map u8SendDataTable : u8SendDataTables) { + Map< String, Object> maps = new HashMap<>(); + //仓库名称 + Object cwhname = u8SendDataTable.get("cwhname"); + if (cwhname == null || "".equals(cwhname)){ + maps.put("cwhName", ""); + } else { + maps.put("cwhName", cwhname); + } + //存货编码 + Object cinvcode = u8SendDataTable.get("cinvcode"); + if (cinvcode == null || "".equals(cinvcode)){ + maps.put("cinvCode", ""); + } else { + maps.put("cinvCode", cinvcode); + } + //存货名称 + Object cinvname = u8SendDataTable.get("cinvname"); + if (cinvname == null || "".equals(cinvname)){ + maps.put("cinvName", ""); + } else { + maps.put("cinvName", cinvname); + } + //规格型号 + Object cinvstd = u8SendDataTable.get("cinvstd"); + if (cinvstd == null || "".equals(cinvstd)){ + maps.put("cinvstd", ""); + } else { + maps.put("cinvstd", cinvstd); + } + //主计量 + Object cinvm_unit = u8SendDataTable.get("cinvm_unit"); + if (cinvm_unit == null || "".equals(cinvm_unit)){ + maps.put("cinvmUnit", ""); + } else { + maps.put("cinvmUnit", cinvm_unit); + } + //数量 + Object iqaquantity = u8SendDataTable.get("iquantity"); + if (iqaquantity == null || "".equals(iqaquantity)){ + maps.put("cinvNumber", ""); + } else { + String originalString = iqaquantity.toString(); + double originalValue = Double.parseDouble(originalString); + + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + String formattedString = decimalFormat.format(originalValue); + maps.put("cinvNumber", formattedString); + } + Object inum = u8SendDataTable.get("inum"); + double doubleValue = Double.parseDouble(inum.toString()); + //int intValue = (int) doubleValue; + maps.put("inum", doubleValue);//件数 + sum += doubleValue; + datas.add(maps); + } + map.put("sum", sum);//总件数 + map.put("dispathDetails", datas); + } + } catch (SQLException throwables) { + throwables.printStackTrace(); + } + + //销售部门 CDEPNAME 发货时间 DDATE 业务类型CBUSTYPE 销售类型CSTNAME 客户简称CCUSABBNAME + //客户级别名称CDEFINE1 客户编码 CCUSCODE 税率ITAXRATE + //仓库名称CWHNAME 存货编码CINVCODE 存货名称CINVNAME 规格型号CINVSTD 主计量CINVM_UNIT 数量IQAQUANTITY + //可用量 件数INUM + return map; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + System.out.println("二维码已成功生成并保存到:" + filePath); + //getAttachmentManager().create() + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + System.out.println("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); + System.out.println(s); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } + + /** + * 判断有多少“同意” + * + * @return + */ + public int countApprovals(String input) { + Pattern pattern = Pattern.compile("【同意】"); + Matcher matcher = pattern.matcher(input); + + int count = 0; + while (matcher.find()) { + count++; + } + + return count; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/FadadaDataReturnNode.java b/src/com/seeyon/apps/fadadaSys/node/FadadaDataReturnNode.java new file mode 100644 index 0000000..18ae2f8 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/FadadaDataReturnNode.java @@ -0,0 +1,197 @@ +package com.seeyon.apps.fadadaSys.node; + +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.seeyon.apps.fadadaSys.kit.from.CAP4FormKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import com.seeyon.ctp.common.po.filemanager.Attachment; + +import com.fasc.open.api.v5_1.res.signtask.ListSignTaskFillField; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums.RunAction; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; + +import www.seeyon.com.utils.UUIDUtil; + +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; + +public class FadadaDataReturnNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaDataReturnNode.class); + + @Override + public String getNodeId() { + return "fadadaDataReturnNode"; + } + + @Override + public String getNodeName() { + return "下载签署文件超级节点"; + } + + @Override + public int getOrder() { + return 0; + } + + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() { + if(this.attachmentManager==null) { + this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); + } + return attachmentManager; + } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + protected FormDataApi4Cap4 formDataApi4Cap4; + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) throws BusinessException{ + return executeAction(token, activityId, params); + } + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params)throws BusinessException{ + //进入超级审核节点 + SuperNodeResponse response = new SuperNodeResponse(); + System.out.println("开始处理单据"); + Map data = getFormData(params); + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + FormDataMasterBean master = (FormDataMasterBean) data.get("formDataBean"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); +// 获取表单上的法大大任务ID + String signTaskId = CAP4FormKit.getFieldStrValue(master, "ID"); + log.info("获取法大大任务ID"+signTaskId); + List listSignTaskFillField = fadadaUtuil.getFieldValue(signTaskId); + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); + int typevalue = 0; + if(formDataSubBeans==null){ + formDataSubBeans = CAP4FormKit.getSubBeans(master,"调货明细"); + typevalue = 1; + } + for(int i = 0 ; i< formDataSubBeans.size();i++) { + for(int n = 0 ; n < listSignTaskFillField.size();n++) { + ListSignTaskFillField SignTaskFillField = listSignTaskFillField.get(n); + if(SignTaskFillField.getFieldId().equals(i+"")) { + String fieldValue = SignTaskFillField.getFieldValue(); + int value = Integer.parseInt(fieldValue); + if(typevalue==0){ + CAP4FormKit.setCellValue(formDataSubBeans.get(i), "实际到货数量", value); + }else{ + CAP4FormKit.setCellValue(formDataSubBeans.get(i), "实际发货数量", value); + } + } + } + } +// 获取附件下载地址 + log.info(signTaskId); + String ownerDownloadUrl = fadadaUtuil.getOwnerDownloadUrl(signTaskId); + log.info("获取法大大合同下载地址"+ownerDownloadUrl); +// 调用附件下载方法下载附件到指定文件下 + String str = SystemEnvironment.getApplicationFolder(); + fadadaUtuil.download(ownerDownloadUrl, str+"/fadadapdf/"+signTaskId+".pdf"); + log.info(master.getId()); + String fileUploadId = fileUpload(str+"/fadadapdf/"+signTaskId+".pdf",summaryId); + log.info("上传OA附件返回附件ID"+fileUploadId); + CAP4FormKit.setCellValue(master, "法大大签署文件", fileUploadId); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + } catch (Exception e) { + log.error("异常:"+ e); + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("异常:"+ e); + // TODO Auto-generated catch block + e.printStackTrace(); + } + return response; + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + System.out.println("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + log.info("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "application/pdf"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + log.info("文件"+map); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + log.info(str); + return l+""; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/FadadaDiaoRuNode.java b/src/com/seeyon/apps/fadadaSys/node/FadadaDiaoRuNode.java new file mode 100644 index 0000000..1857da6 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/FadadaDiaoRuNode.java @@ -0,0 +1,655 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.dao.FahuodanDao; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.kit.from.CAP4FormKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.apps.fadadaSys.util.HTMLUtil; +import com.seeyon.apps.fadadaSys.util.Member; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.ctpenumnew.manager.EnumManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.organization.bo.V3xOrgDepartment; +import com.seeyon.ctp.organization.bo.V3xOrgMember; +import com.seeyon.ctp.organization.manager.OrgManager; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums.RunAction; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import com.seeyon.v3x.services.flow.FlowFactory; +import com.seeyon.v3x.services.form.bean.FormExport; +import com.seeyon.v3x.services.form.bean.ValueExport; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.sql.SQLException; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class FadadaDiaoRuNode extends BaseSuperNodeAction { + + private static final Log log = LogFactory.getLog(FadadaDiaoRuNode.class); + + @Override + public String getNodeId() { + return "fadadaDiaoRuNode"; + } + + @Override + public String getNodeName() { + return "创建签署任务超级节点(调入)"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private IFadadaDao iFadadaDao; + @Autowired + private FahuodanDao fahuodanDao; + private OrgManager orgManager; + public OrgManager getOrgManager() {if (this.orgManager == null) { this.orgManager = ((OrgManager) AppContext.getBean("orgManager")); }return orgManager; } + private FlowFactory flowFactory; + public FlowFactory getFlowFactory() { if (flowFactory == null) { flowFactory = (FlowFactory) AppContext.getBean("flowFactory"); }return flowFactory; } + private EnumManager enumManagerNew; + public void setEnumManagerNew(EnumManager enumManagerNew) { this.enumManagerNew = enumManagerNew; } + protected FormDataApi4Cap4 formDataApi4Cap4; + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() {if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) throws BusinessException { + //进入超级审核节点 + System.out.println("开始处理单据FadadaDiaoRuNode"); + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + FormDataMasterBean master = (FormDataMasterBean) data.get("formDataBean"); + Member AddMember; + try { +// 获取表单数据 + Map htmlDate = getContractParameter(master); + //判断有多少个"同意",用来计算签名定位高度 + Object opinions = htmlDate.get("opinions"); + int height = countApprovals(opinions.toString()); +// 生成HTML文件 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + String url = "contracTemplate2.html"; + String fileName = sdf.format(new Date()); + String str = SystemEnvironment.getApplicationFolder(); + String htmlFile =str +"/contracTemplate/"+fileName+".html"; + HTMLUtil htmlUtil = new HTMLUtil(); + boolean bool = htmlUtil.jspTohtmlFileDiaoRu(url, htmlFile, htmlDate); + log.info("bool:"+bool); + if(!bool) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("二维码创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "二维码创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "任务创建失败!!!"); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } +// 将生成的HTML文件转换成pdf文件 + String pdfFile= str+"/contracPDF/"+fileName+".pdf"; + log.info("生成文件路径为:"+pdfFile); + htmlUtil.htmlToPdf(htmlFile, pdfFile); + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String fddFileUrl = fadadaUtuil.getUploadUrl(pdfFile); + log.info("上传文件到服务器"+fddFileUrl); +// 调用文件处理接口,处理文件 + String fileId = fadadaUtuil.fileProcess(fddFileUrl, fileName+".pdf"); +// 创建并发起推送任务 + Map map = new HashMap(); + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"调货明细"); + int size = formDataSubBeans.size(); + map.put("subNum", formDataSubBeans.size()+""); +// 标题 + //发起人员 + String con = "发货签收单"; + map.put("subject", con); +// 自定义文档表示 + map.put("docId", "docId1"); +// 上传附件名称 + map.put("docName", fileName+".pdf"); +// 调用接口返回的fileId + map.put("docFileId", fileId); +// 签署人信息表单获取 + String name = CAP4FormKit.getFieldStrValue(master, "调入客户联系人"); + map.put("name", name); + String userNo = CAP4FormKit.getFieldStrValue(master, "调入联系人身份证号"); + map.put("userNo", userNo); + String mobile = CAP4FormKit.getFieldStrValue(master, "调入联系人手机号"); + map.put("mobile", mobile); + String create = fadadaUtuil.createDiaoRu(map, size, height); + String signUrl = fadadaUtuil.getSignUrl(create); + log.info("签署连接"+signUrl); + if("".equals(create)) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("任务创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "任务创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "任务创建失败!!!"); + }else { + String path = getQRCode(signUrl); + String qrc = fileUpload(path, summaryId); + response.setReturnCode(4); + response.setReturnMsg("请等待对方签署"); + CAP4FormKit.setCellValue(master, "二维码", qrc); + CAP4FormKit.setCellValue(master, "token", token); + CAP4FormKit.setCellValue(master, "ID", create); + CAP4FormKit.setCellValue(master, "返回结果", "任务创建成功,请等待对方签署!!!"); + //推送给业务员 + String sellerstr = CAP4FormKit.getFieldStrValue(master, "调入合同专属业务员"); + V3xOrgMember member = getOrgManager().getMemberById(Long.parseLong(sellerstr)); + //获取登录名 + String code = member.getV3xOrgPrincipal().getLoginName(); + String sellName = member.getName(); + Long dept = member.getOrgDepartmentId(); + Long post = member.getOrgPostId(); + Long memberId = member.getId(); + AddMember = new Member(name, String.valueOf(dept), String.valueOf(post)); + //设置主题名称 + StringBuffer subject = new StringBuffer(); + subject.append(sellName).append("-").append(code).append("-电子签收单"); + //发起流程 + long affairId = getFlowFactory().sendCollaboration(code, "diaorutuisong", subject.toString(), + setFormExport(AddMember, htmlDate, memberId, create), null, null, null); + //上传二维码附件 + String qrc2 = fileUpload(path, Long.toString(affairId)); + //将附件保存至对应数据中 + String id = iFadadaDao.getIdByObjectId(affairId); + int i = iFadadaDao.addDiaoRuFile(id, qrc2); + } + } catch (Exception e) { + log.error("异常:"+ e); + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("异常:"+ e); + CAP4FormKit.setCellValue(master, "返回结果", "处理异常:"+ e); + // TODO Auto-generated catch block + e.printStackTrace(); + } + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + + private Map getContractParameter(FormDataMasterBean master) throws ParseException, BusinessException{ + Map map = new HashMap<>(); + List> list = new ArrayList>(); +// 设置从表信息 + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"调货明细"); + for (FormDataSubBean formDataSubBean : formDataSubBeans) { + Map< String, Object> maps = new HashMap<>(); + maps.put("num", CAP4FormKit.getSubFieldValue(formDataSubBean, "序号")); + maps.put("categoryName",CAP4FormKit.getSubFieldValue(formDataSubBean, "品种名称")); + maps.put("stockCode", CAP4FormKit.getSubFieldValue(formDataSubBean, "U8存货编码")); + maps.put("specification", CAP4FormKit.getSubFieldValue(formDataSubBean, "规格")); + maps.put("units", CAP4FormKit.getSubFieldValue(formDataSubBean, "计量单位")); + maps.put("quantityShipped", CAP4FormKit.getSubFieldValue(formDataSubBean, "调货数量")); + Object subFieldValue = CAP4FormKit.getSubFieldValue(formDataSubBean, "调货数量-袋"); + if (subFieldValue == null || "".equals(subFieldValue)) { + maps.put("quantityShipped2", ""); + } else { + maps.put("quantityShipped2", subFieldValue); + } + Object shipmentsMoney = CAP4FormKit.getSubFieldValue(formDataSubBean, "实际发货数量"); + if (shipmentsMoney == null || "".equals(shipmentsMoney)){ + maps.put("shipmentsMoney", ""); + } else { + maps.put("shipmentsMoney", shipmentsMoney); + } + Object beizhu = CAP4FormKit.getSubFieldValue(formDataSubBean, "调货备注"); + if (beizhu == null || "".equals(beizhu)){ + maps.put("remark", ""); + } else { + maps.put("remark", beizhu); + } + list.add(maps); + } +// 设置主表信息 + map.put("receiptNumber", CAP4FormKit.getFieldStrValue(master, "单据编号")); + map.put("title", CAP4FormKit.getFieldStrValue(master, "合同签订单位标题名称")); + String deptId = CAP4FormKit.getFieldStrValue(master, "发起部门"); + map.put("deptId", deptId); + V3xOrgDepartment departmentById = getOrgManager().getDepartmentById(Long.parseLong(deptId)); + map.put("department", departmentById.getName()); + + String memberId =CAP4FormKit.getFieldStrValue(master, "发起人员"); + map.put("memberId", memberId); + V3xOrgMember memberById = getOrgManager().getMemberById(Long.parseLong(memberId)); + map.put("person", memberById.getName()); + map.put("calInCustomMember", CAP4FormKit.getFieldStrValue(master, "调入客户联系人")); + map.put("callMemberPhone", CAP4FormKit.getFieldStrValue(master, "调入联系人手机号")); + map.put("consigneeCard", CAP4FormKit.getFieldStrValue(master, "调入联系人身份证号")); + map.put("renwuId", CAP4FormKit.getFieldStrValue(master, "ID")); + map.put("shipmentsExplain", CAP4FormKit.getFieldStrValue(master, "调货说明")); + map.put("startDate", CAP4FormKit.getFieldStrValue(master, "发起日期")); + //发货通知单和发货单日期处理 + String date1 = CAP4FormKit.getFieldStrValue(master, "发起日期"); + // 定义日期字符串的格式 + DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日"); + LocalDate date = LocalDate.parse(date1, inputFormatter); + String formattedDate1 = date.format(outputFormatter); + map.put("formattedDate1", formattedDate1); + map.put("outContractName", CAP4FormKit.getFieldStrValue(master, "调出合同名称")); + map.put("outCustomMember", CAP4FormKit.getFieldStrValue(master, "调出客户联系人")); + map.put("outMemberPhone", CAP4FormKit.getFieldStrValue(master, "调出联系人手机号")); + map.put("outCustomName", CAP4FormKit.getFieldStrValue(master, "调出客户名称")); + String outSellerstr = CAP4FormKit.getFieldStrValue(master, "调出合同专属业务员"); + if("".equals(outSellerstr)) { + map.put("outSellerstr", ""); + }else { + long userid = Long.parseLong(outSellerstr); + V3xOrgMember member = getOrgManager().getMemberById(userid); + map.put("outSellerstr", member.getName()); + } + map.put("fileUpload", CAP4FormKit.getFieldStrValue(master, "附件上传")); + String shipmentsWarehousestr = CAP4FormKit.getFieldStrValue(master, "调出-收货仓库"); + map.put("shipmentsWarehousestr", shipmentsWarehousestr); + if("".equals(shipmentsWarehousestr)) { + map.put("shipmentsWarehouse", ""); + }else { + String shipmentsWarehouseLabel = enumManagerNew.getEnumItem(Long.parseLong(shipmentsWarehousestr)).getLabel(); + map.put("shipmentsWarehouse", shipmentsWarehouseLabel); + } + String yijian = CAP4FormKit.getFieldStrValue(master, "审批意见"); + String output = yijian.replaceAll("\\[([^@]+) @signet@([^_]+)_[^ ]+@signet@ ([0-9-]+ [0-9:]+)]", "[$1 $2 $3]"); + String opinions = output.replaceAll("\\[", "
     [").replaceAll("\\]", "]
    "); + map.put("opinions", opinions); + map.put("callInContractName", CAP4FormKit.getFieldStrValue(master, "调入合同名称")); + map.put("calInCustomName", CAP4FormKit.getFieldStrValue(master, "调入客户名称")); + map.put("moneyTotal", CAP4FormKit.getFieldStrValue(master, "调货金额合计")); + String callInSellerstr = CAP4FormKit.getFieldStrValue(master, "调入合同专属业务员"); + map.put("sellerstr1", callInSellerstr); + if("".equals(callInSellerstr)) { + map.put("callInSellerstr", ""); + }else { + long userid2 = Long.parseLong(callInSellerstr); + V3xOrgMember member2 = getOrgManager().getMemberById(userid2); + map.put("callInSellerstr", member2.getName()); + } + String callInTakeGoodsSellerstr = CAP4FormKit.getFieldStrValue(master, "调入-收货人员"); + if("".equals(callInTakeGoodsSellerstr)) { + map.put("callInTakeGoodsSellerstr", ""); + }else { + long userid3 = Long.parseLong(callInTakeGoodsSellerstr); + V3xOrgMember member3 = getOrgManager().getMemberById(userid3); + map.put("callInTakeGoodsSellerstr", member3.getName()); + } + map.put("shipmentsDetails", list); + //发货单信息 + String shipmentsNo = CAP4FormKit.getFieldStrValue(master, "U8发货单号"); + map.put("shipmentsNo", shipmentsNo); + //发货单信息 + try { + List> u8SendData = fahuodanDao.getU8SendData(shipmentsNo); + if (u8SendData.size() > 0) { + Map sendData = u8SendData.get(0); + Object ddate = sendData.get("ddate"); +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); +// String formatDate = format.format(ddate); + map.put("shipmentsDate", ddate);//发货时间 + //销售部门 + Object cdepname = sendData.get("cdepname"); + if (cdepname == null || "".equals(cdepname)){ + map.put("shipmentsDept", ""); + } else { + map.put("shipmentsDept", cdepname); + } + //业务类型 + Object cbustype = sendData.get("cbustype"); + if (cbustype == null || "".equals(cbustype)){ + map.put("businessType", ""); + } else { + map.put("businessType", cbustype); + } + //销售类型 + Object cstname = sendData.get("cstname"); + if (cstname == null || "".equals(cstname)){ + map.put("salesType", ""); + } else { + map.put("salesType", cstname); + } + //客户简称 + Object ccusabbname = sendData.get("ccusabbname"); + if (ccusabbname == null || "".equals(ccusabbname)){ + map.put("masterName", ""); + } else { + map.put("masterName", ccusabbname); + } + //客户级别名称 + Object cdefine1 = sendData.get("cdefine1"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("masterLev", ""); + } else { + map.put("masterLev", cdefine1); + } + //客户编码请求成功 + Object ccuscode = sendData.get("ccuscode"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("masterCode", ""); + } else { + map.put("masterCode", ccuscode); + } + //税率 + Object itaxrate = sendData.get("itaxrate"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("taxrate", ""); + } else { + map.put("taxrate", itaxrate); + } + //制单人 + Object createname = sendData.get("createname"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("creator", ""); + } else { + map.put("creator", createname); + } + List> datas = new ArrayList>(); + //明细表 + List> u8SendDataTables = fahuodanDao.getU8SendDataTables(sendData.get("summaryid").toString()); + double sum = 0; + Double sunNum = 0.00; + for (Map u8SendDataTable : u8SendDataTables) { + Map< String, Object> maps = new HashMap<>(); + //仓库名称 + Object cwhname = u8SendDataTable.get("cwhname"); + if (cwhname == null || "".equals(cwhname)){ + maps.put("cwhName", ""); + } else { + maps.put("cwhName", cwhname); + } + //存货编码 + Object cinvcode = u8SendDataTable.get("cinvcode"); + if (cinvcode == null || "".equals(cinvcode)){ + maps.put("cinvCode", ""); + } else { + maps.put("cinvCode", cinvcode); + } + //存货名称 + Object cinvname = u8SendDataTable.get("cinvname"); + if (cinvname == null || "".equals(cinvname)){ + maps.put("cinvName", ""); + } else { + maps.put("cinvName", cinvname); + } + //规格型号 + Object cinvstd = u8SendDataTable.get("cinvstd"); + if (cinvstd == null || "".equals(cinvstd)){ + maps.put("cinvstd", ""); + } else { + maps.put("cinvstd", cinvstd); + } + //主计量 + Object cinvm_unit = u8SendDataTable.get("cinvm_unit"); + if (cinvm_unit == null || "".equals(cinvm_unit)){ + maps.put("cinvmUnit", ""); + } else { + maps.put("cinvmUnit", cinvm_unit); + } + //数量 + Object iqaquantity = u8SendDataTable.get("iquantity"); + if (iqaquantity == null || "".equals(iqaquantity)){ + maps.put("cinvNumber", ""); + } else { + String originalString = iqaquantity.toString(); + double originalValue = Double.parseDouble(originalString); + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + String formattedString = decimalFormat.format(originalValue); + maps.put("cinvNumber", formattedString); + } + //数量合计 + double value = Double.parseDouble(iqaquantity.toString()); + double intValue2 = (double) value; + maps.put("iqaquantity", intValue2);//数量 + sunNum += intValue2; + //件数合计 + Object inum = u8SendDataTable.get("inum"); + double doubleValue = Double.parseDouble(inum.toString()); + //int intValue = (int) doubleValue; + maps.put("inum", doubleValue);//件数 + sum += doubleValue; + datas.add(maps); + } + map.put("sunNum", sunNum);//总数量 + map.put("sum", sum);//总件数 + map.put("dispathDetails", datas); + } + } catch (SQLException throwables) { + throwables.printStackTrace(); + } + //销售部门 CDEPNAME 发货时间 DDATE 业务类型CBUSTYPE 销售类型CSTNAME 客户简称CCUSABBNAME + //客户级别名称CDEFINE1 客户编码 CCUSCODE 税率ITAXRATE + //仓库名称CWHNAME 存货编码CINVCODE 存货名称CINVNAME 规格型号CINVSTD 主计量CINVM_UNIT 数量IQAQUANTITY + //可用量 件数INUM + return map; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + System.out.println("二维码已成功生成并保存到:" + filePath); + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } + + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// List> lists = dataDao.findAttachAll(id); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); +// System.out.println(beanId); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } + + /** + * 设置FormExport对象,设置表单中的数据 + * @param member 根据流程添加的人员数据 + * @return + */ + public FormExport setFormExport(Member member, Map map, Long memberId, String create){ + FormExport formExport; + formExport = new FormExport(); + formExport.setValues(setValueExports(member, map, memberId, create)); + log.info("formExport"+formExport); + return formExport; + + } + /** + * 设置ValueExport对象,设置每个控件中的数据。 + * @param member 根据流程添加的人员数据 + * @return + */ + public List setValueExports(Member member, Map map, Long memberId, String create) { + List values = new ArrayList(); + ValueExport ve = new ValueExport(); + ve = new ValueExport(); + ve.setDisplayName("发起部门"); + ve.setValue(member.getDeptId()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("发起人员"); + ve.setValue(memberId.toString()); + values.add(ve); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + String data = format.format(new Date()); + ve = new ValueExport(); + ve.setDisplayName("发起日期"); + ve.setValue(data); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("调入客户名称"); + ve.setValue(map.get("calInCustomName").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("专属业务员"); + ve.setValue(map.get("sellerstr1").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("签署任务ID"); + ve.setValue(create); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("调入客户联系人"); + ve.setValue(map.get("calInCustomMember").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("调入联系人手机号"); + ve.setValue(map.get("callMemberPhone").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("调入联系人身份证号"); + ve.setValue(map.get("consigneeCard").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("数量合计"); + ve.setValue(map.get("sunNum").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("金额合计"); + ve.setValue(map.get("moneyTotal").toString()); + values.add(ve); + return values; + + } + + /** + * 判断有多少“同意” + * + * @return + */ + public int countApprovals(String input) { + Pattern pattern = Pattern.compile("【同意】"); + Matcher matcher = pattern.matcher(input); + + int count = 0; + while (matcher.find()) { + count++; + } + + return count; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/FadadaNode.java b/src/com/seeyon/apps/fadadaSys/node/FadadaNode.java new file mode 100644 index 0000000..d42c6a1 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/FadadaNode.java @@ -0,0 +1,698 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.dao.FahuodanDao; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.kit.from.CAP4FormKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.apps.fadadaSys.util.HTMLUtil; +import com.seeyon.apps.fadadaSys.util.Member; +import com.seeyon.ctp.organization.bo.V3xOrgDepartment; +import com.seeyon.v3x.services.form.bean.FormExport; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.ctpenumnew.manager.EnumManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.organization.bo.V3xOrgMember; +import com.seeyon.ctp.organization.manager.OrgManager; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums.RunAction; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import com.seeyon.v3x.services.flow.FlowFactory; +import com.seeyon.v3x.services.form.bean.ValueExport; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.sql.SQLException; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class FadadaNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaNode.class); + + @Override + public String getNodeId() { + return "fadadaNode"; + } + + @Override + public String getNodeName() { + return "创建签署任务超级节点x"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private IFadadaDao iFadadaDao; + @Autowired + private FahuodanDao fahuodanDao; + private OrgManager orgManager; + public OrgManager getOrgManager() { if (this.orgManager == null) { this.orgManager = ((OrgManager) AppContext.getBean("orgManager")); }return orgManager; } + private FlowFactory flowFactory; + public FlowFactory getFlowFactory() { if (flowFactory == null) { flowFactory = (FlowFactory) AppContext.getBean("flowFactory"); }return flowFactory; } + private EnumManager enumManagerNew; + public void setEnumManagerNew(EnumManager enumManagerNew) { + this.enumManagerNew = enumManagerNew; + } + protected FormDataApi4Cap4 formDataApi4Cap4; + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() { if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) throws BusinessException { return executeAction(token, activityId, params); } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) throws BusinessException { + //进入超级审核节点 + System.out.println("开始处理单据FadadaNode"); + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + FormDataMasterBean master = (FormDataMasterBean) data.get("formDataBean"); + Member AddMember; + try { +// 获取表单数据 + Map htmlDate = getContractParameter(master); + //判断有多少个"同意",用来计算签名定位高度 + Object opinions = htmlDate.get("opinions"); + int height = countApprovals(opinions.toString()); +// List fahuoformDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); +// 生成HTML文件 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + String url = "contracTemplate.html"; + String fileName = sdf.format(new Date()); + String str = SystemEnvironment.getApplicationFolder(); + String htmlFile =str +"/contracTemplate/"+fileName+".html"; + HTMLUtil htmlUtil = new HTMLUtil(); + boolean bool = htmlUtil.JspToHtmlFile(url, htmlFile, htmlDate); + if(!bool) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("表单创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "表单创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "表单创建失败!!!"); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } +// 将生成的HTML文件转换成pdf文件 + String pdfFile= str+"/contracPDF/"+fileName+".pdf"; + htmlUtil.htmlToPdf(htmlFile, pdfFile); + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String fddFileUrl = fadadaUtuil.getUploadUrl(pdfFile); +// 调用文件处理接口,处理文件 + String fileId = fadadaUtuil.fileProcess(fddFileUrl, fileName+".pdf"); +// 创建并发起推送任务 + Map map = new HashMap(); + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); + int size = formDataSubBeans.size(); + map.put("subNum", formDataSubBeans.size()+""); +// 标题 + String con = "发货签收单"; + map.put("subject", con); +// 自定义文档表示 + map.put("docId", "docId1"); +// 上传附件名称 + map.put("docName", fileName+".pdf"); +// 调用接口返回的fileId + map.put("docFileId", fileId); +// 签署人信息表单获取 + String name = CAP4FormKit.getFieldStrValue(master, "客户联系人姓名"); + map.put("name", name); + String userNo = CAP4FormKit.getFieldStrValue(master, "联系人身份证号"); + if(userNo == null || "".equals(userNo)) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("身份证号不能为空"); + CAP4FormKit.setCellValue(master, "返回结果", "身份证号不能为空!!!"); + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } + map.put("userNo", userNo); + String mobile = CAP4FormKit.getFieldStrValue(master, "客户联系人手机号码"); + map.put("mobile", mobile); + String create = fadadaUtuil.create(map, size, height); + String signUrl = fadadaUtuil.getSignUrl(create); + if("".equals(create)) { + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("任务创建失败!!!"); + CAP4FormKit.setCellValue(master, "ID", "任务创建失败!!!"); + CAP4FormKit.setCellValue(master, "返回结果", "任务创建失败!!!"); + }else { + log.info("任务创建成功返回任务ID"+create); + String path = getQRCode(signUrl); + log.info("二维码下载后保存路径"+path); + String qrc = fileUpload(path, summaryId); + log.info("二维码上传后的文件ID"+qrc); + response.setReturnCode(4); + response.setReturnMsg("请等待对方签署"); + log.info("保存二维码"+qrc+"token:"+token+"任务id:"+create); + CAP4FormKit.setCellValue(master, "二维码", qrc); + CAP4FormKit.setCellValue(master, "token", token); + CAP4FormKit.setCellValue(master, "ID", create); + CAP4FormKit.setCellValue(master, "返回结果", "任务创建成功,请等待对方签署!!!"); + //推送给业务员 + String sellerstr = CAP4FormKit.getFieldStrValue(master, "专属业务员"); + V3xOrgMember member = getOrgManager().getMemberById(Long.parseLong(sellerstr)); + //获取登录名 + String code = member.getV3xOrgPrincipal().getLoginName(); + Long memberId = member.getId(); + String sellName = member.getName(); + Long dept = member.getOrgDepartmentId(); + Long post = member.getOrgPostId(); + log.info("获取专属业务员信息"+code+memberId+sellName+":"+post); + AddMember = new Member(name, String.valueOf(dept), String.valueOf(post)); + //设置主题名getFlowFactory称 + StringBuffer subject = new StringBuffer(); + subject.append(sellName).append("-").append(code).append("-电子签收单"); + //发起流程 + long affairId = getFlowFactory().sendCollaboration(code, "erweimatuisong", subject.toString(), + setFormExport(AddMember, htmlDate, memberId, create), null, null, null); + log.info("发起二维码流程ID"+affairId); + //上传二维码附件 + String qrc2 = fileUpload(path, Long.toString(affairId)); + //将附件保存至对应数据中 + String id = iFadadaDao.getIdByObjectId(affairId); + int i = iFadadaDao.addFile(id, qrc2); + log.info("上传二维码到二维码流程"+i); + //将summaryId和affairId保存到发货单中 + CAP4FormKit.setCellValue(master, "summaryId1", summaryId); + CAP4FormKit.setCellValue(master, "summaryId2", affairId); + } + } catch (Exception e) { + log.error("异常:"+ e); + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("异常:"+ e); + CAP4FormKit.setCellValue(master, "返回结果", "处理异常:"+ e); + // TODO Auto-generated catch block + e.printStackTrace(); + } + formDataApi4Cap4.insertOrUpdateMasterData(master, false); + return response; + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + + private Map getContractParameter(FormDataMasterBean master) throws ParseException, BusinessException{ + Map map = new HashMap<>(); + + List> list = new ArrayList>(); +// SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd"); +// 设置从表信息 + List formDataSubBeans = CAP4FormKit.getSubBeans(master,"发货明细"); + for (FormDataSubBean formDataSubBean : formDataSubBeans) { + Map< String, Object> maps = new HashMap<>(); + maps.put("num", CAP4FormKit.getSubFieldValue(formDataSubBean, "序号")); + maps.put("categoryName",CAP4FormKit.getSubFieldValue(formDataSubBean, "品种名称")); + Object stockCode = CAP4FormKit.getSubFieldValue(formDataSubBean, "U8存货编码"); + if (stockCode == null) { + maps.put("stockCode", ""); + } else { + maps.put("stockCode", stockCode); + } + Object specification = CAP4FormKit.getSubFieldValue(formDataSubBean, "规格"); + if (specification == null) { + maps.put("specification", ""); + } else { + maps.put("specification", specification); + } + Object units = CAP4FormKit.getSubFieldValue(formDataSubBean, "计量单位"); + if (units == null) { + maps.put("units", ""); + } else { + maps.put("units", units); + } + Object quantityShipped = CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货数量"); + if (quantityShipped == null) { + maps.put("quantityShipped", ""); + } else { + maps.put("quantityShipped", quantityShipped); + } + Object subFieldValue = CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货数量-袋"); + if (subFieldValue == null) { + maps.put("quantityShipped2", ""); + } else { + maps.put("quantityShipped2", subFieldValue); + } + final Object unitPrice = CAP4FormKit.getSubFieldValue(formDataSubBean, "提货单价"); + if (unitPrice == null) { + maps.put("unitPrice", ""); + } else { + maps.put("unitPrice", unitPrice); + } + maps.put("shipmentsMoney", CAP4FormKit.getSubFieldValue(formDataSubBean, "本次发货金额")); + Object fieldValue = CAP4FormKit.getSubFieldValue(formDataSubBean, "实际到货数量"); + if (fieldValue == null) { + maps.put("number", ""); + } else { + maps.put("number", fieldValue); + } + Object beizhu = CAP4FormKit.getSubFieldValue(formDataSubBean, "备注"); + if (beizhu == null || "".equals(beizhu)){ + maps.put("remark", ""); + } else { + maps.put("remark", beizhu); + } + list.add(maps); + } +// 设置主表信息 + map.put("receiptNumber", CAP4FormKit.getFieldStrValue(master, "单据编号")); + map.put("title", CAP4FormKit.getFieldStrValue(master, "合同签订单位标题名称")); + String deptId = CAP4FormKit.getFieldStrValue(master, "发起部门"); + map.put("deptId", deptId); + V3xOrgDepartment departmentById = getOrgManager().getDepartmentById(Long.parseLong(deptId)); + map.put("department", departmentById.getName()); + String memberId = CAP4FormKit.getFieldStrValue(master, "发起人员"); + map.put("memberId", memberId); + V3xOrgMember memberById = getOrgManager().getMemberById(Long.parseLong(memberId)); + map.put("person", memberById.getName()); + map.put("startDate", CAP4FormKit.getFieldStrValue(master, "发起日期")); + //发货通知单和发货单日期处理 + String date1 = CAP4FormKit.getFieldStrValue(master, "发起日期"); + // 定义日期字符串的格式 + DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日"); + LocalDate date = LocalDate.parse(date1, inputFormatter); + String formattedDate1 = date.format(outputFormatter); + // 将String类型的日期转换成LocalDate类型 + LocalDate date2 = LocalDate.parse(date1, inputFormatter); + // 使用LocalDate类将日期增加一天 + LocalDate nextDay = date.plusDays(1); + // 将计算后的LocalDate类型日期再转换成String类型 + String nextDayString = nextDay.format(inputFormatter); + LocalDate date3 = LocalDate.parse(nextDayString, inputFormatter); + String formattedDate2 = date3.format(outputFormatter); + map.put("formattedDate1", formattedDate1); + map.put("formattedDate2", formattedDate2); + map.put("contractName", CAP4FormKit.getFieldStrValue(master, "选择合同")); + map.put("contractNumber", CAP4FormKit.getFieldStrValue(master, "合同编号")); + String sellerstr = CAP4FormKit.getFieldStrValue(master, "专属业务员"); + map.put("sellerstr1",sellerstr); + if("".equals(sellerstr)) { + map.put("seller", ""); + }else { + long userid = Long.parseLong(sellerstr); + V3xOrgMember member = getOrgManager().getMemberById(userid); + map.put("seller", member.getName()); + } + map.put("clientName", CAP4FormKit.getFieldStrValue(master, "客户名称")); + map.put("consigneeName", CAP4FormKit.getFieldStrValue(master, "客户联系人姓名")); + map.put("consigneeAddress", CAP4FormKit.getFieldStrValue(master, "收货地址")); + map.put("consigneePhone", CAP4FormKit.getFieldStrValue(master, "客户联系人手机号码")); + map.put("consigneeCard", CAP4FormKit.getFieldStrValue(master, "联系人身份证号")); + map.put("shipmentsExplain", CAP4FormKit.getFieldStrValue(master, "发货说明")); + map.put("isNumber", CAP4FormKit.getFieldStrValue(master, "是否与客户沟通并确认数量")); + map.put("fileUpload", CAP4FormKit.getFieldStrValue(master, "附件上传")); + map.put("logisticsFile", CAP4FormKit.getFieldStrValue(master, "物流单据附件")); + map.put("renwuId", CAP4FormKit.getFieldStrValue(master, "ID")); + String shipmentsWarehousestr = CAP4FormKit.getFieldStrValue(master, "发货仓库"); + map.put("shipmentsWarehousestr", shipmentsWarehousestr); + if("".equals(shipmentsWarehousestr)) { + map.put("shipmentsWarehouse", ""); + }else { + String shipmentsWarehouseLabel = enumManagerNew.getEnumItem(Long.parseLong(shipmentsWarehousestr)).getLabel(); + map.put("shipmentsWarehouse", shipmentsWarehouseLabel); + } + map.put("balance", CAP4FormKit.getFieldStrValue(master, "可用余额")); + map.put("shipmentsLaterBalance", CAP4FormKit.getFieldStrValue(master, "本次发货后可用余额")); + String shipmentsTypestr = CAP4FormKit.getFieldStrValue(master, "发货类型"); + map.put("shipmentsTypestr", shipmentsTypestr); + if("".equals(shipmentsTypestr)) { + map.put("shipmentsType", ""); + }else { + String shipmentsTypeLabel = enumManagerNew.getEnumItem(Long.parseLong(shipmentsTypestr)).getLabel(); + map.put("shipmentsType", shipmentsTypeLabel); + } + map.put("quantityTotal", CAP4FormKit.getFieldStrValue(master, "本次发货数量合计")); + map.put("quantityDaiTotal", CAP4FormKit.getFieldStrValue(master, "本次发货数量袋合计")); + map.put("moneyTotal", CAP4FormKit.getFieldStrValue(master, "本次发货金额合计")); + map.put("logisticsExplain", CAP4FormKit.getFieldStrValue(master, "物流信息说明")); + String yijian = CAP4FormKit.getFieldStrValue(master, "审批意见"); + String output = yijian.replaceAll("\\[([^@]+) @signet@([^_]+)_[^ ]+@signet@ ([0-9-]+ [0-9:]+)]", "[$1 $2 $3]"); + String opinions = output.replaceAll("\\[", "[").replaceAll("\\]", "]
    "); + map.put("opinions", opinions); + map.put("shipmentsDetails", list); + //发货单信息 + String shipmentsNo = CAP4FormKit.getFieldStrValue(master, "U8发货单号"); + map.put("shipmentsNo", shipmentsNo); + //发货单信息 + try { + List> u8SendData = fahuodanDao.getU8SendData(shipmentsNo); + + if (u8SendData.size() > 0) { + Map sendData = u8SendData.get(0); + System.out.println("发货单数据" + sendData); + Object ddate = sendData.get("ddate"); +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); +// String formatDate = format.format(); + map.put("shipmentsDate", ddate);//发货时间 + //销售部门 + Object cdepname = sendData.get("cdepname"); + if (cdepname == null || "".equals(cdepname)){ + map.put("shipmentsDept", ""); + } else { + map.put("shipmentsDept", cdepname); + } + //业务类型 + Object cbustype = sendData.get("cbustype"); + if (cbustype == null || "".equals(cbustype)){ + map.put("businessType", ""); + } else { + map.put("businessType", cbustype); + } + //销售类型 + Object cstname = sendData.get("cstname"); + if (cstname == null || "".equals(cstname)){ + map.put("salesType", ""); + } else { + map.put("salesType", cstname); + } + //客户简称 + Object ccusabbname = sendData.get("ccusabbname"); + if (ccusabbname == null || "".equals(ccusabbname)){ + map.put("masterName", ""); + } else { + map.put("masterName", ccusabbname); + } + //客户级别名称 + Object cdefine1 = sendData.get("cdefine1"); + if (cdefine1 == null || "".equals(cdefine1)){ + map.put("masterLev", ""); + } else { + map.put("masterLev", cdefine1); + } + //客户编码请求成功 + Object ccuscode = sendData.get("ccuscode"); + if (ccuscode == null || "".equals(ccuscode)){ + map.put("masterCode", ""); + } else { + map.put("masterCode", ccuscode); + } + //税率 + Object itaxrate = sendData.get("itaxrate"); + if (itaxrate == null || "".equals(itaxrate)){ + map.put("taxrate", ""); + } else { + map.put("taxrate", itaxrate); + } + //制单人 + Object createname = sendData.get("createname"); + if (createname == null || "".equals(createname)){ + map.put("creator", ""); + } else { + map.put("creator", createname); + } + List> datas = new ArrayList>(); + //明细表 + List> u8SendDataTables = fahuodanDao.getU8SendDataTables(sendData.get("summaryid").toString()); + System.out.println("发货单明细信息:"+u8SendData); + double sum = 0; + for (Map u8SendDataTable : u8SendDataTables) { + Map< String, Object> maps = new HashMap<>(); + //仓库名称 + Object cwhname = u8SendDataTable.get("cwhname"); + if (cwhname == null || "".equals(cwhname)){ + maps.put("cwhName", ""); + } else { + maps.put("cwhName", cwhname); + } + //存货编码 + Object cinvcode = u8SendDataTable.get("cinvcode"); + if (cinvcode == null || "".equals(cinvcode)){ + maps.put("cinvCode", ""); + } else { + maps.put("cinvCode", cinvcode); + } + //存货名称 + Object cinvname = u8SendDataTable.get("cinvname"); + if (cinvname == null || "".equals(cinvname)){ + maps.put("cinvName", ""); + } else { + maps.put("cinvName", cinvname); + } + //规格型号 + Object cinvstd = u8SendDataTable.get("cinvstd"); + if (cinvstd == null || "".equals(cinvstd)){ + maps.put("cinvstd", ""); + } else { + maps.put("cinvstd", cinvstd); + } + //主计量 + Object cinvm_unit = u8SendDataTable.get("cinvm_unit"); + if (cinvm_unit == null || "".equals(cinvm_unit)){ + maps.put("cinvmUnit", ""); + } else { + maps.put("cinvmUnit", cinvm_unit); + } + //数量 + Object iqaquantity = u8SendDataTable.get("iquantity"); + if (iqaquantity == null || "".equals(iqaquantity)){ + maps.put("cinvNumber", ""); + } else { + String originalString = iqaquantity.toString(); + double originalValue = Double.parseDouble(originalString); + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + String formattedString = decimalFormat.format(originalValue); + maps.put("cinvNumber", formattedString); + } + Object inum = u8SendDataTable.get("inum"); + double doubleValue = Double.parseDouble(inum.toString()); + //int intValue = (int) doubleValue; + maps.put("inum", doubleValue);//件数 + sum += doubleValue; + datas.add(maps); + } + map.put("sum", sum);//总件数 + map.put("dispathDetails", datas); + } + } catch (SQLException throwables) { + throwables.printStackTrace(); + } + //销售部门 CDEPNAME 发货时间 DDATE 业务类型CBUSTYPE 销售类型CSTNAME 客户简称CCUSABBNAME + //客户级别名称CDEFINE1 客户编码 CCUSCODE 税率ITAXRATE + //仓库名称CWHNAME 存货编码CINVCODE 存货名称CINVNAME 规格型号CINVSTD 主计量CINVM_UNIT 数量IQAQUANTITY + //可用量 件数INUM + return map; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + log.info("二维码已成功生成并保存到:" + filePath); + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + log.info("文件"+map); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + System.out.println(str); + return l+""; + } + + /** + * 设置FormExport对象,设置表单中的数据 + * @param member 根据流程添加的人员数据 + * @return + */ + public FormExport setFormExport(Member member, Map map, Long memberId, String create){ + FormExport formExport; + formExport = new FormExport(); + formExport.setValues(setValueExports(member, map, memberId, create)); + log.info("formExport:"+formExport); + return formExport; + } + /** + * 设置ValueExport对象,设置每个控件中的数据。 + * @param member 根据流程添加的人员数据 + * @return + */ + public List setValueExports(Member member, Map map, Long memberId, String create) { + List values = new ArrayList(); + ValueExport ve = new ValueExport(); + ve = new ValueExport(); + ve.setDisplayName("发起部门"); + ve.setValue(member.getDeptId()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("发起人员"); + ve.setValue(memberId.toString()); + values.add(ve); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + String data = format.format(new Date()); + ve = new ValueExport(); + ve.setDisplayName("发起日期"); + ve.setValue(data); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("客户名称"); + ve.setValue(map.get("clientName").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("专属业务员"); + ve.setValue(map.get("sellerstr1").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("签署任务ID"); + ve.setValue(create); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("客户联系人姓名"); + ve.setValue(map.get("consigneeName").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("客户联系人手机号"); + ve.setValue(map.get("consigneePhone").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("联系人身份证号码"); + ve.setValue(map.get("consigneeCard").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("数量合计"); + ve.setValue(map.get("quantityTotal").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("金额合计"); + ve.setValue(map.get("moneyTotal").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("合同名称"); + ve.setValue(map.get("contractName").toString()); + values.add(ve); + ve = new ValueExport(); + ve.setDisplayName("合同编号"); + ve.setValue(map.get("contractNumber").toString()); + values.add(ve); + return values; + } + + /** + * 判断有多少“同意” + * + * @return + */ + public int countApprovals(String input) { + Pattern pattern = Pattern.compile("【同意】"); + Matcher matcher = pattern.matcher(input); + int count = 0; + while (matcher.find()) { + count++; + } + return count; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/MianQianNode.java b/src/com/seeyon/apps/fadadaSys/node/MianQianNode.java new file mode 100644 index 0000000..8d2f790 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/MianQianNode.java @@ -0,0 +1,191 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums.RunAction; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; + +public class MianQianNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaDataReturnNode.class); + @Override + public String getNodeId() { + return "mianQianNode"; + } + + @Override + public String getNodeName() { + return "法大大免验证签署超级节点"; + } + + @Override + public int getOrder() { + return 0; + } + + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() {if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + protected FormDataApi4Cap4 formDataApi4Cap4; + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) + throws BusinessException { + System.out.println("MianQianNode"); + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + //进入超级审核节点 + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + FormDataMasterBean formDataBean = (FormDataMasterBean) data.get("formDataBean"); + Object id = data.get("openUserId"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String userAuthUrl = fadadaUtuil.getFreeSign(id.toString()); + String qrCode = getQRCode(userAuthUrl); + String upload = fileUpload(qrCode, summaryId); + formDataBean.addFieldValue("field0005", upload); + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(RunAction.FORWARD.getKey()); + response.setSuccess(false); + response.setReturnMsg("获取成功!" ); + return response; + } catch (Exception e) { + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("获取失败!" ); + return response; + } + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + log.info("二维码已成功生成并保存到:" + filePath); + //getAttachmentManager().create() + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/ShiMingNode.java b/src/com/seeyon/apps/fadadaSys/node/ShiMingNode.java new file mode 100644 index 0000000..5ef0434 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/ShiMingNode.java @@ -0,0 +1,258 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.v5_1.res.user.UserRes; +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.ctpenumnew.manager.EnumManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.text.SimpleDateFormat; +import java.util.*; + +public class ShiMingNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaDataReturnNode.class); + + @Override + public String getNodeId() { + return "shiMingNode"; + } + + @Override + public String getNodeName() { + return "法大大实名认证超级节点"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private IFadadaDao fadadaDao; + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() { if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager)AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + protected FormDataApi4Cap4 formDataApi4Cap4; + private EnumManager enumManagerNew; + public void setEnumManagerNew(EnumManager enumManagerNew) { + this.enumManagerNew = enumManagerNew; + } + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) + throws BusinessException { + //进入超级审核节点 + System.out.println("开始处理单据ShiMingNode"); + String summaryId = params.get("WF_SUPER_NODE_SUMMARY_ID").toString(); + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + FormDataMasterBean formDataBean = (FormDataMasterBean) data.get("formDataBean"); + Object id = data.get("ID"); + Object userName = data.get("field0001"); + //二维码生成时间 + Date date = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String formattedDate = formatter.format(date); + //保存summaryId + int i = fadadaDao.saveSummaryId(id.toString(), summaryId); + List> person = fadadaDao.findPersonById(id.toString()); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + if (person.size() > 0) { + Map map = person.get(0); + Object state = map.get("field0007"); + Object erCode = map.get("field0004"); + String stateLabel = enumManagerNew.getEnumItem(Long.parseLong(state.toString())).getLabel(); + if ((erCode == null || "".equals(erCode)) && "未认证".equals(stateLabel)) { + String userAuthUrl = fadadaUtuil.getUserAuthUrl(id.toString(), userName.toString()); + // 创建URL对象 + URL url = new URL(userAuthUrl); + //打开链接 + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + //关闭链接 + connection.disconnect(); + String qrCode = getQRCode(userAuthUrl); + String upload = fileUpload(qrCode, summaryId); + formDataBean.addFieldValue("field0004", upload); + formDataBean.addFieldValue("field0014", token); + formDataBean.addFieldValue("field0025", formattedDate); + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(0); + response.setReturnMsg("请等待对方实名认证!"); + return response; + } + if ("未认证".equals(stateLabel)) { + formDataBean.addFieldValue("field0014", token); + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(0); + response.setReturnMsg("请等待对方实名认证!"); + return response; + } + } + BaseRes peopleSgin = fadadaUtuil.getSgin(id.toString()); + if ( peopleSgin != null) { + UserRes peopleSginData = peopleSgin.getData(); + String identStatus = peopleSginData.getIdentStatus(); + if ("identified".equals(identStatus)) { + response.setReturnCode(SuperNodeEnums.RunAction.FORWARD.getKey()); + response.setSuccess(false); + response.setReturnMsg("该用户已认证,直接通过!"); + return response; + } + } + String userAuthUrl = fadadaUtuil.getUserAuthUrl(id.toString(), userName.toString()); + String qrCode = getQRCode(userAuthUrl); + String upload = fileUpload(qrCode, summaryId); + formDataBean.addFieldValue("field0004", upload); + formDataBean.addFieldValue("field0014", token); + formDataBean.addFieldValue("field0025", formattedDate); + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(0); + response.setReturnMsg("请等待对方实名认证!"); + return response; + } catch (Exception e) { + //formDataBean.addFieldValue("field0004", userAuthUrl); + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(SuperNodeEnums.RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("获取失败!" ); + return response; + } + } + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + System.out.println("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + log.info("二维码已成功生成并保存到:" + filePath); + //getAttachmentManager().create() + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/node/TextNode.java b/src/com/seeyon/apps/fadadaSys/node/TextNode.java new file mode 100644 index 0000000..58f4d27 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/TextNode.java @@ -0,0 +1,152 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.bean.common.UserIdentInfo; +import com.fasc.open.api.v5_1.res.user.UserIdentityInfoRes; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import www.seeyon.com.utils.UUIDUtil; + + +import java.io.File; + +import java.text.SimpleDateFormat; +import java.util.*; + +public class TextNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaDataReturnNode.class); + + @Override + public String getNodeId() { + return "textNode"; + } + + @Override + public String getNodeName() { + return "通过节点"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() { if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager) AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { this.attachmentManager = attachmentManager; } + protected FormDataApi4Cap4 formDataApi4Cap4; + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) throws BusinessException { + System.out.println("开始处理单据TextNode"); + //进入超级审核节点 + //将生成的HTML文件转换成pdf文件 + Map data = getFormData(params); + FormDataMasterBean formDataBean = (FormDataMasterBean) data.get("formDataBean"); + Object id = data.get("field0005"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + final BaseRes peopleSgin = fadadaUtuil.getPeopleSgin(id.toString()); + UserIdentityInfoRes data2 = peopleSgin.getData(); + UserIdentInfo userIdentInfo = data2.getUserIdentInfo(); + //姓名 + String userName = userIdentInfo.getUserName(); + //身份证号 + String identNo = userIdentInfo.getIdentNo(); + log.info("人员信息:" + peopleSgin); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + + } + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/UnbindUserNode.java b/src/com/seeyon/apps/fadadaSys/node/UnbindUserNode.java new file mode 100644 index 0000000..a4f2d1c --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/UnbindUserNode.java @@ -0,0 +1,73 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.exception.ApiException; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.util.Map; + +public class UnbindUserNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(UnbindUserNode.class); + + @Override + public String getNodeId() { + return "UnbindUserNode"; + } + + @Override + public String getNodeName() { + return "解除人员认证超级节点"; + } + + @Override + public int getOrder() { + return 0; + } + + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) + throws BusinessException { + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + Object id = data.get("openUserId"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + BaseRes voidBaseRes = fadadaUtuil.unbindUser(id.toString()); + } catch (Exception e) { + e.printStackTrace(); + } + return response; + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } +} diff --git a/src/com/seeyon/apps/fadadaSys/node/UpdateShiMingErcodeNode.java b/src/com/seeyon/apps/fadadaSys/node/UpdateShiMingErcodeNode.java new file mode 100644 index 0000000..26b5d0f --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/node/UpdateShiMingErcodeNode.java @@ -0,0 +1,200 @@ +package com.seeyon.apps.fadadaSys.node; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.cap4.form.api.FormDataApi4Cap4; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.ctp.workflow.supernode.BaseSuperNodeAction; +import com.seeyon.ctp.workflow.supernode.SuperNodeResponse; +import com.seeyon.ctp.workflow.supernode.enums.SuperNodeEnums; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; + +public class UpdateShiMingErcodeNode extends BaseSuperNodeAction { + private static final Log log = LogFactory.getLog(FadadaDataReturnNode.class); + + @Override + public String getNodeId() { + return "updateShiMingErcodeNode"; + } + + @Override + public String getNodeName() { + return "实名二维码更新"; + } + + @Override + public int getOrder() { + return 0; + } + + @Autowired + private IFadadaDao fadadaDao; + private AttachmentManager attachmentManager; + public AttachmentManager getAttachmentManager() { if(this.attachmentManager==null) { this.attachmentManager = ((AttachmentManager) AppContext.getBean("attachmentManager")); }return attachmentManager; } + public void setAttachmentManager(AttachmentManager attachmentManager) { this.attachmentManager = attachmentManager; } + protected FormDataApi4Cap4 formDataApi4Cap4; + public void setFormDataApi4Cap4(FormDataApi4Cap4 formDataApi4Cap4) { + this.formDataApi4Cap4 = formDataApi4Cap4; + } + @Override + public void cancelAction(String token, String activityId, Map params) throws BusinessException { + } + /** + * 节点动作撤销。 + */ + public void cancelAction(String token, String activityId) { + System.out.println("撤销"); + } + + @Override + public SuperNodeResponse confirmAction(String token, String activityId, Map params) + throws BusinessException { + return executeAction(token, activityId, params); + } + + @Override + public SuperNodeResponse executeAction(String token, String activityId, Map params) throws BusinessException { + System.out.println("开始处理单据UpdateShiMingErcodeNode"); + //进入超级审核节点 + SuperNodeResponse response = new SuperNodeResponse(); + Map data = getFormData(params); + FormDataMasterBean formDataBean = (FormDataMasterBean) data.get("formDataBean"); + Object clientUserId = data.get("clientUserId"); + Object summaryId = data.get("summaryId"); + Object updateId = data.get("新单据编号"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String userAuthUrl = fadadaUtuil.getUserAuthUrl(updateId.toString(), "ces"); + log.info("个人授权链接:" + userAuthUrl); + String qrCode = getQRCode(userAuthUrl); + log.info("获取二维码:" + qrCode); + //上传二维码附件 + String upload = fileUpload(qrCode, summaryId.toString()); + log.info("上传二维码:" + upload); + List> personById = fadadaDao.findPersonById(clientUserId.toString()); + Object id = personById.get(0).get("id"); + //修改二维码和ID + fadadaDao.updateShiMingErcode(Long.parseLong(id.toString()), upload, updateId.toString()); + response.setReturnCode(SuperNodeEnums.RunAction.FORWARD.getKey()); + response.setSuccess(false); + response.setReturnMsg("修改成功!" ); + return response; + } catch (Exception e) { + formDataApi4Cap4.insertOrUpdateMasterData(formDataBean, false); + response.setReturnCode(SuperNodeEnums.RunAction.BACK.getKey()); + response.setSuccess(false); + response.setReturnMsg("修改失败!" ); + return response; + } + + } + + /** + * 获取表单数据 + * @param params + * @return + */ + @SuppressWarnings("unchecked") + private Map getFormData(Map params) { + return (Map) params.get("CTP_FORM_DATA"); + } + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + log.info("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + return l+""; + } + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + log.info("二维码已成功生成并保存到:" + filePath); + //getAttachmentManager().create() + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/server/ErCodeStateService.java b/src/com/seeyon/apps/fadadaSys/server/ErCodeStateService.java new file mode 100644 index 0000000..7473849 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/server/ErCodeStateService.java @@ -0,0 +1,40 @@ +package com.seeyon.apps.fadadaSys.server; + +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +public class ErCodeStateService { + + @Autowired + private IFadadaDao iFadadaDao; + + public void updateErcodeState() { + // -5664519669788685422 + List> mapList = iFadadaDao.findErcodeState("-5664519669788685422"); + for (int i = 0; i < mapList.size(); i++) { + Map map = mapList.get(i); + //签署时间 + Object qsTime = map.get("field0025"); + if (qsTime == null || "".equals(qsTime)) { + continue; + } + Date createTime = (Date) qsTime; + //id + Object id = map.get("id"); + long startTime = createTime.getTime(); + Date date = new Date(); + long endTime = date.getTime(); + long timeDiff = endTime - startTime; + long lsTime = timeDiff /(1000*60); + if (lsTime > 9360) { + //过期 + int state = iFadadaDao.updateErcodeState(Long.parseLong(id.toString()), "过期"); + } + } + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/server/FadadaReturnServer.java b/src/com/seeyon/apps/fadadaSys/server/FadadaReturnServer.java new file mode 100644 index 0000000..bb83e83 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/server/FadadaReturnServer.java @@ -0,0 +1,130 @@ +package com.seeyon.apps.fadadaSys.server; + +import com.alibaba.fastjson.JSONObject; +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.bean.common.UserIdentInfo; +import com.fasc.open.api.bean.common.UserInfoExtend; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.v5_1.res.user.UserIdentityInfoRes; +import com.seeyon.apps.fadadaSys.dao.IFadadaDao; +import com.seeyon.apps.fadadaSys.kit.PropKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.apps.fadadaSys.util.ProtUtil; +import com.seeyon.ctp.common.AppContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +public class FadadaReturnServer { + private final static Log log = LogFactory.getLog(FadadaReturnServer.class); + + private IFadadaDao fadadaDao ; + public void setFadadaDao(IFadadaDao fadadaDao) { + this.fadadaDao = fadadaDao; + } + public IFadadaDao getFadadaDao() { if(this.fadadaDao == null) { this.fadadaDao = (IFadadaDao) AppContext.getBean("fadadaDao"); }return fadadaDao; } + + /** + * 继续流程 + * @param signTaskId + * @return + */ + public String returnFadadaNode(String signTaskId){ + //根据任务ID查询相关对应流程数据,并获取到流程token信息。 + ProtUtil protUtil = new ProtUtil(); + log.info("进入流程状态回传处理方法中"); + List> faHuoDanBySignId = getFadadaDao().findFaHuoDanBySignId(signTaskId); + String nodeToken = ""; + if (faHuoDanBySignId.size() > 0) { + nodeToken = getFadadaDao().getNodeToken(signTaskId); + }else{ + nodeToken = getFadadaDao().getDiaoRuNodeToken(signTaskId); + } + log.info("获取超级节点token"+nodeToken); + try { + JSONObject params = new JSONObject(); + params.put("message", "签署完成!!!"); + params.put("returnCode", 1); + log.info("设置签署参数"+params.toString()); + String rem = protUtil.sendPostNotification(params.toString(), PropKit.getProp(PropKit.NOTIFICATION), nodeToken); + log.info(rem); + Date date = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String formattedDate = formatter.format(date); + SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd"); + String formattedDate2 = formatter2.format(date); + //修改签署状态 + if (faHuoDanBySignId.size() > 0) { + int i = getFadadaDao().updateSignState(signTaskId, -4445469171536474538L, formattedDate, formattedDate2, 921821068839110293L); + int j = getFadadaDao().updateSellerstrSignState(signTaskId, -4445469171536474538L); + } else { + List> tuiHuoDanBySignId = getFadadaDao().findTuiHuoDanBySignId(signTaskId); + if (tuiHuoDanBySignId.size() > 0) { + int i = getFadadaDao().updateSignDiaoRuState(signTaskId, -4445469171536474538L, formattedDate, formattedDate2, 921821068839110293L); + int j = getFadadaDao().updateSellerstrSignDiaoRuState(signTaskId, -4445469171536474538L); + } + } + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return ""; + } + + /** + * 实名状态 + * @param map + * @return + */ + public String returnShiMingState(Map map) throws IOException, ApiException { + if ("success".equals(map.get("authResult"))) { + ProtUtil protUtil = new ProtUtil(); + String clientUserId = map.get("clientUserId").toString(); + //修改实名状态 + int i = getFadadaDao().updateShiMingState(clientUserId, -1378197418603428423L); + //回传认证人信息 + Object openUserId = map.get("openUserId"); + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + //获取认证人员信息 + BaseRes peopleSgin = fadadaUtuil.getPeopleSgin(openUserId.toString()); + UserIdentityInfoRes data = peopleSgin.getData(); + UserIdentInfo userIdentInfo = data.getUserIdentInfo(); + //姓名 + String userName = userIdentInfo.getUserName(); + //身份证号 + String identNo = userIdentInfo.getIdentNo(); + UserInfoExtend userIdentInfoExtend = data.getUserIdentInfoExtend(); + //手机号 + String mobile = userIdentInfoExtend.getMobile(); + log.info("认证人员信息" + peopleSgin); + //回传信息 + int j = getFadadaDao().updateShiMingMsg(clientUserId, userName, identNo, mobile); + String nodeToken = getFadadaDao().getShiMingNodeToken(clientUserId); + log.info("获取超级节点token"+nodeToken); + + JSONObject params = new JSONObject(); + params.put("message", "认证完成!!!"); + params.put("returnCode", 1); + log.info("设置签署参数"+params.toString()); + String rem = protUtil.sendPostNotification(params.toString(), PropKit.getProp(PropKit.NOTIFICATION), nodeToken); + log.info(rem); + if("1".equals(rem)) { + log.info("验证通过进行后续审批"); + }else { + log.info("验证不通过,请联系管理员处理"); + } + } + return ""; + } + + public int updateSignState(String signTaskId) { + + return 0; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/server/FadadaSignUrl.java b/src/com/seeyon/apps/fadadaSys/server/FadadaSignUrl.java new file mode 100644 index 0000000..846cb80 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/server/FadadaSignUrl.java @@ -0,0 +1,41 @@ +package com.seeyon.apps.fadadaSys.server; + +import com.fasc.open.api.utils.crypt.FddCryptUtil; +import com.seeyon.apps.fadadaSys.kit.PropKit; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; +import com.seeyon.ctp.util.UUIDGenerator; + +import java.util.HashMap; +import java.util.Map; + +public class FadadaSignUrl { + public String getSign() throws Exception { + //法大大分配的appId + String appId = PropKit.getProp(PropKit.APPID); + //法大大分配的appId对应的秘钥 + String appSecret = PropKit.getProp(PropKit.APPSECRET); + // 随机数 + String nonce = UUIDGenerator.getUUID(); + // Unix标准时间戳 + String timestamp = Long.toString(System.currentTimeMillis()); + // 平台服务访问凭证,事先由调用获取服务访问凭证接口获取并存放在缓存中 + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + String accessToken = "xxxxxxx"; + // bizContent参数中的json字符串,不包括空的字段 + String bizContent = "json字符串"; + // 参与签名计算的Key-Value列表 + Map paramMap = new HashMap<>(); + paramMap.put("X-FASC-App-Id", appId); + paramMap.put("X-FASC-Sign-Type", "HMAC-SHA256"); + paramMap.put("X-FASC-Timestamp", timestamp); + paramMap.put("X-FASC-Nonce", nonce); + paramMap.put("X-FASC-AccessToken", accessToken); + paramMap.put("X-FASC-Api-SubVersion", "5.1"); + paramMap.put("bizContent", bizContent); + // 排序后的参数字符串,FddCryptUtil为法大大提供得签名工具类 + String paramToSignStr = FddCryptUtil.sortParameters(paramMap); + // 计算之后得到签名字符串,该签名字符串需放到请求头中的X-FASC-Sign字段 + String signature = FddCryptUtil.sign(paramToSignStr, timestamp, appSecret); + return signature; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/servlet/ConfirmSignServlet.java b/src/com/seeyon/apps/fadadaSys/servlet/ConfirmSignServlet.java new file mode 100644 index 0000000..0550327 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/servlet/ConfirmSignServlet.java @@ -0,0 +1,50 @@ +package com.seeyon.apps.fadadaSys.servlet; + +import com.alibaba.fastjson.JSONObject; +import com.seeyon.apps.fadadaSys.util.FadadaUtuil; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; + +public class ConfirmSignServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { + response.setHeader("Access-Control-Allow-Origin", "*"); + String signTaskId = request.getParameter("signTaskId"); + try { + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + boolean b = fadadaUtuil.signTaskUnblock(signTaskId); + JSONObject date = new JSONObject(); + if (b) { + date.put("code", 0); + } else { + date.put("code", 1); + } + // 设置返回信息 + response.setContentType("application/json"); + response.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + out.print(date.toString()); + out.flush(); + } catch (Exception e) { + JSONObject date = new JSONObject(); + response.setContentType("application/json"); + date.put("code", 1); + response.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + out.print(date.toString()); + out.flush(); + } + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // 在这里处理 POST 请求 + doGet(request, response); + } +} diff --git a/src/com/seeyon/apps/fadadaSys/servlet/FadadaReturnServlet.java b/src/com/seeyon/apps/fadadaSys/servlet/FadadaReturnServlet.java new file mode 100644 index 0000000..192a19d --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/servlet/FadadaReturnServlet.java @@ -0,0 +1,112 @@ +package com.seeyon.apps.fadadaSys.servlet; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.fasc.open.api.utils.crypt.FddCryptUtil; +import com.seeyon.apps.fadadaSys.kit.PropKit; +import com.seeyon.apps.fadadaSys.server.FadadaReturnServer; +import com.seeyon.ctp.common.AppContext; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class FadadaReturnServlet extends HttpServlet{ + private final static Log log = LogFactory.getLog(FadadaReturnServlet.class); + private FadadaReturnServer fadadaReturnServer ; + public void setFadadaReturnServer(FadadaReturnServer fadadaReturnServer) { this.fadadaReturnServer = fadadaReturnServer; } + public FadadaReturnServer getFadadaReturnServer() { if(this.fadadaReturnServer == null) { this.fadadaReturnServer = (FadadaReturnServer) AppContext.getBean("fadadaReturnServer"); }return fadadaReturnServer; } + + @Override + public void doGet(HttpServletRequest request, HttpServletResponse response){ + log.info("进入法大大回调方法FadadaReturnServlet"); + String bizContent = request.getParameter("bizContent"); + log.info(bizContent); + String appSecret = null; + try { + appSecret = PropKit.getProp(PropKit.APPSECRET); + //获取请求头参数 + request.getHeader(appSecret); + String appId = request.getHeader("X-FASC-App-Id"); + String signType = request.getHeader("X-FASC-Sign-Type"); + String sign = request.getHeader("X-FASC-Sign"); + String timestamp = request.getHeader("X-FASC-Timestamp"); + //事件名称,开发者可以根据不同事件名称去解析bizContent的值,实现不同的逻辑 + String event =request.getHeader("X-FASC-Event"); + String nonce = request.getHeader("X-FASC-Nonce"); + JSONObject eventJson = JSON.parseObject(bizContent); + log.info("参数转token"+eventJson.toString()); + //验签 + Map paramMap = new HashMap<>(); + paramMap.put("X-FASC-App-Id", appId); + paramMap.put("X-FASC-Sign-Type", "HMAC-SHA256"); + paramMap.put("X-FASC-Timestamp", timestamp); + paramMap.put("X-FASC-Nonce", nonce); + paramMap.put("X-FASC-Event", event); + paramMap.put("bizContent", bizContent); + log.info("event:"+event); + log.info("bizContent:"+bizContent); + if("sign-task-finished".equals(event)) { + String signTaskId = eventJson.getString("signTaskId"); + log.info("signTaskId:"+signTaskId); + log.info(fadadaReturnServer); + //继续流程 + getFadadaReturnServer().returnFadadaNode(signTaskId); + //状态回传 + } else if ("user-authorize".equals(event)){ + log.info("进入实名回调"); + String clientUserId = eventJson.getString("clientUserId"); + String openUserId = eventJson.getString("openUserId"); + //授权结果 + String authResult = eventJson.getString("authResult"); + //认证状态 + String identProcessStatus = eventJson.getString("identProcessStatus"); + //封装参数 + Map map = new HashMap(); + map.put("clientUserId", clientUserId); + map.put("openUserId", openUserId); + map.put("authResult", authResult); + map.put("identProcessStatus", identProcessStatus); + log.info("认证参数:" + map); + //状态回传 + getFadadaReturnServer().returnShiMingState(map); + } + //参数排序,ascii码排序 + String sortParam = FddCryptUtil.sortParameters(paramMap); + //生成签名后可以进行校验 + String signature; + String s = ""; + signature = FddCryptUtil.sign(sortParam, timestamp, appSecret); + if(!signature.equals(sign)) { + //log.error("日志记录,签名失败"); + //为了不重复接收该请求,建议这里返回success,返回success后这条消息法大大将中断重试回调机制 + s = "{\"msg\":\"success\"}"; + } + s = "{\"msg\":\"success\"}"; + response.setContentType("application/json"); + response.setCharacterEncoding("UTF-8"); + response.getWriter().println(s); + } catch (IOException e1) { + e1.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void doPost(HttpServletRequest request, HttpServletResponse response) { + doGet(request, response); } + + @Override + public void init() throws ServletException { } + + @Override + public void destroy() { + super.destroy(); + } +} \ No newline at end of file diff --git a/src/com/seeyon/apps/fadadaSys/servlet/Member.java b/src/com/seeyon/apps/fadadaSys/servlet/Member.java new file mode 100644 index 0000000..7a79e09 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/servlet/Member.java @@ -0,0 +1,121 @@ +package com.seeyon.apps.fadadaSys.servlet; + +import java.util.Date; + +/** + * 人员底表实体类 + * @author hbkkhzg + * + */ +public class Member { + + private String name; + + private String code; + + private String deptId; + + private String postId; + + private String unitId; + + private String sex; + + private String noid; + + private String age; + + private String id; + + private Date birth; + + + public Member(String name, String deptId, String postId) { + this.name = name; + this.deptId = deptId; + this.postId = postId; + } + public Member() { + + } + + public Date getBirth() { + return birth; + } + + public void setBirth(Date birth) { + this.birth = birth; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getNoid() { + return noid; + } + + public void setNoid(String noid) { + this.noid = noid; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getPostId() { + return postId; + } + + public void setPostId(String postId) { + this.postId = postId; + } + + public String getUnitId() { + return unitId; + } + + public void setUnitId(String unitId) { + this.unitId = unitId; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/servlet/Test.java b/src/com/seeyon/apps/fadadaSys/servlet/Test.java new file mode 100644 index 0000000..b8fedc7 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/servlet/Test.java @@ -0,0 +1,18 @@ +package com.seeyon.apps.fadadaSys.servlet; + + +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +public class Test { + public static void main(String[] args) { + int size = 17; + int height = 5; + int theHeight = (size * 31) + (height * 24); + if (theHeight >= 633 && theHeight <= 644) { + //发货单阈值情况 + System.out.println("1111"); + } + } +} diff --git a/src/com/seeyon/apps/fadadaSys/task/AutoSendProcureTask.java b/src/com/seeyon/apps/fadadaSys/task/AutoSendProcureTask.java new file mode 100644 index 0000000..c3cde3e --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/task/AutoSendProcureTask.java @@ -0,0 +1,85 @@ +package com.seeyon.apps.fadadaSys.task; + + +import com.seeyon.apps.fadadaSys.server.ErCodeStateService; +import com.seeyon.ctp.common.quartz.QuartzHolder; +import com.seeyon.ctp.common.quartz.QuartzJob; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 自动推送待办任务 + */ +public class AutoSendProcureTask implements QuartzJob { + + @Autowired + private ErCodeStateService erCodeStateService; + + /** 日志管理器 */ + private final static Log log = LogFactory.getLog(com.seeyon.apps.fadadaSys.task.AutoSendProcureTask.class); + + /** 定义的任务插件ID */ + private static String jobBeanId="autoSendAffairTask"; + + /** 定义的任务名称 */ + public static String jobName="QuartzAutoSendAffairTask"; + + private volatile boolean running; + + @Override + public void execute(Map parameters) { + if(running) { + log.info("上次同步还在执行中,跳过本次数据同步"); + return; + } + try { + //执行任务 + erCodeStateService.updateErcodeState(); + + } catch(Exception e) { + log.error("二维码状态监测发生异常:", e); + } finally { + this.running = false; + } + } + + /** + * interval 如果是true,则是间隔执行 + */ + public static void registerSyncTask(boolean interval, int our, int minute) { + jobBeanId = "autoSendAffairTask"; + jobName = "QuartzAutoSendAffairTask"; + log.info("注册预算定时计算任务" + jobName + "..."); + try { + // 先删除任务 + QuartzHolder.deleteQuartzJob(jobName); + // 设定时间 每天同步的 + if(interval) { + int delta = (our * 60 + minute) * 60 * 1000; + Map parameters = new HashMap(); + QuartzHolder.newQuartzJob(jobName, new Date(), delta, jobBeanId, parameters); + } else { + Map parameters = new HashMap(); + // 设置时间 + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); // 年月日 也可以具体到时分秒如calendar.set(2015, 10, 12,11,32,52); + // 每日运行,只要改动 时间即可 + calendar.set(Calendar.HOUR_OF_DAY, our); + calendar.set(Calendar.MINUTE, minute); + calendar.set(Calendar.SECOND, 00); + Date date = calendar.getTime();// date就是你需要的时间 + QuartzHolder.newQuartzJobPerDay(null, jobName, date, jobBeanId, parameters); + log.info("二维码状态监测" + jobName + ",成功"); + } + } catch (Exception e) { + log.error("二维码状态监测失败", e); + } + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/util/FadadaUtuil.java b/src/com/seeyon/apps/fadadaSys/util/FadadaUtuil.java new file mode 100644 index 0000000..4b7513e --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/FadadaUtuil.java @@ -0,0 +1,719 @@ +package com.seeyon.apps.fadadaSys.util; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.fasc.open.api.bean.common.*; +import com.fasc.open.api.v5_1.client.*; +import com.fasc.open.api.v5_1.req.seal.GetPersonalSealFreeSignUrlReq; +import com.fasc.open.api.v5_1.req.seal.GetPersonalSealListReq; +import com.fasc.open.api.v5_1.req.signtask.*; +import com.fasc.open.api.v5_1.req.user.*; +import com.fasc.open.api.v5_1.res.common.EUrlRes; +import com.fasc.open.api.v5_1.res.seal.GetPersonalSealListRes; +import com.fasc.open.api.v5_1.res.seal.GetSealFreeSignUrlRes; +import com.fasc.open.api.v5_1.res.seal.PersonalSealInfo; +import com.fasc.open.api.v5_1.res.signtask.*; +import com.fasc.open.api.v5_1.res.user.UserIdentityInfoRes; +import com.fasc.open.api.v5_1.res.user.UserRes; +import com.seeyon.apps.fadadaSys.kit.PropKit; +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.config.HttpConfig; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.stratey.DefaultJsonStrategy; +import com.fasc.open.api.utils.ResultUtil; +import com.fasc.open.api.v5_1.req.doc.FddFileUrl; +import com.fasc.open.api.v5_1.req.doc.FileProcessReq; +import com.fasc.open.api.v5_1.req.doc.GetUploadUrlReq; +import com.fasc.open.api.v5_1.res.doc.FileId; +import com.fasc.open.api.v5_1.res.doc.FileProcessRes; +import com.fasc.open.api.v5_1.res.doc.GetUploadUrlRes; +import com.fasc.open.api.v5_1.res.service.AccessTokenRes; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class FadadaUtuil { + private static final Log log = LogFactory.getLog(FadadaUtuil.class); + + private OpenApiClient openApiClient; + private String accessToken; + + public FadadaUtuil() throws IOException, ApiException { + this.openApiClient = FadadaUtuil.gatOpenApiClient(); + this.accessToken = FadadaUtuil.getAccessToken(); + } + + // 获取初始化参数 + private static OpenApiClient gatOpenApiClient() throws IOException { + //法大大分配的appId + String appId = PropKit.getProp(PropKit.APPID); + //法大大分配的appId对应的秘钥 + String appSecret = PropKit.getProp(PropKit.APPSECRET); + //API请求地址 + String serverUrl = PropKit.getProp(PropKit.SERVERURL); + // 初始化客户端 + OpenApiClient openApiClient = new OpenApiClient(appId, appSecret, serverUrl); + // http超时配置设置, 默认不设置超时时间 + // 如果不设置超时时间 该设置可忽略 + HttpConfig httpConfig = new HttpConfig(); + httpConfig.setConnectTimeout(1000000); + httpConfig.setReadTimeout(1000000); + openApiClient.setHttpConfig(httpConfig); + // Json序列化策率,默认使用Jackson,如果要使用其他如FastJson,Gson等实现JsonStrategy接口即可 + // 如果使用默认该设置可以忽略 + openApiClient.setJsonStrategy(new DefaultJsonStrategy()); + return openApiClient; + } + + // 获取token + public static String getAccessToken() throws ApiException, IOException { + ServiceClient serviceClient = new ServiceClient(gatOpenApiClient()); + BaseRes res = serviceClient.getAccessToken(); + ResultUtil.printLog(res, gatOpenApiClient().getJsonStrategy()); + return res.getData().getAccessToken(); + } + + // 上传本地文件到法大大环境中,成功则返回法大大的文件地址 + public String getUploadUrl(String fileUrl) throws ApiException, IOException { +// 获取文件上传地址 + DocClient docClient = new DocClient(openApiClient); + GetUploadUrlReq getUploadUrlReq = new GetUploadUrlReq(); +// 设置token + getUploadUrlReq.setAccessToken(accessToken); +// 设置文件上传类型 + getUploadUrlReq.setFileType("doc"); +// 调用接口获取本地文件上传链接和FddFileUrl + BaseRes getUploadUrlRes = docClient.getUploadFileUrl(getUploadUrlReq); + String fddFileUrl = null, uploadUrlString = ""; + + if ("100000".equals(getUploadUrlRes.getCode())) { + GetUploadUrlRes uploadUrlRes = getUploadUrlRes.getData(); + fddFileUrl = uploadUrlRes.getFddFileUrl(); + uploadUrlString = uploadUrlRes.getUploadUrl(); + } else { + log.info("获取地址失败:" + getUploadUrlRes.getMsg()); + return ""; + } + //根据uploadUrl上传用于签署的本地文档 + final File localFile = new File(fileUrl); + URL uploadUrl = new URL(uploadUrlString); + HttpURLConnection connection = (HttpURLConnection) uploadUrl.openConnection(); + connection.setRequestMethod("PUT"); + connection.setDoOutput(true); + BufferedOutputStream bos = new BufferedOutputStream(connection.getOutputStream()); + BufferedInputStream bis = new BufferedInputStream(new FileInputStream(localFile)); + int readByte = -1; + while ((readByte = bis.read()) != -1) { + bos.write(readByte); + } + bis.close(); + bos.close(); + int responseCode = connection.getResponseCode(); + String ret = ""; + if (responseCode == 200) { + ret = fddFileUrl; + } else { + ret = ""; + } + return ret; + } + + // 文件处理,将上传的文件调用文件处理接口,获取FileId + public String fileProcess(String fddFileUrlString, String fileName) throws ApiException { +// 文件处理 + DocClient docClient = new DocClient(openApiClient); + FileProcessReq fileProcessReq = new FileProcessReq(); + fileProcessReq.setAccessToken(accessToken); + List fddFileUrls = new ArrayList(); + FddFileUrl fddFileUrl = new FddFileUrl(); + fddFileUrl.setFddFileUrl(fddFileUrlString); + fddFileUrl.setFileName(fileName); + fddFileUrl.setFileType("doc"); + fddFileUrls.add(fddFileUrl); + fileProcessReq.setFddFileUrlList(fddFileUrls); + BaseRes fileProcessResBase = docClient.process(fileProcessReq); + log.info(fileProcessResBase.getCode()+"--"+fileProcessResBase.getMsg()); + if ("100000".equals(fileProcessResBase.getCode())) { + FileProcessRes fileProcessRes = fileProcessResBase.getData(); + List fileIds = fileProcessRes.getFileIdList(); + FileId fileId = fileIds.get(0); + String fileIdString = fileId.getFileId(); + return fileIdString; + } else { + log.info(fileProcessResBase.getMsg()); + return ""; + } + } + + /** + * @param map map中需要提供 + * subject签署文件名称 + * docId当前表单中文档的唯一表述 + * docName文件名称 + * docFileId上传附件的ID + * name签署人姓名要与userNo信息一致 + * userNo签署人身份证号要与name信息一致 + * mobile签署人手机号 + * @return + * @throws FileNotFoundException + * @throws IOException + * @throws ApiException + */ + public String create(Map map, int size, int height) throws FileNotFoundException, IOException, ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + CreateSignTaskReq createSignTaskReq = new CreateSignTaskReq(); + //设置场景码 + OpenId openId = new OpenId(); +// 设置签署方信息 corp企业 person个人 + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + createSignTaskReq.setInitiator(openId); +// 设置签署标题 + createSignTaskReq.setSignTaskSubject(map.get("subject"));//"原始文件发起V5.1签署任务" +// 是否自动提交 + createSignTaskReq.setAutoStart(true); + createSignTaskReq.setAutoFinish(true); + createSignTaskReq.setAutoFillFinalize(true); + createSignTaskReq.setSignInOrder(true); + createSignTaskReq.setSignDocType("document"); +// 设置签署文件 + List addDocInfos = new ArrayList(); + AddDocInfo addDocInfo = new AddDocInfo(); + addDocInfo.setDocId(map.get("docId"));//"docId1" + addDocInfo.setDocName(map.get("docName"));//"测试.xlsx" + addDocInfo.setDocFileId(map.get("docFileId")); +// 设置输入控件值 + String subNum = map.get("subNum"); + List fields = new ArrayList(); + Field field = new Field(); + field.setFieldId("999"); + field.setFieldName("控件" + 999); + field.setFieldKey("标识" + 999); + FieldPosition fieldPosition = new FieldPosition(); + //通知单签名控件 + //签名1页码标识 + int page = 0; + if (size > 15) { + page = 2; + fieldPosition.setPositionMode("pixel"); + fieldPosition.setPositionPageNo(page); + log.info(page+"行数大于15返回页面编号"); + fieldPosition.setPositionX("665"); + int y = 0; + if (size == 17) { + y = 0; + } else { + y = 0 + (30 * (size - 16)); + } + fieldPosition.setPositionY(y + ""); + } else { + page = 1; + fieldPosition.setPositionMode("pixel"); + fieldPosition.setPositionPageNo(page); + log.info(page+"行数小于15返回页面编号"); + fieldPosition.setPositionX("665"); + int y = 580 + (30 * (size - 1)); + fieldPosition.setPositionY(y + ""); + } + fieldPosition.setPositionKeyword("number1"); + field.setPosition(fieldPosition); + field.setMoveable(false); + field.setFieldType("person_sign"); + //签名2 + Field field2 = new Field(); + field2.setFieldId("888"); + field2.setFieldName("控件" + 888); + field2.setFieldKey("标识" + 888); + //阈值633 640 644 <647 + //633 >= x <= 644 特殊情况 y = 1050 + ///x > 644 换行 + int theHeight = (size * 31) + (height * 24); + log.info(theHeight+"theHeight值。其中size和height分别为:"+size+"、"+height); + int y2 = 500 + (31 * (size - 1)); + int endPage = 0; + int y2s = y2; + if (height > 0) { + if (theHeight >= 633 && theHeight <= 644) { + endPage = page + 1; + //发货单阈值情况 + y2s = 1050; + } else if (theHeight > 644) { + endPage = page + 2; + if (theHeight <= 709) { + //709为备注三行换行极限 + y2s = 110; + } else { + y2s = 130 + (theHeight - 710); + } + } else { + endPage = page + 1; + y2s = y2 + (24 * (height - 1)); + } + }else { + endPage = page + 1; + y2s = y2 +24 ; + } + FieldPosition fieldPosition2 = new FieldPosition(); + fieldPosition2.setPositionMode("pixel"); + fieldPosition2.setPositionPageNo(endPage); + log.info("返回同意与否后返回的页面"+endPage); + fieldPosition2.setPositionX("665"); + fieldPosition2.setPositionY(y2s + ""); + fieldPosition2.setPositionKeyword("number1"); + field2.setPosition(fieldPosition2); + field2.setMoveable(false); + field2.setFieldType("person_sign"); + //时间控件 + Field field3 = new Field(); + field3.setFieldId("777"); + field3.setFieldName("控件" + 777); + field3.setFieldKey("标识" + 777); + FieldPosition fieldPosition3 = new FieldPosition(); + fieldPosition3.setPositionMode("pixel"); + fieldPosition3.setPositionPageNo(endPage); + log.info("返回同意与否后返回的时间页面"+endPage); + fieldPosition3.setPositionX("665"); + int y3 = y2s + 65; + fieldPosition3.setPositionY(y3 + ""); + fieldPosition3.setPositionKeyword("number1"); + field3.setPosition(fieldPosition3); + field3.setMoveable(false); + field3.setFieldType("date_sign"); + fields.add(field); + fields.add(field2); + fields.add(field3); + addDocInfo.setDocFields(fields); + addDocInfos.add(addDocInfo); + createSignTaskReq.setDocs(addDocInfos); + List addActorsInfos = new ArrayList(); + AddActorsInfo addActorsInfo = new AddActorsInfo(); +// 设置签署方信息 + Actor actor = new Actor(); + actor.setActorId("参与方1"); + actor.setActorType("person"); + actor.setActorName("参与方1"); + List permissions = new ArrayList(); + permissions.add("sign"); + actor.setPermissions(permissions); + actor.setIdentNameForMatch(map.get("name")); + actor.setCertNoForMatch(map.get("userNo")); + Notification notification = new Notification(); + notification.setSendNotification(true); + notification.setNotifyWay("mobile"); + notification.setNotifyAddress(map.get("mobile")); + actor.setNotification(notification); + addActorsInfo.setActor(actor); + //设置密码签署和验证码签署 + AddSignConfigInfo addSignConfigInfo = new AddSignConfigInfo(); + List list = new ArrayList<>(); + list.add("pw"); + list.add("sms"); + addSignConfigInfo.setVerifyMethods(list); + //签署方式设置为手绘 + addSignConfigInfo.setSignerSignMethod("hand_write"); + //签署顺序 + addSignConfigInfo.setOrderNo(1); + addActorsInfo.setSignConfigInfo(addSignConfigInfo); + List addSignFieldInfos = new ArrayList(); + AddSignFieldInfo addSignFieldInfo = new AddSignFieldInfo(); + addSignFieldInfo.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo.setFieldId("999"); + AddSignFieldInfo addSignFieldInfo2 = new AddSignFieldInfo(); + addSignFieldInfo2.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo2.setFieldId("888"); + AddSignFieldInfo addSignFieldInfo3 = new AddSignFieldInfo(); + addSignFieldInfo3.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo3.setFieldId("777"); + addSignFieldInfos.add(addSignFieldInfo); + addSignFieldInfos.add(addSignFieldInfo2); + addSignFieldInfos.add(addSignFieldInfo3); + addActorsInfo.setSignFields(addSignFieldInfos); + addActorsInfos.add(addActorsInfo); + createSignTaskReq.setActors(addActorsInfos); + createSignTaskReq.setAccessToken(accessToken); + BaseRes bs = signTaskClient.create(createSignTaskReq); + log.info(bs.getCode()+"--"+bs.getMsg()); + CreateSignTaskRes createSignTaskRes = bs.getData(); + return createSignTaskRes.getSignTaskId(); + } + + /** + * @param map map中需要提供 + * subject签署文件名称 + * docId当前表单中文档的唯一表述 + * docName文件名称 + * docFileId上传附件的ID + * name签署人姓名要与userNo信息一致 + * userNo签署人身份证号要与name信息一致 + * mobile签署人手机号 + * @return + * @throws FileNotFoundException + * @throws IOException + * @throws ApiException + */ + public String createDiaoRu(Map map, int size, int height) throws FileNotFoundException, IOException, ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + CreateSignTaskReq createSignTaskReq = new CreateSignTaskReq(); + OpenId openId = new OpenId(); +// 设置签署方信息 corp企业 person个人 + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + createSignTaskReq.setInitiator(openId); +// 设置签署标题 + createSignTaskReq.setSignTaskSubject(map.get("subject"));//"原始文件发起V5.1签署任务" +// 是否自动提交 + createSignTaskReq.setAutoStart(true); + createSignTaskReq.setAutoFinish(true); + createSignTaskReq.setAutoFillFinalize(true); + createSignTaskReq.setSignInOrder(true); + createSignTaskReq.setSignDocType("document"); +// 设置签署文件 + List addDocInfos = new ArrayList(); + AddDocInfo addDocInfo = new AddDocInfo(); + addDocInfo.setDocId(map.get("docId"));//"docId1" + addDocInfo.setDocName(map.get("docName"));//"测试.xlsx" + addDocInfo.setDocFileId(map.get("docFileId")); +// 设置输入控件值 + String subNum = map.get("subNum"); + List fields = new ArrayList(); + Field field = new Field(); + field.setFieldId("999"); + field.setFieldName("控件" + 999); + field.setFieldKey("标识" + 999); + FieldPosition fieldPosition = new FieldPosition(); + fieldPosition.setPositionMode("pixel"); + fieldPosition.setPositionPageNo(1); + fieldPosition.setPositionX("665"); + int y = 730 + (31 * (size - 1)); + fieldPosition.setPositionY(y + ""); + fieldPosition.setPositionKeyword("number1"); + field.setPosition(fieldPosition); + field.setMoveable(false); + field.setFieldType("person_sign"); + //控件2 + Field field2 = new Field(); + field2.setFieldId("888"); + field2.setFieldName("控件" + 888); + field2.setFieldKey("标识" + 888); + FieldPosition fieldPosition2 = new FieldPosition(); + fieldPosition2.setPositionMode("pixel"); + fieldPosition2.setPositionPageNo(2); + fieldPosition2.setPositionX("665"); + int y2 = 531 + (31 * (size - 1)); + int y2s = y2; + if (height > 0) { + y2s = y2 + (48 * (height - 1)); + } + fieldPosition2.setPositionY(y2s + ""); + fieldPosition2.setPositionKeyword("number1"); + field2.setPosition(fieldPosition2); + field2.setMoveable(false); + field2.setFieldType("person_sign"); + //时间控件 + Field field3 = new Field(); + field3.setFieldId("777"); + field3.setFieldName("控件" + 777); + field3.setFieldKey("标识" + 777); + FieldPosition fieldPosition3 = new FieldPosition(); + fieldPosition3.setPositionMode("pixel"); + fieldPosition3.setPositionPageNo(2); + fieldPosition3.setPositionX("665"); + int y3 = y2s + 65; + fieldPosition3.setPositionY(y3 + ""); + fieldPosition3.setPositionKeyword("number1"); + field3.setPosition(fieldPosition3); + field3.setMoveable(false); + field3.setFieldType("date_sign"); + fields.add(field); + fields.add(field2); + fields.add(field3); + addDocInfo.setDocFields(fields); + addDocInfos.add(addDocInfo); + createSignTaskReq.setDocs(addDocInfos); + List addActorsInfos = new ArrayList(); + AddActorsInfo addActorsInfo = new AddActorsInfo(); +// 设置签署方信息 + Actor actor = new Actor(); + actor.setActorId("参与方1"); + actor.setActorType("person"); + actor.setActorName("参与方1"); + List permissions = new ArrayList(); + permissions.add("sign"); + actor.setPermissions(permissions); + actor.setIdentNameForMatch(map.get("name")); + actor.setCertNoForMatch(map.get("userNo")); + Notification notification = new Notification(); + notification.setSendNotification(true); + notification.setNotifyWay("mobile"); + notification.setNotifyAddress(map.get("mobile")); + actor.setNotification(notification); + addActorsInfo.setActor(actor); + //设置只使用密码签署 + AddSignConfigInfo addSignConfigInfo = new AddSignConfigInfo(); + List list = new ArrayList<>(); + list.add("pw"); + list.add("sms"); + addSignConfigInfo.setVerifyMethods(list); + //签署方式设置为手绘 + addSignConfigInfo.setSignerSignMethod("hand_write"); + //签署顺序 + addSignConfigInfo.setOrderNo(1); + addActorsInfo.setSignConfigInfo(addSignConfigInfo); + List addSignFieldInfos = new ArrayList(); + AddSignFieldInfo addSignFieldInfo = new AddSignFieldInfo(); + addSignFieldInfo.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo.setFieldId("999"); + AddSignFieldInfo addSignFieldInfo2 = new AddSignFieldInfo(); + addSignFieldInfo2.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo2.setFieldId("888"); + AddSignFieldInfo addSignFieldInfo3 = new AddSignFieldInfo(); + addSignFieldInfo3.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo3.setFieldId("777"); + addSignFieldInfos.add(addSignFieldInfo); + addSignFieldInfos.add(addSignFieldInfo2); + addSignFieldInfos.add(addSignFieldInfo3); + addActorsInfo.setSignFields(addSignFieldInfos); + addActorsInfos.add(addActorsInfo); + createSignTaskReq.setActors(addActorsInfos); + createSignTaskReq.setAccessToken(accessToken); + BaseRes bs = signTaskClient.create(createSignTaskReq); + log.info(bs.getCode()+"--"+bs.getMsg()); + CreateSignTaskRes createSignTaskRes = bs.getData(); + return createSignTaskRes.getSignTaskId(); + } + + //获取法大大填写的控件值 + public List getFieldValue(String signTaskId) throws ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + ListSignTaskFieldReq listSignTaskFieldReq = new ListSignTaskFieldReq(); + listSignTaskFieldReq.setAccessToken(accessToken); + listSignTaskFieldReq.setSignTaskId(signTaskId); + BaseRes listSignTaskFieldRes = signTaskClient.listSignTaskField(listSignTaskFieldReq); + List listSignTaskFillFields = null; + if ("100000".equals(listSignTaskFieldRes.getCode())) { + ListSignTaskFieldRes listSignTaskField = listSignTaskFieldRes.getData(); + listSignTaskFillFields = listSignTaskField.getFillFields(); + } + return listSignTaskFillFields; + } + + //获取法大大签署之后的文件地址 + public String getOwnerDownloadUrl(String signTaskId) throws ApiException, FileNotFoundException, IOException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + GetOwnerDownloadUrlReq getOwnerDownloadUrlReq = new GetOwnerDownloadUrlReq(); + getOwnerDownloadUrlReq.setAccessToken(accessToken); + getOwnerDownloadUrlReq.setSignTaskId(signTaskId); + getOwnerDownloadUrlReq.setFileType("doc"); + OpenId openId = new OpenId(); + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + getOwnerDownloadUrlReq.setOwnerId(openId); + BaseRes ownerDownloadUrlRes = signTaskClient.getOwnerDownloadUrl(getOwnerDownloadUrlReq); + String ret = ""; + log.info(ownerDownloadUrlRes.getCode()+"--"+ownerDownloadUrlRes.getMsg()); + if ("100000".equals(ownerDownloadUrlRes.getCode())) { + OwnerDownloadUrlRes ownerDownloadUrl = ownerDownloadUrlRes.getData(); + ret = ownerDownloadUrl.getDownloadUrl(); + } + return ret; + } + + // 根据链接地址下载文件 + public void download(String urlStr, String fileName) throws IOException { + URL url = new URL(urlStr); + URLConnection conn = url.openConnection(); + InputStream inputStream = conn.getInputStream(); + BufferedInputStream bis = new BufferedInputStream(inputStream); + FileOutputStream fos = new FileOutputStream(fileName); + byte[] buffer = new byte[1024]; + int count; + while ((count = bis.read(buffer)) != -1) { + fos.write(buffer, 0, count); + } + fos.close(); + bis.close(); + inputStream.close(); + } + + /** + * 获取签署链接 + * @param signTaskId + * @return + * @throws ApiException + */ + public String getSignUrl(String signTaskId) throws ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + SignTaskActorGetUrlReq signTaskActorGetUrlReq = new SignTaskActorGetUrlReq(); + signTaskActorGetUrlReq.setAccessToken(accessToken); + signTaskActorGetUrlReq.setSignTaskId(signTaskId); + signTaskActorGetUrlReq.setActorId("参与方1"); + BaseRes url = signTaskClient.signTaskActorGetUrl(signTaskActorGetUrlReq); + String signUrl = null; + if ("100000".equals(url.getCode())) { + SignTaskActorGetUrlRes data = url.getData(); + signUrl = data.getActorSignTaskUrl(); + } + return signUrl; + } + + /** + * 设置免验证签链接 + * @return + * @throws ApiException + * @throws FileNotFoundException + * @throws IOException + */ + public String getFreeSign(String openUserId) throws ApiException, FileNotFoundException, IOException { + SealClient sealClient = new SealClient(openApiClient); + GetPersonalSealFreeSignUrlReq getPersonalSealFreeSignUrlReq = new GetPersonalSealFreeSignUrlReq(); + getPersonalSealFreeSignUrlReq.setAccessToken(accessToken); + //场景码 + getPersonalSealFreeSignUrlReq.setBusinessId("ba58d070c84349e39281c1735408a243"); + //个人签名列表 + List ids = getPersonSealList(openUserId); + getPersonalSealFreeSignUrlReq.setSealIds(ids); + getPersonalSealFreeSignUrlReq.setOpenUserId(openUserId); + BaseRes url = sealClient.getPersonalSealFreeSignUrl(getPersonalSealFreeSignUrlReq); + String signUrl = null; + if ("100000".equals(url.getCode())) { + GetSealFreeSignUrlRes data = url.getData(); + signUrl = data.getFreeSignUrl(); + } + return signUrl; + } + + /** + * 获取个人授权链接 + * + * @return + */ + public String getUserAuthUrl(String clientId, String userName) throws ApiException { + UserClient userClient = new UserClient(openApiClient); + GetUserAuthUrlReq getUserAuthUrlReq = new GetUserAuthUrlReq(); + getUserAuthUrlReq.setAccessToken(accessToken); + getUserAuthUrlReq.setClientUserId(clientId); + UserIdentInfoReq userIdentInfoReq = new UserIdentInfoReq(); + List list = new ArrayList<>(); + list.add("mobile"); + userIdentInfoReq.setIdentMethod(list); + userIdentInfoReq.setUserName(userName); + List list1 = new ArrayList(); + list1.add("userName"); + //设置userName为不可编辑 + getUserAuthUrlReq.setNonEditableInfo(list1); + getUserAuthUrlReq.setUserIdentInfo(userIdentInfoReq); + final BaseRes url = userClient.getUserAuthUrl(getUserAuthUrlReq); + String authUrl = null; + if ("100000".equals(url.getCode())) { + EUrlRes data = url.getData(); + authUrl = data.getAuthUrl(); + } + return authUrl; + } + + /** + * 获取个人签名列表 + * + * @return + */ + public List getPersonSealList(String openUserId) throws ApiException { + SealClient sealClient = new SealClient(openApiClient); + GetPersonalSealListReq getPersonalSealListReq = new GetPersonalSealListReq(); + getPersonalSealListReq.setAccessToken(accessToken); + getPersonalSealListReq.setOpenUserId(openUserId); + final BaseRes personalSealList = sealClient.getPersonalSealList(getPersonalSealListReq); + List infos = null; + if ("100000".equals(personalSealList.getCode())) { + GetPersonalSealListRes data = personalSealList.getData(); + infos = data.getSealInfos(); + } + List ids = new ArrayList<>(); + for (int i = 0; i < infos.size(); i++) { + PersonalSealInfo personalSealInfo = infos.get(i); + ids.add(personalSealInfo.getSealId()); + } + return ids; + } + + /** + * 解阻签署任务 + * + * @return + */ + public boolean signTaskUnblock(String signTaskId) throws ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + UnblockReq unblockReq = new UnblockReq(); + unblockReq.setAccessToken(accessToken); + unblockReq.setActorId("参与方1"); + unblockReq.setSignTaskId(signTaskId); + final BaseRes unblock = signTaskClient.unblock(unblockReq); + if ("100000".equals(unblock.getCode())) { + return true; + } + return false; + } + + /** + * 获取认证人员信息 + * + * @return + */ + public BaseRes getPeopleSgin(String openUserId) throws ApiException { + UserClient userClient = new UserClient(openApiClient); + GetUserIdentityInfoReq getUserIdentityInfoReq = new GetUserIdentityInfoReq(); + getUserIdentityInfoReq.setAccessToken(accessToken); + getUserIdentityInfoReq.setOpenUserId(openUserId); + BaseRes identityInfo = userClient.getIdentityInfo(getUserIdentityInfoReq); + if ("100000".equals(identityInfo.getCode())) { + return identityInfo; + } + return null; + } + + /** + * 查询人员认证状态 + * + * @return + */ + public BaseRes getSgin(String openUserId) throws ApiException { + UserClient userClient = new UserClient(openApiClient); + GetUserReq getUserReq = new GetUserReq(); + getUserReq.setAccessToken(accessToken); + getUserReq.setClientUserId(openUserId); + final BaseRes userResBaseRes = userClient.get(getUserReq); + if ("100000".equals(userResBaseRes.getCode())) { + return userResBaseRes; + } + return null; + } + + /** + * 解除个人授权 + * + * @return + */ + public BaseRes unbindUser(String openUserId) throws ApiException { + UserClient userClient = new UserClient(openApiClient); + UserUnbindReq userUnbindReq = new UserUnbindReq(); + userUnbindReq.setAccessToken(accessToken); + userUnbindReq.setOpenUserId(openUserId); + BaseRes unbind = userClient.unbind(userUnbindReq); + if ("100000".equals(unbind.getCode())) { + return unbind; + } + return null; + } + +} \ No newline at end of file diff --git a/src/com/seeyon/apps/fadadaSys/util/FileUtil.java b/src/com/seeyon/apps/fadadaSys/util/FileUtil.java new file mode 100644 index 0000000..b9f047b --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/FileUtil.java @@ -0,0 +1,80 @@ +package com.seeyon.apps.fadadaSys.util; + +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import www.seeyon.com.utils.UUIDUtil; + +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.*; + +public class FileUtil { + + AttachmentManager attachmentManager; + + public AttachmentManager getAttachmentManager() { + if(this.attachmentManager==null) { + this.attachmentManager = ((AttachmentManager) AppContext.getBean("attachmentManager")); + } + return attachmentManager; + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + System.out.println("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// List> lists = dataDao.findAttachAll(id); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + System.out.println("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); + System.out.println(s); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "application/pdf"); + } + map.put("size", f.length()+""); +// System.out.println(beanId); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + System.out.println("文件"+map); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + System.out.println(str); + return l+""; + + } +} diff --git a/src/com/seeyon/apps/fadadaSys/util/HTMLUtil.java b/src/com/seeyon/apps/fadadaSys/util/HTMLUtil.java new file mode 100644 index 0000000..91ba723 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/HTMLUtil.java @@ -0,0 +1,328 @@ +package com.seeyon.apps.fadadaSys.util; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.net.URL; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.xhtmlrenderer.pdf.ITextFontResolver; + +import com.itextpdf.text.pdf.BaseFont; +import com.lowagie.text.DocumentException; +import org.xhtmlrenderer.pdf.ITextRenderer; + +public class HTMLUtil { + private static final Log log = LogFactory.getLog(HTMLUtil.class); + + /** + * 根据本地模板生成静态页面 + * + * @param filePath jsp路经 + * @param HtmlFile html路经 + * @return + */ + public boolean JspToHtmlFile(String filePath, String HtmlFile,Map map) { + String str = ""; + long beginDate = (new Date()).getTime(); + try { + String tempStr = ""; + URL url = HTMLUtil.class.getClassLoader().getResource(filePath);// 读取模块文件 + log.info(url.getPath()); + InputStreamReader is = new InputStreamReader (new FileInputStream(url.getFile()),"UTF-8"); + BufferedReader br=new BufferedReader(is); + while ((tempStr = br.readLine()) != null) { + str = str + tempStr; + } + is.close(); + } catch (IOException e) { + e.printStackTrace(); + return false; + } + try { +// 获取明细表数据并拼接成html标签 + String shipmentsDetails = getPaymentDetailsFaHuo((List)map.get("shipmentsDetails")).toString(); + String details = getDetails((List) map.get("dispathDetails")).toString(); + log.info(map); +// 单据编号 + str = str.replaceAll("##receiptNumber##", map.get("receiptNumber").toString()); + //标题 + str = str.replaceAll("##title##", map.get("title").toString()); +// 发起部门 + str = str.replaceAll("##department##", map.get("department").toString()); + //发起人员 + str = str.replaceAll("##person##", map.get("person").toString()); +// 发起时间 + str = str.replaceAll("##startDate##", map.get("startDate").toString()); +// 合同名称 + str = str.replaceAll("##contractName##", map.get("contractName").toString()); +// 专属业务员 + str = str.replaceAll("##seller##", map.get("seller").toString()); +// 客户名称 + str = str.replaceAll("##clientName##", map.get("clientName").toString()); +// 收货人姓名 + str = str.replaceAll("##consigneeName##", map.get("consigneeName").toString()); +// 收货地址 + str = str.replaceAll("##consigneeAddress##", map.get("consigneeAddress").toString()); +// 收货人电话 + str = str.replaceAll("##consigneePhone##", map.get("consigneePhone").toString()); +// 发货说明 + str = str.replaceAll("##shipmentsExplain##", map.get("shipmentsExplain").toString()); +// 发货仓库 + str = str.replaceAll("##shipmentsWarehouse##", map.get("shipmentsWarehouse").toString()); +// 可用余额 + str = str.replaceAll("##balance##", map.get("balance").toString()); +// 发货后余额 + str = str.replaceAll("##shipmentsLaterBalance##", map.get("shipmentsLaterBalance").toString()); +// 发货类型 + str = str.replaceAll("##shipmentsType##", map.get("shipmentsType").toString()); +// 发货单号 + str = str.replaceAll("##shipmentsNo##", map.get("shipmentsNo").toString()); +// 数量合计 + str = str.replaceAll("##quantityTotal##", map.get("quantityTotal").toString()); + // 数量合计(袋) + str = str.replaceAll("##quantityDaiTotal##", map.get("quantityDaiTotal").toString()); +// 金额合计 + str = str.replaceAll("##moneyTotal##", map.get("moneyTotal").toString()); +// 物流信息说明 + str = str.replaceAll("##logisticsExplain##", map.get("logisticsExplain").toString()); + //发货通知单日期 + str = str.replaceAll("##formattedDate1##", map.get("formattedDate1").toString()); + //发货单日期 + str = str.replaceAll("##formattedDate2##", map.get("formattedDate2").toString()); + //审批意见 + str = str.replaceAll("##opinions##", map.get("opinions").toString()); + + //发货单 + //发货日期 + str = str.replaceAll("##shipmentsDate##", map.get("shipmentsDate").toString()); + //销售部门 + str = str.replaceAll("##shipmentsDept##", map.get("shipmentsDept").toString()); + //业务类型 + str = str.replaceAll("##businessType##", map.get("businessType").toString()); + //销售类型 + str = str.replaceAll("##salesType##", map.get("salesType").toString()); + //客户简称 + str = str.replaceAll("##masterName##", map.get("masterName").toString()); + //客户级别名称 + str = str.replaceAll("##masterLev##", map.get("masterLev").toString()); + //客户编码 + str = str.replaceAll("##masterCode##", map.get("masterCode").toString()); + //税率 + str = str.replaceAll("##taxrate##", map.get("taxrate").toString()); + //数量合计 + str = str.replaceAll("##quantityTotal2##", map.get("quantityTotal").toString()); + //总件数 + str = str.replaceAll("##sum##", map.get("sum").toString()); +//制单人 + str = str.replaceAll("##creator##", map.get("creator").toString()); +// 发货明细 + str = str.replaceAll("##shipmentsDetails##", shipmentsDetails); + // 发货明细 + str = str.replaceAll("##details##", details); + + File f = new File(HtmlFile); + BufferedWriter o = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f),"UTF-8")); + o.write(str); + o.close(); + log.info("共用时:" + ((new Date()).getTime() - beginDate) + "ms"); + } catch (IOException e) { + e.printStackTrace(); + return false; + } + return true; + } + + /** + * 自定义签署确认页面 + * + * @param filePath jsp路经 + * @param HtmlFile html路经 + * @return + */ + public boolean jspTohtmlFileDiaoRu(String filePath, String HtmlFile,Map map) { + String str = ""; + long beginDate = (new Date()).getTime(); + try { + String tempStr = ""; + URL url = HTMLUtil.class.getClassLoader().getResource(filePath);// 读取模块文件 + log.info(url.getPath()); + InputStreamReader is = new InputStreamReader (new FileInputStream(url.getFile()),"UTF-8"); + BufferedReader br=new BufferedReader(is); + while ((tempStr = br.readLine()) != null) { + str = str + tempStr; + } + is.close(); + } catch (IOException e) { + e.printStackTrace(); + return false; + } + try { +// 获取明细表数据并拼接成html标签 + String shipmentsDetails = getPaymentDetails((List)map.get("shipmentsDetails")).toString(); + String details = getDetails((List) map.get("dispathDetails")).toString(); +// 单据编号 + str = str.replaceAll("##receiptNumber##", map.get("receiptNumber").toString()); + //标题 + str = str.replaceAll("##title##", map.get("title").toString()) ; + // 发起部门 + str = str.replaceAll("##department##", map.get("department").toString()); + // 发起人员 + str = str.replaceAll("##person##", map.get("person").toString()); + // 发起日期 + str = str.replaceAll("##startDate##", map.get("startDate").toString()); + // 调货说明 + str = str.replaceAll("##shipmentsExplain##", map.get("shipmentsExplain").toString()); +// 调出客户联系人 + str = str.replaceAll("##outCustomMember##", map.get("outCustomMember").toString()); +// 调出联系人手机号 + str = str.replaceAll("##outMemberPhone##", map.get("outMemberPhone").toString()); +// 调出客户名称 + str = str.replaceAll("##outCustomName##", map.get("outCustomName").toString()); +// 专属业务员 + str = str.replaceAll("##outSellerstr##", map.get("outSellerstr").toString()); +// 调出合同名称 + str = str.replaceAll("##outContractName##", map.get("outContractName").toString()); +// 调入合同名称 + str = str.replaceAll("##callInContractName##", map.get("callInContractName").toString()); +// 调出-收货仓库 + str = str.replaceAll("##shipmentsWarehousestr##", map.get("shipmentsWarehouse").toString()); +// 调入合同名称 + str = str.replaceAll("##callInContractName##", map.get("callInContractName").toString()); +// 调入客户联系人 + str = str.replaceAll("##calInCustomMember##", map.get("calInCustomMember").toString()); +// 联系人手机号 + str = str.replaceAll("##callMemberPhone##", map.get("callMemberPhone").toString()); +// 调入客户名称 + str = str.replaceAll("##calInCustomName##", map.get("calInCustomName").toString()); + // 专属业务员 + str = str.replaceAll("##callInSellerstr##", map.get("callInSellerstr").toString()); +// 发货通知单日期 + str = str.replaceAll("##formattedDate1##", map.get("formattedDate1").toString()); + //审批意见 + str = str.replaceAll("##opinions##", map.get("opinions").toString()); + //发货单 +// 发货单号 + str = str.replaceAll("##shipmentsNo##", map.get("shipmentsNo").toString()); + //发货日期 + str = str.replaceAll("##shipmentsDate##", map.get("shipmentsDate").toString()); + //销售部门 + str = str.replaceAll("##shipmentsDept##", map.get("shipmentsDept").toString()); + //业务类型 + str = str.replaceAll("##businessType##", map.get("businessType").toString()); + //销售类型 + str = str.replaceAll("##salesType##", map.get("salesType").toString()); + //客户简称 + str = str.replaceAll("##masterName##", map.get("masterName").toString()); + //客户级别名称 + str = str.replaceAll("##masterLev##", map.get("masterLev").toString()); + //客户编码 + str = str.replaceAll("##masterCode##", map.get("masterCode").toString()); + //税率 + str = str.replaceAll("##taxrate##", map.get("taxrate").toString()); + //数量合计 + str = str.replaceAll("##quantityTotal2##", map.get("sunNum").toString()); + //总件数 + str = str.replaceAll("##sum##", map.get("sum").toString()); + //制单人 + str = str.replaceAll("##creator##", map.get("creator").toString()); +// 发货明细 + str = str.replaceAll("##shipmentsDetails##", shipmentsDetails); +// 发货明细 + str = str.replaceAll("##details##", details); + File f = new File(HtmlFile); + BufferedWriter o = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f),"UTF-8")); + o.write(str); + o.close(); + log.info("共用时:" + ((new Date()).getTime() - beginDate) + "ms"); + } catch (IOException e) { + e.printStackTrace(); + return false; + } + return true; + } + + public StringBuffer getPaymentDetails(List> list) { + StringBuffer strb = new StringBuffer(); + for(int i = 0 ; i < list.size() ; i ++) { + strb.append(""); + strb.append(""+list.get(i).get("num")+""); + strb.append(""+list.get(i).get("categoryName")+""); + strb.append(""+list.get(i).get("stockCode")+""); + strb.append(""+list.get(i).get("specification")+""); + strb.append(""+list.get(i).get("units")+""); + strb.append(""+list.get(i).get("quantityShipped")+""); + strb.append(""+list.get(i).get("quantityShipped2")+""); + strb.append(""+list.get(i).get("remark")+""); + strb.append(""); + } + return strb; + } + + public StringBuffer getPaymentDetailsFaHuo(List> list) { + StringBuffer strb = new StringBuffer(); + for(int i = 0 ; i < list.size() ; i ++) { + strb.append(""); + strb.append(""+list.get(i).get("num")+""); + strb.append(""+list.get(i).get("categoryName")+""); + strb.append(""+list.get(i).get("stockCode")+""); + strb.append(""+list.get(i).get("specification")+""); + strb.append(""+list.get(i).get("units")+""); + strb.append(""+list.get(i).get("quantityShipped")+""); + strb.append(""+list.get(i).get("quantityShipped2")+""); + strb.append(""+list.get(i).get("unitPrice")+""); + strb.append(""+list.get(i).get("shipmentsMoney")+""); + strb.append(""+list.get(i).get("remark")+""); + strb.append(""); + } + return strb; + } + + public StringBuffer getDetails(List> list) { + StringBuffer strb = new StringBuffer(); + for(int i = 0 ; i < list.size() ; i ++) { + strb.append(""); + strb.append(""+(i+1)+""); + strb.append(""+list.get(i).get("cwhName")+""); + strb.append(""+list.get(i).get("cinvCode")+""); + strb.append(""+list.get(i).get("cinvName")+""); + strb.append(""+list.get(i).get("cinvstd")+""); + strb.append(""+list.get(i).get("cinvmUnit")+""); + strb.append(""+list.get(i).get("cinvNumber")+""); + strb.append(""+list.get(i).get("inum")+""); + strb.append(""); + } + return strb; + } + + /** + * 将HTML文件转换成 + * @param htmlPath 需要转换的HTML路径 + * @param pdfPath 生成后PDF路径 + * @throws DocumentException + * @throws IOException + */ + public void htmlToPdf(String htmlPath,String pdfPath) throws DocumentException, IOException{ + File htmlFile = new File(htmlPath); + OutputStream outputStream = new FileOutputStream(pdfPath); + ITextRenderer renderer = new ITextRenderer(); + ITextFontResolver fontResolver = renderer.getFontResolver(); + fontResolver.addFont(HTMLUtil.class.getClassLoader().getResource("SIMSUN.TTC").getPath(), BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); + + renderer.setDocument(htmlFile); + renderer.layout(); + renderer.createPDF(outputStream); + outputStream.close(); + } + +} diff --git a/src/com/seeyon/apps/fadadaSys/util/Member.java b/src/com/seeyon/apps/fadadaSys/util/Member.java new file mode 100644 index 0000000..b4225f9 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/Member.java @@ -0,0 +1,121 @@ +package com.seeyon.apps.fadadaSys.util; + +import java.util.Date; + +/** + * 人员底表实体类 + * @author hbkkhzg + * + */ +public class Member { + + private String name; + + private String code; + + private String deptId; + + private String postId; + + private String unitId; + + private String sex; + + private String noid; + + private String age; + + private String id; + + private Date birth; + + + public Member(String name, String deptId, String postId) { + this.name = name; + this.deptId = deptId; + this.postId = postId; + } + public Member() { + + } + + public Date getBirth() { + return birth; + } + + public void setBirth(Date birth) { + this.birth = birth; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getNoid() { + return noid; + } + + public void setNoid(String noid) { + this.noid = noid; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDeptId() { + return deptId; + } + + public void setDeptId(String deptId) { + this.deptId = deptId; + } + + public String getPostId() { + return postId; + } + + public void setPostId(String postId) { + this.postId = postId; + } + + public String getUnitId() { + return unitId; + } + + public void setUnitId(String unitId) { + this.unitId = unitId; + } +} diff --git a/src/com/seeyon/apps/fadadaSys/util/ProtUtil.java b/src/com/seeyon/apps/fadadaSys/util/ProtUtil.java new file mode 100644 index 0000000..6737409 --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/ProtUtil.java @@ -0,0 +1,143 @@ +package com.seeyon.apps.fadadaSys.util; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; + +import com.seeyon.apps.fadadaSys.kit.PropKit; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.util.EntityUtils; + +import com.alibaba.fastjson.JSONObject; + +public class ProtUtil { + private static final Log log = LogFactory.getLog(ProtUtil.class); + + + /** + * 获取一个token + * + * @return + * @throws IOException + * @throws FileNotFoundException + */ + private String getToken() throws FileNotFoundException, IOException { + String address = PropKit.getProp(PropKit.OATOKEN) + PropKit.getProp(PropKit.RESTNAME) + "/" + PropKit.getProp(PropKit.RESTPASSWORD); + DefaultHttpClient client = new DefaultHttpClient(); + String result = ""; + HttpGet get = new HttpGet(address); + try { + HttpResponse res = client.execute(get); + if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { + result = EntityUtils.toString(res.getEntity()); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + String token = ""; + if(result.contains("{")) { + JSONObject jsObj = JSONObject.parseObject(result); + token = jsObj.get("id").toString(); + }else { + token = result; + } + return token; + } + + + /** + * 调用post接口 + * @return + */ + public String sendPostNotification(String params,String urlParam,String token) { + HttpURLConnection connection = null; + InputStream is = null; + OutputStream os = null; + BufferedReader br = null; + String result = null; + try { + String oatoken = getToken(); + URL url = new URL(urlParam+ token+"?token="+oatoken); + log.info(urlParam+ token+"?token="+oatoken); + // 通过远程url连接对象打开连接 + connection = (HttpURLConnection) url.openConnection(); + // 设置连接请求方式 + connection.setRequestMethod("POST"); + // 设置连接主机服务器超时时间:15000毫秒 + connection.setConnectTimeout(15000); + // 设置读取主机服务器返回数据超时时间:60000毫秒 + connection.setReadTimeout(60000); + + // 默认值为:false,当向远程服务器传送数据/写数据时,需要设置为true + connection.setDoOutput(true); + // 默认值为:true,当前向远程服务读取数据时,设置为true,该参数可有可无 + connection.setDoInput(true); + // 设置传入参数的格式:请求参数应该是 name1=value1&name2=value2 的形式。 + connection.setRequestProperty("Content-Type", "application/json"); + // 通过连接对象获取一个输出流 + os = connection.getOutputStream(); + // 通过输出流对象将参数写出去/传输出去,它是通过字节数组写出的 + if (!("".equals(params) || params == null)) { + os.write(params.getBytes("UTF-8")); + } + log.info(connection.getResponseCode()); + // 连接对象获取一个输入流,向远程读取 + if (connection.getResponseCode() == 200) { + is = connection.getInputStream(); + // 对输入流对象进行包装:charset根据工作项目组的要求来设置 + br = new BufferedReader(new InputStreamReader(is, "UTF-8")); + StringBuffer sbf = new StringBuffer(); + String temp = null; + // 循环遍历一行一行读取数据 + while ((temp = br.readLine()) != null) { + sbf.append(temp); + sbf.append("\r\n"); + } + result = sbf.toString(); + log.info(result); + } + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + // 关闭资源 + if (null != br) { + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (null != os) { + try { + os.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (null != is) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + // 断开与远程地址url的连接 + connection.disconnect(); + } + return result; + + } +} diff --git a/src/com/seeyon/apps/fadadaSys/util/Test.java b/src/com/seeyon/apps/fadadaSys/util/Test.java new file mode 100644 index 0000000..d232ead --- /dev/null +++ b/src/com/seeyon/apps/fadadaSys/util/Test.java @@ -0,0 +1,37 @@ +package com.seeyon.apps.fadadaSys.util; + +public class Test { + public static void main(String[] args) { + String yijian = "【同意】 \n" + + " [销售部经理 @signet@覃雨罡_field0056_6360070844831452636@signet@ 2023-11-14 10:26]\n" + + "\n" + + "【同意】 \n" + + " [总部仓库产成品存货确认人 @signet@秦艳红_field0056_-7011415330265544753@signet@ 2023-11-14 16:28]\n" + + "\n" + + "【同意】 \n" + + " [销售总监 @signet@田文华_field0056_-433525586198575446@signet@ 2023-11-14 16:29]\n" + + "\n" + + "【同意】 \n" + + " [财务发货审核 @signet@黄爱玲_field0056_-8686036235190513982@signet@ 2023-11-14 16:42]\n" + + "\n" + + "【同意】 \n" + + " [总部销售内勤 @signet@郭春燕_field0056_-6626059147165152480@signet@ 2023-11-15 08:43]\n" + + "\n" + + "【同意】 \n" + + " [仓储物流部副总 @signet@张书民_field0056_5577526034151457946@signet@ 2023-11-15 10:35]\n" + + "\n" + + "【同意】 \n" + + " [总部仓库收发货人员 向维 2023-11-15 10:46]"; + String output = yijian.replaceAll("\\[([^@]+) @signet@([^_]+)_[^ ]+@signet@ ([0-9-]+ [0-9:]+)]", "[$1 $2 $3]"); + System.out.println(output); + String opinions = output.replaceAll("\\[", "[").replaceAll("\\]", "]
    "); + System.out.println(opinions); + } + + +} + + + + + diff --git a/src/com/seeyon/apps/src_region_serialnum/dao/IRegionSerialnumDao.java b/src/com/seeyon/apps/src_region_serialnum/dao/IRegionSerialnumDao.java new file mode 100644 index 0000000..7d9f6c8 --- /dev/null +++ b/src/com/seeyon/apps/src_region_serialnum/dao/IRegionSerialnumDao.java @@ -0,0 +1,12 @@ +package com.seeyon.apps.src_region_serialnum.dao; + +import java.util.List; + +public interface IRegionSerialnumDao { + + + public String findRegionSerialnum(String province, String city, String county); + + + public List findOldRegionSerialnum(String province, String city, String county); +} diff --git a/src/com/seeyon/apps/src_region_serialnum/dao/RegionSerialnumDaoImpl.java b/src/com/seeyon/apps/src_region_serialnum/dao/RegionSerialnumDaoImpl.java new file mode 100644 index 0000000..38e9831 --- /dev/null +++ b/src/com/seeyon/apps/src_region_serialnum/dao/RegionSerialnumDaoImpl.java @@ -0,0 +1,109 @@ +package com.seeyon.apps.src_region_serialnum.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.util.JDBCAgent; + +public class RegionSerialnumDaoImpl implements IRegionSerialnumDao{ + private static final Log log = LogFactory.getLog(RegionSerialnumDaoImpl.class); + String findRegionSerialnum = "select field0047 from formmain_0232 where field0048 = ? and field0049 = ? and field0051 is null"; + String findRegionSerialnum_changyang = "select field0047 from formmain_0232 where field0048 = ? and field0049 = ? and field0051 = ?"; + String findOldRegionSerialnum = "select field0105 from formmain_0084 where field0051 = ? and field0116 = ? and (field0118 != ? or field0118 is null)"; + String findOldRegionSerialnum_changyang = "select field0105 from formmain_0084 where field0051 = ? and field0116 = ? and field0118 = ?"; +// String findRegionSerialnum = "select field0047 from formmain_0056 where field0048 = ? and field0049 = ? and field0051 is null"; +// String findRegionSerialnum_changyang = "select field0047 from formmain_0056 where field0048 = ? and field0049 = ? and field0051 = ?"; +// String findOldRegionSerialnum = "select field0105 from formmain_0054 where field0051 = ? and field0116 = ? and (field0118 != ? or field0118 is null)"; +// String findOldRegionSerialnum_changyang = "select field0105 from formmain_0054 where field0051 = ? and field0116 = ? and field0118 = ?"; + +// 获取辅助表的城市简称 + @Override + public String findRegionSerialnum(String province ,String city ,String county) { + JDBCAgent agent = new JDBCAgent(); + String code = ""; + try { + StringBuilder sql = new StringBuilder(); + List p = new ArrayList(); + if("".equals(county)) { + sql = new StringBuilder(findRegionSerialnum); + System.out.println(sql); + p.add(province); + p.add(city); + }else { + sql = new StringBuilder(findRegionSerialnum_changyang); + System.out.println(sql); + p.add(province); + p.add(city); + p.add(county); + } + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if(list.size()>0){ + code = list.get(0).get("field0047").toString(); + } + } catch (BusinessException e) { + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return code; + } + +// 获取流程表中存在的历史数据 + @Override + public List findOldRegionSerialnum(String province, String city,String county) { + JDBCAgent agent = new JDBCAgent(); + List oldRegionSerialnums = new ArrayList(); + try { + StringBuilder sql = new StringBuilder(); + List p = new ArrayList(); + if("".equals(county)) { + sql = new StringBuilder(findOldRegionSerialnum); +// List p = new ArrayList(); + p.add(province); + p.add(city); + p.add("5124216602659473207"); +// p.add("-6306299674391327467"); + }else { + sql = new StringBuilder(findOldRegionSerialnum_changyang); +// List p = new ArrayList(); + p.add(province); + p.add(city); + p.add(county); + } + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + for (Map map : list) { + if(map.get("field0105")!=null) { + oldRegionSerialnums.add(map.get("field0105").toString()); + } + } +// code = list.get(0).get("field0003").toString(); + } catch (BusinessException e) { + log.info(e); + e.printStackTrace(); + } catch (SQLException e) { + log.info(e); + e.printStackTrace(); + }finally { + if (agent != null) { + agent.close(); + } + } + return oldRegionSerialnums; + } + + +} diff --git a/src/com/seeyon/apps/src_region_serialnum/event/RegionSerialnumEvent.java b/src/com/seeyon/apps/src_region_serialnum/event/RegionSerialnumEvent.java new file mode 100644 index 0000000..37ae5e1 --- /dev/null +++ b/src/com/seeyon/apps/src_region_serialnum/event/RegionSerialnumEvent.java @@ -0,0 +1,114 @@ +package com.seeyon.apps.src_region_serialnum.event; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import com.seeyon.apps.src_region_serialnum.dao.IRegionSerialnumDao; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.ctp.common.constants.ApplicationCategoryEnum; +import com.seeyon.ctp.workflow.event.AbstractWorkflowEvent; +import com.seeyon.ctp.workflow.event.WorkflowEventData; +import com.seeyon.ctp.workflow.event.WorkflowEventResult; + +public class RegionSerialnumEvent extends AbstractWorkflowEvent{ + + private IRegionSerialnumDao regionSerialnumDao; + + + public void setRegionSerialnumDao(IRegionSerialnumDao regionSerialnumDao) { + this.regionSerialnumDao = regionSerialnumDao; + } + + @Override + public String getId() { + return "regionSerialnumEvent"; + } + + @Override + public String getLabel() { + return "销售合同地区流水号生成"; + } + + @Override + public ApplicationCategoryEnum getAppName() { + return ApplicationCategoryEnum.form; + } + + @Override + public WorkflowEventResult onBeforeStart(WorkflowEventData data) { + //获取流程表单中的数据 + Map businessData = data.getBusinessData(); + long summaryId = data.getSummaryId(); + WorkflowEventResult result = new WorkflowEventResult(); + try { +// 获取当前表单信息 + FormDataMasterBean master = (FormDataMasterBean) businessData.get("formDataBean"); +// 判断当前表单是否存在合同编号如果存在则不生成新的合同编码 + if(master.getFieldValue("field0105")!=null) { + return result; + } +// 获取表单控件行政省份、行政市信息 + String province = master.getFieldValue("field0051").toString(); + String city = master.getFieldValue("field0116").toString(); + String county = ""; + if(master.getFieldValue("field0118") != null ) { + county = master.getFieldValue("field0118").toString(); + } + String serialnum = ""; + List oldRegionSerialnums = new ArrayList(); +// 5124216602659473207 == 长阳 + if("5124216602659473207".equals(county)) { +// if("-6306299674391327467".equals(county)) { +// 查询辅助表获得地区简称信息 + serialnum = regionSerialnumDao.findRegionSerialnum(province,city,county); + if("".equals(serialnum)){ + result.setAlertMessage("此区域的销售合同内部编号未维护,请先添加对应添加销售合同内部编号辅助表信息。"); + return result; + } +// 获取历史已经发起的编号信息 + oldRegionSerialnums = regionSerialnumDao.findOldRegionSerialnum(province,city,county); + } else { +// 查询辅助表获得地区简称信息 + serialnum = regionSerialnumDao.findRegionSerialnum(province,city,""); +// 获取历史已经发起的编号信息 + oldRegionSerialnums = regionSerialnumDao.findOldRegionSerialnum(province,city,""); + } + Calendar calendar = Calendar.getInstance(); + int year = calendar.get(Calendar.YEAR); + List oldCodes = new ArrayList(); + for (String oldRegionSerialnum : oldRegionSerialnums) { +// 通过正则表达式匹配文字信息“康农销字(宜昌第20220001)号” + if(oldRegionSerialnum.matches("^[\\u4e00-\\u9fa5]{4}.*{1}[\\u4e00-\\u9fa5]{0,}[1-9]{1}[0-9]{7}.*{1}[\\u4e00-\\u9fa5]{1}$")){ +// 截取年份信息 + String oldYear = oldRegionSerialnum.substring(oldRegionSerialnum.indexOf(')')-8,oldRegionSerialnum.indexOf(')')-4); +// 截取流水号信息 + String oldCode = oldRegionSerialnum.substring(oldRegionSerialnum.indexOf(')')-4,oldRegionSerialnum.indexOf(')')); +// 保存同年份下的所有合同编号 + if(oldYear.equals(year+"")) { + oldCodes.add(oldCode); + } + } + } + int code = 0 ; +// 遍历匹配筛选出最大的编号 + for (String oldCodeString : oldCodes) { + int oldCode = Integer.parseInt(oldCodeString); + if(oldCode>code) { + code=oldCode; + } + } +// 根据最大的合同编码+1生成新的合同编码 + String num = new DecimalFormat("0000").format(code+1); +// 修改流程表单数据填入合同编码 + master.addFieldValue("field0105","康农销字("+serialnum+"第"+year+num+")号"); + } catch (Exception e) { + result.setAlertMessage(e.getMessage()); + } + return result; + } + +} diff --git a/src/com/seeyon/apps/updateErCode/ctrl/OpenUnflowFieldCtrl.java b/src/com/seeyon/apps/updateErCode/ctrl/OpenUnflowFieldCtrl.java new file mode 100644 index 0000000..1581667 --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/ctrl/OpenUnflowFieldCtrl.java @@ -0,0 +1,95 @@ +package com.seeyon.apps.updateErCode.ctrl; + +import com.seeyon.cap4.form.bean.ParamDefinition; +import com.seeyon.cap4.form.bean.fieldCtrl.FormFieldCustomCtrl; +import com.seeyon.cap4.form.util.Enums.ParamType; +import www.seeyon.com.utils.UUIDUtil; + +import java.util.List; + +/** + *
    + * 自定义控件:直接打开底表
    + * 
    + */ +public class OpenUnflowFieldCtrl extends FormFieldCustomCtrl { + + /** + * UUIDLong.longUUID() + * UUIDUtil.getUUIDString() + */ + @Override + public String getKey() { + return "32489273489134023"; + } + + public static void main(String[] args) { + System.out.println(UUIDUtil.getUUIDString()); + } + + @Override + public String getFieldLength() { + return "20"; + } + + /** + * 控件初始化接口,此接口在控件初始化的时候,会调用,主要用于定义控件所属插件id、在表单编辑器中的图标、表单编辑器中有哪些属性可以设置。 + * 使用举例:在接口中定义自定义控件在在表单编辑器中有哪些控件属性需要配置 + */ + @Override + public void init() { + this.setPluginId("openUnflowFieldCtrl"); + this.setIcon("cap-icon-e-invoice"); + // 自定义参数 + ParamDefinition templateIdParam = new ParamDefinition(); + templateIdParam.setParamType(ParamType.button); + addDefinition(templateIdParam); + } + + /** (non-Javadoc) + * @see FormFieldCustomCtrl#getPCInjectionInfo() + * PC端的资源文件路径 + */ + @Override + public String getPCInjectionInfo() { + return "{path:'apps_res/cap/customCtrlResources/openUnflowResources/',jsUri:'js/openUnflow.js',initMethod:'init',nameSpace:'field_" + this.getKey() + "'}"; + } + + /** (non-Javadoc) + * @see FormFieldCustomCtrl#getMBInjectionInfo() + * 移动端的资源地址 + */ + @Override + public String getMBInjectionInfo() { + return "{path:'http://newwidget.v5.cmp/v1.0.0/',weixinpath:'newwidget',jsUri:'js/newwidget.js',initMethod:'init',nameSpace:'field_" + this.getKey() + "'}"; + } + + @Override + public String getText() { + return "操作按钮"; + } + + @Override + public boolean canBathUpdate() { + return false; + } + + @Override + public List getListShowDefaultVal(Integer externalType) { + return null; + } + + /** + * 初始值生成接口 + */ + @Override + public String[] getDefaultVal(String defaultValue) { + return new String[0]; + } + + @Override + public boolean canInjectionWord() { + return false; + } + +} diff --git a/src/com/seeyon/apps/updateErCode/dao/NewErCodeDao.java b/src/com/seeyon/apps/updateErCode/dao/NewErCodeDao.java new file mode 100644 index 0000000..ce0f0de --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/dao/NewErCodeDao.java @@ -0,0 +1,71 @@ +package com.seeyon.apps.updateErCode.dao; + +import com.seeyon.ctp.util.JDBCAgent; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class NewErCodeDao { + //正式 formmain_0307 本地 formmain_0138 + private String getSummaryId = "SELECT * from formmain_0307 WHERE id = ?"; + + private String updateShiMingErcode = "UPDATE formmain_0307 SET field0004 = ?, field0025 = ?, field0026 = ? WHERE field0003 = ?"; + + /** + * 获取summaryId + * @param id + * @return + */ + public List> getSummaryId(String id) { + List> lists = new ArrayList>(); + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(getSummaryId); + List p = new ArrayList(); + p.add(id); + agent.execute(sql.toString(), p); + List list = agent.resultSetToList(); + if (list != null && list.size() > 0) { + for (int i = 0; i < list.size(); i++) { + Map map = list.get(i); + lists.add(map); + } + } + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return lists; + } + + /** + * 修改二维码 + * @param id + * @param fileId + * @return + */ + public int updateShiMingErcode(String id, String fileId, String createTime, String state) { + int execute = 0; + JDBCAgent agent = new JDBCAgent(); + try { + StringBuilder sql = new StringBuilder(updateShiMingErcode); + List p = new ArrayList(); + p.add(fileId); + p.add(createTime); + p.add(state); + p.add(id); + execute = agent.execute(sql.toString(), p); + } catch (Exception e) { + System.out.println(e); + } finally { + if (agent != null) { + agent.close(); + } + } + return execute; + } +} diff --git a/src/com/seeyon/apps/updateErCode/kit/A8FolderKit.java b/src/com/seeyon/apps/updateErCode/kit/A8FolderKit.java new file mode 100644 index 0000000..be5461f --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/kit/A8FolderKit.java @@ -0,0 +1,26 @@ +package com.seeyon.apps.updateErCode.kit; + +import com.seeyon.ctp.common.SystemEnvironment; + +/** + * Description + *
    获取A8产品下面的文件夹路径
    + * Copyright(c) Beijing Seeyon Software Co.,LTD + */ +public class A8FolderKit { + + private static String SH_PROP = ""; + + /** + * Description: + *
    获取到A8的安装应用目录  seeyon
    + * @return + */ + public static String getPropFile() { + if("".equals(SH_PROP)) { + SH_PROP = SystemEnvironment.getApplicationFolder() + "/WEB-INF/cfgHome/plugin/fadadaSys/fadada.properties"; + } + return SH_PROP; + } + +} diff --git a/src/com/seeyon/apps/updateErCode/kit/DateKit.java b/src/com/seeyon/apps/updateErCode/kit/DateKit.java new file mode 100644 index 0000000..4a2af29 --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/kit/DateKit.java @@ -0,0 +1,293 @@ +package com.seeyon.apps.updateErCode.kit; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 日期处理工具类 + * @Copyright Beijing Seeyon Software Co.,LTD + */ +public class DateKit { + + private static SimpleDateFormat simple = new SimpleDateFormat("yyyyMMdd"); + + private static SimpleDateFormat sixFormat = new SimpleDateFormat("yyMMdd"); + + private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + private static SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); + + private static SimpleDateFormat monthFormat = new SimpleDateFormat("yyyy-MM"); + + private static SimpleDateFormat weekDay = new SimpleDateFormat("MM-dd"); + + private static SimpleDateFormat hour = new SimpleDateFormat("HH:mm"); + + private static SimpleDateFormat detailDate = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + + + private static final String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五","星期六" }; + + public static int getYear(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + return cal.get(Calendar.YEAR); + } + + public static String getSixDate() { + return getSixDate(null); + } + + public static String getSixDate(Date date) { + if(null == date) { + return sixFormat.format(new Date()); + } + return sixFormat.format(date); + } + + /** + * 获取这个时间属于一年的第几周 + * @param date + * @return + */ + public static int getWeekNum(Date date) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + int week = cal.get(Calendar.WEEK_OF_YEAR); + // 如果是星期天,那么需要减1 + if("星期日".equals(DateKit.getDayWeekName(date))) { + week -= 1; + } + return week; + } + + /** + * Description: + * + *
    +     * 获取一周
    +     * 
    + * + * @param date + * @return + */ + public static void getWeekInterval(Map param) { + Calendar cal = Calendar.getInstance(); + // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 + int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天 + if(1 == dayWeek) { + cal.add(Calendar.DAY_OF_MONTH, -1); + } + // System.out.println("要计算日期为:" + sdf.format(cal.getTime())); // 输出要计算日期 + // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 + cal.setFirstDayOfWeek(Calendar.MONDAY); + // 获得当前日期是一个星期的第几天 + int day = cal.get(Calendar.DAY_OF_WEEK); + // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 + cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); + param.put("startDate", cal.getTime()); + // System.out.println("所在周星期一的日期:" + imptimeBegin); + cal.add(Calendar.DATE, 6); + param.put("endDate", cal.getTime()); + // System.out.println("所在周星期日的日期:" + imptimeEnd); + } + + /** + * Description: + * + *
    +     * 根据传入的日期,获取当前日期所在的一周时间段
    +     * 
    + * + * @param date + * @return + */ + public static void getWeekInterval(Map param, Date now) { + Calendar cal = Calendar.getInstance(); + cal.setTime(now); + // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 + int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天 + if(1 == dayWeek) { + cal.add(Calendar.DAY_OF_MONTH, -1); + } + // System.out.println("要计算日期为:" + sdf.format(cal.getTime())); // 输出要计算日期 + // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 + cal.setFirstDayOfWeek(Calendar.MONDAY); + // 获得当前日期是一个星期的第几天 + int day = cal.get(Calendar.DAY_OF_WEEK); + // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 + cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); + String time = DateKit.getDayDate(cal.getTime()) + " 00:00:00"; + try { + param.put("beginDate", DateKit.getdayDate(time)); + } catch(Exception e) { + // TODO + } + // System.out.println("所在周星期一的日期:" + imptimeBegin); + cal.add(Calendar.DATE, 6); + time = DateKit.getDayDate(cal.getTime()) + " 23:59:59"; + try { + param.put("endDate", DateKit.getdayDate(time)); + } catch(Exception e) { + // + } + // System.out.println("所在周星期日的日期:" + imptimeEnd); + } + + public static String getSimpleDate(Date date) { + if(date == null) { + return ""; + } + return simple.format(date); + } + + /** + * 给日志格式化使用 + * @param date + * @return + */ + public static String getDate4Cal(Date date) { + if(date == null) { + return ""; + } + return hour.format(date); + } + + public static String getDateString(Date date) { + if(date == null) { + return ""; + } + return sdf.format(date); + } + + public static String getDayDate(Date date) { + if(date == null) { + return ""; + } + return dayFormat.format(date); + } + + public static String getWeekDay(Date date) { + if(date == null) { + return ""; + } + return weekDay.format(date); + } + + /** + * Description: + * + *
    +     * 获取多少天以后的日期
    +     * 
    + * + * @param day + * @return + */ + public static Date getDayAfter(int day) { + Calendar cal = Calendar.getInstance(); + cal.add(Calendar.DATE, day); + return cal.getTime(); + } + // 获得某天的几天后 + public static Date getDayAfter(Date d, int day) { + Calendar cal = Calendar.getInstance(); + cal.setTime(d); + cal.add(Calendar.DATE, day); + return cal.getTime(); + } + + /** + * 获取一个月有多少天 + * @param year + * @param month + * @return + */ + public static int getDaysByYearMonth(int year, int month) { + Calendar a = Calendar.getInstance(); + a.set(Calendar.YEAR, year); + a.set(Calendar.MONTH, month); + a.set(Calendar.DATE, 1); + a.roll(Calendar.DATE, -1); + int maxDate = a.get(Calendar.DATE); + return maxDate; + } + + /** + * 获取今天是星期几 + * @param date + * @return + */ + public static String getDayWeekName(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1; + if(dayOfWeek < 0) + dayOfWeek = 0; + return dayNames[dayOfWeek]; + } + + /** + * 解析时间,先解析yyyy-MM-dd HH:mm:ss + * @param dateStr + * @return + * @throws ParseException + * @throws Exception + */ + public static Date getdayDate(String dateStr) throws Exception { + try { + return sdf.parse(dateStr); + } catch(Exception e) { + try { + return detailDate.parse(dateStr); + } catch(Exception e1) { + try { + return dayFormat.parse(dateStr); + } catch(Exception e2) { + try { + return simple.parse(dateStr); + } + catch(Exception e3) { + return monthFormat.parse(dateStr); + } + } + } + } + } + + /** + * 根据时间获取周区间字符串 + * @param now + * @return 第XX周:2018-08-27至2018-09-02 + */ + public static String getWeekNumAndDateZone(Date now) { + StringBuffer sb = new StringBuffer(); + sb.append("第"); + sb.append(getWeekNum(now)); + sb.append("周:"); + Map param = new HashMap(); + getWeekInterval(param, now); + Date beginDate = (Date)param.get("beginDate"); + Date endDate = (Date)param.get("endDate"); + sb.append(dayFormat.format(beginDate)); + sb.append("至"); + sb.append(dayFormat.format(endDate)); + return sb.toString(); + } + + /** + * 根据日期和时间获取一个返回该日期该时间的date + * @param d 日期 + * @param time 时间 HH:mm格式 + * @return d日期+time时间 + * @throws ParseException + */ + public static Date getDateFromTime(Date d, String time) throws ParseException { + String dateTime = dayFormat.format(d) + " " + time; + return detailDate.parse(dateTime); + } +} diff --git a/src/com/seeyon/apps/updateErCode/kit/PropKit.java b/src/com/seeyon/apps/updateErCode/kit/PropKit.java new file mode 100644 index 0000000..9c52ede --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/kit/PropKit.java @@ -0,0 +1,85 @@ +package com.seeyon.apps.updateErCode.kit; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 读取参数 + */ + +public class PropKit { + + private static long lastModify; + + private static ConcurrentHashMap props; + + public static final String PROFILE = "profile"; + + public static final String APPID = "appId"; + public static final String APPSECRET = "appSecret"; + public static final String SERVERURL = "serverUrl"; + public static final String OPENID = "openId"; + public static final String NOTIFICATION = "notification"; + public static final String OATOKEN = "oatoken"; + public static final String RESTNAME = "restname"; + public static final String RESTPASSWORD = "restpassword"; + + public static final String PROD_APPID = "prod.appId"; + public static final String PROD_APPSECRET = "prod.appSecret"; + public static final String PROD_SERVERURL = "prod.serverUrl"; + public static final String PROD_OPENID = "prod.openId"; + public static final String PROD_NOTIFICATION = "prod.notification"; + public static final String PROD_OATOKEN = "prod.oatoken"; + public static final String PROD_RESTNAME = "prod.restname"; + public static final String PROD_RESTPASSWORD = "prod.restpassword"; + + /** + * @return + * @throws IOException + * @throws FileNotFoundException + */ + public static String getProp(String key) throws FileNotFoundException, IOException { + File f = new File(A8FolderKit.getPropFile()); + if(null == props) { + props = new ConcurrentHashMap(); + } + if(f.lastModified() != lastModify) { + /** + * huangzhengguo + * 2022-10-18 + */ + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); +// Properties prop = PropertiesUtil.getFromFile((CtpLocalFile) f); + /** + * end + */ + String profile = prop.getProperty(PROFILE); + if("prod".equals(profile)) { + props.put(APPID, prop.getProperty(PROD_APPID)); + props.put(APPSECRET, prop.getProperty(PROD_APPSECRET)); + props.put(SERVERURL, prop.getProperty(PROD_SERVERURL)); + props.put(OPENID, prop.getProperty(PROD_OPENID)); + props.put(NOTIFICATION, prop.getProperty(PROD_NOTIFICATION)); + props.put(OATOKEN, prop.getProperty(PROD_OATOKEN)); + props.put(RESTNAME, prop.getProperty(PROD_RESTNAME)); + props.put(RESTPASSWORD, prop.getProperty(PROD_RESTPASSWORD)); + } else { + props.put(APPID, prop.getProperty(PROD_APPID)); + props.put(APPSECRET, prop.getProperty(PROD_APPSECRET)); + props.put(SERVERURL, prop.getProperty(PROD_SERVERURL)); + props.put(NOTIFICATION, prop.getProperty(PROD_NOTIFICATION)); + props.put(OPENID, prop.getProperty(PROD_OPENID)); + props.put(OATOKEN, prop.getProperty(PROD_OATOKEN)); + props.put(RESTNAME, prop.getProperty(PROD_RESTNAME)); + props.put(RESTPASSWORD, prop.getProperty(PROD_RESTPASSWORD)); + } + } + return props.get(key); + } + +} diff --git a/src/com/seeyon/apps/updateErCode/kit/StrKit.java b/src/com/seeyon/apps/updateErCode/kit/StrKit.java new file mode 100644 index 0000000..bc25ed6 --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/kit/StrKit.java @@ -0,0 +1,251 @@ +package com.seeyon.apps.updateErCode.kit; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +/** + * 字符处理工具类 + * @date 2018年5月23日上午9:05:01 + * @Copyright Beijing Seeyon Software Co.,LTD + */ +public class StrKit { + + public static String str(Object o) { + if(o == null) { + return null; + } + if(o instanceof Date) { + return DateKit.getDayDate((Date)o); + } + if(o instanceof Timestamp) { + return DateKit.getDayDate((Timestamp)o); + } + if(o instanceof String) { + return (String)o; + } + return o.toString(); + } + + public static String str(Object o, boolean null2Str) { + if(o == null && null2Str) { + return ""; + } + return str(o); + } + + public static float toFloat(Object o) { + if(o == null) { + return 0f; + } else if(o instanceof Float) { + return (Float)o; + } else if(o instanceof String) { + return Float.valueOf((String)o); + } else if(o instanceof BigDecimal) { + return ((BigDecimal)o).floatValue(); + } + return 0f; + } + + public static Long toLong(Object o) { + if(null == o) { + return 0L; + } else if(o instanceof Long) { + return (Long)o; + } else if(o instanceof String) { + if("".equals(o)) { + return 0L; + } + return Long.valueOf((String)o); + } else if(o instanceof BigDecimal) { + return ((BigDecimal)o).longValue(); + } + return 0L; + } + + /** + * 取int值,为空返回0 + * @param obj 对象 + * @return + */ + public static Integer toInteger(Object obj) { + if(obj == null) { + return 0; + } else if(obj instanceof Long){ + return ((Long)obj).intValue(); + } else if(obj instanceof BigDecimal) { + return ((BigDecimal)obj).intValue(); + }else if(obj instanceof String) { + String o = (String) obj; + if("".equals(o)) { + return 0; + } else { + try { + return Integer.valueOf((String) obj); + } catch(Exception e) { + return 0; + } + } + } else if(obj instanceof Integer) { + return (Integer) obj; + } + return 0; + } + + public static Date toDate(Object o) throws Exception { + if(null == o) { + return null; + } else if(o instanceof Date) { + return (Date)o; + } else if(o instanceof Timestamp) { + return ((Timestamp) o); + } else if(o instanceof String){ + return DateKit.getdayDate((String) o); + } + return null; + } + + public static List toList(Object o) { + if(o == null) { + return null; + } else if(o instanceof List) { + return (List) o; + } else { + return null; + } + } + + /** + * 判断对象是否为空 + * @param o + * @return + */ + public static boolean isNull(Object o) { + if(null == o) { + return true; + } + if(o instanceof String) { + return "".equals((String) o); + } + if(o instanceof Collection) { + // 集合数量为0 则为空 + return ((Collection) o).size() == 0; + } + return false; + } + + /** + * 删除最后一个字符 + * @param input + * @return + */ + public static String deleteLastChar(String input) { + if(isNull(input)) + return ""; + return input.substring(0, input.length() - 1); + + } + + /** + * 转换成 123,456,789的格式 + * @param inputString + * @param length + * @return + */ + public static String getListStr(String inputString, int length) { + if(isNull(inputString)) + return ""; + String str = ""; + List strList = getStrList(inputString, length); + for(String string : strList) { + str += string + ","; + } + return deleteLastChar(str); + } + + /** + * 把原始字符串分割成指定长度的字符串列表 + * + * @param inputString + * 原始字符串 + * @param length + * 指定长度 + * @return + */ + public static List getStrList(String inputString, int length) { + int size = inputString.length() / length; + if (inputString.length() % length != 0) { + size += 1; + } + return getStrList(inputString, length, size); + } + + /** + * 把原始字符串分割成指定长度的字符串列表 + * + * @param inputString + * 原始字符串 + * @param length + * 指定长度 + * @param size + * 指定列表大小 + * @return + */ + private static List getStrList(String inputString, int length, + int size) { + List list = new ArrayList(); + for (int index = 0; index < size; index++) { + String childStr = substring(inputString, index * length, + (index + 1) * length); + list.add(childStr); + } + return list; + } + + /** + * 分割字符串,如果开始位置大于字符串长度,返回空 + * + * @param str + * 原始字符串 + * @param f + * 开始位置 + * @param t + * 结束位置 + * @return + */ + private static String substring(String str, int f, int t) { + if (f > str.length()) + return null; + if (t > str.length()) { + return str.substring(f, str.length()); + } else { + return str.substring(f, t); + } + } + + public static String getFixedLengthStr(String str, int length) { + // 如果为空,返回全部都是0 + if(length < 1) { + return ""; + } + if(isNull(str)) { + return getZeor(length); + } + if(str.length() < length) { + return getZeor(length - str.length()) + str; + } + return str.substring(0, length); + } + + private static String getZeor(int length) { + String str = ""; + for(int i = 0; i < length; i++) { + str += "0"; + } + return str; + } + +} diff --git a/src/com/seeyon/apps/updateErCode/kit/from/CAP4FormKit.java b/src/com/seeyon/apps/updateErCode/kit/from/CAP4FormKit.java new file mode 100644 index 0000000..634eae7 --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/kit/from/CAP4FormKit.java @@ -0,0 +1,204 @@ +package com.seeyon.apps.updateErCode.kit.from; + +import java.util.List; +import java.util.Map; + +import com.seeyon.apps.updateErCode.kit.StrKit; +import org.apache.commons.logging.Log; + +import com.seeyon.cap4.form.bean.FormBean; +import com.seeyon.cap4.form.bean.FormDataBean; +import com.seeyon.cap4.form.bean.FormDataMasterBean; +import com.seeyon.cap4.form.bean.FormDataSubBean; +import com.seeyon.cap4.form.bean.FormFieldBean; +import com.seeyon.cap4.form.bean.FormTableBean; +import com.seeyon.cap4.form.service.CAP4FormManager; +import com.seeyon.ctp.common.exceptions.BusinessException; +import com.seeyon.ctp.common.log.CtpLogFactory; + + +/** + * Description + *
    
    + * @author FanGaowei
    + * Date 2018年1月23日 上午11:22:28
    + * Copyright(c) Beijing Seeyon Software Co.,LTD + */ +public class CAP4FormKit { + + private static final Log LOGGER = CtpLogFactory.getLog(CAP4FormKit.class); + + public static FormBean getFormBean(CAP4FormManager cap4FormManager, String code) { + FormBean formBean = null; + try { + formBean = cap4FormManager.getFormByFormCode(code); + } catch(BusinessException e) { + LOGGER.error("获取表单发生异常,编号:" + code, e); + } + return formBean; + } + + /** + * 根据表单的显示名称获取字段的值 + * @param bean + * @param disPlay + * @return + */ + public static Object getFieldValue(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + LOGGER.info("字段不存在:" + disPlay); + return null; + } + return bean.getFieldValue(field.getName()); + } + + + public static int getIntValue(FormDataBean bean, String disPlay) { + Object value = getFieldValue(bean, disPlay); + return StrKit.toInteger(value); + } + + public static String getFieldStrValue(FormDataBean bean, String disPlay) { + Object value = getFieldValue(bean, disPlay); + return StrKit.str(value, true); + } + + public static Object getFieldValueByName(FormDataBean bean, String fieldName) { + return bean.getFieldValue(fieldName); + } + + /** + * 根据表单的显示名称获取字段是 field000? + * @param bean + * @param disPlay + * @return + */ + public static String getFieldTaleId(FormBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getMasterTableBean(); + return getFieldTaleId(table, disPlay); + } + + /** + * 直接根据table来获取 + * @param table + * @param disPlay + * @return + */ + public static String getFieldTaleId(FormTableBean table, String disPlay) { + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + LOGGER.info("字段不存在:" + disPlay); + return null; + } + return field.getName(); + } + + public static String getFieldTaleId(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(field == null) { + return null; + } + return field.getName(); + } + + public static FormFieldBean getFieldBean(FormDataBean bean, String disPlay) { + if(bean == null) { + return null; + } + FormTableBean table = bean.getFormTable(); + if(table == null) { + return null; + } + FormFieldBean field = table.getFieldBeanByDisplay(disPlay); + if(null == field) { + LOGGER.info("字段不存在:" + disPlay); + } + return field; + } + + + /** + * Description: + *
    
    +	 * @param bean 这里的bean必须是getMasterBean() 方法获取到的bean
    +	 * @param disPlay 
    +	 * @param value
    +	 */
    +	public static void setCellValue(FormDataBean bean, String disPlay, Object value) {
    +		FormFieldBean cell = CAP4FormKit.getFieldBean(bean, disPlay);
    +		if(cell != null) {
    +			bean.addFieldValue(cell.getName(), value);
    +		}
    +	}
    +	
    +	public static void setCellValue(FormDataSubBean bean, String disPlay, Object value) {
    +        FormFieldBean cell = CAP4FormKit.getFieldBean(bean, disPlay);
    +        if(cell != null) {
    +            bean.addFieldValue(cell.getName(), value);
    +        }
    +    }
    +	
    +	/**
    +	 * Description:
    +	 * 
    只适用于只有一个子表的表单
    + * @return + * @throws Exception + */ + public static List getSubBeans(FormDataMasterBean master) { + Map> subs = master.getSubTables(); + if(null == subs) { + return null; + } + for(String key : subs.keySet()) { + return subs.get(key); + } + return null; + } + + public static List getSubBeans(FormDataMasterBean master, String display) { + Map> subs = master.getSubTables(); + if(null == subs) { + return null; + } + for(String key : subs.keySet()) { + FormDataSubBean data = subs.get(key).get(0); + if(display.equals(data.getFormTable().getDisplay())) { + return subs.get(key); + } + } + LOGGER.info("表单不存在:" + display); + return null; + } + + /** + * Description: + *
    获取从表字段
    + * @param sub + * @param disPlay + * @return + */ + public static Object getSubFieldValue(FormDataSubBean sub, String disPlay) { + return getFieldValue(sub, disPlay); + } +} diff --git a/src/com/seeyon/apps/updateErCode/server/NewErCodeService.java b/src/com/seeyon/apps/updateErCode/server/NewErCodeService.java new file mode 100644 index 0000000..4266b6d --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/server/NewErCodeService.java @@ -0,0 +1,153 @@ +package com.seeyon.apps.updateErCode.server; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.seeyon.apps.updateErCode.dao.NewErCodeDao; +import com.seeyon.apps.updateErCode.util.FadadaUtuil; +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.SystemEnvironment; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManagerImpl; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import www.seeyon.com.utils.UUIDUtil; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; + +public class NewErCodeService { + + private AttachmentManager attachmentManager; + + public AttachmentManager getAttachmentManager() { + if(this.attachmentManager==null) { + this.attachmentManager = ((AttachmentManager) AppContext.getBean("attachmentManager")); + } + return attachmentManager; + } + public void setAttachmentManager(AttachmentManager attachmentManager) { + this.attachmentManager = attachmentManager; + } + + public boolean updateErCode(Map paramMap) throws Exception { + NewErCodeDao newErCodeDao = new NewErCodeDao(); + Object id = paramMap.get("id"); + //获取summaryId + List> list = newErCodeDao.getSummaryId(id.toString()); + Map map = list.get(0); + Object clientUserId = map.get("field0003"); + Object summaryId = map.get("field0023"); + Object userName = map.get("field0001"); + + FadadaUtuil fadadaUtuil = new FadadaUtuil(); + //获取授权链接 + String userAuthUrl = fadadaUtuil.getUserAuthUrl(clientUserId.toString(), userName.toString()); + //获取二维码 + String qrCode = getQRCode(userAuthUrl); + //上传二维码附件 + String upload = fileUpload(qrCode, summaryId.toString()); + //二维码生成时间 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date(); + String createTime = sdf.format(date); + //修改二维码 + newErCodeDao.updateShiMingErcode(clientUserId.toString(), upload, createTime, "正常"); + return true; + } + + /** + * 将签署链接生成二维码 + * @param qrCodeData + */ + public String getQRCode(String qrCodeData) { + //时间戳 + long timestamp = System.currentTimeMillis(); + String qrcName = Long.toString(timestamp); + String str = SystemEnvironment.getApplicationFolder(); + String filePath = str + "/erweima/"+qrcName+".png"; // 生成的二维码图像保存的文件路径 + int width = 300; // 二维码图像的宽度 + int height = 300; // 二维码图像的高度 + String fileType = "png"; // 生成的二维码图像的格式 + + try { + BitMatrix bitMatrix = new MultiFormatWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height); + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); + } + } + File qrCodeFile = new File(filePath); + ImageIO.write(image, fileType, qrCodeFile); + System.out.println("二维码已成功生成并保存到:" + filePath); + //getAttachmentManager().create() + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + return filePath; + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + System.out.println("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// List> lists = dataDao.findAttachAll(id); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + System.out.println("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); + System.out.println(s); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "image/png"); + } + map.put("size", f.length()+""); +// System.out.println(beanId); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + System.out.println("文件"+map); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + //AttachmentManager attachmentManager = new AttachmentManagerImpl(); + String str = getAttachmentManager().create(attachments,-640715758252702743L,670869647114347L); + System.out.println(str); + return l+""; + } +} diff --git a/src/com/seeyon/apps/updateErCode/servlet/NewErCodeServlet.java b/src/com/seeyon/apps/updateErCode/servlet/NewErCodeServlet.java new file mode 100644 index 0000000..a1081bc --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/servlet/NewErCodeServlet.java @@ -0,0 +1,62 @@ +package com.seeyon.apps.updateErCode.servlet; + +import com.seeyon.apps.updateErCode.server.NewErCodeService; +import org.springframework.beans.factory.annotation.Autowired; + +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +public class NewErCodeServlet extends HttpServlet { + + @Override + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException{ + System.out.println("11111"); + ServletOutputStream servletout = response.getOutputStream(); + InputStream servletin = request.getInputStream(); + byte[] bytes = new byte[request.getContentLength()]; + servletin.read(bytes); + String str = new String(bytes, "utf-8"); + String[] strs = str.split("&"); +// 将String转换成json + Map paramMap = new HashMap(); + for(int i = 0 ; i < strs.length ; i++) { + String[] param = strs[i].split("="); + if(param.length != 1 ) { + paramMap.put(param[0], param[1]); + } + } + try { + System.out.println("参数:" + paramMap); + NewErCodeService newErCodeService = new NewErCodeService(); + newErCodeService.updateErCode(paramMap); + } catch (Exception e) { + e.printStackTrace(); + } + + + } + + + @Override + public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ + doGet(request,response); + } + + + @Override + public void init() throws ServletException { } + + @Override + public void destroy() { + super.destroy(); + } + + +} diff --git a/src/com/seeyon/apps/updateErCode/util/FadadaUtuil.java b/src/com/seeyon/apps/updateErCode/util/FadadaUtuil.java new file mode 100644 index 0000000..bed061f --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/util/FadadaUtuil.java @@ -0,0 +1,761 @@ +package com.seeyon.apps.updateErCode.util; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.fasc.open.api.bean.common.*; +import com.fasc.open.api.v5_1.client.*; +import com.fasc.open.api.v5_1.req.seal.GetPersonalSealFreeSignUrlReq; +import com.fasc.open.api.v5_1.req.seal.GetPersonalSealListReq; +import com.fasc.open.api.v5_1.req.signtask.*; +import com.fasc.open.api.v5_1.req.user.*; +import com.fasc.open.api.v5_1.res.common.EUrlRes; +import com.fasc.open.api.v5_1.res.seal.GetPersonalSealListRes; +import com.fasc.open.api.v5_1.res.seal.GetSealFreeSignUrlRes; +import com.fasc.open.api.v5_1.res.seal.PersonalSealInfo; +import com.fasc.open.api.v5_1.res.signtask.*; +import com.fasc.open.api.v5_1.res.user.UserIdentityInfoRes; +import com.fasc.open.api.v5_1.res.user.UserRes; +import com.seeyon.apps.updateErCode.kit.PropKit; +import com.fasc.open.api.bean.base.BaseRes; +import com.fasc.open.api.config.HttpConfig; +import com.fasc.open.api.exception.ApiException; +import com.fasc.open.api.stratey.DefaultJsonStrategy; +import com.fasc.open.api.utils.ResultUtil; +import com.fasc.open.api.v5_1.req.doc.FddFileUrl; +import com.fasc.open.api.v5_1.req.doc.FileProcessReq; +import com.fasc.open.api.v5_1.req.doc.GetUploadUrlReq; +import com.fasc.open.api.v5_1.res.doc.FileId; +import com.fasc.open.api.v5_1.res.doc.FileProcessRes; +import com.fasc.open.api.v5_1.res.doc.GetUploadUrlRes; +import com.fasc.open.api.v5_1.res.service.AccessTokenRes; + +public class FadadaUtuil { + + private OpenApiClient openApiClient; + private String accessToken; + + public FadadaUtuil() throws FileNotFoundException, IOException, ApiException { + this.openApiClient = FadadaUtuil.gatOpenApiClient(); + this.accessToken = FadadaUtuil.getAccessToken(); + } + + // 获取初始化参数 + private static OpenApiClient gatOpenApiClient() throws FileNotFoundException, IOException { + //法大大分配的appId + String appId = PropKit.getProp(PropKit.APPID); + //法大大分配的appId对应的秘钥 + String appSecret = PropKit.getProp(PropKit.APPSECRET); + //API请求地址 + String serverUrl = PropKit.getProp(PropKit.SERVERURL); + // 初始化客户端 + OpenApiClient openApiClient = new OpenApiClient(appId, appSecret, serverUrl); + // http超时配置设置, 默认不设置超时时间 + // 如果不设置超时时间 该设置可忽略 + HttpConfig httpConfig = new HttpConfig(); + httpConfig.setConnectTimeout(1000000); + httpConfig.setReadTimeout(1000000); + openApiClient.setHttpConfig(httpConfig); + // Json序列化策率,默认使用Jackson,如果要使用其他如FastJson,Gson等实现JsonStrategy接口即可 + // 如果使用默认该设置可以忽略 + openApiClient.setJsonStrategy(new DefaultJsonStrategy()); + return openApiClient; + } + + // 获取token + public static String getAccessToken() throws ApiException, FileNotFoundException, IOException { + ServiceClient serviceClient = new ServiceClient(gatOpenApiClient()); + BaseRes res = serviceClient.getAccessToken(); + ResultUtil.printLog(res, gatOpenApiClient().getJsonStrategy()); + return res.getData().getAccessToken(); + } + + + // 上传本地文件到法大大环境中,成功则返回法大大的文件地址 + public String getUploadUrl(String fileUrl) throws ApiException, IOException { +// 获取文件上传地址 + DocClient docClient = new DocClient(openApiClient); + GetUploadUrlReq getUploadUrlReq = new GetUploadUrlReq(); +// 设置token + getUploadUrlReq.setAccessToken(accessToken); +// 设置文件上传类型 + getUploadUrlReq.setFileType("doc"); +// 调用接口获取本地文件上传链接和FddFileUrl + BaseRes getUploadUrlRes = docClient.getUploadFileUrl(getUploadUrlReq); + String fddFileUrl = null, uploadUrlString = ""; + + if ("100000".equals(getUploadUrlRes.getCode())) { + GetUploadUrlRes uploadUrlRes = getUploadUrlRes.getData(); + fddFileUrl = uploadUrlRes.getFddFileUrl(); + uploadUrlString = uploadUrlRes.getUploadUrl(); + } else { + System.out.println("获取地址失败:" + getUploadUrlRes.getMsg()); + return ""; + } + //根据uploadUrl上传用于签署的本地文档 + final File localFile = new File(fileUrl); + URL uploadUrl = new URL(uploadUrlString); + HttpURLConnection connection = (HttpURLConnection) uploadUrl.openConnection(); + connection.setRequestMethod("PUT"); + connection.setDoOutput(true); + BufferedOutputStream bos = new BufferedOutputStream(connection.getOutputStream()); + BufferedInputStream bis = new BufferedInputStream(new FileInputStream(localFile)); + int readByte = -1; + while ((readByte = bis.read()) != -1) { + bos.write(readByte); + } + bis.close(); + bos.close(); + int responseCode = connection.getResponseCode(); + String ret = ""; + if (responseCode == 200) { + ret = fddFileUrl; + } else { + ret = ""; + } + return ret; + } + + + // 文件处理,将上传的文件调用文件处理接口,获取FileId + public String fileProcess(String fddFileUrlString, String fileName) throws ApiException { +// 文件处理 + DocClient docClient = new DocClient(openApiClient); + FileProcessReq fileProcessReq = new FileProcessReq(); + fileProcessReq.setAccessToken(accessToken); + List fddFileUrls = new ArrayList(); + FddFileUrl fddFileUrl = new FddFileUrl(); + fddFileUrl.setFddFileUrl(fddFileUrlString); + fddFileUrl.setFileName(fileName); + fddFileUrl.setFileType("doc"); + fddFileUrls.add(fddFileUrl); + fileProcessReq.setFddFileUrlList(fddFileUrls); + BaseRes fileProcessResBase = docClient.process(fileProcessReq); + System.out.println(fileProcessResBase.getCode()); + System.out.println(fileProcessResBase.getMsg()); + if ("100000".equals(fileProcessResBase.getCode())) { + FileProcessRes fileProcessRes = fileProcessResBase.getData(); + List fileIds = fileProcessRes.getFileIdList(); + FileId fileId = fileIds.get(0); + String fileIdString = fileId.getFileId(); + return fileIdString; + } else { + System.out.println(fileProcessResBase.getMsg()); + return ""; + } + } + + + + + /** + * @param map map中需要提供 + * subject签署文件名称 + * docId当前表单中文档的唯一表述 + * docName文件名称 + * docFileId上传附件的ID + * name签署人姓名要与userNo信息一致 + * userNo签署人身份证号要与name信息一致 + * mobile签署人手机号 + * @return + * @throws FileNotFoundException + * @throws IOException + * @throws ApiException + */ + public String create(Map map, int size) throws FileNotFoundException, IOException, ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + CreateSignTaskReq createSignTaskReq = new CreateSignTaskReq(); + //设置场景码 +// BusinessSceneInfo businessScene = new BusinessSceneInfo(); +// businessScene.setBusinessId("ba58d070c84349e39281c1735408a243"); +// createSignTaskReq.setBusinessScene(businessScene); + OpenId openId = new OpenId(); +// 设置签署方信息 corp企业 person个人 + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + //openId.setOpenId("91592b4f6b444f47a4a62467633ecfe6"); + createSignTaskReq.setInitiator(openId); + +// 设置签署标题 + createSignTaskReq.setSignTaskSubject(map.get("subject"));//"原始文件发起V5.1签署任务" + //createSignTaskReq.setSignDocType("document"); +// 是否自动提交 + createSignTaskReq.setAutoStart(true); + createSignTaskReq.setAutoFinish(true); + createSignTaskReq.setAutoFillFinalize(true); + createSignTaskReq.setSignInOrder(true); + createSignTaskReq.setSignDocType("document"); +// 设置签署文件 + List addDocInfos = new ArrayList(); + AddDocInfo addDocInfo = new AddDocInfo(); + addDocInfo.setDocId(map.get("docId"));//"docId1" + addDocInfo.setDocName(map.get("docName"));//"测试.xlsx" + addDocInfo.setDocFileId(map.get("docFileId")); +// 设置输入控件值 + String subNum = map.get("subNum"); + List fields = new ArrayList(); + Field field = new Field(); + field.setFieldId("999"); + field.setFieldName("控件" + 999); + field.setFieldKey("标识" + 999); + + FieldPosition fieldPosition = new FieldPosition(); + fieldPosition.setPositionMode("pixel"); + fieldPosition.setPositionPageNo(1); + fieldPosition.setPositionX("520"); + int y = 663 + (31 * (size - 1)); + fieldPosition.setPositionY(y + ""); + fieldPosition.setPositionKeyword("number1"); + + field.setPosition(fieldPosition); + + field.setMoveable(false); + field.setFieldType("person_sign"); + + //控件2 + Field field2 = new Field(); + field2.setFieldId("888"); + field2.setFieldName("控件" + 888); + field2.setFieldKey("标识" + 888); + + FieldPosition fieldPosition2 = new FieldPosition(); + fieldPosition2.setPositionMode("pixel"); + fieldPosition2.setPositionPageNo(2); + fieldPosition2.setPositionX("520"); + int y2 = 345 + (29 * (size - 1)); + fieldPosition2.setPositionY(y2 + ""); + fieldPosition2.setPositionKeyword("number1"); + + field2.setPosition(fieldPosition2); + + field2.setMoveable(false); + field2.setFieldType("person_sign"); + + //时间控件 + Field field3 = new Field(); + field3.setFieldId("777"); + field3.setFieldName("控件" + 777); + field3.setFieldKey("标识" + 777); + + FieldPosition fieldPosition3 = new FieldPosition(); + fieldPosition3.setPositionMode("pixel"); + fieldPosition3.setPositionPageNo(2); + fieldPosition3.setPositionX("675"); + int y3 =345 + (29 * (size - 1)); + fieldPosition3.setPositionY(y3 + ""); + fieldPosition3.setPositionKeyword("number1"); + + field3.setPosition(fieldPosition3); + + field3.setMoveable(false); + field3.setFieldType("date_sign"); + + fields.add(field); + fields.add(field2); + fields.add(field3); + + addDocInfo.setDocFields(fields); + addDocInfos.add(addDocInfo); + createSignTaskReq.setDocs(addDocInfos); + List addActorsInfos = new ArrayList(); + AddActorsInfo addActorsInfo = new AddActorsInfo(); +// 设置签署方信息 + Actor actor = new Actor(); + actor.setActorId("参与方1"); + actor.setActorType("person"); + actor.setActorName("参与方1"); + List permissions = new ArrayList(); + // permissions.add("fill"); + permissions.add("sign"); + actor.setPermissions(permissions); + //actor.setActorOpenId("91592b4f6b444f47a4a62467633ecfe6"); + actor.setIdentNameForMatch(map.get("name")); + actor.setCertNoForMatch(map.get("userNo")); + Notification notification = new Notification(); + notification.setSendNotification(true); + notification.setNotifyWay("mobile"); + notification.setNotifyAddress(map.get("mobile")); + actor.setNotification(notification); + addActorsInfo.setActor(actor); + + //设置只使用密码签署 + AddSignConfigInfo addSignConfigInfo = new AddSignConfigInfo(); + List list = new ArrayList<>(); + list.add("pw"); + addSignConfigInfo.setVerifyMethods(list); + //签署方式设置为手绘 + addSignConfigInfo.setSignerSignMethod("hand_write"); + //签署顺序 + addSignConfigInfo.setOrderNo(1); + + addActorsInfo.setSignConfigInfo(addSignConfigInfo); + + + List addSignFieldInfos = new ArrayList(); + AddSignFieldInfo addSignFieldInfo = new AddSignFieldInfo(); + addSignFieldInfo.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo.setFieldId("999"); + + AddSignFieldInfo addSignFieldInfo2 = new AddSignFieldInfo(); + addSignFieldInfo2.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo2.setFieldId("888"); + + AddSignFieldInfo addSignFieldInfo3 = new AddSignFieldInfo(); + addSignFieldInfo3.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo3.setFieldId("777"); + + addSignFieldInfos.add(addSignFieldInfo); + addSignFieldInfos.add(addSignFieldInfo2); + addSignFieldInfos.add(addSignFieldInfo3); + addActorsInfo.setSignFields(addSignFieldInfos); + + //时间控件 +// List addFillFieldInfos = new ArrayList(); +// AddFillFieldInfo addFillFieldInfo = new AddFillFieldInfo(); +// addFillFieldInfo.setFieldDocId(map.get("docId"));//"docId1" +// addFillFieldInfo.setFieldId("777"); +// addFillFieldInfos.add(addFillFieldInfo); +// +// addActorsInfo.setFillFields(addFillFieldInfos); + + + addActorsInfos.add(addActorsInfo); + createSignTaskReq.setActors(addActorsInfos); + + createSignTaskReq.setAccessToken(accessToken); + BaseRes bs = signTaskClient.create(createSignTaskReq); + System.out.println(bs.getCode()); + System.out.println(bs.getMsg()); + CreateSignTaskRes createSignTaskRes = bs.getData(); + return createSignTaskRes.getSignTaskId(); + } + + /** + * @param map map中需要提供 + * subject签署文件名称 + * docId当前表单中文档的唯一表述 + * docName文件名称 + * docFileId上传附件的ID + * name签署人姓名要与userNo信息一致 + * userNo签署人身份证号要与name信息一致 + * mobile签署人手机号 + * @return + * @throws FileNotFoundException + * @throws IOException + * @throws ApiException + */ + public String createDiaoRu(Map map, int size) throws FileNotFoundException, IOException, ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + CreateSignTaskReq createSignTaskReq = new CreateSignTaskReq(); + //设置场景码 +// BusinessSceneInfo businessScene = new BusinessSceneInfo(); +// businessScene.setBusinessId("ba58d070c84349e39281c1735408a243"); +// createSignTaskReq.setBusinessScene(businessScene); + OpenId openId = new OpenId(); +// 设置签署方信息 corp企业 person个人 + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + //openId.setOpenId("91592b4f6b444f47a4a62467633ecfe6"); + createSignTaskReq.setInitiator(openId); + +// 设置签署标题 + createSignTaskReq.setSignTaskSubject(map.get("subject"));//"原始文件发起V5.1签署任务" + //createSignTaskReq.setSignDocType("document"); +// 是否自动提交 + createSignTaskReq.setAutoStart(true); + createSignTaskReq.setAutoFinish(true); + createSignTaskReq.setAutoFillFinalize(true); + createSignTaskReq.setSignInOrder(true); + createSignTaskReq.setSignDocType("document"); +// 设置签署文件 + List addDocInfos = new ArrayList(); + AddDocInfo addDocInfo = new AddDocInfo(); + addDocInfo.setDocId(map.get("docId"));//"docId1" + addDocInfo.setDocName(map.get("docName"));//"测试.xlsx" + addDocInfo.setDocFileId(map.get("docFileId")); +// 设置输入控件值 + String subNum = map.get("subNum"); + List fields = new ArrayList(); + Field field = new Field(); + field.setFieldId("999"); + field.setFieldName("控件" + 999); + field.setFieldKey("标识" + 999); + + FieldPosition fieldPosition = new FieldPosition(); + fieldPosition.setPositionMode("pixel"); + fieldPosition.setPositionPageNo(1); + fieldPosition.setPositionX("520"); + int y = 664 + (31 * (size - 1)); + fieldPosition.setPositionY(y + ""); + fieldPosition.setPositionKeyword("number1"); + + field.setPosition(fieldPosition); + + field.setMoveable(false); + field.setFieldType("person_sign"); + + //控件2 + Field field2 = new Field(); + field2.setFieldId("888"); + field2.setFieldName("控件" + 888); + field2.setFieldKey("标识" + 888); + + FieldPosition fieldPosition2 = new FieldPosition(); + fieldPosition2.setPositionMode("pixel"); + fieldPosition2.setPositionPageNo(2); + fieldPosition2.setPositionX("520"); + int y2 = 370 + (29 * (size - 1)); + fieldPosition2.setPositionY(y2 + ""); + fieldPosition2.setPositionKeyword("number1"); + + field2.setPosition(fieldPosition2); + + field2.setMoveable(false); + field2.setFieldType("person_sign"); + + //时间控件 + Field field3 = new Field(); + field3.setFieldId("777"); + field3.setFieldName("控件" + 777); + field3.setFieldKey("标识" + 777); + + FieldPosition fieldPosition3 = new FieldPosition(); + fieldPosition3.setPositionMode("pixel"); + fieldPosition3.setPositionPageNo(2); + fieldPosition3.setPositionX("675"); + int y3 =370 + (29 * (size - 1)); + fieldPosition3.setPositionY(y3 + ""); + fieldPosition3.setPositionKeyword("number1"); + + field3.setPosition(fieldPosition3); + + field3.setMoveable(false); + field3.setFieldType("date_sign"); + + fields.add(field); + fields.add(field2); + fields.add(field3); + + addDocInfo.setDocFields(fields); + addDocInfos.add(addDocInfo); + createSignTaskReq.setDocs(addDocInfos); + List addActorsInfos = new ArrayList(); + AddActorsInfo addActorsInfo = new AddActorsInfo(); +// 设置签署方信息 + Actor actor = new Actor(); + actor.setActorId("参与方1"); + actor.setActorType("person"); + actor.setActorName("参与方1"); + List permissions = new ArrayList(); + // permissions.add("fill"); + permissions.add("sign"); + actor.setPermissions(permissions); + //actor.setActorOpenId("91592b4f6b444f47a4a62467633ecfe6"); + actor.setIdentNameForMatch(map.get("name")); + actor.setCertNoForMatch(map.get("userNo")); + Notification notification = new Notification(); + notification.setSendNotification(true); + notification.setNotifyWay("mobile"); + notification.setNotifyAddress(map.get("mobile")); + actor.setNotification(notification); + addActorsInfo.setActor(actor); + + //设置只使用密码签署 + AddSignConfigInfo addSignConfigInfo = new AddSignConfigInfo(); + List list = new ArrayList<>(); + list.add("pw"); + addSignConfigInfo.setVerifyMethods(list); + //签署方式设置为手绘 + addSignConfigInfo.setSignerSignMethod("hand_write"); + //签署顺序 + addSignConfigInfo.setOrderNo(1); + + addActorsInfo.setSignConfigInfo(addSignConfigInfo); + + + List addSignFieldInfos = new ArrayList(); + AddSignFieldInfo addSignFieldInfo = new AddSignFieldInfo(); + addSignFieldInfo.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo.setFieldId("999"); + + AddSignFieldInfo addSignFieldInfo2 = new AddSignFieldInfo(); + addSignFieldInfo2.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo2.setFieldId("888"); + + AddSignFieldInfo addSignFieldInfo3 = new AddSignFieldInfo(); + addSignFieldInfo3.setFieldDocId(map.get("docId"));//"docId1" + addSignFieldInfo3.setFieldId("777"); + + addSignFieldInfos.add(addSignFieldInfo); + addSignFieldInfos.add(addSignFieldInfo2); + addSignFieldInfos.add(addSignFieldInfo3); + addActorsInfo.setSignFields(addSignFieldInfos); + + //时间控件 +// List addFillFieldInfos = new ArrayList(); +// AddFillFieldInfo addFillFieldInfo = new AddFillFieldInfo(); +// addFillFieldInfo.setFieldDocId(map.get("docId"));//"docId1" +// addFillFieldInfo.setFieldId("777"); +// addFillFieldInfos.add(addFillFieldInfo); +// +// addActorsInfo.setFillFields(addFillFieldInfos); + + + addActorsInfos.add(addActorsInfo); + createSignTaskReq.setActors(addActorsInfos); + + createSignTaskReq.setAccessToken(accessToken); + BaseRes bs = signTaskClient.create(createSignTaskReq); + System.out.println(bs.getCode()); + System.out.println(bs.getMsg()); + CreateSignTaskRes createSignTaskRes = bs.getData(); + return createSignTaskRes.getSignTaskId(); + } + + //获取法大大填写的控件值 + public List getFieldValue(String signTaskId) throws ApiException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + ListSignTaskFieldReq listSignTaskFieldReq = new ListSignTaskFieldReq(); + listSignTaskFieldReq.setAccessToken(accessToken); + listSignTaskFieldReq.setSignTaskId(signTaskId); + BaseRes listSignTaskFieldRes = signTaskClient.listSignTaskField(listSignTaskFieldReq); + List listSignTaskFillFields = null; + if ("100000".equals(listSignTaskFieldRes.getCode())) { + ListSignTaskFieldRes listSignTaskField = listSignTaskFieldRes.getData(); + listSignTaskFillFields = listSignTaskField.getFillFields(); + } + return listSignTaskFillFields; + } + + + //获取法大大签署之后的文件地址 + public String getOwnerDownloadUrl(String signTaskId) throws ApiException, FileNotFoundException, IOException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + GetOwnerDownloadUrlReq getOwnerDownloadUrlReq = new GetOwnerDownloadUrlReq(); + getOwnerDownloadUrlReq.setAccessToken(accessToken); + getOwnerDownloadUrlReq.setSignTaskId(signTaskId); + getOwnerDownloadUrlReq.setFileType("doc"); + OpenId openId = new OpenId(); + openId.setIdType("corp"); + openId.setOpenId(PropKit.getProp(PropKit.OPENID)); + getOwnerDownloadUrlReq.setOwnerId(openId); + BaseRes ownerDownloadUrlRes = signTaskClient.getOwnerDownloadUrl(getOwnerDownloadUrlReq); + String ret = ""; + System.out.println(ownerDownloadUrlRes.getCode()); + System.out.println(ownerDownloadUrlRes.getMsg()); + if ("100000".equals(ownerDownloadUrlRes.getCode())) { + OwnerDownloadUrlRes ownerDownloadUrl = ownerDownloadUrlRes.getData(); + ret = ownerDownloadUrl.getDownloadUrl(); + } + return ret; + } + + // 根据链接地址下载文件 + public void download(String urlStr, String fileName) throws IOException { + System.out.println("开始下载"); + URL url = new URL(urlStr); + URLConnection conn = url.openConnection(); + InputStream inputStream = conn.getInputStream(); + BufferedInputStream bis = new BufferedInputStream(inputStream); + FileOutputStream fos = new FileOutputStream(fileName); + byte[] buffer = new byte[1024]; + int count; + while ((count = bis.read(buffer)) != -1) { + fos.write(buffer, 0, count); + } + fos.close(); + bis.close(); + inputStream.close(); + } + + /** + * 获取签署链接 + * + * @param signTaskId + * @return + * @throws ApiException + * @throws FileNotFoundException + * @throws IOException + */ + public String getSignUrl(String signTaskId) throws ApiException, FileNotFoundException, IOException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + SignTaskActorGetUrlReq signTaskActorGetUrlReq = new SignTaskActorGetUrlReq(); + signTaskActorGetUrlReq.setAccessToken(accessToken); + signTaskActorGetUrlReq.setSignTaskId(signTaskId); + signTaskActorGetUrlReq.setActorId("参与方1"); + BaseRes url = signTaskClient.signTaskActorGetUrl(signTaskActorGetUrlReq); + String signUrl = null; + if ("100000".equals(url.getCode())) { + SignTaskActorGetUrlRes data = url.getData(); + signUrl = data.getActorSignTaskUrl(); + } + return signUrl; + } + + /** + * 设置免验证签链接 + * + * @return + * @throws ApiException + * @throws FileNotFoundException + * @throws IOException + */ + public String getFreeSign(String openUserId) throws ApiException, FileNotFoundException, IOException { + SealClient sealClient = new SealClient(openApiClient); + GetPersonalSealFreeSignUrlReq getPersonalSealFreeSignUrlReq = new GetPersonalSealFreeSignUrlReq(); + getPersonalSealFreeSignUrlReq.setAccessToken(accessToken); + //场景码 + getPersonalSealFreeSignUrlReq.setBusinessId("ba58d070c84349e39281c1735408a243"); + //个人签名列表 + //GetPersonalSealListReq + List ids = getPersonSealList(openUserId); + getPersonalSealFreeSignUrlReq.setSealIds(ids); + getPersonalSealFreeSignUrlReq.setOpenUserId(openUserId); + BaseRes url = sealClient.getPersonalSealFreeSignUrl(getPersonalSealFreeSignUrlReq); + String signUrl = null; + if ("100000".equals(url.getCode())) { + GetSealFreeSignUrlRes data = url.getData(); + signUrl = data.getFreeSignUrl(); + } + return signUrl; + } + + + /** + * 获取个人授权链接 + * + * @return + */ + public String getUserAuthUrl(String clientId, String userName) throws ApiException, FileNotFoundException, IOException { + UserClient userClient = new UserClient(openApiClient); + GetUserAuthUrlReq getUserAuthUrlReq = new GetUserAuthUrlReq(); + getUserAuthUrlReq.setAccessToken(accessToken); + getUserAuthUrlReq.setClientUserId(clientId); + + UserIdentInfoReq userIdentInfoReq = new UserIdentInfoReq(); + List list = new ArrayList<>(); + list.add("mobile"); + userIdentInfoReq.setIdentMethod(list); + userIdentInfoReq.setUserName(userName); + + List list1 = new ArrayList(); + list1.add("userName"); + //设置userName为不可编辑 + getUserAuthUrlReq.setNonEditableInfo(list1); + getUserAuthUrlReq.setUserIdentInfo(userIdentInfoReq); + final BaseRes url = userClient.getUserAuthUrl(getUserAuthUrlReq); + String authUrl = null; + if ("100000".equals(url.getCode())) { + EUrlRes data = url.getData(); + authUrl = data.getAuthUrl(); + } + return authUrl; + + } + + /** + * 获取个人签名列表 + * + * @return + */ + public List getPersonSealList(String openUserId) throws ApiException, FileNotFoundException, IOException { + SealClient sealClient = new SealClient(openApiClient); + GetPersonalSealListReq getPersonalSealListReq = new GetPersonalSealListReq(); + getPersonalSealListReq.setAccessToken(accessToken); + getPersonalSealListReq.setOpenUserId(openUserId); + final BaseRes personalSealList = sealClient.getPersonalSealList(getPersonalSealListReq); + List infos = null; + if ("100000".equals(personalSealList.getCode())) { + GetPersonalSealListRes data = personalSealList.getData(); + infos = data.getSealInfos(); + } + List ids = new ArrayList<>(); + for (int i = 0; i < infos.size(); i++) { + PersonalSealInfo personalSealInfo = infos.get(i); + ids.add(personalSealInfo.getSealId()); + } + return ids; + + } + + /** + * 解阻签署任务 + * + * @return + */ + public boolean signTaskUnblock(String signTaskId) throws ApiException, FileNotFoundException, IOException { + SignTaskClient signTaskClient = new SignTaskClient(openApiClient); + UnblockReq unblockReq = new UnblockReq(); + unblockReq.setAccessToken(accessToken); + unblockReq.setActorId("参与方1"); + unblockReq.setSignTaskId(signTaskId); + final BaseRes unblock = signTaskClient.unblock(unblockReq); + if ("100000".equals(unblock.getCode())) { + return true; + } + return false; + } + + /** + * 获取认证人员信息 + * + * @return + */ + public BaseRes getPeopleSgin(String openUserId) throws ApiException, FileNotFoundException, IOException { + UserClient userClient = new UserClient(openApiClient); + GetUserIdentityInfoReq getUserIdentityInfoReq = new GetUserIdentityInfoReq(); + getUserIdentityInfoReq.setAccessToken(accessToken); + getUserIdentityInfoReq.setOpenUserId(openUserId); + BaseRes identityInfo = userClient.getIdentityInfo(getUserIdentityInfoReq); + if ("100000".equals(identityInfo.getCode())) { + return identityInfo; + } + return null; + } + + /** + * 查询人员认证状态 + * + * @return + */ + public BaseRes getSgin(String openUserId) throws ApiException, FileNotFoundException, IOException { + UserClient userClient = new UserClient(openApiClient); + GetUserReq getUserReq = new GetUserReq(); + getUserReq.setAccessToken(accessToken); + getUserReq.setClientUserId(openUserId); + final BaseRes userResBaseRes = userClient.get(getUserReq); + if ("100000".equals(userResBaseRes.getCode())) { + return userResBaseRes; + } + return null; + } + + /** + * 解除个人授权 + * + * @return + */ + public BaseRes unbindUser(String openUserId) throws ApiException, FileNotFoundException, IOException { + UserClient userClient = new UserClient(openApiClient); + UserUnbindReq userUnbindReq = new UserUnbindReq(); + userUnbindReq.setAccessToken(accessToken); + userUnbindReq.setOpenUserId(openUserId); + BaseRes unbind = userClient.unbind(userUnbindReq); + if ("100000".equals(unbind.getCode())) { + return unbind; + } + return null; + } +} \ No newline at end of file diff --git a/src/com/seeyon/apps/updateErCode/util/FileUtil.java b/src/com/seeyon/apps/updateErCode/util/FileUtil.java new file mode 100644 index 0000000..884acaf --- /dev/null +++ b/src/com/seeyon/apps/updateErCode/util/FileUtil.java @@ -0,0 +1,80 @@ +package com.seeyon.apps.updateErCode.util; + +import com.seeyon.ctp.common.AppContext; +import com.seeyon.ctp.common.filemanager.manager.AttachmentManager; +import com.seeyon.ctp.common.po.filemanager.Attachment; +import com.seeyon.oainterface.impl.exportdata.FileUploadExporter; +import org.apache.commons.lang.StringUtils; +import www.seeyon.com.utils.UUIDUtil; + +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.*; + +public class FileUtil { + + AttachmentManager attachmentManager; + + public AttachmentManager getAttachmentManager() { + if(this.attachmentManager==null) { + this.attachmentManager = ((AttachmentManager) AppContext.getBean("attachmentManager")); + } + return attachmentManager; + } + + /** + * 上传附件 + * @param fileName + * @param summaryId + * @throws Exception + * @throws NumberFormatException + */ + public String fileUpload(String fileName,String summaryId) throws NumberFormatException, Exception { + System.out.println("进入附件"+fileName); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// List> lists = dataDao.findAttachAll(id); + FileUploadExporter fileUpload = new FileUploadExporter(); + List attachments = new ArrayList(); + File f = null; + if(StringUtils.isNotEmpty(fileName)) { + System.out.println("路径"+fileName); + f= new File(fileName); + if(!f.exists()) { + return ""; + } + if(f.length()>102400000) { + return ""; + } + } + String[] strs = new String[] {f.getAbsolutePath()}; + String s = fileUpload.processUpload(strs); + System.out.println(s); +// if(StringUtils.isNotEmpty(s)) { + Map map = new HashMap(); + String attachName = f.getName(); + String[] suffixNames = attachName.split("\\."); + map.put("type", "0"); + map.put("fileUrl", s); + if(suffixNames[suffixNames.length-1].equals("PDF")) { + map.put("mimeType", "application/pdf"); + }else { + map.put("mimeType", "application/pdf"); + } + map.put("size", f.length()+""); +// System.out.println(beanId); + long l = UUIDUtil.getUUIDLong(); + map.put("subReference", l+""); + map.put("category", "66"); + map.put("createdate", sdf.format(new Date())); + map.put("filename", f.getName()); + map.put("reference", summaryId); + System.out.println("文件"+map); + Attachment attachment = new Attachment(map); + attachments.add(attachment); +// } + String str = attachmentManager.create(attachments,-640715758252702743L,670869647114347L); + System.out.println(str); + return l+""; + + } +} diff --git a/src/contracTemplate.html b/src/contracTemplate.html new file mode 100644 index 0000000..f554cb8 --- /dev/null +++ b/src/contracTemplate.html @@ -0,0 +1,341 @@ + + + + + + + + +

    ##title##
    产品发货通知单

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    单据编号:##receiptNumber##

    基础信息

    发起部门:##department##发起人员:##person##发起日期:##startDate##
    合同名称:##contractName##专属业务员:##seller##
    客户名称:##clientName##收货人姓名:##consigneeName##
    收货地址:##consigneeAddress##收货人电话:##consigneePhone##
    发货说明:##shipmentsExplain##
    发货仓库:##shipmentsWarehouse##可用余额:##balance##本次发货后可用余额:##shipmentsLaterBalance##

    品种明细

    + + + + + + + + + + + + + + + + ##shipmentsDetails## + + + + + + + + + + + + +
    序号品种名称存货编码规格计量单位需求数量(公斤)需求数量(袋)提货单价金额备注
    合计##quantityTotal####quantityDaiTotal####moneyTotal##
    + + +
    + + + + +
    + 备注: + 1、请仔细核对产品名称、规格型号、数量、金额是否有误。
    + 2、本通知单经签字后将作为产品发货的唯一依据。 +
    + + +
    +
    +
    +
    +
    + + + + + +
    ##formattedDate1##
    + +
    +

    ##title##
    发货单

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     发货单号 *##shipmentsNo## 发货日期 *##shipmentsDate##业务类型*##businessType##
     销售类型 *##salesType##订单号发票号
     客户简称 *##masterName## 销售部门 *##shipmentsDept##客户级别名称##masterLev##
    客户编码##masterCode##发货地址 税率##taxrate##
    + + + + + + + + + + + + + + ##details## + + + + + + + + + + + + + + + + + + + + + + + + + + +
    序号*仓库名称*存货编码*存货名称规格型号主计量*数量件数
    合计##quantityTotal2####sum##
    审批意见: + ##opinions## +
     物流信息说明:##logisticsExplain##
     是否到货:已到货制单人:##creator##
    +
    + +
    + +
    + + +

    + 备注: + 1、请仔细核对产品名称、规格型号、数量、金额是否有误,无误敬请在进行签字确认。
    + 2、本签收单经收货单位签字后与对应的合同具有同等法律效力。
    + 3、如果贵方在签收处签字,我们将视为清单上所有货物贵方已完全确认品种数量并验收合格。
    +

    + + + +
    + + \ No newline at end of file diff --git a/src/contracTemplate2.html b/src/contracTemplate2.html new file mode 100644 index 0000000..5406635 --- /dev/null +++ b/src/contracTemplate2.html @@ -0,0 +1,321 @@ + + + + + + + + +

    ##title##
    产品调货申请单

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    单据编号:##receiptNumber##

    基础信息

    发起部门:

    ##department##

    发起人员:

    ##person##

    发起日期:

    ##startDate##

    调货说明:

    ##shipmentsExplain##

    调货明细

    调出合同名称:

    ##outContractName##

    调出客户联系人:

    ##outCustomMember##

    联系人手机号:

    ##outMemberPhone##

    调出客户名称:

    ##outCustomName##

    专属业务员:

    ##outSellerstr##

    调出-收货仓库:

    ##shipmentsWarehousestr##

    + + + + + + + + + + + + + ##shipmentsDetails## + +
    序号品种名称存货编码规格计量单位调货数量(公斤)调货数量(袋)调货备注
    + + + + + + + + + + + + + + + + + + + + +

    调入合同名称:

    ##callInContractName##

    调入客户联系人:

    ##calInCustomMember##

    联系人手机号:

    ##callMemberPhone##

    调入客户名称:

    ##calInCustomName##

    专属业务员:

    ##callInSellerstr##

    + + +
    + + + + +
    + 备注:
    + 1、请仔细核对产品名称、规格型号、数量、金额是否有误。
    + 2、本通知单经签字后将作为产品发货的唯一依据。 +
    + + +
    +
    +
    +
    +
    + + + + + +
    ##formattedDate1##
    + +
    +
    +
    +
    +
    +

    ##title##
    发货单

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     发货单号 *##shipmentsNo## 发货日期 *##shipmentsDate##业务类型*##businessType##
     销售类型 *##salesType##订单号发票号
     客户简称 *##masterName## 销售部门 *##shipmentsDept##客户级别名称##masterLev##
    客户编码##masterCode##发货地址 税率##taxrate##
    + + + + + + + + + + + + + ##details## + + + + + + + + + + + + + + + + + + + + + + +
    序号*仓库名称*存货编码*存货名称规格型号主计量*数量件数
    合计##quantityTotal2####sum##
    审批意见: + ##opinions## +
     是否到货:已到货制单人:##creator##
    +
    +
    + +
    + + +

    + 备注:
    + 1、请仔细核对产品名称、规格型号、数量、金额是否有误,无误敬请在进行签字确认。
    + 2、本签收单经收货单位签字后与对应的合同具有同等法律效力。
    + 3、如果贵方在签收处签字,我们将视为清单上所有货物贵方已完全确认品种数量并验收合格。
    +

    + + + +
    + + \ No newline at end of file