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 377d141b
authored
Jun 21, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口变更
1 parent
7fe87d53
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/ScheduleEngineerOverviewResp.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/ScheduleEngineerOverviewResp.java
View file @
377d141
...
@@ -11,8 +11,8 @@ public class ScheduleEngineerOverviewResp {
...
@@ -11,8 +11,8 @@ public class ScheduleEngineerOverviewResp {
private
String
startTime
;
private
String
startTime
;
private
String
endTime
;
private
String
endTime
;
private
List
<
Dynamic
>
dynamics
;
private
List
<
Dynamic
>
dynamics
;
private
List
<
Time
line
>
timeline
s
;
private
List
<
Time
LineDTO
>
order
s
;
private
List
<
Order
>
orders
;
private
List
<
Order
>
order
Detail
s
;
@Data
@Data
public
static
class
Dynamic
{
public
static
class
Dynamic
{
...
@@ -21,13 +21,6 @@ public class ScheduleEngineerOverviewResp {
...
@@ -21,13 +21,6 @@ public class ScheduleEngineerOverviewResp {
}
}
@Data
@Data
public
static
class
Timeline
{
private
String
startTime
;
private
String
endTime
;
private
String
type
;
}
@Data
public
static
class
Order
{
public
static
class
Order
{
private
String
orderId
;
private
String
orderId
;
private
String
location
;
private
String
location
;
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/ScheduleServiceImpl.java
View file @
377d141
...
@@ -7,8 +7,10 @@ import com.dituhui.pea.common.BusinessException;
...
@@ -7,8 +7,10 @@ import com.dituhui.pea.common.BusinessException;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.TimeUtils
;
import
com.dituhui.pea.order.common.TimeUtils
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dto.LabelValueDTO
;
import
com.dituhui.pea.order.dto.ScheduleEngineerOverviewResp
;
import
com.dituhui.pea.order.dto.ScheduleEngineerOverviewResp
;
import
com.dituhui.pea.order.dto.ScheduleOverviewResp
;
import
com.dituhui.pea.order.dto.ScheduleOverviewResp
;
import
com.dituhui.pea.order.dto.TimeLineDTO
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.service.ScheduleService
;
import
com.dituhui.pea.order.service.ScheduleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -125,19 +127,22 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -125,19 +127,22 @@ public class ScheduleServiceImpl implements ScheduleService {
@Override
@Override
public
Result
<?>
getScheduleEngineerOverview
(
String
date
,
String
engineerCode
)
throws
BusinessException
{
public
Result
<?>
getScheduleEngineerOverview
(
String
date
,
String
engineerCode
)
throws
BusinessException
{
EngineerInfo
engineer
=
this
.
queryEngineerInfo
(
engineerCode
);
EngineerInfo
engineer
=
engineerInfoMPDao
.
getByEngineerCode
(
engineerCode
);
if
(
engineer
==
null
)
{
if
(
engineer
==
null
)
{
throw
new
BusinessException
(
"分销员不存在"
);
throw
new
BusinessException
(
"分销员不存在"
);
}
}
List
<
LabelValueDTO
>
emptyTips
=
new
ArrayList
<>();
List
<
OrderAppointment
>
orderAppointments
=
this
.
queryOrderAppointmentsByEngineerCode
(
engineerCode
,
date
);
List
<
OrderAppointment
>
orderAppointments
=
this
.
queryOrderAppointmentsByEngineerCode
(
engineerCode
,
date
);
List
<
TimeLineDTO
>
timelines
=
new
ArrayList
<>();
List
<
ScheduleEngineerOverviewResp
.
Timeline
>
timelines
=
new
ArrayList
<>();
for
(
OrderAppointment
o
:
orderAppointments
)
{
for
(
OrderAppointment
o
:
orderAppointments
)
{
ScheduleEngineerOverviewResp
.
Timeline
item
=
new
ScheduleEngineerOverviewResp
.
Timeline
();
TimeLineDTO
item
=
new
TimeLineDTO
();
item
.
setStartTime
(
TimeUtils
.
timestamp2DateTime
(
o
.
getExpectStartTime
(),
"hh:mm"
));
item
.
setOrderId
(
o
.
getOrderId
());
item
.
setEndTime
(
TimeUtils
.
timestamp2DateTime
(
o
.
getExpectEndTime
(),
"hh:mm"
));
item
.
setPreStatus
(
o
.
getPreStatus
());
item
.
setType
(
o
.
getStatus
());
item
.
setAppointmentStatus
(
o
.
getStatus
());
item
.
setStartTime
(
TimeUtils
.
IsoTimestamp2DateTime
(
o
.
getExpectStartTime
()));
item
.
setEndTime
(
TimeUtils
.
IsoTimestamp2DateTime
(
o
.
getExpectEndTime
()));
item
.
setTips
(
emptyTips
);
timelines
.
add
(
item
);
timelines
.
add
(
item
);
}
}
...
@@ -192,8 +197,8 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -192,8 +197,8 @@ public class ScheduleServiceImpl implements ScheduleService {
res
.
setStartTime
(
"08:00"
);
// TODO
res
.
setStartTime
(
"08:00"
);
// TODO
res
.
setEndTime
(
"18:00"
);
res
.
setEndTime
(
"18:00"
);
res
.
setDynamics
(
dynamics
);
res
.
setDynamics
(
dynamics
);
res
.
set
Timeline
s
(
timelines
);
res
.
set
Order
s
(
timelines
);
res
.
setOrders
(
orders
);
res
.
setOrder
Detail
s
(
orders
);
return
Result
.
success
(
res
);
return
Result
.
success
(
res
);
}
}
...
...
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