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 b0ff6148
authored
Oct 28, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:工单改约,指派相关
1 parent
33cb9c35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
110 additions
and
71 deletions
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
project-order/src/main/java/com/dituhui/pea/order/controller/OrderAssignController.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderAssignReq.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderReschedule.java
project-order/src/main/java/com/dituhui/pea/order/entity/OrderInfoEntity.java
project-order/src/main/java/com/dituhui/pea/order/enums/OrderFlowEnum.java
project-order/src/main/java/com/dituhui/pea/order/enums/OrderStatus.java
project-order/src/main/java/com/dituhui/pea/order/enums/ServiceStatus.java
project-order/src/main/java/com/dituhui/pea/order/service/OrderAssign.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/EngineerGanttServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.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/OrderCreateServiceImpl.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/PeaOuterAPIServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
View file @
b0ff614
This diff is collapsed.
Click to expand it.
project-order/src/main/java/com/dituhui/pea/order/controller/OrderAssignController.java
View file @
b0ff614
...
...
@@ -17,59 +17,57 @@ import java.time.LocalDateTime;
@RequestMapping
(
"/pea-order"
)
public
class
OrderAssignController
{
@Autowired
private
OrderAssign
orderAssign
;
@Autowired
private
OrderAssign
orderAssign
;
@GetMapping
(
"/order/assign/recommend/engineers"
)
public
Result
<?>
getOrderAssignRecommendEngineers
(
@RequestParam
String
orderId
,
@RequestParam
(
required
=
false
)
String
key
,
@RequestParam
(
required
=
false
)
String
distance
,
@RequestParam
(
required
=
false
)
String
recommend
)
{
//服务单指派-推荐技术员列表
@GetMapping
(
"/order/assign/recommend/engineers"
)
public
Result
<?>
getOrderAssignRecommendEngineers
(
@RequestParam
String
orderId
,
@RequestParam
(
required
=
false
)
String
key
,
@RequestParam
(
required
=
false
)
String
distance
,
@RequestParam
(
required
=
false
)
String
recommend
)
{
//服务单指派-推荐技术员列表
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
getOrderAssignRecommendEngineers
(
orderId
,
key
,
distance
,
recommend
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
getOrderAssignRecommendEngineers
(
orderId
,
key
,
distance
,
recommend
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/assign"
)
public
Result
<?>
orderAssign
(
@RequestBody
OrderAssignReq
req
)
{
// 服务单指派-指派提交
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
orderAssign
(
req
.
getOrderId
(),
req
.
getEngineerCode
()
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/assign"
)
public
Result
<?>
orderAssign
(
@RequestBody
OrderAssignReq
req
)
{
// 服务单指派-指派提交
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
orderAssign
(
req
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/revoke/assign"
)
public
Result
<?>
orderRevokeAssign
(
@RequestBody
OrderRevokeAssign
req
)
{
// 放回工单池
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
orderRevokeAssign
(
req
.
getOrderId
());
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/revoke/assign"
)
public
Result
<?>
orderRevokeAssign
(
@RequestBody
OrderRevokeAssign
req
)
{
// 放回工单池
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
orderRevokeAssign
(
req
.
getOrderId
());
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/rescheduling"
)
public
Result
<?>
orderRescheduling
(
@RequestBody
OrderReschedule
req
){
// 订单改约
Result
<?>
res
=
null
;
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
LocalDateTime
expectEnd
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectEnd
());
try
{
res
=
orderAssign
.
orderReschedule
(
req
.
getOrderId
(),
expectBegin
,
expectEnd
,
req
.
getExpectDesc
());
}
catch
(
BusinessException
e
){
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@PostMapping
(
"/order/rescheduling"
)
public
Result
<?>
orderRescheduling
(
@RequestBody
OrderReschedule
req
)
{
// 订单改约
Result
<?>
res
=
null
;
try
{
res
=
orderAssign
.
orderReschedule
(
req
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
}
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
View file @
b0ff614
...
...
@@ -34,7 +34,7 @@ public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long>, JpaS
List
<
OrderInfoEntity
>
findByServiceStatusAndEngineerCode
(
String
serviceStatus
,
String
engineerCode
);
List
<
OrderInfoEntity
>
findByDtAndAddressId
(
String
dt
,
String
addressId
);
List
<
OrderInfoEntity
>
findByDtAndAddressId
(
LocalDate
dt
,
String
addressId
);
List
<
OrderInfoEntity
>
findByMultipleOrders
(
String
multipleOrders
);
}
project-order/src/main/java/com/dituhui/pea/order/dto/OrderAssignReq.java
View file @
b0ff614
...
...
@@ -4,6 +4,11 @@ import lombok.Data;
@Data
public
class
OrderAssignReq
{
private
String
engineerCode
;
private
String
orderId
;
private
String
engineerCode
;
private
String
orderId
;
/**
* 操作员
*/
private
String
operator
;
}
project-order/src/main/java/com/dituhui/pea/order/dto/OrderReschedule.java
View file @
b0ff614
...
...
@@ -8,4 +8,9 @@ public class OrderReschedule {
private
String
expectBegin
;
private
String
expectEnd
;
private
String
expectDesc
;
/**
* 操作员
*/
private
String
operator
;
}
project-order/src/main/java/com/dituhui/pea/order/entity/OrderInfoEntity.java
View file @
b0ff614
package
com
.
dituhui
.
pea
.
order
.
entity
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
lombok.Data
;
import
javax.persistence.*
;
...
...
@@ -131,7 +132,7 @@ public class OrderInfoEntity {
private
String
orderStatus
=
"NORMAL"
;
@Column
(
name
=
"service_status"
,
nullable
=
true
,
length
=
20
,
columnDefinition
=
"varchar(20) default 'INIT'"
)
private
String
serviceStatus
=
"INIT"
;
private
String
serviceStatus
=
OrderFlowEnum
.
INIT
.
name
()
;
@Column
(
name
=
"engineer_code"
,
nullable
=
true
,
length
=
32
,
columnDefinition
=
"varchar(32) default ''"
)
private
String
engineerCode
=
""
;
...
...
project-order/src/main/java/com/dituhui/pea/order/enums/OrderFlowEnum.java
0 → 100644
View file @
b0ff614
package
com
.
dituhui
.
pea
.
order
.
enums
;
/**
* 订单流程枚举类
*/
public
enum
OrderFlowEnum
{
// 指派状态: INIT-待指派/PRE-预指派/CONFIRM-确认指派(通知BEAN)
INIT
,
PRE
,
CONFIRM
,
}
project-order/src/main/java/com/dituhui/pea/order/enums/OrderStatus.java
View file @
b0ff614
...
...
@@ -3,7 +3,8 @@ package com.dituhui.pea.order.enums;
public
enum
OrderStatus
{
NORMAL
(
"正常"
),
CANCELED
(
"已取消"
),
RESCHEDULED
(
"已改约"
);
RESCHEDULED
(
"已改约"
),
ASSIGN
(
"工单指派"
);
private
final
String
description
;
OrderStatus
(
String
description
){
...
...
project-order/src/main/java/com/dituhui/pea/order/enums/ServiceStatus.java
View file @
b0ff614
package
com
.
dituhui
.
pea
.
order
.
enums
;
public
enum
ServiceStatus
{
// 服务状态:INIT-初始化/PENDING待服务/CONTACTED已排期/STARTED-已开始/FINISHED已完成/UNFINISHED-已上门未完成
INIT
(
"待服务"
),
PENDING
(
"待服务"
),
CONTACTED
(
"已排期"
),
...
...
project-order/src/main/java/com/dituhui/pea/order/service/OrderAssign.java
View file @
b0ff614
package
com
.
dituhui
.
pea
.
order
.
service
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.dto.OrderAssignReq
;
import
com.dituhui.pea.order.dto.OrderReschedule
;
import
org.bouncycastle.asn1.cms.TimeStampAndCRL
;
import
java.sql.Timestamp
;
...
...
@@ -13,9 +15,9 @@ public interface OrderAssign {
Result
<?>
getOrderAssignRecommendEngineers
(
String
orderId
,
String
key
,
String
distance
,
String
recommend
);
// 服务单指派-指派提交
Result
<?>
orderAssign
(
String
orderId
,
String
engineerCode
);
Result
<?>
orderAssign
(
OrderAssignReq
req
);
Result
<?>
orderRevokeAssign
(
String
orderId
);
Result
<?>
orderReschedule
(
String
orderId
,
LocalDateTime
expectBegin
,
LocalDateTime
expectEnd
,
String
expectDesc
);
Result
<?>
orderReschedule
(
OrderReschedule
req
);
}
project-order/src/main/java/com/dituhui/pea/order/service/OrderInfoService.java
View file @
b0ff614
...
...
@@ -2,6 +2,8 @@ package com.dituhui.pea.order.service;
import
com.dituhui.pea.common.Result
;
import
java.time.LocalDate
;
/**
* 订单相关
*/
...
...
@@ -14,7 +16,7 @@ public interface OrderInfoService {
* @param addressId 地址id
* @return 有则返回多条订单关联id,没有则不是一家多单
*/
Result
<
String
>
addMultipleOrders
(
String
dt
,
String
address
Id
);
Result
<
String
>
addMultipleOrders
(
LocalDate
dt
,
String
addressId
,
String
order
Id
);
/**
* 取消指定订单一家多台
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
b0ff614
...
...
@@ -10,6 +10,7 @@ import com.dituhui.pea.order.dto.DispatchEngineerOrderListResp;
import
com.dituhui.pea.order.dto.DispatchOrderListReq
;
import
com.dituhui.pea.order.dto.DispatchOrderListResp
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.enums.OrderGroupEnum
;
import
com.dituhui.pea.order.enums.OrderStatus
;
import
com.dituhui.pea.order.service.DispatchService
;
...
...
@@ -298,7 +299,7 @@ public class DispatchServiceImpl implements DispatchService {
Root
<
OrderInfoEntity
>
root
=
update
.
from
(
OrderInfoEntity
.
class
);
update
.
set
(
root
.
get
(
"planStartTime"
),
planStartTime
);
update
.
set
(
root
.
get
(
"planEndTime"
),
planEndTime
);
update
.
set
(
root
.
get
(
"appointmentStatus"
),
"CONFIRM"
);
update
.
set
(
root
.
get
(
"appointmentStatus"
),
OrderFlowEnum
.
CONFIRM
.
name
()
);
update
.
set
(
root
.
get
(
"appointmentMethod"
),
"MANUAL"
);
update
.
set
(
root
.
get
(
"engineerCode"
),
engineerCode
);
update
.
where
(
...
...
@@ -441,7 +442,7 @@ public class DispatchServiceImpl implements DispatchService {
List
<
Predicate
>
predicates
=
new
ArrayList
<>();
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"dt"
),
TimeUtils
.
IsoDate2LocalDate
(
reqDTO
.
getDate
())));
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"appointmentStatus"
),
"INIT"
));
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"appointmentStatus"
),
OrderFlowEnum
.
INIT
.
name
()
));
String
levelType
=
reqDTO
.
getLevelType
();
String
levelValue
=
reqDTO
.
getLevelValue
();
...
...
@@ -775,7 +776,7 @@ class OrderRequestScheduler {
List
<
Line
>
newTasks
=
new
ArrayList
<>();
for
(
OrderInfoEntity
o
:
orderRequests
)
{
if
(!
o
.
getAppointmentStatus
().
equals
(
"INIT"
))
{
if
(!
o
.
getAppointmentStatus
().
equals
(
OrderFlowEnum
.
INIT
.
name
()
))
{
continue
;
}
Line
t
=
new
Line
(
o
.
getOrderId
(),
30
);
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerGanttServiceImpl.java
View file @
b0ff614
...
...
@@ -7,6 +7,7 @@ import com.dituhui.pea.order.dao.*;
import
com.dituhui.pea.order.dto.EngineersGanttDTO
;
import
com.dituhui.pea.order.dto.LabelValueDTO
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.EngineerGanttService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -84,7 +85,7 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
slots
=
new
ArrayList
<>();
}
slot
.
setBgColor
(
getColor
(
order
.
getServiceStatus
()));
if
(!
order
.
getAppointmentStatus
().
equals
(
"CONFIRM"
))
{
if
(!
order
.
getAppointmentStatus
().
equals
(
OrderFlowEnum
.
CONFIRM
.
name
()
))
{
slot
.
setBorderStyle
(
"dashed"
);
// 未确认的指派,统一加上虚框
}
slots
.
add
(
slot
);
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.java
View file @
b0ff614
...
...
@@ -12,6 +12,7 @@ import com.dituhui.pea.order.entity.OrderEventEntity;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.entity.OrgGroupEntity
;
import
com.dituhui.pea.order.entity.OrgWarehouseInfoEntity
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.EngineerTimelineService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -88,7 +89,7 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
private
List
<
OrderInfoEntity
>
selectEngineerOrders
(
String
engineerCode
,
LocalDate
dt
){
List
<
OrderInfoEntity
>
orders
=
orderInfoDao
.
findByEngineerCodeAndDtAndAppointmentStatusIn
(
engineerCode
,
dt
,
List
.
of
(
"PRE"
,
"CONFIRM"
));
engineerCode
,
dt
,
List
.
of
(
OrderFlowEnum
.
PRE
.
name
(),
OrderFlowEnum
.
CONFIRM
.
name
()
));
return
orders
.
stream
().
filter
(
o
->
!
o
.
getOrderStatus
().
equals
(
"CANCEL"
)).
collect
(
Collectors
.
toList
());
}
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
b0ff614
This diff is collapsed.
Click to expand it.
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
b0ff614
...
...
@@ -26,6 +26,7 @@ import com.dituhui.pea.order.dto.LocationDTO;
import
com.dituhui.pea.order.dto.OrderCreateReqDTO
;
import
com.dituhui.pea.order.dto.ParameterRespDTO
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.CommonService
;
import
com.dituhui.pea.order.service.OrderCreateService
;
import
io.seata.core.context.RootContext
;
...
...
@@ -145,7 +146,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity
.
setAddress
(
location
.
getFormattedAddress
());
}
// 默认值
entity
.
setAppointmentStatus
(
"INIT"
);
entity
.
setAppointmentStatus
(
OrderFlowEnum
.
INIT
.
name
()
);
entity
.
setBeanStatus
(
"OPEN"
);
entity
.
setBeanSubStatus
(
""
);
entity
.
setAppointmentStatus
(
"NOT_ASSIGNED"
);
...
...
@@ -226,7 +227,7 @@ public class OrderCreateServiceImpl implements OrderCreateService {
EngineerInfoEntity
engineerInfo
=
engineerInfoDao
.
getByEngineerCode
(
assignEngineerCode
);
thisOrderEntity
.
setEngineerName
(
engineerInfo
.
getName
());
thisOrderEntity
.
setEngineerPhone
(
engineerInfo
.
getPhone
());
thisOrderEntity
.
setAppointmentStatus
(
"PRE"
);
thisOrderEntity
.
setAppointmentStatus
(
OrderFlowEnum
.
PRE
.
name
()
);
thisOrderEntity
.
setDispatcher
(
"AUTO_NOW"
);
thisOrderEntity
.
setPlanStartTime
(
insertNode
.
getPlanStartTime
());
thisOrderEntity
.
setPlanEndTime
(
insertNode
.
getPlanEndTime
());
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
b0ff614
...
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDate
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -32,12 +33,16 @@ public class OrderInfoServiceImpl implements OrderInfoService {
*/
@Override
@Transactional
public
Result
<
String
>
addMultipleOrders
(
String
dt
,
String
address
Id
)
{
public
Result
<
String
>
addMultipleOrders
(
LocalDate
dt
,
String
addressId
,
String
order
Id
)
{
List
<
OrderInfoEntity
>
infoList
=
orderInfoDao
.
findByDtAndAddressId
(
dt
,
addressId
);
if
(
CollectionUtils
.
isEmpty
(
infoList
))
{
return
Result
.
success
(
null
);
}
List
<
String
>
multipleOrdersList
=
infoList
.
stream
().
filter
(
e
->
StringUtils
.
isNotEmpty
(
e
.
getMultipleOrders
())).
map
(
OrderInfoEntity:
:
getMultipleOrders
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
multipleOrdersList
=
infoList
.
stream
().
filter
(
e
->
StringUtils
.
isNotEmpty
(
e
.
getMultipleOrders
())
&&
!
e
.
getOrderId
().
equals
(
orderId
))
.
map
(
OrderInfoEntity:
:
getMultipleOrders
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
multipleOrdersList
))
{
return
Result
.
success
(
null
);
}
if
(
CollectionUtils
.
isNotEmpty
(
multipleOrdersList
))
{
return
Result
.
success
(
multipleOrdersList
.
get
(
0
));
}
...
...
@@ -59,6 +64,9 @@ public class OrderInfoServiceImpl implements OrderInfoService {
@Override
@Transactional
public
Result
deleteMultipleOrders
(
String
multipleOrders
,
String
orderId
)
{
if
(
StringUtils
.
isBlank
(
multipleOrders
))
{
return
Result
.
success
();
}
List
<
OrderInfoEntity
>
infoList
=
orderInfoDao
.
findByMultipleOrders
(
multipleOrders
);
for
(
OrderInfoEntity
infoEntity
:
infoList
)
{
if
(
infoEntity
.
getOrderId
().
equals
(
orderId
))
{
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/PeaOuterAPIServiceImpl.java
View file @
b0ff614
...
...
@@ -9,6 +9,7 @@ import com.dituhui.pea.order.dto.param.Order;
import
com.dituhui.pea.order.dto.param.OrderDTO
;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.entity.OrgGroupEntity
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.PeaOuterAPIService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -61,7 +62,7 @@ public class PeaOuterAPIServiceImpl implements PeaOuterAPIService {
@Override
public
Order
orderIncreaseQuery
(
String
engineerCode
,
Location
location
,
Integer
idleDuration
)
{
OrderInfoEntity
sss
=
orderInfoDao
.
findTopBySkillAndAppointmentStatus
(
"标准安装"
,
"INIT"
);
OrderInfoEntity
sss
=
orderInfoDao
.
findTopBySkillAndAppointmentStatus
(
"标准安装"
,
OrderFlowEnum
.
INIT
.
name
()
);
Order
order
=
new
Order
();
order
.
setOrderId
(
sss
.
getOrderId
());
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
View file @
b0ff614
...
...
@@ -8,6 +8,7 @@ import com.dituhui.pea.order.common.TimeUtils;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dto.*
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.ScheduleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
...
...
@@ -94,7 +95,7 @@ public class ScheduleServiceImpl implements ScheduleService {
team
.
setLevel
(
"team"
);
// 获取改team订单列表
List
<
OrderInfoEntity
>
orders
=
orderInfoDao
.
findByDtAndOrgTeamIdAndAppointmentStatusIn
(
date
,
t
.
getTeamId
(),
List
.
of
(
"PRE"
,
"CONFIRM"
));
List
<
OrderInfoEntity
>
orders
=
orderInfoDao
.
findByDtAndOrgTeamIdAndAppointmentStatusIn
(
date
,
t
.
getTeamId
(),
List
.
of
(
OrderFlowEnum
.
PRE
.
name
(),
OrderFlowEnum
.
CONFIRM
.
name
()
));
team
.
setOrder
(
this
.
getTeamOrderSum
(
orders
,
skillMapping
));
// 技术员指派单列表
...
...
@@ -159,7 +160,7 @@ public class ScheduleServiceImpl implements ScheduleService {
List
<
LabelValueDTO
>
emptyTips
=
new
ArrayList
<>();
List
<
OrderInfoEntity
>
orderAppointments
=
orderInfoDao
.
findByEngineerCodeAndDtAndAppointmentStatusIn
(
engineerCode
,
date
,
List
.
of
(
"PRE"
,
"CONFIRM"
));
engineerCode
,
date
,
List
.
of
(
OrderFlowEnum
.
PRE
.
name
(),
OrderFlowEnum
.
CONFIRM
.
name
()
));
List
<
TimeLineDTO
>
timelines
=
new
ArrayList
<>();
for
(
OrderInfoEntity
o
:
orderAppointments
)
{
TimeLineDTO
item
=
new
TimeLineDTO
();
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
View file @
b0ff614
...
...
@@ -10,6 +10,7 @@ import com.dituhui.pea.order.dto.OrderChangeListDTO;
import
com.dituhui.pea.order.dto.WorkbenchSummaryResp
;
import
com.dituhui.pea.order.entity.OrderEventEntity
;
import
com.dituhui.pea.order.entity.OrderInfoEntity
;
import
com.dituhui.pea.order.enums.OrderFlowEnum
;
import
com.dituhui.pea.order.service.WorkbenchService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -240,7 +241,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
Long
autoTotal
=
summary
.
getOrDefault
(
"autoTotal"
,
0L
);
Long
total
=
summary
.
getOrDefault
(
"total"
,
0L
);
HashMap
<
String
,
List
<
String
>>
p
=
this
.
packParams
(
"appointmentStatus"
,
"INIT"
);
HashMap
<
String
,
List
<
String
>>
p
=
this
.
packParams
(
"appointmentStatus"
,
OrderFlowEnum
.
INIT
.
name
()
);
HashMap
<
String
,
List
<
String
>>
p1
=
this
.
packParams
(
"appointmentType"
,
"MANUAL"
);
p1
.
putAll
(
p
);
...
...
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