Commit a62b7b4d by 王勇飞

gyq

parent e11694a6
......@@ -129,6 +129,7 @@ class BizOptCtl extends CtlBase {
//根据需求编号去更新该条需求的状态为已关闭
try {
let res = await this.service.updateStatusByDemandCode(pobj);
console.log("bizoptCtl:updateStatusByDemandCode-----------------",JSON.stringify(res));
//添加到记录表
pobj.operator = {
......@@ -141,7 +142,7 @@ class BizOptCtl extends CtlBase {
remarks: pobj.remarks
}
let recordRes = await this.operationrecordSve.insertInfo(pobj);
console.log("bizoptCtl:operationrecordSve-----------------",JSON.stringify(recordRes));
//异步将该需求关闭信息同步到其他系统(走队列,融易算接口文档2.3)
//构造参数,添加判断(有方案信息的才走队列同步到融易算,没有的直接关闭)
let schemeRes = await this.schemeSve.findInfo(pobj);
......@@ -151,14 +152,31 @@ class BizOptCtl extends CtlBase {
} else {
console.log(pobj.demand_code + "该需求没有方案信息,不需要同步");
}
console.log("bizoptCtl:closeBizopt-----------------关闭需求成功");
return system.getResult("关闭需求成功!");
} catch (error) {
console.log("bizoptCtl/closeBizopt 关闭需求出错------------------",error);
return system.getResultError("bizoptCtl/closeBizopt 关闭需求出错!");
}
}
async testCloseProposal(obj){
console.log("testCloseProposal-------------------");
return {
"requestId": "d51aa427-738f-4bed-b48d-282da0a74432",
"status":1,
"success": true,
"errorCode": 0,
"errorMsg": "ok",
"data": {
}
}
}
buildObj(pobj, schemeRes) {
let pushUrl = this.rysUrl + "leads/proposal/close";
//let pushUrl = this.rysUrl + "leads/proposal/close";
let pushUrl = this.rysUrl + "/web/bizchance/bizoptCtl/testCloseProposal";
let solutionBizId;
if (schemeRes.solution_bizid) {
solutionBizId = schemeRes.solution_bizid;
......@@ -175,6 +193,8 @@ class BizOptCtl extends CtlBase {
}
},
headData: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ',
'XAPPKEY': 'f6b59b74-f943-4735-bb86-e05d6b7fd78e',
'Source': 'GSB'
}
}
......
......@@ -423,6 +423,19 @@ class DeliverybillCtl extends CtlBase {
}
async testPaperPostConfirm(obj){
console.log("testCloseProposal-------------------");
return {
"requestId": "d51aa427-738f-4bed-b48d-282da0a74432",
"status":1,
"success": true,
"errorCode": 0,
"errorMsg": "ok",
"data": {
}
}
}
//票据快递情况反馈
async confirmPaperPost(pobj, qobj, req) {
console.log("融易算接收票据快递情况反馈参数--------------------------",JSON.stringify(pobj));
......@@ -441,10 +454,13 @@ class DeliverybillCtl extends CtlBase {
}
}
var pushObj = {
"pushUrl": this.rysUrl + "service/paperPost/confirm",
//"pushUrl": this.rysUrl + "service/paperPost/confirm",
"pushUrl": this.rysUrl + "/web/bizchance/deliverybillCtl/testPaperPostConfirm",
"actionType": "confirm",
"messageBody": param,
"headData": {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ',
'XAPPKEY': 'f6b59b74-f943-4735-bb86-e05d6b7fd78e',
'Source': 'GSB'
},
"requestId": uuidv4()
......@@ -457,6 +473,17 @@ class DeliverybillCtl extends CtlBase {
}
}
async testfeedback(obj){
console.log("testCloseProposal-------------------");
return {
"requestId": "d51aa427-738f-4bed-b48d-282da0a74432",
"status":1,
"success": true,
"errorCode": 0,
"errorMsg": "ok",
"data": null
}
}
}
module.exports = DeliverybillCtl;
\ No newline at end of file
......@@ -7,6 +7,7 @@ class FitaxschemeCtl extends CtlBase {
constructor() {
super("bizchance", CtlBase.getServiceName(FitaxschemeCtl));
this.rysUrl = settings.rysUrl();
this.bookUrl = settings.bookUrl();
}
/**
* 新建方案信息
......@@ -14,15 +15,18 @@ class FitaxschemeCtl extends CtlBase {
*/
async insertInfo(mobj, qobj, req) {
let pobj = mobj.d;
console.log("fitasschemeCtl:insertInfo:pobj--------------------" + JSON.stringify(pobj));
try {
if (!pobj.demand_code || !pobj.company_type || !pobj.taxpayer_type || !pobj.service_code || !pobj.number) {
return system.getResultError("fitaxschemeCtl/insertInfo 缺少必要参数!");
}
let res = await this.service.insertInfo(pobj);
console.log("fitasschemeCtl:insertInfo:res--------------------" + JSON.stringify(res));
//同步方案信息,获取方案编号(走队列,再写一个接收队列方案编号的方法,将方案编号更新到数据库 融易算接口文档2.2)
//构造参数
let pushObj = this.buildObj(pobj);
system.queueOper(pushObj);
console.log("fitasschemeCtl:insertInfo:queueOper--------------------新建方案成功" );
return system.getResult("新建方案成功!");
} catch (error) {
console.log("fitaxschemeCtl/insertInfo---------------------------------------------------------------- " + error);
......@@ -72,9 +76,25 @@ class FitaxschemeCtl extends CtlBase {
}
}
async testCreateProposal(pobj){
console.log("testCreateProposal-------------------");
return {
"requestId": "d51aa427-738f-4bed-b48d-282da0a74432",
"status":1,
"success": true,
"errorCode": 0,
"errorMsg": "ok",
"data": {
"SolutionBizId": "S20200612152149000001"
}
}
}
buildObj(pobj) {
let pushUrl = this.rysUrl + "leads/proposal/create";
let notifyUrl = "http://book.com/web/bizchance/fitaxschemeCtl/updateInfo";
//let pushUrl = this.rysUrl + "leads/proposal/create";
let pushUrl = this.rysUrl + "/web/bizchance/fitaxschemeCtl/testCreateProposal";
let notifyUrl = this.bookUrl + "/web/bizchance/fitaxschemeCtl/updateInfo";
let companyType, sreaCode, quantity, taxQualify;
if (pobj.company_type) { //公司类型
if (pobj.company_type == "商业型") {
......
......@@ -139,10 +139,13 @@ const feedbackToRys = async (data) => {
}
}
let resData = await system.queueOper({
pushUrl: this.rysUrl + "service/feedback",
//pushUrl: this.rysUrl + "service/feedback",
pushUrl: this.rysUrl + "/web/bizchance/deliverybillCtl/testfeedback",
actionType: "feedback",
messageBody: reqData,
headData: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ',
'XAPPKEY': 'f6b59b74-f943-4735-bb86-e05d6b7fd78e',
'Source': 'GSB'
},
requestId: uuidv4()
......
......@@ -59,11 +59,18 @@ var settings = {
return "http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard";
}
},
rysUrl: function () {
rysUrl: function () {//先和bookurl一样,后续再调整
if (this.env == "localhost") {
return "http://";
return "http://192.168.1.6:8889";
} else {
return "http://";
return "http://bookdeliver-service";
}
},
bookUrl: function () {
if (this.env == "localhost") {
return "http://192.168.1.6:8889";
} else {
return "http://bookdeliver-service";
}
},
ftConfig: function () {
......
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