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 808f6e4c
authored
Dec 05, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.dituhui.com/bsh/project/project
into develop
2 parents
31f5e265
b40829de
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
24 deletions
project-order/src/main/java/com/dituhui/pea/order/constant/OrderReschedulingReason.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderReschedule.java
project-order/src/main/java/com/dituhui/pea/order/service/OrderInfoService.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.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/constant/OrderReschedulingReason.java
View file @
808f6e4
...
...
@@ -32,17 +32,17 @@ public class OrderReschedulingReason {
put
(
"服务政策/流程相关"
,
new
ArrayList
<>()
{
{
add
(
"超派"
);
add
(
"重复单(工程师发起申请按钮,由CC校验取消)"
);
//
add("重复单(工程师发起申请按钮,由CC校验取消)");
add
(
"服务指派不准确"
);
add
(
"转入车间服务流程"
);
add
(
"退换机方案沟通中"
);
add
(
"不接受退换机政策"
);
//
add("不接受退换机政策");
add
(
"用户考虑费用问题"
);
add
(
"用户不认可收费标准"
);
//
add("用户不认可收费标准");
add
(
"用户考虑安装/维修方案"
);
add
(
"用户不接受维修标准"
);
//
add("用户不接受维修标准");
add
(
"用户考虑软性故障相关解释"
);
add
(
"没有相关安装/维修操作指导(不提供此服务)"
);
//
add("没有相关安装/维修操作指导(不提供此服务)");
}
});
put
(
"安装、维修环境(极端天气)"
,
new
ArrayList
<>()
{
...
...
@@ -73,15 +73,15 @@ public class OrderReschedulingReason {
put
(
"用户相关"
,
new
ArrayList
<>()
{
{
add
(
"用户不接电话且已短信通知用户(改约3次以内)"
);
add
(
"3天6次未联系上用户"
);
//
add("3天6次未联系上用户");
add
(
"无法满足消费者夜间上门需求(非加单)"
);
add
(
"用户期望的服务时间与其他用户冲突"
);
add
(
"上门前得知外部人员已服务"
);
add
(
"用户要求自行来分部购买配/附件(仅仓管可选)"
);
add
(
"机器已退/换,不再需要上门服务(仅行政/用户/CC可选)"
);
add
(
"非BSH产品"
);
//
add("上门前得知外部人员已服务");
//
add("用户要求自行来分部购买配/附件(仅仓管可选)");
//
add("机器已退/换,不再需要上门服务(仅行政/用户/CC可选)");
//
add("非BSH产品");
add
(
"用户主动提出往后改约(必须短信通知用户)"
);
add
(
"机器故障已消除(仅行政/用户/CC可选)"
);
//
add("机器故障已消除(仅行政/用户/CC可选)");
add
(
"消费者希望提前上门"
);
}
});
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderReschedule.java
View file @
808f6e4
...
...
@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import
com.dituhui.pea.order.dto.param.Location
;
import
lombok.Data
;
import
java
x.validation.constraints.NotBlank
;
import
java
.util.Date
;
import
java.util.List
;
@Data
...
...
@@ -12,6 +12,10 @@ public class OrderReschedule {
private
String
expectBegin
;
private
String
expectEnd
;
private
String
expectDesc
;
/**
* 操作发生时间
*/
private
Date
happendDate
=
new
Date
();
/**
* 操作员
...
...
project-order/src/main/java/com/dituhui/pea/order/service/OrderInfoService.java
View file @
808f6e4
...
...
@@ -8,7 +8,9 @@ import com.dituhui.pea.order.entity.OrderInfoEntity;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
com.dituhui.pea.order.entity.SkillInfoEntity
;
import
java.text.ParseException
;
import
java.time.LocalDate
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -68,6 +70,17 @@ public interface OrderInfoService {
* @param isSub 是否指派辅助指派工程师
* @return
*/
public
Result
<
OrderInfoEntity
>
insterEngineerOrders
(
List
<
OrderInfoEntity
>
engineerOrders
,
OrderInfoEntity
insertOrder
,
SkillInfoEntity
skillInfo
,
OrgTeamEntity
orgTeam
,
EngineerInfoEntity
engineer
,
Boolean
isSub
);
Result
<
OrderInfoEntity
>
insterEngineerOrders
(
List
<
OrderInfoEntity
>
engineerOrders
,
OrderInfoEntity
insertOrder
,
SkillInfoEntity
skillInfo
,
OrgTeamEntity
orgTeam
,
EngineerInfoEntity
engineer
,
Boolean
isSub
);
/**
* 派工消息通知bean
*
* @param source 原订单
* @param target 改动后订单
* @param happened 变动发生时间
* @param reason 改约原因
* @param operator 操作人
* @return
*/
Boolean
rescheduled
(
OrderInfoEntity
source
,
OrderInfoEntity
target
,
Date
happened
,
String
reason
,
String
operator
);
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
808f6e4
...
...
@@ -22,6 +22,7 @@ import com.google.common.collect.Sets;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
...
...
@@ -359,6 +360,8 @@ public class DispatchServiceImpl implements DispatchService {
OrgTeamEntity
byTeamId
=
orgTeamDao
.
getByTeamId
(
orgTeamEngineers
.
get
(
0
).
getTeamId
());
for
(
OrderInfoEntity
entity
:
orders
)
{
final
OrderInfoEntity
sourceOrder
=
new
OrderInfoEntity
();
BeanUtils
.
copyProperties
(
entity
,
sourceOrder
);
if
(
StringUtils
.
isNotBlank
(
entity
.
getEngineerCode
())
&&
entity
.
getEngineerCode
().
equals
(
engineer
.
getEngineerCode
()))
{
return
Result
.
failed
(
String
.
format
(
"订单已指派给技术员[%s], 不必重复指派给同一个技术员"
,
engineer
.
getName
()));
}
...
...
@@ -394,6 +397,13 @@ public class DispatchServiceImpl implements DispatchService {
entity
.
setOrgBranchId
(
byTeamId
.
getBranchId
());
entity
.
setOrgClusterId
(
byTeamId
.
getClusterId
());
}
//回调改约
Boolean
boo
=
orderInfoService
.
rescheduled
(
sourceOrder
,
entity
,
new
Date
(),
""
,
"PEA"
);
log
.
info
(
"[orderReschedule] orderId:{}, 通知bean结果: {}"
,
sourceOrder
.
getOrderId
(),
boo
);
if
(!
boo
)
{
throw
new
BusinessException
(
"服务工单变更结果通知BEAN失败"
);
}
orderInfoDao
.
save
(
entity
);
//记录流程
commonService
.
addOrderEvent
(
entity
.
getOrderId
(),
""
,
"PEA"
,
"PEA"
,
OrderEventEnum
.
reassignment
.
getEvent
(),
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
808f6e4
...
...
@@ -54,6 +54,7 @@ import lombok.Setter;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -66,16 +67,7 @@ import javax.persistence.criteria.Root;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
...
...
@@ -218,7 +210,8 @@ public class OrderAssignImpl implements OrderAssign {
if
(
entity
==
null
)
{
return
Result
.
failed
(
"订单不存在"
);
}
final
OrderInfoEntity
sourceOrder
=
new
OrderInfoEntity
();
BeanUtils
.
copyProperties
(
entity
,
sourceOrder
);
EngineerInfoEntity
engineer
=
engineerInfoDao
.
getByEngineerCode
(
req
.
getEngineerCode
());
List
<
OrgTeamEngineerEntity
>
orgTeamEngineers
=
orgTeamEngineerDao
.
findByEngineerCode
(
engineer
.
getEngineerCode
());
...
...
@@ -256,6 +249,12 @@ public class OrderAssignImpl implements OrderAssign {
entity
.
setOrgBranchId
(
byTeamId
.
getBranchId
());
entity
.
setOrgClusterId
(
byTeamId
.
getClusterId
());
}
//回调改约
Boolean
boo
=
orderInfoService
.
rescheduled
(
sourceOrder
,
entity
,
new
Date
(),
""
,
"PEA"
);
log
.
info
(
"[orderReschedule] orderId:{}, 通知bean结果: {}"
,
sourceOrder
.
getOrderId
(),
boo
);
if
(!
boo
)
{
throw
new
BusinessException
(
"服务工单变更结果通知BEAN失败"
);
}
orderInfoDao
.
save
(
entity
);
// 工单变更登记
commonService
.
addOrderEvent
(
entity
.
getOrderId
(),
""
,
"BEAN"
,
"BEAN"
,
OrderEventEnum
.
reassignment
.
getEvent
(),
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
808f6e4
This diff is collapsed.
Click to expand it.
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