Commit 0ebbadfa authored by KeYong's avatar KeYong

修改建筑树bug

parent 0f9bbc4e
......@@ -865,10 +865,10 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
// 报警表新增信息
if (ObjectUtils.isEmpty(indexAlarms) && (TrueOrFalseEnum.real.value.equals(equipmentSpcIndex.getValue()))) {
addEquipmentSpecificAlarm(equipmentSpecificAlarms, equipmentSpcIndex, equipmentSpecificAlarm);
equipmentSpecificAlarms = addEquipmentSpecificAlarm(equipmentSpecificAlarms, equipmentSpcIndex, equipmentSpecificAlarm);
} else {
// 报警表更新信息
indexAlarms.forEach(action -> {
for (EquipmentSpecificAlarm action : indexAlarms) {
if (TrueOrFalseEnum.real.value.equals(equipmentSpcIndex.getValue())) {
// 报警,修改发生频率
action.setFrequency((action.getFrequency() + 1));
......@@ -887,9 +887,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 冗余字段,alarm_log表更新时使用
action.setEquipmentSpecificCode(equipmentSpcIndex.getEquipmentSpecificCode());
equipmentSpecificAlarms.add(action);
});
};
}
return equipmentSpecificAlarms;
}
......
......@@ -489,17 +489,6 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
relationRedisUtil.delSysRedisKey(fireFightSysIdsBuffer.toString());
}
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
List<EquipmentSpecificVo> data = equipmentSpecificMapper.getEquipOrCarByIotCode(null);
if (redisUtils.hasKey("equipAndCarIotCodes")) {
redisUtils.del("equipAndCarIotCodes");
}
redisUtils.set("equipAndCarIotCodes", JSONObject.toJSONString(data));
}
});
} catch (Exception e) {
//处理异常 返回 成功失败条数
e.printStackTrace();
......@@ -511,6 +500,12 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
String[] split = errBufferName.toString().split(",");
String date="上传成功:"+(equipmentDetailDownloadVOS.size()-(split!=null?split.length:0))+"条---上传失败:"+(split!=null?split.length:0)+"条(失败编号:"+errBufferName+"详情:"+erryy+")";
log.error(date);
// 刷新redis中iotCode值
List<EquipmentSpecificVo> data = equipmentSpecificMapper.getEquipOrCarByIotCode(null);
if (redisUtils.hasKey("equipAndCarIotCodes")) {
redisUtils.del("equipAndCarIotCodes");
}
redisUtils.set("equipAndCarIotCodes", JSONObject.toJSONString(data));
return date;
}
......
......@@ -35,7 +35,7 @@
</select>
<select id="getStation" resultType="Map">
SELECT * FROM cb_org_usr WHERE biz_org_code = #{stationCode}
SELECT * FROM cb_org_usr WHERE biz_org_code = #{stationCode} AND biz_org_type = 'COMPANY'
</select>
......
......@@ -265,7 +265,7 @@
( select id from wl_warehouse_structure where parent_id in(
select id from wl_warehouse_structure where parent_id = #{instanceId})
union
select id from wl_warehouse_structure where parent_id = #{instanceId}or
select id from wl_warehouse_structure where parent_id = #{instanceId} or
id = #{instanceId} )
</if>
) as da
......@@ -308,7 +308,7 @@
select id from wl_warehouse_structure where parent_id in(
select id from wl_warehouse_structure where parent_id = #{instanceId})
union
select id from wl_warehouse_structure where parent_id = #{instanceId}or
select id from wl_warehouse_structure where parent_id = #{instanceId} or
id = #{instanceId}
)
</if>
......
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