修改班级园历部分功能
This commit is contained in:
parent
de155d71ae
commit
11855e06f8
@ -2,52 +2,61 @@ import request from '@/utils/request'
|
||||
|
||||
// 查询园历管理(班级)列表
|
||||
export function listSchoolcalendarclass(query) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 不分页查询班级列表
|
||||
export function listSchoolcalendarclassAll(query) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询园历管理(班级)详细
|
||||
export function getSchoolcalendarclass(id) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增园历管理(班级)
|
||||
export function addSchoolcalendarclass(data) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改园历管理(班级)
|
||||
export function updateSchoolcalendarclass(data) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除园历管理(班级)
|
||||
export function delSchoolcalendarclass(id) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出园历管理(班级)
|
||||
export function exportSchoolcalendarclass(query) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/benyi/schoolcalendarclass/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -2,70 +2,70 @@ import request from '@/utils/request'
|
||||
|
||||
// 查询教师基本信息列表
|
||||
export function listTeacher(query) {
|
||||
return request({
|
||||
url: '/system/teacher/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//不分页
|
||||
export function listTeacher2(query) {
|
||||
return request({
|
||||
url: '/system/teacher/list2',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/list2',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询教师基本信息列表
|
||||
export function listTeacherGroupXw() {
|
||||
return request({
|
||||
url: '/system/teacher/listgroupxw',
|
||||
method: 'get',
|
||||
params: ''
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/listgroupxw',
|
||||
method: 'get',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
// 查询教师基本信息详细
|
||||
export function getTeacher(id) {
|
||||
return request({
|
||||
url: '/system/teacher/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增教师基本信息
|
||||
export function addTeacher(data) {
|
||||
return request({
|
||||
url: '/system/teacher',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改教师基本信息
|
||||
export function updateTeacher(data) {
|
||||
return request({
|
||||
url: '/system/teacher',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除教师基本信息
|
||||
export function delTeacher(id) {
|
||||
return request({
|
||||
url: '/system/teacher/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出教师基本信息
|
||||
export function exportTeacher(query) {
|
||||
return request({
|
||||
url: '/system/teacher/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/system/teacher/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -12,13 +12,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属班级" prop="classid">
|
||||
<el-input
|
||||
v-model="queryParams.classid"
|
||||
placeholder="请输入所属班级"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-select v-model="queryParams.classid" placeholder="请选择班级" >
|
||||
<el-option
|
||||
v-for="item in classListAll"
|
||||
:key="item.classid"
|
||||
:label="item.byClass.bjmc"
|
||||
:value="item.classid"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学年学期" prop="xnxq">
|
||||
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
|
||||
@ -90,7 +91,7 @@
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="名称" align="center" prop="name" />
|
||||
<el-table-column label="活动类型" align="center" prop="type" :formatter="typeFormat" />
|
||||
<el-table-column label="所属班级" align="center" prop="classid" />
|
||||
<el-table-column label="所属班级" align="center" prop="byClass.bjmc" />
|
||||
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
|
||||
<el-table-column label="活动时间" align="center" prop="activitytime" width="180"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||
@ -160,7 +161,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSchoolcalendarclass, getSchoolcalendarclass, delSchoolcalendarclass, addSchoolcalendarclass, updateSchoolcalendarclass, exportSchoolcalendarclass } from "@/api/benyi/schoolcalendarclass";
|
||||
import {
|
||||
listSchoolcalendarclass,
|
||||
listSchoolcalendarclassAll,
|
||||
getSchoolcalendarclass,
|
||||
delSchoolcalendarclass,
|
||||
addSchoolcalendarclass,
|
||||
updateSchoolcalendarclass,
|
||||
exportSchoolcalendarclass } from "@/api/benyi/schoolcalendarclass";
|
||||
|
||||
export default {
|
||||
name: "Schoolcalendarclass",
|
||||
@ -178,6 +186,8 @@ export default {
|
||||
total: 0,
|
||||
// 园历管理(班级)表格数据
|
||||
schoolcalendarclassList: [],
|
||||
// 园历班级名称列表
|
||||
classListAll: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -208,6 +218,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getListAll();
|
||||
this.getDicts("sys_schoolcalendartype").then(response => {
|
||||
this.typeOptions = response.data;
|
||||
});
|
||||
@ -225,6 +236,12 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询所有班级名称列表 */
|
||||
getListAll(){
|
||||
listSchoolcalendarclassAll(this.queryParams).then(response => {
|
||||
this.classListAll = response.rows;
|
||||
});
|
||||
},
|
||||
// 活动类型字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.type);
|
||||
|
@ -50,9 +50,22 @@ public class BySchoolcalendarClassController extends BaseController
|
||||
{
|
||||
startPage();
|
||||
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------分页"+list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 不分页查询园历管理(班级)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:list')")
|
||||
@GetMapping("/listAll")
|
||||
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass)
|
||||
{
|
||||
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------没有分页"+listAll);
|
||||
return getDataTable(listAll);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出园历管理(班级)列表
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.project.system.domain.ByClass;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
@ -53,6 +54,8 @@ public class BySchoolcalendarClass extends BaseEntity
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
private ByClass byClass;
|
||||
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
@ -142,6 +145,7 @@ public class BySchoolcalendarClass extends BaseEntity
|
||||
.append("activitytime", getActivitytime())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createtime", getCreatetime())
|
||||
.append("byClass", getByClass())
|
||||
.toString();
|
||||
}
|
||||
|
||||
@ -152,4 +156,12 @@ public class BySchoolcalendarClass extends BaseEntity
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public ByClass getByClass() {
|
||||
return byClass;
|
||||
}
|
||||
|
||||
public void setByClass(ByClass byClass) {
|
||||
this.byClass = byClass;
|
||||
}
|
||||
}
|
||||
|
@ -95,13 +95,18 @@ public class SchoolCommon {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前用户是否拥有班级
|
||||
**/
|
||||
public String getClassId() {
|
||||
SysUser sysUser = getUser();
|
||||
ByClass byClass = new ByClass();
|
||||
byClass.setZbjs(sysUser.getUserId());
|
||||
byClass.setPbjs(sysUser.getUserId());
|
||||
byClass.setZljs(sysUser.getUserId());
|
||||
//新的返回byclass1返回整条数据
|
||||
ByClass byClass1 = byClassService.selectByClassByUserId(byClass);
|
||||
System.out.println("--------------------"+ byClass1);
|
||||
if(byClass1 != null) {
|
||||
return byClass1.getBjbh();
|
||||
} else {
|
||||
|
@ -58,6 +58,7 @@ public class ByTeacherJbxxController extends BaseController
|
||||
public TableDataInfo list2(ByTeacherJbxx byTeacherJbxx)
|
||||
{
|
||||
List<ByTeacherJbxx> list2 = byTeacherJbxxService.selectByTeacherJbxxList(byTeacherJbxx);
|
||||
System.out.println("-------------------"+list2);
|
||||
return getDataTable(list2);
|
||||
}
|
||||
|
||||
|
@ -14,23 +14,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="activitytime" column="activitytime" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createtime" column="createtime" />
|
||||
<association property="byClass" column="bjbh" javaType="ByClass" resultMap="ByClassResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByClass" id="ByClassResult">
|
||||
<result property="bjbh" column="bjbh"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="bjtype" column="bjtype"/>
|
||||
<result property="bhxh" column="bhxh"/>
|
||||
<result property="xn" column="xn"/>
|
||||
<result property="bjmc" column="bjmc"/>
|
||||
<result property="bjrych" column="bjrych"/>
|
||||
<result property="jbny" column="jbny"/>
|
||||
<result property="zbjs" column="zbjs"/>
|
||||
<result property="zbjsxm" column="zbjsxm"/>
|
||||
<result property="pbjs" column="pbjs"/>
|
||||
<result property="pbjsxm" column="pbjsxm"/>
|
||||
<result property="zljs" column="zljs"/>
|
||||
<result property="zljsxm" column="zljsxm"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBySchoolcalendarClassVo">
|
||||
select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime from by_schoolcalendar_class
|
||||
select id, name, type, classid, xnxq, deptId, activitytime, createuserid, createtime
|
||||
from by_schoolcalendar_class
|
||||
</sql>
|
||||
|
||||
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult">
|
||||
<include refid="selectBySchoolcalendarClassVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="classid != null and classid != ''"> and classid = #{classid}</if>
|
||||
<if test="xnxq != null and xnxq != ''"> and xnxq = #{xnxq}</if>
|
||||
<if test="deptid != null "> and deptId = #{deptid}</if>
|
||||
<if test="activitytime != null "> and activitytime = #{activitytime}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
<if test="createtime != null "> and createtime = #{createtime}</if>
|
||||
select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime,
|
||||
c.bjbh, c.bjmc
|
||||
from by_schoolcalendar_class sc
|
||||
left join by_class c on sc.classid = c.bjbh
|
||||
<where>
|
||||
sc.classid = c.bjbh
|
||||
<if test="name != null and name != ''"> and sc.name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''"> and sc.type = #{type}</if>
|
||||
<if test="classid != null and classid != ''"> and sc.classid = #{classid}</if>
|
||||
<if test="xnxq != null and xnxq != ''"> and sc.xnxq = #{xnxq}</if>
|
||||
<if test="deptid != null "> and sc.deptId = #{deptid}</if>
|
||||
<if test="activitytime != null "> and sc.activitytime = #{activitytime}</if>
|
||||
<if test="createuserid != null "> and sc.createuserid = #{createuserid}</if>
|
||||
<if test="createtime != null "> and sc.createtime = #{createtime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -63,9 +63,9 @@
|
||||
<select id="selectByClassByUserId" parameterType="ByClass" resultMap="ByClassResult">
|
||||
<include refid="selectByClassVo"/>
|
||||
<where>
|
||||
<if test="zbjs != null ">and zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null ">and pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null ">and zljs = #{zljs}</if>
|
||||
<if test="zbjs != null ">or zbjs = #{zbjs}</if>
|
||||
<if test="pbjs != null ">or pbjs = #{pbjs}</if>
|
||||
<if test="zljs != null ">or zljs = #{zljs}</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
|
Loading…
x
Reference in New Issue
Block a user