Commit e01008bc by Sxy

fix: 百度云工商接入

parent 4f338a1c
......@@ -204,7 +204,7 @@ class DeliverDao extends Dao {
product_code: {
$in: [
system.SERVICECODE.COMPANYCASE,
system.SERVICECODE.SEALSEVCASE,
// system.SERVICECODE.SEALSEVCASE,
// system.SERVICECODE.TAXCONTROLCASE,
// system.SERVICECODE.TAXCASE,
// system.SERVICECODE.ICCHANGECASE
......
......@@ -2,7 +2,6 @@ const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const moment = require("moment");
const System = require("../../../system");
const pushQft = require("../../../utils/toqifutongClient")
const TOQFT = require("../../../utils/toQft");
......@@ -23,12 +22,12 @@ class CompanycaseService extends ServiceBase {
if (!deliverData) {
throw new Error("查不到此交付单");
}
// await TOQFT.getClientByType(deliverData.product_code).submitMaterials(pobj.username, deliverData, pobj.cache_info);
await TOQFT.getClientByType(deliverData.product_code).submitMaterials(pobj.username, deliverData, pobj.cache_info);
return this.db.transaction(async (t) => {
await this.cacheinfoDao.createOrUpdate(pobj, t);
await this.newmaterialDao.createOrUpdate(pobj, t);
if ([system.SERVERSESTATUS.COLLECTING].includes(deliverData.delivery_status)) {
let status = System.SERVERSESTATUS.AUDITING;
let status = system.SERVERSESTATUS.AUDITING;
await this.deliveryDao.updateByWhere({
delivery_status: status
}, {
......@@ -56,7 +55,7 @@ class CompanycaseService extends ServiceBase {
let status;
switch (deliverData.delivery_status) {
case system.SERVERSESTATUS.RECEIVED:
if (deliverData.product_code === System.SERVICECODE.COMPANYCASE) {
if (deliverData.product_code === system.SERVICECODE.COMPANYCASE) {
status = system.SERVERSESTATUS.COLLECTING;
} else {
status = system.SERVERSESTATUS.SERVICEING;
......@@ -74,7 +73,7 @@ class CompanycaseService extends ServiceBase {
default:
throw new Error("此状态手动不能更改");
}
// await TOQFT.getClientByType(deliverData.product_code).changeStatus(pobj.username, deliverData);
await TOQFT.getClientByType(deliverData.product_code).changeStatus(pobj.username, deliverData);
await this.deliveryDao.updateByWhere({
delivery_status: status
}, {
......
......@@ -2,7 +2,6 @@ const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const moment = require("moment");
const System = require("../../../system");
// const pushTx = require("../../../utils/totxClient")
const pushQft = require("../../../utils/toqifutongClient")
......@@ -444,7 +443,7 @@ class DeliverService extends ServiceBase {
this.statuslogDao.create({
flow_type: system.FLOWCODE.DELIVERY,
flow_id: deliverData.id,
status_code: System.ANNUALREPORT.SUCCESS,
status_code: system.ANNUALREPORT.SUCCESS,
salesman_id: pobj.userid,
salesman_name: pobj.username
});
......
......@@ -2,7 +2,6 @@ const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const moment = require("moment");
const System = require("../../../system");
const pushQft = require("../../../utils/toqifutongClient")
const TOQFT = require("../../../utils/toQft");
......
......@@ -336,7 +336,7 @@ System.SERVICECODE = {
WANGWEN: "wangwen",
PANNONG: "pannong",
GUANGBO: "guangbo",
COMPANYCASE: "companyCase",// 公司注册
COMPANYCASE: "companyCase",// 公司注册(带刻章)
SEALSEVCASE: "sealSevCase",// 刻章服务
TAXCONTROLCASE: "taxControlCase",// 税控申请
TAXCASE: "taxCase",// 税务报道
......
......@@ -27,11 +27,22 @@ class GongshangClient extends BaseClient {
async submitMaterials(username, deliverData, materials) {
const { companyInfo, materialFile, } = materials;
// TODO: 封装材料
let { applicationFormUrl, registDocumentsUrl } = materialFile;
let { companyName, spareName, companyProperties, fullAddress, engagedIndustry,
businessScope, operatingPeriod, addressType, taxpayerType, serviceArea } = companyInfo;
if (serviceArea.length == 2) {
if (serviceArea[1] === "市辖区") {
serviceArea = serviceArea[0];
} else {
serviceArea = serviceArea[1];
}
} else {
serviceArea = undefined;
}
let status;
switch (deliverData.delivery_status) {
case system.SERVERSESTATUS.COLLECTING: // 工商审核环节
status = this.CIRCUITSTATUS.COLLECTING;
status = this.CIRCUITSTATUS.AUDITING;
break
case system.SERVERSESTATUS.AUDITING: // 工商审核环节
status = this.CIRCUITSTATUS.AUDITING;
......@@ -50,6 +61,26 @@ class GongshangClient extends BaseClient {
actionBody: {
orderNo: deliverData.delivery_code,
status,
deliverContent: {
applicationFormUrl: applicationFormUrl.url,
registDocumentsUrl: registDocumentsUrl.url,
baseInfo: {},
companyInfo: {
companyName,
spareName: spareName.filter(item => {
return item;
}),
companyProperties,
addressType,
fullAddress,
taxpayerType,
serviceArea,
engagedIndustry,
businessScope,
operatingPeriod
}
},
}
});
}
......@@ -58,7 +89,7 @@ class GongshangClient extends BaseClient {
let status;
switch (deliverData.delivery_status) {
case system.SERVERSESTATUS.RECEIVED:
if (deliverData.product_code === System.SERVICECODE.COMPANYCASE) {
if (deliverData.product_code === system.SERVICECODE.COMPANYCASE) {
status = this.CIRCUITSTATUS.COLLECTING;
} else {
status = "TODO:";
......
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