Merge remote-tracking branch 'origin/master'

master
gj.liu 2 years ago
commit fb11e09c8d

@ -12,7 +12,7 @@ public class TermAndChannelDto {
private Integer termid; private Integer termid;
private List<TermChannelAndMapperDto> channellist; private List<TermChannelAndMapperDto> list;
} }

@ -39,6 +39,8 @@ public class TerminalsAndStatusDto implements Serializable {
private Double longitude; private Double longitude;
private Integer status;
private Short signalStrength4g; private Short signalStrength4g;
private BigInteger bootTime; private BigInteger bootTime;

@ -98,6 +98,9 @@ public class TerminalListModel implements Serializable {
@ApiModelProperty(value = "是否在线", example = "213") @ApiModelProperty(value = "是否在线", example = "213")
private boolean isonline; private boolean isonline;
@ApiModelProperty(value = "是否删除", example = "0--删除1--未删除")
private Integer status;
@ApiModelProperty(value = "通道编号和名称", example = "213") @ApiModelProperty(value = "通道编号和名称", example = "213")
private List<ChannelBeans> list; private List<ChannelBeans> list;

@ -137,18 +137,19 @@
b.name as line_name, b.name as line_name,
b.bs_manufacturer as bs_manufacturer, b.bs_manufacturer as bs_manufacturer,
b.dy_level_id as dy_level_id, b.dy_level_id as dy_level_id,
c.id as term_id, d.id as term_id,
c.tower_id as tower_id, d.tower_id as tower_id,
d.name as tower_name, c.name as tower_name,
c.cmdid as cmdid, d.cmdid as cmdid,
c.equip_name as equip_name, d.equip_name as equip_name,
c.display_name as display_name, d.display_name as display_name,
c.model as model, d.model as model,
e.last_heartbeat as last_heartbeat e.last_heartbeat as last_heartbeat
from ((((dy_level a left join `lines` b on a.id = b.dy_level_id and b.status = #{status} and a.status = #{status}) from ((((dy_level a left join `lines` b on a.id = b.dy_level_id )
left join towers d on c.tower_id = d.id) left join towers c on b.id = c.line_id )
left join terminals c on b.id = c.line_id and c.status = #{status}) left join terminals d on c.id = d.tower_id )
left join terminal_status e on e.term_id = c.id) left join terminal_status e on e.term_id = d.id)
where b.status = #{status} and a.status = #{status} and c.status = #{status} and d.status = #{status}
</select> </select>
<select id="selectTreeListByChannelId" resultMap="LineAndTerminalNoHeartMap"> <select id="selectTreeListByChannelId" resultMap="LineAndTerminalNoHeartMap">

@ -37,7 +37,11 @@
y.id as dy_id y.id as dy_id
from `lines` x, from `lines` x,
dy_level y dy_level y
where x.dy_level_id = y.id and x.status = #{status} order by x.create_time desc where x.dy_level_id = y.id
<if test="status != null">
and x.status = #{status}
</if>
order by x.create_time desc
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select

@ -72,7 +72,9 @@
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from terminal_channels from terminal_channels
<if test="status != null">
where status = #{status} where status = #{status}
</if>
</select> </select>
<select id="selectTermChannelList" resultMap="TermAndChannelMap"> <select id="selectTermChannelList" resultMap="TermAndChannelMap">

@ -38,6 +38,7 @@
<result column="bs_identifier" jdbcType="VARCHAR" property="bsIdentifier"/> <result column="bs_identifier" jdbcType="VARCHAR" property="bsIdentifier"/>
<result column="latitude" jdbcType="DOUBLE" property="latitude"/> <result column="latitude" jdbcType="DOUBLE" property="latitude"/>
<result column="longitude" jdbcType="DOUBLE" property="longitude"/> <result column="longitude" jdbcType="DOUBLE" property="longitude"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="signal_strength_4g" jdbcType="SMALLINT" property="signalStrength4g"/> <result column="signal_strength_4g" jdbcType="SMALLINT" property="signalStrength4g"/>
<result column="boot_time" jdbcType="INTEGER" property="bootTime"/> <result column="boot_time" jdbcType="INTEGER" property="bootTime"/>
<result column="battery_capacity" jdbcType="FLOAT" property="batteryCapacity"/> <result column="battery_capacity" jdbcType="FLOAT" property="batteryCapacity"/>
@ -64,7 +65,10 @@
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from terminals from terminals
<if test="status != null">
where status = #{status} where status = #{status}
</if>
</select> </select>
<select id="selectById" resultMap="BaseResultMap"> <select id="selectById" resultMap="BaseResultMap">
@ -132,6 +136,7 @@
a.bs_identifier as bs_identifier, a.bs_identifier as bs_identifier,
a.latitude as latitude, a.latitude as latitude,
a.longitude as longitude, a.longitude as longitude,
a.status as status,
b.signal_strength_4g as signal_strength_4g, b.signal_strength_4g as signal_strength_4g,
b.boot_time as boot_time, b.boot_time as boot_time,
b.battery_capacity as battery_capacity, b.battery_capacity as battery_capacity,
@ -140,7 +145,7 @@
from from
(terminals a left join terminal_status b on a.id = b.term_id ) (terminals a left join terminal_status b on a.id = b.term_id )
<if test="status != null"> <if test="status != null">
a.status = #{status} where a.status = #{status}
</if> </if>
order by a.create_time desc order by a.create_time desc
</select> </select>

@ -25,7 +25,12 @@
t.status as status t.status as status
from towers t, from towers t,
`lines` l `lines` l
where t.line_id = l.id and t.status = #{status,jdbcType=INTEGER} order by t.`order` asc,l.id desc where t.line_id = l.id
<if test="status != null">
and t.status = #{status,jdbcType=INTEGER}
</if>
order by t.`order` asc,l.id desc
</select> </select>
<select id="selectAllByLineid" resultType="com.shxy.xymanager_common.entity.Towers"> <select id="selectAllByLineid" resultType="com.shxy.xymanager_common.entity.Towers">

@ -240,7 +240,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "termchannelMap") @Cacheable(value = "termchannelMap")
public Map<Integer, TerminalChannels> getTermChannelMap() { public Map<Integer, TerminalChannels> getTermChannelMap() {
Map<Integer, TerminalChannels> termchannelMap = new HashMap<Integer, TerminalChannels>(); Map<Integer, TerminalChannels> termchannelMap = new HashMap<Integer, TerminalChannels>();
List<TerminalChannels> channelslist = terminalChannelsDao.selectChannelList(CommonStatus.EFFECTIVE.value()); List<TerminalChannels> channelslist = terminalChannelsDao.selectChannelList(null);
for (TerminalChannels item : channelslist) { for (TerminalChannels item : channelslist) {
termchannelMap.put(item.getId(), item); termchannelMap.put(item.getId(), item);
} }
@ -251,7 +251,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "termAndchannelMap") @Cacheable(value = "termAndchannelMap")
public Map<Integer, TermAndChannelDto> getTermAndChannelMap() { public Map<Integer, TermAndChannelDto> getTermAndChannelMap() {
Map<Integer, TermAndChannelDto> termchannelMap = new HashMap<Integer, TermAndChannelDto>(); Map<Integer, TermAndChannelDto> termchannelMap = new HashMap<Integer, TermAndChannelDto>();
List<TermAndChannelDto> list = terminalChannelsDao.selectTermChannelList(CommonStatus.EFFECTIVE.value()); List<TermAndChannelDto> list = terminalChannelsDao.selectTermChannelList(null);
for (TermAndChannelDto item : list) { for (TermAndChannelDto item : list) {
termchannelMap.put(item.getTermid(), item); termchannelMap.put(item.getTermid(), item);
} }
@ -263,7 +263,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "towerMap") @Cacheable(value = "towerMap")
public Map<Integer, TowerDto> getTowerMap() { public Map<Integer, TowerDto> getTowerMap() {
Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>(); Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>();
List<TowerDto> towerlist = towerDao.selectAll(CommonStatus.EFFECTIVE.value()); List<TowerDto> towerlist = towerDao.selectAll(null);
for (TowerDto item : towerlist) { for (TowerDto item : towerlist) {
towerMap.put(item.getId(), item); towerMap.put(item.getId(), item);
} }
@ -274,7 +274,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "terminalMap") @Cacheable(value = "terminalMap")
public Map<Integer, Terminals> getTerminalMap() { public Map<Integer, Terminals> getTerminalMap() {
Map<Integer, Terminals> terminalMap = new HashMap<Integer, Terminals>(); Map<Integer, Terminals> terminalMap = new HashMap<Integer, Terminals>();
List<Terminals> termslist = terminalsDao.selectAll(CommonStatus.EFFECTIVE.value()); List<Terminals> termslist = terminalsDao.selectAll(null);
for (Terminals item : termslist) { for (Terminals item : termslist) {
terminalMap.put(item.getId(), item); terminalMap.put(item.getId(), item);
} }
@ -285,7 +285,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "lineMap") @Cacheable(value = "lineMap")
public Map<Integer, LineAndDyNameDto> getLineMap() { public Map<Integer, LineAndDyNameDto> getLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>(); Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(CommonStatus.EFFECTIVE.value()); List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) { for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
lineMap.put(lineitem.getId(), lineitem); lineMap.put(lineitem.getId(), lineitem);
} }
@ -353,7 +353,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "termchannelMap") @CachePut(value = "termchannelMap")
public Map<Integer, TerminalChannels> updateTermChannelMap() { public Map<Integer, TerminalChannels> updateTermChannelMap() {
Map<Integer, TerminalChannels> termchannelMap = new HashMap<Integer, TerminalChannels>(); Map<Integer, TerminalChannels> termchannelMap = new HashMap<Integer, TerminalChannels>();
List<TerminalChannels> channelslist = terminalChannelsDao.selectChannelList(CommonStatus.EFFECTIVE.value()); List<TerminalChannels> channelslist = terminalChannelsDao.selectChannelList(null);
for (TerminalChannels item : channelslist) { for (TerminalChannels item : channelslist) {
termchannelMap.put(item.getId(), item); termchannelMap.put(item.getId(), item);
} }
@ -364,7 +364,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "termAndchannelMap") @CachePut(value = "termAndchannelMap")
public Map<Integer, TermAndChannelDto> updateTermAndChannelMap() { public Map<Integer, TermAndChannelDto> updateTermAndChannelMap() {
Map<Integer, TermAndChannelDto> termchannelMap = new HashMap<Integer, TermAndChannelDto>(); Map<Integer, TermAndChannelDto> termchannelMap = new HashMap<Integer, TermAndChannelDto>();
List<TermAndChannelDto> list = terminalChannelsDao.selectTermChannelList(CommonStatus.EFFECTIVE.value()); List<TermAndChannelDto> list = terminalChannelsDao.selectTermChannelList(null);
for (TermAndChannelDto item : list) { for (TermAndChannelDto item : list) {
termchannelMap.put(item.getTermid(), item); termchannelMap.put(item.getTermid(), item);
} }
@ -375,7 +375,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "towerMap") @CachePut(value = "towerMap")
public Map<Integer, TowerDto> updateTowerMap() { public Map<Integer, TowerDto> updateTowerMap() {
Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>(); Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>();
List<TowerDto> towerlist = towerDao.selectAll(CommonStatus.EFFECTIVE.value()); List<TowerDto> towerlist = towerDao.selectAll(null);
for (TowerDto item : towerlist) { for (TowerDto item : towerlist) {
towerMap.put(item.getId(), item); towerMap.put(item.getId(), item);
} }
@ -386,7 +386,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "terminalMap") @CachePut(value = "terminalMap")
public Map<Integer, Terminals> updateTerminalMap() { public Map<Integer, Terminals> updateTerminalMap() {
Map<Integer, Terminals> terminalMap = new HashMap<Integer, Terminals>(); Map<Integer, Terminals> terminalMap = new HashMap<Integer, Terminals>();
List<Terminals> termslist = terminalsDao.selectAll(CommonStatus.EFFECTIVE.value()); List<Terminals> termslist = terminalsDao.selectAll(null);
for (Terminals item : termslist) { for (Terminals item : termslist) {
terminalMap.put(item.getId(), item); terminalMap.put(item.getId(), item);
} }
@ -397,7 +397,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "lineMap") @CachePut(value = "lineMap")
public Map<Integer, LineAndDyNameDto> updateLineMap() { public Map<Integer, LineAndDyNameDto> updateLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>(); Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(CommonStatus.EFFECTIVE.value()); List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) { for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
lineMap.put(lineitem.getId(), lineitem); lineMap.put(lineitem.getId(), lineitem);
} }

@ -16,7 +16,6 @@ import com.shxy.xymanager_common.vo.TerminalAlarmIdVo;
import com.shxy.xymanager_common.vo.TerminalAlarmSelectVo; import com.shxy.xymanager_common.vo.TerminalAlarmSelectVo;
import com.shxy.xymanager_common.vo.UpdateTerminalAlarmParamsVo; import com.shxy.xymanager_common.vo.UpdateTerminalAlarmParamsVo;
import com.shxy.xymanager_dao.dao.*; import com.shxy.xymanager_dao.dao.*;
import com.shxy.xymanager_service.cache.XyCache;
import com.shxy.xymanager_service.service.CacheService; import com.shxy.xymanager_service.service.CacheService;
import com.shxy.xymanager_service.service.TerminalAlarmService; import com.shxy.xymanager_service.service.TerminalAlarmService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -120,6 +119,7 @@ public class TerminalAlarmServiceImpl implements TerminalAlarmService {
PageUtils.SetPage(pageindex, pagesize); PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(termidlist, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end)); list = terminalImgAlarmsDao.selectAlarmsDetails(termidlist, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
} }
log.info("告警信息列表数据:" + list.toString());
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap(); Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();

@ -86,7 +86,7 @@ public class TerminalServiceImpl implements TerminalService {
int pageindex = vo.getPageindex(); int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize(); int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize); PageUtils.SetPage(pageindex, pagesize);
List<TerminalsAndStatusDto> list2 = terminalsDao.selectTermAndStatusList(CommonStatus.EFFECTIVE.value()); List<TerminalsAndStatusDto> list2 = terminalsDao.selectTermAndStatusList(null);
boolean empty = CollectionUtil.isEmpty(list2); boolean empty = CollectionUtil.isEmpty(list2);
if (empty) { if (empty) {
model.setList(new ArrayList<>()); model.setList(new ArrayList<>());
@ -100,9 +100,12 @@ public class TerminalServiceImpl implements TerminalService {
Integer towerid = item.getTowerid(); Integer towerid = item.getTowerid();
terminalsBean.setId(item.getId()); terminalsBean.setId(item.getId());
terminalsBean.setTowerId(towerid); terminalsBean.setTowerId(towerid);
terminalsBean.setTowerName(towerMap.get(towerid).getName()); TowerDto towerDto = towerMap.get(towerid);
terminalsBean.setLineId(towerMap.get(towerid).getLineId()); if (BeanUtil.isNotEmpty(towerDto)) {
terminalsBean.setLineName(towerMap.get(towerid).getLineName()); terminalsBean.setTowerName(towerDto.getName());
terminalsBean.setLineId(towerDto.getLineId());
terminalsBean.setLineName(towerDto.getLineName());
}
terminalsBean.setCmdId(item.getCmdid()); terminalsBean.setCmdId(item.getCmdid());
terminalsBean.setOrgId(item.getOrgId()); terminalsBean.setOrgId(item.getOrgId());
terminalsBean.setEquipName(item.getEquipName()); terminalsBean.setEquipName(item.getEquipName());
@ -120,6 +123,7 @@ public class TerminalServiceImpl implements TerminalService {
terminalsBean.setBatteryCapacity(item.getBatteryCapacity()); terminalsBean.setBatteryCapacity(item.getBatteryCapacity());
terminalsBean.setBatteryVoltage(item.getBatteryVoltage()); terminalsBean.setBatteryVoltage(item.getBatteryVoltage());
terminalsBean.setLastHeartbeat(item.getLastHeartbeat()); terminalsBean.setLastHeartbeat(item.getLastHeartbeat());
terminalsBean.setStatus(item.getStatus());
boolean b = TerminalUtils.judgeTerminalStatus(item.getLastHeartbeat()); boolean b = TerminalUtils.judgeTerminalStatus(item.getLastHeartbeat());
terminalsBean.setIsonline(b); terminalsBean.setIsonline(b);
TermAndChannelDto termAndChannelDto = termAndChannelMap.get(item.getId()); TermAndChannelDto termAndChannelDto = termAndChannelMap.get(item.getId());
@ -127,7 +131,7 @@ public class TerminalServiceImpl implements TerminalService {
if (BeanUtil.isEmpty(termAndChannelDto)) { if (BeanUtil.isEmpty(termAndChannelDto)) {
terminalsBean.setList(list); terminalsBean.setList(list);
} else { } else {
List<TermChannelAndMapperDto> channellist = termAndChannelDto.getChannellist(); List<TermChannelAndMapperDto> channellist = termAndChannelDto.getList();
if (CollectionUtil.isEmpty(channellist)) { if (CollectionUtil.isEmpty(channellist)) {
terminalsBean.setList(list); terminalsBean.setList(list);
} else { } else {

Loading…
Cancel
Save