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 4640a543
authored
Aug 01, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复layerid为空问题
1 parent
e15313e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessBlockServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessBlockServiceImpl.java
View file @
4640a54
...
...
@@ -168,18 +168,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
OrgGroupEntity
group
=
orgGroupDao
.
getByGroupId
(
team
.
getGroupId
());
String
region
=
RegionUtils
.
constructRegion
(
group
.
getX
(),
group
.
getY
());
// 获取saas图层id
MapLayerEntity
layer
=
mapLayerDao
.
getByLayerId
(
layerId
);
String
saasLayerId
=
null
;
if
(
null
==
layer
)
{
MapLayerCustomizeEntity
layerCustom
=
mapLayerCustomizeDao
.
findByBranchIdAndLayerId
(
team
.
getBranchId
(),
layerId
);
if
(
null
==
layerCustom
)
{
return
Result
.
failure
(
"图层数据错误"
);
}
saasLayerId
=
layerCustom
.
getSaasLayerId
();
}
else
{
saasLayerId
=
layer
.
getSaasLayerId
();
}
String
saasLayerId
=
getSaaSLayerId
(
team
.
getBranchId
(),
layerId
);
if
(
StringUtils
.
isEmpty
(
saasLayerId
))
{
return
Result
.
failure
(
"图层未配置"
);
}
...
...
@@ -198,7 +187,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
block
.
setBranchId
(
team
.
getBranchId
());
block
.
setGroupId
(
team
.
getGroupId
());
block
.
setTeamId
(
teamId
);
block
.
setLayer
(
layerId
);
block
.
setLayer
Id
(
layerId
);
block
.
setLayer
(
layerName
);
block
.
setStatus
(
1
);
mapBlockInfoMPDao
.
insert
(
block
);
...
...
@@ -206,6 +195,25 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
return
Result
.
success
(
null
);
}
/**
* 获取saas图层id
*
* @param branchId
* @param layerId
* @return
*/
private
String
getSaaSLayerId
(
String
branchId
,
String
layerId
)
{
MapLayerEntity
layer
=
mapLayerDao
.
getByLayerId
(
layerId
);
String
saasLayerId
=
null
;
if
(
null
==
layer
)
{
MapLayerCustomizeEntity
layerCustom
=
mapLayerCustomizeDao
.
findByBranchIdAndLayerId
(
branchId
,
layerId
);
saasLayerId
=
layerCustom
.
getSaasLayerId
();
}
else
{
saasLayerId
=
layer
.
getSaasLayerId
();
}
return
saasLayerId
;
}
@Override
public
Result
<?>
businessServiceBlockRemove
(
String
blockId
)
throws
BusinessException
{
MapBlockInfo
block
=
mapBlockInfoMPDao
.
getByBlockId
(
blockId
);
...
...
@@ -238,9 +246,11 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
String
password
=
"qjOHxpQPXLnJP+Jq1CZGBQ=="
;
// 跳转SaaS url
// 获取saas图层id
String
saasLayerId
=
getSaaSLayerId
(
block
.
getBranchId
(),
block
.
getLayerId
());
HashMap
<
String
,
String
>
res
=
new
HashMap
<>();
res
.
put
(
"url"
,
url
+
"/mlAutoLogin?userAccount="
+
userAccount
+
"&password="
+
password
+
"&jump=basedata&navHidden=true&layerId="
+
block
.
getLayerId
()
+
"&areaId="
+
block
.
getBlockId
());
+
"&jump=basedata&navHidden=true&layerId="
+
saasLayerId
+
"&areaId="
+
block
.
getBlockId
());
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