装置接口修改

dev
liuguijing 1 year ago
parent b4fad6ef05
commit e3ca2eb646

@ -45,3 +45,6 @@ VIEW `v_dy_line_towe_terminals` AS
LEFT JOIN `lines` `b` ON ((`a`.`id` = `b`.`dy_level_id`)))
LEFT JOIN `towers` `c` ON ((`b`.`id` = `c`.`line_id`)))
JOIN `terminals` `d` ON ((`c`.`id` = `d`.`tower_id`)))
ALTER TABLE `xymp`.`sys_users`
ADD COLUMN `notes` VARCHAR(1024) NULL DEFAULT NULL AFTER `password`;

@ -0,0 +1 @@
getdyList

@ -5,8 +5,8 @@ import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.entity.DyLevel;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.util.xinyin.HeaderUtil;
import com.shxy.xymanager_common.vo.DyListVo;
@ -26,6 +26,8 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(value = "电压等级接口", tags = "电压等级接口描述")
@RestController
@ -65,8 +67,8 @@ public class DyLevelController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getdyList")
@Log(title = "获取电压等级列表", type = "查询")
public ResponseReult<DyListModel> getdyList() {
ServiceBody<DyListModel> serviceBody = dyLevelService.getdyList();
public ResponseReult<List<DyLevel>> getdyList() {
ServiceBody<List<DyLevel>> serviceBody = dyLevelService.getdyList();
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -5,9 +5,9 @@ import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.model.LineAndGtAndChannelListModel;
import com.shxy.xymanager_common.model.LineListModel;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.page.TableDataInfo;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_service.service.LineService;
import io.swagger.annotations.Api;
@ -34,8 +34,8 @@ public class LineController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getLineList")
@Log(title = "获取线路列表", type = "查询")
public ResponseReult<LineListModel> getLineList(@RequestBody @Validated SelectVo vo) {
ServiceBody<LineListModel> serviceBody = lineService.getLineList(vo);
public ResponseReult<TableDataInfo<Lines>> getLineList(@RequestBody @Validated SelectVo vo) {
ServiceBody<TableDataInfo<Lines>> serviceBody = lineService.getLineList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -82,7 +82,6 @@ public class SysLoginController {
}
}
/**
*
*

@ -1,12 +1,11 @@
package com.shxy.xymanager_admin.controller;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.annotation.Log;
import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.dto.TerminalsAndStatusDto;
import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals;
import com.shxy.xymanager_common.excelbean.TerminalAndLastPicListExcelModel;
import com.shxy.xymanager_common.excelbean.TerminalListExcelModel;
import com.shxy.xymanager_common.model.*;
@ -43,8 +42,8 @@ public class TerminalController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTerminalList")
@Log(title = "获取设备列表", type = "查询")
public ResponseReult<TableDataInfo<TerminalsAndStatusDto>> getTerminalList(@RequestBody @Validated TerminalSelectVo vo) {
ServiceBody<TableDataInfo<TerminalsAndStatusDto>> serviceBody = terminalService.getTerminalList(vo);
public ResponseReult<TableDataInfo<View_Dy_Line_Tower_Terminals>> getTerminalList(@RequestBody @Validated TerminalSelectVo vo) {
ServiceBody<TableDataInfo<View_Dy_Line_Tower_Terminals>> serviceBody = terminalService.getTerminalList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -1,5 +1,6 @@
package com.shxy.xymanager_admin;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.math.BigInteger;
import java.sql.Array;
import java.sql.Time;
import java.util.ArrayList;
import java.util.Date;
@ -341,6 +343,152 @@ View_Dy_Line_Tower_TerminalsDao view_dy_line_tower_terminalsDao;
// example.createCriteria().andDyIdIn(list);
// List<View_Dy_Line_Tower_Terminals> view_dy_line_tower_terminals = view_dy_line_tower_terminalsDao.selectByExample(example);
// System.out.println(view_dy_line_tower_terminals);
Integer dyid = 1;
Integer lineid = 10;
Integer tower = 12;
String search = "fdsafd";
// View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
// example.setOrderByClause("d.id desc");
// View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
// if (BeanUtil.isNotEmpty(dyid)) {
// criteria.andDyIdEqualTo(dyid);
// }
// if (BeanUtil.isNotEmpty(lineid)) {
// criteria.andLineIdEqualTo(lineid);
// }
// if (BeanUtil.isNotEmpty(tower)) {
// criteria.andTowerIdEqualTo(tower);
// }
// View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
// or.andDyNameLike(search);
// View_Dy_Line_Tower_TerminalsExample.Criteria or1 = example.or();
// or1.andLineNameLike(search);
//
// List<View_Dy_Line_Tower_Terminals> view_dy_line_tower_terminals = view_dy_line_tower_terminalsDao.selectByExample(example);
// System.out.println(view_dy_line_tower_terminals);
// View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
// example.setOrderByClause("id desc");
// View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
// if (BeanUtil.isNotEmpty(dyid)) {
// criteria.andDyIdEqualTo(dyid);
// }
// if (BeanUtil.isNotEmpty(lineid)) {
// criteria.andLineIdEqualTo(lineid);
// }
// if (BeanUtil.isNotEmpty(tower)) {
// criteria.andTowerIdEqualTo(tower);
// }
// if (StrUtil.isNotEmpty(search)) {
// criteria.andDyNameLike(search);
// }
// View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
// if (BeanUtil.isNotEmpty(dyid)) {
// or.andDyIdEqualTo(dyid);
// }
// if (BeanUtil.isNotEmpty(lineid)) {
// or.andLineIdEqualTo(lineid);
// }
// if (BeanUtil.isNotEmpty(tower)) {
// or.andTowerIdEqualTo(tower);
// }
// if (StrUtil.isNotEmpty(search)) {
// or.andLineNameLike(search);
// }
// View_Dy_Line_Tower_TerminalsExample.Criteria toweror = example.or();
// if (BeanUtil.isNotEmpty(dyid)) {
// toweror.andDyIdEqualTo(dyid);
// }
// if (BeanUtil.isNotEmpty(lineid)) {
// toweror.andLineIdEqualTo(lineid);
// }
// if (BeanUtil.isNotEmpty(tower)) {
// toweror.andTowerIdEqualTo(tower);
// }
// if (StrUtil.isNotEmpty(search)) {
// toweror.andTowerNameLike(search);
// }
//
// List<View_Dy_Line_Tower_Terminals> view_dy_line_tower_terminals = view_dy_line_tower_terminalsDao.selectByExample(example);
// System.out.println(view_dy_line_tower_terminals);
String[] array = new String[]{"XYIGQ10C231000009",
"XYIGQ10C231000018",
"XYIGQ10C231000039",
"XYIGQ10C231000125",
"XYIGQ10C231000132",
"XYIGQ10C231000192",
"XYIGQ10C231000202",
"XYIGQ10C231000232",
"XYIGQ10C231000240",
"XYIGQ10C231000268",
"XYIGQ10C231000284",
"XYIGQ10C231000325",
"XYIGQ10C231000357",
"XYIGQ10C231000375",
"XYIGQ10C231000427",
"XYIGQ10C231000501",
"XYIGQ10C231000502",
"XYIGQ10C231000516",
"XYIGQ10C231000520",
"XYIGQ10C231000526",
"XYIGQ10C231000543",
"XYIGQ10C231000546",
"XYIGQ10C231000556",
"XYIGQ10C231000558",
"XYIGQ10C231000561",
"XYIGQ10C231000563",
"XYIGQ10C231000569",
"XYIGQ10C231000571",
"XYIGQ10C231000576",
"XYIGQ10C231000588",
"XYIGQ10C231000592",
"XYIGQ10C231000597",
"XYIGQ10C231000601",
"XYIGQ10C231000605",
"XYIGQ10C231000608",
"XYIGQ10C231000611",
"XYIGQ10C231000613",
"XYIGQ10C231000618",
"XYIGQ10C231000619",
"XYIGQ10C231000621",
"XYIGQ10C231000627",
"XYIGQ10C231000630",
"XYIGQ10C231000633",
"XYIGQ10C231000644",
"XYIGQ10C231000647",
"XYIGQ10C231000663",
"XYIGQ10C231000664",
"XYIGQ10C231000667",
"XYIGQ10C231000668",
"XYIGQ10C231000669",
"XYIGQ10C231000671",
"XYIGQ10C231000674",
"XYIGQ10C231000675",
"XYIGQ10C231000679",
"XYIGQ10C231000681",
"XYIGQ10C231000683",
"XYIGQ10C231000689",
"XYIGQ10C231000692",
"XYIGQ10C231000698",
"XYIGQ10C231000699",
"XYYFV12XJ2403D001",
"XYYFV12XJ2403C002"};
String s = "";
Integer towerd = 0;
for (String item :array) {
towerd++;
// s+= "INSERT INTO `terminals`(id,`line_id`, `tower_id`, `cmdid`) VALUES("+towerd+",1," + towerd + ", '" + item + "');";
s+= "INSERT INTO `terminal_channel_mapper`(`term_id`, `channel_id`) VALUES("+towerd+",1);";
s+= "INSERT INTO `terminal_channel_mapper`(`term_id`, `channel_id`) VALUES("+towerd+",2);";
s+= "INSERT INTO `terminal_channel_mapper`(`term_id`, `channel_id`) VALUES("+towerd+",3);";
}
System.out.println(s);
}
}

@ -0,0 +1,38 @@
package com.shxy.xymanager_admin;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.shxy.xymanager_common.util.MyDateUtils;
import java.math.BigInteger;
import java.util.Date;
public class test {
public static void main(String[] args){
// JSONObject jsonObject = XML.toJSONObject("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
// "<response>\n" +
// "<result code=\"0\" />\n" +
// "<commands>\n" +
// "<command objid=\"26M00090990000987\" type=\"SETCONFIG\">\n" +
// "<action name=\"CAGIP\" value=\"10.144.98.101\" />\n" +
// "<action name=\"CURTIME\" value=\"2011-04-10 22:10:11\" />\n" +
// "</command>\n" +
// "<command objid=\"26M00090990000986\" type=\"SETCONFIG\">\n" +
// "<action name=\"MAINTIME\" value=\"20\" />\n" +
// "<action name=\"SAMPLECOUNT\" value=\"15\" />\n" +
// "</command>\n" +
// "</commands>\n" +
// "</response>");
// JSONObject response = (JSONObject) jsonObject.get("response");
//
// JSONObject result = (JSONObject) response.get("result");
// Integer code = (Integer) result.get("code");
// System.out.println(jsonObject.toString());
// DateTime dateTime = DateUtil.offsetDay(new Date(), -7);
// System.out.println(dateTime);
// BigInteger bigInteger = BigInteger.valueOf(1710432000000l);
// long start = MyDateUtils.TimeMillSecond2Second(DateTime.of(bigInteger.longValue()));
// System.out.println(start);
}
}

@ -4,7 +4,7 @@ import lombok.Data;
@Data
public class DyLineAndTowertDto {
public class DyLineAndTowertDto {
private Integer dyId;

@ -1,23 +0,0 @@
package com.shxy.xymanager_common.dto;
import lombok.Data;
/**
* 线
*/
@Data
public class LineAndDyNameDto {
private Integer id;
private String name;
private String bsManufacturer;
private Integer dyLevelId;
private String dyLevelName;
private Integer status;
}

@ -25,7 +25,7 @@ public class TerminalsAndStatusDto implements Serializable {
@ApiModelProperty(value = "电压编号", example = "123456")
private Integer dyId;
@ApiModelProperty(value = "电压名称", example = "123456")
@ApiModelProperty(value = "电压编号", example = "123456")
private String dyName;
@ApiModelProperty(value = "线路编号", example = "123456")
@ -112,8 +112,8 @@ public class TerminalsAndStatusDto implements Serializable {
@ApiModelProperty(value = "电源电压", example = "213")
private float batteryVoltage;
@ApiModelProperty(value = "最后一次心跳时间", example = "213")
private BigInteger lastHeartbeat;
@ApiModelProperty(value = "最后一次心跳时间", example = "213")
private BigInteger lastHeartbeat;
@ApiModelProperty(value = "在线状态", example = "0--掉线1--在线")
private Integer onlinestatus;

@ -1,8 +1,11 @@
package com.shxy.xymanager_common.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class DevType implements Serializable {
private Integer id;
@ -14,35 +17,4 @@ public class DevType implements Serializable {
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

@ -33,6 +33,9 @@ public class Lines implements Serializable {
private Date updateTime;
@ApiModelProperty(value = "电压等级名称", example = "123456")
private String dyLevelName;
@ApiModelProperty(value = "杆塔信息", example = "123456")
private List<Towers> list = new ArrayList<>();

@ -33,6 +33,8 @@ public class SysUser {
@ApiModelProperty(value="用户昵称", name="nickName")
private String nickName;
private String notes;
@JsonIgnore
private String password;
/**

@ -495,6 +495,76 @@ public class SysUserExample {
return (Criteria) this;
}
public Criteria andNotesIsNull() {
addCriterion("notes is null");
return (Criteria) this;
}
public Criteria andNotesIsNotNull() {
addCriterion("notes is not null");
return (Criteria) this;
}
public Criteria andNotesEqualTo(String value) {
addCriterion("notes =", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotEqualTo(String value) {
addCriterion("notes <>", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThan(String value) {
addCriterion("notes >", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThanOrEqualTo(String value) {
addCriterion("notes >=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThan(String value) {
addCriterion("notes <", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThanOrEqualTo(String value) {
addCriterion("notes <=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLike(String value) {
addCriterion("notes like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotLike(String value) {
addCriterion("notes not like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesIn(List<String> values) {
addCriterion("notes in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesNotIn(List<String> values) {
addCriterion("notes not in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesBetween(String value1, String value2) {
addCriterion("notes between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andNotesNotBetween(String value1, String value2) {
addCriterion("notes not between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;

@ -0,0 +1,691 @@
package com.shxy.xymanager_common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TerminalChannelMapperExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TerminalChannelMapperExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTermIdIsNull() {
addCriterion("term_id is null");
return (Criteria) this;
}
public Criteria andTermIdIsNotNull() {
addCriterion("term_id is not null");
return (Criteria) this;
}
public Criteria andTermIdEqualTo(Integer value) {
addCriterion("term_id =", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdNotEqualTo(Integer value) {
addCriterion("term_id <>", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdGreaterThan(Integer value) {
addCriterion("term_id >", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdGreaterThanOrEqualTo(Integer value) {
addCriterion("term_id >=", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdLessThan(Integer value) {
addCriterion("term_id <", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdLessThanOrEqualTo(Integer value) {
addCriterion("term_id <=", value, "termId");
return (Criteria) this;
}
public Criteria andTermIdIn(List<Integer> values) {
addCriterion("term_id in", values, "termId");
return (Criteria) this;
}
public Criteria andTermIdNotIn(List<Integer> values) {
addCriterion("term_id not in", values, "termId");
return (Criteria) this;
}
public Criteria andTermIdBetween(Integer value1, Integer value2) {
addCriterion("term_id between", value1, value2, "termId");
return (Criteria) this;
}
public Criteria andTermIdNotBetween(Integer value1, Integer value2) {
addCriterion("term_id not between", value1, value2, "termId");
return (Criteria) this;
}
public Criteria andChannelIdIsNull() {
addCriterion("channel_id is null");
return (Criteria) this;
}
public Criteria andChannelIdIsNotNull() {
addCriterion("channel_id is not null");
return (Criteria) this;
}
public Criteria andChannelIdEqualTo(Byte value) {
addCriterion("channel_id =", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdNotEqualTo(Byte value) {
addCriterion("channel_id <>", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdGreaterThan(Byte value) {
addCriterion("channel_id >", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdGreaterThanOrEqualTo(Byte value) {
addCriterion("channel_id >=", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdLessThan(Byte value) {
addCriterion("channel_id <", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdLessThanOrEqualTo(Byte value) {
addCriterion("channel_id <=", value, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdIn(List<Byte> values) {
addCriterion("channel_id in", values, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdNotIn(List<Byte> values) {
addCriterion("channel_id not in", values, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdBetween(Byte value1, Byte value2) {
addCriterion("channel_id between", value1, value2, "channelId");
return (Criteria) this;
}
public Criteria andChannelIdNotBetween(Byte value1, Byte value2) {
addCriterion("channel_id not between", value1, value2, "channelId");
return (Criteria) this;
}
public Criteria andAliasIsNull() {
addCriterion("alias is null");
return (Criteria) this;
}
public Criteria andAliasIsNotNull() {
addCriterion("alias is not null");
return (Criteria) this;
}
public Criteria andAliasEqualTo(String value) {
addCriterion("alias =", value, "alias");
return (Criteria) this;
}
public Criteria andAliasNotEqualTo(String value) {
addCriterion("alias <>", value, "alias");
return (Criteria) this;
}
public Criteria andAliasGreaterThan(String value) {
addCriterion("alias >", value, "alias");
return (Criteria) this;
}
public Criteria andAliasGreaterThanOrEqualTo(String value) {
addCriterion("alias >=", value, "alias");
return (Criteria) this;
}
public Criteria andAliasLessThan(String value) {
addCriterion("alias <", value, "alias");
return (Criteria) this;
}
public Criteria andAliasLessThanOrEqualTo(String value) {
addCriterion("alias <=", value, "alias");
return (Criteria) this;
}
public Criteria andAliasLike(String value) {
addCriterion("alias like", value, "alias");
return (Criteria) this;
}
public Criteria andAliasNotLike(String value) {
addCriterion("alias not like", value, "alias");
return (Criteria) this;
}
public Criteria andAliasIn(List<String> values) {
addCriterion("alias in", values, "alias");
return (Criteria) this;
}
public Criteria andAliasNotIn(List<String> values) {
addCriterion("alias not in", values, "alias");
return (Criteria) this;
}
public Criteria andAliasBetween(String value1, String value2) {
addCriterion("alias between", value1, value2, "alias");
return (Criteria) this;
}
public Criteria andAliasNotBetween(String value1, String value2) {
addCriterion("alias not between", value1, value2, "alias");
return (Criteria) this;
}
public Criteria andPhotoIdIsNull() {
addCriterion("photo_id is null");
return (Criteria) this;
}
public Criteria andPhotoIdIsNotNull() {
addCriterion("photo_id is not null");
return (Criteria) this;
}
public Criteria andPhotoIdEqualTo(Long value) {
addCriterion("photo_id =", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdNotEqualTo(Long value) {
addCriterion("photo_id <>", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdGreaterThan(Long value) {
addCriterion("photo_id >", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdGreaterThanOrEqualTo(Long value) {
addCriterion("photo_id >=", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdLessThan(Long value) {
addCriterion("photo_id <", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdLessThanOrEqualTo(Long value) {
addCriterion("photo_id <=", value, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdIn(List<Long> values) {
addCriterion("photo_id in", values, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdNotIn(List<Long> values) {
addCriterion("photo_id not in", values, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdBetween(Long value1, Long value2) {
addCriterion("photo_id between", value1, value2, "photoId");
return (Criteria) this;
}
public Criteria andPhotoIdNotBetween(Long value1, Long value2) {
addCriterion("photo_id not between", value1, value2, "photoId");
return (Criteria) this;
}
public Criteria andPhotoTimeIsNull() {
addCriterion("photo_time is null");
return (Criteria) this;
}
public Criteria andPhotoTimeIsNotNull() {
addCriterion("photo_time is not null");
return (Criteria) this;
}
public Criteria andPhotoTimeEqualTo(Long value) {
addCriterion("photo_time =", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeNotEqualTo(Long value) {
addCriterion("photo_time <>", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeGreaterThan(Long value) {
addCriterion("photo_time >", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeGreaterThanOrEqualTo(Long value) {
addCriterion("photo_time >=", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeLessThan(Long value) {
addCriterion("photo_time <", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeLessThanOrEqualTo(Long value) {
addCriterion("photo_time <=", value, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeIn(List<Long> values) {
addCriterion("photo_time in", values, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeNotIn(List<Long> values) {
addCriterion("photo_time not in", values, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeBetween(Long value1, Long value2) {
addCriterion("photo_time between", value1, value2, "photoTime");
return (Criteria) this;
}
public Criteria andPhotoTimeNotBetween(Long value1, Long value2) {
addCriterion("photo_time not between", value1, value2, "photoTime");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -23,17 +23,25 @@ public class Terminals implements Serializable {
@ApiModelProperty(value = "装置编号", example = "123456")
private Integer id;
private Integer lineid;
private Integer lineId;
@ApiModelProperty(value = "杆塔编号", example = "123456")
private Integer towerid;
private Integer towerId;
@ApiModelProperty(value = "图像监测装置 ID17 位编码)", example = "12345678")
private String cmdid;
private Short orgId;
private String sn;
private Integer orgId;
private String iccid;
private String phase;
private String equipmentType;
private String cellphone;
@ApiModelProperty(value = "装置名称", example = "名称名称")
private String equipName;
private String displayName;
@ -44,12 +52,8 @@ public class Terminals implements Serializable {
private String bsManufacturer;
private String sim;
private Date bsProductionDate;
private Date workingDate;
private String bsIdentifier;
private Double latitude;
@ -60,6 +64,12 @@ public class Terminals implements Serializable {
private Date updateTime;
private String sim;
private Date workingDate;
private String password;
private Integer onlineStatus;
private BigInteger lastheartbeat;
@ -101,8 +111,6 @@ public class Terminals implements Serializable {
return cmdid;
}
private static final long serialVersionUID = 1L;
}

@ -1,17 +1,35 @@
package com.shxy.xymanager_common.entity;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.util.MyDateUtils;
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
@Data
@ApiModel(value = "设备列表", description = "获取设备列表信息")
public class View_Dy_Line_Tower_Terminals implements Serializable {
@ApiModelProperty(value = "设备编号", example = "123456")
private Integer id;
@ApiModelProperty(value = "电压编号", example = "123456")
private Integer dyId;
@ApiModelProperty(value = "电压编号", example = "123456")
private String dyName;
@ApiModelProperty(value = "线路编号", example = "123456")
private Integer lineId;
@ApiModelProperty(value = "线路名称", example = "123456")
private String lineName;
private String lineBsManufacturer;
@ -32,7 +50,7 @@ public class View_Dy_Line_Tower_Terminals implements Serializable {
private String essentialInfoVersion;
private Byte hasPan;
private Integer hasPan;
private String bsManufacturer;
@ -46,243 +64,51 @@ public class View_Dy_Line_Tower_Terminals implements Serializable {
private Integer status;
@ApiModelProperty(value = "规约编号", example = "21223")
private Integer protocol;
private String sim;
@ApiModelProperty(value = "规约名称", example = "21223")
private String protocolName;
private Date workingDate;
private Byte netType;
private Byte devType;
private String phase;
private String equipmentType;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getDyId() {
return dyId;
}
public void setDyId(Integer dyId) {
this.dyId = dyId;
}
public String getDyName() {
return dyName;
}
public void setDyName(String dyName) {
this.dyName = dyName == null ? null : dyName.trim();
}
public Integer getLineId() {
return lineId;
}
public void setLineId(Integer lineId) {
this.lineId = lineId;
}
public String getLineName() {
return lineName;
}
public void setLineName(String lineName) {
this.lineName = lineName == null ? null : lineName.trim();
}
public String getLineBsManufacturer() {
return lineBsManufacturer;
}
public void setLineBsManufacturer(String lineBsManufacturer) {
this.lineBsManufacturer = lineBsManufacturer == null ? null : lineBsManufacturer.trim();
}
public Integer getTowerId() {
return towerId;
}
public void setTowerId(Integer towerId) {
this.towerId = towerId;
}
public String getTowerName() {
return towerName;
}
public void setTowerName(String towerName) {
this.towerName = towerName == null ? null : towerName.trim();
}
public String getCmdid() {
return cmdid;
}
public void setCmdid(String cmdid) {
this.cmdid = cmdid == null ? null : cmdid.trim();
}
public Short getOrgId() {
return orgId;
}
public void setOrgId(Short orgId) {
this.orgId = orgId;
}
public String getEquipName() {
return equipName;
}
public void setEquipName(String equipName) {
this.equipName = equipName == null ? null : equipName.trim();
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName == null ? null : displayName.trim();
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model == null ? null : model.trim();
}
public String getEssentialInfoVersion() {
return essentialInfoVersion;
}
public void setEssentialInfoVersion(String essentialInfoVersion) {
this.essentialInfoVersion = essentialInfoVersion == null ? null : essentialInfoVersion.trim();
}
public Byte getHasPan() {
return hasPan;
}
public void setHasPan(Byte hasPan) {
this.hasPan = hasPan;
}
public String getBsManufacturer() {
return bsManufacturer;
}
public void setBsManufacturer(String bsManufacturer) {
this.bsManufacturer = bsManufacturer == null ? null : bsManufacturer.trim();
}
public Date getBsProductionDate() {
return bsProductionDate;
}
public void setBsProductionDate(Date bsProductionDate) {
this.bsProductionDate = bsProductionDate;
}
public String getBsIdentifier() {
return bsIdentifier;
}
public void setBsIdentifier(String bsIdentifier) {
this.bsIdentifier = bsIdentifier == null ? null : bsIdentifier.trim();
}
public Double getLatitude() {
return latitude;
}
public void setLatitude(Double latitude) {
this.latitude = latitude;
}
public Double getLongitude() {
return longitude;
}
public void setLongitude(Double longitude) {
this.longitude = longitude;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getProtocol() {
return protocol;
}
public void setProtocol(Integer protocol) {
this.protocol = protocol;
}
public String getSim() {
return sim;
}
public void setSim(String sim) {
this.sim = sim == null ? null : sim.trim();
}
public Date getWorkingDate() {
return workingDate;
}
public void setWorkingDate(Date workingDate) {
this.workingDate = workingDate;
}
@ApiModelProperty(value = "sim卡号", example = "123456")
private String sim;
public Byte getNetType() {
return netType;
}
@ApiModelProperty(value = "网络类型", example = "网络类型")
private Integer netType;
public void setNetType(Byte netType) {
this.netType = netType;
}
public Byte getDevType() {
return devType;
}
public void setDevType(Byte devType) {
this.devType = devType;
}
@ApiModelProperty(value = "网络类型", example = "网络类型")
private Integer devType;
public String getPhase() {
return phase;
}
@ApiModelProperty(value = "设备名称", example = "123456")
private String devName;
public void setPhase(String phase) {
this.phase = phase == null ? null : phase.trim();
}
private String phase;
public String getEquipmentType() {
return equipmentType;
}
private String equipmentType;
public void setEquipmentType(String equipmentType) {
this.equipmentType = equipmentType == null ? null : equipmentType.trim();
}
@ApiModelProperty(value = "最后一次心跳时间", example = "213")
private BigInteger lastHeartbeat;
@ApiModelProperty(value = "在线状态", example = "0--掉线1--在线")
private Integer onlinestatus;
public Integer getOnlinestatus() {
if (lastHeartbeat == null) {
return CommonStatus.DELETE.value();
}
long time = MyDateUtils.TimeSecond2MillSecond(lastHeartbeat.longValue());
DateTime date = MyDateUtils.date(time);
long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE);
if (between > TerminalUtils.hearttime) {
return CommonStatus.DELETE.value();
} else {
return CommonStatus.EFFECTIVE.value();
}
}
@ApiModelProperty(value = "通道编号和名称", example = "213")
private List<TerminalChannels> list;
private static final long serialVersionUID = 1L;
}

@ -1951,6 +1951,66 @@ public class View_Dy_Line_Tower_TerminalsExample {
addCriterion("equipment_type not between", value1, value2, "equipmentType");
return (Criteria) this;
}
public Criteria andLastHeartbeatIsNull() {
addCriterion("last_heartbeat is null");
return (Criteria) this;
}
public Criteria andLastHeartbeatIsNotNull() {
addCriterion("last_heartbeat is not null");
return (Criteria) this;
}
public Criteria andLastHeartbeatEqualTo(Long value) {
addCriterion("last_heartbeat =", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatNotEqualTo(Long value) {
addCriterion("last_heartbeat <>", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatGreaterThan(Long value) {
addCriterion("last_heartbeat >", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatGreaterThanOrEqualTo(Long value) {
addCriterion("last_heartbeat >=", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatLessThan(Long value) {
addCriterion("last_heartbeat <", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatLessThanOrEqualTo(Long value) {
addCriterion("last_heartbeat <=", value, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatIn(List<Long> values) {
addCriterion("last_heartbeat in", values, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatNotIn(List<Long> values) {
addCriterion("last_heartbeat not in", values, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatBetween(Long value1, Long value2) {
addCriterion("last_heartbeat between", value1, value2, "lastHeartbeat");
return (Criteria) this;
}
public Criteria andLastHeartbeatNotBetween(Long value1, Long value2) {
addCriterion("last_heartbeat not between", value1, value2, "lastHeartbeat");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -1,33 +0,0 @@
package com.shxy.xymanager_common.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
*
*/
@Data
@ApiModel(value = "获取电压等级列表", description = "获取电压等级列表信息")
public class DyListModel implements Serializable {
@ApiModelProperty(value = "电压等级列表", example = "[]")
private List<DyBean> list;
@Data
public static class DyBean {
@ApiModelProperty(value = "电压编号", example = "123456")
private Integer id;
@ApiModelProperty(value = "电压名称", example = "AAAA")
private String name;
@ApiModelProperty(value = "电压大小", example = "AAAA")
private Integer dyValue;
}
}

@ -1,52 +0,0 @@
package com.shxy.xymanager_common.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 线
*/
@Data
@ApiModel(value = "获取杆塔线路列表", description = "获取杆塔线路列表信息")
public class LineListModel implements Serializable {
@ApiModelProperty(value = "总记录数", example = "120")
private long total;
@ApiModelProperty(value = "总页数", example = "120")
private int totalpage;
@ApiModelProperty(value = "当前页", example = "1")
private int currentpage;
@ApiModelProperty(value = "每页记录数", example = "1")
private int pagesize;
@ApiModelProperty(value = "杆塔线路列表", example = "[]")
private List<LineBean> list;
@Data
public static class LineBean {
@ApiModelProperty(value = "线路编号", example = "123456")
private Integer id;
@ApiModelProperty(value = "线路名称", example = "AAAA")
private String name;
@ApiModelProperty(value = "单位", example = "123456")
private String bsManufacturer;
@ApiModelProperty(value = "电压等级编号", example = "123456")
private Integer dyLevelid;
@ApiModelProperty(value = "电压等级名称", example = "123456")
private String dyLevelname;
@ApiModelProperty(value = "线路状态", example = "123456")
private Integer status;
}
}

@ -4,13 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.dto.TerminalImgAlarmsDto;
import com.shxy.xymanager_common.dto.TowerDto;
import com.shxy.xymanager_common.entity.TerminalChannelMapper;
import com.shxy.xymanager_common.entity.TerminalChannels;
import com.shxy.xymanager_common.entity.TerminalPhoto;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.entity.*;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.model.TerminalPhotoListModel;
import com.shxy.xymanager_common.model.TerminalPhotoSelectListModel;
@ -133,7 +129,7 @@ public class TerminalUtils {
* @param photoList
* @return
*/
public static List<TerminalPhotosModel.PhotosBean> setPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, LineAndDyNameDto> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList,List<TerminalImgAlarmsDto> imgarlarmsList) {
public static List<TerminalPhotosModel.PhotosBean> setPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, Lines> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList, List<TerminalImgAlarmsDto> imgarlarmsList) {
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
for (TerminalChannelMapper item : list) {
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
@ -144,11 +140,11 @@ public class TerminalUtils {
photosBean.setTermid(termid);
Terminals terminals = terminalMap.get(termid);
if (terminals != null) {
lineid = terminals.getLineid();
lineid = terminals.getLineId();
photosBean.setLineid(lineid);
photosBean.setDisplayname(terminals.getDisplayName());
photosBean.setCmdid(terminals.getCmdid());
Integer towerid = terminals.getTowerid();
Integer towerid = terminals.getTowerId();
TowerDto towerDto = towerMap.get(towerid);
if (towerDto != null) {
photosBean.setTowername(towerDto.getName());
@ -173,7 +169,7 @@ public class TerminalUtils {
photosBean.setAlias("");
}
if (lineid != null) {
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineid);
Lines lineAndDyNameDto = lineMap.get(lineid);
if (lineAndDyNameDto != null) {
photosBean.setLinename(lineAndDyNameDto.getName());
} else {
@ -262,7 +258,7 @@ public class TerminalUtils {
* @param imgarlarmsList
* @return
*/
public static List<TerminalPhotosModel.PhotosBean> setTowerPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, LineAndDyNameDto> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList, List<TerminalImgAlarmsDto> imgarlarmsList) {
public static List<TerminalPhotosModel.PhotosBean> setTowerPhotoList(String requestIp, List<TerminalChannelMapper> list, Map<Integer, Lines> lineMap, Map<String, TerminalChannelMapper> termchannelMapMap, Map<Integer, Terminals> terminalMap, Map<Integer, TerminalChannels> termchannelMap, Map<Integer, TowerDto> towerMap, List<TerminalPhoto> photoList, List<TerminalImgAlarmsDto> imgarlarmsList) {
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();
for (TerminalChannelMapper item : list) {
TerminalPhotosModel.PhotosBean photosBean = new TerminalPhotosModel.PhotosBean();
@ -273,11 +269,11 @@ public class TerminalUtils {
photosBean.setTermid(termid);
Terminals terminals = terminalMap.get(termid);
if (terminals != null) {
lineid = terminals.getLineid();
lineid = terminals.getLineId();
photosBean.setLineid(lineid);
photosBean.setDisplayname(terminals.getDisplayName());
photosBean.setCmdid(terminals.getCmdid());
Integer towerid = terminals.getTowerid();
Integer towerid = terminals.getTowerId();
TowerDto towerDto = towerMap.get(towerid);
if (towerDto != null) {
photosBean.setTowername(towerDto.getName());
@ -303,7 +299,7 @@ public class TerminalUtils {
photosBean.setAlias("");
}
if (lineid != null) {
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineid);
Lines lineAndDyNameDto = lineMap.get(lineid);
if (lineAndDyNameDto != null) {
photosBean.setLinename(lineAndDyNameDto.getName());
} else {
@ -381,7 +377,7 @@ public class TerminalUtils {
}
public static List<TerminalPhotoSelectListModel.PhotoBean> fdsa(String requestIp, List<TerminalPhoto> list, Map<Integer, Terminals> terminalMap, Map<Integer, LineAndDyNameDto> lineMap, Map<Integer, TowerDto> towerMap, Map<Integer, TerminalChannels> termchannelMap, Map<String, TerminalChannelMapper> termchannelMapMap, List<TerminalImgAlarmsDto> imgarlarmsList) {
public static List<TerminalPhotoSelectListModel.PhotoBean> fdsa(String requestIp, List<TerminalPhoto> list, Map<Integer, Terminals> terminalMap, Map<Integer, Lines> lineMap, Map<Integer, TowerDto> towerMap, Map<Integer, TerminalChannels> termchannelMap, Map<String, TerminalChannelMapper> termchannelMapMap, List<TerminalImgAlarmsDto> imgarlarmsList) {
List<TerminalPhotoSelectListModel.PhotoBean> beans = new ArrayList<>();
for (TerminalPhoto item : list) {
TerminalPhotoSelectListModel.PhotoBean photoBean = new TerminalPhotoSelectListModel.PhotoBean();
@ -391,13 +387,13 @@ public class TerminalUtils {
Integer mediaType = item.getMediaType();
if (mediaType != null && (mediaType.intValue() == 0 || mediaType.intValue() == 1)) {
photoBean.setDisplayname(terminals.getDisplayName());
Integer towerid = terminals.getTowerid();
Integer towerid = terminals.getTowerId();
if (towerMap != null) {
TowerDto towerDto = towerMap.get(towerid);
Integer lineId = towerDto.getLineId();
photoBean.setLineid(lineId);
if (lineMap != null) {
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId);
Lines lineAndDyNameDto = lineMap.get(lineId);
if (lineAndDyNameDto != null) {
photoBean.setLinename(lineAndDyNameDto.getName());
}

@ -23,5 +23,8 @@ public class SysUserUpdateVo {
@ApiModelProperty(value = "密码", example = "123455")
private String password;
@ApiModelProperty(value = "密码", example = "123455")
private String notes;
}

@ -22,5 +22,9 @@ public class SysUserVo {
@ApiModelProperty(value = "密码", example = "123455")
private String password;
@NotNull(message = "备注")
@ApiModelProperty(value = "备注", example = "123455")
private String notes;
}

@ -1,5 +1,6 @@
package com.shxy.xymanager_common.vo;
import cn.hutool.core.date.DateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -25,5 +26,5 @@ public class TerminalAndChannelIdAndTimeVo {
@NotNull(message = "查询时间不能缺少")
@ApiModelProperty(value = "查询时间", example = "123455")
private Date time;
private DateTime time;
}

@ -15,11 +15,7 @@ public class TerminalIdListVo {
@NotEmpty(message = "不能传入空值")
@ApiModelProperty(value = "装置对象数组", required = true, example = "A0001")
private List<TerminalIdVo> list;
private List<Integer> list;
@Min(value = 0, message = "开关标志最小为0")
@Max(value = 1, message = "开关标志最大为1")
@ApiModelProperty(value = "开关标志", required = true, example = "0---关闭 1---打开")
private Integer type;
}

@ -1,5 +1,6 @@
package com.shxy.xymanager_common.vo;
import cn.hutool.core.date.DateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -32,11 +33,11 @@ public class TerminalPhotoSelectVo {
@NotNull(message = "查询时间不能缺少")
@ApiModelProperty(value = "查询时间", example = "123455")
private Date starttime;
private DateTime starttime;
@NotNull(message = "查询结束时间不能缺少")
@ApiModelProperty(value = "查询结束时间", example = "123455")
private Date endtime;
private DateTime endtime;
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
private String search;

@ -25,9 +25,9 @@ public class TerminalVo {
@ApiModelProperty(value = "sim卡号", example = "123456")
private String sim;
@ApiModelProperty(value = "图像监测装置 ID17 位编码)", example = "12345678")
@ApiModelProperty(value = "图像监测i装置 ID17 位编码)", example = "12345678")
@NotBlank(message = "图像监测装置不能缺少")
private String cmdId;
private String cmdid;
@ApiModelProperty(value = "原始 ID各厂家内部识别号", example = "12345678")
private Short orgId;

@ -32,7 +32,7 @@ public class UpdateTerminalVo {
@ApiModelProperty(value = "图像监测装置 ID17 位编码)", example = "12345678")
@NotBlank(message = "图像监测装置不能缺少")
private String cmdId;
private String cmdid;
@ApiModelProperty(value = "原始 ID各厂家内部识别号", example = "12345678")
private Short orgId;

@ -18,9 +18,6 @@ public interface DyLevelDao {
List<DyLineAndTowertDto> selectDyAndLineAndTowerList(@Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("status") Integer status);
List<DyLevel> selectAll(@Param("status") Integer status);
long countByExample(DyLevelExample example);
List<DyLevel> selectByExample(DyLevelExample example);

@ -1,6 +1,5 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.entity.LinesExample;
import org.apache.ibatis.annotations.Param;
@ -10,17 +9,8 @@ import java.util.List;
public interface LinesDao {
List<LineAndDyNameDto> selectAll(@Param("status") Integer status, @Param("search") String search);
int insertList(@Param("list") List<Lines> record, @Param("status") Integer status, @Param("createat") Date create, @Param("updateat") Date update);
List<Lines> selectLineByDyId(@Param("dyid") Integer dyid, @Param("status") Integer status);
int updateByPrimaryKeySelective(@Param("data") Lines record, @Param("updateat") Date update);
long countByExample(LinesExample example);
int deleteByExample(LinesExample example);

@ -54,15 +54,6 @@ public interface SysUserMapperDao {
public SysUser selectUserById(Long userId);
/**
*
*
* @param userName
* @param password
* @return
*/
int resetUserPwd(@Param("userName") String userName, @Param("password") String password);
int deleteUserById(String userId);

@ -1,6 +1,7 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.entity.TerminalChannelMapper;
import com.shxy.xymanager_common.entity.TerminalChannelMapperExample;
import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
@ -8,29 +9,42 @@ import java.util.Date;
import java.util.List;
public interface TerminalChannelMapperDao {
int deleteByTermId(Integer id);
int insert(TerminalChannelMapper record);
int insertSelective(TerminalChannelMapper record);
int insertList(@Param("list") List<TerminalChannelMapper> record, @Param("createat") Date create, @Param("updateat") Date update);
List<TerminalChannelMapper> selectTermAndMapByTowerId(@Param("status") Integer status, @Param("towerlist") List<Integer> towerlist);
List<TerminalChannelMapper> selectByTermid(Integer id);
TerminalChannelMapper selectByPrimaryKey(Integer id);
TerminalChannelMapper selectByTermidAndChannelid(@Param("termid") Integer termid, @Param("channelid")Integer channelid, @Param("status") Integer status);
List<TerminalChannelMapper> selectAll();
List<TerminalChannelMapper> selectAllByPhotoTime(@Param("status") Integer status,@Param("termlist")List termlist);
List<TerminalChannelMapper> selectAllByPhotoTime(@Param("status") Integer status,@Param("list")List termlist);
int insertList(@Param("list") List<TerminalChannelMapper> record);
long countByExample(TerminalChannelMapperExample example);
int deleteByExample(TerminalChannelMapperExample example);
int deleteByPrimaryKey(Integer id);
int insert(TerminalChannelMapper record);
int insertSelective(TerminalChannelMapper record);
List<TerminalChannelMapper> selectByExample(TerminalChannelMapperExample example);
TerminalChannelMapper selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TerminalChannelMapper record, @Param("example") TerminalChannelMapperExample example);
int updateByExample(@Param("record") TerminalChannelMapper record, @Param("example") TerminalChannelMapperExample example);
int updateByPrimaryKeySelective(TerminalChannelMapper record);
int updateByPrimaryKey(TerminalChannelMapper record);
}

@ -15,7 +15,6 @@ import java.util.List;
public interface TerminalPhotoDao {
List<TerminalPhoto> selectPhotoList(@Param("terminalid") Integer terminalid, @Param("channelid") Integer channelid, @Param("starttime") BigInteger starttime, @Param("endtime") BigInteger endtime);
List<TerminalPhoto> selectPhotoListByOrginIdAndTermList(@Param("list") List<TerminalImgAlarmsDto> list);

@ -4,42 +4,22 @@ import com.shxy.xymanager_common.dto.*;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.entity.TerminalsExample;
import com.shxy.xymanager_common.vo.RelateTerminalListRuleIdVo;
import com.shxy.xymanager_common.vo.TerminalIdUpdateVo;
import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
public interface TerminalsDao {
List<TerminalsAndPositionDto> selectTermAndPosition(@Param("status") Integer status);
List<TerminalsAndStatusDto> selectTermAndStatusList(@Param("status") Integer status, @Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("search") String search,@Param("isonline") Integer isonline,@Param("time") BigInteger time);
List<TerminalsAndStatusDto> selectTermAndStatusStatisticsList(@Param("status") Integer status);
List<TerminalsAndStatusAndLastPicDto> selectTermAndStatusAndLastPicList(@Param("status") Integer status);
Terminals selectByCmdid(@Param("cmdid") String cmdid, @Param("status") Integer status);
List<Terminals> selectByTowerId(@Param("towerid") Integer towerid, @Param("status") Integer status);
List<Terminals> selectByToweridAndLineid(@Param("toweridlist") List<Integer> towerid, @Param("status") Integer status);
int deleteById(@Param("list") List<Terminals> record, @Param("status") Integer status, @Param("updateat") Date update);
List<ChannelAndTermDto> selectByIdList(@Param("list") List<RelateTerminalListRuleIdVo.Items> list, @Param("status") Integer status);
List<TerminalsAndStatusDto> selectList(@Param("dyid") List<Integer> dyplist, @Param("lineid") List<Integer> lineplist, @Param("towerid") List<Integer> towplist, @Param("termid") List<Integer> termid,@Param("isSuper") Integer isSuper);
String getCmdIdByTermId(Integer termId);
long countByExample(TerminalsExample example);
int deleteByExample(TerminalsExample example);

@ -15,10 +15,6 @@ public interface TowerDao {
List<TowerDto> selectAll(@Param("status") Integer status,@Param("search") String search);
List<Towers> selectAllByLineid(@Param("lineid") Integer id, @Param("status") Integer status);
int updateByPrimaryKeySelective(@Param("data") Towers record, @Param("update") Date update);
TowerDto getInfoByPrimaryKey(@Param("id") Integer id, @Param("status") Integer status);
long countByExample(TowersExample example);
@ -42,4 +38,5 @@ public interface TowerDao {
int updateByPrimaryKeySelective(Towers record);
int updateByPrimaryKey(Towers record);
}

@ -53,12 +53,12 @@
</javaClientGenerator>
<!-- &lt;!&ndash; 列出要生成代码的所有表这里配置的是不生成Example文件 &ndash;&gt;-->
<!-- <table tableName="terminals"-->
<!-- domainObjectName="Terminals"-->
<!-- mapperName="TerminalsDao"-->
<!-- >-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="terminals"
domainObjectName="Terminals"
mapperName="TerminalsDao"
>
<!-- <property name="useActualColumnNames" value="false"/>-->
</table>
<!-- <table tableName="towers"-->
@ -87,12 +87,20 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="v_dy_line_tower_terminals"
domainObjectName="View_Dy_Line_Tower_Terminals"
mapperName="View_Dy_Line_Tower_TerminalsDao"
>
<!-- <property name="useActualColumnNames" value="false"/>-->
</table>
<!-- <table tableName="v_dy_line_tower_terminals"-->
<!-- domainObjectName="View_Dy_Line_Tower_Terminals"-->
<!-- mapperName="View_Dy_Line_Tower_TerminalsDao"-->
<!-- >-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_channel_mapper"-->
<!-- domainObjectName="TerminalChannelMapper"-->
<!-- mapperName="TerminalChannelMapperDao"-->
<!-- >-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_presets"-->
<!-- domainObjectName="TerminalPresets"-->
<!-- mapperName="TerminalPresetsDao"-->
@ -169,13 +177,11 @@
<!-- </table>-->
<!-- <table tableName="user"-->
<!-- domainObjectName="User"-->
<!-- mapperName="UserDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="user"-->
<!-- domainObjectName="User"-->
<!-- mapperName="UserDao">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="role"-->
<!-- domainObjectName="Role"-->
<!-- mapperName="RoleDao"-->

@ -46,7 +46,7 @@
<result column="dy_level_id" jdbcType="INTEGER" property="dyLevel"/>
<collection javaType="list" ofType="com.shxy.xymanager_common.entity.Terminals" property="list">
<result column="term_id" jdbcType="INTEGER" property="id"/>
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
<result column="tower_id" jdbcType="INTEGER" property="towerId"/>
<result column="protocol" jdbcType="INTEGER" property="protocol"/>
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
<result column="last_heartbeat" jdbcType="BIGINT" property="lastheartbeat"/>
@ -325,12 +325,6 @@
from dy_level
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from dy_level
where status = #{status}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from dy_level

@ -10,14 +10,6 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="LineAndDyNameMap" type="com.shxy.xymanager_common.dto.LineAndDyNameDto">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer" />
<result column="dy_level_id" jdbcType="INTEGER" property="dyLevelId" />
<result column="dy_level_name" jdbcType="INTEGER" property="dyLevelName" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
@ -80,39 +72,6 @@
id, name, bs_manufacturer, dy_level_id, status, create_time, update_time
</sql>
<select id="selectLineByDyId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from `lines`
where true
<if test="status != null">
and status = #{status}
</if>
<if test="dyid != null">
and dy_level_id = #{dyid}
</if>
</select>
<select id="selectAll" resultMap="LineAndDyNameMap">
select
x.id as id,
x.name as name,
x.bs_manufacturer as bs_manufacturer,
x.dy_level_id as dy_level_id,
x.status as status,
y.name as dy_level_name
from `lines` x,
dy_level y
where x.dy_level_id = y.id
<if test="status != null">
and x.status = #{status}
</if>
<if test="search != null">
and (x.name like "%"#{search}"%" or x.bs_manufacturer like "%"#{search}"%")
</if>
order by x.create_time desc
</select>
<insert id="insertList" parameterType="java.util.List">
insert into `lines`
(name,bs_manufacturer,dy_level_id,status,create_time,update_time)

@ -8,6 +8,7 @@
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="role" jdbcType="INTEGER" property="role" />
<result column="notes" jdbcType="VARCHAR" property="notes" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
@ -70,7 +71,7 @@
</where>
</sql>
<sql id="Base_Column_List">
uid, user_name, status, nick_name, password, role, create_time, update_time
uid, user_name, status, nick_name, password, role, notes, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.SysUserExample" resultMap="BaseResultMap">
select
@ -105,10 +106,12 @@
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.SysUser">
insert into sys_users (uid, user_name, status,
nick_name, password, role,
create_time, update_time)
notes, create_time, update_time
)
values (#{uid,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{nickName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{role,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{notes,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.SysUser">
insert into sys_users
@ -131,6 +134,9 @@
<if test="role != null">
role,
</if>
<if test="notes != null">
notes,
</if>
<if test="createTime != null">
create_time,
</if>
@ -157,6 +163,9 @@
<if test="role != null">
#{role,jdbcType=INTEGER},
</if>
<if test="notes != null">
#{notes,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
@ -192,6 +201,9 @@
<if test="record.role != null">
role = #{record.role,jdbcType=INTEGER},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
@ -211,6 +223,7 @@
nick_name = #{record.nickName,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
role = #{record.role,jdbcType=INTEGER},
notes = #{record.notes,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
@ -235,6 +248,9 @@
<if test="role != null">
role = #{role,jdbcType=INTEGER},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
@ -251,8 +267,10 @@
nick_name = #{nickName,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
role = #{role,jdbcType=INTEGER},
notes = #{notes,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where uid = #{uid,jdbcType=INTEGER}
</update>
</mapper>

@ -69,10 +69,6 @@
where session_id = #{sessionid}
</select>
<update id="resetUserPwd">
update sys_users set password = #{password} where user_name = #{userName}
</update>
<insert id="addUser" parameterType="com.shxy.xymanager_common.bean.SysUser">
insert into sys_users(user_name,nick_name,password,role,create_time)
values(#{userName},#{userName},#{password},#{role},#{createTime})

@ -4,51 +4,91 @@
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalChannelMapper">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="term_id" jdbcType="INTEGER" property="termId"/>
<result column="channel_id" jdbcType="INTEGER" property="channelId"/>
<result column="channel_id" jdbcType="TINYINT" property="channelId"/>
<result column="alias" jdbcType="VARCHAR" property="alias"/>
<result column="photo_id" jdbcType="BIGINT" property="photoId"/>
<result column="photo_time" jdbcType="BIGINT" property="photoTime"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, term_id, channel_id,alias, photo_id,photo_time,create_time, update_time
</sql>
<select id="selectByTermid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
</select>
id, term_id, channel_id, alias, photo_id, photo_time, create_time, update_time
<select id="selectByTermidAndChannelid" resultMap="BaseResultMap">
</sql>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapperExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where term_id = #{termid} and channel_id = #{channelid}
</select>
<select id="selectAllByPhotoTime" resultMap="BaseResultMap">
select
a.id as term_id,
b.channel_id as channel_id,
b.photo_id as photo_id,
b.photo_time as photo_time,
b.alias as alias
from (terminals a left join
terminal_channel_mapper b on a.id = b.term_id)
where a.status = #{status}
<if test="list != null and list.size > 0">
and
<foreach close=")" collection="list" index="index" item="item" open="(" separator="or">
a.id = #{item}
</foreach>
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@ -57,36 +97,28 @@
from terminal_channel_mapper
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<select id="selectTermAndMapByTowerId" resultMap="BaseResultMap">
select
a.id as term_id,
b.channel_id as channel_id,
b.photo_id as photo_id,
b.photo_time as photo_time,
b.alias as alias
from (terminals a left join
terminal_channel_mapper b on a.id = b.term_id)
where a.status = #{status}
<if test="towerlist != null and towerlist.size>0">
and a.tower_id in
<foreach collection="towerlist" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
delete from terminal_channel_mapper
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapperExample">
delete from terminal_channel_mapper
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapper">
insert into terminal_channel_mapper (id, term_id, channel_id,
alias, photo_id, photo_time,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT},
#{alias,jdbcType=VARCHAR}, #{photoId,jdbcType=BIGINT}, #{photoTime,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
<delete id="deleteByTermId" parameterType="java.lang.Integer">
delete from terminal_channel_mapper
where term_id = #{id}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapper">
insert into terminal_channel_mapper (id, term_id, channel_id,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapper">
insert into terminal_channel_mapper
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -99,6 +131,15 @@
<if test="channelId != null">
channel_id,
</if>
<if test="alias != null">
alias,
</if>
<if test="photoId != null">
photo_id,
</if>
<if test="photoTime != null">
photo_time,
</if>
<if test="createTime != null">
create_time,
</if>
@ -114,7 +155,16 @@
#{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
#{channelId,jdbcType=INTEGER},
#{channelId,jdbcType=TINYINT},
</if>
<if test="alias != null">
#{alias,jdbcType=VARCHAR},
</if>
<if test="photoId != null">
#{photoId,jdbcType=BIGINT},
</if>
<if test="photoTime != null">
#{photoTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
@ -124,18 +174,68 @@
</if>
</trim>
</insert>
<insert id="insertList" parameterType="java.util.List">
insert into terminal_channel_mapper
(term_id, channel_id,alias,
create_time, update_time)
create_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.termId},#{item.channelId},#{item.alias},#{createat},#{updateat})
(#{item.termId},#{item.channelId},#{item.alias},#{item.createTime})
</foreach>
</insert>
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapperExample"
resultType="java.lang.Long">
select count(*) from terminal_channel_mapper
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update terminal_channel_mapper
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.termId != null">
term_id = #{record.termId,jdbcType=INTEGER},
</if>
<if test="record.channelId != null">
channel_id = #{record.channelId,jdbcType=TINYINT},
</if>
<if test="record.alias != null">
alias = #{record.alias,jdbcType=VARCHAR},
</if>
<if test="record.photoId != null">
photo_id = #{record.photoId,jdbcType=BIGINT},
</if>
<if test="record.photoTime != null">
photo_time = #{record.photoTime,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update terminal_channel_mapper
set id = #{record.id,jdbcType=INTEGER},
term_id = #{record.termId,jdbcType=INTEGER},
channel_id = #{record.channelId,jdbcType=TINYINT},
alias = #{record.alias,jdbcType=VARCHAR},
photo_id = #{record.photoId,jdbcType=BIGINT},
photo_time = #{record.photoTime,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapper">
update terminal_channel_mapper
<set>
@ -143,7 +243,16 @@
term_id = #{termId,jdbcType=INTEGER},
</if>
<if test="channelId != null">
channel_id = #{channelId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
</if>
<if test="alias != null">
alias = #{alias,jdbcType=VARCHAR},
</if>
<if test="photoId != null">
photo_id = #{photoId,jdbcType=BIGINT},
</if>
<if test="photoTime != null">
photo_time = #{photoTime,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
@ -155,11 +264,71 @@
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalChannelMapper">
update terminal_channel_mapper
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
update terminal_channel_mapper
set term_id = #{termId,jdbcType=INTEGER},
channel_id = #{channelId,jdbcType=TINYINT},
alias = #{alias,jdbcType=VARCHAR},
photo_id = #{photoId,jdbcType=BIGINT},
photo_time = #{photoTime,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByTermid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
</select>
<select id="selectByTermidAndChannelid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where term_id = #{termid} and channel_id = #{channelid}
</select>
<select id="selectAllByPhotoTime" resultMap="BaseResultMap">
select
a.id as term_id,
b.channel_id as channel_id,
b.photo_id as photo_id,
b.photo_time as photo_time,
b.alias as alias
from (terminals a left join
terminal_channel_mapper b on a.id = b.term_id)
where a.status = #{status}
<if test="list != null and list.size &gt; 0">
and
<foreach close=")" collection="list" index="index" item="item" open="(" separator="or">
a.id = #{item}
</foreach>
</if>
</select>
<select id="selectTermAndMapByTowerId" resultMap="BaseResultMap">
select
a.id as term_id,
b.channel_id as channel_id,
b.photo_id as photo_id,
b.photo_time as photo_time,
b.alias as alias
from (terminals a left join
terminal_channel_mapper b on a.id = b.term_id)
where a.status = #{status}
<if test="towerlist != null and towerlist.size&gt;0">
and a.tower_id in
<foreach close=")" collection="towerlist" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
</select>
</mapper>

@ -155,20 +155,6 @@
recv_time, recv_end_time, width, height, file_size, flags, create_time, mark_id
</sql>
<select id="selectPhotoList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminal_photos
where photo_time between #{starttime} and #{endtime}
<if test="terminalid != null">
and term_id = #{terminalid}
</if>
<if test="channelid != null">
and channel_id = #{channelid}
</if>
order by photo_time desc
</select>
<select id="selectPhotoListByOrginIdAndTermList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />

@ -3,12 +3,19 @@
<mapper namespace="com.shxy.xymanager_dao.dao.TerminalsDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.Terminals">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="line_id" jdbcType="INTEGER" property="lineid" />
<result column="tower_id" jdbcType="INTEGER" property="towerid" />
<result column="line_id" jdbcType="INTEGER" property="lineId" />
<result column="tower_id" jdbcType="INTEGER" property="towerId" />
<result column="cmdid" jdbcType="VARCHAR" property="cmdid" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="online_status" jdbcType="TINYINT" property="onlineStatus" />
<result column="dev_type" jdbcType="TINYINT" property="devType" />
<result column="org_id" jdbcType="SMALLINT" property="orgId" />
<result column="sn" jdbcType="VARCHAR" property="sn" />
<result column="iccid" jdbcType="VARCHAR" property="iccid" />
<result column="protocol" jdbcType="INTEGER" property="protocol" />
<result column="phase" jdbcType="VARCHAR" property="phase" />
<result column="equipment_type" jdbcType="VARCHAR" property="equipmentType" />
<result column="cellphone" jdbcType="VARCHAR" property="cellphone" />
<result column="equip_name" jdbcType="VARCHAR" property="equipName" />
<result column="display_name" jdbcType="VARCHAR" property="displayName" />
<result column="model" jdbcType="VARCHAR" property="model" />
@ -16,16 +23,16 @@
<result column="has_pan" jdbcType="TINYINT" property="hasPan" />
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer" />
<result column="bs_production_date" jdbcType="DATE" property="bsProductionDate" />
<result column="working_date" jdbcType="DATE" property="workingDate" />
<result column="bs_identifier" jdbcType="VARCHAR" property="bsIdentifier" />
<result column="sim" jdbcType="VARCHAR" property="sim" />
<result column="latitude" jdbcType="DOUBLE" property="latitude" />
<result column="longitude" jdbcType="DOUBLE" property="longitude" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="net_type" jdbcType="INTEGER" property="netType" />
<result column="dev_type" jdbcType="INTEGER" property="devType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="sim" jdbcType="VARCHAR" property="sim" />
<result column="working_date" jdbcType="DATE" property="workingDate" />
<result column="net_type" jdbcType="TINYINT" property="netType" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="isfavor" jdbcType="INTEGER" property="isfavor" />
</resultMap>
<resultMap id="TermAndStatusMap" type="com.shxy.xymanager_common.dto.TerminalsAndStatusDto">
<id column="id" jdbcType="INTEGER" property="id" />
@ -162,8 +169,28 @@
id, line_id, tower_id, cmdid, status, online_status, dev_type, org_id, sn, iccid,
protocol, phase, equipment_type, cellphone, equip_name, display_name, model, essential_info_version,
has_pan, bs_manufacturer, bs_production_date, bs_identifier, latitude, longitude,
create_time, update_time, sim, working_date, net_type, password
create_time, update_time, sim, working_date, net_type, password, isfavor
</sql>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from terminals
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminals
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminals
where id = #{id,jdbcType=INTEGER}
@ -198,6 +225,199 @@
#{workingDate,jdbcType=DATE}, #{netType,jdbcType=TINYINT}, #{password,jdbcType=VARCHAR},
#{isfavor,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.Terminals" useGeneratedKeys="true" keyProperty="id">
insert into terminals
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="lineId != null">
line_id,
</if>
<if test="towerId != null">
tower_id,
</if>
<if test="cmdid != null">
cmdid,
</if>
<if test="status != null">
status,
</if>
<if test="onlineStatus != null">
online_status,
</if>
<if test="devType != null">
dev_type,
</if>
<if test="orgId != null">
org_id,
</if>
<if test="sn != null">
sn,
</if>
<if test="iccid != null">
iccid,
</if>
<if test="protocol != null">
protocol,
</if>
<if test="phase != null">
phase,
</if>
<if test="equipmentType != null">
equipment_type,
</if>
<if test="cellphone != null">
cellphone,
</if>
<if test="equipName != null">
equip_name,
</if>
<if test="displayName != null">
display_name,
</if>
<if test="model != null">
model,
</if>
<if test="essentialInfoVersion != null">
essential_info_version,
</if>
<if test="hasPan != null">
has_pan,
</if>
<if test="bsManufacturer != null">
bs_manufacturer,
</if>
<if test="bsProductionDate != null">
bs_production_date,
</if>
<if test="bsIdentifier != null">
bs_identifier,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="sim != null">
sim,
</if>
<if test="workingDate != null">
working_date,
</if>
<if test="netType != null">
net_type,
</if>
<if test="password != null">
password,
</if>
<if test="isfavor != null">
isfavor,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="lineId != null">
#{lineId,jdbcType=INTEGER},
</if>
<if test="towerId != null">
#{towerId,jdbcType=INTEGER},
</if>
<if test="cmdid != null">
#{cmdid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="onlineStatus != null">
#{onlineStatus,jdbcType=TINYINT},
</if>
<if test="devType != null">
#{devType,jdbcType=TINYINT},
</if>
<if test="orgId != null">
#{orgId,jdbcType=SMALLINT},
</if>
<if test="sn != null">
#{sn,jdbcType=VARCHAR},
</if>
<if test="iccid != null">
#{iccid,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
#{protocol,jdbcType=INTEGER},
</if>
<if test="phase != null">
#{phase,jdbcType=VARCHAR},
</if>
<if test="equipmentType != null">
#{equipmentType,jdbcType=VARCHAR},
</if>
<if test="cellphone != null">
#{cellphone,jdbcType=VARCHAR},
</if>
<if test="equipName != null">
#{equipName,jdbcType=VARCHAR},
</if>
<if test="displayName != null">
#{displayName,jdbcType=VARCHAR},
</if>
<if test="model != null">
#{model,jdbcType=VARCHAR},
</if>
<if test="essentialInfoVersion != null">
#{essentialInfoVersion,jdbcType=VARCHAR},
</if>
<if test="hasPan != null">
#{hasPan,jdbcType=TINYINT},
</if>
<if test="bsManufacturer != null">
#{bsManufacturer,jdbcType=VARCHAR},
</if>
<if test="bsProductionDate != null">
#{bsProductionDate,jdbcType=DATE},
</if>
<if test="bsIdentifier != null">
#{bsIdentifier,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=DOUBLE},
</if>
<if test="longitude != null">
#{longitude,jdbcType=DOUBLE},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sim != null">
#{sim,jdbcType=VARCHAR},
</if>
<if test="workingDate != null">
#{workingDate,jdbcType=DATE},
</if>
<if test="netType != null">
#{netType,jdbcType=TINYINT},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="isfavor != null">
#{isfavor,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultType="java.lang.Long">
select count(*) from terminals
<if test="_parameter != null">
@ -342,21 +562,136 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from terminals
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.Terminals">
update terminals
<set>
<if test="lineId != null">
line_id = #{lineId,jdbcType=INTEGER},
</if>
<if test="towerId != null">
tower_id = #{towerId,jdbcType=INTEGER},
</if>
<if test="cmdid != null">
cmdid = #{cmdid,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="onlineStatus != null">
online_status = #{onlineStatus,jdbcType=TINYINT},
</if>
<if test="devType != null">
dev_type = #{devType,jdbcType=TINYINT},
</if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=SMALLINT},
</if>
<if test="sn != null">
sn = #{sn,jdbcType=VARCHAR},
</if>
<if test="iccid != null">
iccid = #{iccid,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
protocol = #{protocol,jdbcType=INTEGER},
</if>
<if test="phase != null">
phase = #{phase,jdbcType=VARCHAR},
</if>
<if test="equipmentType != null">
equipment_type = #{equipmentType,jdbcType=VARCHAR},
</if>
<if test="cellphone != null">
cellphone = #{cellphone,jdbcType=VARCHAR},
</if>
<if test="equipName != null">
equip_name = #{equipName,jdbcType=VARCHAR},
</if>
<if test="displayName != null">
display_name = #{displayName,jdbcType=VARCHAR},
</if>
<if test="model != null">
model = #{model,jdbcType=VARCHAR},
</if>
<if test="essentialInfoVersion != null">
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
</if>
<if test="hasPan != null">
has_pan = #{hasPan,jdbcType=TINYINT},
</if>
<if test="bsManufacturer != null">
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
</if>
<if test="bsProductionDate != null">
bs_production_date = #{bsProductionDate,jdbcType=DATE},
</if>
<if test="bsIdentifier != null">
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
latitude = #{latitude,jdbcType=DOUBLE},
</if>
<if test="longitude != null">
longitude = #{longitude,jdbcType=DOUBLE},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="sim != null">
sim = #{sim,jdbcType=VARCHAR},
</if>
<if test="workingDate != null">
working_date = #{workingDate,jdbcType=DATE},
</if>
<if test="netType != null">
net_type = #{netType,jdbcType=TINYINT},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="isfavor != null">
isfavor = #{isfavor,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Terminals">
update terminals
set line_id = #{lineId,jdbcType=INTEGER},
tower_id = #{towerId,jdbcType=INTEGER},
cmdid = #{cmdid,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
online_status = #{onlineStatus,jdbcType=TINYINT},
dev_type = #{devType,jdbcType=TINYINT},
org_id = #{orgId,jdbcType=SMALLINT},
sn = #{sn,jdbcType=VARCHAR},
iccid = #{iccid,jdbcType=VARCHAR},
protocol = #{protocol,jdbcType=INTEGER},
phase = #{phase,jdbcType=VARCHAR},
equipment_type = #{equipmentType,jdbcType=VARCHAR},
cellphone = #{cellphone,jdbcType=VARCHAR},
equip_name = #{equipName,jdbcType=VARCHAR},
display_name = #{displayName,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
has_pan = #{hasPan,jdbcType=TINYINT},
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
bs_production_date = #{bsProductionDate,jdbcType=DATE},
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=DOUBLE},
longitude = #{longitude,jdbcType=DOUBLE},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sim = #{sim,jdbcType=VARCHAR},
working_date = #{workingDate,jdbcType=DATE},
net_type = #{netType,jdbcType=TINYINT},
password = #{password,jdbcType=VARCHAR},
isfavor = #{isfavor,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByIdList" resultMap="ChannelAndTerm">
select
@ -382,7 +717,6 @@
</select>
<select id="selectList" resultMap="TermAndStatusMap">
select
d.id as id,
@ -450,75 +784,6 @@
order by d.create_time desc
</select>
<select id="selectTermAndStatusList" resultMap="TermAndStatusMap">
select
d.id as id,
a.id as dy_id,
a.name as dy_name,
b.id as line_id,
b.name as line_name,
b.bs_manufacturer as line_bs_manufacturer,
c.id as tower_id,
c.name as tower_name,
d.cmdid as cmdid,
d.org_id as org_id,
d.equip_name as equip_name,
d.display_name as display_name,
d.model as model,
d.essential_info_version as essential_info_version,
d.has_pan as has_pan,
d.bs_manufacturer as bs_manufacturer,
d.bs_production_date as bs_production_date,
d.bs_identifier as bs_identifier,
d.latitude as latitude,
d.longitude as longitude,
d.status as status,
d.protocol as protocol,
d.sim as sim,
d.working_date as working_date,
d.net_type as net_type,
d.dev_type as dev_type,
d.phase as phase,
d.equipment_type as equipment_type,
e.last_heartbeat as last_heartbeat,
e.signal_strength_4g as signal_strength_4g,
e.boot_time as boot_time,
e.battery_capacity as battery_capacity,
e.battery_voltage as battery_voltage
from ((((dy_level a left join `lines` b on a.id = b.dy_level_id )
left join towers c on b.id = c.line_id )
inner join terminals d on c.id = d.tower_id )
left join terminal_status e on e.term_id = d.id)
<where>
true
<if test="status != null">
and d.status = #{status}
</if>
<if test="dyid != null and dyid != -1">
and a.id = #{dyid}
</if>
<if test="lineid != null and lineid != -1">
and b.id = #{lineid}
</if>
<if test="towerid != null and towerid != -1">
and c.id = #{towerid}
</if>
<if test="search != null">
and (b.name like "%"#{search}"%" or c.name like "%"#{search}"%" or d.cmdid like "%"#{search}"%")
</if>
<if test="isonline != null">
<if test="isonline == 0">
and e.last_heartbeat <![CDATA[<=]]> #{time}
</if>
<if test="isonline == 1">
and e.last_heartbeat <![CDATA[>=]]> #{time}
</if>
</if>
</where>
order by d.create_time desc
</select>
<select id="selectTermAndStatusStatisticsList" resultMap="TermAndStatusMap">
select
a.id as id,
@ -579,42 +844,6 @@
</where>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminals
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByCmdid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminals
where cmdid = #{cmdid} and status = #{status}
</select>
<select id="selectByToweridAndLineid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminals
where status = #{status}
<if test="toweridlist != null and toweridlist.size &gt; 0">
and tower_id in
<foreach close=")" collection="toweridlist" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
</select>
<select id="selectByTowerId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminals
where status = #{status}
<if test="towerid != null">
and tower_id = #{towerid}
</if>
</select>
<select id="selectTermAndPosition" resultMap="TermAndPositionMap">
select
@ -630,204 +859,5 @@
</if>
</select>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.Terminals">
insert into terminals
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="cmdid != null">
cmdid,
</if>
<if test="orgId != null">
org_id,
</if>
<if test="equipName != null">
equip_name,
</if>
<if test="displayName != null">
display_name,
</if>
<if test="model != null">
model,
</if>
<if test="essentialInfoVersion != null">
essential_info_version,
</if>
<if test="hasPan != null">
has_pan,
</if>
<if test="bsManufacturer != null">
bs_manufacturer,
</if>
<if test="bsProductionDate != null">
bs_production_date,
</if>
<if test="bsIdentifier != null">
bs_identifier,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="cmdid != null">
#{cmdid,jdbcType=VARCHAR},
</if>
<if test="orgId != null">
#{orgId,jdbcType=SMALLINT},
</if>
<if test="equipName != null">
#{equipName,jdbcType=VARCHAR},
</if>
<if test="displayName != null">
#{displayName,jdbcType=VARCHAR},
</if>
<if test="model != null">
#{model,jdbcType=VARCHAR},
</if>
<if test="essentialInfoVersion != null">
#{essentialInfoVersion,jdbcType=VARCHAR},
</if>
<if test="hasPan != null">
#{hasPan,jdbcType=TINYINT},
</if>
<if test="bsManufacturer != null">
#{bsManufacturer,jdbcType=VARCHAR},
</if>
<if test="bsProductionDate != null">
#{bsProductionDate,jdbcType=DATE},
</if>
<if test="bsIdentifier != null">
#{bsIdentifier,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=DOUBLE},
</if>
<if test="longitude != null">
#{longitude,jdbcType=DOUBLE},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="deleteById">
update terminals
set status = #{status},
update_time = #{updateat}
where id in
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item.id}
</foreach>
</update>
<update id="updateByPrimaryKeySelective">
update terminals
<set>
<if test="record.lineid != null">
line_id = #{record.lineid},
</if>
<if test="record.towerid != null">
tower_id = #{record.towerid},
</if>
<if test="record.cmdid != null">
cmdid = #{record.cmdid},
</if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=SMALLINT},
</if>
<if test="record.equipName != null">
equip_name = #{record.equipName,jdbcType=VARCHAR},
</if>
<if test="record.displayName != null">
display_name = #{record.displayName,jdbcType=VARCHAR},
</if>
<if test="record.model != null">
model = #{record.model,jdbcType=VARCHAR},
</if>
<if test="record.essentialInfoVersion != null">
essential_info_version = #{record.essentialInfoVersion,jdbcType=VARCHAR},
</if>
<if test="record.hasPan != null">
has_pan = #{record.hasPan,jdbcType=TINYINT},
</if>
<if test="record.bsManufacturer != null">
bs_manufacturer = #{record.bsManufacturer,jdbcType=VARCHAR},
</if>
<if test="record.bsProductionDate != null">
bs_production_date = #{record.bsProductionDate,jdbcType=DATE},
</if>
<if test="record.bsIdentifier != null">
bs_identifier = #{record.bsIdentifier,jdbcType=VARCHAR},
</if>
<if test="record.latitude != null">
latitude = #{record.latitude,jdbcType=DOUBLE},
</if>
<if test="record.longitude != null">
longitude = #{record.longitude,jdbcType=DOUBLE},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sim != null">
sim = #{record.sim},
</if>
<if test="record.netType != null">
net_type = #{record.netType},
</if>
<if test="record.devType != null">
dev_type = #{record.devType},
</if>
<if test="record.workingDate != null">
working_date = #{record.workingDate},
</if>
<if test="record.protocol != null">
protocol = #{record.protocol},
</if>
</set>
where id = #{record.id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Terminals">
update terminals
set cmdid = #{cmdid,jdbcType=VARCHAR},
org_id = #{orgId,jdbcType=SMALLINT},
equip_name = #{equipName,jdbcType=VARCHAR},
display_name = #{displayName,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
has_pan = #{hasPan,jdbcType=TINYINT},
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
bs_production_date = #{bsProductionDate,jdbcType=DATE},
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=DOUBLE},
longitude = #{longitude,jdbcType=DOUBLE},
update_time = #{updateat}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getCmdIdByTermId" resultType="java.lang.String">
select cmdid
from terminals
where id = #{termId,jdbcType=INTEGER}
</select>
</mapper>

@ -95,17 +95,6 @@
</select>
<select id="selectAllByLineid" resultType="com.shxy.xymanager_common.entity.Towers">
select
id, name, line_id,`order`,status,address
from towers
where status = #{status}
<if test="lineid != null">
and line_id = #{lineid}
</if>
order by `order` asc
</select>
<select id="getInfoByPrimaryKey" resultType="com.shxy.xymanager_common.dto.TowerDto">
select
t.id as id,
@ -266,7 +255,7 @@
update towers
set id = #{record.id,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
line_id = #{record.lineId,jdbcType=INTEGER},
line_id = #{record.lineid,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=INTEGER},
@ -282,8 +271,8 @@
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="lineId != null">
line_id = #{lineId,jdbcType=INTEGER},
<if test="lineid != null">
line_id = #{lineid,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
@ -295,7 +284,7 @@
status = #{status,jdbcType=INTEGER},
</if>
<if test="order != null">
order = #{order,jdbcType=INTEGER},
`order` = #{order,jdbcType=INTEGER},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
@ -306,11 +295,11 @@
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Towers">
update towers
set name = #{name,jdbcType=VARCHAR},
line_id = #{lineId,jdbcType=INTEGER},
line_id = #{lineid,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
order = #{order,jdbcType=INTEGER},
`order` = #{order,jdbcType=INTEGER},
address = #{address,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>

@ -30,6 +30,7 @@
<result column="dev_type" jdbcType="TINYINT" property="devType" />
<result column="phase" jdbcType="VARCHAR" property="phase" />
<result column="equipment_type" jdbcType="VARCHAR" property="equipmentType" />
<result column="last_heartbeat" jdbcType="BIGINT" property="lastHeartbeat" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -93,7 +94,7 @@
id, dy_id, dy_name, line_id, line_name, line_bs_manufacturer, tower_id, tower_name,
cmdid, org_id, equip_name, display_name, model, essential_info_version, has_pan,
bs_manufacturer, bs_production_date, bs_identifier, latitude, longitude, status,
protocol, sim, working_date, net_type, dev_type, phase, equipment_type
protocol, sim, working_date, net_type, dev_type, phase, equipment_type, last_heartbeat
</sql>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.View_Dy_Line_Tower_TerminalsExample" resultMap="BaseResultMap">
select
@ -125,7 +126,7 @@
latitude, longitude, status,
protocol, sim, working_date,
net_type, dev_type, phase,
equipment_type)
equipment_type, last_heartbeat)
values (#{id,jdbcType=INTEGER}, #{dyId,jdbcType=INTEGER}, #{dyName,jdbcType=VARCHAR},
#{lineId,jdbcType=INTEGER}, #{lineName,jdbcType=VARCHAR}, #{lineBsManufacturer,jdbcType=VARCHAR},
#{towerId,jdbcType=INTEGER}, #{towerName,jdbcType=VARCHAR}, #{cmdid,jdbcType=VARCHAR},
@ -135,7 +136,7 @@
#{latitude,jdbcType=DOUBLE}, #{longitude,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER},
#{protocol,jdbcType=INTEGER}, #{sim,jdbcType=VARCHAR}, #{workingDate,jdbcType=DATE},
#{netType,jdbcType=TINYINT}, #{devType,jdbcType=TINYINT}, #{phase,jdbcType=VARCHAR},
#{equipmentType,jdbcType=VARCHAR})
#{equipmentType,jdbcType=VARCHAR}, #{lastHeartbeat,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals">
insert into v_dy_line_tower_terminals
@ -224,6 +225,9 @@
<if test="equipmentType != null">
equipment_type,
</if>
<if test="lastHeartbeat != null">
last_heartbeat,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -310,6 +314,9 @@
<if test="equipmentType != null">
#{equipmentType,jdbcType=VARCHAR},
</if>
<if test="lastHeartbeat != null">
#{lastHeartbeat,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.View_Dy_Line_Tower_TerminalsExample" resultType="java.lang.Long">
@ -405,6 +412,9 @@
<if test="record.equipmentType != null">
equipment_type = #{record.equipmentType,jdbcType=VARCHAR},
</if>
<if test="record.lastHeartbeat != null">
last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -439,7 +449,8 @@
net_type = #{record.netType,jdbcType=TINYINT},
dev_type = #{record.devType,jdbcType=TINYINT},
phase = #{record.phase,jdbcType=VARCHAR},
equipment_type = #{record.equipmentType,jdbcType=VARCHAR}
equipment_type = #{record.equipmentType,jdbcType=VARCHAR},
last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>

@ -40,10 +40,10 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- </exclusion>-->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- SpringBoot 拦截器 -->

@ -1,6 +1,5 @@
package com.shxy.xymanager_service.impl;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.dto.TermAndChannelDto;
import com.shxy.xymanager_common.dto.TowerDto;
import com.shxy.xymanager_common.entity.*;
@ -133,10 +132,10 @@ public class CacheServiceImpl implements CacheService {
@Override
@Cacheable(value = "lineMap")
public Map<Integer, LineAndDyNameDto> getLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null,null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
public Map<Integer, Lines> getLineMap() {
Map<Integer, Lines> lineMap = new HashMap<Integer, Lines>();
List<Lines> lines = linesDao.selectByExample(new LinesExample());
for (Lines lineitem : lines) {
lineMap.put(lineitem.getId(), lineitem);
}
return lineMap;
@ -269,10 +268,10 @@ public class CacheServiceImpl implements CacheService {
@Override
@CachePut(value = "lineMap")
public Map<Integer, LineAndDyNameDto> updateLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null,null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
public Map<Integer, Lines> updateLineMap() {
Map<Integer, Lines> lineMap = new HashMap<Integer, Lines>();
List<Lines> lines = linesDao.selectByExample(new LinesExample());
for (Lines lineitem : lines) {
lineMap.put(lineitem.getId(), lineitem);
}
return lineMap;

@ -1,20 +1,16 @@
package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.PermissionDetail;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.SysUser;
import com.shxy.xymanager_common.dto.*;
import com.shxy.xymanager_common.entity.*;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.threadlocal.UserContextHolder;
import com.shxy.xymanager_common.util.xinyin.TerminalUtils;
import com.shxy.xymanager_common.vo.LastTowerVo;
import com.shxy.xymanager_dao.dao.*;
@ -22,14 +18,12 @@ import com.shxy.xymanager_service.service.CacheService;
import com.shxy.xymanager_service.service.DyLevelService;
import com.shxy.xymanager_service.service.RoleService;
import com.shxy.xymanager_service.service.UserService;
import jdk.nashorn.internal.ir.Terminal;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@ -186,17 +180,9 @@ public class DyLevelServiceImpl implements DyLevelService {
* @return
*/
@Override
public ServiceBody<DyListModel> getdyList() {
DyListModel model = new DyListModel();
List<DyLevel> list = dyLevelDao.selectAll(CommonStatus.EFFECTIVE.value());
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
} else {
List<DyListModel.DyBean> models = BeanUtil.copyToList(list, DyListModel.DyBean.class);
model.setList(models);
}
return Asserts.success(model);
public ServiceBody<List<DyLevel>> getdyList() {
List<DyLevel> list = dyLevelDao.selectByExample(new DyLevelExample());
return Asserts.success(list);
}
/**
@ -238,7 +224,7 @@ public class DyLevelServiceImpl implements DyLevelService {
for (TerminalChannelMapper item : list) {
photolist.add(item.getPhotoId());
}
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
Map<Integer, Lines> lineMap = cacheService.getLineMap();
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();

@ -4,16 +4,14 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.dto.TermChannelAndMapperDto;
import com.shxy.xymanager_common.entity.*;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.LineAndGtAndChannelListModel;
import com.shxy.xymanager_common.model.LineListModel;
import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.page.TableDataInfo;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_dao.dao.*;
import com.shxy.xymanager_service.service.CacheService;
@ -22,9 +20,9 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -61,36 +59,40 @@ public class LineServiceImpl implements LineService {
* @return
*/
@Override
public ServiceBody<LineListModel> getLineList(SelectVo vo) {
String search = vo.getSearch();
if (StrUtil.isEmpty(search)) {
search = null;
}
LineListModel model = new LineListModel();
public ServiceBody<TableDataInfo<Lines>> getLineList(SelectVo vo) {
int pageindex = vo.getPageindex();
String search = vo.getSearch();
int pagesize = vo.getPagesize();
LinesExample example = new LinesExample();
example.setOrderByClause("id desc");
if (StrUtil.isNotBlank(search)) {
LinesExample.Criteria criteria1 = example.createCriteria();
criteria1.andNameLike(search);
LinesExample.Criteria or = example.or();
or.andBsManufacturerLike(search);
}
PageUtils.SetPage(pageindex, pagesize);
List<LineAndDyNameDto> list = linesDao.selectAll(CommonStatus.EFFECTIVE.value(), search);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
} else {
List<LineListModel.LineBean> beans = BeanUtil.copyToList(list, LineListModel.LineBean.class, CopyOptions.create().ignoreCase());
model.setList(beans);
List<Lines> lines = linesDao.selectByExample(example);
if (CollectionUtil.isNotEmpty(lines)) {
List<DyLevel> dyLevels = dyLevelDao.selectByExample(new DyLevelExample());
HashMap<Integer, DyLevel> map = new HashMap<>();
if (CollectionUtil.isNotEmpty(dyLevels)) {
for (DyLevel item:dyLevels) {
map.put(item.getId(), item);
}
}
for (Lines litem:lines) {
Integer dyLevelId = litem.getDyLevelId();
if (BeanUtil.isNotEmpty(dyLevelId)) {
DyLevel dyLevel = map.get(dyLevelId);
if (BeanUtil.isNotEmpty(dyLevel)) {
litem.setDyLevelName(dyLevel.getName());
}
}
}
}
PageInfo pageData = PageUtils.getPageData(list);
int currentpage = pageData.getPageNum();
model.setCurrentpage(currentpage);
long total = pageData.getTotal();
model.setTotal(total);
int pageSize = pageData.getPageSize();
model.setPagesize(pageSize);
int pages = pageData.getPages();
model.setTotalpage(pages);
return Asserts.success(model);
TableDataInfo dataTable = PageUtils.getDataTable(lines);
return Asserts.success(dataTable);
}
/**
@ -146,8 +148,12 @@ public class LineServiceImpl implements LineService {
@Override
public ServiceBody<String> updateLine(UpdateLineVo vo) {
Lines lines = new Lines();
BeanUtil.copyProperties(vo, lines, true);
int i = linesDao.updateByPrimaryKeySelective(lines, new Date());
lines.setId(vo.getId());
lines.setName(vo.getName());
lines.setBsManufacturer(vo.getBsManufacturer());
lines.setDyLevelId(vo.getDyLevelid());
lines.setUpdateTime(new Date());
int i = linesDao.updateByPrimaryKeySelective(lines);
if (i != 0) {
cacheService.updateLineMap();
cacheService.updateTowerMap();
@ -174,21 +180,27 @@ public class LineServiceImpl implements LineService {
List<LineAndGtAndChannelListModel.Bean> beans = new ArrayList<>();
//查询所有
if (type == 1) {
List<DyLevel> list = dyLevelDao.selectAll(CommonStatus.EFFECTIVE.value());
List<DyLevel> list = dyLevelDao.selectByExample(new DyLevelExample());
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
} else if (type == 2) {
if (id != null) {
List<Lines> list = linesDao.selectLineByDyId(id, CommonStatus.EFFECTIVE.value());
LinesExample example = new LinesExample();
example.createCriteria().andDyLevelIdEqualTo(id);
List<Lines> list = linesDao.selectByExample(example);
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
}
} else if (type == 3) {
if (id != null) {
List<Towers> list = towerDao.selectAllByLineid(id, CommonStatus.EFFECTIVE.value());
TowersExample example = new TowersExample();
example.createCriteria().andLineIdEqualTo(id);
List<Towers> list = towerDao.selectByExample(example);
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
}
} else if (type == 4) {
if (id != null) {
List<Terminals> list = terminalsDao.selectByTowerId(id, CommonStatus.EFFECTIVE.value());
TerminalsExample example = new TerminalsExample();
example.createCriteria().andTowerIdEqualTo(id);
List<Terminals> list = terminalsDao.selectByExample(example);
for (Terminals item : list) {
LineAndGtAndChannelListModel.Bean bean = new LineAndGtAndChannelListModel.Bean();
bean.setId(item.getId());
@ -198,7 +210,6 @@ public class LineServiceImpl implements LineService {
} else {
bean.setName(item.getDisplayName());
}
beans.add(bean);
}
}
@ -231,11 +242,14 @@ public class LineServiceImpl implements LineService {
Integer type = vo.getType();
Integer id = vo.getId();
if (type.intValue() == 1) {
List<Lines> list = linesDao.selectLineByDyId(null, CommonStatus.EFFECTIVE.value());
LinesExample example = new LinesExample();
List<Lines> list = linesDao.selectByExample(example);
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
} else {
if (id != null) {
List<Towers> list = towerDao.selectAllByLineid(id, CommonStatus.EFFECTIVE.value());
TowersExample towersExample = new TowersExample();
towersExample.createCriteria().andLineIdEqualTo(id);
List<Towers> list = towerDao.selectByExample(towersExample);
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
}
}

@ -8,10 +8,7 @@ import cn.hutool.json.JSONObject;
import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.constant.UuidUtils;
import com.shxy.xymanager_common.dto.TerminalsWithHeart;
import com.shxy.xymanager_common.entity.SysUser;
import com.shxy.xymanager_common.entity.SysUserExample;
import com.shxy.xymanager_common.entity.SysUserSession;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.entity.*;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.util.CmaUtil;
import com.shxy.xymanager_common.util.MyDateUtils;
@ -149,12 +146,20 @@ public class OpenServiceImpl implements OpenService {
}
}
Terminals terminals = terminalsDao.selectByCmdid(deviceID, CommonStatus.EFFECTIVE.value());
if (BeanUtil.isEmpty(terminals)) {
TerminalsExample example = new TerminalsExample();
example.createCriteria().andCmdidEqualTo(deviceID);
List<Terminals> list = terminalsDao.selectByExample(example);
if (CollectionUtil.isEmpty(list)) {
jsonObject.set("errcode", 2);
jsonObject.set("errmsg", "device not register");
return jsonObject;
}
// Terminals terminals = terminalsDao.selectByCmdid(deviceID, CommonStatus.EFFECTIVE.value());
// if (BeanUtil.isEmpty(terminals)) {
// jsonObject.set("errcode", 2);
// jsonObject.set("errmsg", "device not register");
// return jsonObject;
// }
if (operateType == 1) {
operateType = 0;

@ -125,7 +125,7 @@ public class RoleServiceImpl implements RoleService {
termmap.put(termitem.getId(), termitem);
}
for (Terminals termitem : terminals) {
Integer towerid = termitem.getTowerid();
Integer towerid = termitem.getTowerId();
if (towerid != null) {
Towers towers1 = towermap.get(towerid);
if (BeanUtil.isNotEmpty(towers1)) {

@ -33,6 +33,8 @@ import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -85,18 +87,6 @@ public class SysUserServiceImpl implements SysUserService {
}
}
@Override
public Integer insertUser(SysUser user) {
int flag = sysUserMapperDao.addUser(user);
if (flag > 0) {
Map<String, Object> map = new HashMap<>();
map.put("userName", user.getUserName());
map.put("password", user.getPassword());
addUserRemote(map);
return flag;
}
return flag;
}
@Override
public SysUser selectUserById(Integer userId) {
@ -108,20 +98,25 @@ public class SysUserServiceImpl implements SysUserService {
if (!this.checkUserNameUnique(vo.getUserName())) {
return Asserts.error("新增用户'" + vo.getUserName() + "'失败,登录账号已存在");
}
SysUser sysUser = new SysUser();
com.shxy.xymanager_common.entity.SysUser sysUser = new com.shxy.xymanager_common.entity.SysUser();
String userName = vo.getUserName();
String nickName = userName;
sysUser.setUserName(userName);
sysUser.setNickName(nickName);
sysUser.setCreateTime(new DateTime());
sysUser.setRole(vo.getRole());
sysUser.setNotes(vo.getNotes());
sysUser.setCreateTime(new Date());
try {
sysUser.setPassword(RsaUtils.encryptByPublicKey(CustomRsaProperties.publicKey, vo.getPassword()));
} catch (Exception e) {
log.error("密码转码失败:{}", e.getMessage());
}
this.insertUser(sysUser);
return Asserts.success("新增成功");
int flag = sysUserDao.insertSelective(sysUser);
if (flag > 0) {
return Asserts.success("新增成功");
} else {
return Asserts.error("新增失败");
}
}
@Override
@ -132,6 +127,9 @@ public class SysUserServiceImpl implements SysUserService {
@Override
public ServiceBody<String> updateUser(SysUserUpdateVo vo) {
com.shxy.xymanager_common.entity.SysUser user = new com.shxy.xymanager_common.entity.SysUser();
Integer uid = vo.getUid();
user.setUid(uid);
String userName = vo.getUserName();
if (StrUtil.isNotEmpty(userName)) {
user.setUserName(userName);
@ -140,6 +138,11 @@ public class SysUserServiceImpl implements SysUserService {
if (BeanUtil.isNotEmpty(role)) {
user.setRole(role);
}
String notes = vo.getNotes();
if (StrUtil.isNotEmpty(notes)) {
user.setNotes(notes);
}
String password = vo.getPassword();
try {
if (StrUtil.isNotBlank(password)) {
@ -148,10 +151,7 @@ public class SysUserServiceImpl implements SysUserService {
} catch (Exception e) {
log.error("修改密码异常:{}", e.getMessage());
}
SysUserExample sysUserExample = new SysUserExample();
SysUserExample.Criteria criteria = sysUserExample.createCriteria();
criteria.andUidEqualTo(vo.getUid());
int result = sysUserDao.updateByExampleSelective(user, sysUserExample);
int result = sysUserDao.updateByPrimaryKeySelective(user);
if (result > 0) {
return Asserts.success("修改成功");
}
@ -168,17 +168,6 @@ public class SysUserServiceImpl implements SysUserService {
return null;
}
@Override
public Boolean resetPwd(SysUser user) {
return null;
}
@Override
public Boolean resetUserPwd(String userName, String password) {
int count = sysUserMapperDao.resetUserPwd(userName, password);
return count > 0 ? true : false;
}
@Override
public ServiceBody<String> deleteUserById(Integer userId) {
int result = sysUserDao.deleteByPrimaryKey(userId);
@ -226,17 +215,4 @@ public class SysUserServiceImpl implements SysUserService {
return Asserts.success(dataTable);
}
public boolean addUserRemote(Map<String, Object> map) {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.parseMediaType(MediaType.APPLICATION_JSON_UTF8_VALUE));
HttpEntity<Map<String, Object>> httpEntity = new HttpEntity<>(map, httpHeaders);
/*ResponseEntity responseEntity = restTemplate.postForEntity(remoteUserAdd, httpEntity,
Object.class);
int code = responseEntity.getStatusCodeValue();*/
int code = 200;
if (code == 200) {
return true;
}
return false;
}
}

@ -186,7 +186,7 @@ public class TerminalAlarmServiceImpl implements TerminalAlarmService {
Terminals terminals = terminalMap.get(termId);
if (terminals != null) {
alarmBean.setDisplayName(terminals.getDisplayName());
Integer termtowerid = terminals.getTowerid();
Integer termtowerid = terminals.getTowerId();
TowerDto towerDto = towerMap.get(termtowerid);
if (towerDto != null) {
alarmBean.setTowerId(termtowerid);

@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.*;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.entity.TerminalChannels;
import com.shxy.xymanager_common.entity.TerminalStatus;
import com.shxy.xymanager_common.entity.Terminals;
@ -185,11 +186,11 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
}
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
Map<Integer, Lines> lineMap = cacheService.getLineMap();
if (terminalMap != null) {
Terminals terminals = terminalMap.get(termId);
if (terminals != null) {
Integer towerid = terminals.getTowerid();
Integer towerid = terminals.getTowerId();
if (towerid != null) {
model.setTowerId(towerid);
if (towerMap != null) {
@ -198,7 +199,7 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
Integer lineId = towerDto.getLineId();
model.setLineId(lineId);
if (lineMap != null) {
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId);
Lines lineAndDyNameDto = lineMap.get(lineId);
Integer dyLevelId = lineAndDyNameDto.getDyLevelId();
model.setDyId(dyLevelId);
}

@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
@ -98,7 +99,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Override
public ServiceBody<TerminalPhotoListModel> getTerminalPhotoList(String requestIp, TerminalAndChannelIdAndTimeVo vo) {
TerminalPhotoListModel model = new TerminalPhotoListModel();
Date time = vo.getTime();
DateTime time = vo.getTime();
DateTime begindateTime = MyDateUtils.beginOfDay(time);
DateTime enddateTime = MyDateUtils.endOfDay(time);
long start = MyDateUtils.TimeMillSecond2Second(begindateTime);
@ -109,8 +110,18 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
}
List<TerminalPhoto> list = new ArrayList<>();
Integer terminalid = vo.getTerminalid();
list = terminalPhotoDao.selectPhotoList(terminalid, channelid, BigInteger.valueOf(start), BigInteger.valueOf(end));
TerminalPhotoExample example = new TerminalPhotoExample();
example.setOrderByClause("photo_time desc");
TerminalPhotoExample.Criteria criteria = example.createCriteria();
if (BeanUtil.isNotEmpty(terminalid) && !terminalid.equals(-1)) {
criteria.andTermIdEqualTo(terminalid);
if (BeanUtil.isNotEmpty(channelid) && !terminalid.equals(-1)) {
criteria.andChannelIdEqualTo(channelid);
}
}
criteria.andPhotoTimeBetween(BigInteger.valueOf(start).longValue(), BigInteger.valueOf(end).longValue());
list = terminalPhotoDao.selectByExample(example);
List idlist = new ArrayList<>();
for (TerminalPhoto tp:list) {
if (tp.getOrginalId()!=null) {
@ -128,7 +139,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
}
boolean empty = CollectionUtil.isEmpty(list);
model.setTime(vo.getTime());
model.setTime(time);
model.setNum(list.size());
if (empty) {
model.setList(new ArrayList<>());
@ -247,9 +258,11 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
if (dyid == null || dyid.intValue() == -1) {
if (StrUtil.isEmpty(search)) {
PageUtils.SetPage(pageindex, pagesize);
TerminalPhotoExample example = new TerminalPhotoExample();
example.createCriteria().andTermIdIn(termidlist).andChannelIdIn(channelidlist).andPhotoTimeBetween(start,end);
terminalPhotoDao.selectByExample(example);
// TerminalPhotoExample example = new TerminalPhotoExample();
// example.createCriteria().andTermIdIn(termidlist).andChannelIdIn(channelidlist).andPhotoTimeBetween(start,end);
// terminalPhotoDao.selectByExample(example);
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end));
} else {
// View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
// View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
@ -319,7 +332,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
model.setList(new ArrayList<>());
} else {
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
Map<Integer, Lines> lineMap = cacheService.getLineMap();
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
@ -369,7 +382,13 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
String cmdid = vo.getCmdId();
TerminalPhotoListForOpenModel model = new TerminalPhotoListForOpenModel();
Terminals terminals = terminalsDao.selectByCmdid(cmdid, CommonStatus.EFFECTIVE.value());
TerminalsExample example = new TerminalsExample();
example.createCriteria().andCmdidEqualTo(cmdid);
List<Terminals> lists = terminalsDao.selectByExample(example);
if (CollectionUtil.isEmpty(lists)) {
return Asserts.error("没有该装置信息");
}
Terminals terminals = lists.get(0);
if (BeanUtil.isEmpty(terminals)) {
return Asserts.error("没有该装置信息");
}
@ -566,7 +585,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
photolist.add(item.getPhotoId());
}
}
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
Map<Integer, Lines> lineMap = cacheService.getLineMap();
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
@ -685,7 +704,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
model.setList(new ArrayList<>());
} else {
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, LineAndDyNameDto> lineMap = cacheService.getLineMap();
Map<Integer, Lines> lineMap = cacheService.getLineMap();
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();

@ -416,8 +416,15 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
GetModel model = new GetModel();
Integer terminalid = vo.getTerminalid();
Integer channelid = vo.getChannelid();
String cmdIdByTermId = terminalsDao.getCmdIdByTermId(terminalid);
Terminals terminals = terminalsDao.selectByPrimaryKey(terminalid);
if (BeanUtil.isEmpty(terminals)) {
Asserts.fail("没有该装置");
}
String cmdIdByTermId = terminals.getCmdid();
if (StrUtil.isEmpty(cmdIdByTermId)) {
Asserts.fail("装置缺少cmdid");
}
int requestId = Constants.REQUEST_ID.addAndGet(1);
String cmd = CmaUtil.cmaSchelduleDetials(cmdIdByTermId, requestId, channelid);
ProcessExecUtils.exec(cmd);

@ -81,16 +81,18 @@ public class TerminalServiceImpl implements TerminalService {
@Autowired
CacheService cacheService;
@Autowired
View_Dy_Line_Tower_TerminalsDao view_dy_line_tower_terminalsDao;
/**
*
*
* @return
*/
@Override
public ServiceBody<TableDataInfo<TerminalsAndStatusDto>> getTerminalList(TerminalSelectVo vo) {
public ServiceBody<TableDataInfo<View_Dy_Line_Tower_Terminals>> getTerminalList(TerminalSelectVo vo) {
Map<Integer, TermAndChannelDto> termAndChannelMap = cacheService.getTermAndChannelMap();
Map<Integer, Protocols> protocolMap = cacheService.getProtocolMap();
Map<Integer, TerminalChannels> termChannelMap = cacheService.getTermChannelMap();
Map<Integer, DevType> devTypeMap = cacheService.getDevTypeMap();
Integer dyid = vo.getDyId();
Integer lineid = vo.getLineId();
@ -100,13 +102,77 @@ public class TerminalServiceImpl implements TerminalService {
BigInteger time = TerminalUtils.generateOnlineTime();
if (StrUtil.isEmpty(search)) {
search = null;
} else {
search = "%" + search + "%";
}
View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample();
example.setOrderByClause("id desc");
View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria();
if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) {
criteria.andDyIdEqualTo(dyid);
}
if (BeanUtil.isNotEmpty(lineid) && lineid.intValue() != -1) {
criteria.andLineIdEqualTo(lineid);
}
if (BeanUtil.isNotEmpty(tower) && tower.intValue() != -1) {
criteria.andTowerIdEqualTo(tower);
}
if (StrUtil.isNotEmpty(search)) {
criteria.andDyNameLike(search);
}
View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or();
if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) {
or.andDyIdEqualTo(dyid);
}
if (BeanUtil.isNotEmpty(lineid) && lineid.intValue() != -1) {
or.andLineIdEqualTo(lineid);
}
if (BeanUtil.isNotEmpty(tower) && tower.intValue() != -1) {
or.andTowerIdEqualTo(tower);
}
if (StrUtil.isNotEmpty(search)) {
or.andLineNameLike(search);
}
View_Dy_Line_Tower_TerminalsExample.Criteria toweror = example.or();
if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) {
toweror.andDyIdEqualTo(dyid);
}
if (BeanUtil.isNotEmpty(lineid) && lineid.intValue() != -1) {
toweror.andLineIdEqualTo(lineid);
}
if (BeanUtil.isNotEmpty(tower) && tower.intValue() != -1) {
toweror.andTowerIdEqualTo(tower);
}
if (StrUtil.isNotEmpty(search)) {
toweror.andTowerNameLike(search);
}
View_Dy_Line_Tower_TerminalsExample.Criteria criteria1 = example.or();
if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) {
criteria1.andDyIdEqualTo(dyid);
}
if (BeanUtil.isNotEmpty(lineid) && lineid.intValue() != -1) {
criteria1.andLineIdEqualTo(lineid);
}
if (BeanUtil.isNotEmpty(tower) && tower.intValue() != -1) {
criteria1.andTowerIdEqualTo(tower);
}
if (StrUtil.isNotEmpty(search)) {
criteria1.andCmdidLike(search);
}
if (BeanUtil.isNotEmpty(isonline)) {
if (CommonStatus.EFFECTIVE.value().equals(isonline)) {
example.createCriteria().andLastHeartbeatGreaterThanOrEqualTo(time.longValue());
} else {
example.createCriteria().andLastHeartbeatLessThanOrEqualTo(time.longValue());
}
}
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize);
List<TerminalsAndStatusDto> list = terminalsDao.selectTermAndStatusList(null, dyid, lineid, tower, search, isonline, time);
List<View_Dy_Line_Tower_Terminals> list = view_dy_line_tower_terminalsDao.selectByExample(example);
if (CollectionUtil.isNotEmpty(list)) {
for (TerminalsAndStatusDto item : list) {
for (View_Dy_Line_Tower_Terminals item : list) {
if (BeanUtil.isNotEmpty(item)) {
if (protocolMap != null) {
Integer protocol = item.getProtocol();
@ -128,14 +194,10 @@ public class TerminalServiceImpl implements TerminalService {
item.setList(new ArrayList<>());
} else {
for (TermChannelAndMapperDto items : channellist) {
Integer channelid = items.getChannelid();
TerminalChannels terminalChannels = termChannelMap.get(channelid);
terminalChannels.setAlias(items.getAlias());
TerminalChannels terminalChannels1 = new TerminalChannels();
terminalChannels1.setAlias(items.getAlias());
terminalChannels1.setChannelName(items.getChannelname());
terminalChannels1.setId(items.getId());
terminalChannels1.setId(items.getChannelid());
terminalChannels1.setMaxResolutionHeight(items.getMaxResolutionHeight());
terminalChannels1.setMaxResolutionWidth(items.getMaxResolutionWidth());
list1.add(terminalChannels1);
@ -162,11 +224,11 @@ public class TerminalServiceImpl implements TerminalService {
*/
@Override
public ServiceBody<String> addTerminal(TerminalVo vo) {
String cmdId = vo.getCmdId();
String cmdId = vo.getCmdid();
Terminals terminals = new Terminals();
BeanUtil.copyProperties(vo, terminals, CopyOptions.create().ignoreCase());
Date time = new Date();
terminals.setCreateTime(time);
Date createTime = new Date();
terminals.setCreateTime(createTime);
TerminalsExample example = new TerminalsExample();
example.createCriteria().andCmdidEqualTo(cmdId);
List<Terminals> bean = terminalsDao.selectByExample(example);
@ -183,11 +245,11 @@ public class TerminalServiceImpl implements TerminalService {
record.setChannelId(item.getId());
record.setAlias(item.getAlias());
record.setTermId(termid);
record.setCreateTime(createTime);
record.setTermId(termid);
list.add(record);
}
Date date = new Date();
terminalChannelMapperDao.insertList(list, date, date);
terminalChannelMapperDao.insertList(list);
}
cacheService.updateTerminalMap();
cacheService.updateTermAndChannelMap();
@ -211,9 +273,12 @@ public class TerminalServiceImpl implements TerminalService {
List<UpdateTerminalVo.Item> channelId = vo.getList();
Terminals terminals = new Terminals();
BeanUtil.copyProperties(vo, terminals, true);
terminals.setUpdateTime(new Date());
Date updateTime = new Date();
terminals.setUpdateTime(updateTime);
int i = terminalsDao.updateByPrimaryKeySelective(terminals);
terminalChannelMapperDao.deleteByTermId(termid);
TerminalChannelMapperExample example = new TerminalChannelMapperExample();
example.createCriteria().andTermIdEqualTo(termid);
terminalChannelMapperDao.deleteByExample(example);
if (CollectionUtil.isNotEmpty(channelId)) {
List<TerminalChannelMapper> list = new ArrayList<>();
for (UpdateTerminalVo.Item item : channelId) {
@ -221,10 +286,10 @@ public class TerminalServiceImpl implements TerminalService {
record.setChannelId(item.getId());
record.setAlias(item.getAlias());
record.setTermId(termid);
record.setCreateTime(updateTime);
list.add(record);
}
Date date = new Date();
terminalChannelMapperDao.insertList(list, date, date);
terminalChannelMapperDao.insertList(list);
}
cacheService.updateTerminalMap();
cacheService.updateTermAndChannelMap();
@ -244,26 +309,15 @@ public class TerminalServiceImpl implements TerminalService {
*/
@Override
public ServiceBody<String> deleteTerminal(TerminalIdListVo vo) {
Integer type = vo.getType();
if (type == null) {
type = CommonStatus.DELETE.value();
} else {
if (type == 0) {
type = CommonStatus.DELETE.value();
} else {
type = CommonStatus.EFFECTIVE.value();
}
}
ArrayList<Terminals> list = new ArrayList<>();
List<TerminalIdVo> beans = vo.getList();
for (TerminalIdVo item : beans) {
Terminals terminals = new Terminals();
terminals.setId(item.getTermid());
list.add(terminals);
List<Integer> list = vo.getList();
if (CollectionUtil.isEmpty(list)) {
Asserts.fail("删除参数错误");
}
int i = terminalsDao.deleteById(list, type, new Date());
cacheService.updateTerminalMap();
TerminalsExample example = new TerminalsExample();
example.createCriteria().andIdIn(list);
int i = terminalsDao.deleteByExample(example);
if (i != 0) {
cacheService.updateTerminalMap();
return Asserts.success("删除成功");
} else {
return Asserts.error("删除失败");
@ -291,8 +345,18 @@ public class TerminalServiceImpl implements TerminalService {
@Override
public ServiceBody<TerminalStatusModel> getTerminalStatus(Integer termId) {
if (BeanUtil.isEmpty(termId)) {
Asserts.fail("参数不能缺少");
}
TerminalStatusModel model = new TerminalStatusModel();
String cmdId = terminalsDao.getCmdIdByTermId(termId);
Terminals terminals = terminalsDao.selectByPrimaryKey(termId);
if (BeanUtil.isEmpty(terminals)) {
Asserts.fail("没有该装置");
}
String cmdId = terminals.getCmdid();
if (StrUtil.isEmpty(cmdId)) {
Asserts.fail("装置缺少cmdid");
}
String cmd = CmaUtil.getTerminalStatus(cmdId);
ProcessExecUtils.exec(cmd);
DateTime now = DateTime.now();
@ -335,7 +399,7 @@ public class TerminalServiceImpl implements TerminalService {
Integer termId = vo.getTermId();
String cmdId = vo.getCmdId();
String newCmdId = vo.getNewCmdId();
if (BeanUtil.isEmpty(termId) || BeanUtil.isEmpty(cmdId) ||BeanUtil.isEmpty(newCmdId)) {
if (BeanUtil.isEmpty(termId) || BeanUtil.isEmpty(cmdId) || BeanUtil.isEmpty(newCmdId)) {
Asserts.fail("缺少修改参数");
}
String cmd = CmaUtil.updateTerminalId(cmdId, newCmdId);

@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.TowerDto;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.entity.LinesExample;
import com.shxy.xymanager_common.entity.Towers;
import com.shxy.xymanager_common.entity.TowersExample;
@ -110,8 +111,13 @@ public class TowerServiceImpl implements TowerService {
@Override
public ServiceBody<String> updateTower(UpdateTowerVo vo) {
Towers towers = new Towers();
BeanUtil.copyProperties(vo, towers, true);
int i = towerDao.updateByPrimaryKeySelective(towers, new Date());
towers.setId(vo.getId());
towers.setName(vo.getName());
towers.setLineid(vo.getLineId());
towers.setOrder(vo.getOrder());
towers.setAddress(vo.getAddress());
towers.setUpdateTime(new Date());
int i = towerDao.updateByPrimaryKeySelective(towers);
if (i != 0) {
cacheService.updateTowerMap();
return Asserts.success("修改成功");

@ -1,10 +1,8 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.dto.TermAndChannelDto;
import com.shxy.xymanager_common.dto.TowerDto;
import com.shxy.xymanager_common.entity.*;
import org.springframework.cache.annotation.Cacheable;
import java.util.Map;
@ -45,7 +43,7 @@ public interface CacheService {
Map<Integer, Terminals> getTerminalMap();
Map<Integer, LineAndDyNameDto> getLineMap();
Map<Integer, Lines> getLineMap();
Map<Integer, TerminalChannels> updateTermChannelMap();
@ -55,5 +53,5 @@ public interface CacheService {
Map<Integer, Terminals> updateTerminalMap();
Map<Integer, LineAndDyNameDto> updateLineMap();
Map<Integer, Lines> updateLineMap();
}

@ -1,8 +1,8 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.entity.DyLevel;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.model.TerminalPhotosModel;
import com.shxy.xymanager_common.vo.LastTowerVo;
@ -34,7 +34,7 @@ public interface DyLevelService {
*
* @return
*/
ServiceBody<DyListModel> getdyList();
ServiceBody<List<DyLevel>> getdyList();
/**

@ -1,9 +1,9 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.model.LineAndGtAndChannelListModel;
import com.shxy.xymanager_common.model.LineListModel;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.page.TableDataInfo;
import com.shxy.xymanager_common.vo.*;
/**
@ -18,7 +18,7 @@ public interface LineService {
*
* @return
*/
ServiceBody<LineListModel> getLineList(SelectVo vo);
ServiceBody<TableDataInfo<Lines>> getLineList(SelectVo vo);
/**
* 线

@ -55,16 +55,6 @@ public interface SysUserService {
*/
void checkUserAllowed(SysUser user);
/**
*
*
* @param user
* @return
*/
Integer insertUser(SysUser user);
/**
*
*
@ -90,23 +80,6 @@ public interface SysUserService {
Boolean updateUserProfile(SysUser user);
/**
*
*
* @param user
* @return
*/
Boolean resetPwd(SysUser user);
/**
*
*
* @param userName
* @param password
* @return
*/
Boolean resetUserPwd(String userName, String password);
/**
* ID
*

@ -3,6 +3,7 @@ package com.shxy.xymanager_service.service;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.TerminalsAndStatusDto;
import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals;
import com.shxy.xymanager_common.excelbean.TerminalAndLastPicListExcelModel;
import com.shxy.xymanager_common.excelbean.TerminalListExcelModel;
import com.shxy.xymanager_common.model.*;
@ -22,7 +23,7 @@ public interface TerminalService {
*
* @return
*/
ServiceBody<TableDataInfo<TerminalsAndStatusDto>> getTerminalList(TerminalSelectVo vo);
ServiceBody<TableDataInfo<View_Dy_Line_Tower_Terminals>> getTerminalList(TerminalSelectVo vo);
/**
*

Loading…
Cancel
Save