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 f998c058
authored
Jun 14, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库字段变更
1 parent
a0ed0646
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
14 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/controller/DispatchController.java
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderAppointment.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/DispatchService.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/DispatchServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EngineerTimelineServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/OrderServiceDetailImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/controller/DispatchController.java
View file @
f998c05
...
...
@@ -2,6 +2,7 @@ package com.alibaba.cloud.integration.order.controller;
import
com.alibaba.cloud.integration.common.BusinessException
;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.dto.DispatchOrderConfirmReqDTO
;
import
com.alibaba.cloud.integration.order.service.DispatchService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -41,11 +42,11 @@ public class DispatchController {
}
@PostMapping
(
"/dispatch/order/confirm"
)
public
Result
<?>
dispatchOrderConfirm
(
@RequestBody
String
engineerCode
,
@RequestBody
String
orderIds
)
{
public
Result
<?>
dispatchOrderConfirm
(
@RequestBody
DispatchOrderConfirmReqDTO
req
)
{
// 派工台确认派单
Result
<?>
res
=
null
;
try
{
res
=
dispatchService
.
dispatchOrderConfirm
(
engineerCode
,
orderIds
);
res
=
dispatchService
.
dispatchOrderConfirm
(
req
.
getEngineerCode
(),
req
.
getOrderIds
()
);
}
catch
(
BusinessException
e
){
Result
.
failed
(
e
.
getMessage
());
}
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderAppointment.java
View file @
f998c05
package
com
.
alibaba
.
cloud
.
integration
.
order
.
entity
;
import
lombok.Data
;
import
java.sql.Timestamp
;
@Data
...
...
@@ -14,9 +15,11 @@ public class OrderAppointment {
private
String
engineerPhone
;
private
String
engineerAge
;
private
String
isWorkshop
;
private
Timestamp
expectTime
;
private
Timestamp
expectStartTime
;
private
Timestamp
expectEndTime
;
private
Timestamp
actualTime
;
private
Timestamp
startTime
;
private
Timestamp
actualStartTime
;
private
Timestamp
actualEndTime
;
private
Timestamp
endTime
;
private
String
pre_status
;
private
String
status
;
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/DispatchService.java
View file @
f998c05
...
...
@@ -10,5 +10,5 @@ public interface DispatchService {
Result
<?>
getDispatchEngineerOrderList
(
String
levelType
,
List
<
String
>
levelIds
,
String
date
);
Result
<?>
dispatchOrderConfirm
(
String
engineerCode
,
String
orderIds
);
Result
<?>
dispatchOrderConfirm
(
String
engineerCode
,
List
<
String
>
orderIds
);
}
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/DispatchServiceImpl.java
View file @
f998c05
...
...
@@ -190,7 +190,8 @@ public class DispatchServiceImpl implements DispatchService {
}
@Override
public
Result
<?>
dispatchOrderConfirm
(
String
engineerCode
,
String
orderIds
)
{
public
Result
<?>
dispatchOrderConfirm
(
String
engineerCode
,
List
<
String
>
orderIds
)
{
// 派工台确认派单
return
null
;
}
...
...
@@ -225,11 +226,11 @@ public class DispatchServiceImpl implements DispatchService {
LambdaQueryWrapper
<
OrderAppointment
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
OrderAppointment:
:
getEngineerCode
,
engineerCodes
);
lqw
.
ge
(
OrderAppointment:
:
getExpectTime
,
this
.
getTimestampFromDate
(
date
,
"00:00:00"
));
lqw
.
le
(
OrderAppointment:
:
getExpectTime
,
this
.
getTimestampFromDate
(
date
,
"23:59:59"
));
lqw
.
ge
(
OrderAppointment:
:
getExpect
Start
Time
,
this
.
getTimestampFromDate
(
date
,
"00:00:00"
));
lqw
.
le
(
OrderAppointment:
:
getExpect
Start
Time
,
this
.
getTimestampFromDate
(
date
,
"23:59:59"
));
lqw
.
orderByAsc
(
OrderAppointment:
:
getEngineerCode
);
lqw
.
orderByAsc
(
OrderAppointment:
:
getExpectTime
);
lqw
.
orderByAsc
(
OrderAppointment:
:
getExpect
Start
Time
);
List
<
OrderAppointment
>
records
=
orderAppointmentMPDao
.
selectList
(
lqw
);
return
records
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderAppointment:
:
getEngineerCode
));
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EngineerTimelineServiceImpl.java
View file @
f998c05
...
...
@@ -80,8 +80,8 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
// 获取指派单列表
LambdaQueryWrapper
<
OrderAppointment
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
OrderAppointment:
:
getEngineerCode
,
engineerCode
);
lqw
.
ge
(
OrderAppointment:
:
getExpectTime
,
date
+
" 00:00:00"
);
lqw
.
le
(
OrderAppointment:
:
getExpectTime
,
date
+
" 23:59:59"
);
lqw
.
ge
(
OrderAppointment:
:
getExpect
Start
Time
,
date
+
" 00:00:00"
);
lqw
.
le
(
OrderAppointment:
:
getExpect
Start
Time
,
date
+
" 23:59:59"
);
return
orderAppointmentMPDao
.
selectList
(
lqw
);
}
...
...
@@ -181,7 +181,7 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
index
+=
1
;
EnginnerTimelineResp
.
DynamicItem
item
=
new
EnginnerTimelineResp
.
DynamicItem
();
item
.
setTitle
(
String
.
format
(
"第%d单出发"
,
index
));
item
.
setTime
(
this
.
Timestamp2Datetime
(
o
.
getExpectTime
()));
item
.
setTime
(
this
.
Timestamp2Datetime
(
o
.
getExpect
Start
Time
()));
item
.
setStatus
(
0
);
item
.
setText
(
String
.
format
(
"%d"
,
index
));
item
.
setLocation
(
locations
.
get
(
o
.
getOrderId
()));
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/OrderServiceDetailImpl.java
View file @
f998c05
...
...
@@ -132,13 +132,13 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
// 获取title
String
title
=
engineerName
;
if
(!
lastSubOrderId
.
equals
(
subOrderId
))
{
title
=
String
.
format
(
"%s_%s"
,
engineerName
,
this
.
Timestamp2Datetime
(
o
.
getExpectTime
(),
"yyyyMMdd"
));
title
=
String
.
format
(
"%s_%s"
,
engineerName
,
this
.
Timestamp2Datetime
(
o
.
getExpect
Start
Time
(),
"yyyyMMdd"
));
}
OrderAppointmentListResp
.
OrderAppointment
item
=
new
OrderAppointmentListResp
.
OrderAppointment
();
item
.
setTitle
(
title
);
item
.
setEngineerCode
(
o
.
getEngineerCode
());
item
.
setExpectTime
(
o
.
getExpectTime
().
toString
());
item
.
setExpectTime
(
o
.
getExpect
Start
Time
().
toString
());
item
.
setTimelines
(
this
.
packOrderTimeline
(
timelines
.
get
(
subOrderId
)));
item
.
setItems
(
this
.
packEngineerItems
(
eg
,
es
,
groups
.
get
(
eg
.
getGroupId
()),
skills
));
...
...
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