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 3bafa010
authored
Jun 05, 2023
by
王力
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature_OrderServiceList_wangl' into 'develop'
数据库表字段变更 See merge request !19
2 parents
98883a6c
a004ec31
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EnginnerTimelineServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EnginnerTimelineServiceImpl.java
View file @
3bafa01
...
@@ -3,11 +3,7 @@ package com.alibaba.cloud.integration.order.service.impl;
...
@@ -3,11 +3,7 @@ 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.*
;
import
com.alibaba.cloud.integration.order.dao.*
;
import
com.alibaba.cloud.integration.order.dto.EnginnerTimelineResp
;
import
com.alibaba.cloud.integration.order.dto.EnginnerTimelineResp
;
import
com.alibaba.cloud.integration.order.entity.EngineerInfo
;
import
com.alibaba.cloud.integration.order.entity.*
;
import
com.alibaba.cloud.integration.order.entity.EngineerTimeline
;
import
com.alibaba.cloud.integration.order.entity.OrderRequest
;
import
com.alibaba.cloud.integration.order.entity.WarehouseInfo
;
import
com.alibaba.cloud.integration.order.entity.OrderAppointment
;
import
com.alibaba.cloud.integration.order.service.EnginnerTimelineService
;
import
com.alibaba.cloud.integration.order.service.EnginnerTimelineService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -39,6 +35,9 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
...
@@ -39,6 +35,9 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
@Autowired
@Autowired
private
WarehouseInfoDao
warehouseInfoDao
;
private
WarehouseInfoDao
warehouseInfoDao
;
@Autowired
private
OrgGroupDao
orgGroupDao
;
@Transactional
@Transactional
@Override
@Override
public
Result
<?>
GetEnginnerTimelines
(
String
engineerCode
,
String
date
){
public
Result
<?>
GetEnginnerTimelines
(
String
engineerCode
,
String
date
){
...
@@ -58,8 +57,8 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
...
@@ -58,8 +57,8 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
HashMap
<
String
,
String
>
orderLocations
=
this
.
OrderRequestsLocation
(
orderIds
);
HashMap
<
String
,
String
>
orderLocations
=
this
.
OrderRequestsLocation
(
orderIds
);
// 获取配送站地址
// 获取配送站地址
String
branchId
=
this
.
EngineerBranchId
(
engineerCode
);
String
branchId
=
this
.
get
EngineerBranchId
(
engineerCode
);
String
warehouseLocation
=
this
.
WarehouseLocation
(
branchId
);
String
warehouseLocation
=
this
.
get
WarehouseLocation
(
branchId
);
List
<
EnginnerTimelineResp
.
DynamicItem
>
dynamics
=
this
.
PackItems
(
timelines
,
orders
,
orderLocations
,
warehouseLocation
);
List
<
EnginnerTimelineResp
.
DynamicItem
>
dynamics
=
this
.
PackItems
(
timelines
,
orders
,
orderLocations
,
warehouseLocation
);
...
@@ -110,7 +109,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
...
@@ -110,7 +109,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
return
map
;
return
map
;
}
}
private
String
WarehouseLocation
(
String
branchId
)
{
private
String
get
WarehouseLocation
(
String
branchId
)
{
// 获取配送站location
// 获取配送站location
LambdaQueryWrapper
<
WarehouseInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
WarehouseInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
WarehouseInfo:
:
getBranchId
,
branchId
);
lqw
.
eq
(
WarehouseInfo:
:
getBranchId
,
branchId
);
...
@@ -118,12 +117,23 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
...
@@ -118,12 +117,23 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
return
String
.
format
(
"%s,%s"
,
w
.
getX
(),
w
.
getY
());
return
String
.
format
(
"%s,%s"
,
w
.
getX
(),
w
.
getY
());
}
}
private
String
EngineerBranchId
(
String
engineerCode
)
{
private
String
get
EngineerBranchId
(
String
engineerCode
)
{
LambdaQueryWrapper
<
EngineerInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
EngineerInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
select
(
EngineerInfo:
:
getGroupId
);
lqw
.
eq
(
EngineerInfo:
:
getEngineerCode
,
engineerCode
);
lqw
.
eq
(
EngineerInfo:
:
getEngineerCode
,
engineerCode
);
return
engineerInfoDao
.
selectOne
(
lqw
).
getBranchId
();
EngineerInfo
e
=
engineerInfoDao
.
selectOne
(
lqw
);
if
(
e
==
null
)
{
return
""
;
}
}
LambdaQueryWrapper
<
OrgGroup
>
lqw2
=
new
LambdaQueryWrapper
<>();
lqw2
.
select
(
OrgGroup:
:
getBranchId
);
lqw2
.
eq
(
OrgGroup:
:
getGroupId
,
e
.
getGroupId
());
OrgGroup
g
=
orgGroupDao
.
selectOne
(
lqw2
);
return
(
g
==
null
)?
""
:
g
.
getBranchId
();
}
private
List
<
EnginnerTimelineResp
.
DynamicItem
>
PackItems
(
List
<
EngineerTimeline
>
timelines
,
List
<
OrderAppointment
>
orders
,
HashMap
<
String
,
String
>
locations
,
String
warehouseLocation
)
{
private
List
<
EnginnerTimelineResp
.
DynamicItem
>
PackItems
(
List
<
EngineerTimeline
>
timelines
,
List
<
OrderAppointment
>
orders
,
HashMap
<
String
,
String
>
locations
,
String
warehouseLocation
)
{
Integer
index
=
1
;
Integer
index
=
1
;
...
...
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