Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengmeng
pension
Commits
1c07feb6
Commit
1c07feb6
authored
4 years ago
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.服务人员订单接口
2.老人/子女订单接口 3.机构订单接口(未完成) 4.Constant静态类新增订单状态
parent
e5e1ab0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
2 deletions
+77
-2
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+67
-0
Constant.java
...ommon/src/main/java/io/hmit/common/constant/Constant.java
+10
-2
No files found.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
1c07feb6
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
com.sun.xml.internal.bind.v2.TODO
;
import
io.hmit.annotation.Login
;
import
io.hmit.annotation.LoginUser
;
import
io.hmit.common.constant.Constant
;
...
...
@@ -178,6 +179,72 @@ public class PensionOrderController {
return
new
Result
();
}
//新订单接口
/**
* 服务人员订单接口
*/
@Login
@GetMapping
(
"staff"
)
@ApiOperation
(
value
=
"根据状态返回订单列表(服务人员)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态: 1待完成 2已完成 3已取消"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
staff
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrderPageByStatus
(
params
,
user
.
getId
(),
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
()));
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
/**
* 机构订单接口
*/
@Login
@GetMapping
(
"organization"
)
@ApiOperation
(
value
=
"根据状态返回订单列表(机构)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态: 0未接单 1已接单未派发 2已完成 3已取消 5已派发"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
organization
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
//TODO 登录->查询登录人员所属机构ID->机构ID查询服务ID(List)->服务ID + 状态查询订单(List)
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrderPageByStatus
(
params
,
user
.
getId
(),
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
()));
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
/**
* 老人、子女订单接口
*/
@Login
@GetMapping
(
"elderFamily"
)
@ApiOperation
(
"全部/根据状态返回订单(老人/子女)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态: 0未接单 1待完成 3已取消 4待评价 留空全部"
,
paramType
=
"query"
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
elderFamily
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
Integer
status
=
null
;
if
(
null
!=
params
.
get
(
"status"
))
{
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
}
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getElderAllOrderOrByStatusPage
(
params
,
user
.
getId
(),
status
);
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
//新订单接口
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
PensionOrderDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
...
This diff is collapsed.
Click to expand it.
hmit-common/src/main/java/io/hmit/common/constant/Constant.java
View file @
1c07feb6
...
...
@@ -188,7 +188,7 @@ public interface Constant {
BOOKED
(
0
,
"未接单"
),
/**
* 已接单
* 已接单
/待完成/已接单未派发
*/
ORDER
(
1
,
"已接单"
),
/**
...
...
@@ -198,7 +198,15 @@ public interface Constant {
/**
* 已取消
*/
CANCEL
(
3
,
"已取消"
);
CANCEL
(
3
,
"已取消"
),
/**
* 待评价
*/
WAIT_EVALUATE
(
4
,
"待评价"
),
/**
* 已派发
*/
HAND_OUT
(
5
,
"已派发"
);
private
int
status
;
...
...
This diff is collapsed.
Click to expand it.
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