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
4c54a18e
Commit
4c54a18e
authored
Aug 27, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax
parents
90a91d84
214712b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
33 deletions
+50
-33
tx-fi-tax/app/base/api/impl/common/apps.js
+2
-2
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+48
-31
No files found.
tx-fi-tax/app/base/api/impl/common/apps.js
View file @
4c54a18e
...
@@ -7,8 +7,8 @@ class AppAPI extends APIBase {
...
@@ -7,8 +7,8 @@ class AppAPI extends APIBase {
this
.
appS
=
system
.
getObject
(
"service.common.appSve"
);
this
.
appS
=
system
.
getObject
(
"service.common.appSve"
);
}
}
async
create
(
pobj
,
q
,
req
){
async
create
(
pobj
,
q
,
req
){
//
console.log("oooooooooooooooooooooooooooooooooooooooooooooooo")
console
.
log
(
"oooooooooooooooooooooooooooooooooooooooooooooooo"
)
//
console.log(req.xctx)
console
.
log
(
req
.
xctx
)
let
rtn
=
this
.
appS
.
create
(
pobj
,
q
,
req
);
let
rtn
=
this
.
appS
.
create
(
pobj
,
q
,
req
);
return
system
.
getResult
(
rtn
);
return
system
.
getResult
(
rtn
);
}
}
...
...
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
4c54a18e
...
@@ -146,8 +146,9 @@ class DeliverybillCtl extends CtlBase {
...
@@ -146,8 +146,9 @@ class DeliverybillCtl extends CtlBase {
// 创建融易算服务实例
// 创建融易算服务实例
async
insertInfo
(
mobj
,
qobj
,
req
)
{
async
insertInfo
(
mobj
,
qobj
,
req
)
{
console
.
log
(
'mobj--------------------------------'
,
mobj
);
try
{
try
{
var
pobj
=
mobj
.
actionBody
.
messageBody
;
var
pobj
=
mobj
.
actionBody
;
var
cachestr
=
sha235
(
JSON
.
stringify
(
pobj
));
var
cachestr
=
sha235
(
JSON
.
stringify
(
pobj
));
var
cacheInfo
=
await
this
.
cacheManager
[
"TxCache"
].
getCache
(
cachestr
);
var
cacheInfo
=
await
this
.
cacheManager
[
"TxCache"
].
getCache
(
cachestr
);
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
...
@@ -178,12 +179,15 @@ class DeliverybillCtl extends CtlBase {
...
@@ -178,12 +179,15 @@ class DeliverybillCtl extends CtlBase {
obj
.
source_name
=
"tencentCloud"
;
obj
.
source_name
=
"tencentCloud"
;
pobj
.
contactsPhone
=
pobj
.
contactMobile
;
pobj
.
contactsPhone
=
pobj
.
contactMobile
;
delete
pobj
.
contactMobile
;
delete
pobj
.
contactMobile
;
// if (pobj.taxpayerType == 1) {
if
(
pobj
.
taxpayerType
==
1
)
{
// pobj.taxpayerName = "generalTaxpayer";
pobj
.
taxpayerType
=
"generalTaxpayer"
;
// }
pobj
.
taxpayerName
=
"一般纳税人"
;
// else if (pobj.taxpayerType == 2) {
// pobj.taxpayerName = "smallScaleTaxpayer";
}
// }
else
if
(
pobj
.
taxpayerType
==
2
)
{
pobj
.
taxpayerType
=
"smallScaleTaxpayer"
;
pobj
.
taxpayerName
=
"小规模纳税人"
;
}
obj
.
delivery_info
=
pobj
;
obj
.
delivery_info
=
pobj
;
obj
.
biz_id
=
pobj
.
bizId
;
obj
.
biz_id
=
pobj
.
bizId
;
var
buInfo
=
await
this
.
service
.
insertInfo
(
obj
);
var
buInfo
=
await
this
.
service
.
insertInfo
(
obj
);
...
@@ -209,7 +213,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -209,7 +213,7 @@ class DeliverybillCtl extends CtlBase {
//更新融易算服务实例
//更新融易算服务实例
async
updateServer
(
mobj
,
qobj
,
req
)
{
async
updateServer
(
mobj
,
qobj
,
req
)
{
try
{
try
{
var
pobj
=
mobj
.
actionBody
.
messageBody
;
var
pobj
=
mobj
.
actionBody
;
var
cachestr
=
sha235
(
JSON
.
stringify
(
pobj
));
var
cachestr
=
sha235
(
JSON
.
stringify
(
pobj
));
var
cacheInfo
=
await
this
.
cacheManager
[
"TxCache"
].
getCache
(
cachestr
);
var
cacheInfo
=
await
this
.
cacheManager
[
"TxCache"
].
getCache
(
cachestr
);
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
if
(
cacheInfo
&&
cacheInfo
!=
'undefined'
)
{
...
@@ -230,6 +234,15 @@ class DeliverybillCtl extends CtlBase {
...
@@ -230,6 +234,15 @@ class DeliverybillCtl extends CtlBase {
delete
pobj
.
companyBizType
;
delete
pobj
.
companyBizType
;
pobj
.
creditCode
=
pobj
.
uscc
;
pobj
.
creditCode
=
pobj
.
uscc
;
delete
pobj
.
uscc
;
delete
pobj
.
uscc
;
if
(
pobj
.
taxpayerType
==
1
)
{
pobj
.
taxpayerType
=
"generalTaxpayer"
;
pobj
.
taxpayerName
=
"一般纳税人"
;
}
else
if
(
pobj
.
taxpayerType
==
2
)
{
pobj
.
taxpayerType
=
"smallScaleTaxpayer"
;
pobj
.
taxpayerName
=
"小规模纳税人"
;
}
obj
=
{
obj
=
{
"delivery_code"
:
pobj
.
orderId
+
"_book"
,
"delivery_code"
:
pobj
.
orderId
+
"_book"
,
"delivery_info"
:
pobj
,
"delivery_info"
:
pobj
,
...
@@ -267,32 +280,36 @@ class DeliverybillCtl extends CtlBase {
...
@@ -267,32 +280,36 @@ class DeliverybillCtl extends CtlBase {
return
system
.
getResult
(
null
,
err
.
message
)
return
system
.
getResult
(
null
,
err
.
message
)
}
}
}
}
async
portog
(){
console
.
log
(
settings
.
port
);
}
}
}
module
.
exports
=
DeliverybillCtl
;
module
.
exports
=
DeliverybillCtl
;
//
var task = new DeliverybillCtl();
var
task
=
new
DeliverybillCtl
();
//
var obj = {
var
obj
=
{
//
"actionType": "produceData",
"actionType"
:
"produceData"
,
//
"actionBody": {
"actionBody"
:
{
//
"pushUrl": "http://ic.com:8000/web/bizchance/deliverybillCtl",
"pushUrl"
:
"http://ic.com:8000/web/bizchance/deliverybillCtl"
,
//
"actionType": "insertInfo",
"actionType"
:
"insertInfo"
,
//
"identifyCode": "book-manage",
"identifyCode"
:
"book-manage"
,
//
"messageBody": {
"messageBody"
:
{
//
"requestId": "825da0a74432-738f-4bed-468d-d51aa880",
"requestId"
:
"825da0a74432-738f-4bed-468d-d51aa880"
,
//
"bizId": "2292748809",
"bizId"
:
"2292748809"
,
//
"userId": "24173452443103825",
"userId"
:
"24173452443103825"
,
//
"orderId": "235184456620496",
"orderId"
:
"235184456620496"
,
//
"areatype": "city",
"areatype"
:
"city"
,
//
"area": "100010",
"area"
:
"100010"
,
//
"topOrgCode": "rong_yi_suan",
"topOrgCode"
:
"rong_yi_suan"
,
//
"taxpayerType": 1,
"taxpayerType"
:
1
,
//
"contactMobile": "18510669321"
"contactMobile"
:
"18510669321"
//
}
}
//
}
}
//
}
}
// task.insertInfo(obj, {}, {}
).then(d => {
task
.
portog
(
).
then
(
d
=>
{
//
console.log(JSON.stringify(d));
console
.
log
(
JSON
.
stringify
(
d
));
//
})
})
// var obj = {
// var obj = {
// "actionType": "produceData",
// "actionType": "produceData",
...
...
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