Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b450cc7
authored
Dec 06, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:服务工单改约不调用bean
1 parent
f1bdd4b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BeanRemoteServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BeanRemoteServiceImpl.java
View file @
2b450cc
...
...
@@ -152,9 +152,10 @@ public class BeanRemoteServiceImpl {
* @return 是否回调成功
*/
public
boolean
orderCancel
(
OrderCancel
orderCancelParam
)
{
log
.
info
(
"-----请求参数:{}"
,
JsonUtil
.
toJson
(
orderCancelParam
));
log
.
info
(
"[服务工单取消]-----请求参数:{}"
,
JsonUtil
.
toJson
(
orderCancelParam
));
long
timeMillis
=
System
.
currentTimeMillis
();
BeanR
<?>
beanR
=
beanRemoteService
.
orderTaskCancel
(
getAccessToken
(),
orderCancelParam
);
log
.
info
(
"[服务工单取消]【/api/openapi/task/cancel】
返回值-------------------->{}"
,
JsonUtil
.
toJson
(
beanR
));
log
.
info
(
"[服务工单取消]【/api/openapi/task/cancel】
耗时:{},返回值-------------------->{}"
,
System
.
currentTimeMillis
()
-
timeMillis
,
JsonUtil
.
toJson
(
beanR
));
return
beanR
.
getSuccess
();
}
...
...
@@ -167,9 +168,10 @@ public class BeanRemoteServiceImpl {
*/
public
boolean
orderRescheduled
(
Rescheduled
rescheduled
)
{
log
.
info
(
"-----请求参数:{}"
,
JsonUtil
.
toJson
(
rescheduled
));
log
.
info
(
"[服务工单改约]-----请求参数:{}"
,
JsonUtil
.
toJson
(
rescheduled
));
long
timeMillis
=
System
.
currentTimeMillis
();
BeanR
<?>
beanRq
=
beanRemoteService
.
orderRescheduled
(
getAccessToken
(),
rescheduled
);
log
.
info
(
"[服务工单改约]【/api/openapi/task/rescheduled 】
返回值-------------------->{}"
,
JsonUtil
.
toJson
(
beanRq
));
log
.
info
(
"[服务工单改约]【/api/openapi/task/rescheduled 】
耗时:{}返回值-------------------->{}"
,
System
.
currentTimeMillis
()
-
timeMillis
,
JsonUtil
.
toJson
(
beanRq
));
return
beanRq
.
getSuccess
();
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
2b450cc
...
...
@@ -274,6 +274,8 @@ public class OrderAssignImpl implements OrderAssign {
if
(
order
.
getOrderStatus
().
equals
(
OrderStatusEnum
.
CANCELED
.
getCode
())
||
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
FINISHED
.
getCode
()))
{
return
Result
.
failed
(
StatusCodeEnum
.
ORDER_FINISHED
);
}
final
OrderInfoEntity
sourceOrder
=
new
OrderInfoEntity
();
BeanUtils
.
copyProperties
(
sourceOrder
,
sourceOrder
);
OrgTeamEntity
orgTeam
=
orgTeamDao
.
getByTeamId
(
order
.
getOrgTeamId
());
// 判断cutoff
Integer
cutoff
=
CommonUtil
.
isCutoff
(
order
.
getExpectTimeBegin
(),
orgTeam
.
getWorkOff
());
...
...
@@ -296,7 +298,12 @@ public class OrderAssignImpl implements OrderAssign {
order
.
setAppointEngineerCodes
(
null
);
}
orderInfoDao
.
save
(
order
);
//回调改约
Boolean
boo
=
orderInfoService
.
rescheduled
(
sourceOrder
,
order
,
new
Date
(),
""
,
"PEA"
);
log
.
info
(
"[orderReschedule] orderId:{}, 通知bean结果: {}"
,
sourceOrder
.
getOrderId
(),
boo
);
if
(!
boo
)
{
throw
new
BusinessException
(
"服务工单变更结果通知BEAN失败"
);
}
commonService
.
addOrderEvent
(
orderId
,
""
,
"PEA"
,
"PEA"
,
OrderEventEnum
.
backOrderPool
.
getEvent
(),
OrderEventEnum
.
backOrderPool
.
getMsg
(),
""
);
return
Result
.
success
(
null
);
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
2b450cc
...
...
@@ -219,13 +219,13 @@ public class OrderInfoServiceImpl implements OrderInfoService {
String
engineerName
=
orderInfo
.
getEngineerName
();
orderInfoDao
.
save
(
orderInfo
);
//回调bean
OrderCancel
orderCancelParam
=
new
OrderCancel
();
orderCancelParam
.
setRisId
(
orderId
);
orderCancelParam
.
setCancelStartTime
(
happenDate
.
getTime
());
Reason
reason
=
new
Reason
();
reason
.
setOneLevel
(
request
.
getReschedulingReason
());
orderCancelParam
.
setCancellationReason
(
reason
);
beanRemoteService
.
orderCancel
(
orderCancelParam
);
//
OrderCancel orderCancelParam = new OrderCancel();
//
orderCancelParam.setRisId(orderId);
//
orderCancelParam.setCancelStartTime(happenDate.getTime());
//
Reason reason = new Reason();
//
reason.setOneLevel(request.getReschedulingReason());
//
orderCancelParam.setCancellationReason(reason);
//
beanRemoteService.orderCancel(orderCancelParam);
//记录流程
commonService
.
addOrderEvent
(
orderId
,
""
,
"BEAN"
,
"BEAN"
,
OrderEventEnum
.
cancel
.
getEvent
(),
String
.
format
(
OrderEventEnum
.
cancel
.
getMsg
(),
engineerName
+
"-"
+
(
ObjectUtil
.
isNotNull
(
orgTeamEntity
)
?
orgTeamEntity
.
getTeamName
()
:
""
)),
""
,
actualStartTime
);
}
else
if
(
request
.
getOrderStatus
().
equalsIgnoreCase
(
OrderStatusEnum
.
RESCHEDULED
.
getCode
()))
{
...
...
@@ -513,13 +513,12 @@ public class OrderInfoServiceImpl implements OrderInfoService {
rescheduled
.
setAssistantWorkNo
(
code
.
getCosmosId
());
rescheduled
.
setAssOrgUnitId
(
code
.
getGroupId
());
}
//判断是否是改派
if
((
StringUtils
.
isNotBlank
(
target
.
getEngineerCode
())
&&
!
Objects
.
equals
(
engineerCode
,
source
.
getEngineerCode
()))
||
(
StringUtils
.
isNotBlank
(
target
.
getEngineerCodeSub
())
&&
!
Objects
.
equals
(
target
.
getEngineerCodeSub
(),
source
.
getEngineerCodeSub
())))
{
rescheduled
.
setReassignment
(
Boolean
.
TRUE
);
}
else
{
rescheduled
.
setReassignment
(
Boolean
.
FALSE
);
}
return
beanRemoteService
.
orderRescheduled
(
rescheduled
);
...
...
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