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
a7f09376
Commit
a7f09376
authored
Feb 28, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高斯同步空值判断
parent
8849803c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
StringUtil.java
...java/com/yeejoin/equipmanage/common/utils/StringUtil.java
+8
-1
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+12
-12
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/StringUtil.java
View file @
a7f09376
...
...
@@ -4,7 +4,7 @@ import java.math.BigDecimal;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
org.springframework.util.
Assert
;
import
org.springframework.util.
ObjectUtils
;
import
com.yeejoin.equipmanage.common.vo.QRCodeRequest
;
...
...
@@ -95,6 +95,13 @@ public class StringUtil {
}
return
0
;
}
public
static
String
toNotEmptyString
(
String
s
)
{
if
(
ObjectUtils
.
isEmpty
(
s
))
{
return
""
;
}
return
s
;
}
/**
* 截取前后都不是0的数字字符串
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
a7f09376
...
...
@@ -1241,22 +1241,22 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentAlarmLogs
.
forEach
(
action
->{
FireEquipmentFireAlarm
alarm
=
new
FireEquipmentFireAlarm
();
BeanUtils
.
copyProperties
(
action
,
alarm
);
alarm
.
setAliasname
(
action
.
getEquipmentSpecificIndexName
(
));
alarm
.
setEquipmentMeasurementId
(
action
.
getEquipmentIndexId
().
toString
(
));
alarm
.
setEquipmentMeasurementMRid
(
action
.
getEquipmentIndexId
().
toString
(
));
alarm
.
setFieldLabel
(
action
.
getEquipmentSpecificIndexKey
(
));
alarm
.
setFieldName
(
action
.
getEquipmentSpecificIndexName
(
));
alarm
.
setFireEquipmentId
(
action
.
getEquipmentSpecificId
().
toString
(
));
alarm
.
setFireEquipmentMRid
(
action
.
getEquipmentSpecificCode
(
));
alarm
.
setFireEquipmentName
(
action
.
getEquipmentSpecificName
(
));
alarm
.
setAliasname
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificIndexName
()
));
alarm
.
setEquipmentMeasurementId
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentIndexId
().
toString
()
));
alarm
.
setEquipmentMeasurementMRid
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentIndexId
().
toString
()
));
alarm
.
setFieldLabel
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificIndexKey
()
));
alarm
.
setFieldName
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificIndexName
()
));
alarm
.
setFireEquipmentId
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificId
().
toString
()
));
alarm
.
setFireEquipmentMRid
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificCode
()
));
alarm
.
setFireEquipmentName
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificName
()
));
alarm
.
setFrequency
(
1
);
alarm
.
setId
(
action
.
getId
().
toString
(
));
alarm
.
setId
(
StringUtil
.
toNotEmptyString
(
action
.
getId
().
toString
()
));
alarm
.
setMrid
(
action
.
getId
().
toString
());
alarm
.
setName
(
action
.
getEquipmentSpecificIndexName
());
alarm
.
setRecoveryDate
(
action
.
getUpdateDate
());
alarm
.
setStationCode
(
ObjectUtils
.
isEmpty
(
stationInfo
)?
""
:
stationInfo
.
get
(
"stationCode"
));
alarm
.
setStationName
(
ObjectUtils
.
isEmpty
(
stationInfo
)?
""
:
stationInfo
.
get
(
"stationName"
));
alarm
.
setValue
(
action
.
getEquipmentSpecificIndexValue
(
));
alarm
.
setStationCode
(
StringUtil
.
toNotEmptyString
(
stationInfo
.
get
(
"stationCode"
)
));
alarm
.
setStationName
(
StringUtil
.
toNotEmptyString
(
stationInfo
.
get
(
"stationName"
)
));
alarm
.
setValue
(
StringUtil
.
toNotEmptyString
(
action
.
getEquipmentSpecificIndexValue
()
));
alarmList
.
add
(
alarm
);
});
return
alarmList
;
...
...
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