617bfc68 by 荆蔚杰

电子证照接口,实体,请求

1 parent f05f15bb
Showing 41 changed files with 3730 additions and 298 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/java/com/thinkgem/jeesite/modules/reg/service/qjxt/BdcZdxxService.java=UTF-8
encoding//src/main/java/com/thinkgem/jeesite/modules/reg/web/updata/CSCDJ3000402Controller.java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/main/resources/jeesite.properties=UTF-8
encoding//src/main/resources/server.json=UTF-8
encoding//src/main/resources/si_code.json=UTF-8
encoding//src/main/resources/stencilset.json=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ODM">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="ODM"/>
<property name="java-output-path" value="/ODM/src/main/webapp/WEB-INF/classes"/>
<property name="component.exclusion.patterns" value="static/bootstrap/2.3.1/docs/**,static/ckeditor/_samples/**,static/ckeditor/_source/**,static/ckfinder/_samples/**,static/ckfinder/help/**,static/compressor*/**,static/jquery-jbox/2.3/docs/**,static/jquery-jbox/2.3/Skins2/**,static/jquery-validation/1.11.0/demo/**,static/jquery-ztree/3.5.12/demo/**,static/My97DatePicker/docs/**,static/supcan/doc/**,static/SuperSlide/demo/**,static/treeTable/demo/**,test/**,WEB-INF/classes/org/apache/ibatis/**,WEB-INF/classes/org/mybatis/spring/**"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
disabled=06target
eclipse.preferences.version=1
......@@ -32,20 +32,20 @@ import com.thinkgem.jeesite.common.utils.StringUtils;
public class Global {
private static Boolean isycsl = false;
private static Boolean istitle = false ;
private static Boolean istest = false ;
protected static Logger logger = LoggerFactory.getLogger(Global.class);
/**
* 当前对象实例
*/
private static Global global = new Global();
/**
* 保存全局属性值
*/
private static Map<String, String> map = Maps.newHashMap();
/**
* 属性文件加载对象
*/
......@@ -62,13 +62,13 @@ public class Global {
*/
public static final String YES = "1";
public static final String NO = "0";
/**
* 对/错
*/
public static final String TRUE = "true";
public static final String FALSE = "false";
/**
* 上传文件基础虚拟路径
*/
......@@ -77,12 +77,12 @@ public class Global {
* 临时文件基础虚拟路径
*/
public static final String UP_DATA_URL = "/updatas/";
/**
* 上报文件本地校验路径
*/
public static final String SJHJ_XSD_URL = "/xsd/";
/**
* 上报生成报文路径
*/
......@@ -97,69 +97,69 @@ public class Global {
public static Global getInstance() {
return global;
}
/**
* 报文上报用户名
*/
public static final String UP_NAME = "610700";
/**
* 报文上报用户密码
*/
public static final String UP_PASSWORD = "yuiop90876";
/**
* 报文上报用户名
*/
public static final String UP_IPCONFIG = "172.16.56.28";
//public static final String UP_IPCONFIG = "172.0.0.1";
/**
* 一窗受理,登簿推送
*/
//public static final String POST_YCSL_URL_FZ = "http://172.16.56.31:8080/estateplat-acceptance/rest/v1.0/bdc/dbxx";
public static final String POST_YCSL_URL_FZ = getYcslUrl()+"/accept/registerInfo";
public static final String POST_YCSL_URL_XTTJ = getYcslUrl()+"/api/rest/bhSqxx";
public static final String POST_YCSL_URL_YWZT = getYcslUrl()+"/api/rest/updateYwzt";
public static final String POST_YCSL_URL_queryTradeWj = getYcslUrl()+"/accept/findTradeInfo";
public static final String POST_YCSL_URL_downTradeFiles = getYcslUrl()+"/accept/downFileByPath";
public static final String POST_YCSL_URL_insertSL = getYcslUrl()+"/accept/saveAcceptInfo";
public static final String POST_YCSL_URL_updateSL = getYcslUrl()+"/accept/modifyAcceptInfo";
public static final String POST_YCSL_URL_deleteSL = getYcslUrl()+"/accept/removeAcceptInfo";
public static final String POST_YCSL_URL_queryTradeYw = getYcslUrl()+"/accept/findTradeToEstate";
public static final String POST_YCSL_URL_queryTradeEstate = getYcslUrl()+"/accept/findEstateTrade";
public static final String POST_YCSL_URL_saveHookRelation = getYcslUrl()+"/accept/saveHookRelation";
public static final String POST_YCSL_URL_removeHookRelation = getYcslUrl()+"/accept/removeHookRelation";
public static final String POST_YCSL_URL_saveHouseStatus = getYcslUrl()+"/accept/saveHouseStatus";
public static final String POST_YCSL_URL_modifyHouseStatus = getYcslUrl()+"/accept/modifyHouseStatus";
public static final String POST_YCSL_URL_terminateInfo = getYcslUrl()+"/accept/terminateInfo";
public static final String POST_YCSL_URL_findLicenseInfo = getYcslUrl()+"/accept/findLicenseInfo";
public static final String POST_YCSL_URL_wsqk = getYcslUrl()+"/accept/wsqk";
public static final String POST_YCSL_URL_downDealFiles = getYcslUrl()+"/accept/downDealByPath";
/**
* 数据汇总,复核请求
*/
public static final String POST_SJHZ_URL_FH = "http://172.16.58.79:8000/platSi/fhDmlRec";
/**
* 获取配置
* @see ${fns:getConfig('adminPath')}
......@@ -172,10 +172,10 @@ public class Global {
}
return value;
}
/**
* 获取访问接口使用的用户名 密码
*
* 获取访问接口使用的用户名 密码
*
*/
public static String getInterUserName(){
return getConfig("reg.inter.username");
......@@ -183,17 +183,17 @@ public class Global {
public static String getInterPassword(){
return getConfig("reg.inter.password");
}
public static String getYcslUrl(){
return getConfig("reg.ycsl.url");
}
/***
* @Title: getAreaCode
* @Description: 获取当前系统部署的区县代码
* @param @return 设定文件
* @return String 返回类型
* @Title: getAreaCode
* @Description: 获取当前系统部署的区县代码
* @param @return 设定文件
* @return String 返回类型
* @throws
*/
public static String getAreaCode(){
......@@ -206,49 +206,49 @@ public class Global {
public static String getfhRowNum(){
return getConfig("dmlRec.fhRowNum");
}
public static String getPictures(){
return getConfig("reg.pictures");
}
/*
* 微信公众号路径
*/
public static String getWxUrl(){
return getConfig("reg.wxurl");
}
/*
* 權籍接口系統路径
*/
public static String getTitleUrl(){
return getConfig("reg.titleurl");
}
public static List<String> getIPList() {
List<String> res_list = Lists.newArrayList();
Enumeration<NetworkInterface> e1;
try {
e1 = NetworkInterface.getNetworkInterfaces();
while (e1.hasMoreElements()) {
NetworkInterface ni = e1.nextElement();
List<String> ips = Lists.newLinkedList();
Enumeration<InetAddress> e2 = ni.getInetAddresses();
while (e2.hasMoreElements()) {
InetAddress ia = e2.nextElement();
if(ia instanceof Inet6Address) {
continue; // omit IPv6 address
}
ips.add(ia.getHostAddress());
ips.add(ia.getHostAddress());
}
res_list.addAll(ips);
}
......@@ -263,25 +263,25 @@ public class Global {
*/
public static Boolean isYcsl(){
if(!isycsl) {
String ycsl = getConfig("reg.ycsl");
String[] list = StringUtils.isEmpty(ycsl) ? new String[]{}:ycsl.split(",");
String ycsl = getConfig("reg.ycsl");
String[] list = StringUtils.isEmpty(ycsl) ? new String[]{}:ycsl.split(",");
for(String ip : list) {
if(StringUtils.isEmpty(ip) ) {
continue;
}
if(getIPList().contains(ip)) {
if(getIPList().contains(ip)) {
isycsl = true;
break;
}
}
}
}
return isycsl;
return isycsl;
}
/**
* 权籍开通标志
* @return
......@@ -290,44 +290,44 @@ public class Global {
if(!istitle) {
String title = getConfig("reg.title");
String[] list = StringUtils.isEmpty(title) ? new String[]{}:title.split(",");
for(String ip : list) {
if(StringUtils.isEmpty(ip) ) {
continue;
}
if(getIPList().contains(ip)) {
if(getIPList().contains(ip)) {
istitle = true;
break;
}
}
}
return istitle;
return istitle;
}
return istitle;
}
/**
* 测试标志
* @return
*/
public static Boolean isTest(){
public static Boolean isTest(){
if(!istest) {
String title = getConfig("reg.test");
String[] list = StringUtils.isEmpty(title) ? new String[]{}:title.split(",");
for(String ip : list) {
if(StringUtils.isEmpty(ip) ) {
continue;
}
if(getIPList().contains(ip)) {
if(getIPList().contains(ip)) {
istest = true;
break;
}
}
}
}
}
return istest;
}
/**
* 业务号新生成方式
* @return
......@@ -335,7 +335,7 @@ public class Global {
public static Boolean isNewCreateType(){
return Boolean.parseBoolean(StringUtils.isEmpty(getConfig("reg.ywh.new"))?"false":getConfig("reg.ywh.new"));
}
/**
* 是否新区
* @return
......@@ -343,41 +343,41 @@ public class Global {
public static Boolean isXq(){
return Boolean.parseBoolean(StringUtils.isEmpty(getConfig("reg.xq"))?"false":getConfig("reg.xq"));
}
/**
* 获取管理端根路径
*/
public static String getAdminPath() {
return getConfig("adminPath");
}
/**
* 获取前端根路径
*/
public static String getFrontPath() {
return getConfig("frontPath");
}
/**
* 获取URL后缀
*/
public static String getUrlSuffix() {
return getConfig("urlSuffix");
}
public static String getDbName(){
return Global.getConfig("jdbc.type");
}
public static String getSumDataWSUrl(){
return Global.getConfig("webServiceUrl");
}
public static String getCommonLogUrl(){
return Global.getConfig("commitLogUrl");
}
/**
* 是否是演示模式,演示模式下不能修改用户、角色、密码、菜单、授权
*/
......@@ -385,7 +385,7 @@ public class Global {
String dm = getConfig("demoMode");
return "true".equals(dm) || "1".equals(dm);
}
/**
* 在修改系统用户和角色时是否同步到Activiti
*/
......@@ -393,7 +393,7 @@ public class Global {
String dm = getConfig("activiti.isSynActivitiIndetity");
return "true".equals(dm) || "1".equals(dm);
}
/**
* 页面获取常量
* @see ${fns:getConst('YES')}
......@@ -478,5 +478,68 @@ public class Global {
}
return projectPath;
}
/**
* 契约锁URL
*/
public static String ECI_HOST;
/**
* 契约锁appToken
*/
public static String ECI_APP_TOKEN;
/**
* 契约锁appSecret
*/
public static String ECI_APP_SECRET;
/**
* 契约锁不动产登记证明流程ID
*/
public static String ECI_BDCDJZMLC;
/**
* 契约锁不动产权证书流程ID
*/
public static String ECI_BDCQZSLC;
/**
* 不动产查询证明流程ID
*/
public static String ECI_BDCCXZMLC;
/**
* 证照专用章ID
*/
public static String ECI_ZZZYZ;
/**
* 档案查询专用章ID
*/
public static String ECI_DACXZYZ;
public static void setEciConfig() {
String flag = Global.getConfig("eci.flag");
if ("false".equals(flag)) {
ECI_HOST = Global.getConfig("eci.test.host");
ECI_APP_TOKEN = Global.getConfig("eci.test.AppToken");
ECI_APP_SECRET = Global.getConfig("eci.test.AppSecret");
ECI_BDCDJZMLC = Global.getConfig("eci.test.bdcdjzmlc");
ECI_BDCQZSLC = Global.getConfig("eci.test.bdcqzslc");
ECI_BDCCXZMLC = Global.getConfig("eci.test.bdccxzmlc");
ECI_ZZZYZ = Global.getConfig("eci.test.zzzyz");
ECI_DACXZYZ = Global.getConfig("eci.test.dacxzyz");
}else {
ECI_HOST = Global.getConfig("eci.prod.host");
ECI_APP_TOKEN = Global.getConfig("eci.prod.AppToken");
ECI_APP_SECRET = Global.getConfig("eci.prod.AppSecret");
ECI_BDCDJZMLC = Global.getConfig("eci.prod.bdcdjzmlc");
ECI_BDCQZSLC = Global.getConfig("eci.prod.bdcqzslc");
ECI_BDCCXZMLC = Global.getConfig("eci.prod.bdccxzmlc");
ECI_ZZZYZ = Global.getConfig("eci.prod.zzzyz");
ECI_DACXZYZ = Global.getConfig("eci.prod.dacxzyz");
}
}
}
......
package com.thinkgem.jeesite.modules.eci.dao;
import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
/**
* 获取需要创建合同contractId为空的集合
*
* @return
*/
List<ElecLicenseInfo> getContractIdIsNull();
/**
* 更新合同ID和状态
* @param waitForCreateContract
* @return
*/
Integer updateContractIdAndStatus(@Param("waitForCreateContract") ElecLicenseInfo waitForCreateContract);
/**
* 获取需要更新合同DOUCUMENT_ID为空的集合
*
* @return
*/
List<ElecLicenseInfo> getDocumentIdIsNull();
/**
* 更新合同文档ID
*
* @param bizId 主键
* @param documentId 文档ID
* @return
*/
Integer updateDocumentId(@Param("bizId") String bizId, @Param("documentId") Long documentId);
/**
* 获取合同文档ID已经入库并且还未下载集合
*
* @return
*/
List<ElecLicenseInfo> getWaitForDownload();
/**
* 更新OFD文件地址和下载状态
*
* @param bizId
* @param ofdPath
* @return
*/
Integer updateOfdWjdz(@Param("bizId") String bizId, @Param("ofdPath") String ofdPath);
/**
* 获取已经下载还未转换的集合
*
* @return
*/
List<ElecLicenseInfo> getWaitForConvert();
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 签署人
*/
public class ActionOperator {
private static final long serialVersionUID = 1L;
/**
* 否
* 签署人姓名
*/
private String operatorName;
/**
* 联系方式与员工编号不能同时为空
* 签署人联系方式
*/
private String operatorContact;
/**
* 联系方式与员工编号不能同时为空
* 签署人员工编号(用于企业签署方)
*/
private String operatorNumber;
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public String getOperatorContact() {
return operatorContact;
}
public void setOperatorContact(String operatorContact) {
this.operatorContact = operatorContact;
}
public String getOperatorNumber() {
return operatorNumber;
}
public void setOperatorNumber(String operatorNumber) {
this.operatorNumber = operatorNumber;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.util.List;
/**
* 签署动作
*/
public class ActionRequest {
private static final long serialVersionUID = 1L;
/**
* 是
* 签署动作类型:CORPORATE(企业签章),PERSONAL(个人签字),LP(法定代表人签字),AUDIT(审批)
*/
private String type;
/**
* 是
* 签署动作名称
*/
private String name;
/**
* 是
* 签署顺序(从1开始);如果想按顺序签署,则分别设置签署动作的serialNo为1,2,3;如果想无序签署,则设置签署动作的serialNo为1,1,1;设置签署动作顺序为1,2,2时,表示第一个先签署,后两个同时签署。
*/
private Integer serialNo;
/**
* 否
* 印章ID,指定企业签章所用印章
*/
private Long sealId;
/**
* 否
* 指定印章,格式:[123123123213,123213213213]
*/
private String sealIds;
/**
* 否
* 指定多个印章名称,印章不存在或存在多个抛出异常 格式:["印章一","印章二"]
*/
private String sealNames;
/**
* 否
* 指定印章的印章类型
*/
private String sealCategoryName;
/**
* 否
* 签章所属组织ID,发起方生效,默认为发起方关联的组织
*/
private Long sealOwner;
/**
* 否
* 是否自动签署
*/
private boolean autoSign;
/**
* 否
* 签署人(法定代表人签字无需填写该项)
*/
private List<ActionOperator> actionOperators;
/**
* 否
* 签署位置
*/
private List<SignatoryRect> locations;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getSerialNo() {
return serialNo;
}
public void setSerialNo(Integer serialNo) {
this.serialNo = serialNo;
}
public Long getSealId() {
return sealId;
}
public void setSealId(Long sealId) {
this.sealId = sealId;
}
public String getSealIds() {
return sealIds;
}
public void setSealIds(String sealIds) {
this.sealIds = sealIds;
}
public String getSealNames() {
return sealNames;
}
public void setSealNames(String sealNames) {
this.sealNames = sealNames;
}
public String getSealCategoryName() {
return sealCategoryName;
}
public void setSealCategoryName(String sealCategoryName) {
this.sealCategoryName = sealCategoryName;
}
public Long getSealOwner() {
return sealOwner;
}
public void setSealOwner(Long sealOwner) {
this.sealOwner = sealOwner;
}
public boolean isAutoSign() {
return autoSign;
}
public void setAutoSign(boolean autoSign) {
this.autoSign = autoSign;
}
public List<ActionOperator> getActionOperators() {
return actionOperators;
}
public void setActionOperators(List<ActionOperator> actionOperators) {
this.actionOperators = actionOperators;
}
public List<SignatoryRect> getLocations() {
return locations;
}
public void setLocations(List<SignatoryRect> locations) {
this.locations = locations;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 签署动作相应
*/
public class ActionResponse implements Serializable {
private static final long serialVersionUID = 6489919156899102962L;
/**
* 签署动作ID
*/
private Long id;
/**
* 动作类型: OPERATOR("经办人签字"),LP("法定代表人签字"),CORPORATE("企业签章"),PERSONAL("个人签字"),AUDIT("审批"),FILL("合同填参"),TERMINATE_CORPORATE("合同作废"),TERMINATE_PERSONAL("合同作废"),COUNTERSIGN("会签签章")
*/
private String type;
/**
* 名称
*/
private String name;
/**
* 状态:FILLING(填参中),FILLED(完成填参 ),WAITING(等待签署),SIGNING(签署中),SIGNED(完成),DISCARDED(废弃),REJECTED(拒绝),FINISHED(已完成,强制结束)
*/
private String status;
/**
* 创建时间
*/
private Date createTime;
/**
* 完成时间
*/
private Date completeTime;
/**
* 签署动作操作人
*/
private List<OperatorResponse> actionOperators;
/**
* 操作人类型:EMPLOYEE(员工),ROLE(角色),USER(用户),COMPANY(企业),LP_USER(法人)
*/
private String operatorType;
/**
* 操作人ID
*/
private Long operatorId;
/**
* 操作人名称
*/
private String operatorName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
public List<OperatorResponse> getActionOperators() {
return actionOperators;
}
public void setActionOperators(List<OperatorResponse> actionOperators) {
this.actionOperators = actionOperators;
}
public String getOperatorType() {
return operatorType;
}
public void setOperatorType(String operatorType) {
this.operatorType = operatorType;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
import java.util.List;
/**
* 合同详情
*/
public class Contract implements Serializable {
private static final long serialVersionUID = 8444369877748311005L;
/**
* 合同ID
*/
private Long id;
/**
* 合同的唯一标识,由调用方生成
*/
private String bizId;
/**
* 合同主题
*/
private String subject;
/**
* 合同编号
*/
private String sn;
/**
* 描述
*/
private String description;
/**
* 是否顺序签署
*/
private Boolean ordinal;
/**
* 合同状态:DRAFT(草稿),SIGNING(签署中),COMPLETE(已完成),REJECTED(已退回),RECALLED(已撤回),EXPIRED(已过期),FILLING(拟定中),TERMINATING(作废确认中),TERMINATED(已作废),DELETE(已删除),FINISHED(已完成)
*/
private String status;
/**
* 合同分类
*/
private Long categoryId;
/**
* 合同分类名称
*/
private String categoryName;
/**
* 合同具体发起人ID
*/
private Long creatorId;
/**
* 创建人名称
*/
private String creatorName;
/**
* 合同具体发起人类型:CORPORATE(平台方),INNER_COMPANY(内部企业),PERSONAL(个人)
*/
private String creatorType;
/**
* 创建人在发起方中的员工编号(用于创建人为个人)
*/
private String creatorNumber;
/**
* 合同发起方ID
*/
private Long tenantId;
/**
* 发起方名称
*/
private String tenantName;
/**
* 合同发起方类型:CORPORATE(平台方),COMPANY(外部企业),INNER_COMPANY(内部企业),PERSONAL(个人)
*/
private String tenantType;
/**
* 合同最后更新时间;格式yyyy-MM-dd HH:mm:ss
*/
private String updateTime;
/**
* 合同过期时间;格式yyyy-MM-dd HH:mm:ss
*/
private String expireTime;
/**
* 合同创建时间;格式yyyy-MM-dd HH:mm:ss
*/
private String createTime;
/**
* 合同拒绝/撤回原因
*/
private String comments;
/**
* 是否可退回
*/
private Boolean rejectable;
/**
* 是否可撤回
*/
private Boolean recallable;
/**
* 是否可作废
*/
private Boolean cancelable;
/**
* 是否可面对面签署
*/
private Boolean faceSign;
/**
* 是否可拒绝作废
*/
private Boolean rejectCancel;
/**
* 文档信息集合
*/
private List<DocumentResponse> documents;
/**
* 签署方集合
*/
private List<SignatoryResponse> signatories;
/**
* 用户的业务数据
*/
private String businessData;
/**
* 签署code
*/
private Integer signCode;
/**
* 剩余打印次数,-1表示无限制
*/
private Integer leftPrintCount;
/**
* 合同类型: NORMAL(标准合同)、OFFLINE(线下合同)
*/
private String type;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getOrdinal() {
return ordinal;
}
public void setOrdinal(Boolean ordinal) {
this.ordinal = ordinal;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public Long getCreatorId() {
return creatorId;
}
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
}
public String getCreatorName() {
return creatorName;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getCreatorType() {
return creatorType;
}
public void setCreatorType(String creatorType) {
this.creatorType = creatorType;
}
public String getCreatorNumber() {
return creatorNumber;
}
public void setCreatorNumber(String creatorNumber) {
this.creatorNumber = creatorNumber;
}
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public String getTenantType() {
return tenantType;
}
public void setTenantType(String tenantType) {
this.tenantType = tenantType;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getExpireTime() {
return expireTime;
}
public void setExpireTime(String expireTime) {
this.expireTime = expireTime;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getComments() {
return comments;
}
public void setComments(String comments) {
this.comments = comments;
}
public Boolean getRejectable() {
return rejectable;
}
public void setRejectable(Boolean rejectable) {
this.rejectable = rejectable;
}
public Boolean getRecallable() {
return recallable;
}
public void setRecallable(Boolean recallable) {
this.recallable = recallable;
}
public Boolean getCancelable() {
return cancelable;
}
public void setCancelable(Boolean cancelable) {
this.cancelable = cancelable;
}
public Boolean getFaceSign() {
return faceSign;
}
public void setFaceSign(Boolean faceSign) {
this.faceSign = faceSign;
}
public Boolean getRejectCancel() {
return rejectCancel;
}
public void setRejectCancel(Boolean rejectCancel) {
this.rejectCancel = rejectCancel;
}
public List<DocumentResponse> getDocuments() {
return documents;
}
public void setDocuments(List<DocumentResponse> documents) {
this.documents = documents;
}
public List<SignatoryResponse> getSignatories() {
return signatories;
}
public void setSignatories(List<SignatoryResponse> signatories) {
this.signatories = signatories;
}
public String getBusinessData() {
return businessData;
}
public void setBusinessData(String businessData) {
this.businessData = businessData;
}
public Integer getSignCode() {
return signCode;
}
public void setSignCode(Integer signCode) {
this.signCode = signCode;
}
public Integer getLeftPrintCount() {
return leftPrintCount;
}
public void setLeftPrintCount(Integer leftPrintCount) {
this.leftPrintCount = leftPrintCount;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
public class ContractDetailsRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 合同ID 或 bizId必须填写一个
* 合同ID
*/
private Long contractId;
/**
* 合同的唯一标识,由调用方生成
*/
private String bizId;
/**
* 否
* 是否查询签署方用印记录
*/
private Boolean countSeal;
public Long getContractId() {
return contractId;
}
public void setContractId(Long contractId) {
this.contractId = contractId;
}
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public Boolean getCountSeal() {
return countSeal;
}
public void setCountSeal(Boolean countSeal) {
this.countSeal = countSeal;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
/**
* 合同详情接口返回实体
*/
public class ContractDetailsResponse implements Serializable {
private static final long serialVersionUID = -3548126503391957301L;
/**
* 错误码,0为成功,1000000未知错误,1000001参数错误
*/
private Integer code;
/**
* 错误信息
*/
private String message;
/**
* 合同详情
*/
private Contract contract;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Contract getContract() {
return contract;
}
public void setContract(Contract contract) {
this.contract = contract;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 抄送人配置
*/
public class ContractTransmitItem {
private static final long serialVersionUID = 1L;
/**
* 是
* 抄送人联系方式
*/
private String receiverMobile;
/**
* 是
* 抄送人名称
*/
private String receiverName;
public String getReceiverMobile() {
return receiverMobile;
}
public void setReceiverMobile(String receiverMobile) {
this.receiverMobile = receiverMobile;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;
/**
* 创建合同请求实体
*/
public class CreateContractRequest {
private static final long serialVersionUID = 1L;
/**
* 是
* 合同名称
*/
private String subject;
/**
* 否
* 合同编号,对接方系统中的业务编号
*/
private String sn;
/**
* 否
* 合同描述
*/
private String description;
/**
* 否
* 用印流程ID
*/
private String categoryId;
/**
* 否
* 用印流程名称,如果分类ID为空,则用此参数确定用印流程
*/
private String categoryName;
/**
* 否
* 是否发起合同,默认true。(true:立即发起;false:保存为草稿)
*/
private boolean send;
/**
* 否
* 合同文档ID的集合(一个文档只能属于一个合同)
*/
private List<Long> documents;
/**
* 否
* 合同过期时间;格式:yyyy-MM-dd HH:mm:ss,过期未结束签署,则作废,不传该参数则默认使用控制台配置的过期时间
*/
private String expireTime;
/**
* 否
* 合同终止时间;格式:yyyy-MM-dd ,系统将时间调至传入时间的23时59分59秒。
*/
private String endTime;
/**
* 否
* 合同创建人姓名
*/
private String creatorName;
/**
* 否
* 合同创建人手机号码
*/
private String creatorContact;
/**
* 否
* 合同创建人邮箱
*/
private String creatorEmail;
/**
* 否
* 合同创建人在发起方中的员工编号
*/
private String creatorNumber;
/**
* 否
* 发起方名称
*/
private String tenantName;
/**
* 否
* 签署方,为空时在合同签署完成后需要调用接口“封存合同”主动结束合同
*/
private List<SignatoryRequest> signatories;
/**
* 否
* 模板参数
*/
private List<T> documentParams;
/**
* 否
* 用户的业务数据
*/
private String businessData;
/**
* 否
* 合同的唯一标识,由调用方生成
*/
private String bizId;
/**
* 否
* 水印配置(需在用印流程配置水印并勾选通过接口设置),参考WaterMarkContent
*/
private List<WaterMarkContent> waterMarkConfigs;
/**
* 否
* 指定位置外签署,默认使用业务分类中的「签署位置规则」配置
*/
private boolean extraSign;
/**
* 否
* 允许指定位置签署,默认使用业务分类中的「签署位置规则」配置
*/
private boolean mustSign;
/**
* 否
* 是否自动生成会签节点(用于签署动作中传入多个印章并且未指定签署人)默认false
*/
private boolean autoCreateCounterSign;
/**
* 否
* 是否所有文档均需签署:1. DEFAULT, 默认,无需签署所有文档2. ALL, 所有签署方每个签署节点必须签署所有文档3. SENDER, 发起方每个签署节点必须签署所有文档4. RECEIVER 接受方每个节点必须签署所有文档
*/
private String signAll;
/**
* 否
* 抄送人配置,参考ContractTransmit
*/
private List<ContractTransmitItem> transmitters;
/**
* 否
* 0 发送全部通知;1 仅发送短信通知;2 仅发送邮件通知
*/
private Integer msgCode;
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public boolean isSend() {
return send;
}
public void setSend(boolean send) {
this.send = send;
}
public List<Long> getDocuments() {
return documents;
}
public void setDocuments(List<Long> documents) {
this.documents = documents;
}
public String getExpireTime() {
return expireTime;
}
public void setExpireTime(String expireTime) {
this.expireTime = expireTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getCreatorName() {
return creatorName;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getCreatorContact() {
return creatorContact;
}
public void setCreatorContact(String creatorContact) {
this.creatorContact = creatorContact;
}
public String getCreatorEmail() {
return creatorEmail;
}
public void setCreatorEmail(String creatorEmail) {
this.creatorEmail = creatorEmail;
}
public String getCreatorNumber() {
return creatorNumber;
}
public void setCreatorNumber(String creatorNumber) {
this.creatorNumber = creatorNumber;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public List<SignatoryRequest> getSignatories() {
return signatories;
}
public void setSignatories(List<SignatoryRequest> signatories) {
this.signatories = signatories;
}
public List<T> getDocumentParams() {
return documentParams;
}
public void setDocumentParams(List<T> documentParams) {
this.documentParams = documentParams;
}
public String getBusinessData() {
return businessData;
}
public void setBusinessData(String businessData) {
this.businessData = businessData;
}
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public List<WaterMarkContent> getWaterMarkConfigs() {
return waterMarkConfigs;
}
public void setWaterMarkConfigs(List<WaterMarkContent> waterMarkConfigs) {
this.waterMarkConfigs = waterMarkConfigs;
}
public boolean isExtraSign() {
return extraSign;
}
public void setExtraSign(boolean extraSign) {
this.extraSign = extraSign;
}
public boolean isMustSign() {
return mustSign;
}
public void setMustSign(boolean mustSign) {
this.mustSign = mustSign;
}
public boolean isAutoCreateCounterSign() {
return autoCreateCounterSign;
}
public void setAutoCreateCounterSign(boolean autoCreateCounterSign) {
this.autoCreateCounterSign = autoCreateCounterSign;
}
public String getSignAll() {
return signAll;
}
public void setSignAll(String signAll) {
this.signAll = signAll;
}
public List<ContractTransmitItem> getTransmitters() {
return transmitters;
}
public void setTransmitters(List<ContractTransmitItem> transmitters) {
this.transmitters = transmitters;
}
public Integer getMsgCode() {
return msgCode;
}
public void setMsgCode(Integer msgCode) {
this.msgCode = msgCode;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 创建合同接口返回实体
*/
public class CreateContractResponse {
/**
* 响应码
* 0:请求成功.
* 1000000:未知错误.
* 1000001:参数错误.
*/
private Integer code;
/**
* 响应消息
*/
private String message;
/**
* 合同ID
*/
private Long contractId;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Long getContractId() {
return contractId;
}
public void setContractId(Long contractId) {
this.contractId = contractId;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 模板参数
*/
public class DocumentParam {
private static final long serialVersionUID = 1L;
/**
* 是
* 模板参数名称
*/
private String name;
/**
* 是
* 模板参数值
*/
private String value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
/**
* 合同文档模板参数响应
*/
public class DocumentParamResponse implements Serializable {
private static final long serialVersionUID = -3418534324086360899L;
/**
* 文档参数名称
*/
private String name;
/**
* 文档参数值
*/
private String value;
/**
* 是否必填
*/
private Boolean required;
/**
* 参数所在页码
*/
private Integer page;
/**
* 参数X坐标(占页宽比)
*/
private Double offsetX;
private Double offsetY;
/**
* 参数由哪方填写,小于等于0:发起方,1~10000:接收方,长整型为对应签署方
*/
private Long signatory;
/**
* 印章类型,只在合同完成时使用
*/
private String signType;
/**
* 对应印章类型的数量,与signType一起使用
*/
private Integer signCountByType;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public Double getOffsetX() {
return offsetX;
}
public void setOffsetX(Double offsetX) {
this.offsetX = offsetX;
}
public Double getOffsetY() {
return offsetY;
}
public void setOffsetY(Double offsetY) {
this.offsetY = offsetY;
}
public Long getSignatory() {
return signatory;
}
public void setSignatory(Long signatory) {
this.signatory = signatory;
}
public String getSignType() {
return signType;
}
public void setSignType(String signType) {
this.signType = signType;
}
public Integer getSignCountByType() {
return signCountByType;
}
public void setSignCountByType(Integer signCountByType) {
this.signCountByType = signCountByType;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 文档信息响应实体
*/
public class DocumentResponse implements Serializable {
private static final long serialVersionUID = 9073285508191776029L;
/**
* 合同文档ID
*/
private Long id;
/**
* 文档名称
*/
private String title;
/**
* 文档页数
*/
private Integer pages;
/**
* 文档大小
*/
private Long size;
/**
* 创建时间;格式yyyy-MM-dd HH:mm:ss
*/
private Date createTime;
/**
* 防伪码
*/
private String antifakeCode;
/**
* 合同文档模板参数
*/
private List<DocumentParamResponse> params;
/**
* 文件用途:NORMAL(合同正文)、TERMINATION(作废声明)、OFFLINE(线下签署文件)
*/
private String usage;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Integer getPages() {
return pages;
}
public void setPages(Integer pages) {
this.pages = pages;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getAntifakeCode() {
return antifakeCode;
}
public void setAntifakeCode(String antifakeCode) {
this.antifakeCode = antifakeCode;
}
public List<DocumentParamResponse> getParams() {
return params;
}
public void setParams(List<DocumentParamResponse> params) {
this.params = params;
}
public String getUsage() {
return usage;
}
public void setUsage(String usage) {
this.usage = usage;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.util.Date;
/**
* 电子证照表实体
*/
public class ElecLicenseInfo {
/**
* 合同标识,主键,自己生成
*/
private String bizId;
/**
* 合同ID
*/
private Long contractId;
/**
* 模板参数
*/
private String documentParam;
/**
* 合同文档ID
*/
private Long documentId;
/**
* 合同类型.1:不动产登记证明.2:不动产权证书.3:不动产查询证明
*/
private String htlx;
/**
* 业务号
*/
private String ywh;
/**
* 证书标识
*/
private String zsbs;
/**
* 提交参数
*/
private String tjcs;
/**
* 返回结果
*/
private String fhjg;
/**
* 推送状态
*/
private String tszt;
/**
* 合同状态(DRAFT:草稿,FILLING:拟定中,SIGNING:签署中,COMPLETE:已完成,REJECTED:已退回,RECALLED:已撤回,EXPIRED:已过期,TERMINATING:作废中,TERMINATED:已作废,DELETE:已删除,FINISHED:强制完成)
*/
private String htzt;
/**
* 推送时间
*/
private Date tssj;
/**
* 是否下载 1是2否
*/
private String sfxz;
/**
* ofd文件地址
*/
private String ofdWjdz;
/**
* 是否转换1是2否
*/
private String sfzh;
/**
* jpg文件地址
*/
private String jpgWjdz;
/**
* 备注
*/
private String bz;
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public Long getContractId() {
return contractId;
}
public void setContractId(Long contractId) {
this.contractId = contractId;
}
public String getDocumentParam() {
return documentParam;
}
public void setDocumentParam(String documentParam) {
this.documentParam = documentParam;
}
public Long getDocumentId() {
return documentId;
}
public void setDocumentId(Long documentId) {
this.documentId = documentId;
}
public String getHtlx() {
return htlx;
}
public void setHtlx(String htlx) {
this.htlx = htlx;
}
public String getYwh() {
return ywh;
}
public void setYwh(String ywh) {
this.ywh = ywh;
}
public String getZsbs() {
return zsbs;
}
public void setZsbs(String zsbs) {
this.zsbs = zsbs;
}
public String getTjcs() {
return tjcs;
}
public void setTjcs(String tjcs) {
this.tjcs = tjcs;
}
public String getFhjg() {
return fhjg;
}
public void setFhjg(String fhjg) {
this.fhjg = fhjg;
}
public String getTszt() {
return tszt;
}
public void setTszt(String tszt) {
this.tszt = tszt;
}
public String getHtzt() {
return htzt;
}
public void setHtzt(String htzt) {
this.htzt = htzt;
}
public Date getTssj() {
return tssj;
}
public void setTssj(Date tssj) {
this.tssj = tssj;
}
public String getSfxz() {
return sfxz;
}
public void setSfxz(String sfxz) {
this.sfxz = sfxz;
}
public String getOfdWjdz() {
return ofdWjdz;
}
public void setOfdWjdz(String ofdWjdz) {
this.ofdWjdz = ofdWjdz;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public String getJpgWjdz() {
return jpgWjdz;
}
public void setJpgWjdz(String jpgWjdz) {
this.jpgWjdz = jpgWjdz;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
/**
* 签署动作操作人
*/
public class OperatorResponse implements Serializable {
private static final long serialVersionUID = -2918875188564078227L;
/**
* 操作人类型:EMPLOYEE(员工),ROLE(角色),USER(用户),COMPANY(企业),LP_USER(法人)
*/
private String operatorType;
/**
* 操作人ID
*/
private Long operatorId;
/**
* 操作人名称
*/
private String operatorName;
public String getOperatorType() {
return operatorType;
}
public void setOperatorType(String operatorType) {
this.operatorType = operatorType;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
public class SealStatsBean implements Serializable {
private static final long serialVersionUID = -1458258324552835005L;
private String signType;
private String signCountByType;
public String getSignType() {
return signType;
}
public void setSignType(String signType) {
this.signType = signType;
}
public String getSignCountByType() {
return signCountByType;
}
public void setSignCountByType(String signCountByType) {
this.signCountByType = signCountByType;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
/**
* 该签约主体签署统计信息
*/
public class SealStatsInfo implements Serializable {
private static final long serialVersionUID = 3699877748342667560L;
/**
* 印章ID
*/
private Long sealId;
/**
* 印章名称
*/
private String sealName;
/**
* 用印次数
*/
private Integer count;
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 Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 签署位置
*/
public class SignatoryRect{
private static final long serialVersionUID = 1L;
/**
* 是
* 合同文档ID
*/
private Long documentId;
/**
* 是
* 签章类型: SEAL_PERSONAL(个人签名), SEAL_CORPORATE(公司公章),TIMESTAMP(时间戳),ACROSS_PAGE_ODD(奇数页骑缝章),ACROSS_PAGE(骑缝章);骑缝章类型时只需要指定合同文档ID和Y轴坐标。
*/
private String rectType;
/**
* 否 按坐标指定位置时:必传
* 签署页码,坐标指定位置时必须,0:全部页,-1:最后一页,其他:第page页
*/
private Integer page;
/**
* 否 按关键字指定位置时:必传
* 关键字,关键字指定位置时必须
*/
private String keyword;
/**
* 否
* 第几个关键字,0:全部,-1:最后一个,其他:第keyIndex个,默认为1
*/
private Integer keywordIndex;
/**
* 否 按坐标时:必传按关键字时:选传
* X轴坐标,坐标定位时必传,关键字定位时选传
*/
private Double offsetX;
/**
* 否 按坐标时:必传按关键字时:选传
* Y轴坐标,坐标定位时必传,关键字定位时选传
*/
private Double offsetY;
public Long getDocumentId() {
return documentId;
}
public void setDocumentId(Long documentId) {
this.documentId = documentId;
}
public String getRectType() {
return rectType;
}
public void setRectType(String rectType) {
this.rectType = rectType;
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
this.page = page;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public Integer getKeywordIndex() {
return keywordIndex;
}
public void setKeywordIndex(Integer keywordIndex) {
this.keywordIndex = keywordIndex;
}
public Double getOffsetX() {
return offsetX;
}
public void setOffsetX(Double offsetX) {
this.offsetX = offsetX;
}
public Double getOffsetY() {
return offsetY;
}
public void setOffsetY(Double offsetY) {
this.offsetY = offsetY;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.util.List;
/**
* 签署方
*/
public class SignatoryRequest {
private static final long serialVersionUID = 1L;
/**
* 是
* 签约主体类型:COMPANY(外部企业),PERSONAL(个人)
*/
private String tenantType;
/**
* 是
* 签约主体名称
*/
private String tenantName;
/**
* 否
* 接收人姓名
*/
private String receiverName;
/**
* 否
* 接收人联系方式:手机号、电子邮箱号(签署方为个人时联系方式(contact)或编号(receiverNumber)至少传递一个)
*/
private String contact;
/**
* 否
* 接收人的员工编号(个人为内部员工时生效)
*/
private String receiverNumber;
/**
* 否
* 接收人邮箱
*/
private String email;
/**
* 否
* 接收人第三方用户id(用于修改接收人联系方式)
*/
private String thirdUserId;
/**
* 否
* 是否人脸识别签署,默认不需要人脸识别(仅签署方类型为个人时有效)
*/
private boolean faceAuthSign;
/**
* 是
* 签署顺序(从1开始);如果想按顺序签署,则分别设置签署方的serialNo为1,2,3;如果想无序签署,则设置签署方的serialNo为1,1,1;设置签署方顺序为1,2,2时,表示第一个先签署,后两个同时签署。
*/
private Integer serialNo;
/**
* 否
* 签署动作,用印流程非预设且签署方为发起方时,使用用户传入的签署动作,其余情况使用用印流程的配置
*/
private List<ActionRequest> actionRequests;
/**
* 否
* 用印流程ID,接收方是内部企业时,可指定用印流程
*/
private String categoryId;
/**
* 否
* 用印流程名称,接收方是内部企业时,可指定用印流程
*/
private String categoryName;
/**
* 否
* 是否发送消息提醒,默认为true
*/
private boolean remind;
/**
* 否
* 身份证号,用于指定个人用户认证时的身份证号
*/
private String cardNo;
/**
* 否
* 个人认证方式:NONEED(无需认证),DEFAULT(默认配置),FACE(人脸识别认证),BANK(银行卡认证)
*/
private String authMode;
/**
* 否
* 签署方语言:zh_CN(中文),en_US(英文)
*/
private String language;
public String getTenantType() {
return tenantType;
}
public void setTenantType(String tenantType) {
this.tenantType = tenantType;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getReceiverNumber() {
return receiverNumber;
}
public void setReceiverNumber(String receiverNumber) {
this.receiverNumber = receiverNumber;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getThirdUserId() {
return thirdUserId;
}
public void setThirdUserId(String thirdUserId) {
this.thirdUserId = thirdUserId;
}
public boolean isFaceAuthSign() {
return faceAuthSign;
}
public void setFaceAuthSign(boolean faceAuthSign) {
this.faceAuthSign = faceAuthSign;
}
public Integer getSerialNo() {
return serialNo;
}
public void setSerialNo(Integer serialNo) {
this.serialNo = serialNo;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public boolean isRemind() {
return remind;
}
public void setRemind(boolean remind) {
this.remind = remind;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getAuthMode() {
return authMode;
}
public void setAuthMode(String authMode) {
this.authMode = authMode;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public List<ActionRequest> getActions() {
return actionRequests;
}
public void setActions(List<ActionRequest> actionRequests) {
this.actionRequests = actionRequests;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
import java.io.Serializable;
import java.util.List;
/**
* 签署方
*/
public class SignatoryResponse implements Serializable {
private static final long serialVersionUID = -7830145977708166582L;
/**
* 签署方ID
*/
private Long id;
/**
* 签署方公司ID或个人ID
*/
private Long tenantId;
/**
* 签署方类型:CORPORATE(平台企业),INNER_COMPANY(内部企业),(外部企业),PERSONAL(个人)
*/
private String tenantType;
/**
* 签署方名称
*/
private String tenantName;
/**
* 接收人类型:CORPORATE(平台方),COMPANY(外部企业),INNER_COMPANY(内部企业),PERSONAL(个人)
*/
private String receiverType;
/**
* 接收人ID,即可以转发合同的人
*/
private Long receiverId;
/**
* 接收人名称
*/
private String receiverName;
/**
* 接收人联系方式
*/
private String contact;
/**
* 签署顺序
*/
private Integer serialNo;
/**
* 签署状态;DRAFT(草稿),SIGNING(签署中),COMPLETE(已完成)
*/
private Boolean status;
/**
* 是否是发起方
*/
private Boolean sponsor;
/**
* 是否发送信息提醒
*/
private Boolean remind;
/**
* 是否从业务配置中得到
*/
private Boolean configured;
/**
* 创建时间;格式yyyy-MM-dd HH:mm:ss
*/
private String createTime;
/**
* 更新时间;格式yyyy-MM-dd HH:mm:ss
*/
private String updateTime;
/**
* 接收时间;格式yyyy-MM-dd HH:mm:ss
*/
private String receiveTime;
/**
* 是否当面签
*/
private Boolean faceSign;
/**
* 用印流程中,配置的个人认证方式:NONEED("无需认证"),DEFAULT("默认配置"),FACE("人脸识别认证"),BANK("银行卡认证")
*/
private String authMode;
/**
* 签署动作
*/
private List<ActionResponse> actionRequests;
/**
* 是否人脸识别签署
*/
private Boolean faceAuthSign;
/**
* 是否降级
*/
private Boolean demotion;
/**
* 该签约主体签署统计信息
*/
private List<SealStatsBean> sealStats;
/**
* 该签约主体签署统计信息
*/
private List<SealStatsInfo> sealStatsInfos;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getTenantType() {
return tenantType;
}
public void setTenantType(String tenantType) {
this.tenantType = tenantType;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public String getReceiverType() {
return receiverType;
}
public void setReceiverType(String receiverType) {
this.receiverType = receiverType;
}
public Long getReceiverId() {
return receiverId;
}
public void setReceiverId(Long receiverId) {
this.receiverId = receiverId;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public Integer getSerialNo() {
return serialNo;
}
public void setSerialNo(Integer serialNo) {
this.serialNo = serialNo;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Boolean getSponsor() {
return sponsor;
}
public void setSponsor(Boolean sponsor) {
this.sponsor = sponsor;
}
public Boolean getRemind() {
return remind;
}
public void setRemind(Boolean remind) {
this.remind = remind;
}
public Boolean getConfigured() {
return configured;
}
public void setConfigured(Boolean configured) {
this.configured = configured;
}
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 getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(String receiveTime) {
this.receiveTime = receiveTime;
}
public Boolean getFaceSign() {
return faceSign;
}
public void setFaceSign(Boolean faceSign) {
this.faceSign = faceSign;
}
public String getAuthMode() {
return authMode;
}
public void setAuthMode(String authMode) {
this.authMode = authMode;
}
public List<ActionResponse> getActionRequests() {
return actionRequests;
}
public void setActionRequests(List<ActionResponse> actionRequests) {
this.actionRequests = actionRequests;
}
public Boolean getFaceAuthSign() {
return faceAuthSign;
}
public void setFaceAuthSign(Boolean faceAuthSign) {
this.faceAuthSign = faceAuthSign;
}
public Boolean getDemotion() {
return demotion;
}
public void setDemotion(Boolean demotion) {
this.demotion = demotion;
}
public List<SealStatsBean> getSealStats() {
return sealStats;
}
public void setSealStats(List<SealStatsBean> sealStats) {
this.sealStats = sealStats;
}
public List<SealStatsInfo> getSealStatsInfos() {
return sealStatsInfos;
}
public void setSealStatsInfos(List<SealStatsInfo> sealStatsInfos) {
this.sealStatsInfos = sealStatsInfos;
}
}
package com.thinkgem.jeesite.modules.eci.entity;
/**
* 水印配置
*/
public class WaterMarkContent {
private static final long serialVersionUID = 1L;
/**
* 是
* 水印类型:TEXT(文本),IMAGE(图片)
*/
private String type;
/**
* 水印类型为文本时必填
* 文字内容
*/
private String content;
/**
* 水印类型为图片时必填
* 图片水印。只支持png格式
*/
private String imageBase64;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getImageBase64() {
return imageBase64;
}
public void setImageBase64(String imageBase64) {
this.imageBase64 = imageBase64;
}
}
package com.thinkgem.jeesite.modules.eci.method;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.utils.JsonUtil;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import com.thinkgem.jeesite.modules.eci.entity.ContractDetailsResponse;
import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
import com.thinkgem.jeesite.modules.eci.utils.EciHttpUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 请求合同详情方法
*/
@Component
public class ContractDetailsRest {
private static final String DETAILS = "/contract/detail";
private Logger logger = LoggerFactory.getLogger(ContractDetailsRest.class);
@Autowired
ElecLicenseInfoDao licenseInfoDao;
@Transactional(rollbackFor = Exception.class)
public void accessDetails() {
List<ElecLicenseInfo> waitForDetails = licenseInfoDao.getDocumentIdIsNull();
for (ElecLicenseInfo waitForDetail : waitForDetails) {
Long contractId = waitForDetail.getContractId();
String bizId = waitForDetail.getBizId();
String url = Global.ECI_HOST + DETAILS + "?contractId=" + contractId;
logger.info("请求合同详情接口url:" + url);
try {
String result = null;
result = EciHttpUtil.doGet(url);
logger.info("合同详情接口请求结果:" + result);
ContractDetailsResponse response = JsonUtil.fromJson(result, ContractDetailsResponse.class);
if (response != null && response.getCode() == 0) {
// TODO: 2022/2/15/0015 目前先取文档详情集合第一个
Long documentId = response.getContract().getDocuments().get(0).getId();
//文档ID入库
licenseInfoDao.updateDocumentId(bizId, documentId);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
package com.thinkgem.jeesite.modules.eci.method;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.utils.JsonUtil;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import com.thinkgem.jeesite.modules.eci.entity.CreateContractRequest;
import com.thinkgem.jeesite.modules.eci.entity.CreateContractResponse;
import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
import com.thinkgem.jeesite.modules.eci.utils.EciHttpUtil;
import org.apache.commons.beanutils.BeanUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 请求创建合同方法
*/
@Component
public class CreateContractRest {
private Logger logger = LoggerFactory.getLogger(CreateContractRest.class);
private static final String CREATE_BY_CATEGORY = "/contract/createbycategory";
@Autowired
ElecLicenseInfoDao licenseInfoDao;
/**
* 批量创建
*
* @return
*/
@Transactional(rollbackFor = Exception.class)
public void accessCreateContract() {
String url = Global.ECI_HOST + CREATE_BY_CATEGORY;
logger.info("http request url:" + url);
// List<CreateContractRequest> requests = new ArrayList<>();
List<ElecLicenseInfo> waitForCreateContracts = licenseInfoDao.getContractIdIsNull();
for (ElecLicenseInfo waitForCreateContract : waitForCreateContracts) {
String result = null;
CreateContractRequest request = new CreateContractRequest();
request.setSubject("不动产合同");
request.setSn(waitForCreateContract.getYwh());
String htlx = waitForCreateContract.getHtlx();
if ("1".equals(htlx) || "2".equals(htlx)) {
//不动产登记证明和不动产权证书类型使用证照专用章
request.setCategoryId(Global.ECI_ZZZYZ);
} else if ("3".equals(htlx)) {
//不动产查询证明使用档案查询专用章
request.setCategoryId(Global.ECI_DACXZYZ);
}
request.setBizId(waitForCreateContract.getBizId());
// TODO: 2022/2/14/0014 获取模板参数json字符串,处理方式待定
// request.setDocumentParams(waitForCreateContract.getDocumentParam());
//提交参数入库
String tjcs = JsonUtil.toJsonString(request);
logger.info("提交参数:" + tjcs);
waitForCreateContract.setTjcs(tjcs);
// licenseInfoDao.updateTjcs(waitForCreateContract);
try {
Map map = new HashMap();
BeanUtils.populate(request, map);
result = EciHttpUtil.doPost(url, map);
logger.info("创建合同接口返回结果:" + result);
CreateContractResponse response = JsonUtil.fromJson(result, CreateContractResponse.class);
if (response != null) {
if (0 == (response.getCode())) {
Long contractId = response.getContractId();
//合同ID入库
waitForCreateContract.setContractId(contractId);
//返回结果入库
waitForCreateContract.setFhjg(result);
//未下载
waitForCreateContract.setSfxz("2");
//未转换
waitForCreateContract.setSfzh("2");
licenseInfoDao.updateContractIdAndStatus(waitForCreateContract);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
package com.thinkgem.jeesite.modules.eci.method;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
import com.thinkgem.jeesite.modules.eci.utils.EciHttpUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 合同下载
*/
@Component
public class DownloadContractRest {
private static final String DOCUMENT_DOWNLOAD = "/document/download";
@Autowired
ElecLicenseInfoDao licenseInfoDao;
/**
* 下载合同方法
* @return
*/
public void accessDownload() {
List<ElecLicenseInfo> waitForDownloads = licenseInfoDao.getWaitForDownload();
for (ElecLicenseInfo waitForDownload : waitForDownloads) {
String bizId = waitForDownload.getBizId();
Long documentId = waitForDownload.getDocumentId();
String url = Global.ECI_HOST + DOCUMENT_DOWNLOAD + "?documentId=" + documentId;
String ofdPath = EciHttpUtil.download(url);
if (ofdPath != null) {
//入库ofd文件地址
licenseInfoDao.updateOfdWjdz(bizId, ofdPath);
}
}
}
}
package com.thinkgem.jeesite.modules.eci.method;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* ofd文件转换
*/
@Component
public class OfdConvertRest {
private Logger logger = LoggerFactory.getLogger(OfdConvertRest.class);
@Autowired
ElecLicenseInfoDao licenseInfoDao;
public void convert() {
List<ElecLicenseInfo> waitForConverts = licenseInfoDao.getWaitForConvert();
for (ElecLicenseInfo waitForConvert : waitForConverts) {
String ofdPath = waitForConvert.getOfdWjdz();
// TODO: 2022/2/16/0016 ofd文件转换
}
}
}
package com.thinkgem.jeesite.modules.eci.utils;
import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.exception.BussException;
import com.thinkgem.jeesite.common.utils.JsonUtil;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
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.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class EciHttpUtil {
private static Logger logger = LoggerFactory.getLogger(EciHttpUtil.class);
/**
* post请求接口地址
*
* @param url
* @param params
* @return
* @throws Exception
*/
public static String doPost(String url, Map params) {
logger.info("http request url:" + url);
logger.info("http request data:" + JsonUtil.toJsonString(params));
HttpPost httpPost = new HttpPost(url);
List<NameValuePair> urlParameters = Lists.newArrayList();
String result = null;
//创建通道
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse response = null;
try {
if (params != null && params.size() > 0) {
Iterator<String> it = params.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
urlParameters.add(new BasicNameValuePair(key, params.get(key).toString()));
}
httpPost.setEntity(new UrlEncodedFormEntity(urlParameters, "utf-8"));
}
httpPost.setHeader("Content-Type", "application/json;charset=utf-8");
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
String unSignature = Global.ECI_APP_TOKEN + Global.ECI_APP_SECRET + System.currentTimeMillis();
String signature = MD5Util.getMD5(unSignature);
httpPost.setHeader("x-qys-signature", signature);
response = client.execute(httpPost);
HttpEntity entity = response.getEntity();
int code = response.getStatusLine().getStatusCode();
if (code == 200) {
result = EntityUtils.toString(entity, "utf-8");
} else {
throw new BussException("返回状态码:" + code);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
httpPost.releaseConnection();
try {
response.close();
client.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return result;
}
/**
* get请求接口地址
*
* @param url
* @param
* @return
* @throws Exception
*/
public static String doGet(String url) {
HttpGet httpGet = new HttpGet(url);
String result = null;
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse response = null;
try {
httpGet.setHeader("Content-Type", "application/json;charset=utf-8");
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
String unSignature = Global.ECI_APP_TOKEN + Global.ECI_APP_SECRET + System.currentTimeMillis();
String signature = MD5Util.getMD5(unSignature);
httpGet.setHeader("x-qys-signature", signature);
response = client.execute(httpGet);
HttpEntity entity = response.getEntity();
int code = response.getStatusLine().getStatusCode();
if (code == 200) {
result = EntityUtils.toString(entity, "utf-8");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
httpGet.releaseConnection();
try {
response.close();
client.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return result;
}
/**
* 文件下载
*
* @param documentId 合同文档ID
* @return
*/
public static String download(String documentId) {
String url = Global.ECI_HOST + "/document/download" + "?documentId=" + documentId;
HttpGet httpGet = new HttpGet(url);
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse response = null;
OutputStream out = null;
InputStream in = null;
String path = null;
try {
httpGet.setHeader("Content-Type", "application/json;charset=utf-8");
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
String unSignature = Global.ECI_APP_TOKEN + Global.ECI_APP_SECRET + System.currentTimeMillis();
String signature = MD5Util.getMD5(unSignature);
httpGet.setHeader("x-qys-signature", signature);
response = client.execute(httpGet);
HttpEntity entity = response.getEntity();
in = entity.getContent();
int code = response.getStatusLine().getStatusCode();
if (code == 200) {
long length = entity.getContentLength();
if (length > 0) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd");
String dateDir = simpleDateFormat.format(new Date());
File file = new File("E:\\ECI\\" + dateDir + "\\" + documentId + ".ofd");
if (!file.exists()) {
file.createNewFile();
}
out = new FileOutputStream(file);
byte[] buffer = new byte[4096];
int readLength = 0;
while ((readLength = in.read(buffer)) != -1) {
// byte[] bytes = new byte[readLength];
// System.arraycopy(buffer, 0, bytes, 0, readLength);
out.write(buffer, 0, readLength);
}
path = file.getAbsolutePath();
out.flush();
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
httpGet.releaseConnection();
try {
response.close();
client.close();
} catch (Exception e) {
e.printStackTrace();
}
}
return path;
}
}
package com.thinkgem.jeesite.modules.eci.utils;
import java.security.MessageDigest;
public class MD5Util {
public static String getMD5(String unEncryption) {
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
try {
byte[] btInput = unEncryption.getBytes();
// 获得MD5摘要算法的 MessageDigest 对象
MessageDigest mdInst = MessageDigest.getInstance("MD5");
// 使用指定的字节更新摘要
mdInst.update(btInput);
// 获得密文
byte[] md = mdInst.digest();
// 把密文转换成十六进制的字符串形式
char[] str = new char[md.length * 2];
int k = 0;
for (byte byte0 : md) {
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
return new String(str).toLowerCase();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
package com.thinkgem.jeesite.modules.reg.utils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
public class Base64 {
/**
* BASE64加密
*
* @param key
* @return
* @throws Exception
*/
public static String encryptBASE64(String key) {
byte[] bt = key.getBytes();
return (new BASE64Encoder()).encodeBuffer(bt);
}
/**
* 对字符串进行Base64解码
*
* @param s
* 要解码的字符串
* @return 返回解码后的字符串
*/
public static byte[] decode(String s) {
BASE64Decoder decoder=new BASE64Decoder();
byte[] bytes=null;
try {
bytes=decoder.decodeBuffer(s);
} catch (IOException e) {
e.printStackTrace();
}
return bytes;
}
/**
* 得到经过Base64解码的图像二进制数据
*/
public static byte[] getImgData(String fileUrl) {
/*
* 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
* 第一部分:data:image/jpeg;base64 中间一个逗号
* 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
*/
//String[] data = fileUrl.split(",");// 这里fileUrl就是前台toDataURL()方法传过来的数据
return Base64.decode(fileUrl);
}
/**
* 保存Base64解码后的二进制数据到文件
*
* @param base64Str
* 经Base64解码后的图片原始二进制数据
* @param path
* 文件路径
*/
public static void saveImage(byte[] imageBytes, String path) {
File file = new File(path);
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(file);
outputStream.write(imageBytes);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
closeSteam(outputStream);
}
}
/**
* 关闭文件输出流
*
* @param outputStream
*/
public static void closeSteam(FileOutputStream outputStream) {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 对字符串进行Base64解码
* @param s 要解码的字符串
* @return 返回解码后的字符串
*/
public static String decodeStr(String s,String bm){
BASE64Decoder decoder=new BASE64Decoder();
String decoded_str=null;
try {
decoded_str = new String(decoder.decodeBuffer(s),bm);
} catch (IOException e) {
e.printStackTrace();
}
return decoded_str;
}
public static String decodeStr(String s){
BASE64Decoder decoder=new BASE64Decoder();
String decoded_str=null;
try {
decoded_str = new String(decoder.decodeBuffer(s));
} catch (IOException e) {
e.printStackTrace();
}
return decoded_str;
}
/**
* 得到经过Base64解码的图像二进制数据
*/
public static String getImgDataStr(String fileUrl){
/*
* 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
* 第一部分:data:image/jpeg;base64
* 中间一个逗号
* 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
*/
String[] data=fileUrl.split(",");//这里fileUrl就是前台toDataURL()方法传过来的数据
return Base64.decodeStr(data[1]);
}
/**
* 保存Base64解码后的二进制数据到文件
* @param base64Str 经Base64解码后的图片原始二进制数据
* @param path 文件路径
*/
public static void saveImageStr(String base64Str,String path){
File file=new File(path);
FileOutputStream outputStream=null;
try {
outputStream=new FileOutputStream(file);
outputStream.write(base64Str.getBytes());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally{
closeSteam(outputStream);
}
}
}
// package com.thinkgem.jeesite.modules.reg.utils;
//
// import java.io.File;
// import java.io.FileNotFoundException;
// import java.io.FileOutputStream;
// import java.io.IOException;
//
// import sun.misc.BASE64Decoder;
// import sun.misc.BASE64Encoder;
//
//
// public class Base64 {
//
// /**
// * BASE64加密
// *
// * @param key
// * @return
// * @throws Exception
// */
// public static String encryptBASE64(String key) {
// byte[] bt = key.getBytes();
// return (new BASE64Encoder()).encodeBuffer(bt);
// }
//
// /**
// * 对字符串进行Base64解码
// *
// * @param s
// * 要解码的字符串
// * @return 返回解码后的字符串
// */
// public static byte[] decode(String s) {
//
// BASE64Decoder decoder=new BASE64Decoder();
// byte[] bytes=null;
// try {
// bytes=decoder.decodeBuffer(s);
// } catch (IOException e) {
// e.printStackTrace();
// }
// return bytes;
// }
//
// /**
// * 得到经过Base64解码的图像二进制数据
// */
// public static byte[] getImgData(String fileUrl) {
// /*
// * 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
// * 第一部分:data:image/jpeg;base64 中间一个逗号
// * 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
// */
// //String[] data = fileUrl.split(",");// 这里fileUrl就是前台toDataURL()方法传过来的数据
// return Base64.decode(fileUrl);
// }
//
// /**
// * 保存Base64解码后的二进制数据到文件
// *
// * @param base64Str
// * 经Base64解码后的图片原始二进制数据
// * @param path
// * 文件路径
// */
// public static void saveImage(byte[] imageBytes, String path) {
// File file = new File(path);
// FileOutputStream outputStream = null;
// try {
// outputStream = new FileOutputStream(file);
// outputStream.write(imageBytes);
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// closeSteam(outputStream);
// }
// }
//
// /**
// * 关闭文件输出流
// *
// * @param outputStream
// */
// public static void closeSteam(FileOutputStream outputStream) {
// if (outputStream != null) {
// try {
// outputStream.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
//
// /**
// * 对字符串进行Base64解码
// * @param s 要解码的字符串
// * @return 返回解码后的字符串
// */
// public static String decodeStr(String s,String bm){
// BASE64Decoder decoder=new BASE64Decoder();
// String decoded_str=null;
// try {
// decoded_str = new String(decoder.decodeBuffer(s),bm);
// } catch (IOException e) {
// e.printStackTrace();
// }
// return decoded_str;
// }
// public static String decodeStr(String s){
// BASE64Decoder decoder=new BASE64Decoder();
// String decoded_str=null;
// try {
// decoded_str = new String(decoder.decodeBuffer(s));
// } catch (IOException e) {
// e.printStackTrace();
// }
// return decoded_str;
// }
//
// /**
// * 得到经过Base64解码的图像二进制数据
// */
// public static String getImgDataStr(String fileUrl){
// /*
// * 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
// * 第一部分:data:image/jpeg;base64
// * 中间一个逗号
// * 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
// */
// String[] data=fileUrl.split(",");//这里fileUrl就是前台toDataURL()方法传过来的数据
// return Base64.decodeStr(data[1]);
// }
//
// /**
// * 保存Base64解码后的二进制数据到文件
// * @param base64Str 经Base64解码后的图片原始二进制数据
// * @param path 文件路径
// */
// public static void saveImageStr(String base64Str,String path){
// File file=new File(path);
// FileOutputStream outputStream=null;
// try {
// outputStream=new FileOutputStream(file);
// outputStream.write(base64Str.getBytes());
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally{
// closeSteam(outputStream);
// }
// }
//
//
//
// }
......
package com.thinkgem.jeesite.modules.reg.utils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Base64;
public class Base64Util {
/**
* BASE64加密
*
* @param key
* @return
* @throws Exception
*/
public static String encryptBASE64(String key) {
byte[] bt = key.getBytes();
Base64.Encoder encoder = Base64.getEncoder();
byte[] encode = encoder.encode(bt);
return String.valueOf(encode);
// return (new BASE64Encoder()).encodeBuffer(bt);
}
/**
* 对字符串进行Base64解码
*
* @param s 要解码的字符串
* @return 返回解码后的字符串
*/
public static byte[] decode(String s) {
Base64.Decoder decoder = Base64.getDecoder();
byte[] bytes = null;
// bytes = decoder.decodeBuffer(s);
bytes = decoder.decode(s);
return bytes;
}
/**
* 得到经过Base64解码的图像二进制数据
*/
public static byte[] getImgData(String fileUrl) {
/*
* 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
* 第一部分:data:image/jpeg;base64 中间一个逗号
* 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
*/
//String[] data = fileUrl.split(",");// 这里fileUrl就是前台toDataURL()方法传过来的数据
return Base64Util.decode(fileUrl);
}
/**
* 保存Base64解码后的二进制数据到文件
*
* @param base64Str 经Base64解码后的图片原始二进制数据
* @param path 文件路径
*/
public static void saveImage(byte[] imageBytes, String path) {
File file = new File(path);
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(file);
outputStream.write(imageBytes);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
closeSteam(outputStream);
}
}
/**
* 关闭文件输出流
*
* @param outputStream
*/
public static void closeSteam(FileOutputStream outputStream) {
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 对字符串进行Base64解码
*
* @param s 要解码的字符串
* @return 返回解码后的字符串
*/
public static String decodeStr(String s, String bm) {
Base64.Decoder decoder = Base64.getDecoder();
String decoded_str = null;
try {
decoded_str = new String(decoder.decode(s), bm);
} catch (IOException e) {
e.printStackTrace();
}
return decoded_str;
}
public static String decodeStr(String s) {
Base64.Decoder decoder = Base64.getDecoder();
String decoded_str = null;
decoded_str = new String(decoder.decode(s));
return decoded_str;
}
/**
* 得到经过Base64解码的图像二进制数据
*/
public static String getImgDataStr(String fileUrl) {
/*
* 利用canvas元素的toDataURL("image/jpeg")方法生成的图像地址格式为:
* 第一部分:data:image/jpeg;base64
* 中间一个逗号
* 第二部分:一个经过base64编码的字符串,通过Base64解码后即可得到该图像原始二进制数据
*/
String[] data = fileUrl.split(",");//这里fileUrl就是前台toDataURL()方法传过来的数据
return Base64Util.decodeStr(data[1]);
}
/**
* 保存Base64解码后的二进制数据到文件
*
* @param base64Str 经Base64解码后的图片原始二进制数据
* @param path 文件路径
*/
public static void saveImageStr(String base64Str, String path) {
File file = new File(path);
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(file);
outputStream.write(base64Str.getBytes());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
closeSteam(outputStream);
}
}
}
......@@ -34,10 +34,10 @@ jdbc.password=odm
reg.areacode=610702
reg.pictures=D:/picture/
## 是否测试环境 正式部署需要修改false
reg.test=true
reg.titleurl = http://127.0.0.1:8222/title
......@@ -49,7 +49,7 @@ reg.ycsl.url=http://172.16.56.36/api/ycxt/
reg.ywh.new=true
reg.xq=false
odm_Si_Url=http://172.16.56.36/platSi/si_inter/1/
reg.inter.username=test
reg.inter.password=test
......@@ -160,10 +160,36 @@ userfiles.basedir=F:/
#\u5de5\u7a0b\u8def\u5f84\uff0c\u5728\u4ee3\u7801\u751f\u6210\u65f6\u83b7\u53d6\u4e0d\u5230\u5de5\u7a0b\u8def\u5f84\u65f6\uff0c\u53ef\u518d\u6b64\u6307\u5b9a\u7edd\u5bf9\u8def\u5f84\u3002
#projectPath=D\:\\workspace\\jeesite
webServiceUrl=http\://172.16.56.8\:80/jg_plat/services/eventService?wsdl
#webServiceUrl=http\://localhost\:8080/ODM/services/eventService?wsdl
secretKey=d85a9de7a3d440589e3c2a5d838f0e30
appId=8fc79f05fc3442f8949a86c3ea379404
taxUrl=http://172.16.56.10:8020/dfdc/api/wsqk.bs
\ No newline at end of file
#契约锁是否正式环境
eci.flag=false
#契约锁开发环境
eci.test.host=http://172.16.56.41:9182
eci.test.AppToken=QMaR2FKZM9
eci.test.AppSecret=LzbLwgdIAq75avbsfXTRDQBizCl8cN
#测试环境用印流程ID
eci.test.bdcdjzmlc=2890537670326468622
eci.test.bdcqzslc=2890537800123400234
eci.test.bdccxzmlc=2890869716009730280
#测试环境电子印章ID
eci.test.zzzyz=2890537558074310661
eci.test.dacxzyz=2890870038996304134
#契约锁正式环境
eci.prod.host=http://172.16.56.6:9182
eci.prod.AppToken=lv2M681jcM
eci.prod.AppSecret=mZWAKA2p7vvnTZMNuUKRHaCL3LTgHA
#正式环境用印流程ID
eci.prod.bdcdjzmlc=2905681381004489569
eci.prod.bdcqzslc=2905684509636506505
eci.prod.bdccxzmlc=2905680925373051715
#正式环境电子印章ID
eci.prod.zzzyz=2905705558864376593
eci.prod.dacxzyz=2905708166068908859
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao">
<select id="getContractIdIsNull" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
select *
from ELEC_LICENSE_INFO
where CONTRACT_ID is null
</select>
<select id="getDocumentIdIsNull" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
select *
from ELEC_LICENSE_INFO
where DOCUMENT_ID is null
</select>
<update id="updateDocumentId">
update ELEC_LICENSE_INFO
set DOCUMENT_ID = #{documentId,jdbcType=BIGINT}
where BIZ_ID = #{bizId,jdbcType=VARCHAR}
</update>
<select id="getWaitForDownload" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
select *
from ELEC_LICENSE_INFO
where DOCUMENT_ID is not null
and SFXZ = '2'
</select>
<update id="updateOfdWjdz">
update ELEC_LICENSE_INFO
set OFD_WJDZ = #{ofdPath,jdbcType=VARCHAR},
SFXZ = '1'
where BIZ_ID = #{bizId,jdbcType=VARCHAR}
</update>
<select id="getWaitForConvert" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
select *
from ELEC_LICENSE_INFO
where SFXZ = '1'
and SFZH = '2'
</select>
<update id="updateContractIdAndStatus">
update ELEC_LICENSE_INFO
set TJCS = #{waitForCreateContract.tjcs,jdbcType=VARCHAR},
CONTRACT_ID = #{waitForCreateContract.contractId,jdbcType=BIGINT},
FHJG = #{waitForCreateContract.fhjg,jdbcType=VARCHAR},
SFXZ = #{waitForCreateContract.sfxz,jdbcType=VARCHAR},
SFZH=#{waitForCreateContract.sfzh,jdbcType=VARCHAR}
where BIZ_ID = #{waitForCreateContract.bizId,jdbcType=VARCHAR}
</update>
</mapper>