Commit fd85e045 by 王昆

Merge branch 'bpo-web' of gitlab.gongsibao.com:jiangyong/zhichan into bpo-web

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