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 45701639
authored
Nov 22, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:改约处理计划时间
1 parent
273dfc2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
4570163
...
@@ -2,6 +2,7 @@ package com.dituhui.pea.order.service.impl;
...
@@ -2,6 +2,7 @@ package com.dituhui.pea.order.service.impl;
import
cn.hutool.core.date.LocalDateTimeUtil
;
import
cn.hutool.core.date.LocalDateTimeUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.dituhui.pea.common.BusinessException
;
import
com.dituhui.pea.common.BusinessException
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.common.ResultEnum
;
import
com.dituhui.pea.common.ResultEnum
;
...
@@ -233,6 +234,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -233,6 +234,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
@Override
@Override
@Transactional
@Transactional
public
Result
<?>
orderReschedule
(
OrderReschedule
req
)
throws
BusinessException
{
public
Result
<?>
orderReschedule
(
OrderReschedule
req
)
throws
BusinessException
{
log
.
info
(
"[orderReschedule] orderId:{}, req: {}"
,
req
.
getOrderId
(),
JSONObject
.
toJSONString
(
req
));
// 判断是否分配到人和是否是今天
// 判断是否分配到人和是否是今天
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
if
(
expectBegin
.
isBefore
(
LocalDateTime
.
now
()))
{
if
(
expectBegin
.
isBefore
(
LocalDateTime
.
now
()))
{
...
@@ -321,7 +323,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -321,7 +323,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
OrgGroupEntity
groupEntity
=
orgGroupDao
.
getByGroupId
(
order
.
getOrgGroupId
());
OrgGroupEntity
groupEntity
=
orgGroupDao
.
getByGroupId
(
order
.
getOrgGroupId
());
//是否今天
//是否今天
boolean
isToday
=
DateUtil
.
judgeTimeIsToday
(
expectBegin
)
;
boolean
isToday
=
CommonUtil
.
isCutoff
(
expectBegin
,
orgTeamEntity
.
getWorkOff
())
==
1
;
//是否到人
//是否到人
boolean
isBelong
=
StringUtils
.
isNotEmpty
(
order
.
getEngineerCode
());
boolean
isBelong
=
StringUtils
.
isNotEmpty
(
order
.
getEngineerCode
());
// 是否网点
// 是否网点
...
@@ -334,6 +336,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -334,6 +336,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
String
teamId
=
order
.
getOrgTeamId
();
String
teamId
=
order
.
getOrgTeamId
();
log
.
info
(
"[orderReschedule] orderId:{} orderstatus: isToday:{},isBelong:{},isNetwork:{},isAssign:{}"
,
order
.
getOrderId
(),
isToday
,
isBelong
,
isNetwork
,
isAssign
);
// 修改技能时处理工单耗时
// 修改技能时处理工单耗时
if
(
skillUpdate
)
{
if
(
skillUpdate
)
{
isAssign
=
true
;
isAssign
=
true
;
...
@@ -443,7 +446,10 @@ public class OrderInfoServiceImpl implements OrderInfoService {
...
@@ -443,7 +446,10 @@ public class OrderInfoServiceImpl implements OrderInfoService {
order
.
setIsSpecialTime
(
special
);
order
.
setIsSpecialTime
(
special
);
order
.
setOrgClusterId
(
clusterId
);
order
.
setOrgClusterId
(
clusterId
);
order
.
setOrgBranchId
(
branchId
);
order
.
setOrgBranchId
(
branchId
);
order
.
setPlanStartTime
(
order
.
getExpectTimeBegin
());
order
.
setPlanEndTime
(
order
.
getExpectTimeEnd
());
orderInfoDao
.
save
(
order
);
orderInfoDao
.
save
(
order
);
log
.
info
(
"[orderReschedule] orderId:{}, order: {}"
,
order
.
getOrderId
(),
JSONObject
.
toJSONString
(
order
));
// 登记事件
// 登记事件
commonService
.
addOrderEvent
(
req
.
getOrderId
(),
""
,
req
.
getOperator
(),
req
.
getOperator
(),
OrderEventEnum
.
recontracting
.
getEvent
(),
commonService
.
addOrderEvent
(
req
.
getOrderId
(),
""
,
req
.
getOperator
(),
req
.
getOperator
(),
OrderEventEnum
.
recontracting
.
getEvent
(),
String
.
format
(
OrderEventEnum
.
recontracting
.
getMsg
(),
engineerName
+
"-"
+
(
ObjectUtil
.
isNotNull
(
orgTeamEntity
)
?
orgTeamEntity
.
getTeamName
()
:
""
),
String
.
format
(
OrderEventEnum
.
recontracting
.
getMsg
(),
engineerName
+
"-"
+
(
ObjectUtil
.
isNotNull
(
orgTeamEntity
)
?
orgTeamEntity
.
getTeamName
()
:
""
),
...
...
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