Commit db06ff94 by zhaoxiqing

gsb

parent ba572f4a
...@@ -208,6 +208,8 @@ class EntcontractService extends ServiceBase { ...@@ -208,6 +208,8 @@ class EntcontractService extends ServiceBase {
async createYzMerchant(params) { async createYzMerchant(params) {
var data = { var data = {
// appId: "1202849621743763458",
// mchtId: "1202848945651318786",
appId: params.toAppId, appId: params.toAppId,
mchtId: params.toMcthid, mchtId: params.toMcthid,
type: "0",// 类型 0 一般纳税人 1 小规模纳税人 type: "0",// 类型 0 一般纳税人 1 小规模纳税人
...@@ -235,7 +237,7 @@ class EntcontractService extends ServiceBase { ...@@ -235,7 +237,7 @@ class EntcontractService extends ServiceBase {
var v = data[k]; var v = data[k];
signArr.push(k + "=" + v); signArr.push(k + "=" + v);
} }
var signStr = signArr.join("&") + "&key=" + this.YZKEY; var signStr = signArr.join("&") + "&key=" + params.key;
data.sign = md5(signStr).toUpperCase(); data.sign = md5(signStr).toUpperCase();
data.bizContent = [ data.bizContent = [
{ {
...@@ -669,6 +671,7 @@ class EntcontractService extends ServiceBase { ...@@ -669,6 +671,7 @@ class EntcontractService extends ServiceBase {
// this.syncSign(entcontract.id); // this.syncSign(entcontract.id);
params.toAppId = enttemplate.appid; params.toAppId = enttemplate.appid;
params.toMcthid = enttemplate.mcthid; params.toMcthid = enttemplate.mcthid;
params.key = enttemplate.key;
return await this.createYzMerchant(params); return await this.createYzMerchant(params);
// return this.returnjson(0, "success", { // return this.returnjson(0, "success", {
// contractId: entcontract.id // contractId: entcontract.id
...@@ -763,10 +766,12 @@ class EntcontractService extends ServiceBase { ...@@ -763,10 +766,12 @@ class EntcontractService extends ServiceBase {
return null; return null;
} }
// 获取yz配置 // 获取yz配置
let conf = await this.getAppConfig(); // let conf = await this.getAppConfig();
let enttemplate = await this.enttemplateSve.findById(contract.enttemplate_id);
// 推送数据 // 推送数据
var param = { var param = {
"appId": conf.appId, // appId "appId": enttemplate.appid, // appId
"merchantName": signInfo.companyName, // 有赞商户名称 "merchantName": signInfo.companyName, // 有赞商户名称
"merchantId": user.userId3rd, // 有赞商户id "merchantId": user.userId3rd, // 有赞商户id
"fileUrl": contract.fileurl, // 签约合同pdf文件 "fileUrl": contract.fileurl, // 签约合同pdf文件
......
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