Commit e01008bc by Sxy

fix: 百度云工商接入

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