Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
on-site-service
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
external
on-site-service
Commits
e09a6220
Commit
e09a6220
authored
Jul 13, 2022
by
lining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: order接口小bug修复
parent
f51e2893
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
22 deletions
+28
-22
BizCodeEnum.java
...in/java/com/onsiteservice/constant/enums/BizCodeEnum.java
+1
-1
ServiceOrderStatusEnum.java
.../onsiteservice/constant/enums/ServiceOrderStatusEnum.java
+1
-1
ServiceValuatorController.java
.../miniapp/controller/worker/ServiceValuatorController.java
+4
-3
ServiceWorkerController.java
...ce/miniapp/controller/worker/ServiceWorkerController.java
+5
-4
ServiceOrderService.java
...iteservice/miniapp/service/order/ServiceOrderService.java
+15
-11
ServiceValuatorService.java
...ervice/miniapp/service/worker/ServiceValuatorService.java
+1
-1
ServiceWorkerService.java
...eservice/miniapp/service/worker/ServiceWorkerService.java
+1
-1
No files found.
constant/src/main/java/com/onsiteservice/constant/enums/BizCodeEnum.java
View file @
e09a6220
...
...
@@ -15,7 +15,7 @@ public enum BizCodeEnum {
* 订单分组
*/
SERVICE_ORDER_NOT_EXIST
(
"订单不存在"
),
SERVICE_ORDER_CANNOT_VALUATION
(
"
订单未提交,
不能派估价员"
),
SERVICE_ORDER_CANNOT_VALUATION
(
"
处于非预约状态的订单
不能派估价员"
),
SERVICE_ORDER_CANNOT_REVALUATION
(
"订单未指派估价员,不能修改"
),
SERVICE_ORDER_CANNOT_SEND
(
"订单未受理,不能发送给客户"
),
SERVICE_ORDER_CANNOT_PAY
(
"订单未受理,暂不能支付"
),
...
...
constant/src/main/java/com/onsiteservice/constant/enums/ServiceOrderStatusEnum.java
View file @
e09a6220
...
...
@@ -26,7 +26,7 @@ public enum ServiceOrderStatusEnum {
/**
* 已发送
*/
SEND
(
3
,
"%s
: %s
已发送订单信息"
),
SEND
(
3
,
"%s 已发送订单信息"
),
/**
* 已支付
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/controller/worker/ServiceValuatorController.java
View file @
e09a6220
...
...
@@ -10,6 +10,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Positive
;
import
java.util.List
;
...
...
@@ -33,14 +34,14 @@ public class ServiceValuatorController {
@ApiOperation
(
value
=
"查询全部估价员"
)
@
Pos
tMapping
(
"all"
)
@
Ge
tMapping
(
"all"
)
public
Result
<
List
<
ServiceValuatorVO
>>
all
()
{
return
success
(
serviceValuatorService
.
all
());
}
@ApiOperation
(
value
=
"根据
id
查询"
)
@ApiOperation
(
value
=
"根据
姓名
查询"
)
@GetMapping
(
"get/{name}"
)
public
Result
<
List
<
ServiceValuatorVO
>>
getDetails
(
@ApiParam
(
name
=
"name"
,
value
=
"估价员姓名"
)
@PathVariable
@
Positive
String
name
)
{
public
Result
<
List
<
ServiceValuatorVO
>>
getDetails
(
@ApiParam
(
name
=
"name"
,
value
=
"估价员姓名"
)
@PathVariable
@
NotBlank
String
name
)
{
return
success
(
serviceValuatorService
.
selectByName
(
name
));
}
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/controller/worker/ServiceWorkerController.java
View file @
e09a6220
...
...
@@ -15,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Positive
;
import
java.util.List
;
...
...
@@ -40,14 +41,14 @@ public class ServiceWorkerController {
@ApiOperation
(
value
=
"查询全部维修工"
)
@
Pos
tMapping
(
"all"
)
@
Ge
tMapping
(
"all"
)
public
Result
<
List
<
ServiceWorkerVO
>>
all
()
{
return
success
(
serviceWorkerService
.
all
());
}
@ApiOperation
(
value
=
"根据
id
查询"
)
@GetMapping
(
"get/{
id
}"
)
public
Result
<
List
<
ServiceWorkerVO
>>
getDetails
(
@ApiParam
(
name
=
"name"
,
value
=
"维修工姓名"
)
@PathVariable
@
Positive
String
name
)
{
@ApiOperation
(
value
=
"根据
姓名
查询"
)
@GetMapping
(
"get/{
name
}"
)
public
Result
<
List
<
ServiceWorkerVO
>>
getDetails
(
@ApiParam
(
name
=
"name"
,
value
=
"维修工姓名"
)
@PathVariable
@
NotBlank
String
name
)
{
return
success
(
serviceWorkerService
.
selectByName
(
name
));
}
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/order/ServiceOrderService.java
View file @
e09a6220
...
...
@@ -232,7 +232,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
throw
new
ServiceException
(
BizCodeEnum
.
SERVICE_ORDER_CANNOT_SEND
);
}
disableServiceValuatorAssign
(
serviceOrder
,
userId
,
true
);
disableServiceValuatorAssign
(
serviceOrder
,
userId
,
null
);
// 估价价格
serviceOrder
.
setPrice
(
dto
.
getPrice
());
...
...
@@ -327,7 +327,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
User
user
=
checkAuth
(
userId
,
BizCodeEnum
.
NO_AUTH_REDISPATCH_ORDER
);
ServiceOrder
serviceOrder
=
checkOrder
(
dto
.
getId
(),
null
);
if
(!
serviceOrder
.
getOrderStatus
().
equals
(
ServiceOrderStatusEnum
.
PAY
.
getStatus
()))
{
if
(!
serviceOrder
.
getOrderStatus
().
equals
(
ServiceOrderStatusEnum
.
DISPATCH
.
getStatus
()))
{
throw
new
ServiceException
(
BizCodeEnum
.
SERVICE_ORDER_CANNOT_REDISPATCH
);
}
...
...
@@ -372,7 +372,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
throw
new
ServiceException
(
BizCodeEnum
.
NO_AUTH_FINISH_ORDER
);
}
disableServiceWorkerAssign
(
serviceOrder
,
userId
,
true
);
disableServiceWorkerAssign
(
serviceOrder
,
userId
,
null
);
serviceOrder
.
setOrderStatus
(
ServiceOrderStatusEnum
.
FINISH
.
getStatus
());
serviceOrder
.
setModifyBy
(
userId
);
...
...
@@ -396,7 +396,7 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
throw
new
ServiceException
(
BizCodeEnum
.
SERVICE_ORDER_CANNOT_CANCEL
);
}
disableServiceValuatorAssign
(
serviceOrder
,
userId
,
true
);
disableServiceValuatorAssign
(
serviceOrder
,
userId
,
null
);
serviceOrder
.
setOrderStatus
(
ServiceOrderStatusEnum
.
CANCEL
.
getStatus
());
serviceOrder
.
setModifyBy
(
userId
);
...
...
@@ -494,15 +494,17 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
/**
* 估价员上门时间失效
*
* @param serviceOrder 订单
* @param userId 用户id
* @param serviceOrder
订单
* @param userId
用户id
* @param finalExecuted 逻辑上谁最有可能是最终的上门人员
*/
public
void
disableServiceValuatorAssign
(
ServiceOrder
serviceOrder
,
Long
userId
,
b
oolean
finalExecuted
)
{
public
void
disableServiceValuatorAssign
(
ServiceOrder
serviceOrder
,
Long
userId
,
B
oolean
finalExecuted
)
{
ServiceValuatorAssign
serviceValuatorAssign
=
new
ServiceValuatorAssign
();
serviceValuatorAssign
.
setModifyBy
(
userId
);
serviceValuatorAssign
.
setDeleted
(
true
);
serviceValuatorAssign
.
setFinalExecuted
(
finalExecuted
);
if
(
finalExecuted
!=
null
)
{
serviceValuatorAssign
.
setFinalExecuted
(
finalExecuted
);
}
Condition
c
=
new
Condition
(
ServiceValuatorAssign
.
class
);
c
.
createCriteria
().
andEqualTo
(
BizConstants
.
OrderConstants
.
ORDER_ID
,
serviceOrder
.
getId
());
...
...
@@ -530,13 +532,15 @@ public class ServiceOrderService extends AbstractMapper<ServiceOrder> {
* 维修工上门时间失效
*
* @param serviceOrder 订单
* @param userId 用户id
* @param userId
用户id
*/
public
void
disableServiceWorkerAssign
(
ServiceOrder
serviceOrder
,
Long
userId
,
b
oolean
finalExecuted
)
{
public
void
disableServiceWorkerAssign
(
ServiceOrder
serviceOrder
,
Long
userId
,
B
oolean
finalExecuted
)
{
ServiceWorkerAssign
serviceWorkerAssign
=
new
ServiceWorkerAssign
();
serviceWorkerAssign
.
setModifyBy
(
userId
);
serviceWorkerAssign
.
setDeleted
(
true
);
serviceWorkerAssign
.
setFinalExecuted
(
finalExecuted
);
if
(
finalExecuted
!=
null
)
{
serviceWorkerAssign
.
setFinalExecuted
(
finalExecuted
);
}
Condition
c
=
new
Condition
(
ServiceWorkerAssign
.
class
);
c
.
createCriteria
().
andEqualTo
(
BizConstants
.
OrderConstants
.
ORDER_ID
,
serviceOrder
.
getId
());
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/worker/ServiceValuatorService.java
View file @
e09a6220
...
...
@@ -74,7 +74,7 @@ public class ServiceValuatorService extends AbstractMapper<ServiceValuator> {
serviceValuatorVO
.
setAssignTime
(
assignTimes
);
return
new
ServiceValuatorVO
()
;
return
serviceValuatorVO
;
}).
collect
(
Collectors
.
toList
());
}
...
...
mini-app/src/main/java/com/onsiteservice/miniapp/service/worker/ServiceWorkerService.java
View file @
e09a6220
...
...
@@ -70,7 +70,7 @@ public class ServiceWorkerService extends AbstractMapper<ServiceWorker> {
serviceWorkerVO
.
setAssignTime
(
assignTimes
);
return
new
ServiceWorkerVO
()
;
return
serviceWorkerVO
;
}).
collect
(
Collectors
.
toList
());
}
...
...
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