e签宝发起签署流程,多个方法调整
This commit is contained in:
parent
2914644441
commit
d6245f8843
@ -153,7 +153,7 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
|
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "plat_contracts");
|
put("componentKey", "plat_contracts");
|
||||||
put("componentValue", "平台商户入驻服务框架协议和小发同城服务费结算");
|
put("componentValue", "《平台商户入驻服务框架协议》和《小发同城服务费结算》");
|
||||||
}});
|
}});
|
||||||
|
|
||||||
// 签署时间
|
// 签署时间
|
||||||
@ -165,14 +165,17 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
list.add(new HashMap<String, Object>() {{
|
for (int i = 1; i <= 3; i++) {
|
||||||
put("componentKey", "plat_sign_date1");
|
int finalI = i;
|
||||||
put("componentValue", today);
|
list.add(new HashMap<String, Object>() {{
|
||||||
}});
|
put("componentKey", "plat_sign_date" + finalI);
|
||||||
|
put("componentValue", today);
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 甲方公司名称
|
// 甲方公司名称
|
||||||
for (int i = 1; i <= 16; i++) {
|
for (int i = 1; i <= 17; i++) {
|
||||||
int finalI = i;
|
int finalI = i;
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "mch_company" + finalI);
|
put("componentKey", "mch_company" + finalI);
|
||||||
@ -188,7 +191,7 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 1; i <= 2; i++) {
|
for (int i = 1; i <= 3; i++) {
|
||||||
int finalI = i;
|
int finalI = i;
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "mch_legal_person_mobile" + finalI);
|
put("componentKey", "mch_legal_person_mobile" + finalI);
|
||||||
@ -226,13 +229,23 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
put("componentValue", shopMerchEntry.getStore_address());
|
put("componentValue", shopMerchEntry.getStore_address());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "mch_bank1");
|
||||||
|
put("componentValue", shopMerchEntry.getBank_name());
|
||||||
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "mch_account_number1");
|
||||||
|
put("componentValue", shopMerchEntry.getAccount_number());
|
||||||
|
}});
|
||||||
|
|
||||||
// 乙方公司名称
|
// 乙方公司名称
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "plat_company1");
|
put("componentKey", "plat_company1");
|
||||||
put("componentValue", platCompany + "和代理商");
|
put("componentValue", platCompany + "和代理商");
|
||||||
}});
|
}});
|
||||||
|
|
||||||
for (int i = 2; i <= 3; i++) {
|
for (int i = 2; i <= 5; i++) {
|
||||||
int finalI = i;
|
int finalI = i;
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "plat_company" + finalI);
|
put("componentKey", "plat_company" + finalI);
|
||||||
@ -240,9 +253,23 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 1; i <= 2; i++) {
|
||||||
|
int finalI = i;
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_mobile" + finalI);
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getLegal_person_mobile());
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
put("componentKey", "plat_mobile1");
|
put("componentKey", "plat_email1");
|
||||||
put("componentValue", finalEsignPlatformInfo.getLegal_person_mobile());
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
|
}});
|
||||||
|
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_email1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
@ -250,6 +277,32 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
put("componentValue", finalEsignPlatformInfo.getEmail());
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_email1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_email1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_email1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getEmail());
|
||||||
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_bank1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getRec_acc_bank_name());
|
||||||
|
}});
|
||||||
|
|
||||||
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
put("componentKey", "plat_account_number1");
|
||||||
|
put("componentValue", finalEsignPlatformInfo.getRec_acc_card_no());
|
||||||
|
}});
|
||||||
|
|
||||||
|
|
||||||
// 代理商相关
|
// 代理商相关
|
||||||
if (distributor != null) {
|
if (distributor != null) {
|
||||||
// 有代理商的时候,才填充代理商的信息
|
// 有代理商的时候,才填充代理商的信息
|
||||||
@ -323,10 +376,10 @@ public class EsignContractFillingFileServiceImpl extends BaseServiceImpl<EsignCo
|
|||||||
// 获取印章的位置信息,写入数据库
|
// 获取印章的位置信息,写入数据库
|
||||||
Map<String, JSONArray> signPositionMap = getSignPosition(templateId, fileId);
|
Map<String, JSONArray> signPositionMap = getSignPosition(templateId, fileId);
|
||||||
if (signPositionMap != null) {
|
if (signPositionMap != null) {
|
||||||
if (distributor != null && signPositionMap.get("mch") != null) {
|
if (signPositionMap.get("mch") != null) {
|
||||||
esignContractFillingFile.setMch_sign_position(signPositionMap.get("mch").toString());
|
esignContractFillingFile.setMch_sign_position(signPositionMap.get("mch").toString());
|
||||||
}
|
}
|
||||||
if (distributor != null && signPositionMap.get("plat") != null) {
|
if (signPositionMap.get("plat") != null) {
|
||||||
esignContractFillingFile.setPlat_sign_position(signPositionMap.get("plat").toString());
|
esignContractFillingFile.setPlat_sign_position(signPositionMap.get("plat").toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -419,11 +419,14 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取代理商信息
|
||||||
|
EsignPlatformInfo distributor = esignPlatformInfoService.getDistributorInfoById(shopMerchEntry.getDistributor_id());
|
||||||
|
|
||||||
// 未签合同文件ID
|
// 未签合同文件ID
|
||||||
String fileId = esignContractFillingFile.getFile_id();
|
String fileId = esignContractFillingFile.getFile_id();
|
||||||
|
|
||||||
// (重要)组织生成签署合同的请求参数。
|
// (重要)组织生成签署合同的请求参数。
|
||||||
String reqParams = buildSignReqParams(shopMerchEntry, esignPlatformInfo, esignContractFillingFile);
|
String reqParams = buildSignReqParams(shopMerchEntry, esignPlatformInfo, distributor, esignContractFillingFile);
|
||||||
|
|
||||||
// 保存签署合同记录
|
// 保存签署合同记录
|
||||||
EsignContract esignContract = new EsignContract();
|
EsignContract esignContract = new EsignContract();
|
||||||
@ -545,7 +548,7 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
|
|||||||
* @param esignContractFillingFile
|
* @param esignContractFillingFile
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected String buildSignReqParams(ShopMerchEntry shopMerchEntry, EsignPlatformInfo esignPlatformInfo, EsignContractFillingFile esignContractFillingFile) {
|
protected String buildSignReqParams(ShopMerchEntry shopMerchEntry, EsignPlatformInfo esignPlatformInfo, EsignPlatformInfo distributor, EsignContractFillingFile esignContractFillingFile) {
|
||||||
if (shopMerchEntry == null || esignPlatformInfo == null || esignContractFillingFile == null) {
|
if (shopMerchEntry == null || esignPlatformInfo == null || esignContractFillingFile == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -595,7 +598,7 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
|
|||||||
|
|
||||||
// 乙方平台方信息
|
// 乙方平台方信息
|
||||||
JSONObject platSigner = new JSONObject();
|
JSONObject platSigner = new JSONObject();
|
||||||
platSigner.putByPath("signConfig.signOrder", 1);
|
platSigner.putByPath("signConfig.signOrder", 2);
|
||||||
platSigner.putByPath("noticeConfig.noticeTypes", "1,2"); // 短信和邮件
|
platSigner.putByPath("noticeConfig.noticeTypes", "1,2"); // 短信和邮件
|
||||||
platSigner.putByPath("signFields", JSONUtil.parseArray(esignContractFillingFile.getPlat_sign_position()));
|
platSigner.putByPath("signFields", JSONUtil.parseArray(esignContractFillingFile.getPlat_sign_position()));
|
||||||
if (shopMerchEntry.getEntity_type().equals(CommonConstant.MCH_ENTITY_TYPE_QY)) {
|
if (shopMerchEntry.getEntity_type().equals(CommonConstant.MCH_ENTITY_TYPE_QY)) {
|
||||||
@ -615,7 +618,29 @@ public class EsignContractServiceImpl extends BaseServiceImpl<EsignContractMappe
|
|||||||
// 加入乙方平台方信息
|
// 加入乙方平台方信息
|
||||||
signers.add(platSigner);
|
signers.add(platSigner);
|
||||||
|
|
||||||
// 丙方(代理商)信息
|
if (distributor != null) {
|
||||||
|
// 丙方(代理商)信息
|
||||||
|
JSONObject distrSigner = new JSONObject();
|
||||||
|
distrSigner.putByPath("signConfig.signOrder", 3);
|
||||||
|
distrSigner.putByPath("noticeConfig.noticeTypes", "1"); // 短信和邮件
|
||||||
|
distrSigner.putByPath("signFields", JSONUtil.parseArray(esignContractFillingFile.getDistri_sign_position()));
|
||||||
|
if (shopMerchEntry.getEntity_type().equals(CommonConstant.MCH_ENTITY_TYPE_QY)) {
|
||||||
|
// 企业
|
||||||
|
distrSigner.put("signerType", 1);
|
||||||
|
distrSigner.putByPath("orgSignerInfo.orgName", distributor.getLicense_company());
|
||||||
|
distrSigner.putByPath("orgSignerInfo.orgInfo.orgIDCardNum", distributor.getLicense_number());
|
||||||
|
distrSigner.putByPath("orgSignerInfo.orgInfo.orgIDCardType", "CRED_ORG_USCC");
|
||||||
|
distrSigner.putByPath("orgSignerInfo.transactorInfo.psnAccount", distributor.getLegal_person_mobile());
|
||||||
|
distrSigner.putByPath("orgSignerInfo.transactorInfo.psnInfo.psnName", distributor.getLegal_person_name());
|
||||||
|
} else {
|
||||||
|
// 个人
|
||||||
|
distrSigner.put("signerType", 0);
|
||||||
|
distrSigner.putByPath("psnSignerInfo.psnAccount", distributor.getLegal_person_mobile());
|
||||||
|
distrSigner.putByPath("psnSignerInfo.psnInfo.psnName", distributor.getLegal_person_name());
|
||||||
|
}
|
||||||
|
// 加入代理商信息
|
||||||
|
signers.add(distrSigner);
|
||||||
|
}
|
||||||
|
|
||||||
reqParams.put("signers", signers);
|
reqParams.put("signers", signers);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user