Commit 6a5e8621 by DESKTOP-7Q3CA17\86137

gsb

parent 0c6000be
...@@ -794,6 +794,7 @@ class EcontractApi { ...@@ -794,6 +794,7 @@ class EcontractApi {
signArr.push("userName=" + userName); signArr.push("userName=" + userName);
signArr.push("key=" + busi.key); signArr.push("key=" + busi.key);
var calcSign = md5(signArr.join("&")).toUpperCase(); var calcSign = md5(signArr.join("&")).toUpperCase();
console.log("银行卡四要素验证密钥++++++++++++++++++++++++++++++》",calcSign);
if (sign != calcSign) { if (sign != calcSign) {
return { return {
code: 1, code: 1,
......
...@@ -76,7 +76,8 @@ class GemaApi { ...@@ -76,7 +76,8 @@ class GemaApi {
// 查appId关联key // 查appId关联key
var qbg = await this.qbgconfigSve.findOne({ var qbg = await this.qbgconfigSve.findOne({
appId: param.appId appId: param.appId,
xbg_ecid: param.ecid
}); });
if (!qbg || !qbg.key) { if (!qbg || !qbg.key) {
return this.returnjson(1001003, "配置信息错误,请联系薪必果人员进行配置"); return this.returnjson(1001003, "配置信息错误,请联系薪必果人员进行配置");
......
...@@ -8,8 +8,7 @@ module.exports = (db, DataTypes) => { ...@@ -8,8 +8,7 @@ module.exports = (db, DataTypes) => {
initiator_account: DataTypes.STRING, initiator_account: DataTypes.STRING,
merchant_name: DataTypes.STRING, merchant_name: DataTypes.STRING,
ecompany_name: DataTypes.STRING, ecompany_name: DataTypes.STRING,
phoneA: DataTypes.STRING, xbg_ecid: DataTypes.INTEGER,
addressA: DataTypes.STRING,
ecompany_id: DataTypes.INTEGER, ecompany_id: DataTypes.INTEGER,
},{ },{
paranoid: true,//假的删除 paranoid: true,//假的删除
......
...@@ -26,6 +26,8 @@ class QbgconfigService extends ServiceBase { ...@@ -26,6 +26,8 @@ class QbgconfigService extends ServiceBase {
let ecid = params.ecid; let ecid = params.ecid;
// 验证身份证是否签约过 // 验证身份证是否签约过
let todays = moment().format("YYYY-MM-DD") + " 00:00:00"; let todays = moment().format("YYYY-MM-DD") + " 00:00:00";
// dkecompany
var dkcompany = await this.dkcompanyDao.findById(qbg.ecompany_id);
let contractId = await this.dkcontractDao.findSignedContractId({ let contractId = await this.dkcontractDao.findSignedContractId({
idno: params.idNo, idno: params.idNo,
...@@ -124,27 +126,27 @@ class QbgconfigService extends ServiceBase { ...@@ -124,27 +126,27 @@ class QbgconfigService extends ServiceBase {
appId: params.appId, appId: params.appId,
nonceStr: params.nonceStr, nonceStr: params.nonceStr,
timestamp: new Date().getTime(), timestamp: new Date().getTime(),
initiatorAccountId: qbg.initiator_account, initiatorAccountId: qbg.initiator_account, //企业账号(E签宝)
accountId: eaccount.eaccountid, accountId: eaccount.eaccountid, //个人账号(E签宝)
channel: 1, channel: 1,
entSealId: qbg.seal_id, entSealId: qbg.seal_id,
contractName: qbg.merchant_name, contractName: dkcompany.name, //合同名称
simpleFormFields: { simpleFormFields: {
nameA: qbg.merchant_name, nameA: dkcompany.name, //甲方 必填
addressA: qbg.addressA, addressA: dkcompany.addr, // 甲方地址
phoneA: qbg.phoneA, phoneA: dkcompany.phone, // 甲方电话
nameB: params.idName, nameB: params.idName, //乙方姓名 必填
phoneB: params.mobile, phoneB: params.mobile, //乙方电话 必填
nameC: params.idName, nameC: params.idName, // 乙方姓名
banknoC: params.bankno, banknoC: params.bankno, // 乙方电话
phoneC: params.mobile, phoneC: params.mobile, // 乙方身份证
idcardC: params.idNo, idcardC: params.idNo, // 乙方银行卡号
signdate: today, signdate: today, // 签约日期
}, },
templateId: params.ecid templateId: qbg.template_id //ecid(E签宝)
} }
var sign = await this.getsign(toecontract, qbg.key) var sign = await this.getsign(toecontract, qbg.key)
...@@ -156,12 +158,11 @@ class QbgconfigService extends ServiceBase { ...@@ -156,12 +158,11 @@ class QbgconfigService extends ServiceBase {
data: toecontract, data: toecontract,
}); });
console.log(econtr) console.log(econtr)
// 创建合同 // 创建合同
let dkecontract = { let dkecontract = {
name: qbg.merchant_name, name: qbg.merchant_name,
dktemplate_id: qbg.template_id, dktemplate_id: ecid,
user_id: eaccount.user_id, user_id: eaccount.user_id,
usereaccount_id: eaccount.id, usereaccount_id: eaccount.id,
dkcompany_id: qbg.ecompany_id, dkcompany_id: qbg.ecompany_id,
...@@ -311,7 +312,7 @@ class QbgconfigService extends ServiceBase { ...@@ -311,7 +312,7 @@ class QbgconfigService extends ServiceBase {
signDateA: today, signDateA: today,
signDateB: today signDateB: today
}, },
templateId: params.ecid templateId: qbg.template_id
} }
var sign = await this.getsign(toecontract, qbg.key) var sign = await this.getsign(toecontract, qbg.key)
...@@ -322,8 +323,6 @@ class QbgconfigService extends ServiceBase { ...@@ -322,8 +323,6 @@ class QbgconfigService extends ServiceBase {
url: this.API.autoSign, url: this.API.autoSign,
data: toecontract, data: toecontract,
}); });
console.log(econtr) console.log(econtr)
// 创建合同 // 创建合同
let econtract = { let econtract = {
...@@ -332,7 +331,7 @@ class QbgconfigService extends ServiceBase { ...@@ -332,7 +331,7 @@ class QbgconfigService extends ServiceBase {
eflowstatus: "1", eflowstatus: "1",
user_id: eaccount.user_id, user_id: eaccount.user_id,
usereaccount_id: eaccount.id, usereaccount_id: eaccount.id,
etemplate_id: qbg.template_id, etemplate_id: ecid,
ecompany_id: qbg.ecompany_id, ecompany_id: qbg.ecompany_id,
}; };
econtract = await this.econtractDao.create(econtract); econtract = await this.econtractDao.create(econtract);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment