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
69bbed26
Commit
69bbed26
authored
Mar 04, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://36.40.66.175:5000/moa/amos-boot-biz
into developer
parents
d4fd4095
d8a42455
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
221 deletions
+186
-221
HousevPVapiApplication.java
...rc/main/java/com/yeejoin/amos/HousevPVapiApplication.java
+3
-3
GoodWeRequestUtil.java
...eejoin/amos/api/householdapi/Utils/GoodWeRequestUtil.java
+0
-9
SofarRequestUtil.java
...yeejoin/amos/api/householdapi/Utils/SofarRequestUtil.java
+39
-45
TdEngineUtils.java
...om/yeejoin/amos/api/householdapi/Utils/TdEngineUtils.java
+0
-34
SoFarConstant.java
...yeejoin/amos/api/householdapi/constant/SoFarConstant.java
+44
-0
HouseholdTestController.java
.../api/householdapi/controller/HouseholdTestController.java
+5
-5
SofarDataAcquisitionServiceImpl.java
...pi/face/service/impl/SofarDataAcquisitionServiceImpl.java
+56
-0
DockingData.java
...c/main/java/com/yeejoin/amos/dockingData/DockingData.java
+0
-84
ClientHandler.java
.../main/java/com/yeejoin/amos/kgd/config/ClientHandler.java
+28
-35
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+11
-6
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/HousevPVapiApplication.java
View file @
69bbed26
...
@@ -34,10 +34,10 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
...
@@ -34,10 +34,10 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableTransactionManagement
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableConfigurationProperties
@ServletComponentScan
@ServletComponentScan
@EnableDiscoveryClient
//
@EnableDiscoveryClient
@EnableFeignClients
//
@EnableFeignClients
@EnableAsync
@EnableAsync
@EnableEurekaClient
//
@EnableEurekaClient
@EnableScheduling
@EnableScheduling
@MapperScan
(
value
=
{
"org.typroject.tyboot.*.*.face.orm.dao"
,
"com.yeejoin.amos.api.*.face.orm.dao"
,
@MapperScan
(
value
=
{
"org.typroject.tyboot.*.*.face.orm.dao"
,
"com.yeejoin.amos.api.*.face.orm.dao"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
"org.typroject.tyboot.face.*.orm.dao*"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/GoodWeRequestUtil.java
View file @
69bbed26
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
Utils
;
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
Utils
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.http.Header
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.api.householdapi.constant.GoLangConstant
;
import
com.yeejoin.amos.api.householdapi.constant.GoodWeConstant
;
import
com.yeejoin.amos.api.householdapi.constant.GoodWeConstant
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.houseapi.HouseholdPvProducerInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.GolangStationMapper
;
import
com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.component.cache.Redis
;
import
java.util.*
;
import
java.util.*
;
@Component
@Component
public
class
GoodWeRequestUtil
{
public
class
GoodWeRequestUtil
{
private
final
String
redisKey
=
"GOODWE_REQUEST_TOKEN"
;
private
final
String
redisKey
=
"GOODWE_REQUEST_TOKEN"
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/SofarRequestUtil.java
View file @
69bbed26
...
@@ -2,9 +2,12 @@ package com.yeejoin.amos.api.householdapi.Utils;
...
@@ -2,9 +2,12 @@ package com.yeejoin.amos.api.householdapi.Utils;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.api.householdapi.constant.GoLangConstant
;
import
com.yeejoin.amos.api.householdapi.constant.GoodWeConstant
;
import
com.yeejoin.amos.api.householdapi.constant.SoFarConstant
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -16,23 +19,38 @@ import java.util.List;
...
@@ -16,23 +19,38 @@ import java.util.List;
public
class
SofarRequestUtil
{
public
class
SofarRequestUtil
{
private
final
String
redisKey
=
"SOFAR_REQUEST_TOKEN"
;
@Autowired
private
RedisUtils
redisUtils
;
/**
/**
* @return HashMap<String, Object> 发送请求前的准备 准备header信息
* @return HashMap<String, Object> 发送请求前的准备 准备header信息
* @deprecated 根据厂商编码获取厂商的hearer
* @deprecated 根据厂商编码获取厂商的hearer
*/
*/
public
HashMap
<
String
,
Object
>
getHeaderOfGolang
()
{
public
HashMap
<
String
,
String
>
getHeaderOfSofar
()
{
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
requestHeader
=
new
HashMap
<>();
HashMap
<
String
,
String
>
hashMaphead
=
new
HashMap
<>();
if
(
ObjectUtil
.
isNotEmpty
(
redisUtils
.
get
(
redisKey
))){
String
url
=
GoLangConstant
.
baseurl
+
GoLangConstant
.
tokenurl
;
requestHeader
.
put
(
"authorization"
,
redisUtils
.
get
(
redisKey
).
toString
());
hashMap
.
put
(
"apiurl"
,
GoLangConstant
.
baseurl
);
return
requestHeader
;
hashMaphead
.
put
(
"Content-type"
,
"application/json;charset=UTF-8"
);
}
hashMaphead
.
put
(
"Authorization"
,
"API "
+
GoLangConstant
.
prodcerappid
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
hashMaphead
.
put
(
"Content-MD5"
,
null
);
map
.
put
(
"accountName"
,
SoFarConstant
.
account
);
hashMaphead
.
put
(
"Date"
,
GoLangHeaderUtils
.
getGMTTime
());
map
.
put
(
"appId"
,
SoFarConstant
.
appId
);
hashMap
.
put
(
"header"
,
hashMaphead
);
map
.
put
(
"appSecret"
,
SoFarConstant
.
appSecret
);
hashMap
.
put
(
"appsecret"
,
GoLangConstant
.
prodcerappsecret
);
map
.
put
(
"corporationId"
,
SoFarConstant
.
corporationId
);
return
hashMap
;
map
.
put
(
"accountType"
,
2
);
String
body
=
JSON
.
toJSONString
(
map
);
String
url
=
SoFarConstant
.
baseurl
+
SoFarConstant
.
tokenurl
;
String
response
=
HttpUtil
.
createPost
(
url
).
body
(
body
).
execute
().
body
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
response
);
if
(
jsonObject
.
getString
(
"msg"
).
equals
(
"success"
)){
String
token
=
jsonObject
.
getString
(
"data"
);
requestHeader
.
put
(
"authorization"
,
token
);
redisUtils
.
set
(
redisKey
,
token
,
5183900
);
}
return
requestHeader
;
}
}
/**
/**
...
@@ -50,19 +68,16 @@ public class SofarRequestUtil {
...
@@ -50,19 +68,16 @@ public class SofarRequestUtil {
String
params
=
""
;
String
params
=
""
;
JSONArray
jsonArray
=
null
;
JSONArray
jsonArray
=
null
;
List
<
T
>
result
=
new
ArrayList
<>();
List
<
T
>
result
=
new
ArrayList
<>();
try
{
try
{
HashMap
<
String
,
Object
>
producerInfo
=
getHeaderOfGolang
();
HashMap
<
String
,
String
>
headMap
=
getHeaderOfSofar
();
String
baseurl
=
(
String
)
producerInfo
.
get
(
"apiurl"
);
String
url
=
SoFarConstant
.
baseurl
+
apiurl
;
HashMap
<
String
,
String
>
headMap
=
(
HashMap
<
String
,
String
>)
producerInfo
.
get
(
"header"
);
String
orginalAuthorization
=
headMap
.
get
(
"Authorization"
)
+
":"
;
String
url
=
baseurl
+
apiurl
;
String
appsecret
=
(
String
)
producerInfo
.
get
(
"appsecret"
);
JLYHeaderMapHandler
(
params
,
headMap
,
orginalAuthorization
,
appsecret
,
apiurl
);
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
// jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone);
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
// if (!ObjectUtils.isEmpty(jsonArray)) {
}
// result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
// }
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
return
result
;
return
result
;
}
}
...
@@ -112,27 +127,6 @@ public class SofarRequestUtil {
...
@@ -112,27 +127,6 @@ public class SofarRequestUtil {
return
respone
;
return
respone
;
}
}
/***
*
* @param params 参数字符窜
* @param headMap header头
* @param orginalAuthorization 原始的orginalAuthorization
* @param appsecret appsecret
* @desc 锦浪云请求参数及head头处理
*/
public
void
JLYHeaderMapHandler
(
String
params
,
HashMap
<
String
,
String
>
headMap
,
String
orginalAuthorization
,
String
appsecret
,
String
apiurl
)
{
String
contentMD5
=
GoLangHeaderUtils
.
getDigest
(
params
);
headMap
.
put
(
"Date"
,
GoLangHeaderUtils
.
getGMTTime
());
String
param
=
"POST"
+
"\n"
+
contentMD5
+
"\n"
+
"application/json"
+
"\n"
+
headMap
.
get
(
"Date"
)
+
"\n"
+
apiurl
;
String
sign
=
""
;
try
{
sign
=
GoLangHeaderUtils
.
HmacSHA1Encrypt
(
param
,
appsecret
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
headMap
.
put
(
"Content-MD5"
,
contentMD5
);
headMap
.
put
(
"Authorization"
,
orginalAuthorization
+
sign
);
}
/**
/**
* @param pageSizeResovle
* @param pageSizeResovle
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/TdEngineUtils.java
deleted
100644 → 0
View file @
d4fd4095
//package com.yeejoin.amos.api.householdapi.Utils;
//
//import com.taosdata.jdbc.SchemalessWriter;
//import com.taosdata.jdbc.enums.SchemalessProtocolType;
//import com.taosdata.jdbc.enums.SchemalessTimestampType;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.SQLException;
//
//@Component
//public class TdEngineUtils {
// @Value("${tdengine-server.jdbc-url}")
// private String url;
// @Value("${tdengine-server.username}")
// private String user;
// @Value("${tdengine-server.password}")
// private String password;
// public void writeDataIntoTdEngine(String lines){
// try (Connection conn = this.getConnection()) {
// SchemalessWriter writer = new SchemalessWriter(conn);
// writer.write(lines, SchemalessProtocolType.JSON, SchemalessTimestampType.NOT_CONFIGURED);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// public Connection getConnection() throws SQLException {
// String jdbcUrl = String.format(url, user, password);
// return DriverManager.getConnection(jdbcUrl);
// }
//
//}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/SoFarConstant.java
View file @
69bbed26
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
constant
;
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
constant
;
import
java.time.format.DateTimeFormatter
;
import
java.util.HashMap
;
/**
/**
* 首航常量
* 首航常量
*/
*/
public
class
SoFarConstant
{
public
class
SoFarConstant
{
public
static
final
HashMap
<
String
,
String
>
stationStaus
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"-1"
,
"离线"
);
put
(
"0"
,
"待机"
);
put
(
"1"
,
"正常"
);
put
(
"2"
,
"停机"
);
}
};
public
static
String
baseurl
=
"https://openapi.sofarsolarmonitor.com"
;
public
static
String
appId
=
"447430219192733696"
;
public
static
String
appSecret
=
"5881ee8c062817016a2b34425c45937d"
;
public
static
String
corporationId
=
"447430928264990720"
;
public
static
String
account
=
"18120415291"
;
public
static
String
password
=
"ZXNK123456.."
;
public
static
String
tokenurl
=
"/account/auth/createToken"
;
public
static
String
stationListUrl
=
"/station/v1.0/list"
;
public
static
String
stationListStatusUrl
=
"/api/OpenApi/QueryPowerStationMonitor"
;
public
static
String
stationDetailUrl
=
"/api/OpenApi/GetPowerStationMonitorDetail"
;
public
static
String
collectorListUrl
=
"/v1/api/collectorList"
;
public
static
String
collectorDetailUrl
=
"/v1/api/collectorDetail"
;
public
static
String
inverterListUrl
=
"/v1/api/inverterList"
;
public
static
String
inverterDetailUrl
=
"/v1/api/inverterDetail"
;
public
static
String
alarmListUrl
=
"/v1/api/alarmList"
;
public
static
String
stationDayGenUrl
=
"/v1/api/stationDayEnergyList"
;
public
static
String
stationMonthEnergyList
=
"/v1/api/stationDayEnergyList"
;
public
static
String
stationYearEnergyList
=
"/v1/api/stationDayEnergyList"
;
public
static
String
inverterDayURL
=
"/v1/api/inverterDay"
;
public
static
String
inverterMonthURL
=
"/v1/api/inverterMonth"
;
public
static
String
inverterYearURL
=
"/v1/api/inverterYear"
;
public
static
String
resovleRule_data_page_records
=
"data,page,records"
;
public
static
String
resovleRule_data_list
=
"data,list"
;
public
static
String
resovleRule_data_records
=
"data,records"
;
public
static
String
resovleRule_data
=
"data"
;
public
static
String
requestPost
=
"POST"
;
public
static
String
requestGet
=
"GET"
;
public
static
String
datePattern
=
"yyyy-MM-dd HH:mm:ss.SSS"
;
public
static
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
datePattern
);
public
static
Double
kwhToMwh
=
0.0001
;
public
static
Double
mwhTokwh
=
1000.0
;
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/controller/HouseholdTestController.java
View file @
69bbed26
...
@@ -2,11 +2,9 @@ package com.yeejoin.amos.api.householdapi.controller;
...
@@ -2,11 +2,9 @@ package com.yeejoin.amos.api.householdapi.controller;
import
com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil
;
import
com.yeejoin.amos.api.householdapi.Utils.GoodWeRequestUtil
;
import
com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils
;
import
com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils
;
import
com.yeejoin.amos.api.householdapi.face.service.GoLangDataAcquisitionService
;
import
com.yeejoin.amos.api.householdapi.face.service.*
;
import
com.yeejoin.amos.api.householdapi.face.service.GoodWeDataAcquisitionService
;
import
com.yeejoin.amos.api.householdapi.face.service.ImasterDataService
;
import
com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionService
;
import
com.yeejoin.amos.api.householdapi.face.service.impl.ImasterDataServiceImpl
;
import
com.yeejoin.amos.api.householdapi.face.service.impl.ImasterDataServiceImpl
;
import
com.yeejoin.amos.api.householdapi.face.service.impl.SofarDataAcquisitionServiceImpl
;
import
fastjson.JSON
;
import
fastjson.JSON
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -40,6 +38,8 @@ public class HouseholdTestController {
...
@@ -40,6 +38,8 @@ public class HouseholdTestController {
private
ImasterDataService
imasterDataService
;
private
ImasterDataService
imasterDataService
;
@Autowired
@Autowired
private
GoodWeDataAcquisitionService
goodWeDataAcquisitionService
;
private
GoodWeDataAcquisitionService
goodWeDataAcquisitionService
;
@Autowired
private
SofarDataAcquisitionService
sofarDataAcquisitionService
;
/**
/**
...
@@ -83,7 +83,7 @@ public class HouseholdTestController {
...
@@ -83,7 +83,7 @@ public class HouseholdTestController {
@PostMapping
(
value
=
"/sofarnew"
)
@PostMapping
(
value
=
"/sofarnew"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"首航"
,
notes
=
"首航"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"首航"
,
notes
=
"首航"
)
public
void
sofarnew
()
throws
IOException
{
public
void
sofarnew
()
throws
IOException
{
// goLang
DataAcquisitionService.stationList();
sofar
DataAcquisitionService
.
stationList
();
// goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.stationDetail();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.inverterList();
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SofarDataAcquisitionServiceImpl.java
0 → 100644
View file @
69bbed26
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
service
.
impl
;
import
com.yeejoin.amos.api.householdapi.Utils.SofarRequestUtil
;
import
com.yeejoin.amos.api.householdapi.constant.SoFarConstant
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.GolangStationList
;
import
com.yeejoin.amos.api.householdapi.face.service.SofarDataAcquisitionService
;
import
fastjson.JSON
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
@Service
public
class
SofarDataAcquisitionServiceImpl
implements
SofarDataAcquisitionService
{
@Autowired
private
SofarRequestUtil
requestUtil
;
@Override
public
void
stationList
()
{
Map
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"page"
,
1
);
requestInfo
.
put
(
"size"
,
1000
);
String
param
=
JSON
.
toJSONString
(
requestInfo
);
requestUtil
.
getResPonse
(
SoFarConstant
.
stationListUrl
,
SoFarConstant
.
requestPost
,
param
,
SoFarConstant
.
resovleRule_data
,
GolangStationList
.
class
);
}
@Override
public
void
stationDetail
()
{
}
@Override
public
void
collectorList
()
{
}
@Override
public
void
collectorDetail
()
{
}
@Override
public
void
inverterList
()
{
}
@Override
public
void
inverterDetail
()
{
}
@Override
public
void
inverAlramInfo
()
{
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/dockingData/DockingData.java
deleted
100644 → 0
View file @
d4fd4095
//package com.yeejoin.amos.dockingData;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONArray;
//import com.alibaba.fastjson.JSONObject;
//import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
//import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
//import com.yeejoin.amos.api.householdapi.face.orm.entity.HouseholdPvApi;
//import com.yeejoin.amos.api.householdapi.face.orm.entity.HouseholdPvProducerInfo;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvApiServiceImpl;
//import com.yeejoin.amos.api.householdapi.face.service.impl.HouseholdPvProducerInfoServiceImpl;
//import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
//import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
//import org.jetbrains.annotations.TestOnly;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.actuate.influx.InfluxDbHealthIndicator;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//import java.util.*;
//import java.util.zip.Inflater;
//
///**
// * @description:
// * @author: tw
// * @createDate: 2023/6/16
// */
//@Component
//public class DockingData {
// @Autowired
// InfluxDbConnection influxDbConnection;
// @Autowired
// HouseholdPvUtils householdPvUtils;
// @Autowired
// private HouseholdPvProducerInfoServiceImpl householdPvProducerInfoServiceImpl;
// @Autowired
// private HouseholdPvApiServiceImpl householdPvApiServiceImpl;
//
// //初始化执行
// @PostConstruct
// public void init() {
// //锦浪云
// this.getDataGolong();
// //固德威
//// this.getDataGoodWE();
// //首航
//// this.getDataSoFar();
// }
//
// //每二十分钟执行一次
// @Scheduled(cron = "0 0/20 * * * ?")
// public void fixedRateGolong() {
// this.getDataGolong();
// }
//
// @Scheduled(cron = "0 0/20 * * * ?")
//// public void fixedRateGoodWE() {
//// this.getDataGoodWE();
//// }
//
//
// @Scheduled(cron = "0 0/20 * * * ?")
//// public void fixedRateSoFar() {
//// this.getDataSoFar();
//// }
//
// //请求获取数据
// public void getDataGolong() {
// List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
// householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.JLY.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
// }
//
// public void getDataGoodWE() {
// List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
// householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.GDW.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
// }
//
// public void getDataSoFar() {
// List<HouseholdPvApi> householdPvApiList = householdPvApiServiceImpl.list();
// householdPvApiList.stream().filter(householdPvApi -> householdPvApi.getProducerId().equals(PVProducerInfoEnum.SH.getCode())).forEach(householdPvApi -> householdPvUtils.gerResponseByAPiID(householdPvApi.getSequenceNbr()));
// }
//}
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/config/ClientHandler.java
View file @
69bbed26
...
@@ -146,7 +146,7 @@ public class ClientHandler<path> implements Runnable {
...
@@ -146,7 +146,7 @@ public class ClientHandler<path> implements Runnable {
// String product = robotAuthentication.getProduct();
// String product = robotAuthentication.getProduct();
// String appKey = robotAuthentication.getAppKey();
// String appKey = robotAuthentication.getAppKey();
String
token
=
"
f5f5ebba-f68a-4093-a78e-388c925a6eaa
"
;
// 如果token、失效,就去浏览器复制最新的token、
String
token
=
"
a1bae8ec-6ef4-40f3-94b0-78f16a249b0e
"
;
// 如果token、失效,就去浏览器复制最新的token、
String
product
=
"AMOS_STUDIO_WEB"
;
String
product
=
"AMOS_STUDIO_WEB"
;
String
appKey
=
"AMOS_STUDIO"
;
String
appKey
=
"AMOS_STUDIO"
;
...
@@ -254,57 +254,60 @@ public class ClientHandler<path> implements Runnable {
...
@@ -254,57 +254,60 @@ public class ClientHandler<path> implements Runnable {
// String product = robotAuthentication.getProduct();
// String product = robotAuthentication.getProduct();
// String appKey = robotAuthentication.getAppKey();
// String appKey = robotAuthentication.getAppKey();
String
token
=
"
f5f5ebba-f68a-4093-a78e-388c925a6eaa
"
;
// 如果token、失效,就去浏览器复制最新的token、
String
token
=
"
a1bae8ec-6ef4-40f3-94b0-78f16a249b0e
"
;
// 如果token、失效,就去浏览器复制最新的token、
String
product
=
"AMOS_STUDIO_WEB"
;
String
product
=
"AMOS_STUDIO_WEB"
;
String
appKey
=
"AMOS_STUDIO"
;
String
appKey
=
"AMOS_STUDIO"
;
String
[]
parts
=
url
.
split
(
"/|:"
);
String
[]
parts
=
url
.
split
(
"/|:"
);
String
dbIp
=
parts
[
2
];
String
dbIp
=
parts
[
4
];
int
dbPort
=
Integer
.
parseInt
(
parts
[
3
]);
int
dbPort
=
Integer
.
parseInt
(
parts
[
5
]);
String
dbName
=
parts
[
4
];
String
dbName
=
parts
[
6
].
split
(
"\\?"
)[
0
];
RestTemplate
restTemplate
=
new
RestTemplate
();
RestTemplate
restTemplate
=
new
RestTemplate
();
String
defaultDatabaseName
=
"空工大_"
+
dbName
;
String
defaultDatabaseName
=
"空工大_"
+
dbName
;
//查询数据库是否已创建
//查询数据库是否已创建
String
connId
=
""
;
String
connId
=
""
;
String
datasourcesUrl
=
"http://"
+
hostAndPort
+
"/maas/
dsm/datasources/query
"
;
String
datasourcesUrl
=
"http://"
+
hostAndPort
+
"/maas/
maas/desktop/conns-jdbc
"
;
Map
<
String
,
String
>
datasourcesParams
=
new
HashMap
<>();
Map
<
String
,
String
>
datasourcesParams
=
new
HashMap
<>();
datasourcesParams
.
put
(
"pid"
,
dataSourcesGroupId
);
HttpEntity
<
Map
<
String
,
String
>>
datasourcesRequestEntity
=
new
HttpEntity
<>(
datasourcesParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
HttpEntity
<
Map
<
String
,
String
>>
datasourcesRequestEntity
=
new
HttpEntity
<>(
datasourcesParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
datasourcesResponse
=
restTemplate
.
exchange
(
datasourcesUrl
,
HttpMethod
.
POS
T
,
datasourcesRequestEntity
,
String
.
class
);
ResponseEntity
<
String
>
datasourcesResponse
=
restTemplate
.
exchange
(
datasourcesUrl
,
HttpMethod
.
GE
T
,
datasourcesRequestEntity
,
String
.
class
);
String
datasourcesBody
=
datasourcesResponse
.
getBody
();
String
datasourcesBody
=
datasourcesResponse
.
getBody
();
JSONObject
datasourcesJsonObject
=
JSONObject
.
parseObject
(
datasourcesBody
);
JSONObject
datasourcesJsonObject
=
JSONObject
.
parseObject
(
datasourcesBody
);
JSONArray
datasourcesResult
=
datasourcesJsonObject
.
getJSONArray
(
"result"
);
JSONArray
datasourcesResult
=
datasourcesJsonObject
.
getJSONArray
(
"result"
);
if
(
datasourcesResult
!=
null
)
{
if
(
datasourcesResult
!=
null
&&
datasourcesResult
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
datasourcesResult
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
datasourcesResult
.
size
();
i
++)
{
Map
<
String
,
Object
>
stringObjectMap
=
(
Map
<
String
,
Object
>)
datasourcesResult
.
get
(
i
);
Map
<
String
,
Object
>
stringObjectMap
=
(
Map
<
String
,
Object
>)
datasourcesResult
.
get
(
i
);
if
(
defaultDatabaseName
.
equals
(
stringObjectMap
.
get
(
"name"
)))
{
if
(
defaultDatabaseName
.
equals
(
stringObjectMap
.
get
(
"name"
)))
{
connId
=
(
String
)
stringObjectMap
.
get
(
"id"
);
connId
=
(
String
)
stringObjectMap
.
get
(
"id"
);
break
;
}
}
}
}
}
}
//查询数据库表是否已创建
//查询数据库表是否已创建
boolean
isCreateTable
=
false
;
boolean
isCreateTable
=
false
;
String
jdbcTablesUrl
=
"http://"
+
hostAndPort
+
"/maas/dsm/jdbc/tables"
;
if
(
StringUtil
.
isNotEmpty
(
connId
))
{
Map
<
String
,
String
>
jdbcTablesParams
=
new
HashMap
<>();
datasourcesParams
.
put
(
"dsId"
,
connId
)
;
String
tablelistUrl
=
"http://"
+
hostAndPort
+
"/maas/maas/desktop/tablelist"
;
datasourcesParams
.
put
(
"dsType"
,
"mysql"
);
Map
<
String
,
String
>
tablelistParams
=
new
HashMap
<>(
);
datasourcesParams
.
put
(
"resourceType"
,
"mysql"
);
tablelistParams
.
put
(
"connId"
,
connId
);
datasourcesParams
.
put
(
"dsdetail"
,
"{\"hostname\":\""
+
dbIp
+
"\",\"port\":"
+
dbPort
+
",\"name\":\""
+
defaultDatabaseName
+
"\",\"database\":\""
+
dbName
+
"\",\"username\":\""
+
username
+
"\",\"password\":\""
+
DesUtil
.
encode
(
password
,
passwordSecretKey
)
+
"\",\"dbtype\":\"mysql\"}"
);
tablelistParams
.
put
(
"subcjectId"
,
dataSourcesGroupId
);
HttpEntity
<
Map
<
String
,
String
>>
jdbcTablesRequestEntity
=
new
HttpEntity
<>(
jdbcTables
Params
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
HttpEntity
<
Map
<
String
,
String
>>
tablelistRequestEntity
=
new
HttpEntity
<>(
tablelist
Params
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
jdbcTablesResponse
=
restTemplate
.
exchange
(
jdbcTablesUrl
,
HttpMethod
.
POST
,
jdbcTables
RequestEntity
,
String
.
class
);
ResponseEntity
<
String
>
tablelistResponse
=
restTemplate
.
exchange
(
tablelistUrl
,
HttpMethod
.
POST
,
tablelist
RequestEntity
,
String
.
class
);
String
jdbcTablesBody
=
jdbcTables
Response
.
getBody
();
String
tablelistBody
=
tablelist
Response
.
getBody
();
JSONObject
jdbcTablesJsonObject
=
JSONObject
.
parseObject
(
jdbcTables
Body
);
JSONObject
tablelistJsonObject
=
JSONObject
.
parseObject
(
tablelist
Body
);
JSONArray
jdbcTablesResult
=
jdbcTables
JsonObject
.
getJSONArray
(
"result"
);
JSONArray
tablelistResult
=
tablelist
JsonObject
.
getJSONArray
(
"result"
);
if
(
jdbcTablesResult
!=
null
)
{
if
(
tablelistResult
!=
null
&&
tablelistResult
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jdbcTables
Result
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
tablelist
Result
.
size
();
i
++)
{
Map
<
String
,
Object
>
stringObjectMap
=
(
Map
<
String
,
Object
>)
jdbcTables
Result
.
get
(
i
);
Map
<
String
,
Object
>
stringObjectMap
=
(
Map
<
String
,
Object
>)
tablelist
Result
.
get
(
i
);
if
(
tableName
.
equals
(
stringObjectMap
.
get
(
"name"
)))
{
if
(
tableName
.
equals
(
stringObjectMap
.
get
(
"name"
)))
{
isCreateTable
=
true
;
isCreateTable
=
true
;
break
;
}
}
}
}
}
}
}
//3. 调用conn接口,数据库已创建过就不在创建
//3. 调用conn接口,数据库已创建过就不在创建
if
(
StringUtil
.
isEmpty
(
connId
))
{
if
(
StringUtil
.
isEmpty
(
connId
))
{
String
connsUrl
=
"http://"
+
hostAndPort
+
"/maas/maas/desktop/conns"
;
String
connsUrl
=
"http://"
+
hostAndPort
+
"/maas/maas/desktop/conns"
;
...
@@ -312,7 +315,7 @@ public class ClientHandler<path> implements Runnable {
...
@@ -312,7 +315,7 @@ public class ClientHandler<path> implements Runnable {
connsParams
.
put
(
"name"
,
defaultDatabaseName
);
connsParams
.
put
(
"name"
,
defaultDatabaseName
);
connsParams
.
put
(
"connType"
,
"mysql"
);
connsParams
.
put
(
"connType"
,
"mysql"
);
connsParams
.
put
(
"subjectid"
,
dataSourcesGroupId
);
connsParams
.
put
(
"subjectid"
,
dataSourcesGroupId
);
connsParams
.
put
(
"detail"
,
"{\"hostname\":\""
+
dbIp
+
"\",\"port\":"
+
dbPort
+
",\"username\":\""
+
username
+
"\",\"password\":\""
+
DesUtil
.
encode
(
password
,
passwordSecretKey
)
+
"\",\"name\":\""
+
defaultDatabaseName
+
"\",\"database\":\""
+
dbName
+
"\",\"dbtype\":\"mysql\"}"
);
connsParams
.
put
(
"detail"
,
"{\"hostname\":\""
+
dbIp
+
"\",\"port\":"
+
dbPort
+
",\"username\":\""
+
username
+
"\",\"password\":\""
+
DesUtil
.
encode
(
password
,
passwordSecretKey
)
+
"\",\"name\":\""
+
defaultDatabaseName
+
"\",\"database\":\""
+
dbName
+
"\",\"dbtype\":\"mysql\"}"
);
HttpEntity
<
Map
<
String
,
String
>>
connsRequestEntity
=
new
HttpEntity
<>(
connsParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
HttpEntity
<
Map
<
String
,
String
>>
connsRequestEntity
=
new
HttpEntity
<>(
connsParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
connsResponse
=
restTemplate
.
exchange
(
connsUrl
,
HttpMethod
.
POST
,
connsRequestEntity
,
String
.
class
);
ResponseEntity
<
String
>
connsResponse
=
restTemplate
.
exchange
(
connsUrl
,
HttpMethod
.
POST
,
connsRequestEntity
,
String
.
class
);
...
@@ -336,16 +339,6 @@ public class ClientHandler<path> implements Runnable {
...
@@ -336,16 +339,6 @@ public class ClientHandler<path> implements Runnable {
JSONObject
tablesJsonObject
=
JSONObject
.
parseObject
(
tablesBody
);
JSONObject
tablesJsonObject
=
JSONObject
.
parseObject
(
tablesBody
);
String
tablesResult
=
tablesJsonObject
.
getString
(
"result"
);
String
tablesResult
=
tablesJsonObject
.
getString
(
"result"
);
String
tablelistUrl
=
"http://"
+
hostAndPort
+
"/maas/maas/desktop/tablelist"
;
Map
<
String
,
String
>
tablelistParams
=
new
HashMap
<>();
tablesParams
.
put
(
"connId"
,
connId
);
tablesParams
.
put
(
"subcjectId"
,
dataSourcesGroupId
);
HttpEntity
<
Map
<
String
,
String
>>
tablelistRequestEntity
=
new
HttpEntity
<>(
tablelistParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
tablelistResponse
=
restTemplate
.
exchange
(
tablelistUrl
,
HttpMethod
.
POST
,
tablelistRequestEntity
,
String
.
class
);
String
tablelistBody
=
tablelistResponse
.
getBody
();
JSONObject
tablelistJsonObject
=
JSONObject
.
parseObject
(
tablelistBody
);
String
tablelistResult
=
tablelistJsonObject
.
getString
(
"result"
);
}
}
}
}
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
69bbed26
...
@@ -265,7 +265,7 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -265,7 +265,7 @@ public class HealthStatusIndicatorServiceImpl {
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getStatus
,
0
);
query
.
isNotNull
(
PvWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
PvWarningRecord:
:
getTs
);
query
.
orderByDesc
(
PvWarningRecord:
:
getTs
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
...
@@ -433,7 +433,8 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -433,7 +433,8 @@ public class HealthStatusIndicatorServiceImpl {
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getStatus
,
0
);
query
.
eq
(
PvWarningRecord:
:
getStatus
,
"0"
);
query
.
isNotNull
(
PvWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
PvWarningRecord:
:
getRecDate
);
query
.
orderByDesc
(
PvWarningRecord:
:
getRecDate
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
...
@@ -599,7 +600,8 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -599,7 +600,8 @@ public class HealthStatusIndicatorServiceImpl {
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getAnalysisPointId
,
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
PvWarningRecord:
:
getStatus
,
0
);
query
.
eq
(
PvWarningRecord:
:
getStatus
,
"0"
);
query
.
isNotNull
(
PvWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
PvWarningRecord:
:
getTs
);
query
.
orderByDesc
(
PvWarningRecord:
:
getTs
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
List
<
PvWarningRecord
>
idxBizPvWarningRecords
=
pvWaringRecordMapper
.
selectList
(
query
);
...
@@ -769,7 +771,8 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -769,7 +771,8 @@ public class HealthStatusIndicatorServiceImpl {
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getStatus
,
0
);
query
.
eq
(
FanWarningRecord:
:
getStatus
,
"0"
);
query
.
isNotNull
(
FanWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
...
@@ -938,7 +941,8 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -938,7 +941,8 @@ public class HealthStatusIndicatorServiceImpl {
}
}
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getStatus
,
0
);
query
.
eq
(
FanWarningRecord:
:
getStatus
,
"0"
);
query
.
isNotNull
(
FanWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
...
@@ -1111,7 +1115,8 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -1111,7 +1115,8 @@ public class HealthStatusIndicatorServiceImpl {
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
FanWarningRecord:
:
getStatus
,
0
);
query
.
eq
(
FanWarningRecord:
:
getStatus
,
"0"
);
query
.
isNotNull
(
FanWarningRecord:
:
getDisposotionDate
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
query
.
orderByDesc
(
FanWarningRecord:
:
getTs
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
List
<
FanWarningRecord
>
idxBizFanWarningRecords
=
fanWaringRecordMapper
.
selectList
(
query
);
...
...
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