Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8b9a7d0b
Commit
8b9a7d0b
authored
Aug 23, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一码通删除电梯同步至96333电梯es中
parent
64339f71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
30 deletions
+18
-30
SuperviseInfoMapper.java
.../amos/boot/module/ymt/api/mapper/SuperviseInfoMapper.java
+2
-1
SupervisionInfoMapper.xml
...t-api/src/main/resources/mapper/SupervisionInfoMapper.xml
+1
-1
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+15
-28
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/SuperviseInfoMapper.java
View file @
8b9a7d0b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EsElevator
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -22,5 +23,5 @@ public interface SuperviseInfoMapper extends BaseMapper<SuperviseInfo> {
...
@@ -22,5 +23,5 @@ public interface SuperviseInfoMapper extends BaseMapper<SuperviseInfo> {
void
deleteDataAll
(
@Param
(
"records"
)
List
<
String
>
records
);
void
deleteDataAll
(
@Param
(
"records"
)
List
<
String
>
records
);
Map
<
String
,
Object
>
selectElevatorEsList
(
String
record
);
EsElevator
selectElevatorEsList
(
String
record
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/SupervisionInfoMapper.xml
View file @
8b9a7d0b
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</delete>
</delete>
<select
id=
"selectElevatorEsList"
resultType=
"
java.util.Map
"
>
<select
id=
"selectElevatorEsList"
resultType=
"
com.yeejoin.amos.boot.module.ymt.api.entity.EsElevator
"
>
SELECT
SELECT
jui.RECORD AS sequenceNbr,
jui.RECORD AS sequenceNbr,
ifnull ( jui.USE_INNER_CODE, null ) AS innerNum,
ifnull ( jui.USE_INNER_CODE, null ) AS innerNum,
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
8b9a7d0b
...
@@ -972,19 +972,25 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -972,19 +972,25 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Object
recordList
=
map
.
get
(
"recordList"
);
Object
recordList
=
map
.
get
(
"recordList"
);
List
<
String
>
records
=
new
ArrayList
<>();
List
<
String
>
records
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
List
<
ESEquipmentCategoryDto
>
list
=
new
ArrayList
<>();
List
<
EsElevator
>
esElevatorList
=
new
ArrayList
<>();
if
(
recordList
.
toString
().
contains
(
"["
))
{
if
(
recordList
.
toString
().
contains
(
"["
))
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
for
(
String
record
:
(
List
<
String
>)
recordList
)
{
records
.
add
(
record
);
records
.
add
(
record
);
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
record
);
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
record
);
list
.
add
(
esEquipmentCategoryDto
);
list
.
add
(
esEquipmentCategoryDto
);
EsElevator
esElevator
=
new
EsElevator
();
esElevator
.
setSequenceNbr
(
record
);
esElevatorList
.
add
(
esElevator
);
}
}
}
else
{
}
else
{
records
.
add
(
recordList
.
toString
());
records
.
add
(
recordList
.
toString
());
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
new
ESEquipmentCategoryDto
();
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
esEquipmentCategoryDto
.
setSEQUENCE_NBR
(
recordList
.
toString
());
list
.
add
(
esEquipmentCategoryDto
);
list
.
add
(
esEquipmentCategoryDto
);
EsElevator
esElevator
=
new
EsElevator
();
esElevator
.
setSequenceNbr
(
recordList
.
toString
());
esElevatorList
.
add
(
esElevator
);
}
}
//删除监管码表数据
//删除监管码表数据
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
List
<
String
>
superviseCodeList
=
superviseInfoMapper
.
selectSuperviseCodeList
(
records
);
...
@@ -999,7 +1005,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -999,7 +1005,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
if
(!
ObjectUtils
.
isEmpty
(
superviseCodeList
))
{
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
supervisoryCodeInfoMapper
.
updateStatus
(
superviseCodeList
);
}
}
//删除es中elev中的相关数据
esElavtorRepository
.
deleteAll
(
esElevatorList
);
//删除涉及的19张表的数据
//删除涉及的19张表的数据
superviseInfoMapper
.
deleteDataAll
(
records
);
superviseInfoMapper
.
deleteDataAll
(
records
);
// 根据统一信用代码更新总览表
// 根据统一信用代码更新总览表
...
@@ -1158,36 +1165,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -1158,36 +1165,16 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private
void
saveEsElevator2ES
(
String
record
)
{
private
void
saveEsElevator2ES
(
String
record
)
{
Map
<
String
,
Object
>
map
=
superviseInfoMapper
.
selectElevatorEsList
(
record
);
List
<
EsElevator
>
esElevatorList
=
new
ArrayList
<>();
List
<
String
>
recordList
=
new
ArrayList
<>();
List
<
String
>
recordList
=
new
ArrayList
<>();
recordList
.
add
(
record
);
EsElevator
esElevator
=
new
EsElevator
();
EsElevator
esElevator
=
superviseInfoMapper
.
selectElevatorEsList
(
record
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
map
.
get
(
"longitude"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
esElevator
))
{
esElevator
.
setLongitude
(
Double
.
parseDouble
(
String
.
valueOf
(
map
.
get
(
"longitude"
))));
Double
lat
=
esElevator
.
getLatitude
();
}
Double
lon
=
esElevator
.
getLongitude
();
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
map
.
get
(
"latitude"
)))
{
esElevator
.
setLatitude
(
Double
.
parseDouble
(
String
.
valueOf
(
map
.
get
(
"latitude"
))));
}
esElevator
.
setAddress
(
String
.
valueOf
(
map
.
get
(
"address"
)));
esElevator
.
setCity
(
String
.
valueOf
(
map
.
get
(
"city"
)));
esElevator
.
setDistrict
(
String
.
valueOf
(
map
.
get
(
"district"
)));
esElevator
.
setProvince
(
String
.
valueOf
(
map
.
get
(
"province"
)));
esElevator
.
setRegionCode
(
String
.
valueOf
(
map
.
get
(
"regionCode"
)));
esElevator
.
setRescueCode
(
String
.
valueOf
(
map
.
get
(
"rescueCode"
)));
esElevator
.
setRegisterCode
(
String
.
valueOf
(
map
.
get
(
"registerCode"
)));
esElevator
.
setSequenceNbr
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
esElevator
.
setInnerNum
(
String
.
valueOf
(
map
.
get
(
"latitude"
)));
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
map
.
get
(
"longitude"
))
&&
!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
map
.
get
(
"latitude"
)))
{
Double
lat
=
Double
.
parseDouble
(
String
.
valueOf
(
map
.
get
(
"latitude"
)));
Double
lon
=
Double
.
parseDouble
(
String
.
valueOf
(
map
.
get
(
"latitude"
)));
esElevator
.
setLocation
(
new
GeoPoint
(
lat
,
lon
));
esElevator
.
setLocation
(
new
GeoPoint
(
lat
,
lon
));
}
}
esElevatorList
.
add
(
esElevator
);
esElavtorRepository
.
save
(
esElevator
);
recordList
.
add
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
)));
esElavtorRepository
.
saveAll
(
esElevatorList
);
superviseInfoMapper
.
updateRecordBatch
(
recordList
);
superviseInfoMapper
.
updateRecordBatch
(
recordList
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment