Commit 800e7da2 by levphon

围栏管理-监控区域

1 parent d5d994be
...@@ -16,6 +16,9 @@ public class ElectricFenceExport { ...@@ -16,6 +16,9 @@ public class ElectricFenceExport {
@ExcelProperty(value = "围栏名称", index = 0) @ExcelProperty(value = "围栏名称", index = 0)
private String fenceName; private String fenceName;
@ExcelIgnore
private Integer shapeType;
@ExcelProperty(value = "监控类型", index = 1) @ExcelProperty(value = "监控类型", index = 1)
private String triggerType; private String triggerType;
......
...@@ -184,11 +184,14 @@ public class ElectricFenceService { ...@@ -184,11 +184,14 @@ public class ElectricFenceService {
//围栏形状类型 1.圆形(默认) 2.矩形 3.多边形 4.行政区域 //围栏形状类型 1.圆形(默认) 2.矩形 3.多边形 4.行政区域
fence.setShapeType(fenceBO.getShapeType()); fence.setShapeType(fenceBO.getShapeType());
fence.setRadius(null); fence.setRadius(null);
fence.setAnalysisAddress(null);
fence.setAreaCode(null); fence.setAreaCode(null);
fence.setAreaText(null); fence.setAreaText(null);
if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_CIRCLE) { if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_CIRCLE) {
fence.setRadius(fenceBO.getRadius()); fence.setRadius(fenceBO.getRadius());
String address = remoteGpsBsService.getAddressByLngAndLat(fenceBO.getLnglat().split(",")[0], fenceBO.getLnglat().split(",")[1]);
fence.setAnalysisAddress(address);
} else if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_POLYGON) { } else if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_POLYGON) {
//do nothing //do nothing
} else if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_ADMINISTRATIVE) { } else if (fenceBO.getShapeType() == ConstantsElectricFence.SHAPE_TYPE_ADMINISTRATIVE) {
......
...@@ -104,8 +104,10 @@ ...@@ -104,8 +104,10 @@
<select id="export" resultType="cn.com.glsx.admin.modules.model.export.ElectricFenceExport"> <select id="export" resultType="cn.com.glsx.admin.modules.model.export.ElectricFenceExport">
select tef.id, select tef.id,
tef.fence_name fenceName, tef.fence_name fenceName,
tef.shape_type shapeType,
tef.trigger_type triggerType, tef.trigger_type triggerType,
concat(date_format(tef.start_time,'%Y-%m-%d'),'----',date_format(tef.end_time,'%Y-%m-%d')) monitorTime, concat(date_format(tef.start_time,'%Y-%m-%d'),'----',date_format(tef.end_time,'%Y-%m-%d')) monitorTime,
tef.analysis_address monitorArea,
count(tefs.sn) linkDeviceCnt, count(tefs.sn) linkDeviceCnt,
(select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmDeviceCnt, (select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmDeviceCnt,
(select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmCnt, (select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmCnt,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!