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 a5aad5f3
authored
Jul 14, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件重命名
1 parent
59499185
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerTimelineReq.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerTimelineResp.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerTimelineReq.java
View file @
a5aad5f
...
...
@@ -3,7 +3,7 @@ package com.dituhui.pea.order.dto;
import
lombok.Data
;
@Data
public
class
Engin
n
erTimelineReq
{
public
class
Engin
e
erTimelineReq
{
private
String
enginnerCode
;
private
String
date
;
}
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerTimelineResp.java
View file @
a5aad5f
...
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
java.util.List
;
@Data
public
class
Engin
n
erTimelineResp
{
public
class
Engin
e
erTimelineResp
{
private
String
engineerCode
;
private
String
engineerName
;
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerTimelineServiceImpl.java
View file @
a5aad5f
...
...
@@ -3,7 +3,7 @@ package com.dituhui.pea.order.service.impl;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.TimeUtils
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dto.Engin
n
erTimelineResp
;
import
com.dituhui.pea.order.dto.Engin
e
erTimelineResp
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.service.EngineerTimelineService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -64,9 +64,9 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
String
branchId
=
this
.
getEngineerBranchId
(
engineerCode
);
String
warehouseLocation
=
this
.
getWarehouseLocation
(
branchId
);
List
<
Engin
n
erTimelineResp
.
DynamicItem
>
dynamics
=
this
.
packItems
(
timelines
,
orders
,
orderLocations
,
warehouseLocation
);
List
<
Engin
e
erTimelineResp
.
DynamicItem
>
dynamics
=
this
.
packItems
(
timelines
,
orders
,
orderLocations
,
warehouseLocation
);
Engin
nerTimelineResp
res
=
new
Enginn
erTimelineResp
();
Engin
eerTimelineResp
res
=
new
Engine
erTimelineResp
();
res
.
setEngineerCode
(
engineerCode
);
res
.
setEngineerName
(
engineerInfo
.
getName
());
res
.
setDynamics
(
dynamics
);
...
...
@@ -122,15 +122,15 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
}
private
List
<
Engin
n
erTimelineResp
.
DynamicItem
>
packItems
(
List
<
OrderEvent
>
timelines
,
List
<
OrderAppointment
>
orders
,
HashMap
<
String
,
String
>
locations
,
String
warehouseLocation
)
{
private
List
<
Engin
e
erTimelineResp
.
DynamicItem
>
packItems
(
List
<
OrderEvent
>
timelines
,
List
<
OrderAppointment
>
orders
,
HashMap
<
String
,
String
>
locations
,
String
warehouseLocation
)
{
int
index
=
0
;
String
order_id
,
title
,
type
,
text
,
location
;
List
<
Engin
n
erTimelineResp
.
DynamicItem
>
items
=
new
ArrayList
<>();
List
<
Engin
e
erTimelineResp
.
DynamicItem
>
items
=
new
ArrayList
<>();
Set
<
String
>
s
=
new
HashSet
<>();
for
(
OrderEvent
t:
timelines
){
Engin
nerTimelineResp
.
DynamicItem
item
=
new
Enginn
erTimelineResp
.
DynamicItem
();
Engin
eerTimelineResp
.
DynamicItem
item
=
new
Engine
erTimelineResp
.
DynamicItem
();
if
(
t
.
getEvent
().
equals
(
"分站取还配件"
))
{
title
=
t
.
getEvent
();
...
...
@@ -167,7 +167,7 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
continue
;
}
index
+=
1
;
Engin
nerTimelineResp
.
DynamicItem
item
=
new
Enginn
erTimelineResp
.
DynamicItem
();
Engin
eerTimelineResp
.
DynamicItem
item
=
new
Engine
erTimelineResp
.
DynamicItem
();
item
.
setTitle
(
String
.
format
(
"第%d单出发"
,
index
));
item
.
setTime
(
TimeUtils
.
IsoTimestamp2DateTime
(
o
.
getExpectStartTime
()));
item
.
setStatus
(
0
);
...
...
@@ -177,6 +177,6 @@ public class EngineerTimelineServiceImpl implements EngineerTimelineService {
items
.
add
(
item
);
}
// 根据items的time升序排序
return
items
.
stream
().
sorted
(
Comparator
.
comparing
(
Engin
n
erTimelineResp
.
DynamicItem
::
getTime
)).
collect
(
Collectors
.
toList
());
return
items
.
stream
().
sorted
(
Comparator
.
comparing
(
Engin
e
erTimelineResp
.
DynamicItem
::
getTime
)).
collect
(
Collectors
.
toList
());
}
}
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