Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a62b7b4d
Commit
a62b7b4d
authored
Sep 14, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
e11694a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
9 deletions
+87
-9
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+22
-2
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+29
-1
tx-fi-tax/app/base/controller/impl/bizchance/fitaxschemeCtl.js
+22
-2
tx-fi-tax/app/base/utils/toFtClient.js
+4
-1
tx-fi-tax/app/config/settings.js
+10
-3
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
a62b7b4d
...
@@ -129,6 +129,7 @@ class BizOptCtl extends CtlBase {
...
@@ -129,6 +129,7 @@ class BizOptCtl extends CtlBase {
//根据需求编号去更新该条需求的状态为已关闭
//根据需求编号去更新该条需求的状态为已关闭
try
{
try
{
let
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
let
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
console
.
log
(
"bizoptCtl:updateStatusByDemandCode-----------------"
,
JSON
.
stringify
(
res
));
//添加到记录表
//添加到记录表
pobj
.
operator
=
{
pobj
.
operator
=
{
...
@@ -141,7 +142,7 @@ class BizOptCtl extends CtlBase {
...
@@ -141,7 +142,7 @@ class BizOptCtl extends CtlBase {
remarks
:
pobj
.
remarks
remarks
:
pobj
.
remarks
}
}
let
recordRes
=
await
this
.
operationrecordSve
.
insertInfo
(
pobj
);
let
recordRes
=
await
this
.
operationrecordSve
.
insertInfo
(
pobj
);
console
.
log
(
"bizoptCtl:operationrecordSve-----------------"
,
JSON
.
stringify
(
recordRes
));
//异步将该需求关闭信息同步到其他系统(走队列,融易算接口文档2.3)
//异步将该需求关闭信息同步到其他系统(走队列,融易算接口文档2.3)
//构造参数,添加判断(有方案信息的才走队列同步到融易算,没有的直接关闭)
//构造参数,添加判断(有方案信息的才走队列同步到融易算,没有的直接关闭)
let
schemeRes
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
let
schemeRes
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
...
@@ -151,14 +152,31 @@ class BizOptCtl extends CtlBase {
...
@@ -151,14 +152,31 @@ class BizOptCtl extends CtlBase {
}
else
{
}
else
{
console
.
log
(
pobj
.
demand_code
+
"该需求没有方案信息,不需要同步"
);
console
.
log
(
pobj
.
demand_code
+
"该需求没有方案信息,不需要同步"
);
}
}
console
.
log
(
"bizoptCtl:closeBizopt-----------------关闭需求成功"
);
return
system
.
getResult
(
"关闭需求成功!"
);
return
system
.
getResult
(
"关闭需求成功!"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"bizoptCtl/closeBizopt 关闭需求出错------------------"
,
error
);
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 关闭需求出错!"
);
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
)
{
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
;
let
solutionBizId
;
if
(
schemeRes
.
solution_bizid
)
{
if
(
schemeRes
.
solution_bizid
)
{
solutionBizId
=
schemeRes
.
solution_bizid
;
solutionBizId
=
schemeRes
.
solution_bizid
;
...
@@ -175,6 +193,8 @@ class BizOptCtl extends CtlBase {
...
@@ -175,6 +193,8 @@ class BizOptCtl extends CtlBase {
}
}
},
},
headData
:
{
headData
:
{
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ'
,
'XAPPKEY'
:
'f6b59b74-f943-4735-bb86-e05d6b7fd78e'
,
'Source'
:
'GSB'
'Source'
:
'GSB'
}
}
}
}
...
...
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
a62b7b4d
...
@@ -422,6 +422,19 @@ class DeliverybillCtl extends CtlBase {
...
@@ -422,6 +422,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
)
{
async
confirmPaperPost
(
pobj
,
qobj
,
req
)
{
...
@@ -441,10 +454,13 @@ class DeliverybillCtl extends CtlBase {
...
@@ -441,10 +454,13 @@ class DeliverybillCtl extends CtlBase {
}
}
}
}
var
pushObj
=
{
var
pushObj
=
{
"pushUrl"
:
this
.
rysUrl
+
"service/paperPost/confirm"
,
//"pushUrl": this.rysUrl + "service/paperPost/confirm",
"pushUrl"
:
this
.
rysUrl
+
"/web/bizchance/deliverybillCtl/testPaperPostConfirm"
,
"actionType"
:
"confirm"
,
"actionType"
:
"confirm"
,
"messageBody"
:
param
,
"messageBody"
:
param
,
"headData"
:
{
"headData"
:
{
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ'
,
'XAPPKEY'
:
'f6b59b74-f943-4735-bb86-e05d6b7fd78e'
,
'Source'
:
'GSB'
'Source'
:
'GSB'
},
},
"requestId"
:
uuidv4
()
"requestId"
:
uuidv4
()
...
@@ -457,6 +473,17 @@ class DeliverybillCtl extends CtlBase {
...
@@ -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
;
module
.
exports
=
DeliverybillCtl
;
\ No newline at end of file
tx-fi-tax/app/base/controller/impl/bizchance/fitaxschemeCtl.js
View file @
a62b7b4d
...
@@ -7,6 +7,7 @@ class FitaxschemeCtl extends CtlBase {
...
@@ -7,6 +7,7 @@ class FitaxschemeCtl extends CtlBase {
constructor
()
{
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
FitaxschemeCtl
));
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
FitaxschemeCtl
));
this
.
rysUrl
=
settings
.
rysUrl
();
this
.
rysUrl
=
settings
.
rysUrl
();
this
.
bookUrl
=
settings
.
bookUrl
();
}
}
/**
/**
* 新建方案信息
* 新建方案信息
...
@@ -14,15 +15,18 @@ class FitaxschemeCtl extends CtlBase {
...
@@ -14,15 +15,18 @@ class FitaxschemeCtl extends CtlBase {
*/
*/
async
insertInfo
(
mobj
,
qobj
,
req
)
{
async
insertInfo
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
let
pobj
=
mobj
.
d
;
console
.
log
(
"fitasschemeCtl:insertInfo:pobj--------------------"
+
JSON
.
stringify
(
pobj
));
try
{
try
{
if
(
!
pobj
.
demand_code
||
!
pobj
.
company_type
||
!
pobj
.
taxpayer_type
||
!
pobj
.
service_code
||
!
pobj
.
number
)
{
if
(
!
pobj
.
demand_code
||
!
pobj
.
company_type
||
!
pobj
.
taxpayer_type
||
!
pobj
.
service_code
||
!
pobj
.
number
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 缺少必要参数!"
);
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 缺少必要参数!"
);
}
}
let
res
=
await
this
.
service
.
insertInfo
(
pobj
);
let
res
=
await
this
.
service
.
insertInfo
(
pobj
);
console
.
log
(
"fitasschemeCtl:insertInfo:res--------------------"
+
JSON
.
stringify
(
res
));
//同步方案信息,获取方案编号(走队列,再写一个接收队列方案编号的方法,将方案编号更新到数据库 融易算接口文档2.2)
//同步方案信息,获取方案编号(走队列,再写一个接收队列方案编号的方法,将方案编号更新到数据库 融易算接口文档2.2)
//构造参数
//构造参数
let
pushObj
=
this
.
buildObj
(
pobj
);
let
pushObj
=
this
.
buildObj
(
pobj
);
system
.
queueOper
(
pushObj
);
system
.
queueOper
(
pushObj
);
console
.
log
(
"fitasschemeCtl:insertInfo:queueOper--------------------新建方案成功"
);
return
system
.
getResult
(
"新建方案成功!"
);
return
system
.
getResult
(
"新建方案成功!"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"fitaxschemeCtl/insertInfo---------------------------------------------------------------- "
+
error
);
console
.
log
(
"fitaxschemeCtl/insertInfo---------------------------------------------------------------- "
+
error
);
...
@@ -72,9 +76,25 @@ class FitaxschemeCtl extends CtlBase {
...
@@ -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
)
{
buildObj
(
pobj
)
{
let
pushUrl
=
this
.
rysUrl
+
"leads/proposal/create"
;
//let pushUrl = this.rysUrl + "leads/proposal/create";
let
notifyUrl
=
"http://book.com/web/bizchance/fitaxschemeCtl/updateInfo"
;
let
pushUrl
=
this
.
rysUrl
+
"/web/bizchance/fitaxschemeCtl/testCreateProposal"
;
let
notifyUrl
=
this
.
bookUrl
+
"/web/bizchance/fitaxschemeCtl/updateInfo"
;
let
companyType
,
sreaCode
,
quantity
,
taxQualify
;
let
companyType
,
sreaCode
,
quantity
,
taxQualify
;
if
(
pobj
.
company_type
)
{
//公司类型
if
(
pobj
.
company_type
)
{
//公司类型
if
(
pobj
.
company_type
==
"商业型"
)
{
if
(
pobj
.
company_type
==
"商业型"
)
{
...
...
tx-fi-tax/app/base/utils/toFtClient.js
View file @
a62b7b4d
...
@@ -139,10 +139,13 @@ const feedbackToRys = async (data) => {
...
@@ -139,10 +139,13 @@ const feedbackToRys = async (data) => {
}
}
}
}
let
resData
=
await
system
.
queueOper
({
let
resData
=
await
system
.
queueOper
({
pushUrl
:
this
.
rysUrl
+
"service/feedback"
,
//pushUrl: this.rysUrl + "service/feedback",
pushUrl
:
this
.
rysUrl
+
"/web/bizchance/deliverybillCtl/testfeedback"
,
actionType
:
"feedback"
,
actionType
:
"feedback"
,
messageBody
:
reqData
,
messageBody
:
reqData
,
headData
:
{
headData
:
{
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTg0MzQ2ODcsImlzcyI6InJFRVN6TU5ZUlM2RnBWNnZlY09vdExPNWdPcUNXSmFQIiwiaWF0IjoxNTk4NDMxMDg3fQ.isQ40HqHHfJ-rTsUQOhRIdu4XCitZU-AfzeqSH4kPbQ'
,
'XAPPKEY'
:
'f6b59b74-f943-4735-bb86-e05d6b7fd78e'
,
'Source'
:
'GSB'
'Source'
:
'GSB'
},
},
requestId
:
uuidv4
()
requestId
:
uuidv4
()
...
...
tx-fi-tax/app/config/settings.js
View file @
a62b7b4d
...
@@ -59,11 +59,18 @@ var settings = {
...
@@ -59,11 +59,18 @@ var settings = {
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
return
"http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
}
}
},
},
rysUrl
:
function
()
{
rysUrl
:
function
()
{
//先和bookurl一样,后续再调整
if
(
this
.
env
==
"localhost"
)
{
if
(
this
.
env
==
"localhost"
)
{
return
"http://"
;
return
"http://
192.168.1.6:8889
"
;
}
else
{
}
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
()
{
ftConfig
:
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment