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
91b013da
Commit
91b013da
authored
Feb 03, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社工查询
parent
746eb729
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
0 deletions
+88
-0
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+31
-0
PensionOrderDao.java
...ava/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
+15
-0
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+5
-0
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+14
-0
PensionOrderDao.xml
...rc/main/resources/mapper/serviceOrder/PensionOrderDao.xml
+23
-0
No files found.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
91b013da
...
...
@@ -119,6 +119,37 @@ public class PensionOrderController {
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"getAllOrderByCommunityUserIdPage"
)
@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
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
getAllOrderByCommunityUserIdPage
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getAllOrderByCommunityUserIdPage
(
params
,
user
.
getId
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"getElderAllOrderByCommunityUserIdPage"
)
@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
=
"name"
,
value
=
"需要查询老人的名字"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"String"
)
,
@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
>>
getElderAllOrderByCommunityUserIdPage
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getElderAllOrderByCommunityUserIdPage
(
params
,
user
.
getId
(),
params
.
get
(
"name"
).
toString
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"orderInfo/{id}"
)
@ApiOperation
(
"预约订单详情(志愿者)"
)
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
View file @
91b013da
...
...
@@ -48,5 +48,20 @@ public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {
*/
List
<
PensionOrderDTO
>
getElderAllOrderOrByStatusList
(
Map
<
String
,
Object
>
params
,
Long
creator
,
Integer
status
);
/**
* 社工:查询本社区全部订单(根据社区人员id查询所属社区内全部订单)
* @param page
* @param userId
* @return
*/
IPage
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
);
/**
* 社工:查询本社区某老人全部订单
* @param page
* @param userId
* @return
*/
IPage
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
,
String
appointmentPerson
);
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
91b013da
...
...
@@ -39,4 +39,9 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//老人全部订单或根据订单状态查询
PageData
<
PensionOrderDTO
>
getElderAllOrderOrByStatusPage
(
Map
<
String
,
Object
>
params
,
Long
creator
,
Integer
status
);
//社工:查询本社区全部订单(根据社区人员id查询所属社区内全部订单)
PageData
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
);
//社工:查询本社区某老人全部订单(模糊查询)
PageData
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
,
String
appointmentPerson
);
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
91b013da
...
...
@@ -107,4 +107,18 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
getPageData
(
list
,
page
.
getTotal
(),
PensionOrderDTO
.
class
);
}
@Override
public
PageData
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderDTO
>
pensionOrderDTOIPage
=
pensionOrderDao
.
getAllOrderByCommunityUserIdPage
(
page
,
userId
);
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
@Override
public
PageData
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
,
String
appointmentPerson
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderDTO
>
pensionOrderDTOIPage
=
pensionOrderDao
.
getElderAllOrderByCommunityUserIdPage
(
page
,
userId
,
appointmentPerson
);
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
}
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrderDao.xml
View file @
91b013da
...
...
@@ -120,4 +120,27 @@
</if>
</select>
<select
id=
"getAllOrderByCommunityUserIdPage"
resultType=
"io.hmit.modules.serviceOrder.dto.PensionOrderDTO"
>
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps, tb_user tu
WHERE po.service_id = ps.id AND po.community_id = tu.community_id AND tu.id = #{userId}
</select>
<select
id=
"getElderAllOrderByCommunityUserIdPage"
resultType=
"io.hmit.modules.serviceOrder.dto.PensionOrderDTO"
>
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps, tb_user tu
WHERE po.service_id = ps.id AND po.community_id = tu.community_id
AND tu.id = #{userId} AND po.appointment_person LIKE CONCAT('%', #{appointmentPerson}, '%')
</select>
</mapper>
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