Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
93144e2c
Commit
93144e2c
authored
Apr 21, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
纬度字段取值错误修改
parent
30f3572b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
CylinderInfo.java
...oin/amos/boot/module/tzs/flc/api/entity/CylinderInfo.java
+1
-1
ESCylinderServiceImpl.java
...ot/module/tzs/biz/service/impl/ESCylinderServiceImpl.java
+13
-6
CylinderInfoController.java
...module/tzs/flc/biz/controller/CylinderInfoController.java
+1
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/entity/CylinderInfo.java
View file @
93144e2c
...
...
@@ -179,6 +179,6 @@ public class CylinderInfo {
/**
* 纬度
*/
@TableField
(
"l
ong
itude"
)
@TableField
(
"l
at
itude"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESCylinderServiceImpl.java
View file @
93144e2c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EsSpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.SpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.EsCylinder
;
...
...
@@ -48,9 +49,12 @@ public class ESCylinderServiceImpl {
* 保存气瓶信息
* </pre>
*
* @param cylinderInfo 保存气瓶信息
* @param cylinderInfo
List
保存气瓶信息
*/
public
EsCylinder
saveEsCylinderToES
(
CylinderInfo
cylinderInfo
)
{
public
boolean
saveEsCylinderToES
(
List
<
CylinderInfo
>
cylinderInfoList
)
{
List
<
EsCylinder
>
esCylinderList
=
Lists
.
newArrayList
();
if
(!
ValidationUtil
.
isEmpty
(
cylinderInfoList
))
{
cylinderInfoList
.
forEach
(
cylinderInfo
->
{
EsCylinder
esCylinder
=
new
EsCylinder
();
if
(
StringUtils
.
isNotEmpty
(
cylinderInfo
.
getLongitude
()))
{
esCylinder
.
setLongitude
(
Double
.
parseDouble
(
cylinderInfo
.
getLongitude
()));
...
...
@@ -63,12 +67,15 @@ public class ESCylinderServiceImpl {
esCylinder
.
setFactoryNum
(
cylinderInfo
.
getFactoryNum
());
esCylinder
.
setUnitName
(
cylinderInfo
.
getUnitName
());
if
(
StringUtils
.
isNotBlank
(
cylinderInfo
.
getLatitude
())
&&
StringUtils
.
isNotBlank
(
cylinderInfo
.
getLongitude
()))
{
D
ouble
lat
=
Double
.
parseDouble
(
cylinderInfo
.
getLatitude
());
D
ouble
lon
=
Double
.
parseDouble
(
cylinderInfo
.
getLongitude
());
d
ouble
lat
=
Double
.
parseDouble
(
cylinderInfo
.
getLatitude
());
d
ouble
lon
=
Double
.
parseDouble
(
cylinderInfo
.
getLongitude
());
esCylinder
.
setLocation
(
new
GeoPoint
(
lat
,
lon
));
}
esCylinderRepository
.
save
(
esCylinder
);
return
esCylinder
;
esCylinderList
.
add
(
esCylinder
);
});
}
esCylinderRepository
.
saveAll
(
esCylinderList
);
return
true
;
}
public
Page
<
SpecialEquipmentDto
>
queryPageByDto
(
EsSpecialEquipmentDto
esSpecialEquipmentDto
,
int
current
,
int
size
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderInfoController.java
View file @
93144e2c
...
...
@@ -927,10 +927,7 @@ public class CylinderInfoController extends BaseController {
cylinderInfoPage
.
setCurrent
(
i
);
cylinderInfoPage
.
setSize
(
500
);
cylinderInfoPage
=
cylinderInfoServiceImpl
.
page
(
cylinderInfoPage
);
for
(
CylinderInfo
el
:
cylinderInfoPage
.
getRecords
()
)
{
esCylinderService
.
saveEsCylinderToES
(
el
);
}
esCylinderService
.
saveEsCylinderToES
(
cylinderInfoPage
.
getRecords
());
}
}
...
...
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