diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java index c32e802..19531a2 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java @@ -1,18 +1,27 @@ package com.shxy.xymanager_admin.controller; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; 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.PermissionDetail; 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.entity.View_Dy_Line_Tower_Terminals; +import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_TerminalsExample; +import com.shxy.xymanager_common.enums.CommonStatus; import com.shxy.xymanager_common.model.DyLineTreeListModel; import com.shxy.xymanager_common.model.TerminalPhotosModel; +import com.shxy.xymanager_common.page.PageUtils; +import com.shxy.xymanager_common.page.TableDataInfo; import com.shxy.xymanager_common.util.xinyin.HeaderUtil; -import com.shxy.xymanager_common.vo.DyListVo; -import com.shxy.xymanager_common.vo.DyTreeListVo; -import com.shxy.xymanager_common.vo.LastTowerVo; +import com.shxy.xymanager_common.vo.*; +import com.shxy.xymanager_dao.dao.View_Dy_Line_Tower_TerminalsDao; import com.shxy.xymanager_service.service.DyLevelService; +import com.shxy.xymanager_service.service.UserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; @@ -39,6 +48,12 @@ public class DyLevelController extends BaseController { @Autowired DyLevelService dyLevelService; + @Autowired + UserService userService; + + @Autowired + View_Dy_Line_Tower_TerminalsDao view_dy_line_tower_terminalsDao; + @ApiOperation(value = "增加电压", notes = "增加电压", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/add") @@ -56,7 +71,7 @@ public class DyLevelController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/delete") @Log(title = "删除电压", type = "查询") - public ResponseReult deleteDy(@Validated @NotNull(message = "id不能为空!") Integer vo) { + public ResponseReult deleteDy(@RequestBody @Validated LineIdVo vo) { ServiceBody serviceBody = dyLevelService.delete(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); @@ -82,8 +97,8 @@ public class DyLevelController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/listAll") @Log(title = "查询电压", type = "查询") - public ResponseReult> listAll() { - ServiceBody> serviceBody = dyLevelService.listAll(); + public ResponseReult> listAll(@RequestBody @Validated SelectVo vo) { + ServiceBody> serviceBody = dyLevelService.listAll(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java index f3aaa6b..0bd7c05 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java @@ -55,6 +55,20 @@ public class TerminalPhotoController extends BaseController { } } +// @ApiOperation(value = "告警划线", notes = "告警划线", httpMethod = "POST") +// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) +// @RequestMapping("/takeAlarm") +// @Log(title = "告警划线", type = "查询") +// public ResponseReult takeAlarm(@Validated TerminalPhotoVo vo) { +// ServiceBody serviceBody = terminalPhotoService.takeAlarm(vo); +// if (serviceBody.getCode() == ServiceStatus.SUCCESS) { +// return ResponseReult.success(serviceBody.getData()); +// } else { +// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); +// } +// } + + @ApiOperation(value = "主动拍照下发状态查询", notes = "主动拍照下发状态查询接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getTakePicStatus") diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TermChannelCoordinateDto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TermChannelCoordinateDto.java index 29db325..c588b7b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TermChannelCoordinateDto.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TermChannelCoordinateDto.java @@ -8,7 +8,6 @@ import lombok.Data; @Data public class TermChannelCoordinateDto { - private float x1; private float x2; @@ -17,5 +16,4 @@ public class TermChannelCoordinateDto { private float y1; - } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java index 2d420ba..05235ac 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java @@ -28,6 +28,10 @@ public class View_Dy_Line_Tower_Terminals implements Serializable { @ApiModelProperty(value = "电压编号", example = "123456") private String dyName; + private Date dyCreateTime; + + private Date dyUpdateTime; + @ApiModelProperty(value = "线路编号", example = "123456") private Integer lineId; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_TerminalsExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_TerminalsExample.java index 96e863f..9b7b7de 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_TerminalsExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_TerminalsExample.java @@ -331,6 +331,126 @@ public class View_Dy_Line_Tower_TerminalsExample { return (Criteria) this; } + public Criteria andDyCreateTimeIsNull() { + addCriterion("dy_create_time is null"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeIsNotNull() { + addCriterion("dy_create_time is not null"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeEqualTo(Date value) { + addCriterion("dy_create_time =", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeNotEqualTo(Date value) { + addCriterion("dy_create_time <>", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeGreaterThan(Date value) { + addCriterion("dy_create_time >", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("dy_create_time >=", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeLessThan(Date value) { + addCriterion("dy_create_time <", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("dy_create_time <=", value, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeIn(List values) { + addCriterion("dy_create_time in", values, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeNotIn(List values) { + addCriterion("dy_create_time not in", values, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeBetween(Date value1, Date value2) { + addCriterion("dy_create_time between", value1, value2, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("dy_create_time not between", value1, value2, "dyCreateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeIsNull() { + addCriterion("dy_update_time is null"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeIsNotNull() { + addCriterion("dy_update_time is not null"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeEqualTo(Date value) { + addCriterion("dy_update_time =", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeNotEqualTo(Date value) { + addCriterion("dy_update_time <>", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeGreaterThan(Date value) { + addCriterion("dy_update_time >", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("dy_update_time >=", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeLessThan(Date value) { + addCriterion("dy_update_time <", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("dy_update_time <=", value, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeIn(List values) { + addCriterion("dy_update_time in", values, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeNotIn(List values) { + addCriterion("dy_update_time not in", values, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeBetween(Date value1, Date value2) { + addCriterion("dy_update_time between", value1, value2, "dyUpdateTime"); + return (Criteria) this; + } + + public Criteria andDyUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("dy_update_time not between", value1, value2, "dyUpdateTime"); + return (Criteria) this; + } + public Criteria andLineIdIsNull() { addCriterion("line_id is null"); return (Criteria) this; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TowerListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TowerListModel.java index bce9ccf..822ac75 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TowerListModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TowerListModel.java @@ -28,6 +28,11 @@ public class TowerListModel implements Serializable { @Data public static class TowerBean { + @ApiModelProperty(value = "电压编号", example = "123456") + private Integer dyid; + + @ApiModelProperty(value = "电压名称", example = "123456") + private String dyname; @ApiModelProperty(value = "杆塔编号", example = "123456") private Integer id; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SelectVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SelectVo.java index 56367a6..52e2c2d 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SelectVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SelectVo.java @@ -12,6 +12,12 @@ import javax.validation.constraints.Min; @ApiModel(value = "杆塔和线路模糊查询对象", description = "杆塔和线路模糊查询对象") public class SelectVo { + @ApiModelProperty(value = "电压id", example = "电压id") + private Integer dyId; + + @ApiModelProperty(value = "线路id", example = "线路id") + private Integer lineId; + @ApiModelProperty(value = "搜索内容", example = "搜索内容字段") private String search; @@ -22,4 +28,5 @@ public class SelectVo { @Min(value = 1, message = "分页大小最小为1") @ApiModelProperty(value = "分页大小", required = true, example = "1") private int pagesize; + } diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index 50c04dd..c0e090a 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -122,12 +122,12 @@ - - - - - - + + +
diff --git a/xymanager_dao/src/main/resources/mappers/View_Dy_Line_Tower_TerminalsDao.xml b/xymanager_dao/src/main/resources/mappers/View_Dy_Line_Tower_TerminalsDao.xml index 801ebc5..390fcc8 100644 --- a/xymanager_dao/src/main/resources/mappers/View_Dy_Line_Tower_TerminalsDao.xml +++ b/xymanager_dao/src/main/resources/mappers/View_Dy_Line_Tower_TerminalsDao.xml @@ -1,530 +1,564 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - - - - - - - - or ${criterion.condition} - - - or ${criterion.condition} #{criterion.value} - - - or ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - or ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - + + + + + id, dy_id, dy_name, dy_create_time, dy_update_time, line_id, line_name, line_bs_manufacturer, + tower_id, tower_name, address, `order`, 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, last_heartbeat + + + + + delete from v_dy_line_tower_terminals + + + + + + + insert into v_dy_line_tower_terminals (id, dy_id, dy_name, + dy_create_time, dy_update_time, line_id, + line_name, line_bs_manufacturer, tower_id, + tower_name, address, `order`, + 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, last_heartbeat + ) + values (#{id,jdbcType=INTEGER}, #{dyId,jdbcType=INTEGER}, #{dyName,jdbcType=VARCHAR}, + #{dyCreateTime,jdbcType=TIMESTAMP}, #{dyUpdateTime,jdbcType=TIMESTAMP}, #{lineId,jdbcType=INTEGER}, + #{lineName,jdbcType=VARCHAR}, #{lineBsManufacturer,jdbcType=VARCHAR}, #{towerId,jdbcType=INTEGER}, + #{towerName,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{order,jdbcType=INTEGER}, + #{cmdid,jdbcType=VARCHAR}, #{orgId,jdbcType=SMALLINT}, #{equipName,jdbcType=VARCHAR}, + #{displayName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{essentialInfoVersion,jdbcType=VARCHAR}, + #{hasPan,jdbcType=TINYINT}, #{bsManufacturer,jdbcType=VARCHAR}, #{bsProductionDate,jdbcType=DATE}, + #{bsIdentifier,jdbcType=VARCHAR}, #{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}, #{lastHeartbeat,jdbcType=BIGINT} + ) + + + + insert into v_dy_line_tower_terminals + + + id, + + + dy_id, + + + dy_name, + + + dy_create_time, + + + dy_update_time, + + + line_id, + + + line_name, + + + line_bs_manufacturer, + + + tower_id, + + + tower_name, + + + address, + + + `order`, + + + 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, + + + last_heartbeat, + + + + + #{id,jdbcType=INTEGER}, + + + #{dyId,jdbcType=INTEGER}, + + + #{dyName,jdbcType=VARCHAR}, + + + #{dyCreateTime,jdbcType=TIMESTAMP}, + + + #{dyUpdateTime,jdbcType=TIMESTAMP}, + + + #{lineId,jdbcType=INTEGER}, + + + #{lineName,jdbcType=VARCHAR}, + + + #{lineBsManufacturer,jdbcType=VARCHAR}, + + + #{towerId,jdbcType=INTEGER}, + + + #{towerName,jdbcType=VARCHAR}, + + + #{address,jdbcType=VARCHAR}, + + + #{order,jdbcType=INTEGER}, + + + #{cmdid,jdbcType=VARCHAR}, + + + #{orgId,jdbcType=SMALLINT}, + + + #{equipName,jdbcType=VARCHAR}, + + + #{displayName,jdbcType=VARCHAR}, + + + #{model,jdbcType=VARCHAR}, + + + #{essentialInfoVersion,jdbcType=VARCHAR}, + + + #{hasPan,jdbcType=TINYINT}, + + + #{bsManufacturer,jdbcType=VARCHAR}, + + + #{bsProductionDate,jdbcType=DATE}, + + + #{bsIdentifier,jdbcType=VARCHAR}, + + + #{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}, + + + #{lastHeartbeat,jdbcType=BIGINT}, + + + + + + update v_dy_line_tower_terminals + + + id = #{record.id,jdbcType=INTEGER}, + + + dy_id = #{record.dyId,jdbcType=INTEGER}, + + + dy_name = #{record.dyName,jdbcType=VARCHAR}, + + + dy_create_time = #{record.dyCreateTime,jdbcType=TIMESTAMP}, + + + dy_update_time = #{record.dyUpdateTime,jdbcType=TIMESTAMP}, + + + line_id = #{record.lineId,jdbcType=INTEGER}, + + + line_name = #{record.lineName,jdbcType=VARCHAR}, + + + line_bs_manufacturer = #{record.lineBsManufacturer,jdbcType=VARCHAR}, + + + tower_id = #{record.towerId,jdbcType=INTEGER}, + + + tower_name = #{record.towerName,jdbcType=VARCHAR}, + + + address = #{record.address,jdbcType=VARCHAR}, + + + `order`= #{record.order,jdbcType=INTEGER}, + + + cmdid = #{record.cmdid,jdbcType=VARCHAR}, + + + org_id = #{record.orgId,jdbcType=SMALLINT}, + + + equip_name = #{record.equipName,jdbcType=VARCHAR}, + + + display_name = #{record.displayName,jdbcType=VARCHAR}, + + + model = #{record.model,jdbcType=VARCHAR}, + + + essential_info_version = #{record.essentialInfoVersion,jdbcType=VARCHAR}, + + + has_pan = #{record.hasPan,jdbcType=TINYINT}, + + + bs_manufacturer = #{record.bsManufacturer,jdbcType=VARCHAR}, + + + bs_production_date = #{record.bsProductionDate,jdbcType=DATE}, + + + bs_identifier = #{record.bsIdentifier,jdbcType=VARCHAR}, + + + latitude = #{record.latitude,jdbcType=DOUBLE}, + + + longitude = #{record.longitude,jdbcType=DOUBLE}, + + + status = #{record.status,jdbcType=INTEGER}, + + + protocol = #{record.protocol,jdbcType=INTEGER}, + + + sim = #{record.sim,jdbcType=VARCHAR}, + + + working_date = #{record.workingDate,jdbcType=DATE}, + + + net_type = #{record.netType,jdbcType=TINYINT}, + + + dev_type = #{record.devType,jdbcType=TINYINT}, + + + phase = #{record.phase,jdbcType=VARCHAR}, + + + equipment_type = #{record.equipmentType,jdbcType=VARCHAR}, + + + last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT}, + + + + - - - - - id, dy_id, dy_name, line_id, line_name, line_bs_manufacturer, tower_id, tower_name, - address, `order`, 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, last_heartbeat,count(id) as termcount - - - - - delete from v_dy_line_tower_terminals - - - - - - insert into v_dy_line_tower_terminals (id, dy_id, dy_name, - line_id, line_name, line_bs_manufacturer, - tower_id, tower_name, address, - order, 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, - 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}, #{address,jdbcType=VARCHAR}, - #{order,jdbcType=INTEGER}, #{cmdid,jdbcType=VARCHAR}, #{orgId,jdbcType=SMALLINT}, - #{equipName,jdbcType=VARCHAR}, #{displayName,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, - #{essentialInfoVersion,jdbcType=VARCHAR}, #{hasPan,jdbcType=TINYINT}, #{bsManufacturer,jdbcType=VARCHAR}, - #{bsProductionDate,jdbcType=DATE}, #{bsIdentifier,jdbcType=VARCHAR}, #{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}, - #{lastHeartbeat,jdbcType=BIGINT}) - - - insert into v_dy_line_tower_terminals - - - id, - - - dy_id, - - - dy_name, - - - line_id, - - - line_name, - - - line_bs_manufacturer, - - - tower_id, - - - tower_name, - - - address, - - - order, - - - 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, - - - last_heartbeat, - - - - - #{id,jdbcType=INTEGER}, - - - #{dyId,jdbcType=INTEGER}, - - - #{dyName,jdbcType=VARCHAR}, - - - #{lineId,jdbcType=INTEGER}, - - - #{lineName,jdbcType=VARCHAR}, - - - #{lineBsManufacturer,jdbcType=VARCHAR}, - - - #{towerId,jdbcType=INTEGER}, - - - #{towerName,jdbcType=VARCHAR}, - - - #{address,jdbcType=VARCHAR}, - - - #{order,jdbcType=INTEGER}, - - - #{cmdid,jdbcType=VARCHAR}, - - - #{orgId,jdbcType=SMALLINT}, - - - #{equipName,jdbcType=VARCHAR}, - - - #{displayName,jdbcType=VARCHAR}, - - - #{model,jdbcType=VARCHAR}, - - - #{essentialInfoVersion,jdbcType=VARCHAR}, - - - #{hasPan,jdbcType=TINYINT}, - - - #{bsManufacturer,jdbcType=VARCHAR}, - - - #{bsProductionDate,jdbcType=DATE}, - - - #{bsIdentifier,jdbcType=VARCHAR}, - - - #{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}, - - - #{lastHeartbeat,jdbcType=BIGINT}, - - - - - - update v_dy_line_tower_terminals - - - id = #{record.id,jdbcType=INTEGER}, - - + + + update v_dy_line_tower_terminals + set id = #{record.id,jdbcType=INTEGER}, dy_id = #{record.dyId,jdbcType=INTEGER}, - - dy_name = #{record.dyName,jdbcType=VARCHAR}, - - + dy_create_time = #{record.dyCreateTime,jdbcType=TIMESTAMP}, + dy_update_time = #{record.dyUpdateTime,jdbcType=TIMESTAMP}, line_id = #{record.lineId,jdbcType=INTEGER}, - - line_name = #{record.lineName,jdbcType=VARCHAR}, - - line_bs_manufacturer = #{record.lineBsManufacturer,jdbcType=VARCHAR}, - - tower_id = #{record.towerId,jdbcType=INTEGER}, - - tower_name = #{record.towerName,jdbcType=VARCHAR}, - - address = #{record.address,jdbcType=VARCHAR}, - - - order = #{record.order,jdbcType=INTEGER}, - - + 'order' = #{record.order,jdbcType=INTEGER}, cmdid = #{record.cmdid,jdbcType=VARCHAR}, - - org_id = #{record.orgId,jdbcType=SMALLINT}, - - equip_name = #{record.equipName,jdbcType=VARCHAR}, - - display_name = #{record.displayName,jdbcType=VARCHAR}, - - model = #{record.model,jdbcType=VARCHAR}, - - essential_info_version = #{record.essentialInfoVersion,jdbcType=VARCHAR}, - - has_pan = #{record.hasPan,jdbcType=TINYINT}, - - bs_manufacturer = #{record.bsManufacturer,jdbcType=VARCHAR}, - - bs_production_date = #{record.bsProductionDate,jdbcType=DATE}, - - bs_identifier = #{record.bsIdentifier,jdbcType=VARCHAR}, - - latitude = #{record.latitude,jdbcType=DOUBLE}, - - longitude = #{record.longitude,jdbcType=DOUBLE}, - - status = #{record.status,jdbcType=INTEGER}, - - protocol = #{record.protocol,jdbcType=INTEGER}, - - sim = #{record.sim,jdbcType=VARCHAR}, - - working_date = #{record.workingDate,jdbcType=DATE}, - - net_type = #{record.netType,jdbcType=TINYINT}, - - dev_type = #{record.devType,jdbcType=TINYINT}, - - phase = #{record.phase,jdbcType=VARCHAR}, - - equipment_type = #{record.equipmentType,jdbcType=VARCHAR}, - - - last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT}, - - - - - - - - update v_dy_line_tower_terminals - set id = #{record.id,jdbcType=INTEGER}, - dy_id = #{record.dyId,jdbcType=INTEGER}, - dy_name = #{record.dyName,jdbcType=VARCHAR}, - line_id = #{record.lineId,jdbcType=INTEGER}, - line_name = #{record.lineName,jdbcType=VARCHAR}, - line_bs_manufacturer = #{record.lineBsManufacturer,jdbcType=VARCHAR}, - tower_id = #{record.towerId,jdbcType=INTEGER}, - tower_name = #{record.towerName,jdbcType=VARCHAR}, - address = #{record.address,jdbcType=VARCHAR}, - order = #{record.order,jdbcType=INTEGER}, - cmdid = #{record.cmdid,jdbcType=VARCHAR}, - org_id = #{record.orgId,jdbcType=SMALLINT}, - equip_name = #{record.equipName,jdbcType=VARCHAR}, - display_name = #{record.displayName,jdbcType=VARCHAR}, - model = #{record.model,jdbcType=VARCHAR}, - essential_info_version = #{record.essentialInfoVersion,jdbcType=VARCHAR}, - has_pan = #{record.hasPan,jdbcType=TINYINT}, - bs_manufacturer = #{record.bsManufacturer,jdbcType=VARCHAR}, - bs_production_date = #{record.bsProductionDate,jdbcType=DATE}, - bs_identifier = #{record.bsIdentifier,jdbcType=VARCHAR}, - latitude = #{record.latitude,jdbcType=DOUBLE}, - longitude = #{record.longitude,jdbcType=DOUBLE}, - status = #{record.status,jdbcType=INTEGER}, - protocol = #{record.protocol,jdbcType=INTEGER}, - sim = #{record.sim,jdbcType=VARCHAR}, - working_date = #{record.workingDate,jdbcType=DATE}, - net_type = #{record.netType,jdbcType=TINYINT}, - dev_type = #{record.devType,jdbcType=TINYINT}, - phase = #{record.phase,jdbcType=VARCHAR}, - equipment_type = #{record.equipmentType,jdbcType=VARCHAR}, - last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT} - - - - + last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT} + + + + + + + + + + + + + or ${criterion.condition} + + + or ${criterion.condition} #{criterion.value} + + + or ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + or ${criterion.condition} + + #{listItem} + + + + + + + + + + \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java index 30cf500..fa04f29 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/DyLevelServiceImpl.java @@ -1,6 +1,8 @@ package com.shxy.xymanager_service.impl; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.bean.PermissionDetail; import com.shxy.xymanager_common.bean.ServiceBody; @@ -11,9 +13,12 @@ import com.shxy.xymanager_common.exception.Asserts; import com.shxy.xymanager_common.model.DyLineTreeListModel; import com.shxy.xymanager_common.model.TerminalPhotosModel; import com.shxy.xymanager_common.page.PageUtils; +import com.shxy.xymanager_common.page.TableDataInfo; import com.shxy.xymanager_common.util.xinyin.TerminalUtils; import com.shxy.xymanager_common.vo.DyTreeListVo; import com.shxy.xymanager_common.vo.LastTowerVo; +import com.shxy.xymanager_common.vo.LineIdVo; +import com.shxy.xymanager_common.vo.SelectVo; import com.shxy.xymanager_dao.dao.*; import com.shxy.xymanager_service.service.CacheService; import com.shxy.xymanager_service.service.DyLevelService; @@ -25,6 +30,7 @@ import org.springframework.stereotype.Service; import java.math.BigInteger; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; @@ -304,13 +310,21 @@ public class DyLevelServiceImpl implements DyLevelService { @Override public ServiceBody add(DyLevel vo) { + vo.setCreateTime(new Date()); dyLevelDao.insertSelective(vo); return Asserts.success("success"); } @Override - public ServiceBody delete(Integer vo) { - dyLevelDao.deleteByPrimaryKey(vo); + public ServiceBody delete(LineIdVo vo) { + List list = vo.getList(); + if (CollectionUtil.isNotEmpty(list)) { + DyLevelExample example = new DyLevelExample(); + example.createCriteria().andIdIn(list); + dyLevelDao.deleteByExample(example); + } else { + Asserts.fail("删除编号不能缺少"); + } return Asserts.success("success"); } @@ -321,10 +335,76 @@ public class DyLevelServiceImpl implements DyLevelService { } @Override - public ServiceBody> listAll() { - DyLevelExample example = new DyLevelExample(); - List dyLevels = dyLevelDao.selectByExample(example); - return Asserts.success(dyLevels); + public ServiceBody> listAll(SelectVo vo) { + TableDataInfo model = new TableDataInfo<>(); + String search = vo.getSearch(); + int pageindex = vo.getPageindex(); + int pagesize = vo.getPagesize(); + Integer dyid = vo.getDyId(); + + PermissionDetail permissionListOver = userService.getPermissionList(); + List dypList = permissionListOver.getDypList(); + List linepList = permissionListOver.getLinepList(); + List towerpList = permissionListOver.getTowerpList(); + List termpList = permissionListOver.getTermpList(); + + View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample(); + example.setGroupByClause("dy_id"); + example.setOrderByClause("dy_id desc"); + if (CommonStatus.DELETE.value().equals(permissionListOver.getIsSuper())) { + View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria(); + if (CollectionUtil.isNotEmpty(dypList)) { + criteria.andDyIdIn(dypList); + } + if (CollectionUtil.isNotEmpty(linepList)) { + criteria.andLineIdIn(linepList); + } + if (CollectionUtil.isNotEmpty(towerpList)) { + criteria.andTowerIdIn(towerpList); + } + if (CollectionUtil.isNotEmpty(termpList)) { + criteria.andLineIdIn(termpList); + } + } + if (StrUtil.isEmpty(search)) { + search = null; + } else { + search = "%" + search + "%"; + } + if (StrUtil.isNotEmpty(search)) { + View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or(); + or.andDyNameLike(search); + } + if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) { + View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or(); + or2.andDyIdEqualTo(dyid); + } + + PageUtils.SetPage(pageindex, pagesize); + List list = view_dy_line_tower_terminalsDao.selectByPermission(example); + ArrayList dylist = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(list)) { + for (View_Dy_Line_Tower_Terminals item : list) { + DyLevel bean = new DyLevel(); + bean.setId(item.getDyId()); + bean.setName(item.getDyName()); + bean.setCreateTime(item.getDyCreateTime()); + bean.setUpdateTime(item.getDyUpdateTime()); + dylist.add(bean); + } + } + model.setList(dylist); + TableDataInfo pageData = PageUtils.getDataTable(list); + int currentpage = pageData.getCurrentpage(); + model.setCurrentpage(currentpage); + long total = pageData.getTotal(); + model.setTotal(total); + + int pageSize = pageData.getPagesize(); + model.setPagesize(pageSize); + int pages = pageData.getTotalpage(); + model.setTotalpage(pages); + return Asserts.success(model); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java index e020167..9c1474f 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java @@ -72,9 +72,10 @@ public class LineServiceImpl implements LineService { @Override public ServiceBody> getLineList(SelectVo vo) { TableDataInfo model = new TableDataInfo(); + String search = vo.getSearch(); + Integer dyid = vo.getDyId(); PermissionDetail permissionListOver = userService.getPermissionListOver(); List pList = permissionListOver.getLinepList(); - String search = vo.getSearch(); if (StrUtil.isEmpty(search)) { search = null; } else { @@ -91,6 +92,12 @@ public class LineServiceImpl implements LineService { criteria.andLineIdIn(pList); } } + + if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) { + View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or(); + or2.andDyIdEqualTo(dyid); + } + if (StrUtil.isNotBlank(search)) { View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or(); or.andLineNameLike(search); diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TowerServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TowerServiceImpl.java index 6f726ff..a96d642 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TowerServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TowerServiceImpl.java @@ -68,29 +68,59 @@ public class TowerServiceImpl implements TowerService { @Override public ServiceBody getTowerList(SelectVo vo) { TowerListModel model = new TowerListModel(); - PermissionDetail permissionListOver = userService.getPermissionListOver(); - List towerpList = permissionListOver.getTowerpList(); String search = vo.getSearch(); + Integer dyid = vo.getDyId(); + Integer lineId = vo.getLineId(); + int pageindex = vo.getPageindex(); + int pagesize = vo.getPagesize(); if (StrUtil.isEmpty(search)) { search = null; } else { search = "%" + search + "%"; } - int pageindex = vo.getPageindex(); - int pagesize = vo.getPagesize(); + PermissionDetail permissionListOver = userService.getPermissionList(); + List dypList = permissionListOver.getDypList(); + List linepList = permissionListOver.getLinepList(); + List towerpList = permissionListOver.getTowerpList(); + List termpList = permissionListOver.getTermpList(); + View_Dy_Line_Tower_TerminalsExample example = new View_Dy_Line_Tower_TerminalsExample(); example.setGroupByClause("tower_id"); - example.setOrderByClause("id desc"); - View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria(); + example.setOrderByClause("tower_id desc"); if (CommonStatus.DELETE.value().equals(permissionListOver.getIsSuper())) { - criteria.andTowerIdIn(towerpList); + View_Dy_Line_Tower_TerminalsExample.Criteria criteria = example.createCriteria(); + if (CollectionUtil.isNotEmpty(dypList)) { + criteria.andDyIdIn(dypList); + } + if (CollectionUtil.isNotEmpty(linepList)) { + criteria.andLineIdIn(linepList); + } + if (CollectionUtil.isNotEmpty(towerpList)) { + criteria.andTowerIdIn(towerpList); + } + if (CollectionUtil.isNotEmpty(termpList)) { + criteria.andLineIdIn(termpList); + } } - if (StrUtil.isNotBlank(search)) { + if (StrUtil.isEmpty(search)) { + search = null; + } else { + search = "%" + search + "%"; + } + if (StrUtil.isNotEmpty(search)) { View_Dy_Line_Tower_TerminalsExample.Criteria or = example.or(); or.andTowerNameLike(search); - or.andLineNameLike(search); or.andAddressLike(search); } + if (BeanUtil.isNotEmpty(dyid) && dyid.intValue() != -1) { + View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or(); + or2.andDyIdEqualTo(dyid); + } + + if (BeanUtil.isNotEmpty(lineId) && lineId.intValue() != -1) { + View_Dy_Line_Tower_TerminalsExample.Criteria or2 = example.or(); + or2.andLineIdEqualTo(lineId); + } PageUtils.SetPage(pageindex, pagesize); List list = view_dy_line_tower_terminalsDao.selectByPermission(example); boolean empty = CollectionUtil.isEmpty(list); @@ -100,6 +130,8 @@ public class TowerServiceImpl implements TowerService { ArrayList list1 = new ArrayList<>(); for (View_Dy_Line_Tower_Terminals item : list) { TowerListModel.TowerBean towerBean = new TowerListModel.TowerBean(); + towerBean.setDyid(item.getDyId()); + towerBean.setDyname(item.getDyName()); towerBean.setId(item.getTowerId()); towerBean.setLineId(item.getLineId()); towerBean.setLineName(item.getLineName()); diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java index 42a6990..23abd0b 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java @@ -74,7 +74,9 @@ public class UploadServiceImpl implements UploadService { int pageindex = vo.getPageindex(); int pagesize = vo.getPagesize(); PageUtils.SetPage(pageindex, pagesize); - List list = terminalUploadDao.selectByExample(new TerminalUploadExample()); + TerminalUploadExample example = new TerminalUploadExample(); + example.setOrderByClause("id desc"); + List list = terminalUploadDao.selectByExample(example); if (CollectionUtil.isNotEmpty(list)) { for (TerminalUpload item : list) { item.setPath(path+item.getPath()); diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java index f1fe00d..c90d34a 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/DyLevelService.java @@ -4,8 +4,11 @@ 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.TerminalPhotosModel; +import com.shxy.xymanager_common.page.TableDataInfo; import com.shxy.xymanager_common.vo.DyTreeListVo; import com.shxy.xymanager_common.vo.LastTowerVo; +import com.shxy.xymanager_common.vo.LineIdVo; +import com.shxy.xymanager_common.vo.SelectVo; import java.util.List; @@ -48,10 +51,10 @@ public interface DyLevelService { ServiceBody add(DyLevel vo); - ServiceBody delete(Integer vo); + ServiceBody delete(LineIdVo vo); ServiceBody update(DyLevel vo); - ServiceBody> listAll(); + ServiceBody> listAll(SelectVo vo); }