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
dfe47114
Commit
dfe47114
authored
Jan 13, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
gsb
parents
e21d8faf
5c6cafa6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
11 deletions
+124
-11
xggsve-order/app/base/api/impl/op/action.js
+1
-3
xggsve-order/app/base/db/models/order/obusinessmen.js
+1
-1
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+81
-5
xggsve-order/app/front/entry/public/apidoc/business/businessmen.md
+41
-2
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
dfe47114
...
...
@@ -80,12 +80,10 @@ class ActionAPI extends APIBase {
case
"allProcess"
:
// 查询业务进度
opResult
=
await
this
.
oprocessSve
.
allNames
(
action_body
);
break
;
// 个体户
case
"queryObusinessmen"
:
//查询个体工商户信息
opResult
=
await
this
.
obusinessmenSve
.
queryObusinessmen
(
action_body
);
break
;
// 个体户
case
"businessmenPage"
:
opResult
=
await
this
.
businessmenSve
.
apiPage
(
action_body
);
break
;
...
...
xggsve-order/app/base/db/models/order/obusinessmen.js
View file @
dfe47114
...
...
@@ -42,7 +42,7 @@ module.exports = function (db, DataTypes) {
service_begin_time
:
{
type
:
DataTypes
.
DATE
,
field
:
'service_begin_time'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'服务开始时间'
},
service_end_time
:
{
type
:
DataTypes
.
DATE
,
field
:
'service_end_time'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'服务结束时间'
},
cost_rate
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'cost_rate'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'核定成本费用率'
},
tax_rate
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'tax_rate'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'
服务开始时间
'
},
tax_rate
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'tax_rate'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'
含税价百分比
'
},
add_value_up_type
:
{
type
:
DataTypes
.
STRING
,
field
:
'add_value_up_type'
,
allowNull
:
true
,
defaultValue
:
'1'
,
comment
:
'增值税累计类型 1按月 2按季度'
},
tax_up_type
:
{
type
:
DataTypes
.
STRING
,
field
:
'tax_up_type'
,
allowNull
:
true
,
defaultValue
:
'1'
,
comment
:
'个税累计类型 1按月累计 2按年累计'
},
service_rate
:
{
type
:
DataTypes
.
INTEGER
,
field
:
'service_rate'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'服务费比例'
},
...
...
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
dfe47114
...
...
@@ -13,7 +13,7 @@ class ObusinessmenService extends ServiceBase {
* @param {*} params
* @Id 个体户ID
*/
async
queryObusinessmen
(
params
){
async
queryObusinessmen
(
params
)
{
try
{
let
obj
=
await
this
.
findById
(
this
.
trim
(
params
.
id
));
return
system
.
getResult
(
obj
);
...
...
@@ -23,14 +23,92 @@ class ObusinessmenService extends ServiceBase {
}
}
/**
* 签约
*/
async
signing
(
params
)
{
if
(
!
params
.
hasOwnProperty
(
'credit_code'
)
&&
!
params
.
credit_code
)
{
return
system
.
getResult
(
null
,
`参数错误 同意社会信用代码不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'cost_rate'
))
{
return
system
.
getResult
(
null
,
`参数错误 核定成本费用率不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'add_value_up_type'
)
&&
!
params
.
add_value_up_type
)
{
return
system
.
getResult
(
null
,
`参数错误 增值税累计类型不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'tax_up_type'
))
{
return
system
.
getResult
(
null
,
`参数错误 个税累计类型不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'service_begin_time'
))
{
return
system
.
getResult
(
null
,
`参数错误 服务开始时间不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'service_end_time'
))
{
return
system
.
getResult
(
null
,
`参数错误 服务结束时间不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'service_rate'
)
&&
!
params
.
service_rate
)
{
return
system
.
getResult
(
null
,
`参数错误 服务费比例不能为空`
);
}
if
(
!
params
.
hasOwnProperty
(
'tax_rate'
)
&&
!
params
.
tax_rate
)
{
return
system
.
getResult
(
null
,
`参数错误 含税价百分比不能为空`
);
}
let
_obusinessmen
=
await
this
.
dao
.
model
.
findOne
({
where
:{
credit_code
:
this
.
trim
(
params
.
credit_code
)
}});
if
(
!
_obusinessmen
){
return
system
.
getResult
(
null
,
`个体户不存在`
);
}
_obusinessmen
.
cost_rate
=
this
.
trim
(
params
.
cost_rate
);
_obusinessmen
.
add_value_up_type
=
this
.
trim
(
params
.
add_value_up_type
);
_obusinessmen
.
tax_up_type
=
this
.
trim
(
params
.
tax_up_type
);
_obusinessmen
.
service_begin_time
=
this
.
trim
(
params
.
service_begin_time
);
_obusinessmen
.
service_end_time
=
this
.
trim
(
params
.
service_end_time
);
_obusinessmen
.
service_rate
=
this
.
trim
(
params
.
service_rate
);
_obusinessmen
.
tax_rate
=
this
.
trim
(
params
.
tax_rate
);
_obusinessmen
.
sign_time
=
new
Date
();
_obusinessmen
.
sign_notes
=
this
.
trim
(
params
.
sign_notes
);
try
{
await
_obusinessmen
.
save
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 建账
* @param {*} params
*/
async
createAccount
(
params
){
if
(
!
params
.
hasOwnProperty
(
'credit_code'
)
&&
!
params
.
credit_code
)
{
return
system
.
getResult
(
null
,
`参数错误 同意社会信用代码不能为空`
);
}
let
_obusinessmen
=
await
this
.
dao
.
model
.
findOne
({
where
:{
credit_code
:
this
.
trim
(
params
.
credit_code
)
}});
if
(
!
_obusinessmen
){
return
system
.
getResult
(
null
,
`个体户不存在`
);
}
_obusinessmen
.
is_create_account
=
true
;
try
{
await
_obusinessmen
.
save
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
businessmenPage
(
params
)
{
let
currentPage
=
Number
(
params
.
currentPage
||
1
);
let
pageSize
=
Number
(
params
.
pageSize
||
10
);
let
order_id
=
this
.
trim
(
params
.
order_id
);
let
name
=
this
.
trim
(
params
.
name
);
let
bd_id
=
this
.
trim
(
params
.
bd_id
);
let
bd_path
=
this
.
trim
(
params
.
bd_path
);
let
bdPath
=
this
.
trim
(
params
.
bdPath
);
let
ostatuses
=
params
.
ostatuses
;
var
where
=
{};
...
...
@@ -68,8 +146,6 @@ class ObusinessmenService extends ServiceBase {
}
}
return
system
.
getResultSuccess
(
page
);
}
}
...
...
xggsve-order/app/front/entry/public/apidoc/business/businessmen.md
View file @
dfe47114
...
...
@@ -5,8 +5,8 @@
1.
[
用户签约
](
#businessmenSign
)
1.
[
签约管理列表
](
#signList
)
1.
[
个体户信息列表
](
#infoList
)
1.
[
个体户签约
](
#signing
)
1.
[
是否建账
](
#createAccount
)
## **<a name="nameList"> 个体户nameList </a>**
[
返回到目录
](
#menu
)
...
...
@@ -336,3 +336,41 @@
```
## **<a name="signing"> 个体户签约 </a>**
[
返回到目录
](
#menu
)
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"action_process"
:
"test"
,
"action_type"
:
"createAccount"
,
"action_body"
:
{
"credit_code"
:
"1"
,
//同意社会信用代码
"cost_rate"
:
"5"
,
//核定成本费用率
"add_value_up_type"
:
""
,
//增值税累计类型
"tax_up_type"
:
""
,
//个税累计类型
"service_begin_time"
:
"1"
,
//服务开始时间
"service_end_time"
:
"5"
,
//服务结束时间
"service_rate"
:
""
,
//服务费比例
"tax_rate"
:
""
,
//含税价百分比、
"sign_notes"
:
""
//签约备注
}
}
```
## **<a name="createAccount"> 是否建账 </a>**
[
返回到目录
](
#menu
)
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"action_process"
:
"test"
,
"action_type"
:
"signing"
,
"action_body"
:
{
"credit_code"
:
"1"
,
//同意社会信用代码
}
}
```
\ 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