From c320eac5ad97e0ab5a2564d2eb5f0cbad9c73e6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E6=B2=85?= <907037276@qq.com>
Date: Thu, 7 Mar 2024 12:26:01 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81swagger=E6=8E=A5=E5=8F=A3=E6=96=87?=
=?UTF-8?q?=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/pom.xml | 6 +-
web/src/main/resources/sql/jlw/logoInfo.md | 47 ++++++
web/src/main/resources/sql/jlw/schoolClass.md | 10 +-
web/src/main/resources/sql/jlw/teacher.md | 14 ++
.../resources/static/js/jlw/logoInfo/index.js | 114 ++++++++++++++
.../js/jlw/resourcesApplication/index.js | 2 +-
.../resources/templates/jlw/logoInfo/add.html | 117 ++++++++++++++
.../templates/jlw/logoInfo/edit.html | 72 +++++++++
.../templates/jlw/logoInfo/importPage.html | 148 ++++++++++++++++++
.../templates/jlw/logoInfo/index.html | 42 +++++
10 files changed, 569 insertions(+), 3 deletions(-)
create mode 100644 web/src/main/resources/sql/jlw/logoInfo.md
create mode 100644 web/src/main/resources/static/js/jlw/logoInfo/index.js
create mode 100644 web/src/main/resources/templates/jlw/logoInfo/add.html
create mode 100644 web/src/main/resources/templates/jlw/logoInfo/edit.html
create mode 100644 web/src/main/resources/templates/jlw/logoInfo/importPage.html
create mode 100644 web/src/main/resources/templates/jlw/logoInfo/index.html
diff --git a/web/pom.xml b/web/pom.xml
index 4f12739e..321c1d83 100644
--- a/web/pom.xml
+++ b/web/pom.xml
@@ -76,7 +76,11 @@
org.springframework.boot
spring-boot-starter-web
-
+
+ com.microsoft.sqlserver
+ mssql-jdbc
+ 7.4.1.jre8
+
diff --git a/web/src/main/resources/sql/jlw/logoInfo.md b/web/src/main/resources/sql/jlw/logoInfo.md
new file mode 100644
index 00000000..199f431d
--- /dev/null
+++ b/web/src/main/resources/sql/jlw/logoInfo.md
@@ -0,0 +1,47 @@
+findById
+===
+select * from logo_info where id = #id#
+
+findByApplicationId
+===
+select * from logo_info where application_id = #applicationId# and school_id is null
+
+findBySchoolIdAndApplicationId
+===
+select * from logo_info where application_id = #applicationId# and school_id = #schoolId#
+
+
+queryByCondition
+===
+select
+@pageTag(){
+l.*
+@}
+from logo_info l
+left join universities_colleges u on l.school_id = u.universities_colleges_id
+where 1=1
+@if(!isEmpty(applicationName)){
+and l.application_name like #"%"+applicationName+"%"#
+@}
+@if(!isEmpty(schoolName)){
+and u.universities_colleges_name like #"%"+schoolName+"%"#
+@}
+@pageIgnoreTag(){
+order by l.add_time desc
+@}
+
+
+getValuesByQueryNotWithPermission
+===
+select
+l.*
+from logo_info l
+left join universities_colleges u on l.school_id = u.universities_colleges_id
+where 1=1
+@if(!isEmpty(applicationName)){
+and l.application_name like #"%"+applicationName+"%"#
+@}
+@if(!isEmpty(schoolName)){
+and u.universities_colleges_name like #"%"+schoolName+"%"#
+@}
+
\ No newline at end of file
diff --git a/web/src/main/resources/sql/jlw/schoolClass.md b/web/src/main/resources/sql/jlw/schoolClass.md
index f13d45d6..0ac3a2e2 100644
--- a/web/src/main/resources/sql/jlw/schoolClass.md
+++ b/web/src/main/resources/sql/jlw/schoolClass.md
@@ -257,4 +257,12 @@ select school_class.class_id as classId,school_class.class_name as className
from school_class
join universities_colleges uc on school_class.universities_colleges_id = uc.universities_colleges_id
join teacher t on uc.universities_colleges_id = t.universities_colleges_id
-where t.old_id = #teacherId#
\ No newline at end of file
+where t.old_id = #teacherId#
+
+
+userClassDalGetClassListById
+===
+select old_class_id as classId, class_name as className, 3 as roleId
+from school_class
+where class_status = 1
+order by old_class_id
\ No newline at end of file
diff --git a/web/src/main/resources/sql/jlw/teacher.md b/web/src/main/resources/sql/jlw/teacher.md
index d822cb10..a023ee7c 100644
--- a/web/src/main/resources/sql/jlw/teacher.md
+++ b/web/src/main/resources/sql/jlw/teacher.md
@@ -569,3 +569,17 @@ universities_colleges.universities_colleges_id where old_school_id =#schoolId#
getByTeacherJobNameAndOrgId
===
select * from teacher where teacher_job_number = #teacherJobName# and org_id = #orgId#
+
+
+userClassDalGetList
+===
+SELECT
+t.old_id AS UserId,
+3 AS roleId,
+(
+SELECT GROUP_CONCAT(sc.old_class_id SEPARATOR ',')
+FROM school_class sc
+WHERE sc.universities_colleges_id = t.universities_colleges_id
+) AS classIds
+FROM
+teacher t
diff --git a/web/src/main/resources/static/js/jlw/logoInfo/index.js b/web/src/main/resources/static/js/jlw/logoInfo/index.js
new file mode 100644
index 00000000..e946ef31
--- /dev/null
+++ b/web/src/main/resources/static/js/jlw/logoInfo/index.js
@@ -0,0 +1,114 @@
+layui.define([ 'form', 'laydate', 'table' ], function(exports) {
+ var form = layui.form;
+ var laydate = layui.laydate;
+ var table = layui.table;
+ var logoInfoTable = null;
+ var isSignRole = $("input[name='isSignRole']").val();
+ var view = {
+ init:function(){
+ this.initTable();
+ this.initSearchForm();
+ this.initToolBar();
+ window.dataReload = function(){
+ Lib.doSearchForm($("#searchForm"),logoInfoTable)
+ }
+ },
+ initTable:function(){
+ logoInfoTable = table.render({
+ elem:'#logoInfoTable',
+ height:Lib.getTableHeight(),
+ cellMinWidth:100,
+ even:true,
+ //skin:'nob',
+ method:'post',
+ size:"lg",
+ // where:{classStatus:1},
+ url:Common.ctxPath+'/jlw/logoInfo/list.json'
+ ,page:Lib.tablePage
+ ,limit:10
+ ,cols:[[
+ {
+ field:'applicationName',
+ title:'应用名称',align:"center"
+ },
+ {
+ field:'schoolName',
+ title:'学校名称',align:"center"
+ },
+ {
+ field:'path',
+ title:'图标路径',align:"center"
+ },
+ {
+ field:'copyright',
+ title:'版权信息',align:"center"
+ },
+ {
+ field:'createName',
+ title:'创建人',align:"center"
+ },
+ {
+ field : 'userId',title : '操作',align:"center", templet: function (d) {
+ var htm = '编辑';
+ htm += '删除';
+ return htm;
+ }
+ }
+ ]]
+ });
+
+ table.on('checkbox(logoInfoTable)', function(obj){
+ var logoInfo = obj.data;
+ if(obj.checked){
+ //按钮逻辑Lib.buttonEnable()
+ }else{
+
+ }
+ })
+ },
+ initSearchForm:function(){
+ Lib.initSearchForm( $("#searchForm"),logoInfoTable,form);
+ },
+
+ initToolBar:function(){
+ toolbar = {
+ add : function() { // 获取选中数据
+ var url = "/jlw/logoInfo/add.do";
+ Common.openDlg(url,"图标管理/添加子系统图标");
+ },
+ refresh: function () {//刷新
+ searchForm.reset();
+ Lib.doSearchForm($("#searchForm"), logoInfoTable, 1);
+ },
+ search:function () {
+ Lib.doSearchForm($("#searchForm"), logoInfoTable, 1);
+ }
+
+ };
+ $('.ext-toolbar').on('click', function() {
+ var type = $(this).data('type');
+ toolbar[type] ? toolbar[type].call(this) : '';
+ });
+ }, initTableTool: table.on('tool(logoInfoTable)', function (obj) {
+ var data = obj.data;
+ if (obj.event === 'edit') {
+ var url = "/jlw/logoInfo/add.do?classId="+data.classId;
+ Common.openDlg(url,"图标管理/编辑子系统图标");
+ }else if(obj.event === "del"){
+ layer.confirm('是否确定删除该信息?', function (index) {
+ var ret = Common.postAjax("/jlw/logoInfo/delete.json",{ids:data.id});
+ layer.msg(ret.code == 0?"删除成功!":ret.msg, {
+ offset: ['50%'],
+ icon: ret.code == 0?1:2,
+ time: 1500 //2秒关闭(如果不配置,默认是3秒)
+ },function (){
+ if(ret.code == 0){
+ Lib.tableRefresh();
+ }
+ });
+ });
+ }
+ })
+ }
+ exports('index',view);
+});
\ No newline at end of file
diff --git a/web/src/main/resources/static/js/jlw/resourcesApplication/index.js b/web/src/main/resources/static/js/jlw/resourcesApplication/index.js
index f378f783..15447936 100644
--- a/web/src/main/resources/static/js/jlw/resourcesApplication/index.js
+++ b/web/src/main/resources/static/js/jlw/resourcesApplication/index.js
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
- Lib.doSearchForm($("#searchForm"),resourcesApplicationTable)
+ // Lib.doSearchForm($("#searchForm"),resourcesApplicationTable)
}
},
initTable:function(){
diff --git a/web/src/main/resources/templates/jlw/logoInfo/add.html b/web/src/main/resources/templates/jlw/logoInfo/add.html
new file mode 100644
index 00000000..4733f139
--- /dev/null
+++ b/web/src/main/resources/templates/jlw/logoInfo/add.html
@@ -0,0 +1,117 @@
+
+
+
+
+
diff --git a/web/src/main/resources/templates/jlw/logoInfo/edit.html b/web/src/main/resources/templates/jlw/logoInfo/edit.html
new file mode 100644
index 00000000..b39ec439
--- /dev/null
+++ b/web/src/main/resources/templates/jlw/logoInfo/edit.html
@@ -0,0 +1,72 @@
+
+
+
+
+
diff --git a/web/src/main/resources/templates/jlw/logoInfo/importPage.html b/web/src/main/resources/templates/jlw/logoInfo/importPage.html
new file mode 100644
index 00000000..1f3e6aa6
--- /dev/null
+++ b/web/src/main/resources/templates/jlw/logoInfo/importPage.html
@@ -0,0 +1,148 @@
+
+
+
+
+
+
diff --git a/web/src/main/resources/templates/jlw/logoInfo/index.html b/web/src/main/resources/templates/jlw/logoInfo/index.html
new file mode 100644
index 00000000..36b4598c
--- /dev/null
+++ b/web/src/main/resources/templates/jlw/logoInfo/index.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+
+
+
+