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 a004ec31
authored
Jun 05, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库表字段变更
1 parent
8a279a61
Hide 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 @
a004ec3
...
...
@@ -3,11 +3,7 @@ package com.alibaba.cloud.integration.order.service.impl;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.dao.*
;
import
com.alibaba.cloud.integration.order.dto.EnginnerTimelineResp
;
import
com.alibaba.cloud.integration.order.entity.EngineerInfo
;
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.entity.*
;
import
com.alibaba.cloud.integration.order.service.EnginnerTimelineService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -39,6 +35,9 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
@Autowired
private
WarehouseInfoDao
warehouseInfoDao
;
@Autowired
private
OrgGroupDao
orgGroupDao
;
@Transactional
@Override
public
Result
<?>
GetEnginnerTimelines
(
String
engineerCode
,
String
date
){
...
...
@@ -58,8 +57,8 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
HashMap
<
String
,
String
>
orderLocations
=
this
.
OrderRequestsLocation
(
orderIds
);
// 获取配送站地址
String
branchId
=
this
.
EngineerBranchId
(
engineerCode
);
String
warehouseLocation
=
this
.
WarehouseLocation
(
branchId
);
String
branchId
=
this
.
get
EngineerBranchId
(
engineerCode
);
String
warehouseLocation
=
this
.
get
WarehouseLocation
(
branchId
);
List
<
EnginnerTimelineResp
.
DynamicItem
>
dynamics
=
this
.
PackItems
(
timelines
,
orders
,
orderLocations
,
warehouseLocation
);
...
...
@@ -110,7 +109,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
return
map
;
}
private
String
WarehouseLocation
(
String
branchId
)
{
private
String
get
WarehouseLocation
(
String
branchId
)
{
// 获取配送站location
LambdaQueryWrapper
<
WarehouseInfo
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
WarehouseInfo:
:
getBranchId
,
branchId
);
...
...
@@ -118,12 +117,23 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
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
<>();
lqw
.
select
(
EngineerInfo:
:
getGroupId
);
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
)
{
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