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
5b82d50b
Commit
5b82d50b
authored
Feb 03, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:稳压泵诊断分析接口新增
parent
037212d2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
175 additions
and
5 deletions
+175
-5
DateUtils.java
.../java/com/yeejoin/equipmanage/common/utils/DateUtils.java
+90
-0
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+21
-2
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+1
-1
IotFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
+11
-1
EquipmentSpecificAlarmLogMapper.java
...n/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
+2
-0
IEmergencyService.java
...va/com/yeejoin/equipmanage/service/IEmergencyService.java
+3
-1
IEquipmentSpecificAlarmLogService.java
...quipmanage/service/IEquipmentSpecificAlarmLogService.java
+11
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+0
-0
EquipmentSpecificAlarmLogServiceImpl.java
...ge/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
+5
-0
EquipmentSpecificAlarmLogMapper.xml
...main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
+31
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DateUtils.java
View file @
5b82d50b
...
...
@@ -6,6 +6,9 @@ import java.text.DateFormat;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
import
java.time.Duration
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
/**
...
...
@@ -990,4 +993,91 @@ public class DateUtils {
}
}
/**
* 获取两个时间段之间的秒数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 秒数
*/
public
static
Long
getDurationSecconds
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
getSeconds
();
}
/**
* 获取两个时间段之间的秒数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 秒数
*/
public
static
Long
getDurationSecconds
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
getSeconds
();
}
/**
* 获取两个时间段之间的分钟数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 分钟数
*/
public
static
Long
getDurationMinutes
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toMinutes
();
}
/**
* 获取两个时间段之间的分钟数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 分钟数
*/
public
static
Long
getDurationMinutes
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toMinutes
();
}
/**
* 获取两个时间段之间的小时数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 小时
*/
public
static
Long
getDurationHours
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toHours
();
}
/**
* 获取两个时间段之间的小时数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 小时
*/
public
static
Long
getDurationHours
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toHours
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
5b82d50b
...
...
@@ -583,7 +583,7 @@ public class EmergencyController extends AbstractBaseController {
@GetMapping
(
value
=
"/getPressurePumpStatusChart"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵启停状态图"
,
notes
=
"四横八纵-稳压泵启停状态图"
)
public
ResponseModel
getPressurePumpStatusChart
(
@RequestParam
String
equipmentCode
,
@RequestParam
String
startTime
,
@RequestParam
String
endTime
,
@RequestParam
(
required
=
false
)
String
fieldKey
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
...
...
@@ -594,7 +594,26 @@ public class EmergencyController extends AbstractBaseController {
}
}
}
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getPressurePumpStatusChart
(
equipmentCode
,
startTime
,
endTime
,
fieldKey
,
bizOrgCode
,
getAppKey
(),
getProduct
(),
getToken
()));
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getPressurePumpStatusChart
(
equipmentCode
,
startTime
,
endTime
,
bizOrgCode
,
getAppKey
(),
getProduct
(),
getToken
()));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getPressurePumpDiagnosticAnalysis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"四横八纵-稳压泵诊断分析"
,
notes
=
"四横八纵-稳压泵诊断分析"
)
public
ResponseModel
getPressurePumpDiagnosticAnalysis
(
@RequestParam
String
equipmentCode
,
@RequestParam
(
required
=
false
)
String
nameKeys
,
@RequestParam
(
required
=
false
)
String
fieldKey
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
Collections
.
EMPTY_MAP
);
}
}
}
return
CommonResponseUtil
.
success
(
iEmergencyService
.
getPressurePumpDiagnosticAnalysis
(
equipmentCode
,
nameKeys
,
fieldKey
,
bizOrgCode
,
getAppKey
(),
getProduct
(),
getToken
()));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
5b82d50b
...
...
@@ -325,7 +325,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
fourHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
four
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
oneHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
one
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
start
=
iotFeign
.
selectOne
(
getAppKey
(),
getProduct
(),
getToken
(),
"1"
,
prefix
,
suffix
,
"true"
,
pressurePumpStart
);
stop
=
iotFeign
.
selectOne
(
getAppKey
(),
getProduct
(),
getToken
(),
"1"
,
prefix
,
suffix
,
"f
la
se"
,
pressurePumpStart
);
stop
=
iotFeign
.
selectOne
(
getAppKey
(),
getProduct
(),
getToken
(),
"1"
,
prefix
,
suffix
,
"f
al
se"
,
pressurePumpStart
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
View file @
5b82d50b
package
com
.
yeejoin
.
equipmanage
.
fegin
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -39,5 +38,16 @@ public interface IotFeign {
@RequestParam
(
"FHS_FirePump_RunStatus"
)
String
key
,
@RequestParam
(
required
=
false
,
value
=
"fieldKey"
)
String
fieldKey
);
@RequestMapping
(
value
=
"v1/livedata/common/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
selectListNew
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"measurement"
)
String
measurement
,
@RequestParam
(
value
=
"timeStart"
)
String
beginDate
,
@RequestParam
(
value
=
"timeEnd"
)
String
endDate
,
@RequestParam
(
"FHS_PressurePump_Start"
)
String
key
,
@RequestParam
(
required
=
false
,
value
=
"fieldKey"
)
String
fieldKey
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificAlarmLogMapper.java
View file @
5b82d50b
...
...
@@ -42,4 +42,6 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
Map
<
String
,
Object
>
alarmEquipLink
(
String
date
,
String
pattern
,
String
cleanFlag
);
Map
<
String
,
Object
>
unCleanAlarmEquipLink
(
String
date
,
String
pattern
,
String
cleanFlag
);
List
<
EquipmentSpecificAlarmLog
>
getAlarmLogInfoList
(
String
equipmentCode
,
String
nameKeys
,
String
value
,
String
isCleanTime
,
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
5b82d50b
...
...
@@ -54,5 +54,7 @@ public interface IEmergencyService {
Map
<
String
,
Integer
>
getStockEquipStatistics
();
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
equipmentCode
,
String
startTime
,
String
endTime
,
String
fieldKey
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
);
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
equipmentCode
,
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
);
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis
(
String
equipmentCode
,
String
nameKeys
,
String
fieldKey
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificAlarmLogService.java
View file @
5b82d50b
...
...
@@ -37,4 +37,15 @@ public interface IEquipmentSpecificAlarmLogService extends IService<EquipmentSpe
* @return
*/
Map
<
String
,
Object
>
equipAlarmLink
(
String
date
);
/**
* 获取告警Log未消除信息集合
* @param equipmentCode
* @param nameKey
* @param value
* @param isCleanTime
* @param bizOrgCode
* @return
*/
List
<
EquipmentSpecificAlarmLog
>
getAlarmLogInfoList
(
String
equipmentCode
,
String
nameKeys
,
String
value
,
String
isCleanTime
,
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
5b82d50b
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
View file @
5b82d50b
...
...
@@ -66,4 +66,9 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
map
.
put
(
"unCleanAlarmEquipMonthLink"
,
unCleanAlarmEquipMonthLink
);
return
map
;
}
@Override
public
List
<
EquipmentSpecificAlarmLog
>
getAlarmLogInfoList
(
String
equipmentCode
,
String
nameKeys
,
String
value
,
String
isCleanTime
,
String
bizOrgCode
)
{
return
equipmentSpecificAlarmLogMapper
.
getAlarmLogInfoList
(
equipmentCode
,
nameKeys
,
value
,
isCleanTime
,
bizOrgCode
);
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmLogMapper.xml
View file @
5b82d50b
...
...
@@ -243,4 +243,34 @@
ORDER BY
ta.`date`
</select>
<select
id=
"getAlarmLogInfoList"
resultType=
"com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog"
>
SELECT
*
FROM
wl_equipment_specific_alarm_log wesal
<where>
<if
test=
"equipmentCode != null and equipmentCode != ''"
>
AND wesal.equipment_code LIKE CONCAT( #{equipmentCode},'%')
</if>
<if
test=
"nameKeys != null and nameKeys.split(',').length >0"
>
AND wesal.equipment_specific_index_key IN
<foreach
collection=
"nameKeys.split(',')"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"value != null and value != ''"
>
AND wesal.equipment_specific_index_value = #{value}
</if>
<if
test=
"isCleanTime != null and isCleanTime = 'false'"
>
AND wesal.clean_time IS NULL
</if>
<if
test=
"isCleanTime != null and isCleanTime = 'true'"
>
AND wesal.clean_time IS NOT NULL
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND wesal.biz_org_code LIKE CONCAT( #{bizOrgCode},'%')
</if>
</where>
ORDER BY wesal.create_date DESC
</select>
</mapper>
\ No newline at end of file
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