Commit d3a5e3aa by 王昆

gsb

parent 95395ff6
...@@ -15,16 +15,19 @@ class BusinessmenCtl extends CtlBase { ...@@ -15,16 +15,19 @@ class BusinessmenCtl extends CtlBase {
async allPage(pobj, pobj2, req) { async allPage(pobj, pobj2, req) {
try { try {
let condition = { let condition = {
currentPage: pobj.currentPage, currentPage: pobj.currentPage,
pageSize: pobj.pageSize, pageSize: pobj.pageSize,
order_id: this.trim(pobj.order_id), order_id: this.trim(pobj.order_id),
deliver_id: this.trim(pobj.deliver_id),
name: this.trim(pobj.name), name: this.trim(pobj.name),
legal_name: this.trim(pobj.legal_name), legal_name: this.trim(pobj.legal_name),
legal_mobile: this.trim(pobj.legal_mobile), legal_mobile: this.trim(pobj.legal_mobile),
legal_idcard: this.trim(pobj.legal_idcard), legal_idcard: this.trim(pobj.legal_idcard),
credit_code: this.trim(pobj.credit_code) credit_code: this.trim(pobj.credit_code)
};
if (!condition.deliver_id) {
return system.getResult(null, "请重新登录");
} }
return await this.businessmenSve.allPage(condition); return await this.businessmenSve.allPage(condition);
} catch (error) { } catch (error) {
...@@ -35,17 +38,19 @@ class BusinessmenCtl extends CtlBase { ...@@ -35,17 +38,19 @@ class BusinessmenCtl extends CtlBase {
async myPage(pobj, pobj2, req) { async myPage(pobj, pobj2, req) {
try { try {
let condition = { let condition = {
currentPage: pobj.currentPage, currentPage: pobj.currentPage,
pageSize: pobj.pageSize, pageSize: pobj.pageSize,
order_id: this.trim(pobj.order_id), order_id: this.trim(pobj.order_id),
name: this.trim(pobj.name), name: this.trim(pobj.name),
bd_path: this.trim(req.loginUser.orgpath), operator_id: this.trim(req.loginUser.id),
legal_name: this.trim(pobj.legal_name), legal_name: this.trim(pobj.legal_name),
legal_mobile: this.trim(pobj.legal_mobile), legal_mobile: this.trim(pobj.legal_mobile),
legal_idcard: this.trim(pobj.legal_idcard), legal_idcard: this.trim(pobj.legal_idcard),
credit_code: this.trim(pobj.credit_code) credit_code: this.trim(pobj.credit_code)
};
if (!condition.operator_id) {
return system.getResult(null, "请重新登录");
} }
return await this.businessmenSve.allPage(condition); return await this.businessmenSve.allPage(condition);
} catch (error) { } catch (error) {
...@@ -54,118 +59,6 @@ class BusinessmenCtl extends CtlBase { ...@@ -54,118 +59,6 @@ class BusinessmenCtl extends CtlBase {
} }
} }
async info(pobj, pobj2, req) {
try {
var condition = {
id: pobj.id,
}
return await this.businessmenSve.info(condition);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async sign(pobj, pobj2, req) {
var params = {
id: pobj.id,
taxUpType: pobj.taxUpType,
addValueUpType: pobj.addValueUpType,
costRate: system.y2f(pobj.costRate),
taxRate: system.y2f(pobj.taxRate),
serviceRate: system.y2f(pobj.serviceRate),
signNotes: this.trim(pobj.signNotes),
commonTaxLadder: JSON.stringify(pobj.commonTaxLadder),
commonOtherLadder: JSON.stringify(pobj.commonOtherLadder),
specialTaxLadder: JSON.stringify(pobj.specialTaxLadder),
specialOtherLadder: JSON.stringify(pobj.specialOtherLadder),
invoicecontents: pobj.invoicecontents,
}
try {
return await this.businessmenSve.sign(params);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async signNames(pobj, pobj2, req) {
try {
var condition = {
bstatuses: ["2020"],
}
return await this.businessmenSve.nameList(condition);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async signPage(pobj, pobj2, req) {
try {
var condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
businessmenId: pobj.businessmenId,
}
return await this.businessmenSve.signPage(condition);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async deliverPage(pobj, pobj2, req) {
try {
var condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
orderId: pobj.orderId,
dstatus: pobj.status,
deliverId: "",
}
return await this.businessmenSve.deliverPage(condition);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
// async auditContract(pobj, pobj2, req) {
// try {
// var id = Number(pobj.id);
// var status = Number(pobj.status);
// var notes = this.trim(pobj.notes);
// return await this.service.auditContract(id, status, notes);
// } catch (error) {
// console.log(error);
// return system.getResultFail(500, "接口异常:" + error.message);
// }
// }
// async businessmenSign(pobj, pobj2, req) {
// var params = {
// id: pobj.id,
// commonTaxLadder: this.trim(pobj.commonTaxLadder),
// commonOtherLadder: this.trim(pobj.commonOtherLadder),
// specialTaxLadder: this.trim(pobj.specialTaxLadder),
// specialOtherLadder: this.trim(pobj.specialOtherLadder),
// }
// try {
// return await this.service.businessmenSign(params);
// } catch (error) {
// console.log(error);
// return system.getResultFail(500, "接口异常:" + error.message);
// }
// }
} }
module.exports = BusinessmenCtl; module.exports = BusinessmenCtl;
\ No newline at end of file
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