Commit c26e0e3f authored by xixinzhao's avatar xixinzhao

扫描空指针漏洞修复

parent 2b5905e7
......@@ -195,7 +195,9 @@ public class WordTemplateUtils {
e.printStackTrace();
} finally {
try {
if (null != in) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
......
......@@ -282,7 +282,8 @@ public class ConfigureController extends AbstractBaseController {
unit = fireFightingSystemMapper.getWaterlevelUnit(s, "FHS_WirelessliquidDetector_WaterLevel");
}
}
if (!ObjectUtils.isEmpty(unit) && ("CM".equals(unit.get("unit")) || "cm".equals(unit.get("unit")) || "厘米".equals(unit.get("unit")))){
if (!ObjectUtils.isEmpty(unit)){
if (("CM".equals(unit.get("unit")) || "cm".equals(unit.get("unit")) || "厘米".equals(unit.get("unit")))) {
BigDecimal divide = new BigDecimal(100);
if (!ObjectUtils.isEmpty(record.get("nowLevel")) && !"--".equals(record.get("nowLevel"))){
BigDecimal nowLevel = new BigDecimal(String.valueOf(record.get("nowLevel")));
......@@ -294,6 +295,7 @@ public class ConfigureController extends AbstractBaseController {
}
}
}
}
return CommonResponseUtil.success(waterInfo);
}
@PersonIdentify
......
......@@ -389,9 +389,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
}
if (isBatch == 1 && CollectionUtils.isNotEmpty(list)) {
list.stream().forEach(x ->{
list.forEach(x ->{
if (!ObjectUtils.isEmpty(x)) {
webMqttHandler.publish(TopicEnum.EQYQR.getTopic(), JSON.parseObject(JSON.toJSONString(x), HashMap.class));
x.setAlarmReason(ent.getAlarmReason());
}
// syncConfirmAlarmMsgToSystemctl(x);
});
} else {
......
......@@ -629,17 +629,17 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
besidesMap.put(alterId, String.valueOf(alertCalled.getSequenceNbr()));
}
if(alertWay.equals(AlertBusinessTypeEnum.警情初报.getCode())) {
if(alertWay.equals(AlertBusinessTypeEnum.警情初报.getCode()) && alertCalled != null && alertCalled.getCallTime() != null) {
alertCalledAction.sendAlertCalleCmd(smsCode, mobiles, smsParams);
besidesMap.put(sendTime, DateUtils.dateFormat(alertCalled.getCallTime(), DateUtils.DATE_TIME_PATTERN));
pushPowerTransferToAppAndWeb(AlertBusinessTypeEnum.警情初报.getCode(),besidesMap,smsParams,usIds, null);
} else {
if(alertWay.equals(AlertBusinessTypeEnum.警情续报.getCode())) {
if(alertWay.equals(AlertBusinessTypeEnum.警情续报.getCode()) && alertCalled != null && alertCalled.getCallTime() != null) {
besidesMap.put(sendTime, DateUtils.dateFormat(alertCalled.getCallTime(), DateUtils.DATE_TIME_PATTERN));
pushPowerTransferToAppAndWeb(AlertBusinessTypeEnum.警情续报.getCode(),besidesMap,smsParams,usIds, null);
}
if(alertWay.equals(AlertBusinessTypeEnum.警情结案.getCode())) {
if(alertWay.equals(AlertBusinessTypeEnum.警情结案.getCode()) && alertCalled != null && alertCalled.getCallTime() != null && alertCalled.getRecDate() != null) {
besidesMap.put("startTime", DateUtils.dateFormat(alertCalled.getCallTime(), DateUtils.DATE_TIME_PATTERN));
besidesMap.put("endTime", DateUtils.dateFormat(alertCalled.getRecDate(), DateUtils.DATE_TIME_PATTERN));
pushPowerTransferToAppAndWeb(AlertBusinessTypeEnum.警情结案.getCode(),besidesMap,smsParams,usIds, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment