From 0bf150765f4068e13f703790239dedb6bdb864ef Mon Sep 17 00:00:00 2001 From: weidong Date: Fri, 17 Jan 2025 14:59:49 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/imdroid/secapi/dto/GnssDevice.java | 2 +- .../com/imdroid/secapi/dto/GnssStatusJoin.java | 2 ++ .../beidou/controller/GnssDeviceController.java | 5 +++++ .../beidou/controller/GnssStatusController.java | 2 +- .../resources/templates/page/gnss_dev_cfg.html | 14 ++++++++++++-- .../main/resources/templates/page/gnss_status.html | 10 ++++++++++ .../templates/page/table/gnss_add_dev.html | 8 ++++++++ 7 files changed, 39 insertions(+), 4 deletions(-) diff --git a/sec-api/src/main/java/com/imdroid/secapi/dto/GnssDevice.java b/sec-api/src/main/java/com/imdroid/secapi/dto/GnssDevice.java index c72bbdf4..1aa5fcdc 100644 --- a/sec-api/src/main/java/com/imdroid/secapi/dto/GnssDevice.java +++ b/sec-api/src/main/java/com/imdroid/secapi/dto/GnssDevice.java @@ -65,5 +65,5 @@ public class GnssDevice { // 日志记录控制 private Short loggingmode; - + private String remark; } diff --git a/sec-api/src/main/java/com/imdroid/secapi/dto/GnssStatusJoin.java b/sec-api/src/main/java/com/imdroid/secapi/dto/GnssStatusJoin.java index 79097482..171ac194 100644 --- a/sec-api/src/main/java/com/imdroid/secapi/dto/GnssStatusJoin.java +++ b/sec-api/src/main/java/com/imdroid/secapi/dto/GnssStatusJoin.java @@ -92,4 +92,6 @@ public class GnssStatusJoin { Double longitude; @ExcelProperty("海拔") Double altitude; + @ExcelProperty("备注") + String remark; } diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssDeviceController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssDeviceController.java index 0bf45895..c457a80b 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssDeviceController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssDeviceController.java @@ -135,6 +135,11 @@ public class GnssDeviceController extends BasicController{ if (StringUtils.hasText(appver)) { queryWrapper.like("appver", appver); } + //备注 + String remark = search.getString("remark"); + if (StringUtils.hasText(remark)) { + queryWrapper.like("remark", remark); + } //使用状态 Integer opmode = search.getInteger("opmode"); if (opmode != null && opmode != QUERY_ALL) { diff --git a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssStatusController.java b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssStatusController.java index 28cdd822..d367f4bd 100644 --- a/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssStatusController.java +++ b/sec-beidou/src/main/java/com/imdroid/beidou/controller/GnssStatusController.java @@ -99,7 +99,7 @@ public class GnssStatusController extends BasicController implements CommonExcel public MPJQueryWrapper prepareQueryWrapper() { return new MPJQueryWrapper() .selectAll(GnssStatus.class) - .select("d.devicetype as devicetype") + .select("d.devicetype as devicetype,d.remark as remark") .leftJoin("gnssdevices d on t.deviceid = d.deviceid") .orderByDesc("t.updatetime"); } diff --git a/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html b/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html index e6dd4004..dc065381 100644 --- a/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html +++ b/sec-beidou/src/main/resources/templates/page/gnss_dev_cfg.html @@ -82,6 +82,12 @@ +
+ +
+ +
+
@@ -113,6 +119,7 @@ table = layui.table; var cfg_cols = [ {field: 'deviceid', title: '设备号', width: 100, sort: true}, + {field: 'remark', title: '备注', width: 100}, {field: 'project_id', title: '项目号', width: 120, sort: true}, {field: 'sector', title: '桩号', width: 120, sort: true}, {field: 'name', title: '监测点号', width: 80}, @@ -131,10 +138,13 @@ {title: '操作', toolbar: '#currentTableBar', fixed: "right", width: 120} ]; if([[${role}]] == "USER") { - cfg_cols[15].hide = true; + cfg_cols[17].hide = true; + } + else if([[${role}]] != "SUPER_ADMIN") { + cfg_cols[1].hide = true; } if([[${tenant_id}]] != 0) { - cfg_cols[10].hide = true; + cfg_cols[11].hide = true; } /** * 初始化表单,要加上,不然刷新部分组件可能会不加载 diff --git a/sec-beidou/src/main/resources/templates/page/gnss_status.html b/sec-beidou/src/main/resources/templates/page/gnss_status.html index 73278088..264d5985 100644 --- a/sec-beidou/src/main/resources/templates/page/gnss_status.html +++ b/sec-beidou/src/main/resources/templates/page/gnss_status.html @@ -61,6 +61,12 @@ +
+ +
+ +
+
@@ -92,6 +98,7 @@ table = layui.table; var cfg_cols = [ {field: 'deviceid', title: '设备号', sort: true}, + {field: 'remark', title: '备注', width: 100}, {field: 'devicetype', title: '设备类型',templet: '#typeTrans'}, {field: 'updatetime', title: '更新时间', templet: "
{{layui.util.toDateString(d.updatetime, 'yyyy-MM-dd HH:mm:ss')}}
"}, {field: 'state', title: '状态',templet: '#stateTrans'}, @@ -107,6 +114,9 @@ {field: 'latitude', title: '纬度'}, {title: '操作', toolbar: '#currentTableBar', fixed: "right", width: 80} ]; + if([[${role}]] != "SUPER_ADMIN") { + cfg_cols[1].hide = true; + } /** * 初始化表单,要加上,不然刷新部分组件可能会不加载 */ diff --git a/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html b/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html index 73be45ea..311601e3 100644 --- a/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html +++ b/sec-beidou/src/main/resources/templates/page/table/gnss_add_dev.html @@ -207,6 +207,13 @@

+
+ +
+ +
+
+
@@ -312,6 +319,7 @@ $('#ecefz').val(data.ecefz); $('#model').val(data.model); $('#sector').val(data.sector); + $('#remark').val(data.remark); setEcefEditor(); form.render(); }