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
ac09ebff
Commit
ac09ebff
authored
Apr 14, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xgg-saas-platform' of gitlab.gongsibao.com:jiangyong/zhichan into xgg-saas-platform
parents
09197c69
b4dc8e77
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
223 additions
and
8 deletions
+223
-8
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
+18
-1
xgg-saas-platform/app/base/service/impl/saas/saasinvoiceSve.js
+43
-2
xgg-saas-platform/app/base/service/impl/trade/tradeSve.js
+5
-0
xgg-saas-platform/app/base/system.js
+1
-1
xgg-saas-platform/app/config/settings.js
+5
-3
xgg-saas-platform/app/front/entry/public/apidoc/saas/invoice.md
+151
-1
No files found.
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
View file @
ac09ebff
...
@@ -9,7 +9,6 @@ class InvoiceCtl extends CtlBase {
...
@@ -9,7 +9,6 @@ class InvoiceCtl extends CtlBase {
super
();
super
();
this
.
saasinvoiceSve
=
system
.
getObject
(
"service.saas.saasinvoiceSve"
);
this
.
saasinvoiceSve
=
system
.
getObject
(
"service.saas.saasinvoiceSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.saas.orderSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.saas.orderSve"
);
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
}
...
@@ -373,6 +372,24 @@ class InvoiceCtl extends CtlBase {
...
@@ -373,6 +372,24 @@ class InvoiceCtl extends CtlBase {
}
}
}
}
/**
* 发票账单列表
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async
invoiceOrder
(
params
,
pobj2
,
req
){
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`发票ID 不能为空`
);
}
try
{
return
await
this
.
saasinvoiceSve
.
invoiceOrder
(
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
...
...
xgg-saas-platform/app/base/service/impl/saas/saasinvoiceSve.js
View file @
ac09ebff
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../svems.base"
)
const
ServiceBase
=
require
(
"../../svems.base"
)
const
settings
=
require
(
"../../../../config/settings"
)
const
settings
=
require
(
"../../../../config/settings"
)
const
axios
=
require
(
"axios"
);
class
SaasinvoiceService
extends
ServiceBase
{
class
SaasinvoiceService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
DEFAULT_BUSINESSMEN_TYPE
=
"10"
;
//默认的 销售方类型 个体工商户
this
.
DEFAULT_BUSINESSMEN_TYPE
=
"10"
;
//默认的 销售方类型 个体工商户
this
.
DEFAULT_CHANNEL_ID
=
"2"
;
//默认的 渠道类型
this
.
DEFAULT_CHANNEL_ID
=
"2"
;
//默认的 渠道类型
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
}
}
async
platforminvoicePage
(
params
)
{
async
platforminvoicePage
(
params
)
{
...
@@ -134,7 +137,44 @@ class SaasinvoiceService extends ServiceBase {
...
@@ -134,7 +137,44 @@ class SaasinvoiceService extends ServiceBase {
"value_added_tax"
:
invoice
.
value_added_tax
||
0
,
"value_added_tax"
:
invoice
.
value_added_tax
||
0
,
"channel_id"
:
this
.
DEFAULT_CHANNEL_ID
"channel_id"
:
this
.
DEFAULT_CHANNEL_ID
}
}
return
await
this
.
callms
(
"invoice"
,
"invoiceApply"
,
params
);
let
url
=
settings
.
deliverSysApi
().
pushInvoiceToDeliver
;
let
res
=
await
axios
({
method
:
'post'
,
url
:
url
,
data
:
params
});
console
.
log
(
res
.
data
);
}
}
/**
* 发票详情
* @param {*} params
*/
async
invoiceOrder
(
params
){
try
{
let
saasInvoiceApply
=
await
this
.
callms
(
"invoice"
,
"saasInvoiceInfo"
,
params
);
if
(
saasInvoiceApply
.
status
!=
0
||
!
saasInvoiceApply
.
data
){
return
system
.
getResult
(
null
,
`系统错误`
);
}
saasInvoiceApply
=
saasInvoiceApply
.
data
;
let
tradOrder
=
[];
if
(
saasInvoiceApply
.
fee_type
==
"00"
){
//个体户注册订单
tradOrder
=
[];
}
else
{
//查询流水
let
tradOrderRes
=
await
this
.
tradeSve
.
invoiceTrade
({
id
:
saasInvoiceApply
.
id
,
order_type
:
saasInvoiceApply
.
fee_type
});
if
(
tradOrderRes
.
status
==
0
){
tradOrder
=
tradOrderRes
.
data
;
}
}
saasInvoiceApply
.
tradOrder
=
tradOrder
;
return
system
.
getResult
(
saasInvoiceApply
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
module
.
exports
=
SaasinvoiceService
;
module
.
exports
=
SaasinvoiceService
;
\ No newline at end of file
xgg-saas-platform/app/base/service/impl/trade/tradeSve.js
View file @
ac09ebff
...
@@ -90,6 +90,11 @@ class TradeService extends ServiceBase {
...
@@ -90,6 +90,11 @@ class TradeService extends ServiceBase {
return
rs
;
return
rs
;
}
}
async
invoiceTrade
(
params
)
{
let
rs
=
await
this
.
callms
(
"trade"
,
"invoiceTrade"
,
params
)
||
{};
return
rs
;
}
async
tradeFeedBack
(
params
)
{
async
tradeFeedBack
(
params
)
{
let
rs
=
await
this
.
callms
(
"trade"
,
"itemTradeOfflineCB"
,
params
)
||
{};
let
rs
=
await
this
.
callms
(
"trade"
,
"itemTradeOfflineCB"
,
params
)
||
{};
return
rs
;
return
rs
;
...
...
xgg-saas-platform/app/base/system.js
View file @
ac09ebff
...
@@ -200,7 +200,7 @@ class System {
...
@@ -200,7 +200,7 @@ class System {
order
:
dev
+
":3103"
+
path
,
order
:
dev
+
":3103"
+
path
,
// 发票服务
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
invoice
:
local
+
":3105"
+
path
,
// 用户服务
// 用户服务
uc
:
dev
+
":3106"
+
path
,
uc
:
dev
+
":3106"
+
path
,
...
...
xgg-saas-platform/app/config/settings.js
View file @
ac09ebff
...
@@ -90,8 +90,8 @@ var settings = {
...
@@ -90,8 +90,8 @@ var settings = {
deliverSysApi
:
function
()
{
deliverSysApi
:
function
()
{
let
domain
=
""
;
let
domain
=
""
;
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
domain
=
"http://39.107.234.14:3002"
;
//
domain = "http://39.107.234.14:3002";
//
domain = "http://127.0.0.1:3002";
domain
=
"http://127.0.0.1:3002"
;
}
else
{
}
else
{
domain
=
"https://xggadmin.gongsibao.com"
;
domain
=
"https://xggadmin.gongsibao.com"
;
}
}
...
@@ -99,7 +99,9 @@ var settings = {
...
@@ -99,7 +99,9 @@ var settings = {
// 推送订单s
// 推送订单s
orderPushApi
:
domain
+
"/web/order/orderCtl/addSourceOrder"
,
orderPushApi
:
domain
+
"/web/order/orderCtl/addSourceOrder"
,
//发票是试算
//发票是试算
calcInvoice
:
domain
+
"/web/invoice/invoiceCtl/calcInvoice"
calcInvoice
:
domain
+
"/web/invoice/invoiceCtl/calcInvoice"
,
//推送发票申请
pushInvoiceToDeliver
:
domain
+
"/web/invoice/invoiceCtl/pushInvoiceToDeliver"
,
}
}
},
},
paasUrl
:
function
()
{
paasUrl
:
function
()
{
...
...
xgg-saas-platform/app/front/entry/public/apidoc/saas/invoice.md
View file @
ac09ebff
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
1.
[
平台发票申请列表
](
#platformApplyPage
)
1.
[
平台发票申请列表
](
#platformApplyPage
)
1.
[
平台发票申请-审核
](
#platformAudit
)
1.
[
平台发票申请-审核
](
#platformAudit
)
1.
[
平台发票申请-发票办理
](
#platformHandle
)
1.
[
平台发票申请-发票办理
](
#platformHandle
)
1.
[
平台查询发票详情
](
#invoiceOrder
)
1.
[
发票列表
](
#invoicePage
)
1.
[
发票列表
](
#invoicePage
)
...
@@ -708,3 +708,152 @@ status == 1010 发票办理
...
@@ -708,3 +708,152 @@ status == 1010 发票办理
}
}
```
```
## **<a name="invoiceOrder"> 平台查询发票详情 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/saas/invoiceCtl/invoiceOrder
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 `POST`
```
javascript
{
"id"
:
"11091789235001142"
,
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
**示例**
```
javascript
{
"status"
:
0
,
"msg"
:
"操作成功"
,
"data"
:
{
"id"
:
"11091789235001142"
,
"saas_id"
:
"10000"
,
"saas_merchant_id"
:
"11248111258000991"
,
"parent_id"
:
"11091769149000453"
,
"batch_no"
:
"13295393796003361"
,
"owner_type"
:
"10"
,
"fee_type"
:
"10"
,
"invoice_type"
:
"30"
,
"invoice_amount"
:
200000
,
//价税合计总额
"status"
:
"1050"
,
"audit_remark"
:
null
,
"sve_invoice_id"
:
""
,
"apply_no"
:
"11874538320003399"
,
//发票申请编号
"from_name"
:
"name4"
,
"from_credit_code"
:
"TMAH78917902114178"
,
"from_addr"
:
"好的好的和"
,
"from_mobile"
:
"18833836395"
,
"from_bank"
:
"张哈哈哈"
,
"from_account"
:
"1377373"
,
"to_name"
:
"name"
,
//抬头名称
"to_credit_code"
:
"credit_code-1"
,
//社会统一信用代码
"to_addr"
:
"addr-1"
,
//地址
"to_mobile"
:
"mobile-1"
,
//联系电话
"to_bank"
:
"bank_name"
,
//银行
"to_account"
:
"bank_account"
,
//账号
"mail_to"
:
"10"
,
//邮寄人
"mail_mobile"
:
"10"
,
//邮寄电话
"mail_addr"
:
"10"
,
//邮寄地址
"personal_invoice_tax"
:
null
,
//个税
"additional_tax"
:
null
,
//附加税
"value_added_tax"
:
null
,
//增值税
"service_tax"
:
null
,
//服务费
"unit"
:
null
,
"quantity"
:
null
,
"price"
:
null
,
"remark"
:
null
,
"created_at"
:
"2020-04-12 18:32:50"
,
//申请时间
"updated_at"
:
"2020-04-12 18:32:50"
,
"deleted_at"
:
null
,
"version"
:
0
,
"fee_type_name"
:
"平台转账费用"
,
//服务类型
"saasInvoice"
:
null
,
"invoice_type_name"
:
"普通发票"
,
//发票类型
"saasInvoice"
:
{
"id"
:
"11091789235001142"
,
"saas_id"
:
"saas_id"
,
"saas_merchant_id"
:
"11248111258000991"
,
"batch_no"
:
"batch_no"
,
"owner_type"
:
"10"
,
"fee_type"
:
"10"
,
"invoice_type"
:
"10"
,
"province"
:
"province"
,
"invoice_join"
:
"10"
,
"invoice_no"
:
"invoice_no"
,
"invoice_number"
:
"invoice_number"
,
"invoice_time"
:
"2020-04-09T13:32:06.000Z"
,
"invoice_amount"
:
1
,
"invoice_img"
:
null
,
//发票图片
"sve_invoice_id"
:
"sve_invoice_id"
,
"apply_no"
:
"apply_no"
,
"from_name"
:
"from_name"
,
"from_credit_code"
:
"from_credit_code"
,
"from_addr"
:
"from_addr"
,
"from_mobile"
:
"from_mobile"
,
"from_bank"
:
"from_bank"
,
"from_account"
:
"from_account"
,
"to_name"
:
"to_name"
,
"to_credit_code"
:
"to_credit_code"
,
"to_addr"
:
"to_addr"
,
"to_mobile"
:
"to_mobile"
,
"to_bank"
:
"to_bank"
,
"to_account"
:
"to_account"
,
"mail_to"
:
"mail_to"
,
"mail_mobile"
:
"mail_mobile"
,
"mail_addr"
:
"mail_addr"
,
"mail_no"
:
null
,
//快递单号
"personal_invoice_tax"
:
10
,
"additional_tax"
:
1
,
"value_added_tax"
:
1
,
"service_tax"
:
1
,
"summary"
:
"summary"
,
"created_at"
:
"2020-04-09T13:31:40.000Z"
,
"updated_at"
:
"2020-04-09T13:31:42.000Z"
,
"deleted_at"
:
null
,
"version"
:
0
},
"tradOrder"
:
[
//账单列表
{
"id"
:
1001004
,
"trade_no"
:
"T10010048046185"
,
"saas_merchant_id"
:
"11248111258000991"
,
"order_id"
:
"1298386418003804"
,
"order_type"
:
"10"
,
"out_trade_no"
:
"13695998839234974"
,
"acc_name"
:
"张王李兆"
,
"credit_code"
:
"92321311MA205KN09Y"
,
"acc_no"
:
"12314213"
,
"open_bank"
:
"12312"
,
"amt"
:
12344500
,
"actual_amt"
:
12344500
,
"deduct_amt"
:
12591390
,
"service_tax"
:
246890
,
"trade_status"
:
"01"
,
"trade_time"
:
null
,
"trade_desc"
:
""
,
"trade_receipt"
:
""
,
"remark"
:
"15"
,
"saas_id"
:
"10000"
,
"saas_invoice_id"
:
"11091789235001142"
,
"created_at"
:
"2020-04-03 11:33:21"
,
"updated_at"
:
"2020-04-03 11:33:21"
,
"deleted_at"
:
null
,
"version"
:
0
}
]
},
"bizmsg"
:
"empty"
}
```
\ No newline at end of file
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