Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9d8f1f2a
authored
Feb 25, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工单标准接口-修改提示
1 parent
ae91b2cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/WorkOrderService.java
View file @
9d8f1f2
...
...
@@ -540,7 +540,7 @@ public class WorkOrderService {
updateWorkOrder
=
workOrderMapper
.
selectById
(
orderReq
.
getWorkOrderId
());
}
checkWorkOrder
(
updateWorkOrder
);
checkWorkOrder
(
updateWorkOrder
,
isApiCall
);
boolean
syncAdd2Bhg
=
false
;
boolean
syncCancel2Bhg
=
false
;
...
...
@@ -651,7 +651,7 @@ public class WorkOrderService {
cancelWorkOrder
=
workOrderMapper
.
selectById
(
orderReq
.
getWorkOrderId
());
}
checkWorkOrder
(
cancelWorkOrder
);
checkWorkOrder
(
cancelWorkOrder
,
isApiCall
);
bhgBizService
.
syncCancelWorkOrder
(
cancelWorkOrder
);
}
...
...
@@ -692,7 +692,7 @@ public class WorkOrderService {
transBhgWireType
(
isApiCall
,
verifyBO
.
getDevices
());
//校验工单
checkWorkOrder
(
workOrder
);
checkWorkOrder
(
workOrder
,
isApiCall
);
//校验设备是否存在
checkDevicesExist
(
workOrder
,
verifyBO
.
getDevices
());
...
...
@@ -759,17 +759,18 @@ public class WorkOrderService {
*
* @param workOrder
*/
private
void
checkWorkOrder
(
WorkOrder
workOrder
)
{
private
void
checkWorkOrder
(
WorkOrder
workOrder
,
boolean
isApiCall
)
{
if
(
workOrder
==
null
)
{
throw
new
StdInterfaceException
(
"656565"
,
"对应工单不存在"
);
}
if
(
WorkOrderStatusEnum
.
COMPLETED
.
getStatus
().
equals
(
workOrder
.
getStatus
()))
{
throw
new
StdInterfaceException
(
"656565"
,
String
.
format
(
"工单%s已完成"
,
workOrder
.
getOrderNo
()));
//保持包活干提示一致
throw
new
StdInterfaceException
(
"656565"
,
String
.
format
(
"工单%s已完成{}"
,
workOrder
.
getPartnerOrderNo
()),
isApiCall
?
"激活"
:
"完成"
);
}
if
(
WorkOrderStatusEnum
.
CANCELED
.
getStatus
().
equals
(
workOrder
.
getStatus
()))
{
throw
new
StdInterfaceException
(
"656565"
,
String
.
format
(
"工单%s已被取消"
,
workOrder
.
getOrderNo
()));
throw
new
StdInterfaceException
(
"656565"
,
String
.
format
(
"工单%s已被取消"
,
workOrder
.
get
Partner
OrderNo
()));
}
}
...
...
@@ -872,7 +873,7 @@ public class WorkOrderService {
transBhgWireType
(
isApiCall
,
orderReq
.
getDevices
());
//校验工单
checkWorkOrder
(
workOrder
);
checkWorkOrder
(
workOrder
,
isApiCall
);
//校验设备是否存在,因为包活干可能不调验证接口,此时设备可能没同步
checkDevicesExist
(
workOrder
,
orderReq
.
getDevices
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment