From 9bdbed5175cc2c9baea45a1a3c86c87eb454bbca Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 20 Oct 2021 20:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E5=91=A8=E8=BE=B9=E9=87=8D?= =?UTF-8?q?=E7=82=B9=E4=BA=BA=E5=91=98=20=E6=B6=89=E5=8F=8A=E5=B8=88?= =?UTF-8?q?=E7=94=9F=E5=AE=89=E5=85=A8=E7=9A=84=E6=A1=88=EF=BC=88=E4=BA=8B?= =?UTF-8?q?=EF=BC=89=E4=BB=B6=20=E4=BB=A5=E4=B8=8A=E4=B8=A4=E9=A1=B9?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8E=E5=AD=A6=E6=A0=A1=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/bos/schoolkey/SchoolKeyBO.java | 9 ++++ .../pojo/bos/stuteasafe/StuTeaSafeBO.java | 9 ++++ .../pojo/dtos/schoolkey/SchoolKeyDTO.java | 10 ++++ .../pojo/dtos/stuteasafe/StuTeaSafeDTO.java | 10 ++++ .../pojo/pos/schoolkey/SchoolKeyPO.java | 9 ++++ .../pojo/pos/stuteasafe/StuTeaSafePO.java | 9 ++++ .../pojo/vos/schoolkey/SchoolKeyVO.java | 10 ++++ .../pojo/vos/stuteasafe/StuTeaSafeVO.java | 10 ++++ .../mapper/schoolkey/school-key-mapper.xml | 26 ++++++++++ .../mapper/stuteasafe/stu-tea-safe-mapper.xml | 26 ++++++++++ src/main/resources/templates/school/list.html | 52 +++++++++++++++++++ .../resources/templates/schoolkey/list.html | 9 ++-- .../resources/templates/schoolkey/save.html | 2 + .../resources/templates/stuteasafe/list.html | 9 ++-- .../resources/templates/stuteasafe/save.html | 2 + 15 files changed, 194 insertions(+), 8 deletions(-) diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/bos/schoolkey/SchoolKeyBO.java b/src/main/java/cn/com/tenlion/systembase/pojo/bos/schoolkey/SchoolKeyBO.java index 391093f..d3b43e7 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/bos/schoolkey/SchoolKeyBO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/bos/schoolkey/SchoolKeyBO.java @@ -11,6 +11,7 @@ package cn.com.tenlion.systembase.pojo.bos.schoolkey; public class SchoolKeyBO { private String schoolKeyId; + private String schoolId; private String baseId; private String degreeOfHarm; private String degreeOfHarmName; @@ -25,6 +26,14 @@ public class SchoolKeyBO { this.schoolKeyId = schoolKeyId; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getBaseId() { return baseId == null ? "" : baseId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/bos/stuteasafe/StuTeaSafeBO.java b/src/main/java/cn/com/tenlion/systembase/pojo/bos/stuteasafe/StuTeaSafeBO.java index aa82234..529f65b 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/bos/stuteasafe/StuTeaSafeBO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/bos/stuteasafe/StuTeaSafeBO.java @@ -11,6 +11,7 @@ package cn.com.tenlion.systembase.pojo.bos.stuteasafe; public class StuTeaSafeBO { private String stuTeaSafeId; + private String schoolId; private String caseCode; private String caseName; private String happenTime; @@ -41,6 +42,14 @@ public class StuTeaSafeBO { this.stuTeaSafeId = stuTeaSafeId; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getCaseCode() { return caseCode == null ? "" : caseCode.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/schoolkey/SchoolKeyDTO.java b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/schoolkey/SchoolKeyDTO.java index c5592aa..a2bd15f 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/schoolkey/SchoolKeyDTO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/schoolkey/SchoolKeyDTO.java @@ -16,6 +16,8 @@ public class SchoolKeyDTO { @ApiModelProperty(name = "schoolKeyId", value = "主键UUID") private String schoolKeyId; + @ApiModelProperty(name = "schoolId", value = "学校ID") + private String schoolId; @ApiModelProperty(name = "baseId", value = "基础人员信息表ID") private String baseId; @ApiModelProperty(name = "degreeOfHarm", value = "危害程度字典表ID") @@ -35,6 +37,14 @@ public class SchoolKeyDTO { this.schoolKeyId = schoolKeyId; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getBaseId() { return baseId == null ? "" : baseId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/stuteasafe/StuTeaSafeDTO.java b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/stuteasafe/StuTeaSafeDTO.java index 758f5ff..1d5564f 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/stuteasafe/StuTeaSafeDTO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/stuteasafe/StuTeaSafeDTO.java @@ -16,6 +16,8 @@ public class StuTeaSafeDTO { @ApiModelProperty(name = "stuTeaSafeId", value = "主键UUID") private String stuTeaSafeId; + @ApiModelProperty(name = "schoolId", value = "学校ID") + private String schoolId; @ApiModelProperty(name = "caseCode", value = "案(事)件编号") private String caseCode; @ApiModelProperty(name = "caseName", value = "案(事)件名称") @@ -59,6 +61,14 @@ public class StuTeaSafeDTO { @ApiModelProperty(name = "caseSolve", value = "案件侦破情况") private String caseSolve; + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getStuTeaSafeId() { return stuTeaSafeId == null ? "" : stuTeaSafeId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/pos/schoolkey/SchoolKeyPO.java b/src/main/java/cn/com/tenlion/systembase/pojo/pos/schoolkey/SchoolKeyPO.java index ce8db80..f4c25fb 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/pos/schoolkey/SchoolKeyPO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/pos/schoolkey/SchoolKeyPO.java @@ -11,6 +11,7 @@ package cn.com.tenlion.systembase.pojo.pos.schoolkey; public class SchoolKeyPO { private String schoolKeyId; + private String schoolId; private String baseId; private String degreeOfHarm; private String degreeOfHarmName; @@ -25,6 +26,14 @@ public class SchoolKeyPO { this.schoolKeyId = schoolKeyId; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getBaseId() { return baseId == null ? "" : baseId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/pos/stuteasafe/StuTeaSafePO.java b/src/main/java/cn/com/tenlion/systembase/pojo/pos/stuteasafe/StuTeaSafePO.java index 345c772..729277f 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/pos/stuteasafe/StuTeaSafePO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/pos/stuteasafe/StuTeaSafePO.java @@ -11,6 +11,7 @@ package cn.com.tenlion.systembase.pojo.pos.stuteasafe; public class StuTeaSafePO { private String stuTeaSafeId; + private String schoolId; private String caseCode; private String caseName; private String happenTime; @@ -41,6 +42,14 @@ public class StuTeaSafePO { this.stuTeaSafeId = stuTeaSafeId; } + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getCaseCode() { return caseCode == null ? "" : caseCode.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/vos/schoolkey/SchoolKeyVO.java b/src/main/java/cn/com/tenlion/systembase/pojo/vos/schoolkey/SchoolKeyVO.java index c59954e..1156469 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/vos/schoolkey/SchoolKeyVO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/vos/schoolkey/SchoolKeyVO.java @@ -16,6 +16,8 @@ import io.swagger.annotations.ApiModelProperty; @ApiModel public class SchoolKeyVO { + @ApiModelProperty(name = "schoolId", value = "学校ID") + private String schoolId; @ApiModelProperty(name = "baseId", value = "基础人员信息表ID") private String baseId; @ApiModelProperty(name = "degreeOfHarm", value = "危害程度字典表ID") @@ -28,6 +30,14 @@ public class SchoolKeyVO { @CheckNumberAnnotation(name = "是否关注") private Integer isFollow; + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getBaseId() { return baseId == null ? "" : baseId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/vos/stuteasafe/StuTeaSafeVO.java b/src/main/java/cn/com/tenlion/systembase/pojo/vos/stuteasafe/StuTeaSafeVO.java index e6f01da..6f2069b 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/vos/stuteasafe/StuTeaSafeVO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/vos/stuteasafe/StuTeaSafeVO.java @@ -16,6 +16,8 @@ import io.swagger.annotations.ApiModelProperty; @ApiModel public class StuTeaSafeVO { + @ApiModelProperty(name = "schoolId", value = "学校ID") + private String schoolId; @ApiModelProperty(name = "caseCode", value = "案(事)件编号") private String caseCode; @ApiModelProperty(name = "caseName", value = "案(事)件名称") @@ -64,6 +66,14 @@ public class StuTeaSafeVO { @ApiModelProperty(name = "caseSolve", value = "案件侦破情况") private String caseSolve; + public String getSchoolId() { + return schoolId; + } + + public void setSchoolId(String schoolId) { + this.schoolId = schoolId; + } + public String getCaseCode() { return caseCode == null ? "" : caseCode.trim(); } diff --git a/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml b/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml index 97bea62..ec14610 100644 --- a/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml +++ b/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml @@ -4,6 +4,7 @@ + @@ -13,6 +14,7 @@ + @@ -22,6 +24,7 @@ + @@ -38,6 +41,7 @@ degree_of_harm_name, degree_of_harm_code, is_follow, + school_id, creator, gmt_create, modifier, @@ -50,6 +54,7 @@ #{degreeOfHarmName}, #{degreeOfHarmCode}, #{isFollow}, + #{schoolId}, #{creator}, #{gmtCreate}, #{modifier}, @@ -89,6 +94,9 @@ UPDATE data_school_key SET + + school_id = #{schoolId}, + base_id = #{baseId}, @@ -115,6 +123,7 @@ SELECT t1.school_key_id, + t1.school_id, t1.base_id, t1.degree_of_harm, t1.degree_of_harm_name, @@ -153,6 +163,7 @@ SELECT t1.school_key_id, + t1.school_id, t1.base_id, t1.degree_of_harm, t1.degree_of_harm_name, @@ -188,6 +200,10 @@ t1.id LIKE CONCAT('%', #{keywords}, '%') ) + + AND + t1.school_id = #{schoolId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} @@ -209,6 +225,7 @@ SELECT t1.school_key_id, + t1.school_id, t1.base_id, t1.degree_of_harm, t1.degree_of_harm_name, @@ -260,6 +282,10 @@ t1.id LIKE CONCAT('%', #{keywords}, '%') ) + + AND + t1.school_id = #{schoolId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} diff --git a/src/main/resources/mybatis/mapper/stuteasafe/stu-tea-safe-mapper.xml b/src/main/resources/mybatis/mapper/stuteasafe/stu-tea-safe-mapper.xml index d915f9b..c8de212 100644 --- a/src/main/resources/mybatis/mapper/stuteasafe/stu-tea-safe-mapper.xml +++ b/src/main/resources/mybatis/mapper/stuteasafe/stu-tea-safe-mapper.xml @@ -4,6 +4,7 @@ + @@ -29,6 +30,7 @@ + @@ -54,6 +56,7 @@ + @@ -81,6 +84,7 @@ INSERT INTO data_stu_tea_safe( stu_tea_safe_id, + school_id, case_code, case_name, happen_time, @@ -109,6 +113,7 @@ is_delete ) VALUES( #{stuTeaSafeId}, + #{schoolId}, #{caseCode}, #{caseName}, #{happenTime}, @@ -169,6 +174,9 @@ UPDATE data_stu_tea_safe SET + + school_id = #{schoolId}, + case_code = #{caseCode}, @@ -242,6 +250,7 @@ SELECT t1.stu_tea_safe_id, + t1.school_id, t1.case_code, t1.case_name, t1.happen_time, @@ -313,6 +323,7 @@ SELECT t1.stu_tea_safe_id, + t1.school_id, t1.case_code, t1.case_name, t1.happen_time, @@ -380,6 +392,10 @@ t1.id LIKE CONCAT('%', #{keywords}, '%') ) + + AND + t1.school_id = #{schoolId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} @@ -401,6 +417,7 @@ SELECT t1.stu_tea_safe_id, + t1.school_id, t1.case_code, t1.case_name, t1.happen_time, @@ -484,6 +506,10 @@ t1.id LIKE CONCAT('%', #{keywords}, '%') ) + + AND + t1.school_id = #{schoolId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} diff --git a/src/main/resources/templates/school/list.html b/src/main/resources/templates/school/list.html index d08a7a8..fc345e8 100644 --- a/src/main/resources/templates/school/list.html +++ b/src/main/resources/templates/school/list.html @@ -247,6 +247,18 @@ } return rowData; } + }, + {field: 'schoolKey', fixed: 'right', width: 150, title: '周边重点人员', align:'center', + templet: function(row) { + var rowData = '添加重点人员'; + return rowData; + } + }, + {field: 'stuteasafe', fixed: 'right', width: 150, title: '涉及师生安全案件', align:'center', + templet: function(row) { + var rowData = '添加案件'; + return rowData; + } } ] ], @@ -261,6 +273,46 @@ } }); } + + + // 巡查记录 + function schoolKey(data) { + top.dialog.open({ + url: top.restAjax.path('route/schoolkey/list?schoolId={schoolId}', [data.schoolId]), + title: "巡查记录列表", + width: '80%', + height: '80%', + onClose: function() { + reloadTable(); + } + }); + } + + // 巡查记录 + function stuteasafe(data) { + top.dialog.open({ + url: top.restAjax.path('route/stuteasafe/list?schoolId={schoolId}', [data.schoolId]), + title: "巡查记录列表", + width: '80%', + height: '80%', + onClose: function() { + reloadTable(); + } + }); + } + + //监听行单击事件 + table.on('tool(dataTable)', function(obj){ + var data = obj.data; + console.log(data) + // 周边重点人员 + if('schoolKey' == obj.event) { + schoolKey(data); + }else if('stuteasafe' == obj.event) { + stuteasafe(data); + } + }); + // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { diff --git a/src/main/resources/templates/schoolkey/list.html b/src/main/resources/templates/schoolkey/list.html index 1da941e..5380a9d 100644 --- a/src/main/resources/templates/schoolkey/list.html +++ b/src/main/resources/templates/schoolkey/list.html @@ -65,14 +65,15 @@ var laydate = layui.laydate; var common = layui.common; var resizeTimeout = null; - var tableUrl = 'api/schoolkey/listpage'; + var tableUrl = 'api/schoolkey/listpage?schoolId={schoolId}'; + var schoolId = top.restAjax.params(window.location.href).schoolId; // 初始化表格 function initTable() { table.render({ elem: '#dataTable', id: 'dataTable', - url: top.restAjax.path(tableUrl, []), + url: top.restAjax.path(tableUrl, [schoolId]), width: admin.screen() > 1 ? '100%' : '', height: $win.height() - 90, limit: 20, @@ -129,7 +130,7 @@ // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { - url: top.restAjax.path(tableUrl, []), + url: top.restAjax.path(tableUrl, [schoolId]), where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), @@ -201,7 +202,7 @@ area: ['100%', '100%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/schoolkey/save', []), + content: top.restAjax.path('route/schoolkey/save?schoolId={schoolId}', [schoolId]), end: function() { reloadTable(); } diff --git a/src/main/resources/templates/schoolkey/save.html b/src/main/resources/templates/schoolkey/save.html index 74b1fa2..a4b4c85 100644 --- a/src/main/resources/templates/schoolkey/save.html +++ b/src/main/resources/templates/schoolkey/save.html @@ -137,6 +137,7 @@ var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; + var schoolId = top.restAjax.params(window.location.href).schoolId; $(document).on('click','#search',function(){ queryBasePopulationInfo($('#idCardNumber').val()); @@ -232,6 +233,7 @@ top.dialog.confirm(top.dataMessage.commit, function(index) { top.dialog.close(index); var loadLayerIndex; + formData.field['schoolId'] = schoolId; top.restAjax.post(top.restAjax.path('api/schoolkey/save', []), formData.field, null, function(code, data) { var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { time: 0, diff --git a/src/main/resources/templates/stuteasafe/list.html b/src/main/resources/templates/stuteasafe/list.html index f8ea855..ac5ebb3 100644 --- a/src/main/resources/templates/stuteasafe/list.html +++ b/src/main/resources/templates/stuteasafe/list.html @@ -65,14 +65,15 @@ var laydate = layui.laydate; var common = layui.common; var resizeTimeout = null; - var tableUrl = 'api/stuteasafe/listpage'; + var tableUrl = 'api/stuteasafe/listpage?schoolId={schoolId}'; + var schoolId = top.restAjax.params(window.location.href).schoolId; // 初始化表格 function initTable() { table.render({ elem: '#dataTable', id: 'dataTable', - url: top.restAjax.path(tableUrl, []), + url: top.restAjax.path(tableUrl, [schoolId]), width: admin.screen() > 1 ? '100%' : '', height: $win.height() - 90, limit: 20, @@ -264,7 +265,7 @@ // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { - url: top.restAjax.path(tableUrl, []), + url: top.restAjax.path(tableUrl, [schoolId]), where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), @@ -336,7 +337,7 @@ area: ['100%', '100%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/stuteasafe/save', []), + content: top.restAjax.path('route/stuteasafe/save?schoolId={schoolId}', [schoolId]), end: function() { reloadTable(); } diff --git a/src/main/resources/templates/stuteasafe/save.html b/src/main/resources/templates/stuteasafe/save.html index e014bad..1d9af18 100644 --- a/src/main/resources/templates/stuteasafe/save.html +++ b/src/main/resources/templates/stuteasafe/save.html @@ -160,6 +160,7 @@ var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; + var schoolId = top.restAjax.params(window.location.href).schoolId; // 初始化备注富文本 function initCaseSituationRichText() { @@ -342,6 +343,7 @@ top.dialog.confirm(top.dataMessage.commit, function(index) { top.dialog.close(index); var loadLayerIndex; + formData.field['schoolId'] = schoolId; top.restAjax.post(top.restAjax.path('api/stuteasafe/save', []), formData.field, null, function(code, data) { var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { time: 0,