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
d7ed49dd
Commit
d7ed49dd
authored
Sep 26, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
51444a13
2ae62d11
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
268 additions
and
17 deletions
+268
-17
KSolarRequestUtil.java
...eejoin/amos/api/householdapi/Utils/KSolarRequestUtil.java
+4
-3
SurveyDetailsDto.java
...ejoin/amos/boot/module/hygf/api/dto/SurveyDetailsDto.java
+6
-0
Commercial.java
.../yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
+1
-1
SurveyDetails.java
...ejoin/amos/boot/module/hygf/api/entity/SurveyDetails.java
+7
-0
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+11
-0
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+118
-1
FullViewRecallDataDTO.java
...amos/boot/module/jxiop/biz/dto/FullViewRecallDataDTO.java
+13
-0
FullViewRecallInfoDTO.java
...amos/boot/module/jxiop/biz/dto/FullViewRecallInfoDTO.java
+13
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+9
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+86
-12
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/KSolarRequestUtil.java
View file @
d7ed49dd
...
@@ -32,16 +32,17 @@ public class KSolarRequestUtil {
...
@@ -32,16 +32,17 @@ public class KSolarRequestUtil {
public
HashMap
<
String
,
Object
>
getHeader
()
{
public
HashMap
<
String
,
Object
>
getHeader
()
{
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
requsetParams
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
requsetParams
=
new
HashMap
<>();
String
requestParam
=
""
;
HashMap
<
String
,
String
>
hashMaphead
=
new
HashMap
<>();
HashMap
<
String
,
String
>
hashMaphead
=
new
HashMap
<>();
requsetParams
.
put
(
"username"
,
KSolarConstant
.
account
);
try
{
try
{
requsetParams
.
put
(
"password"
,
AESUtils
.
Encrypt
(
KSolarConstant
.
password
,
AESUtils
.
DEFAULT_SECRET_KEY
)
);
requestParam
=
"username="
+
KSolarConstant
.
account
+
"&password="
+
AESUtils
.
Encrypt
(
KSolarConstant
.
password
,
AESUtils
.
DEFAULT_SECRET_KEY
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
String
url
=
KSolarConstant
.
baseurl
+
KSolarConstant
.
tokenUrl
;
String
url
=
KSolarConstant
.
baseurl
+
KSolarConstant
.
tokenUrl
;
hashMaphead
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded;charset=utf-8"
);
hashMaphead
.
put
(
"Authorization"
,
"Basic "
+
Base64
.
getUrlEncoder
().
encodeToString
((
KSolarConstant
.
authUsername
+
":"
+
KSolarConstant
.
authPassword
).
getBytes
(
StandardCharsets
.
UTF_8
)));
hashMaphead
.
put
(
"Authorization"
,
"Basic "
+
Base64
.
getUrlEncoder
().
encodeToString
((
KSolarConstant
.
authUsername
+
":"
+
KSolarConstant
.
authPassword
).
getBytes
(
StandardCharsets
.
UTF_8
)));
String
ResPonse
=
HttpUtil
.
createPost
(
url
).
headerMap
(
hashMaphead
,
false
).
body
(
JSONObject
.
toJSONString
(
requsetParams
)
).
execute
().
body
();
String
ResPonse
=
HttpUtil
.
createPost
(
url
).
headerMap
(
hashMaphead
,
false
).
body
(
requestParam
).
execute
().
body
();
return
hashMap
;
return
hashMap
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/SurveyDetailsDto.java
View file @
d7ed49dd
...
@@ -53,6 +53,12 @@ public class SurveyDetailsDto extends BaseDto {
...
@@ -53,6 +53,12 @@ public class SurveyDetailsDto extends BaseDto {
@ApiModelProperty
(
value
=
"房屋偏向"
)
@ApiModelProperty
(
value
=
"房屋偏向"
)
private
String
houseBias
;
private
String
houseBias
;
@ApiModelProperty
(
value
=
"手机指南正截图"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
compass
;
@ApiModelProperty
(
value
=
"房屋偏向备注"
)
@ApiModelProperty
(
value
=
"房屋偏向备注"
)
private
String
houseBiasNotes
;
private
String
houseBiasNotes
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
View file @
d7ed49dd
...
@@ -58,7 +58,7 @@ public class Commercial extends BaseEntity {
...
@@ -58,7 +58,7 @@ public class Commercial extends BaseEntity {
* 省市区code
* 省市区code
*/
*/
@TableField
(
value
=
"project_address"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
@TableField
(
value
=
"project_address"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
projectAddress
;
private
List
<
Integer
>
projectAddress
;
/**
/**
* 省市区名称
* 省市区名称
*/
*/
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/SurveyDetails.java
View file @
d7ed49dd
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -78,6 +79,12 @@ public class SurveyDetails extends BaseEntity {
...
@@ -78,6 +79,12 @@ public class SurveyDetails extends BaseEntity {
@TableField
(
"house_bias"
)
@TableField
(
"house_bias"
)
private
String
houseBias
;
private
String
houseBias
;
/**
* 手机指南正截图
*/
@TableField
(
value
=
"compass"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
compass
;
/**
/**
* 房屋偏向备注
* 房屋偏向备注
*/
*/
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
d7ed49dd
...
@@ -347,6 +347,17 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
...
@@ -347,6 +347,17 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
QueryWrapper
<
Commercial
>
commercialQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Commercial
>
commercialQueryWrapper
=
new
QueryWrapper
<>();
commercialQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
commercialQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
commercial
.
setApplicant
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
commercial
.
setIdCard
(
surveyInfoAllDto
.
getSurveyInformation
().
getIdCard
());
commercial
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
commercial
.
setProjectAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
());
commercial
.
setProjectAddressName
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressName
());
commercial
.
setProjectAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddressDetail
());
commercial
.
setLegalContactTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
if
(
information
==
null
){
if
(
information
==
null
){
CommercialDto
commercialDto
=
new
CommercialDto
();
CommercialDto
commercialDto
=
new
CommercialDto
();
commercialDto
.
setType
(
"zrr"
);
commercialDto
.
setType
(
"zrr"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
d7ed49dd
...
@@ -14,6 +14,8 @@ import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
...
@@ -14,6 +14,8 @@ import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans
;
import
com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ESEquipmentsDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ESEquipmentsDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallInfoDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
...
@@ -26,6 +28,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
...
@@ -26,6 +28,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -618,13 +621,22 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -618,13 +621,22 @@ public class BigScreenAnalyseController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风站/光伏 右下诊断分析"
)
@ApiOperation
(
value
=
"风站/光伏 右下诊断分析"
)
@GetMapping
(
"/getRiskHandleByVarDesc"
)
@GetMapping
(
"/getRiskHandleByVarDesc"
)
public
ResponseModel
<
Map
<
String
,
String
>>
getRiskHandleByVarDesc
(
@RequestParam
(
value
=
"varDesc"
,
required
=
false
)
String
varDesc
)
{
public
ResponseModel
<
Map
<
String
,
String
>>
getRiskHandleByVarDesc
(
@RequestParam
(
value
=
"varDesc"
,
required
=
false
)
String
varDesc
,
@RequestParam
(
value
=
"tableName"
,
required
=
true
)
String
tableName
)
{
varDesc
=
idxBizFanHealthIndexMapper
.
getPointNameByIndexAddress
(
varDesc
,
tableName
);
FeignClientResult
<
List
<
String
>>
sevenEntityMcb
=
null
;
FeignClientResult
<
List
<
String
>>
sevenEntityMcb
=
null
;
try
{
try
{
sevenEntityMcb
=
riskWarningFeign
.
getRiskHandleByVarDesc
(
varDesc
);
sevenEntityMcb
=
riskWarningFeign
.
getRiskHandleByVarDesc
(
varDesc
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(
ObjectUtils
.
isEmpty
(
sevenEntityMcb
)
||
sevenEntityMcb
.
getStatus
()
!=
200
)
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"content"
,
""
);
return
ResponseHelper
.
buildResponse
(
stringStringHashMap
);
}
StringBuilder
resultString
=
new
StringBuilder
();
StringBuilder
resultString
=
new
StringBuilder
();
List
<
String
>
result
=
sevenEntityMcb
.
getResult
();
List
<
String
>
result
=
sevenEntityMcb
.
getResult
();
for
(
String
s
:
result
)
{
for
(
String
s
:
result
)
{
...
@@ -636,5 +648,110 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -636,5 +648,110 @@ public class BigScreenAnalyseController extends BaseController {
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"全景诊断回溯"
)
@GetMapping
(
"/getFullViewRecall"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getFullViewRecall
()
{
HashMap
<
String
,
Object
>
resultMapFinally
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
stationIndexInfo
=
idxBizFanHealthIndexMapper
.
getStationIndexInfo
();
Map
<
String
,
Double
>
stationHealthIndexMap
=
stationIndexInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"station"
).
toString
(),
t
->
Double
.
parseDouble
(
t
.
get
(
"healthIndex"
).
toString
())));
List
<
FullViewRecallDataDTO
>
list
=
idxBizFanHealthIndexMapper
.
getFullViewRecall
();
Map
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>>
resultMap
=
list
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
FullViewRecallDataDTO:
:
getArea
,
Collectors
.
groupingBy
(
FullViewRecallDataDTO:
:
getStation
,
Collectors
.
groupingBy
(
FullViewRecallDataDTO:
:
getEquipmentName
,
Collectors
.
groupingBy
(
FullViewRecallDataDTO:
:
getSubSystem
,
Collectors
.
groupingBy
(
FullViewRecallDataDTO:
:
getPointName
))))));
int
areaInt
=
1
;
int
pointNameInt
=
1
;
int
stationInt
=
1
;
int
equipmentInt
=
1
;
int
subSystemInt
=
1
;
List
<
FullViewRecallInfoDTO
>
fullViewRecallList
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
resultMapFromToList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>>
areaMap
:
resultMap
.
entrySet
())
{
FullViewRecallInfoDTO
areaMapDto
=
new
FullViewRecallInfoDTO
();
areaMapDto
.
setKey
(
"0-"
+
areaInt
);
areaMapDto
.
setName
(
areaMap
.
getKey
());
areaMapDto
.
setLoc
(
null
);
areaMapDto
.
setScoreRange
(
null
);
areaMapDto
.
setStatus
(
null
);
areaMapDto
.
setScore
(
null
);
fullViewRecallList
.
add
(
areaMapDto
);
HashMap
<
String
,
String
>
areaMapFromTo
=
new
HashMap
<>();
areaMapFromTo
.
put
(
"from"
,
"0"
);
areaMapFromTo
.
put
(
"to"
,
areaMapDto
.
getKey
());
resultMapFromToList
.
add
(
areaMapFromTo
);
areaInt
++;
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>
stationMap
:
areaMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
stationDto
=
new
FullViewRecallInfoDTO
();
stationDto
.
setKey
(
areaMapDto
.
getKey
()
+
"-"
+
stationInt
);
stationDto
.
setName
(
stationMap
.
getKey
());
stationDto
.
setLoc
(
null
);
stationDto
.
setScoreRange
(
null
);
stationDto
.
setStatus
(
null
);
stationDto
.
setScore
(
stationHealthIndexMap
.
getOrDefault
(
stationMap
.
getKey
(),
100.0
));
fullViewRecallList
.
add
(
stationDto
);
HashMap
<
String
,
String
>
stationMapFromTo
=
new
HashMap
<>();
stationMapFromTo
.
put
(
"from"
,
areaMapDto
.
getKey
());
stationMapFromTo
.
put
(
"to"
,
stationDto
.
getKey
());
resultMapFromToList
.
add
(
stationMapFromTo
);
stationInt
++;
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>
equipmentMap
:
stationMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
equipmentMapDto
=
new
FullViewRecallInfoDTO
();
equipmentMapDto
.
setKey
(
stationDto
.
getKey
()
+
"-"
+
equipmentInt
);
equipmentMapDto
.
setName
(
equipmentMap
.
getKey
());
equipmentMapDto
.
setLoc
(
null
);
equipmentMapDto
.
setScoreRange
(
null
);
equipmentMapDto
.
setStatus
(
null
);
equipmentMapDto
.
setScore
(
null
);
fullViewRecallList
.
add
(
equipmentMapDto
);
HashMap
<
String
,
String
>
equipmentMapFromTo
=
new
HashMap
<>();
equipmentMapFromTo
.
put
(
"from"
,
stationDto
.
getKey
());
equipmentMapFromTo
.
put
(
"to"
,
equipmentMapDto
.
getKey
());
resultMapFromToList
.
add
(
equipmentMapFromTo
);
equipmentInt
++;
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>
subSystemMap
:
equipmentMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
subSystemMapDto
=
new
FullViewRecallInfoDTO
();
subSystemMapDto
.
setKey
(
equipmentMapDto
.
getKey
()
+
"-"
+
subSystemInt
);
subSystemMapDto
.
setName
(
subSystemMap
.
getKey
());
subSystemMapDto
.
setLoc
(
null
);
subSystemMapDto
.
setScoreRange
(
null
);
subSystemMapDto
.
setStatus
(
null
);
subSystemMapDto
.
setScore
(
null
);
fullViewRecallList
.
add
(
subSystemMapDto
);
HashMap
<
String
,
String
>
subSystemMapFromTo
=
new
HashMap
<>();
subSystemMapFromTo
.
put
(
"from"
,
equipmentMapDto
.
getKey
());
subSystemMapFromTo
.
put
(
"to"
,
subSystemMapDto
.
getKey
());
resultMapFromToList
.
add
(
subSystemMapFromTo
);
subSystemInt
++;
for
(
Map
.
Entry
<
String
,
List
<
FullViewRecallDataDTO
>>
pointNameMap
:
subSystemMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
pointNameMapDto
=
new
FullViewRecallInfoDTO
();
pointNameMapDto
.
setKey
(
subSystemMapDto
.
getKey
()
+
"-"
+
pointNameInt
);
pointNameMapDto
.
setName
(
pointNameMap
.
getKey
());
pointNameMapDto
.
setLoc
(
null
);
pointNameMapDto
.
setScoreRange
(
null
);
pointNameMapDto
.
setStatus
(
null
);
pointNameMapDto
.
setScore
(
null
);
fullViewRecallList
.
add
(
pointNameMapDto
);
HashMap
<
String
,
String
>
pointNameMapFromTo
=
new
HashMap
<>();
pointNameMapFromTo
.
put
(
"from"
,
subSystemMapDto
.
getKey
());
pointNameMapFromTo
.
put
(
"to"
,
pointNameMapDto
.
getKey
());
resultMapFromToList
.
add
(
pointNameMapFromTo
);
pointNameInt
++;
}
}
}
}
}
resultMapFinally
.
put
(
"nodeDataArray"
,
fullViewRecallList
);
resultMapFinally
.
put
(
"linkDataArray"
,
resultMapFromToList
);
resultMapFinally
.
put
(
"class"
,
"GraphLinksModel"
);
return
ResponseHelper
.
buildResponse
(
resultMapFinally
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/FullViewRecallDataDTO.java
0 → 100644
View file @
d7ed49dd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
FullViewRecallDataDTO
{
private
String
rowNumber
;
private
String
area
;
private
String
station
;
private
String
equipmentName
;
private
String
subSystem
;
private
String
pointName
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/FullViewRecallInfoDTO.java
0 → 100644
View file @
d7ed49dd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
dto
;
import
lombok.Data
;
@Data
public
class
FullViewRecallInfoDTO
{
private
String
key
;
private
String
loc
;
private
String
name
;
private
Double
score
;
private
String
scoreRange
;
private
String
status
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
d7ed49dd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
mapper2
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -72,4 +73,12 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -72,4 +73,12 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
Map
<
String
,
Object
>>
getPvPointNameListBySumSystem
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"equipmentName"
)
String
equipmentName
);
List
<
Map
<
String
,
Object
>>
getPvPointNameListBySumSystem
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"equipmentName"
)
String
equipmentName
);
String
getPointNameByIndexAddress
(
@Param
(
"varDesc"
)
String
varDesc
,
@Param
(
"tableName"
)
String
tableName
);
List
<
FullViewRecallDataDTO
>
getFullViewRecall
();
List
<
Map
<
String
,
Object
>>
getStationIndexInfo
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
d7ed49dd
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
idx_biz_fan_health_index
idx_biz_fan_health_index
<where>
ANALYSIS_TYPE = '按天'
<where>
ANALYSIS_TYPE = '按天'
AND
AND
DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
idx_biz_pv_health_index
idx_biz_pv_health_index
<where>
<where>
ANALYSIS_TYPE = '按天'
ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
WHERE
WHERE
( STATION IS NULL OR STATION = '' )
( STATION IS NULL OR STATION = '' )
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
GROUP BY
GROUP BY
ARAE UNION ALL
ARAE UNION ALL
(
(
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
WHERE
WHERE
( STATION IS NULL OR STATION = '' )
( STATION IS NULL OR STATION = '' )
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
GROUP BY
GROUP BY
ARAE
ARAE
)
)
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
CURRENT_DATE
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
<if
test=
"equipmentName != null and equipmentName != ''"
>
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND EQUIPMENT_NAME like concat( '%', #{equipmentName} '风机系统')
AND EQUIPMENT_NAME like concat( '%', #{equipmentName} '风机系统')
</if>
</if>
...
@@ -354,7 +354,7 @@
...
@@ -354,7 +354,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
AND GATEWAY_ID = #{gatewayId}
</if>
</if>
...
@@ -409,7 +409,7 @@
...
@@ -409,7 +409,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
CURRENT_DATE
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
AND POINT_NAME IS NOT NULL
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
AND POINT_NAME != ''
<if
test=
"subSystem != null and subSystem != ''"
>
<if
test=
"subSystem != null and subSystem != ''"
>
...
@@ -464,7 +464,7 @@
...
@@ -464,7 +464,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
FORMAT( NOW(), "%Y-%m-%d"
)
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_
SUB( CURRENT_DATE, INTERVAL 1 DAY
)
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
AND GATEWAY_ID = #{gatewayId}
</if>
</if>
...
@@ -483,7 +483,7 @@
...
@@ -483,7 +483,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
CURRENT_DATE
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
<if
test=
"subarray != null and subarray != ''"
>
<if
test=
"subarray != null and subarray != ''"
>
AND SUBARRAY = #{subarray}
AND SUBARRAY = #{subarray}
</if>
</if>
...
@@ -529,7 +529,7 @@
...
@@ -529,7 +529,7 @@
STATION IS NOT NULL
STATION IS NOT NULL
AND STATION != ''
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
CURRENT_DATE
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) =
DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
AND POINT_NAME IS NOT NULL
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
AND POINT_NAME != ''
<if
test=
"equipmentName != null and equipmentName != ''"
>
<if
test=
"equipmentName != null and equipmentName != ''"
>
...
@@ -562,4 +562,78 @@
...
@@ -562,4 +562,78 @@
GROUP BY
GROUP BY
POINT_NAME
POINT_NAME
</select>
</select>
<select
id=
"getPointNameByIndexAddress"
resultType=
"java.lang.String"
>
select POINT_NAME from
${tableName}
where INDEX_ADDRESS = #{varDesc}
limit 1
</select>
<select
id=
"getFullViewRecall"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO"
>
SELECT
a.*,
row_number () over ( ORDER BY pointName ) AS id
FROM
(
SELECT
ARAE AS area,
GATEWAY_ID AS station,
EQUIPMENT_NAME AS equipmentName,
SUB_SYSTEM AS subSystem,
POINT_NAME AS pointName
FROM
idx_biz_fan_point_process_variable_classification
WHERE
TAG_CODE = '分析变量' UNION ALL
SELECT
ARAE AS area,
GATEWAY_ID AS station,
SUBARRAY AS equipmentName,
EQUIPMENT_NAME AS subSystem,
POINT_NAME AS pointName
FROM
idx_biz_pv_point_process_variable_classification
WHERE
TAG_CODE = '分析变量'
) a
</select>
<select
id=
"getStationIndexInfo"
resultType=
"java.util.Map"
>
SELECT
a.STATION AS station,
ROUND( avg( a.avgHealthIndex ), 2 ) AS healthIndex
FROM
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
GATEWAY_ID AS STATION
FROM
idx_biz_fan_health_index
WHERE
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
GROUP BY
GATEWAY_ID UNION ALL
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
GATEWAY_ID AS STATION
FROM
idx_biz_pv_health_index
WHERE
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY )
GROUP BY
GATEWAY_ID
)
) a
GROUP BY
a.STATION
</select>
</mapper>
</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