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
f589bb98
Commit
f589bb98
authored
Mar 11, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加机构处理接口
parent
52522226
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
2 deletions
+72
-2
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+22
-2
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+3
-0
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+47
-0
No files found.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
f589bb98
...
@@ -303,11 +303,11 @@ public class PensionOrderController {
...
@@ -303,11 +303,11 @@ public class PensionOrderController {
}
}
/**
/**
* 机构全部人员
*
本
机构全部人员
*/
*/
@Login
@Login
@GetMapping
(
"organizationStaff"
)
@GetMapping
(
"organizationStaff"
)
@ApiOperation
(
value
=
"机构全部人员(机构)"
)
@ApiOperation
(
value
=
"
本
机构全部人员(机构)"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@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
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
...
@@ -320,4 +320,24 @@ public class PensionOrderController {
...
@@ -320,4 +320,24 @@ public class PensionOrderController {
return
new
Result
<
PageData
<
UserEntity
>>().
ok
(
page
);
return
new
Result
<
PageData
<
UserEntity
>>().
ok
(
page
);
}
}
/**
* 机构处理
*/
@Login
@GetMapping
(
"organizationHandle"
)
@ApiOperation
(
value
=
"机构处理(机构)"
,
notes
=
"传参为1(派单)时,recipient_id必传"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"订单ID"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"long"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"处理状态: 5接单 1派单 3取消"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"recipient_id"
,
value
=
"接单服务人员ID"
,
paramType
=
"query"
,
dataType
=
"long"
)
})
public
Result
organizationHandle
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
Boolean
result
=
pensionOrderService
.
organizationHandle
(
params
,
user
.
getId
());
if
(!
result
)
{
return
new
Result
().
error
();
}
return
new
Result
();
}
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
f589bb98
...
@@ -47,4 +47,7 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
...
@@ -47,4 +47,7 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//查询机构订单
//查询机构订单
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
);
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
f589bb98
...
@@ -6,6 +6,8 @@ import io.hmit.common.constant.Constant;
...
@@ -6,6 +6,8 @@ import io.hmit.common.constant.Constant;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.dao.UserDao
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.dao.PensionOrderDao
;
import
io.hmit.modules.serviceOrder.dao.PensionOrderDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderServiceDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderServiceDTO
;
...
@@ -14,11 +16,13 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
...
@@ -14,11 +16,13 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderServiceService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderServiceService
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.hmit.service.UserService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -50,6 +54,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
...
@@ -50,6 +54,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Autowired
@Autowired
private
PensionOrganizationService
pensionOrganizationService
;
private
PensionOrganizationService
pensionOrganizationService
;
@Autowired
private
UserService
userService
;
//查询全部订单
//查询全部订单
@Override
@Override
public
PageData
<
PensionOrderDTO
>
getAllOrderPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
public
PageData
<
PensionOrderDTO
>
getAllOrderPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
...
@@ -154,4 +161,44 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
...
@@ -154,4 +161,44 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
getPageData
(
result
,
page
.
getTotal
(),
PensionOrderDTO
.
class
);
return
getPageData
(
result
,
page
.
getTotal
(),
PensionOrderDTO
.
class
);
}
}
@Override
public
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
//userId 可用于校验是否属于本机构的订单,暂未使用
Long
orderId
=
Long
.
parseLong
(
params
.
get
(
"id"
).
toString
());
PensionOrderEntity
pensionOrderEntity
=
pensionOrderDao
.
selectById
(
orderId
);
Integer
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
if
(
status
==
5
)
{
//接单
if
(
pensionOrderEntity
.
getStatus
()
==
0
)
{
pensionOrderEntity
.
setStatus
(
5
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
HAND_OUT
.
getMessage
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
1
){
//派单
Long
recipient_id
=
Long
.
parseLong
(
params
.
get
(
"recipient_id"
).
toString
());
if
(
pensionOrderEntity
.
getStatus
()
==
5
)
{
pensionOrderEntity
.
setStatus
(
1
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
ORDER
.
getMessage
());
UserEntity
recipient
=
userService
.
getUserByUserId
(
recipient_id
);
pensionOrderEntity
.
setOrderRecipientId
(
recipient_id
);
pensionOrderEntity
.
setOrderRecipientName
(
recipient
.
getUsername
());
pensionOrderEntity
.
setOrderRecipientPhone
(
recipient
.
getMobile
());
pensionOrderEntity
.
setOrderRecipientTime
(
new
Date
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
3
)
{
if
(
pensionOrderEntity
.
getStatus
()
!=
2
&&
pensionOrderEntity
.
getStatus
()
!=
4
)
{
pensionOrderEntity
.
setStatus
(
3
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
CANCEL
.
getMessage
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
return
true
;
}
}
}
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