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 c48de84e
authored
Nov 20, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ID1004109): 博西PEA_V1.0-工程师加单:工程师加单确认时,从次日单改约成当日单,需要标注当日加单标签
1 parent
61639a7f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/PeaOuterAPIServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/PeaOuterAPIServiceImpl.java
View file @
c48de84
...
@@ -11,6 +11,7 @@ import com.dituhui.pea.order.dao.EngineerSkillGroupDao;
...
@@ -11,6 +11,7 @@ import com.dituhui.pea.order.dao.EngineerSkillGroupDao;
import
com.dituhui.pea.order.dao.MapBlockInfoDao
;
import
com.dituhui.pea.order.dao.MapBlockInfoDao
;
import
com.dituhui.pea.order.dao.OrderInfoDao
;
import
com.dituhui.pea.order.dao.OrderInfoDao
;
import
com.dituhui.pea.order.dao.OrgGroupDao
;
import
com.dituhui.pea.order.dao.OrgGroupDao
;
import
com.dituhui.pea.order.dao.OrgTeamDao
;
import
com.dituhui.pea.order.dto.param.EstimateDTO
;
import
com.dituhui.pea.order.dto.param.EstimateDTO
;
import
com.dituhui.pea.order.dto.param.Location
;
import
com.dituhui.pea.order.dto.param.Location
;
import
com.dituhui.pea.order.dto.param.Order
;
import
com.dituhui.pea.order.dto.param.Order
;
...
@@ -22,6 +23,7 @@ import com.dituhui.pea.order.entity.EngineerSkillGroupEntity;
...
@@ -22,6 +23,7 @@ import com.dituhui.pea.order.entity.EngineerSkillGroupEntity;
import
com.dituhui.pea.order.entity.MapBlockInfoEntity
;
import
com.dituhui.pea.order.entity.MapBlockInfoEntity
;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.entity.OrgGroupEntity
;
import
com.dituhui.pea.order.entity.OrgGroupEntity
;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
com.dituhui.pea.order.enums.AppointmentMethodEnum
;
import
com.dituhui.pea.order.enums.AppointmentMethodEnum
;
import
com.dituhui.pea.order.enums.OrderEventEnum
;
import
com.dituhui.pea.order.enums.OrderEventEnum
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
...
@@ -29,7 +31,7 @@ import com.dituhui.pea.order.enums.OrderStatusEnum;
...
@@ -29,7 +31,7 @@ import com.dituhui.pea.order.enums.OrderStatusEnum;
import
com.dituhui.pea.order.enums.ServiceStatusEnum
;
import
com.dituhui.pea.order.enums.ServiceStatusEnum
;
import
com.dituhui.pea.order.service.CommonService
;
import
com.dituhui.pea.order.service.CommonService
;
import
com.dituhui.pea.order.service.PeaOuterAPIService
;
import
com.dituhui.pea.order.service.PeaOuterAPIService
;
import
com.dituhui.pea.order.utils.
Order
Util
;
import
com.dituhui.pea.order.utils.
Common
Util
;
import
com.dituhui.pea.pojo.fendan.FendanDTO
;
import
com.dituhui.pea.pojo.fendan.FendanDTO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -63,6 +65,7 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
...
@@ -63,6 +65,7 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
* 分部数据访问层
* 分部数据访问层
*/
*/
private
final
OrgGroupDao
orgGroupDao
;
private
final
OrgGroupDao
orgGroupDao
;
private
final
OrgTeamDao
orgTeamDao
;
private
final
OrderInfoDao
orderInfoDao
;
private
final
OrderInfoDao
orderInfoDao
;
private
final
EngineerSkillGroupDao
engineerSkillGroupDao
;
private
final
EngineerSkillGroupDao
engineerSkillGroupDao
;
private
final
SaasUtils
saasUtils
;
private
final
SaasUtils
saasUtils
;
...
@@ -175,6 +178,9 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
...
@@ -175,6 +178,9 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
final
String
orderId
=
request
.
getOrderId
();
final
String
orderId
=
request
.
getOrderId
();
OrderInfoEntity
orderInfo
=
orderInfoDao
.
getByOrderId
(
orderId
);
OrderInfoEntity
orderInfo
=
orderInfoDao
.
getByOrderId
(
orderId
);
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
request
.
getEngineerCode
());
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
request
.
getEngineerCode
());
Set
<
OrgTeamEntity
>
teamEntitySet
=
orgTeamDao
.
selectTeamByEngineerCode
(
request
.
getEngineerCode
());
OrgTeamEntity
team
=
new
ArrayList
<>(
teamEntitySet
).
get
(
0
);
//confirmed预约成功;other预约失败
//confirmed预约成功;other预约失败
if
(
Objects
.
equals
(
request
.
getAppointmentResult
(),
"CONFIRMED"
))
{
if
(
Objects
.
equals
(
request
.
getAppointmentResult
(),
"CONFIRMED"
))
{
orderInfo
.
setAppointmentStatus
(
String
.
valueOf
(
OrderFlowEnum
.
CONFIRM
));
orderInfo
.
setAppointmentStatus
(
String
.
valueOf
(
OrderFlowEnum
.
CONFIRM
));
...
@@ -198,8 +204,14 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
...
@@ -198,8 +204,14 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
orderInfo
.
setExpectTimeDesc
(
MessageFormat
.
format
(
"{0}月{1}日{2}-{3}点"
,
date
.
getMonthValue
(),
date
.
getDayOfMonth
(),
exceptStartHour
.
getHour
(),
exceptEndHour
.
getHour
()));
orderInfo
.
setExpectTimeDesc
(
MessageFormat
.
format
(
"{0}月{1}日{2}-{3}点"
,
date
.
getMonthValue
(),
date
.
getDayOfMonth
(),
exceptStartHour
.
getHour
(),
exceptEndHour
.
getHour
()));
orderInfo
.
setApplyNote
(
MessageFormat
.
format
(
"{0}-{1}"
,
DateTimeUtil
.
formatTime
(
exceptStartHour
),
DateTimeUtil
.
formatTime
(
exceptEndHour
)));
orderInfo
.
setApplyNote
(
MessageFormat
.
format
(
"{0}-{1}"
,
DateTimeUtil
.
formatTime
(
exceptStartHour
),
DateTimeUtil
.
formatTime
(
exceptEndHour
)));
List
<
String
>
tags
=
OrderUtil
.
handleTags
(
orderInfo
);
//是否特殊时间段
orderInfo
.
setBeanTags
(
String
.
join
(
","
,
tags
));
Integer
special
=
CommonUtil
.
isSpecial
(
orderInfo
.
getExpectTimeBegin
().
toLocalTime
(),
orderInfo
.
getExpectTimeEnd
().
toLocalTime
(),
team
.
getWorkOn
(),
team
.
getWorkOff
());
orderInfo
.
setIsSpecialTime
(
special
);
//是否当日单
Integer
cutoff
=
CommonUtil
.
isCutoff
(
orderInfo
.
getExpectTimeBegin
(),
team
.
getCuteOff
());
orderInfo
.
setIsCutoff
(
cutoff
);
}
}
orderInfo
.
setReasonForFailure
(
request
.
getReasonForFailure
());
orderInfo
.
setReasonForFailure
(
request
.
getReasonForFailure
());
...
...
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