杆塔新增地址

时间表修改
线路增加模糊查询
杆塔增加模糊查询
hunan
liuguijing 2 years ago
parent 94f87fc159
commit d0908dfd28

@ -34,7 +34,7 @@ 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 PageVo vo) {
public ResponseReult<LineListModel> getLineList(@RequestBody @Validated SelectVo vo) {
ServiceBody<LineListModel> serviceBody = lineService.getLineList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());

@ -8,10 +8,7 @@ import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.dto.TowerDto;
import com.shxy.xymanager_common.model.AllTowerListModel;
import com.shxy.xymanager_common.model.TowerListModel;
import com.shxy.xymanager_common.vo.PageVo;
import com.shxy.xymanager_common.vo.TowerIdVo;
import com.shxy.xymanager_common.vo.TowersVo;
import com.shxy.xymanager_common.vo.UpdateTowerVo;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_service.service.TowerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -51,7 +48,7 @@ public class TowerController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTowerList")
@Log(title = "获取杆塔列表", type = "查询")
public ResponseReult<TowerListModel> getTowerList(@RequestBody @Validated PageVo vo) {
public ResponseReult<TowerListModel> getTowerList(@RequestBody @Validated SelectVo vo) {
ServiceBody<TowerListModel> serviceBody = towerService.getTowerList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
@ -113,4 +110,5 @@ public class TowerController extends BaseController {
}
}

@ -51,11 +51,11 @@
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>eu.bitwalker</groupId>-->
<!-- <artifactId>UserAgentUtils</artifactId>-->
<!-- <version>1.21</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>eu.bitwalker</groupId>-->
<!-- <artifactId>UserAgentUtils</artifactId>-->
<!-- <version>1.21</version>-->
<!-- </dependency>-->
<!--指定swagger-models版本解决报错-->
<dependency>
@ -74,6 +74,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<!--用于解决tomcat中log4j2-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
</dependency>
<!-- 阿里JSON解析器 -->
@ -95,7 +100,6 @@
</dependency>
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
@ -123,18 +127,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- &lt;!&ndash;shiro&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.apache.shiro</groupId>-->
<!-- <artifactId>shiro-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- &lt;!&ndash;shiro&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.apache.shiro</groupId>-->
<!-- <artifactId>shiro-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
</dependencies>

@ -16,6 +16,8 @@ public class TerminalsWithHeart implements Serializable {
private String name;
private String address;
private String cmdid;
private Short orgId;

@ -14,6 +14,8 @@ public class TowerDto implements Serializable {
private String lineName;
private String address;
private Integer order;
private Integer status;

@ -13,8 +13,8 @@ public class Towers implements Serializable {
private Integer lineId;
private Integer order;
private Integer status;
private String address;
private Date createTime;
private Date updateTime;
}

@ -13,6 +13,13 @@ import java.util.List;
@Data
@ApiModel(value = "获取电压线路树状图列表", description = "获取电压线路树状图列表信息")
public class DyLineTreeListModel implements Serializable {
@ApiModelProperty(value = "装置总数", example = "123")
private Integer totalNum;
@ApiModelProperty(value = "装置在线总数", example = "152")
private Integer onlineNum;
@ApiModelProperty(value = "电压列表", example = "[]")
private List<DyListBean> list;
@ -66,6 +73,9 @@ public class DyLineTreeListModel implements Serializable {
@ApiModelProperty(value = "杆塔显示名", example = "名称名称")
private String name;
@ApiModelProperty(value = "杆塔地址", example = "名称名称")
private String address;
@ApiModelProperty(value = "装置显示名", example = "名称名称")
private String displayname;

@ -53,6 +53,12 @@ public class TerminalPhotosModel implements Serializable {
@ApiModelProperty(value = "别名", example = "123456")
private String alias;
@ApiModelProperty(value = "杆塔名称", example = "123456")
private String towername;
@ApiModelProperty(value = "杆塔地址", example = "123456")
private String address;
@ApiModelProperty(value = "预置位编号", example = "123456")
private Integer presetId;

@ -35,6 +35,9 @@ public class TowerListModel implements Serializable {
@ApiModelProperty(value = "杆塔名称", example = "AAAA")
private String name;
@ApiModelProperty(value = "杆塔地址", example = "AAAA")
private String address;
@ApiModelProperty(value = "线路编号", example = "123456")
private Integer lineId;

@ -174,6 +174,7 @@ public class ScheduleListUtils {
for (int i = 0; i < details.size(); i++) {
ScheduleDetailsDto dto = details.get(i);
if (XyNumberUtils.remainder(i, 3) == 0) {
scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
Integer hour = dto.getHour();
Integer minute = dto.getMinute();
Number mul = XyNumberUtils.mul((Number) hour, 60);
@ -182,7 +183,6 @@ public class ScheduleListUtils {
scheduleDetailsBean.setScheduleId(dto.getScheduleId());
scheduleDetailsBean.setSpan(add.intValue());
} else if (XyNumberUtils.remainder(i, 3) == 1) {
scheduleDetailsBean = new TerminalScheduleRuleModel.ScheduleRuleBean();
Integer hour = dto.getHour();
Integer minute = dto.getMinute();
Time time = MyDateUtils.HHMMToTime(hour, minute);

@ -0,0 +1,25 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.Min;
@Data
@Validated
@ApiModel(value = "杆塔和线路模糊查询对象", description = "杆塔和线路模糊查询对象")
public class SelectVo {
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
private String search;
@Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex;
@Min(value = 1, message = "分页大小最小为1")
@ApiModelProperty(value = "分页大小", required = true, example = "1")
private int pagesize;
}

@ -34,6 +34,9 @@ public class TerminalAlarmSelectVo {
@ApiModelProperty(value = "查询结束时间", example = "123455")
private Date endtime;
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
private String search;
@Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex;

@ -31,6 +31,9 @@ public class TowersVo {
@ApiModelProperty(value = "杆塔排序顺序", example = "12345678")
@NotNull(message = "杆塔排序顺序")
private Integer order;
@ApiModelProperty(value = "地址", example = "XXXXX")
private String address;
}

@ -27,5 +27,9 @@ public class UpdateTowerVo {
@NotNull(message = "排序")
private Integer order;
@ApiModelProperty(value = "地址", example = "地址地址")
@NotBlank(message = "地址地址")
private String address;
}

@ -1,5 +1,6 @@
package com.shxy.xymanager_dao.dao;
import cn.hutool.core.util.StrUtil;
import com.shxy.xymanager_common.dto.DyAndLineAndTowerAndTermDto;
import com.shxy.xymanager_common.dto.DyLineAndTerminalNoHeartDto;
import com.shxy.xymanager_common.dto.DyLineAndTerminalWithHeartDto;
@ -12,7 +13,7 @@ import java.util.List;
public interface DyLevelDao {
List<DyAndLineAndTowerAndTermDto> selectDyAndLineAndTowerAnTermList(@Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("termid") Integer termid, @Param("status") Integer status);
List<DyAndLineAndTowerAndTermDto> selectDyAndLineAndTowerAnTermList(@Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("termid") Integer termid, @Param("search") String search, @Param("status") Integer status);
List<DyLineAndTowertDto> selectDyAndLineAndTowerList(@Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("search") String search);

@ -1,5 +1,6 @@
package com.shxy.xymanager_dao.dao;
import cn.hutool.core.util.StrUtil;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
import com.shxy.xymanager_common.entity.Lines;
import org.apache.ibatis.annotations.Param;
@ -9,15 +10,15 @@ import java.util.List;
public interface LinesDao {
List<LineAndDyNameDto> selectAll(@Param("status") Integer status);
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);
int insertList(@Param("list") List<Lines> record, @Param("status") Integer status, @Param("createat") Date create, @Param("updateat") Date update);
int deleteById(@Param("list") List<Lines> record, @Param("status") Integer status,@Param("updateat") Date update);
int deleteById(@Param("list") List<Lines> record, @Param("status") Integer status, @Param("updateat") Date update);
Lines selectByPrimaryKey(Integer id);
List<Lines> selectLineByDyId(@Param("dyid")Integer dyid,@Param("status") Integer status);
List<Lines> selectLineByDyId(@Param("dyid") Integer dyid, @Param("status") Integer status);
int updateByPrimaryKeySelective(@Param("data") Lines record, @Param("updateat") Date update);

@ -12,7 +12,7 @@ public interface TowerDao {
int addTower(@Param("list") List<Towers> towersLst, @Param("status") Integer status, @Param("date") Date date);
List<TowerDto> selectAll(@Param("status") Integer status);
List<TowerDto> selectAll(@Param("status") Integer status,@Param("search") String search);
List<Towers> selectAllByLineid(@Param("lineid") Integer id, @Param("status") Integer status);

@ -22,7 +22,8 @@
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.TerminalsWithHeart">
<result column="term_id" jdbcType="INTEGER" property="id"/>
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
<result column="tower_name" jdbcType="INTEGER" property="name"/>
<result column="tower_name" jdbcType="VARCHAR" property="name"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
<result column="equip_name" jdbcType="VARCHAR" property="equipname"/>
<result column="display_name" jdbcType="VARCHAR" property="displayname"/>
@ -138,6 +139,9 @@
<if test="termid != null">
and d.id = #{termid}
</if>
<if test="search != null">
and (b.name like "%"#{search}"%" or c.name like "%"#{search}"%" or d.cmdid like "%"#{search}"%")
</if>
</where>
</select>
@ -185,6 +189,7 @@
d.id as term_id,
d.tower_id as tower_id,
c.name as tower_name,
c.address as address,
d.cmdid as cmdid,
d.equip_name as equip_name,
d.display_name as display_name,

@ -37,6 +37,9 @@
<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>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">

@ -7,6 +7,7 @@
<result column="line_id" jdbcType="INTEGER" property="lineId"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="order" jdbcType="INTEGER" property="order"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
@ -21,6 +22,7 @@
t.name as name,
l.id as lineId,
l.name as lineName,
t.address as address,
t.order as `order`,
t.status as status
from towers t,
@ -29,13 +31,16 @@
<if test="status != null">
and t.status = #{status,jdbcType=INTEGER}
</if>
<if test="search != null">
and (t.name like "%"#{search}"%" or l.name like "%"#{search}"%" or t.address like "%"#{search}"%")
</if>
order by t.`order` asc,l.id desc
</select>
<select id="selectAllByLineid" resultType="com.shxy.xymanager_common.entity.Towers">
select
id, name, line_id,`order`,status
id, name, line_id,`order`,status,address
from towers
where status = #{status}
<if test="lineid != null">
@ -51,6 +56,7 @@
l.id as lineId,
l.name as lineName,
t.order as `order`,
t.address as address,
t.status as status
from towers t,
`lines` l
@ -61,10 +67,10 @@
<insert id="addTower" parameterType="java.util.List">
insert into `towers`
(name,line_id,status,`order`,create_time,update_time)
(name,line_id,status,`order`,address,create_time,update_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.name},#{item.lineId},#{status},#{item.order},#{date},#{date})
(#{item.name},#{item.lineId},#{status},#{item.order},#{item.address},#{date},#{date})
</foreach>
</insert>
@ -90,6 +96,9 @@
<if test="data.order != null">
`order` = #{data.order},
</if>
<if test="data.address != null">
address = #{data.address},
</if>
update_time = #{update}
</set>
where id = #{data.id}

@ -261,7 +261,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "towerMap")
public Map<Integer, TowerDto> getTowerMap() {
Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>();
List<TowerDto> towerlist = towerDao.selectAll(null);
List<TowerDto> towerlist = towerDao.selectAll(null,null);
for (TowerDto item : towerlist) {
towerMap.put(item.getId(), item);
}
@ -283,7 +283,7 @@ public class CacheServiceImpl implements CacheService {
@Cacheable(value = "lineMap")
public Map<Integer, LineAndDyNameDto> getLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null);
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null,null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
lineMap.put(lineitem.getId(), lineitem);
}
@ -351,7 +351,7 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "towerMap")
public Map<Integer, TowerDto> updateTowerMap() {
Map<Integer, TowerDto> towerMap = new HashMap<Integer, TowerDto>();
List<TowerDto> towerlist = towerDao.selectAll(null);
List<TowerDto> towerlist = towerDao.selectAll(null,null);
for (TowerDto item : towerlist) {
towerMap.put(item.getId(), item);
}
@ -373,12 +373,11 @@ public class CacheServiceImpl implements CacheService {
@CachePut(value = "lineMap")
public Map<Integer, LineAndDyNameDto> updateLineMap() {
Map<Integer, LineAndDyNameDto> lineMap = new HashMap<Integer, LineAndDyNameDto>();
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null);
List<LineAndDyNameDto> lineAndDyNameDtos = linesDao.selectAll(null,null);
for (LineAndDyNameDto lineitem : lineAndDyNameDtos) {
lineMap.put(lineitem.getId(), lineitem);
}
return lineMap;
}
}

@ -50,21 +50,27 @@ public class DyLevelServiceImpl implements DyLevelService {
if (empty) {
model.setList(new ArrayList<>());
} else {
int onlinenum = 0;
int totalnum = 0;
List<DyLineTreeListModel.DyListBean> beans = BeanUtil.copyToList(list, DyLineTreeListModel.DyListBean.class, CopyOptions.create().ignoreCase());
for (int i = 0; i < beans.size(); i++) {
for (int j = 0; j < beans.get(i).getList().size(); j++) {
for (int k = 0; k < beans.get(i).getList().get(j).getList().size(); k++) {
totalnum++;
TerminalsWithHeart terminalsWithHeart = list.get(i).getList().get(j).getList().get(k);
BigInteger lastheartbeat = terminalsWithHeart.getLastheartbeat();
boolean b = TerminalUtils.judgeTerminalStatus(lastheartbeat);
if (b) {
beans.get(i).getList().get(j).getList().get(k).setOnlinestatus(CommonStatus.EFFECTIVE.value());
onlinenum++;
} else {
beans.get(i).getList().get(j).getList().get(k).setOnlinestatus(CommonStatus.DELETE.value());
}
}
}
}
model.setOnlineNum(onlinenum);
model.setTotalNum(totalnum);
model.setList(beans);
}
return Asserts.success(model);

@ -3,6 +3,7 @@ package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
@ -62,12 +63,16 @@ public class LineServiceImpl implements LineService {
* @return
*/
@Override
public ServiceBody<LineListModel> getLineList(PageVo vo) {
public ServiceBody<LineListModel> getLineList(SelectVo vo) {
String search = vo.getSearch();
if (StrUtil.isEmpty(search)) {
search = null;
}
LineListModel model = new LineListModel();
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize);
List<LineAndDyNameDto> list = linesDao.selectAll(CommonStatus.EFFECTIVE.value());
List<LineAndDyNameDto> list = linesDao.selectAll(CommonStatus.EFFECTIVE.value(),search);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());

@ -2,6 +2,7 @@ package com.shxy.xymanager_service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.*;
@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.math.BigInteger;
import java.sql.Struct;
import java.util.*;
@ -70,6 +72,10 @@ public class TerminalAlarmServiceImpl implements TerminalAlarmService {
Integer lineid = vo.getLineId();
Integer towerid = vo.getTowerId();
Integer label = vo.getLabel();
String search = vo.getSearch();
if (StrUtil.isEmpty(search)) {
search = null;
}
List<TerminalImgAlarmParams> labellist = new ArrayList<>();
Map<Integer, TerminalImgAlarmParams> alarmParamMap = cacheService.getAlarmParamMap();
if (label == null || label == -1) {
@ -91,30 +97,54 @@ public class TerminalAlarmServiceImpl implements TerminalAlarmService {
List<TerminalImgAlarmsDto> list = new ArrayList<>();
List<Integer> termidlist = new ArrayList<>();
if (dyid == null || dyid.intValue() == -1) {
PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(null, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
if (StrUtil.isEmpty(search)) {
PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(null, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
} else {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(null, null, null, null, search, CommonStatus.EFFECTIVE.value());
if (CollectionUtil.isEmpty(dtos)) {
list = new ArrayList<>();
} else {
for (DyAndLineAndTowerAndTermDto item1 : dtos) {
for (LineAndTowerAndTermDto item2 : item1.getList()) {
for (TowerAndTermDto item3 : item2.getList()) {
for (Terminals item4 : item3.getList()) {
termidlist.add(item4.getId());
}
}
}
}
PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(termidlist, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
}
}
} else {
if (lineid == null || lineid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, search, CommonStatus.EFFECTIVE.value());
} else {
if (towerid == null || towerid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, search, CommonStatus.EFFECTIVE.value());
} else {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, search, CommonStatus.EFFECTIVE.value());
}
}
for (DyAndLineAndTowerAndTermDto item1 : dtos) {
for (LineAndTowerAndTermDto item2 : item1.getList()) {
for (TowerAndTermDto item3 : item2.getList()) {
for (Terminals item4 : item3.getList()) {
termidlist.add(item4.getId());
if (CollectionUtil.isEmpty(dtos)) {
list = new ArrayList<>();
} else {
for (DyAndLineAndTowerAndTermDto item1 : dtos) {
for (LineAndTowerAndTermDto item2 : item1.getList()) {
for (TowerAndTermDto item3 : item2.getList()) {
for (Terminals item4 : item3.getList()) {
termidlist.add(item4.getId());
}
}
}
}
PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(termidlist, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
}
PageUtils.SetPage(pageindex, pagesize);
list = terminalImgAlarmsDao.selectAlarmsDetails(termidlist, labellist, BigInteger.valueOf(start), BigInteger.valueOf(end));
}
if (CollectionUtil.isNotEmpty(list)) {
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();

@ -180,15 +180,15 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end));
} else {
if (lineid == null || lineid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, null, CommonStatus.EFFECTIVE.value());
} else {
if (towerid == null || towerid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, null, CommonStatus.EFFECTIVE.value());
} else {
if (termid == null || termid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, null, CommonStatus.EFFECTIVE.value());
} else {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, CommonStatus.EFFECTIVE.value());
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, null, CommonStatus.EFFECTIVE.value());
}
}
}
@ -503,6 +503,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
Map<String, TerminalChannelMapper> termchannelMapMap = cacheService.getTermChannelMapMap();
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
Map<Integer, TerminalChannels> termchannelMap = cacheService.getTermChannelMap();
Map<Integer, TowerDto> towerMap = cacheService.getTowerMap();
List<TerminalPhoto> photoList = terminalPhotoDao.selectPhotosByIdList(photolist);
for (TerminalChannelMapper item : list) {
@ -518,6 +519,12 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
photosBean.setLineid(lineid);
photosBean.setDisplayname(terminals.getDisplayName());
photosBean.setCmdid(terminals.getCmdid());
Integer towerid = terminals.getTowerid();
TowerDto towerDto = towerMap.get(towerid);
if (towerDto != null) {
photosBean.setTowername(towerDto.getName());
photosBean.setAddress(towerDto.getAddress());
}
}
photosBean.setChannelid(channelid);
photosBean.setChannnelname(termchannelMap.get(channelid).getChannelName());

@ -3,6 +3,7 @@ package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.TowerDto;
@ -14,7 +15,6 @@ import com.shxy.xymanager_common.model.TowerListModel;
import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_dao.dao.TowerDao;
import com.shxy.xymanager_service.cache.XyCache;
import com.shxy.xymanager_service.service.CacheService;
import com.shxy.xymanager_service.service.TowerService;
import lombok.extern.slf4j.Slf4j;
@ -55,12 +55,16 @@ public class TowerServiceImpl implements TowerService {
}
@Override
public ServiceBody<TowerListModel> getTowerList(PageVo vo) {
public ServiceBody<TowerListModel> getTowerList(SelectVo vo) {
String search = vo.getSearch();
TowerListModel model = new TowerListModel();
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
if (StrUtil.isEmpty(search)) {
search = null;
}
PageUtils.SetPage(pageindex, pagesize);
List<TowerDto> list = towerDao.selectAll(CommonStatus.EFFECTIVE.value());
List<TowerDto> list = towerDao.selectAll(CommonStatus.EFFECTIVE.value(),search);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
@ -123,7 +127,7 @@ public class TowerServiceImpl implements TowerService {
@Override
public ServiceBody<AllTowerListModel> getAllTower() {
AllTowerListModel model = new AllTowerListModel();
List<TowerDto> list = towerDao.selectAll(CommonStatus.EFFECTIVE.value());
List<TowerDto> list = towerDao.selectAll(CommonStatus.EFFECTIVE.value(),null);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());

@ -18,7 +18,7 @@ public interface LineService {
*
* @return
*/
ServiceBody<LineListModel> getLineList(PageVo vo);
ServiceBody<LineListModel> getLineList(SelectVo vo);
/**
* 线

@ -26,7 +26,7 @@ public interface TowerService {
*
* @return
*/
ServiceBody<TowerListModel> getTowerList(PageVo vo);
ServiceBody<TowerListModel> getTowerList(SelectVo vo);

Loading…
Cancel
Save