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
0cf1f054
Commit
0cf1f054
authored
Nov 02, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脑图APIbug修改
parent
3eb57a14
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
36 deletions
+88
-36
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+1
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+21
-2
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+4
-4
PvHealthIndex.xml
...biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
+62
-29
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
View file @
0cf1f054
...
...
@@ -49,7 +49,7 @@ public class TestController extends BaseController {
public
void
test2
()
{
// commonService.healthWarningMinuteByFJ();
commonService
.
healthWarningMinuteBy
Fan
();
commonService
.
healthWarningMinuteBy
Pv
();
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
0cf1f054
...
...
@@ -1686,7 +1686,17 @@ public class CommonServiceImpl {
}
}
idxBizFanHealthIndexService
.
saveBatch
(
idxBizFanHealthIndexs
);
fanHealthIndexMapper
.
saveBatchHealthIndexList
(
fanHealthIndices1
,
"fan_health_index_moment"
);
ArrayList
<
FanHealthIndex
>
newList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
fanHealthIndices1
.
size
();
i
++)
{
//分批次处理
newList
.
add
(
fanHealthIndices1
.
get
(
i
));
//循环将数据填入载体list
if
(
500
==
newList
.
size
()
||
i
==
fanHealthIndices1
.
size
()
-
1
)
{
//载体list达到要求,进行批量操作
//调用批量插入
fanHealthIndexMapper
.
saveBatchHealthIndexList
(
newList
,
"fan_health_index_moment"
);
newList
.
clear
();
//每次批量操作后,清空载体list,等待下次的数据填入
}
}
}
try
{
...
...
@@ -1914,7 +1924,16 @@ public class CommonServiceImpl {
}
}
idxBizPvHealthIndexService
.
saveBatch
(
idxBizPvHealthIndexs
);
pvHealthIndexMapper
.
saveBatchHealthIndexList
(
fanHealthIndices1
,
"pv_health_index_moment"
);
ArrayList
<
PvHealthIndex
>
newList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
fanHealthIndices1
.
size
();
i
++)
{
//分批次处理
newList
.
add
(
fanHealthIndices1
.
get
(
i
));
//循环将数据填入载体list
if
(
500
==
newList
.
size
()
||
i
==
fanHealthIndices1
.
size
()
-
1
)
{
//载体list达到要求,进行批量操作
//调用批量插入
pvHealthIndexMapper
.
saveBatchHealthIndexList
(
newList
,
"pv_health_index_moment"
);
newList
.
clear
();
//每次批量操作后,清空载体list,等待下次的数据填入
}
}
}
try
{
logger
.
info
(
"--------------------response: "
+
response
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
0cf1f054
...
...
@@ -4,12 +4,12 @@
<insert
id=
"saveBatchHealthIndexList"
>
insert into
${tableName}
using fan_health_index_data TAGS ('按时刻')
values
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
>
${tableName}
using fan_health_index_data TAGS (#{item.analysisType})
values
(
now + #{index}
a
,
now + #{index},
#{item.recDate, jdbcType=VARCHAR},
#{item.analysisObjType, jdbcType=VARCHAR},
#{item.analysisObjSeq, jdbcType=VARCHAR},
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
View file @
0cf1f054
...
...
@@ -2,35 +2,68 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper"
>
<insert
id=
"saveBatchHealthIndexList"
>
insert into
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
>
${tableName}
using pv_health_index_data TAGS (#{item.analysisType})
<!--<insert id="saveBatchHealthIndexList">-->
<!-- insert into-->
<!-- <foreach collection="list" separator=" " item="item" index="index">-->
<!-- ${tableName}-->
<!-- using pv_health_index_data TAGS (#{item.analysisType})-->
<!-- values-->
<!-- (-->
<!-- now,-->
<!-- #{item.recDate, jdbcType=VARCHAR},-->
<!-- #{item.analysisObjType, jdbcType=VARCHAR},-->
<!-- #{item.analysisObjSeq, jdbcType=VARCHAR},-->
<!-- #{item.weight, jdbcType=FLOAT},-->
<!-- #{item.healthIndex, jdbcType=FLOAT},-->
<!-- #{item.healthLevel, jdbcType=VARCHAR},-->
<!-- #{item.analysisStartTime, jdbcType=VARCHAR},-->
<!-- #{item.analysisEndTime, jdbcType=VARCHAR},-->
<!-- #{item.area, jdbcType=VARCHAR},-->
<!-- #{item.station, jdbcType=VARCHAR},-->
<!-- #{item.subarray, jdbcType=VARCHAR},-->
<!-- #{item.manufacturer, jdbcType=VARCHAR},-->
<!-- #{item.deviceType, jdbcType=VARCHAR},-->
<!-- #{item.equipmentName, jdbcType=VARCHAR},-->
<!-- #{item.gatewayId, jdbcType=VARCHAR},-->
<!-- #{item.indexAddress, jdbcType=VARCHAR},-->
<!-- #{item.anomaly, jdbcType=FLOAT},-->
<!-- #{item.pointName, jdbcType=VARCHAR},-->
<!-- #{item.analysisTime, jdbcType=VARCHAR},-->
<!-- #{item.kks, jdbcType=VARCHAR},-->
<!-- )-->
<!-- </foreach>-->
<!-- </insert>-->
<insert
id=
"saveBatchHealthIndexList"
>
insert into ${tableName}
using pv_health_index_data TAGS ('按时刻')
values
(
now,
#{item.recDate, jdbcType=VARCHAR},
#{item.analysisObjType, jdbcType=VARCHAR},
#{item.analysisObjSeq, jdbcType=VARCHAR},
#{item.weight, jdbcType=FLOAT},
#{item.healthIndex, jdbcType=FLOAT},
#{item.healthLevel, jdbcType=VARCHAR},
#{item.analysisStartTime, jdbcType=VARCHAR},
#{item.analysisEndTime, jdbcType=VARCHAR},
#{item.area, jdbcType=VARCHAR},
#{item.station, jdbcType=VARCHAR},
#{item.subarray, jdbcType=VARCHAR},
#{item.manufacturer, jdbcType=VARCHAR},
#{item.deviceType, jdbcType=VARCHAR},
#{item.equipmentName, jdbcType=VARCHAR},
#{item.gatewayId, jdbcType=VARCHAR},
#{item.indexAddress, jdbcType=VARCHAR},
#{item.anomaly, jdbcType=FLOAT},
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR},
)
</foreach>
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
>
(
now + #{index},
#{item.recDate, jdbcType=VARCHAR},
#{item.analysisObjType, jdbcType=VARCHAR},
#{item.analysisObjSeq, jdbcType=VARCHAR},
#{item.weight, jdbcType=FLOAT},
#{item.healthIndex, jdbcType=FLOAT},
#{item.healthLevel, jdbcType=VARCHAR},
#{item.analysisStartTime, jdbcType=VARCHAR},
#{item.analysisEndTime, jdbcType=VARCHAR},
#{item.area, jdbcType=VARCHAR},
#{item.station, jdbcType=VARCHAR},
#{item.subarray, jdbcType=VARCHAR},
#{item.manufacturer, jdbcType=VARCHAR},
#{item.deviceType, jdbcType=VARCHAR},
#{item.equipmentName, jdbcType=VARCHAR},
#{item.gatewayId, jdbcType=VARCHAR},
#{item.indexAddress, jdbcType=VARCHAR},
#{item.anomaly, jdbcType=FLOAT},
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR}
)
</foreach>
</insert>
</mapper>
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