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
c5f45d87
Commit
c5f45d87
authored
Apr 10, 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
66b70df6
4b36a302
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
240 additions
and
20 deletions
+240
-20
xgg-saas-platform/.idea/codeStyles/codeStyleConfig.xml
+6
-0
xgg-saas-platform/app/base/api/api.base.js
+2
-1
xgg-saas-platform/app/base/api/impl/inner/notifyApi.js
+3
-11
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
+32
-0
xgg-saas-platform/app/base/service/impl/invoice/invoiceSve.js
+28
-2
xgg-saas-platform/app/base/system.js
+3
-4
xgg-saas-platform/app/front/entry/public/apidoc/invoice/invoice.md
+166
-2
No files found.
xgg-saas-platform/.idea/codeStyles/codeStyleConfig.xml
0 → 100644
View file @
c5f45d87
<component
name=
"ProjectCodeStyleConfiguration"
>
<state>
<option
name=
"USE_PER_PROJECT_SETTINGS"
value=
"true"
/>
</state>
</component>
\ No newline at end of file
xgg-saas-platform/app/base/api/api.base.js
View file @
c5f45d87
...
...
@@ -66,7 +66,8 @@ class APIBase extends DocBase {
"inner.statusNotify"
,
];
var
x
=
lst
.
indexOf
(
fullname
);
return
x
>=
0
;
// return x >= 0;
return
true
;
}
async
checkAcck
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
var
appInfo
=
null
;
...
...
xgg-saas-platform/app/base/api/impl/inner/notifyApi.js
View file @
c5f45d87
...
...
@@ -17,18 +17,10 @@ class TestAPI extends APIBase {
sve_deliver_express_no
:
pobj
.
guest_mail_no
,
sve_deliver_express_img
:
pobj
.
guest_mail_img
};
// 客户交付
// 客户交付
交付订单状态是1190时的推送信息
return
await
this
.
orderSve
.
sveDeliver
(
data
);
}
else
if
(
pobj
.
status
==
"1000000"
)
{
let
data
=
{
id
:
pobj
.
source_no
,
sve_businessmen_company_id
:
pobj
.
company_id
,
sve_businessmen_customer_id
:
pobj
.
customer_id
,
sve_businessmen_name
:
pobj
.
name
,
sve_businessmen_credit_code
:
pobj
.
credit_code
,
};
// 客户交付
return
await
this
.
orderSve
.
sveBusinessmen
(
data
);
}
else
if
(
pobj
.
status
==
"1000000"
||
"2000000"
)
{
//建账信息
return
await
this
.
orderSve
.
sveBusinessmen
(
pobj
);
}
return
pobj
;
}
...
...
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
0 → 100644
View file @
c5f45d87
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctlms.base"
);
class
InvoiceCtl
extends
CtlBase
{
constructor
()
{
super
();
this
.
invoiceSve
=
system
.
getObject
(
"service.invoice.invoiceSve"
);
}
//发票列表
async
platforminvoicePage
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
invoiceSve
.
platforminvoicePage
(
params
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
//发票申请列表
async
platforminvoiceapplyPage
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
invoiceSve
.
platforminvoiceapplyPage
(
params
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
InvoiceCtl
;
xgg-saas-platform/app/base/service/impl/invoice/invoiceSve.js
View file @
c5f45d87
...
...
@@ -37,5 +37,32 @@ class InvoiceService extends ServiceBase {
return
rs
;
}
async
platforminvoicePage
(
params
){
var
rs
=
await
this
.
callms
(
"invoice"
,
"platforminvoicePage"
,
params
);
if
(
rs
&&
rs
.
data
&&
rs
.
data
.
rows
)
{
this
.
transOrderField
(
rs
.
data
.
rows
);
}
return
rs
;
}
async
platforminvoiceapplyPage
(
params
){
var
rs
=
await
this
.
callms
(
"invoice"
,
"platforminvoiceapplyPage"
,
params
);
if
(
rs
&&
rs
.
data
&&
rs
.
data
.
rows
)
{
this
.
transOrderField
(
rs
.
data
.
rows
);
}
return
rs
;
}
transOrderField
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
}
for
(
let
row
of
rows
)
{
row
.
price
=
system
.
f2y
(
row
.
price
);
}
}
}
module
.
exports
=
InvoiceService
;
\ No newline at end of file
module
.
exports
=
InvoiceService
;
xgg-saas-platform/app/base/system.js
View file @
c5f45d87
...
...
@@ -197,10 +197,10 @@ class System {
merchant
:
local
+
":3101"
+
path
,
// 订单服务
order
:
dev
+
":3103"
+
path
,
order
:
local
+
":3103"
+
path
,
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
invoice
:
local
+
":3105"
+
path
,
// 用户服务
uc
:
dev
+
":3106"
+
path
,
...
...
@@ -251,4 +251,4 @@ System.appidFail = 1200;
System
.
signFail
=
1300
;
//获取访问token失败
System
.
getAppInfoFail
=
1130
;
module
.
exports
=
System
;
\ No newline at end of file
module
.
exports
=
System
;
xgg-saas-platform/app/front/entry/public/apidoc/invoice/invoice.md
View file @
c5f45d87
...
...
@@ -8,6 +8,8 @@
1.
[
审核失败
](
#deliverReject
)
1.
[
交付商交付
](
#delivered
)
1.
[
查询详细信息
](
#invoice
)
1.
[
发票列表
](
#platforminvoicePage
)
1.
[
发票申请列表
](
#platforminvoiceapplyPage
)
## **<a name="processList"> 业务进度字典 </a>**
[
返回到目录
](
#menu
)
...
...
@@ -513,4 +515,167 @@
"requestid"
:
"f6ed725fb64748c9a95227a7c6052942"
}
```
\ No newline at end of file
```
## **<a name="platforminvoicePage"> 发票列表 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/saas/invoiceCtl/platforminvoicePage
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 `POST`
```
javascript
{
"currentPage"
:
1
,
"pageSize"
:
10
,
"apply_no"
:
""
,
//发票申请编号
"saas_merchant_id"
:
""
//商户名称(传商户id)
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
**示例**
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"count"
:
1
,
"rows"
:
[
{
"id"
:
"1"
,
"saas_id"
:
"saas_id"
,
"saas_merchant_id"
:
"11248111258000991"
,
"batch_no"
:
"batch_no"
,
"owner_type"
:
"00"
,
"fee_type"
:
"00"
,
"invoice_type"
:
"10"
,
//发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
"province"
:
"province"
,
"invoice_join"
:
"10"
,
"invoice_no"
:
"invoice_no"
,
//发票代码
"invoice_number"
:
"invoice_number"
,
//发票号码
"invoice_time"
:
"2020-04-09"
,
//开票日期
"invoice_amount"
:
1
,
//价税总计
"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"
,
"personal_invoice_tax"
:
10
,
"additional_tax"
:
1
,
"value_added_tax"
:
1
,
"service_tax"
:
1
,
"summary"
:
"summary"
,
"created_at"
:
"2020-04-09 21:31:40"
,
"updated_at"
:
"2020-04-09 21:31:42"
,
"deleted_at"
:
null
,
"version"
:
0
,
"price"
:
0
}
]
},
"requestid"
:
"2d9c4d82543f49b197e9bc38e1bdc499"
}
```
## **<a name="platforminvoiceapplyPage"> 发票申请列表 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/saas/invoiceCtl/platforminvoiceapplyPage
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 `POST`
```
javascript
{
"currentPage"
:
1
,
"pageSize"
:
10
,
"apply_no"
:
""
,
//发票申请编号
"begin_time"
:
""
,
//开始时间
"end_time"
:
""
//结束时间
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |
**示例**
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"count"
:
1
,
"rows"
:
[
{
"id"
:
"1"
,
"saas_id"
:
"1"
,
"saas_merchant_id"
:
"11248111258000991"
,
"batch_no"
:
"1"
,
"owner_type"
:
"商户发票"
,
"fee_type"
:
"注册订单费用"
,
"invoice_type"
:
"增值税专用发票"
,
//发票类型
"status"
:
"1"
,
//进度
"sve_invoice_id"
:
"1"
,
"apply_no"
:
"1"
,
//发票申请编号
"from_name"
:
"1"
,
//开票方
"from_credit_code"
:
"1"
,
"from_addr"
:
"1"
,
"from_mobile"
:
"1"
,
"from_bank"
:
"1"
,
"from_account"
:
"1"
,
"to_name"
:
"1"
,
//发票抬头
"to_credit_code"
:
"1"
,
"to_addr"
:
"1"
,
"to_mobile"
:
"1"
,
"to_bank"
:
"1"
,
"to_account"
:
"1"
,
"mail_to"
:
"1"
,
"mail_mobile"
:
"1"
,
"mail_addr"
:
"1"
,
"personal_invoice_tax"
:
1
,
//个税
"additional_tax"
:
1
,
"value_added_tax"
:
1
,
"service_tax"
:
1
,
"created_at"
:
"2020-04-10 22:39:43"
,
//申请时间
"updated_at"
:
"2020-04-10 22:39:40"
,
"deleted_at"
:
null
,
"version"
:
0
,
"invoice_join"
:
""
,
"price"
:
0
}
]
},
"requestid"
:
"712c62cc9dfd455b82ae13bf68c882c9"
}
```
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