Commit 7d210857 by 杨林龙

1.25.0 围栏报警增加设备类型字段

1 parent 1842d872
......@@ -18,6 +18,12 @@ public class ElectricFence extends BaseEntity {
private String fenceName;
/**
* 有线无线设备类型
*/
@Column(name = "source")
private Integer source;
/**
* 业务围栏类型 5警情围栏,12试驾围栏,13特约店围栏(12,13直接和大数据那边类型对应)
*/
@Column(name = "biz_fence_type")
......
......@@ -10,6 +10,17 @@ public class ElectricFenceDTO {
private Long id;
private String fenceName;
/**
* 有线无线围栏
*/
private Integer source;
/**
* 有限无线围栏字符串
*/
private String sourceStr;
private String bizFenceType;
private String triggerType;
......
......@@ -18,6 +18,11 @@ public class ElectricFenceDetailsDTO {
private String fenceName;
/**
* 设备类型
*/
private Integer source;
/**
* 业务围栏类型:12试驾线路,13门店围栏,14警情围栏
*/
private Integer bizFenceType;
......
......@@ -10,6 +10,11 @@ public class SimpleFenceDTO {
private String fenceName;
/**
* 设备类型
*/
private Integer source;
/**
* 业务围栏类型:12试驾围栏,13特约店围栏
*/
private Integer bizFenceType;
......
......@@ -16,39 +16,50 @@ public class ElectricFenceExport {
@ExcelProperty(value = "围栏名称", index = 0)
private String fenceName;
/**
* 设备类型
*/
private Integer source;
/**
* 设备类型字符串
*/
@ExcelProperty(value = "设备类型", index = 1)
private String sourceStr;
@ExcelIgnore
private Integer shapeType;
@ExcelProperty(value = "监控类型", index = 1)
@ExcelProperty(value = "监控类型", index = 2)
private String triggerType;
@ExcelProperty(value = "监控时间", index = 2)
@ExcelProperty(value = "监控时间", index = 3)
private String monitorTime;
@ExcelProperty(value = "监控区域", index = 3)
@ExcelProperty(value = "监控区域", index = 4)
private String monitorArea;
@ExcelProperty(value = "关联设备数", index = 4)
@ExcelProperty(value = "关联设备数", index = 5)
private Integer linkDeviceCnt;
@ExcelProperty(value = "报警设备数", index = 5)
@ExcelProperty(value = "报警设备数", index = 6)
private Integer alarmDeviceCnt;
@ExcelProperty(value = "最新报警时间", index = 6)
@ExcelProperty(value = "最新报警时间", index = 7)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date lastAlarmDate;
@ExcelProperty(value = "状态", index = 7)
@ExcelProperty(value = "状态", index = 8)
private String enableStatusDesc;
@ExcelProperty(value = "预警次数", index = 8)
@ExcelProperty(value = "预警次数", index = 9)
private Integer alarmCnt;
@ExcelProperty(value = "创建时间", index = 9)
@ExcelProperty(value = "创建时间", index = 10)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate;
@ExcelProperty(value = "创建人", index = 10)
@ExcelProperty(value = "创建人", index = 11)
private String creator;
}
......@@ -36,6 +36,12 @@ public class ElectricFenceBO {
private String fenceName;
/**
* 设备类型
*/
@NotNull(message = "设备类型不能为空")
private Integer source;
/**
* 业务围栏类型 0警情围栏,1试驾围栏
*/
private Integer bizFenceType;
......
......@@ -4,6 +4,7 @@ import cn.com.glsx.admin.common.constants.ConstantsElectricFence;
import cn.com.glsx.admin.common.enums.BizFenceTypeEnum;
import cn.com.glsx.admin.common.enums.FenceTriggerTypeEnum;
import cn.com.glsx.admin.common.enums.ResultEnum;
import cn.com.glsx.admin.common.enums.TypeConverseEnum;
import cn.com.glsx.admin.common.exception.AdminException;
import cn.com.glsx.admin.dto.AddElectricFenceRequest;
import cn.com.glsx.admin.modules.component.EFenceComponent;
......@@ -71,13 +72,19 @@ public class ElectricFenceService {
public PageInfo<ElectricFenceDTO> search(ElectricFenceSearch search) {
Page page = PageHelper.startPage(search.getPageNumber(), search.getPageSize());
List<ElectricFenceDTO> list = electricFenceMapper.search(search);
list.forEach(index -> index.setTriggerType(FenceTriggerTypeEnum.getDescByCode(Integer.valueOf(index.getTriggerType()))));
list.forEach(index -> {
index.setTriggerType(FenceTriggerTypeEnum.getDescByCode(Integer.valueOf(index.getTriggerType())));
index.setSourceStr(TypeConverseEnum.SourceEnum.getStrBySourceType(index.getSource()));
});
return new PageInfo<>(list);
}
public List<ElectricFenceExport> export(ElectricFenceSearch search) {
List<ElectricFenceExport> list = electricFenceMapper.export(search);
list.forEach(index -> index.setTriggerType(FenceTriggerTypeEnum.getDescByCode(Integer.valueOf(index.getTriggerType()))));
list.forEach(index -> {
index.setTriggerType(FenceTriggerTypeEnum.getDescByCode(Integer.valueOf(index.getTriggerType())));
index.setSourceStr(TypeConverseEnum.SourceEnum.getStrBySourceType(index.getSource()));
});
return list;
}
......
......@@ -7,6 +7,7 @@
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="fence_name" jdbcType="VARCHAR" property="fenceName"/>
<result column="source" jdbcType="TINYINT" property="source"/>
<result column="biz_fence_type" jdbcType="TINYINT" property="bizFenceType"/>
<result column="location_type" jdbcType="TINYINT" property="locationType"/>
<result column="shape_type" jdbcType="TINYINT" property="shapeType"/>
......@@ -38,7 +39,7 @@
<!--
WARNING - @mbg.generated
-->
id, fence_name, biz_fence_type, location_type, shape_type, radius,
id, fence_name, `source`, biz_fence_type, location_type, shape_type, radius,
trigger_type, time_type, start_time, end_time, `enable_status`, remark, area_code, area_text,
record, analysis_address, tel_numbers, del_flag, created_date, created_by,
updated_date, updated_by
......@@ -53,6 +54,7 @@
<select id="search" resultType="cn.com.glsx.admin.modules.model.ElectricFenceDTO">
select tef.id,
tef.fence_name fenceName,
tef.source source,
tef.biz_fence_type as bizFenceType,
tef.trigger_type triggerType,
tef.time_type timeType,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!