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
c7604fb6
Commit
c7604fb6
authored
Jan 20, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
ed2b4c56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
2 deletions
+84
-2
xgg-admin/app/base/api/api.base.js
+2
-1
xgg-admin/app/base/api/impl/test/testApi.js
+18
-0
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
+64
-1
No files found.
xgg-admin/app/base/api/api.base.js
View file @
c7604fb6
...
@@ -60,7 +60,8 @@ class APIBase extends DocBase {
...
@@ -60,7 +60,8 @@ class APIBase extends DocBase {
var
fullname
=
gname
+
"."
+
methodname
;
var
fullname
=
gname
+
"."
+
methodname
;
var
lst
=
[
var
lst
=
[
"test.testApi"
,
"test.testApi"
,
"test.testOrder"
"test.testOrder"
,
"test.testInvoice"
,
];
];
var
x
=
lst
.
indexOf
(
fullname
);
var
x
=
lst
.
indexOf
(
fullname
);
return
x
>=
0
;
return
x
>=
0
;
...
...
xgg-admin/app/base/api/impl/test/testApi.js
View file @
c7604fb6
...
@@ -5,6 +5,8 @@ class TestAPI extends APIBase {
...
@@ -5,6 +5,8 @@ class TestAPI extends APIBase {
super
();
super
();
this
.
orderSve
=
system
.
getObject
(
"service.order.orderSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.order.orderSve"
);
this
.
platformUtils
=
system
.
getObject
(
"util.businessManager.opPlatformUtils"
);
this
.
platformUtils
=
system
.
getObject
(
"util.businessManager.opPlatformUtils"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
}
}
async
test
(
pobj
,
query
,
req
)
{
async
test
(
pobj
,
query
,
req
)
{
// var tmp = await this.orderSve.createLicense(pobj.action_body);
// var tmp = await this.orderSve.createLicense(pobj.action_body);
...
@@ -33,6 +35,22 @@ class TestAPI extends APIBase {
...
@@ -33,6 +35,22 @@ class TestAPI extends APIBase {
return
"success"
;
return
"success"
;
}
}
async
testInvoice
()
{
let
params
=
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498757"
,
userId
:
43
,
file
:
[
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_37001579517783654202020185623654wzr.jpg"
,
]
};
let
apiurl
=
"https://nga-api.gongsibao.com/nga-sass//billInfo/uploadFileForAliyun"
;
console
.
log
(
apiurl
,
params
);
let
rs
=
await
this
.
restClient
.
execPost
(
params
,
apiurl
);
console
.
log
(
rs
);
}
exam
()
{
exam
()
{
return
""
;
return
""
;
}
}
...
...
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
View file @
c7604fb6
...
@@ -104,6 +104,45 @@ class InvoiceService extends ServiceBase {
...
@@ -104,6 +104,45 @@ class InvoiceService extends ServiceBase {
"dstatus"
:
"1060"
,
"dstatus"
:
"1060"
,
}
}
};
};
this
.
invoiceConfig
=
{
498757
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498757"
,
userId
:
43
,
},
498758
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498758"
,
userId
:
43
,
},
498759
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498759"
,
userId
:
43
,
},
498760
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498760"
,
userId
:
43
,
},
498765
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498765"
,
userId
:
43
,
},
498763
:
{
uploadPeriod
:
"201910"
,
companyId
:
"102"
,
customerId
:
"498763"
,
userId
:
43
,
},
}
}
}
async
apiCalcInvoice
(
pobj
)
{
async
apiCalcInvoice
(
pobj
)
{
...
@@ -547,13 +586,37 @@ class InvoiceService extends ServiceBase {
...
@@ -547,13 +586,37 @@ class InvoiceService extends ServiceBase {
}
}
var
rs
=
await
this
.
callms
(
"invoice"
,
"platformAssignment"
,
pobj
);
var
rs
=
await
this
.
callms
(
"invoice"
,
"platformAssignment"
,
pobj
);
if
(
rs
.
status
==
0
)
{
if
(
rs
.
status
==
0
)
{
this
.
pushDeliver
(
pobj
);
// this.pushDeliver(pobj);
console
.
log
(
pobj
);
this
.
sendInvoiceToDz
(
pobj
);
return
rs
;
return
rs
;
}
else
{
}
else
{
return
system
.
getResult
(
null
,
rs
.
msg
);
return
system
.
getResult
(
null
,
rs
.
msg
);
}
}
}
}
async
sendInvoiceToDz
(
obj
)
{
console
.
log
(
obj
,
"1111111111111111111111111111111111111111obj"
);
// 查发票
let
invoiceApply
=
await
this
.
callms
(
"invoice"
,
"queryInvoice"
,
{
id
:
obj
.
id
});
console
.
log
(
invoiceApply
,
"00000000000000000000000000000000000000000000000000000000000"
);
let
params
=
this
.
invoiceConfig
[
invoiceApply
.
merchantId
];
let
invoice
=
invoiceApply
.
data
.
invoice
||
{};
params
.
file
=
[
invoice
.
invoiceImg
,
]
let
apiurl
=
"https://nga-api.gongsibao.com/nga-sass//billInfo/uploadFileForAliyun"
;
console
.
log
(
apiurl
,
params
);
let
rs
=
await
this
.
restClient
.
execPost
(
params
,
apiurl
);
console
.
log
(
rs
,
"11111111111111111111111111111111111111111111111"
);
return
rs
;
}
/**
/**
* 交付商审批
* 交付商审批
* @param {*} pobj
* @param {*} pobj
...
...
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