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
3b9605ea
Commit
3b9605ea
authored
Jan 13, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
c01e371c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
1 deletions
+148
-1
xgg-admin/app/base/controller/impl/order/orderCtl.js
+60
-0
xgg-admin/app/base/service/impl/order/orderSve.js
+28
-0
xgg-admin/app/front/entry/public/apidoc/order/order.md
+60
-1
No files found.
xgg-admin/app/base/controller/impl/order/orderCtl.js
View file @
3b9605ea
...
@@ -11,6 +11,7 @@ class OrderCtl extends CtlBase {
...
@@ -11,6 +11,7 @@ class OrderCtl extends CtlBase {
super
();
super
();
this
.
orderSve
=
system
.
getObject
(
"service.order.orderSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.order.orderSve"
);
this
.
userSve
=
system
.
getObject
(
"service.uc.userSve"
);
this
.
userSve
=
system
.
getObject
(
"service.uc.userSve"
);
this
.
TAX_CATEGORY
=
[
1
,
2
];
//计费模式
}
}
async
processList
(
pobj
,
pobj2
,
req
)
{
async
processList
(
pobj
,
pobj2
,
req
)
{
...
@@ -340,8 +341,66 @@ class OrderCtl extends CtlBase {
...
@@ -340,8 +341,66 @@ class OrderCtl extends CtlBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
/**
* 个体户签约
* @param {*} params
*/
async
signing
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
hasOwnProperty
(
'credit_code'
)
&&
!
pobj
.
credit_code
)
{
return
system
.
getResult
(
null
,
`参数错误 同意社会信用代码不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'cost_rate'
))
{
return
system
.
getResult
(
null
,
`参数错误 核定成本费用率不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'add_value_up_type'
)
&&
!
pobj
.
add_value_up_type
)
{
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'tax_up_type'
))
{
return
system
.
getResult
(
null
,
`参数错误 个税累计类型不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'service_begin_time'
))
{
return
system
.
getResult
(
null
,
`参数错误 服务开始时间不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'service_end_time'
))
{
return
system
.
getResult
(
null
,
`参数错误 服务结束时间不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'service_rate'
)
&&
!
pobj
.
service_rate
)
{
return
system
.
getResult
(
null
,
`参数错误 服务费比例不能为空`
);
}
if
(
!
pobj
.
hasOwnProperty
(
'tax_rate'
)
&&
!
pobj
.
tax_rate
)
{
return
system
.
getResult
(
null
,
`参数错误 含税价百分比不能为空`
);
}
try
{
pobj
.
service_rate
=
system
.
y2f
(
pobj
.
service_rate
);
pobj
.
tax_rate
=
system
.
y2f
(
pobj
.
tax_rate
);
pobj
.
cost_rate
=
system
.
y2f
(
pobj
.
cost_rate
);
return
await
this
.
orderSve
.
signing
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 建帐
* @param {*} params
*/
async
createAccount
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
hasOwnProperty
(
'credit_code'
)
&&
!
pobj
.
credit_code
)
{
return
system
.
getResult
(
null
,
`参数错误 同意社会信用代码不能为空`
);
}
try
{
return
await
this
.
orderSve
.
createAccount
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
module
.
exports
=
OrderCtl
;
module
.
exports
=
OrderCtl
;
\ No newline at end of file
xgg-admin/app/base/service/impl/order/orderSve.js
View file @
3b9605ea
...
@@ -171,5 +171,32 @@ class OrderService extends ServiceBase {
...
@@ -171,5 +171,32 @@ class OrderService extends ServiceBase {
await
this
.
pushapiSve
.
push
(
options
);
await
this
.
pushapiSve
.
push
(
options
);
}
}
/**
* @params 个体户签约
*/
async
signing
(
params
){
try
{
return
await
this
.
callms
(
"order"
,
"signing"
,
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
/**
* @params 建仗
*/
async
createAccount
(
params
){
try
{
//todo somthing ...
if
(
1
==
1
){
return
await
this
.
callms
(
"order"
,
"createAccount"
,
params
);
}
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
}
}
module
.
exports
=
OrderService
;
module
.
exports
=
OrderService
;
\ No newline at end of file
xgg-admin/app/front/entry/public/apidoc/order/order.md
View file @
3b9605ea
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
1.
[
交付商验收
](
#platformAuditDetermine
)
1.
[
交付商验收
](
#platformAuditDetermine
)
1.
[
客户交付
](
#deliverCustomer
)
1.
[
客户交付
](
#deliverCustomer
)
1.
[
订单完成
](
#orderComplete
)
1.
[
订单完成
](
#orderComplete
)
1.
[
个体户签约
](
#signing
)
## **<a name="processList"> 业务进度字典 </a>**
## **<a name="processList"> 业务进度字典 </a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### URL
...
@@ -635,4 +635,62 @@
...
@@ -635,4 +635,62 @@
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
}
```
## **<a name="signing"> 个体户签约 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/signing
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"credit_code"
:
"1"
,
//同意社会信用代码
"cost_rate"
:
0.9
,
//核定成本费用率 小数
"add_value_up_type"
:
""
,
//增值税累计类型 增值税累计类型 1按月 2按季度
"tax_up_type"
:
""
,
//个税累计类型 个税累计类型 1按月累计 2按年累计
"service_begin_time"
:
"1"
,
//服务开始时间
"service_end_time"
:
"5"
,
//服务结束时间
"service_rate"
:
0.9
,
//服务费比例 小数
"tax_rate"
:
0.9
,
//含税价百分比 小数
"sign_notes"
:
""
//签约备注
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="createAccount"> 建账 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/order/orderCtl/createAccount
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"credit_code"
:
"1"
,
//同意社会信用代码
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestid"
:
"efb46fd211be4ca6845acc53684fb61d"
}
```
```
\ 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