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 3b2ebc45
authored
Jun 16, 2023
by
王力
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature_mvp616_wangl' into 'develop'
Feature mvp616 wangl See merge request !101
2 parents
126ead13
f2165cc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/ScheduleOverviewResp.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ScheduleServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/dto/ScheduleOverviewResp.java
View file @
3b2ebc4
...
@@ -22,7 +22,7 @@ public class ScheduleOverviewResp {
...
@@ -22,7 +22,7 @@ public class ScheduleOverviewResp {
private
String
value
;
private
String
value
;
private
String
level
;
private
String
level
;
private
String
orderDesc
;
private
String
orderDesc
;
private
String
distanceDes
;
private
String
distanceDes
c
;
private
OrderSum
order
;
private
OrderSum
order
;
private
List
<
Item
>
children
;
private
List
<
Item
>
children
;
}
}
...
@@ -33,7 +33,7 @@ public class ScheduleOverviewResp {
...
@@ -33,7 +33,7 @@ public class ScheduleOverviewResp {
private
String
value
;
private
String
value
;
private
String
level
;
private
String
level
;
private
String
orderDesc
;
private
String
orderDesc
;
private
String
distanceDes
;
private
String
distanceDes
c
;
private
OrderSum
order
;
private
OrderSum
order
;
}
}
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ScheduleServiceImpl.java
View file @
3b2ebc4
package
com
.
alibaba
.
cloud
.
integration
.
order
.
service
.
impl
;
package
com
.
alibaba
.
cloud
.
integration
.
order
.
service
.
impl
;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.dao.OrderAppointmentMPDao
;
import
com.alibaba.cloud.integration.order.dao.*
;
import
com.alibaba.cloud.integration.order.dao.OrderRequestMPDao
;
import
com.alibaba.cloud.integration.order.dao.OrgTeamEngineerMPDao
;
import
com.alibaba.cloud.integration.order.dao.OrgTeamMPDao
;
import
com.alibaba.cloud.integration.order.dto.ScheduleOverviewResp
;
import
com.alibaba.cloud.integration.order.dto.ScheduleOverviewResp
;
import
com.alibaba.cloud.integration.order.entity.OrderAppointment
;
import
com.alibaba.cloud.integration.order.entity.*
;
import
com.alibaba.cloud.integration.order.entity.OrderRequest
;
import
com.alibaba.cloud.integration.order.entity.OrgTeam
;
import
com.alibaba.cloud.integration.order.entity.OrgTeamEngineer
;
import
com.alibaba.cloud.integration.order.service.ScheduleService
;
import
com.alibaba.cloud.integration.order.service.ScheduleService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -38,6 +32,9 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -38,6 +32,9 @@ public class ScheduleServiceImpl implements ScheduleService {
@Autowired
@Autowired
private
OrderAppointmentMPDao
orderAppointmentMPDao
;
private
OrderAppointmentMPDao
orderAppointmentMPDao
;
@Autowired
private
EngineerInfoMPDao
engineerInfoMPDao
;
@Override
@Override
public
Result
<?>
getScheduleOverview
(
long
page
,
long
size
,
String
date
,
String
levelType
,
List
<
String
>
levelIds
)
{
public
Result
<?>
getScheduleOverview
(
long
page
,
long
size
,
String
date
,
String
levelType
,
List
<
String
>
levelIds
)
{
...
@@ -68,6 +65,10 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -68,6 +65,10 @@ public class ScheduleServiceImpl implements ScheduleService {
// 获取team技术员列表
// 获取team技术员列表
List
<
OrgTeamEngineer
>
teamEngineers
=
this
.
queryOrgTeamEngineers
(
t
.
getTeamId
());
List
<
OrgTeamEngineer
>
teamEngineers
=
this
.
queryOrgTeamEngineers
(
t
.
getTeamId
());
// 获取技术员列表
List
<
EngineerInfo
>
engineerInfoList
=
this
.
queryEngineerInfoByGroupId
(
t
.
getGroupId
());
Map
<
String
,
List
<
EngineerInfo
>>
engineers
=
engineerInfoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
EngineerInfo:
:
getEngineerCode
));
// 获取技术员对应的订单
// 获取技术员对应的订单
List
<
String
>
orderRequestIds
=
orders
.
stream
().
map
(
OrderRequest:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
String
>
orderRequestIds
=
orders
.
stream
().
map
(
OrderRequest:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
OrderAppointment
>
orderAppointments
=
this
.
queryOrderAppointments
(
orderRequestIds
,
date
);
List
<
OrderAppointment
>
orderAppointments
=
this
.
queryOrderAppointments
(
orderRequestIds
,
date
);
...
@@ -85,18 +86,25 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -85,18 +86,25 @@ public class ScheduleServiceImpl implements ScheduleService {
orders2
.
add
(
o
);
orders2
.
add
(
o
);
}
}
}
}
child
.
setName
(
""
);
// 设置技术员姓名
List
<
EngineerInfo
>
es
=
engineers
.
get
(
engineerCode
);
if
(
es
==
null
||
es
.
isEmpty
())
{
child
.
setName
(
engineerCode
);
}
else
{
child
.
setName
(
es
.
get
(
0
).
getName
());
}
child
.
setValue
(
engineerCode
);
child
.
setValue
(
engineerCode
);
child
.
setLevel
(
"engineer"
);
child
.
setLevel
(
"engineer"
);
child
.
setOrder
(
this
.
getTeamOrderSum
(
orders2
));
child
.
setOrder
(
this
.
getTeamOrderSum
(
orders2
));
child
.
setOrderDesc
(
Integer
.
toString
(
orders2
.
size
()));
child
.
setOrderDesc
(
Integer
.
toString
(
orders2
.
size
()));
child
.
setDistanceDes
(
""
);
child
.
setDistanceDes
c
(
""
);
children
.
add
(
child
);
children
.
add
(
child
);
}
}
team
.
setChildren
(
children
);
team
.
setChildren
(
children
);
team
.
setOrderDesc
(
String
.
format
(
"人均:%d"
,
orders
.
size
()
/
teamEngineers
.
size
()));
team
.
setOrderDesc
(
String
.
format
(
"人均:%d"
,
orders
.
size
()
/
teamEngineers
.
size
()));
team
.
setDistanceDes
(
""
);
team
.
setDistanceDes
c
(
""
);
teams
.
add
(
team
);
teams
.
add
(
team
);
}
}
...
@@ -153,6 +161,12 @@ public class ScheduleServiceImpl implements ScheduleService {
...
@@ -153,6 +161,12 @@ public class ScheduleServiceImpl implements ScheduleService {
return
orderAppointmentMPDao
.
selectList
(
lqw
);
return
orderAppointmentMPDao
.
selectList
(
lqw
);
}
}
private
List
<
EngineerInfo
>
queryEngineerInfoByGroupId
(
String
groupId
)
{
LambdaQueryWrapper
<
EngineerInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
EngineerInfo:
:
getGroupId
,
groupId
);
return
engineerInfoMPDao
.
selectList
(
lqw
);
}
private
ScheduleOverviewResp
.
OrderSum
getTeamOrderSum
(
List
<
OrderRequest
>
orders
)
{
private
ScheduleOverviewResp
.
OrderSum
getTeamOrderSum
(
List
<
OrderRequest
>
orders
)
{
ScheduleOverviewResp
.
OrderSum
s
=
new
ScheduleOverviewResp
.
OrderSum
();
ScheduleOverviewResp
.
OrderSum
s
=
new
ScheduleOverviewResp
.
OrderSum
();
...
...
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