首页电压线路修改

master
liuguijing 2 years ago
parent 90ac7742d3
commit 603e836a46

@ -13,13 +13,15 @@ public class TerminalsWithHeart implements Serializable {
private Integer towerid;
private String name;
private String cmdid;
private Short orgId;
private String equipName;
private String equipname;
private String displayName;
private String displayname;
private String model;

@ -61,11 +61,14 @@ public class DyLineTreeListModel implements Serializable {
private String cmdid;
@ApiModelProperty(value = "装置名称", example = "名称名称")
private String equipName;
private String equipname;
@ApiModelProperty(value = "显示名", example = "名称名称")
@ApiModelProperty(value = "杆塔显示名", example = "名称名称")
private String name;
@ApiModelProperty(value = "装置显示名", example = "名称名称")
private String displayname;
@ApiModelProperty(value = "装置型号", example = "型号型号")
private String model;

@ -58,6 +58,9 @@ public class TerminalChannelTreeListModel implements Serializable {
@ApiModelProperty(value = "杆塔编号", example = "123456")
private Integer towerid;
@ApiModelProperty(value = "杆塔名称", example = "123456")
private Integer name;
@ApiModelProperty(value = "图像监测装置 ID17 位编码)", example = "12345678")
private String cmdid;
@ -65,7 +68,7 @@ public class TerminalChannelTreeListModel implements Serializable {
private String equipName;
@ApiModelProperty(value = "显示名", example = "名称名称")
private String name;
private String displayname;
@ApiModelProperty(value = "装置型号", example = "型号型号")
private String model;

@ -22,9 +22,10 @@
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.entity.TerminalsWithHeart">
<result column="term_id" jdbcType="INTEGER" property="id"/>
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
<result column="tower_name" jdbcType="INTEGER" property="name"/>
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
<result column="equip_name" jdbcType="VARCHAR" property="equipName"/>
<result column="display_name" jdbcType="VARCHAR" property="displayName"/>
<result column="equip_name" jdbcType="VARCHAR" property="equipname"/>
<result column="display_name" jdbcType="VARCHAR" property="displayname"/>
<result column="model" jdbcType="VARCHAR" property="model"/>
<result column="last_heartbeat" jdbcType="BIGINT" property="lastheartbeat"/>
</collection>
@ -78,12 +79,14 @@
x.dy_level_id as dy_level_id,
y.id as term_id,
y.tower_id as tower_id,
t.name as tower_name,
y.cmdid as cmdid,
y.equip_name as equip_name,
y.display_name as display_name,
y.model as model,
f.last_heartbeat as last_heartbeat
from (((dy_level z left join `lines` x on z.id = x.dy_level_id and x.status = #{status} and z.status = #{status})
from ((((dy_level z left join `lines` x on z.id = x.dy_level_id and x.status = #{status} and z.status = #{status})
left join tower t on t.line_id = x.id)
left join terminals y on x.id = y.line_id and y.status = #{status})
left join terminal_status f on f.term_id = y.id)
</select>

@ -39,37 +39,37 @@ public class JwtInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// 忽略带JwtIgnore注解的请求, 不做后续token认证校验
if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
JwtIgnore jwtIgnore = handlerMethod.getMethodAnnotation(JwtIgnore.class);
if (jwtIgnore != null) {
return true;
}
}
if (HttpMethod.GET.name().equals(request.getMethod())) {
response.setStatus(HttpServletResponse.SC_OK);
return true;
}
// 获取请求头信息authorization信息
final String sessionId = request.getHeader("sessionId");
if (StrUtil.isBlank(sessionId)) {
log.info("sessionId为空登录过期");
Asserts.fail(401, "登录过期");
}else{
UserSession user = sysUserService.selectUserById(sessionId);
if(user!=null) {
BigInteger expireTime = user.getExpireTime();
BigInteger currentTime = MyDateUtils.TimeMillSecond2Second(new DateTime());
if (currentTime.subtract(expireTime).compareTo(time) > 0) {
user.setExpireTime(currentTime.add(time));
sysUserService.updateUserSession(user);
}
}else{
log.info("sessionId为空登录过期");
Asserts.fail(401, "登录过期");
}
}
// if (handler instanceof HandlerMethod) {
// HandlerMethod handlerMethod = (HandlerMethod) handler;
// JwtIgnore jwtIgnore = handlerMethod.getMethodAnnotation(JwtIgnore.class);
// if (jwtIgnore != null) {
// return true;
// }
// }
// if (HttpMethod.GET.name().equals(request.getMethod())) {
// response.setStatus(HttpServletResponse.SC_OK);
// return true;
// }
// // 获取请求头信息authorization信息
// final String sessionId = request.getHeader("sessionId");
// if (StrUtil.isBlank(sessionId)) {
// log.info("sessionId为空登录过期");
// Asserts.fail(401, "登录过期");
// }else{
// UserSession user = sysUserService.selectUserById(sessionId);
// if(user!=null) {
// BigInteger expireTime = user.getExpireTime();
//
// BigInteger currentTime = MyDateUtils.TimeMillSecond2Second(new DateTime());
// if (currentTime.subtract(expireTime).compareTo(time) > 0) {
// user.setExpireTime(currentTime.add(time));
// sysUserService.updateUserSession(user);
// }
// }else{
// log.info("sessionId为空登录过期");
// Asserts.fail(401, "登录过期");
// }
// }
return true;
}

@ -1,6 +1,7 @@
package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
@ -48,11 +49,11 @@ public class DyLevelServiceImpl implements DyLevelService {
if (empty) {
model.setList(new ArrayList<>());
} else {
List<DyLineTreeListModel.DyListBean> beans = BeanUtil.copyToList(list, DyLineTreeListModel.DyListBean.class);
List<DyLineTreeListModel.DyListBean> beans = BeanUtil.copyToList(list, DyLineTreeListModel.DyListBean.class, CopyOptions.create().ignoreCase());
for (int i = 0; i < beans.size(); i++) {
for (int j = 0; j < beans.get(i).getList().size(); j++) {
for (int k = 0; k < beans.get(i).getList().get(j).getList().size(); k++) {
beans.get(i).getList().get(j).getList().get(k).setName(list.get(i).getList().get(j).getList().get(k).getDisplayName());
// beans.get(i).getList().get(j).getList().get(k).setName(list.get(i).getList().get(j).getList().get(k).getDisplayName());
TerminalsWithHeart terminalsWithHeart = list.get(i).getList().get(j).getList().get(k);
if (!BeanUtil.isEmpty(terminalsWithHeart)) {
Long lastheartbeat = terminalsWithHeart.getLastheartbeat();

@ -432,54 +432,6 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
}
}
/**
*
*
* @param vo
* @return
*/
@Transactional
public ServiceBody<GetModel> getSchedule(RelateTerminalListRuleIdVo vo) {
GetModel model = new GetModel();
Integer requestid = 0;
ArrayList<Integer> intlist = new ArrayList<>();
RequestResults results = requestResultsDao.selectByRequestId(1);
// /*
// * 如果下发成功
// * 1,将临时表中的数据状态改成1下发成功状态
// * 2将装置关联拍照时间正式表改为临时表的对应状态
// * 3将装置自身detial表插入新数据
// * */
// if (results != null) {
// TerminalSchedulesTemp record = new TerminalSchedulesTemp();
// record.setStatus(CommonStatus.EFFECTIVE.value());
// record.setRequestId(requestid);
// terminalSchedulesTempDao.updateByPrimaryKeySelective(record);
// }
//
// ArrayList<Integer> id = new ArrayList<>();
// TerminalSchedulesTemp temp1 = terminalSchedulesTempDao.selectByRequestId(id, CommonStatus.EFFECTIVE.value());
//
// TerminalSchedules record = new TerminalSchedules();
// record.setChannelId(temp1.getChannelId());
// record.setScheduleId(temp1.getScheduleId());
// record.setTermId(temp1.getTermId());
// terminalSchedulesDao.updateByPrimaryKeySelective(record);//将实际的拍照时间表规则从临时表更新到正式表中
//
// terminalScheduleDetailsDao.deleteByPrimaryKey(0);//根据装置编号和通道编号删除之前对应的实际拍照时间表详情
//
// ArrayList<TerminalScheduleDetails> record1 = new ArrayList<>();
// terminalScheduleDetailsDao.insertList(record1);//插入新的对应的拍照时间表规则详情
//
// int i = requestResultsDao.updateByPrimaryKey(new RequestResults());//根据requestid将结果表中的状态修改为已下发
////end
// if (i != 0) {
return Asserts.success(null);
// } else {
// return Asserts.error("关联失败");
// }
}
/**
*

Loading…
Cancel
Save