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
d1513f1b
Commit
d1513f1b
authored
Jan 29, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一体化现场问题
parent
043c39de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
74 deletions
+83
-74
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+6
-6
pom.xml
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/pom.xml
+2
-1
UserEmpowerMapper.java
...module/jxiop/biz/amosprojectmapper/UserEmpowerMapper.java
+2
-1
PrivilegeController.java
...boot/module/jxiop/biz/controller/PrivilegeController.java
+0
-0
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+57
-56
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+1
-1
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+9
-3
AlarmEventServiceImpl.java
.../module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
+3
-3
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+3
-3
No files found.
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 @
d1513f1b
...
...
@@ -1666,9 +1666,9 @@ public class CommonServiceImpl {
Table
healthData
=
Table
.
create
(
"healthData"
);
healthData
.
addColumns
(
DoubleColumn
.
create
(
"analysisVariable"
,
analysisVariable
),
DoubleColumn
.
create
(
"stdDev"
,
stdDev
),
DoubleColumn
.
create
(
"centerValue"
,
centerValue
),
StringColumn
.
create
(
"ProcessPoint1Id"
,
ProcessPoint1Id
),
DoubleColumn
.
create
(
"ProcessPoint1"
,
ProcessPoint1
),
StringColumn
.
create
(
"ProcessPoint2Id"
,
ProcessPoint2Id
),
DoubleColumn
.
create
(
"ProcessPoint2"
,
ProcessPoint2
),
StringColumn
.
create
(
"ProcessPoint3Id"
,
ProcessPoint3Id
),
DoubleColumn
.
create
(
"ProcessPoint3"
,
ProcessPoint3
),
StringColumn
.
create
(
"analysisVariableId"
,
analysisVariableIds
));
logger
.
info
(
"------------------------------------------开始调用健康指数计算算法开始----------------------------------------"
);
logger
.
info
(
"------------------------------------------开始调用
风机
健康指数计算算法开始----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用地址:"
+
baseUrlZSFX
);
logger
.
info
(
"------------------------------------------调用参数:"
+
JSON
.
toJSONString
(
requestMap
));
//
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(requestMap));
String
response
=
HttpUtil
.
createPost
(
baseUrlZSFX
).
body
(
JSON
.
toJSONString
(
requestMap
)).
execute
().
body
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
response
);
...
...
@@ -1752,7 +1752,7 @@ public class CommonServiceImpl {
try
{
logger
.
info
(
"--------------------response: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用
风机
健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------开始计算预警----------------------------------------"
);
// healthStatusIndicatorService.healthWarningMinute(calendar, time);
...
...
@@ -1949,9 +1949,9 @@ public class CommonServiceImpl {
Table
healthData
=
Table
.
create
(
"healthData"
);
healthData
.
addColumns
(
DoubleColumn
.
create
(
"analysisVariable"
,
analysisVariable
),
DoubleColumn
.
create
(
"stdDev"
,
stdDev
),
DoubleColumn
.
create
(
"centerValue"
,
centerValue
),
StringColumn
.
create
(
"ProcessPoint1Id"
,
ProcessPoint1Id
),
DoubleColumn
.
create
(
"ProcessPoint1"
,
ProcessPoint1
),
StringColumn
.
create
(
"ProcessPoint2Id"
,
ProcessPoint2Id
),
DoubleColumn
.
create
(
"ProcessPoint2"
,
ProcessPoint2
),
StringColumn
.
create
(
"ProcessPoint3Id"
,
ProcessPoint3Id
),
DoubleColumn
.
create
(
"ProcessPoint3"
,
ProcessPoint3
),
StringColumn
.
create
(
"analysisVariableId"
,
analysisVariableIds
));
logger
.
info
(
"------------------------------------------开始调用健康指数计算算法开始----------------------------------------"
);
logger
.
info
(
"------------------------------------------开始调用
光伏
健康指数计算算法开始----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用地址:"
+
baseUrlZSFX
);
logger
.
info
(
"------------------------------------------调用参数:"
+
JSON
.
toJSONString
(
requestMap
));
//
logger.info("------------------------------------------调用参数:"+JSON.toJSONString(requestMap));
String
response
=
HttpUtil
.
createPost
(
baseUrlZSFX
).
body
(
JSON
.
toJSONString
(
requestMap
)).
execute
().
body
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
response
);
if
(
jsonObject
.
containsKey
(
"indexValue"
))
{
...
...
@@ -2029,7 +2029,7 @@ public class CommonServiceImpl {
}
try
{
logger
.
info
(
"--------------------response: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------调用
光伏
健康指数计算算法结束----------------------------------------"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/pom.xml
View file @
d1513f1b
...
...
@@ -15,11 +15,12 @@
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<!--
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-ugp-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
</dependency>
-->
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-common-biz
</artifactId>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/amosprojectmapper/UserEmpowerMapper.java
View file @
d1513f1b
...
...
@@ -13,5 +13,6 @@ import java.util.Map;
* @createDate: 2023/11/9
*/
public
interface
UserEmpowerMapper
extends
BaseMapper
<
StdUserEmpower
>
{
@Select
(
"select company_name as companyName , level from privilege_company where org_code = #{orgCode}"
)
Map
<
String
,
String
>
getCompanyInfoByOrgCode
(
String
orgCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PrivilegeController.java
View file @
d1513f1b
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
d1513f1b
...
...
@@ -26,62 +26,63 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.EquipAlarmEventMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.EquipDivergenceAlarmEventMapper
;
@Service
public
class
EquipAlarmEventServiceImpl
extends
BaseService
<
EquipAlarmEventDto
,
EquipAlarmEvent
,
EquipAlarmEventMapper
>
{
public
class
EquipAlarmEventServiceImpl
extends
BaseService
<
EquipAlarmEventDto
,
EquipAlarmEvent
,
EquipAlarmEventMapper
>
{
@Autowired
EquipAlarmEventMapper
equipAlarmEventMapper
;
@Autowired
StationBasicMapper
stationBasicMapper
;
@Autowired
EquipDivergenceAlarmEventMapper
equipDivergenceAlarmEventMapper
;
@Autowired
EquipAlarmEventMapper
equipAlarmEventMapper
;
@Autowired
StationBasicMapper
stationBasicMapper
;
@Autowired
EquipDivergenceAlarmEventMapper
equipDivergenceAlarmEventMapper
;
public
ResultsData
getEventByEquipIndex
(
String
gatewayId
,
int
current
,
int
size
,
String
equipIndex
,
String
frontModule
)
{
List
<
EquipAlarmEventDto
>
equipAlarmEvents
=
new
ArrayList
<>();
LambdaQueryWrapper
<
EquipAlarmEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
equipIndex
!=
null
)
{
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getEquipIndex
,
equipIndex
);
}
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getGatewayId
,
gatewayId
);
if
(
frontModule
!=
null
)
{
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getFrontModule
,
frontModule
);
}
Calendar
calendar
=
Calendar
.
getInstance
(
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
7
);
queryWrapper
.
gt
(
EquipAlarmEvent:
:
getCreatedTime
,
calendar
.
getTime
()
);
int
count
=
equipAlarmEventMapper
.
selectCount
(
queryWrapper
);
IPage
<
EquipAlarmEvent
>
p
=
new
Page
<>(
current
,
size
);
equipAlarmEvents
=
equipAlarmEventMapper
.
getAlarmEventList
(
gatewayId
,
equipIndex
,
frontModule
,
(
p
.
getCurrent
()-
1
)*
p
.
getSize
(),
p
.
getSize
(),
calendar
.
getTime
());
//
equipAlarmEvents = equipAlarmEventMapper.selectList(queryWrapper);
//
equipAlarmEvents=page.getRecords();
equipAlarmEvents
.
forEach
(
i
->
{
if
(
"true"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"合"
);
}
else
{
i
.
setValue
(
"分"
);
}
}
);
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
count
,
false
,
current
,
equipAlarmEvents
);
ColModel
colModelEventMovement
=
new
ColModel
(
"equipName"
,
"equipName"
,
"设备名"
,
"设备名"
,
"dataGrid"
,
"equipName"
);
ColModel
colModelStationName
=
new
ColModel
(
"alarmDesc"
,
"alarmDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"alarmDesc
"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"告警时间"
,
"告警时间"
,
"dataGrid"
,
"createdTim
e"
);
ColModel
colModelValueDesc
=
new
ColModel
(
"value"
,
"value"
,
"动作"
,
"动作"
,
"dataGrid"
,
"value"
);
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelValueDesc
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
public
ResultsData
getEquipDivergenceEvent
(
String
gatewayId
,
int
current
,
int
size
)
{
PageHelper
.
startPage
(
current
,
size
);
public
ResultsData
getEventByEquipIndex
(
String
gatewayId
,
int
current
,
int
size
,
String
equipIndex
,
String
frontModule
)
{
List
<
EquipAlarmEventDto
>
equipAlarmEvents
=
new
ArrayList
<>();
LambdaQueryWrapper
<
EquipAlarmEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
equipIndex
!=
null
)
{
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getEquipIndex
,
equipIndex
);
}
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getGatewayId
,
gatewayId
);
if
(
frontModule
!=
null
)
{
queryWrapper
.
eq
(
EquipAlarmEvent:
:
getFrontModule
,
frontModule
);
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
7
);
queryWrapper
.
gt
(
EquipAlarmEvent:
:
getCreatedTime
,
calendar
.
getTime
()
);
int
count
=
equipAlarmEventMapper
.
selectCount
(
queryWrapper
);
IPage
<
EquipAlarmEvent
>
p
=
new
Page
<>(
current
,
size
);
equipAlarmEvents
=
equipAlarmEventMapper
.
getAlarmEventList
(
gatewayId
,
equipIndex
,
frontModule
,
(
p
.
getCurrent
()
-
1
)
*
p
.
getSize
(),
p
.
getSize
(),
calendar
.
getTime
());
//
equipAlarmEvents = equipAlarmEventMapper.selectList(queryWrapper);
//
equipAlarmEvents=page.getRecords();
equipAlarmEvents
.
forEach
(
i
->
{
if
(
"true"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"合"
);
}
else
{
i
.
setValue
(
"分"
);
}
}
);
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
count
,
false
,
current
,
equipAlarmEvents
);
ColModel
colModelEventMovement
=
new
ColModel
(
"equipName"
,
"equipName"
,
"设备名"
,
"设备名"
,
"dataGrid"
,
"equipName"
);
ColModel
colModelStationName
=
new
ColModel
(
"alarmDesc"
,
"alarmDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"alarmDesc"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"createdTime"
,
"createdTime"
,
"告警时间"
,
"告警时间"
,
"dataGrid"
,
"createdTime
"
);
ColModel
colModelValueDesc
=
new
ColModel
(
"value"
,
"value"
,
"动作"
,
"动作"
,
"dataGrid"
,
"valu
e"
);
List
<
ColModel
>
listColModel
=
Arrays
.
asList
(
colModelEventMovement
,
colModelStationName
,
colModelEventDesc
,
colModelValueDesc
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
public
ResultsData
getEquipDivergenceEvent
(
String
gatewayId
,
int
current
,
int
size
)
{
PageHelper
.
startPage
(
current
,
size
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
2
);
List
<
EquipDivergenceAlarmEvent
>
alarmEventList
=
equipDivergenceAlarmEventMapper
.
getEventList
(
gatewayId
,
null
,
null
,
calendar
.
getTime
());
List
<
EquipDivergenceAlarmEvent
>
alarmEventList
=
equipDivergenceAlarmEventMapper
.
getEventList
(
gatewayId
,
null
,
null
,
calendar
.
getTime
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Calendar
car
=
Calendar
.
getInstance
();
...
...
@@ -91,12 +92,12 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
// } else if ("false".equals(i.getValue())) {
// i.setValue("分");
// }
long
mills
=
i
.
getCreatedTime
()
;
long
mills
=
i
.
getCreatedTime
()
/
1000000
;
car
.
setTimeInMillis
(
mills
);
// System.out.println(sdf.format(car.getTime()));
String
time
=
sdf
.
format
(
car
.
getTime
());
if
(
time
.
contains
(
"1970"
))
{
mills
=
i
.
getCreatedTime
()
/
1000000
;
if
(
time
.
contains
(
"1970
-
"
))
{
mills
=
i
.
getCreatedTime
();
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
}
...
...
@@ -118,5 +119,5 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
colModelEventDesc
,
colModelValueDesc
);
ResultsData
resultsData
=
new
ResultsData
(
DataGridMock
,
listColModel
);
return
resultsData
;
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
d1513f1b
...
...
@@ -149,7 +149,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
private
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Autowired
private
UserEmpowerMapper
userEmpowerMapper
;
@Override
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
Map
<
String
,
List
<
String
>>
queryCodntion
=
new
HashMap
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
d1513f1b
...
...
@@ -149,13 +149,19 @@ public class MonitoringServiceImpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"30秒平均风速"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
speendOrirradiate
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getAvagerByEquipmentIndxName
(
result
,
"30秒平均风速"
));
}
else
if
(
stationCacheInfoDto
.
getStationType
().
contains
(
"GFDZ"
)){
if
(
result
!=
null
)
{
speendOrirradiate
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getAvagerByEquipmentIndxName
(
result
,
"30秒平均风速"
));
}
}
else
if
(
stationCacheInfoDto
.
getStationType
().
contains
(
"GFDZ"
)){
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
speendOrirradiate
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"WTX-801_25_WTX-801_总辐射"
));
if
(
result
!=
null
)
{
speendOrirradiate
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"WTX-801_25_WTX-801_总辐射"
));
}
}
else
{
speendOrirradiate
=
"0.00"
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
View file @
d1513f1b
...
...
@@ -166,12 +166,12 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
i
.
setValue
(
"分"
);
}
i
.
setStationName
(
"升压站"
);
long
mills
=
i
.
getCreatedTime
()
;
long
mills
=
i
.
getCreatedTime
()
/
1000000
;
car
.
setTimeInMillis
(
mills
);
// System.out.println(sdf.format(car.getTime()));
String
time
=
sdf
.
format
(
car
.
getTime
());
if
(
time
.
contains
(
"1970"
))
{
mills
=
i
.
getCreatedTime
()
/
1000000
;
if
(
time
.
contains
(
"1970
-
"
))
{
mills
=
i
.
getCreatedTime
();
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
d1513f1b
...
...
@@ -64,12 +64,12 @@ public class EquipAlarmEventServiceImpl
}
else
if
(
"false"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"分"
);
}
long
mills
=
i
.
getCreatedTime
()
;
long
mills
=
i
.
getCreatedTime
()
/
1000000
;
car
.
setTimeInMillis
(
mills
);
// System.out.println(sdf.format(car.getTime()));
String
time
=
sdf
.
format
(
car
.
getTime
());
if
(
time
.
contains
(
"1970"
))
{
mills
=
i
.
getCreatedTime
()
/
1000000
;
if
(
time
.
contains
(
"1970
-
"
))
{
mills
=
i
.
getCreatedTime
();
car
.
setTimeInMillis
(
mills
);
time
=
sdf
.
format
(
car
.
getTime
());
}
...
...
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