Commit 672056b3 by Cat

zd 教师电子档案

parents 0fb89043 026f530d
...@@ -113,6 +113,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -113,6 +113,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/webSocket/**").anonymous() .antMatchers( "/webSocket/**").anonymous()
.antMatchers("/login", "/register", "/captchaImage").anonymous() .antMatchers("/login", "/register", "/captchaImage").anonymous()
.antMatchers("/wx/user/login","/wx/user/getRoleType/**").permitAll() .antMatchers("/wx/user/login","/wx/user/getRoleType/**").permitAll()
.antMatchers("/wx/teacherLeave/**").permitAll()
.antMatchers("/teacherFiles/notice/**").permitAll()
.antMatchers("/wx/level/expriment/**").permitAll()
.antMatchers("/dd/user/login").permitAll() .antMatchers("/dd/user/login").permitAll()
.antMatchers( "/common/**").permitAll() .antMatchers( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll() .antMatchers( "/dd/school/**").permitAll()
......
...@@ -107,6 +107,7 @@ public interface SysUserMapper { ...@@ -107,6 +107,7 @@ public interface SysUserMapper {
* @return 结果 * @return 结果
*/ */
public int deleteUserById(Long userId); public int deleteUserById(Long userId);
public SysUser selectUserByDdUserId(String ddUserId);
/** /**
* 批量删除用户信息 * 批量删除用户信息
......
...@@ -200,6 +200,13 @@ public interface ISysUserService { ...@@ -200,6 +200,13 @@ public interface ISysUserService {
public int deleteUserById(Long userId); public int deleteUserById(Long userId);
/** /**
* 根据dduserId查询用户表
* @param userId
* @return
*/
public SysUser selectUserByDdUserId(String ddUserId);
/**
* 批量删除用户信息 * 批量删除用户信息
* *
* @param userIds 需要删除的用户ID * @param userIds 需要删除的用户ID
......
...@@ -465,6 +465,17 @@ public class SysUserServiceImpl implements ISysUserService { ...@@ -465,6 +465,17 @@ public class SysUserServiceImpl implements ISysUserService {
return userMapper.deleteUserById(userId); return userMapper.deleteUserById(userId);
} }
/**
* 根据钉钉用户id 查询用户
* @param ddUserId
* @return
*/
@Override
public SysUser selectUserByDdUserId(String ddUserId) {
return userMapper.selectUserByDdUserId(ddUserId);
}
/** /**
* 批量删除用户信息 * 批量删除用户信息
* *
......
...@@ -322,6 +322,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -322,6 +322,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_user set del_flag = '2' where user_id = #{userId} update sys_user set del_flag = '2' where user_id = #{userId}
</delete> </delete>
<select id="selectUserByDdUserId" parameterType="String" resultMap="SysUserResult">
select * from sys_user where dd_user_id = #{ddUserId}
</select>
<delete id="deleteUserByIds" parameterType="Long"> <delete id="deleteUserByIds" parameterType="Long">
update sys_user set del_flag = '2' where user_id in update sys_user set del_flag = '2' where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")"> <foreach collection="array" item="userId" open="(" separator="," close=")">
......
...@@ -9,10 +9,10 @@ export function performanceList(query) { ...@@ -9,10 +9,10 @@ export function performanceList(query) {
}); });
} }
//根据身份证号获取学生信息 //根据号获取学生信息
export function getInfoByIdCard(query) { export function getInfoByschoolNo(query) {
return request({ return request({
url: `/curricula/studentScore/selectStudent?idCard=${query}`, url: `/curricula/studentScore/selectStudent?schoolNo=${query}`,
method: "get", method: "get",
}); });
} }
......
...@@ -9,9 +9,9 @@ export function getTeacherList(query) { ...@@ -9,9 +9,9 @@ export function getTeacherList(query) {
}); });
} }
// 获取实验室 // 获取实验室
export function getLabList(plannedStartTime, plannedEndTime) { export function getLabList(plannedStartTime, plannedEndTime, sub) {
return request({ return request({
url: `/schoolLabClassYear/getLabList?plannedStartTime=${plannedStartTime}&plannedEndTime=${plannedEndTime}`, url: `/schoolLabClassYear/getLabList?plannedStartTime=${plannedStartTime}&plannedEndTime=${plannedEndTime}&sub=${sub}`,
method: "get", method: "get",
}); });
} }
......
import request from '@/utils/request' import request from "@/utils/request";
// 添加任务 // 添加任务
export function addTeacherNotice(data) { export function addTeacherNotice(data) {
return request({ return request({
url: '/teacherFiles/notice', url: "/teacherFiles/notice",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 任务列表 // 任务列表
export function listTeacherNotice(query) { export function listTeacherNotice(query) {
return request({ return request({
url: '/teacherFiles/notice/list', url: "/teacherFiles/notice/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 任务详情 // 任务详情
export function infoTeaNotice(id) { export function infoTeaNotice(id) {
return request({ return request({
url: `/teacherFiles/notice/${id}`, url: `/teacherFiles/notice/${id}`,
method: 'put' method: "put",
}) });
} }
// 任务修改 // 任务修改
export function updateTask(data) { export function updateTask(data) {
return request({ return request({
url: '/teacherFiles/notice', url: "/teacherFiles/notice",
method: 'put', method: "put",
data: data data: data,
}) });
} }
// 发布任务 // 发布任务
export function infoTeacherNotice(id) { export function infoTeacherNotice(id) {
return request({ return request({
url: `/teacherFiles/notice/release/${id}`, url: `/teacherFiles/notice/release/${id}`,
method: 'put' method: "put",
}) });
} }
// 任务撤回 // 任务撤回
export function taskRetracted(id) { export function taskRetracted(id) {
return request({ return request({
url: '/teacherFiles/notice/withdraw/' + id, url: "/teacherFiles/notice/withdraw/" + id,
method: 'put' method: "put",
}) });
} }
// 任务完成 // 任务完成
export function taskCompleted(id) { export function taskCompleted(id) {
return request({ return request({
url: '/teacherFiles/notice/complete/' + id, url: "/teacherFiles/notice/complete/" + id,
method: 'put' method: "put",
}) });
} }
// 任务删除 // 任务删除
export function delTaskInfo(id) { export function delTaskInfo(id) {
return request({ return request({
url: '/teacherFiles/notice/' + id, url: "/teacherFiles/notice/" + id,
method: 'delete' method: "delete",
}) });
} }
// 通知下档案查看|数据维护 // 通知下档案查看|数据维护
export function getteacherNotice(query) { export function getteacherNotice(query) {
return request({ return request({
url: '/teacherFiles/files/list', url: "/teacherFiles/files/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 级部列表 // 级部列表
export function getGradeTnfo(query) { export function getGradeTnfo(query) {
...@@ -86,10 +86,10 @@ export function getGradeTnfo(query) { ...@@ -86,10 +86,10 @@ export function getGradeTnfo(query) {
//老师查看详情 //老师查看详情
export function getNoticeInfo(query) { export function getNoticeInfo(query) {
return request({ return request({
url: '/teacherFiles/files/list', url: "/teacherFiles/files/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
//老师查看列表 //老师查看列表
...@@ -104,63 +104,63 @@ export function getTeacherTnfo(query) { ...@@ -104,63 +104,63 @@ export function getTeacherTnfo(query) {
//级部查看档案详情 //级部查看档案详情
export function getDepInfo(query) { export function getDepInfo(query) {
return request({ return request({
url: '/teacherFiles/files/list', url: "/teacherFiles/files/list",
method: 'get', method: "get",
params: query params: query,
}) });
} }
//查看档案详情 //查看档案详情
export function getFileTnfo(id) { export function getFileTnfo(id) {
return request({ return request({
url: '/teacherFiles/files/'+id, url: "/teacherFiles/files/" + id,
method: 'get', method: "get",
}) });
} }
// 同步档案 // 同步档案
export function syncNotice(id) { export function syncNotice(id) {
return request({ return request({
url: '/teacherFiles/files/synchronous/' + id, url: "/teacherFiles/files/synchronous/" + id,
method: 'put' method: "put",
}) });
} }
// 教师档案修改 // 教师档案修改
export function updateInfo(data) { export function updateInfo(data) {
return request({ return request({
url: '/teacherFiles/files', url: "/teacherFiles/files",
method: 'put', method: "put",
data: data data: data,
}) });
} }
// 教师档案删除 // 教师档案删除
export function delInfo(id) { export function delInfo(id) {
return request({ return request({
url: '/teacherFiles/files/' + id, url: "/teacherFiles/files/" + id,
method: 'delete' method: "delete",
}) });
} }
// 教师档案提交审核 // 教师档案提交审核
// /teacherFiles/files/submitTo/29 // /teacherFiles/files/submitTo/29
export function fileSubReview(id) { export function fileSubReview(id) {
return request({ return request({
url: `/teacherFiles/files/submitTo/${id}`, url: `/teacherFiles/files/submitTo/${id}`,
method: 'put' method: "put",
}) });
} }
// 教师档案驳回 // 教师档案驳回
export function fileSubApproved(id) { export function fileSubApproved(id) {
return request({ return request({
url: `/teacherFiles/files/reject/${id}`, url: `/teacherFiles/files/reject/${id}`,
method: 'put' method: "put",
}) });
} }
// 教师档案提交 // 教师档案提交
export function fileSubRejected(id) { export function fileSubRejected(id) {
return request({ return request({
url: `/teacherFiles/files/passThrough/${id}`, url: `/teacherFiles/files/passThrough/${id}`,
method: 'put' method: "put",
}) });
} }
\ No newline at end of file
...@@ -18,6 +18,8 @@ const whiteList = [ ...@@ -18,6 +18,8 @@ const whiteList = [
"/studentRegistra", "/studentRegistra",
"/printBarcodes", "/printBarcodes",
"/printLesson", "/printLesson",
"/studentTable",
"/headmasterLesson",
]; ];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
......
...@@ -69,6 +69,15 @@ export const constantRoutes = [ ...@@ -69,6 +69,15 @@ export const constantRoutes = [
), ),
hidden: true, hidden: true,
}, },
//学生信息
{
path: "/studentTable",
component: () =>
import(
"@/views/smartSchool/teachAffairAdministration/affairStudentManage/studentTable"
),
hidden: true,
},
//设备台账 //设备台账
{ {
path: "/printBarcodes", path: "/printBarcodes",
...@@ -87,6 +96,16 @@ export const constantRoutes = [ ...@@ -87,6 +96,16 @@ export const constantRoutes = [
), ),
hidden: true, hidden: true,
}, },
//班主任课表
{
path: "/headmasterLesson",
component: () =>
import(
"@/views/smartSchool/classAdviser/headmasterLesson/headmasterLesson"
),
hidden: true,
},
//学生注册
{ {
path: "/studentRegistra", path: "/studentRegistra",
component: () => component: () =>
......
...@@ -3,23 +3,15 @@ ...@@ -3,23 +3,15 @@
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
<div style="border:1px solid #DFE6EC; margin:0 10px 0 0"> <div style="border:1px solid #DFE6EC; margin:0 10px 0 0">
<el-form :inline="true" :model="queryParams" <el-form :inline="true" :model="queryParams" style="border-bottom:1px solid #DFE6EC; padding:10px 0 0 5px">
style="border-bottom:1px solid #DFE6EC; padding:10px 0 0 5px">
<el-form-item label="班级信息" prop="year"> <el-form-item label="班级信息" prop="year">
<el-select v-model="queryParams.schoolYear" style="width:100%" <el-select v-model="queryParams.schoolYear" style="width:100%" size="mini" @change="handleYearChange">
size="mini" @change="handleYearChange"> <el-option v-for="item in yearList" :key="item.value" :value="item.value" :label="item.label"></el-option>
<el-option v-for="item in yearList" :key="item.value" :value="item.value"
:label="item.label"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tree ref="tree" <el-tree ref="tree" node-key="id" :data="treeData" :expand-on-click-node="false" highlight-current
node-key="id" default-expand-all @node-click="handleNodeClick">
:data="treeData"
:expand-on-click-node="false"
highlight-current
default-expand-all
@node-click="handleNodeClick">
</el-tree> </el-tree>
</div> </div>
</el-col> </el-col>
...@@ -28,8 +20,7 @@ ...@@ -28,8 +20,7 @@
<el-col> <el-col>
<el-form :inline="true" :model="formData" style="padding:12px 0 0 0"> <el-form :inline="true" :model="formData" style="padding:12px 0 0 0">
<el-form-item> <el-form-item>
<el-button type="primary" plain size="mini" icon="el-icon-printer" <el-button type="primary" plain size="mini" icon="el-icon-printer" @click="printTable()">打印
@click="printTable()">打印
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label="学期" prop="region"> <el-form-item label="学期" prop="region">
...@@ -42,9 +33,8 @@ ...@@ -42,9 +33,8 @@
</el-col> </el-col>
</el-row> </el-row>
<div id="postFormContainer"> <div id="postFormContainer">
<el-table v-loading="loading" :data="courseList" :row-style="{ height: '50px' }" <el-table v-loading="loading" :data="courseList" :row-style="{ height: '50px' }" :cell-style="{ padding: '0' }"
:cell-style="{ padding: '0' }" border border style="width: 1200px;">
style="width: 1200px;">
<!-- <el-table-column :resizable="false" class-name="elChgTbeClmn" prop="lesson" label="日期" width="120" align="center"> <!-- <el-table-column :resizable="false" class-name="elChgTbeClmn" prop="lesson" label="日期" width="120" align="center">
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<div class="elHeadCon"> <div class="elHeadCon">
...@@ -124,10 +114,10 @@ import { ...@@ -124,10 +114,10 @@ import {
getClassTreeList, getClassTreeList,
getClassLessonTable, getClassLessonTable,
} from "@/api/smartSchool/lesson/index.js"; } from "@/api/smartSchool/lesson/index.js";
import {getYearList} from "@/utils/utilLibrary/getYearList"; import { getYearList } from "@/utils/utilLibrary/getYearList";
import {getFirstLeafNode, handleTreeData} from "@/utils/utilLibrary/getTreeClass"; import { getFirstLeafNode, handleTreeData } from "@/utils/utilLibrary/getTreeClass";
import {getNewYear, getCourseInfo} from "@/api/smartSchool/teachAffairAdministration/lessonManage"; import { getNewYear, getCourseInfo } from "@/api/smartSchool/teachAffairAdministration/lessonManage";
import * as dd from 'dingtalk-jsapi';
export default { export default {
name: '', name: '',
dicts: ['relationship', 'Grade', 'Class', 'grade_type', 'sys_user_sex', 'education', 'student_type', 'child_state'], dicts: ['relationship', 'Grade', 'Class', 'grade_type', 'sys_user_sex', 'education', 'student_type', 'child_state'],
...@@ -243,17 +233,19 @@ export default { ...@@ -243,17 +233,19 @@ export default {
// 打印 // 打印
printTable() { printTable() {
// 重置表单 const baseUrl = window.location.protocol + '//' + window.location.host + '/headmasterLesson';
printJS({ const urlWithParams = `${baseUrl}?courseList=${encodeURIComponent(JSON.stringify(this.courseList))}`;
printable: 'postFormContainer', dd.biz.util.openLink({
maxWidth: 10000, url: urlWithParams,
header: '', onSuccess: () => {
ignoreElements: ['no-print', 'back-no-print', 'front-no-print'], console.log('跳转成功,准备打印');
targetStyles: ['*'], // 打印条码
gridHeaderStyle: "border: 1px solid black", // this.printCode();
type: "html", },
gridStyle: `text-align: center; border: 1px solid black`, onFail: (error) => {
}) console.error('跳转失败', error);
}
});
}, },
//判断当前时间节点处在上学期还是下学期 //判断当前时间节点处在上学期还是下学期
getSession() { getSession() {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" /> <el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
<el-table-column fixed="left" label="学生姓名" align="center" prop="studentName" /> <el-table-column fixed="left" label="学生姓名" align="center" prop="studentName" />
<el-table-column fixed="left" label="学号" align="center" prop="studentNumber" width="150" /> <el-table-column fixed="left" label="学号" align="center" prop="studentNumber" width="150" />
<el-table-column fixed="left" label="身份证号" align="center" prop="idCard" width="200" /> <!-- <el-table-column fixed="left" label="身份证号" align="center" prop="idCard" width="200" /> -->
<el-table-column fixed="left" label="班级" align="center" prop="className" /> <el-table-column fixed="left" label="班级" align="center" prop="className" />
<el-table-column fixed="left" label="考试类型" align="center" prop="examType"> <el-table-column fixed="left" label="考试类型" align="center" prop="examType">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
...@@ -99,34 +99,28 @@ ...@@ -99,34 +99,28 @@
<el-form :model="achievementForm" :rules="achievementRules" ref="achievementForm" label-width="80px" <el-form :model="achievementForm" :rules="achievementRules" ref="achievementForm" label-width="80px"
label-position="left"> label-position="left">
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="12">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="achievementForm.idCard" placeholder="请输入身份证号" @change="searchStudentInfo"
:disabled="nowType == 1 ? true : false"></el-input>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学生姓名" prop="studentName"> <el-form-item label="学生姓名" prop="studentName">
<el-input v-model="achievementForm.studentName" placeholder="请输入学生姓名" <el-input v-model="achievementForm.studentName" placeholder="请输入学生姓名"
:disabled="nowType == 1 ? true : false"></el-input> :disabled="nowType == 1 ? true : false"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="班级" prop="className"> <el-form-item label="班级" prop="className">
<el-input v-model="achievementForm.className" placeholder="请输入班级" <el-input v-model="achievementForm.className" placeholder="请输入班级"
:disabled="nowType == 1 ? true : false"></el-input> :disabled="nowType == 1 ? true : false"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学号" prop="studentNumber"> <el-form-item label="学号" prop="studentNumber">
<el-input v-model="achievementForm.studentNumber" placeholder="请输入学号" <el-input v-model="achievementForm.studentNumber" placeholder="请输入学号"
:disabled="nowType == 1 ? true : false"></el-input> :disabled="nowType == 1 ? true : false" @change="searchStudentInfo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="考试类型" prop="examType"> <el-form-item label="考试类型" prop="examType">
<el-select v-model="achievementForm.examType" filterable placeholder="请选择考试类型" class="selectWidth" <el-select v-model="achievementForm.examType" filterable placeholder="请选择考试类型" class="selectWidth"
...@@ -137,6 +131,7 @@ ...@@ -137,6 +131,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="语文" prop="language"> <el-form-item label="语文" prop="language">
...@@ -188,7 +183,7 @@ ...@@ -188,7 +183,7 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="化学" prop="chemistry"> <el-form-item label="化学" prop="chemistry">
<el-input v-model="achievementForm.chemistry" type="number" placeholder="请输入化学"></el-input> <el-input v-model="achievementForm.chemistry" type="number" placeholder="请输入化学"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -206,7 +201,7 @@ ...@@ -206,7 +201,7 @@
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { import {
addPerformance, deletePerformance, editPerformance, addPerformance, deletePerformance, editPerformance,
getInfoByIdCard, getInfoByschoolNo,
performanceList performanceList
} from "../../../../../api/smartSchool/gradeWork/courseSelection/performance"; } from "../../../../../api/smartSchool/gradeWork/courseSelection/performance";
import { classList } from "../../../../../api/smartSchool/gradeWork/courseSelection/taskPublishing"; import { classList } from "../../../../../api/smartSchool/gradeWork/courseSelection/taskPublishing";
...@@ -249,7 +244,7 @@ export default { ...@@ -249,7 +244,7 @@ export default {
classId: '', classId: '',
studentName: '', studentName: '',
studentNumber: '', studentNumber: '',
idCard: '', // idCard: '',
className: '', className: '',
examType: '', examType: '',
language: '', language: '',
...@@ -263,8 +258,8 @@ export default { ...@@ -263,8 +258,8 @@ export default {
biology: '', biology: '',
}, },
achievementRules: { achievementRules: {
idCard: [ studentNumber: [
{ required: true, message: '请输入身份证号', trigger: 'blur' } { required: true, message: '请输入', trigger: 'blur' }
], ],
// studentName: [ // studentName: [
// { required: true, message: '请输入学生姓名', trigger: 'blur' } // { required: true, message: '请输入学生姓名', trigger: 'blur' }
...@@ -362,7 +357,7 @@ export default { ...@@ -362,7 +357,7 @@ export default {
classId: '', classId: '',
studentName: '', studentName: '',
studentNumber: '', studentNumber: '',
idCard: '', // idCard: '',
className: '', className: '',
examType: '', examType: '',
language: '', language: '',
...@@ -447,10 +442,11 @@ export default { ...@@ -447,10 +442,11 @@ export default {
}) })
}, },
//根据身份证号获取学生信息 //根据号获取学生信息
searchStudentInfo() { searchStudentInfo() {
const idCard = this.achievementForm.idCard const schoolNo = this.achievementForm.studentNumber
getInfoByIdCard(idCard).then(res => { console.log(schoolNo, 'schoolNo');
getInfoByschoolNo(schoolNo).then(res => {
if (res.code == 200) { if (res.code == 200) {
Object.keys(this.achievementForm).forEach(key => { Object.keys(this.achievementForm).forEach(key => {
res.data[key] && (this.achievementForm[key] = res.data[key]) res.data[key] && (this.achievementForm[key] = res.data[key])
......
...@@ -64,11 +64,12 @@ ...@@ -64,11 +64,12 @@
</el-table> </el-table>
<!-- 分配实验室弹窗 --> <!-- 分配实验室弹窗 -->
<el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="75%"> <el-dialog title="申请信息" :visible.sync="dialogTableVisible" width="75%">
<el-form :model="form" ref="form" size="small" label-width="110px" > <el-form :model="form" ref="form" size="small" label-width="110px">
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="学科" prop="sub"> <el-form-item label="学科" prop="sub">
<el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit"> <el-select v-model="form.sub" placeholder="请选择" clearable style="width: 100%;"
:disabled="isEdits">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
...@@ -76,12 +77,13 @@ ...@@ -76,12 +77,13 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="实验名称"> <el-form-item label="实验名称">
<el-input v-model="form.experimentName" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="form.experimentName" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="实验分类" prop="experimentClassify"> <el-form-item label="实验分类" prop="experimentClassify">
<el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit"> <el-select v-model="form.experimentClassify" placeholder="请选择" clearable style="width: 100%;"
:disabled="isEdits">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value" <el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" /> :label="dict.label" :value="dict.value" />
</el-select> </el-select>
...@@ -91,12 +93,12 @@ ...@@ -91,12 +93,12 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="学年"> <el-form-item label="学年">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="form.schoolYear" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="学期"> <el-form-item label="学期">
<el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;" :disabled="isEdit"> <el-select v-model="form.semester" placeholder="请选择学期" style="width: 100%;" :disabled="isEdits">
<el-option label="上学期" value="1"></el-option> <el-option label="上学期" value="1"></el-option>
<el-option label="下学期" value="2"></el-option> <el-option label="下学期" value="2"></el-option>
</el-select> </el-select>
...@@ -104,7 +106,7 @@ ...@@ -104,7 +106,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="级部"> <el-form-item label="级部">
<el-input v-model="form.grade" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="form.grade" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -112,7 +114,7 @@ ...@@ -112,7 +114,7 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申请老师"> <el-form-item label="申请老师">
<el-input v-model="form.applyName" placeholder="请输入" clearable :disabled="isEdit" /> <el-input v-model="form.applyName" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -134,7 +136,8 @@ ...@@ -134,7 +136,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="实验室选择"> <el-form-item label="实验室选择">
<el-checkbox-group v-model="form.schoolTeacherExperimentApplyLabsList"> <el-checkbox-group v-model="form.schoolTeacherExperimentApplyLabsList">
<el-checkbox v-for="classItem in labs" :key="classItem.labId" :label="classItem.labId"> <el-checkbox v-for="classItem in labs" :key="classItem.labId" :label="classItem.labId"
>
{{ classItem.labName }}- {{ classItem.useState }} {{ classItem.labName }}- {{ classItem.useState }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -282,6 +285,7 @@ export default { ...@@ -282,6 +285,7 @@ export default {
applyName: "", applyName: "",
grade: "", grade: "",
}, },
selectedLabs: [], // 已选择的实验室
//表格数据 //表格数据
tableData: [ tableData: [
...@@ -290,6 +294,7 @@ export default { ...@@ -290,6 +294,7 @@ export default {
}, },
isEdit: false, isEdit: false,
isEdits: false,
labs: [], labs: [],
schoolTeacherExperimentApplyLabsList: [], schoolTeacherExperimentApplyLabsList: [],
total: 0, total: 0,
...@@ -324,6 +329,7 @@ export default { ...@@ -324,6 +329,7 @@ export default {
handleAllocation(row) { handleAllocation(row) {
this.loading = true; this.loading = true;
const id = row.id || this.ids; const id = row.id || this.ids;
getTeacherapplyxq(id).then(response => { getTeacherapplyxq(id).then(response => {
this.form = response.data; this.form = response.data;
// 清空已经选择的实验室 // 清空已经选择的实验室
...@@ -332,27 +338,42 @@ export default { ...@@ -332,27 +338,42 @@ export default {
const labId = this.form.schoolTeacherExperimentApplyLabsList[i].labId; const labId = this.form.schoolTeacherExperimentApplyLabsList[i].labId;
this.selectedLabs.push(labId); this.selectedLabs.push(labId);
} }
// console.log('this.form', this.form);
this.form.applyName = response.data.applyName; this.form.schoolTeacherExperimentApplyLabsList = this.selectedLabs; // 仅将已经选择的实验室作为关联数据提交
this.form.experimentClassify = response.data.experimentClassify;
this.form.experimentName = response.data.experimentName;
this.form.sub = response.data.sub;
this.form.chapterContent = response.data.chapterContent;
this.form.grade = response.data.grade;
this.form.schoolYear = response.data.schoolYear;
this.form.experimentUseGoods = response.data.experimentUseGoods;
this.form.plannedStartTime = response.data.plannedStartTime;
this.form.plannedEndTime = response.data.plannedEndTime;
this.form.schoolLabClassYearRelationList = this.selectedLabs; // 仅将已经选择的实验室作为关联数据提交
this.loading = false; this.loading = false;
const plannedStartTime = this.form.plannedStartTime const plannedStartTime = this.form.plannedStartTime
const plannedEndTime = this.form.plannedEndTime const plannedEndTime = this.form.plannedEndTime
const sub = this.form.sub
getLabList(plannedStartTime, plannedEndTime).then(response => { getLabList(plannedStartTime, plannedEndTime, sub).then(response => {
const labs = response.data; const labs = response.data;
this.labs = labs.filter(lab => lab.useState === "空闲"); // 根据状态筛选出空闲的实验室 console.log(labs, 'qb');
// console.log(this.labs, 'this.labs'); const selectedLabs = this.form.schoolTeacherExperimentApplyLabsList; // 获取已选择的实验室列表
// 这里不再需要循环添加实验室关联数据 console.log(selectedLabs, 'xz');
// 将已选择的实验室信息存储在新的数组中
const selectedLabInfo = labs.filter(lab => {
const isSelected = selectedLabs.some(selectedLab => selectedLab.labId === lab.labId);
if (isSelected) {
lab.isSelected = true;
return true;
}
return false;
});
// 更新 labs 数组,将已选择的实验室信息存储在对应实验室对象中
this.labs = labs.map(lab => {
const selectedLab = selectedLabInfo.find(selectedLab => selectedLab.labId === lab.labId);
if (selectedLab) {
lab.selectedLabInfo = selectedLab;
}
return lab;
}).map(lab => {
if (lab.useState === '使用中') {
lab.isDisabled = true;
}
return lab;
})
this.isEdits = true;
this.loading = false; this.loading = false;
}); });
}); });
......
...@@ -170,13 +170,13 @@ ...@@ -170,13 +170,13 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="申请老师"> <el-form-item label="申请老师">
<el-input v-model="postForm.applyName" placeholder="请输入" clearable :disabled="isEdit" /> <el-input v-model="postForm.applyName" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="实验分类"> <el-form-item label="实验分类">
<el-select v-model="postForm.experimentClassify" placeholder="请选择" clearable <el-select v-model="postForm.experimentClassify" placeholder="请选择" clearable
style="width: 100%;" :disabled="isEdit"> style="width: 100%;" :disabled="isEdits">
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value" <el-option v-for="dict in dict.type.experiment_classify" :key="dict.value"
:label="dict.label" :value="dict.value" /> :label="dict.label" :value="dict.value" />
</el-select> </el-select>
...@@ -187,13 +187,13 @@ ...@@ -187,13 +187,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="实验名称"> <el-form-item label="实验名称">
<el-input v-model="postForm.experimentName" placeholder="请输入" clearable :disabled="isEdit" /> <el-input v-model="postForm.experimentName" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学科"> <el-form-item label="学科">
<el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;" <el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;"
:disabled="isEdit"> :disabled="isEdits">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
<el-col :span="20"> <el-col :span="20">
<el-form-item label="章节内容"> <el-form-item label="章节内容">
<el-input v-model="postForm.chapterContent" placeholder="请输入" clearable <el-input v-model="postForm.chapterContent" placeholder="请输入" clearable
:disabled="isEdit"></el-input> :disabled="isEdits"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -215,12 +215,12 @@ ...@@ -215,12 +215,12 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="级部"> <el-form-item label="级部">
<el-input v-model="postForm.grade" placeholder="请输入" clearable :disabled="isEdit" /> <el-input v-model="postForm.grade" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学年"> <el-form-item label="学年">
<el-input v-model="postForm.schoolYear" placeholder="请输入" clearable :disabled="isEdit" /> <el-input v-model="postForm.schoolYear" placeholder="请输入" clearable :disabled="isEdits" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -252,7 +252,8 @@ ...@@ -252,7 +252,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="实验室选择"> <el-form-item label="实验室选择">
<el-checkbox-group v-model="postForm.schoolLabClassYearRelationList"> <el-checkbox-group v-model="postForm.schoolLabClassYearRelationList">
<el-checkbox v-for="classItem in labs" :key="classItem.labId" :label="classItem.labId"> <el-checkbox v-for="classItem in labs" :key="classItem.labId" :label="classItem.labId"
>
{{ classItem.labName }}- {{ classItem.useState }} {{ classItem.labName }}- {{ classItem.useState }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -311,6 +312,7 @@ export default { ...@@ -311,6 +312,7 @@ export default {
], ],
isEdit: false, isEdit: false,
isEdits: false,
postForm: { postForm: {
applyName: '', applyName: '',
experimentClassify: '', experimentClassify: '',
...@@ -391,29 +393,44 @@ export default { ...@@ -391,29 +393,44 @@ export default {
const labId = this.postForm.schoolLabClassYearRelationList[i].labId; const labId = this.postForm.schoolLabClassYearRelationList[i].labId;
this.selectedLabs.push(labId); this.selectedLabs.push(labId);
} }
// console.log('this.form', this.form);
this.postForm.applyName = response.data.applyName;
this.postForm.experimentClassify = response.data.experimentClassify;
this.postForm.experimentName = response.data.experimentName;
this.postForm.sub = response.data.sub;
this.postForm.chapterContent = response.data.chapterContent;
this.postForm.grade = response.data.grade;
this.postForm.schoolYear = response.data.schoolYear;
this.postForm.experimentUseGoods = response.data.experimentUseGoods;
this.postForm.plannedStartTime = response.data.plannedStartTime;
this.postForm.plannedEndTime = response.data.plannedEndTime;
this.postForm.schoolLabClassYearRelationList = this.selectedLabs; // 仅将已经选择的实验室作为关联数据提交 this.postForm.schoolLabClassYearRelationList = this.selectedLabs; // 仅将已经选择的实验室作为关联数据提交
this.loading = false; this.loading = false;
const plannedStartTime = this.postForm.plannedStartTime const plannedStartTime = this.postForm.plannedStartTime
const plannedEndTime = this.postForm.plannedEndTime const plannedEndTime = this.postForm.plannedEndTime
const sub = this.postForm.sub
getLabList(plannedStartTime, plannedEndTime).then(response => { getLabList(plannedStartTime, plannedEndTime, sub).then(response => {
const labs = response.data; const labs = response.data;
this.labs = labs.filter(lab => lab.useState === "空闲"); // 根据状态筛选出空闲的实验室 console.log(labs, 'qb');
// console.log(this.labs, 'this.labs'); const selectedLabs = this.postForm.schoolLabClassYearRelationList; // 获取已选择的实验室列表
// 这里不再需要循环添加实验室关联数据 console.log(selectedLabs, 'xz');
// 将已选择的实验室信息存储在新的数组中
const selectedLabInfo = labs.filter(lab => {
const isSelected = selectedLabs.some(selectedLab => selectedLab.labId === lab.labId);
if (isSelected) {
lab.isSelected = true;
return true;
}
return false;
});
// 更新 labs 数组,将已选择的实验室信息存储在对应实验室对象中
this.labs = labs.map(lab => {
const selectedLab = selectedLabInfo.find(selectedLab => selectedLab.labId === lab.labId);
if (selectedLab) {
lab.selectedLabInfo = selectedLab;
}
return lab;
}).map(lab => {
if (lab.useState === '使用中') {
lab.isDisabled = true;
}
return lab;
})
this.isEdits = true;
this.loading = false; this.loading = false;
}); });
}); });
this.dialogTableVisible = true; this.dialogTableVisible = true;
}, },
...@@ -478,7 +495,7 @@ export default { ...@@ -478,7 +495,7 @@ export default {
getAllocationLab(params).then(response => { getAllocationLab(params).then(response => {
this.$modal.msgSuccess('保存成功'); this.$modal.msgSuccess('保存成功');
this.open = false; this.dialogTableVisible = false;
this.getList(); this.getList();
}); });
} }
...@@ -510,7 +527,7 @@ export default { ...@@ -510,7 +527,7 @@ export default {
getAllocationLab(params).then(response => { getAllocationLab(params).then(response => {
console.log(params, params); console.log(params, params);
this.$modal.msgSuccess('提交成功'); this.$modal.msgSuccess('提交成功');
this.open = false; this.dialogTableVisible = false;
this.getList(); this.getList();
}); });
} }
......
...@@ -478,13 +478,14 @@ export default { ...@@ -478,13 +478,14 @@ export default {
handleUpdate(row) { handleUpdate(row) {
const id = row.id || this.ids; const id = row.id || this.ids;
this.title = "派单"; this.title = "派单";
this.openpd = true;
getRepairs(id).then(response => { getRepairs(id).then(response => {
this.formpd.id = response.data.id; this.formpd.id = response.data.id;
console.log('this.formpd.id', this.formpd.id); console.log('this.formpd.id', this.formpd.id);
}).catch(err => { }).catch(err => {
}) })
this.openpd = true;
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
...@@ -500,33 +501,24 @@ export default { ...@@ -500,33 +501,24 @@ export default {
// 派单按钮 // 派单按钮
submitFormpd() { submitFormpd() {
this.$refs.formpd.validate((valid) => { const newObj = {};
if (valid) { newObj.id = this.formpd.id;
const newObj = {}; newObj.maintainState = this.formpd.maintainState;
newObj.id = this.formpd.id; newObj.maintainName = this.formpd.maintainName;
newObj.maintainState = this.formpd.maintainState; newObj.maintainPhone = this.formpd.maintainPhone;
newObj.maintainName = this.formpd.maintainName; console.log('newObj', newObj);
newObj.maintainPhone = this.formpd.maintainPhone; console.log(newObj.maintainState);
console.log('newObj', newObj); dispatchRepairs(newObj)
console.log(newObj.maintainState); .then((response) => {
dispatchRepairs(newObj) // 派单成功,显示提示信息并刷新页面
.then((response) => { this.$message.success("派单成功");
this.$modal.closeLoading(); this.openpd = false;
this.$modal.msgSuccess("派单成功"); this.formpd.maintainResult = '';
this.getList(); this.getList();
this.openpd = false; })
this.formpd.maintainResult = '';
})
.catch((error) => {
});
} else {
return false;
}
});
}, },
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
......
...@@ -610,8 +610,18 @@ export default { ...@@ -610,8 +610,18 @@ export default {
console.log(params, "params"); console.log(params, "params");
console.log(res, "res"); console.log(res, "res");
this.total = res.total; this.total = res.total;
// =======
// const userId = this.$store.state.user.userId;
// const noticeName = this.queryForm.noticeName;
// console.log(userId, 'userId');
// console.log(noticeName, 'noticeName');
// getTeacherTnfo(userId, noticeName).then((res) => {
// this.tableData = res.rows;
// console.log(res, "res");
// >>>>>>> 026f530da388d11c389acb34cb726a7be3a375cf
}); });
}, },
// 提取 ` // 提取 `
handleExtract() { handleExtract() {
const fid = this.form.fid; const fid = this.form.fid;
......
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
<el-table-column label="领用日期" align="center" prop="recipientTime" width="200" /> <el-table-column label="领用日期" align="center" prop="recipientTime" width="200" />
<el-table-column label="领用人" align="center" prop="recipientBy" /> <el-table-column label="领用人" align="center" prop="recipientBy" />
<el-table-column label="退还日期" align="center" prop="returnTime" width="200" /> <el-table-column label="退还日期" align="center" prop="returnTime" width="200" />
<el-table-column label="退还时设备情况" align="center" prop="returnEquipmentCondition" /> <el-table-column label="退还时设备情况" align="center" prop="returnEquipmentCondition">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.equipment_state, row.returnEquipmentCondition) }}</div>
</template>
</el-table-column>
<el-table-column label="接收人" align="center" prop="receivedBy" /> <el-table-column label="接收人" align="center" prop="receivedBy" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" prop="orgname" width="150" fixed="right"> <el-table-column label="操作" align="center" prop="orgname" width="150" fixed="right">
...@@ -70,9 +74,8 @@ ...@@ -70,9 +74,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="领用人" prop="recipientById"> <el-form-item label="领用人" prop="recipientById">
<el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable <el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable
class="selectWidth" :disabled="nowType == 2 ? true : false"> class="selectWidth" :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in userListly" :key="index" <el-option v-for="(item, index) in userListly" :key="index" :label="item.userName" :value="item.userId">
:label="item.userName" :value="item.userId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -108,12 +111,15 @@ ...@@ -108,12 +111,15 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="退还时设备情况" prop="returnEquipmentCondition"> <el-form-item label="退还时设备情况" prop="returnEquipmentCondition">
<el-input v-model="collectionForm.returnEquipmentCondition" placeholder="请输入退还时设备情况" <el-select v-model="collectionForm.returnEquipmentCondition" placeholder="请输入退还时设备情况" clearable
:disabled="nowType == 2 ? true : false"></el-input> style="width: 100%;" :disabled="nowType == 2 ? true : false">
<el-option v-for="dict in dict.type.equipment_state" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="30"> <!-- <el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计使用时间" prop="yjuseTime"> <el-form-item label="预计使用时间" prop="yjuseTime">
<el-date-picker v-model="collectionForm.yjuseTime" type="datetime" clearable class="selectWidth" <el-date-picker v-model="collectionForm.yjuseTime" type="datetime" clearable class="selectWidth"
...@@ -128,7 +134,7 @@ ...@@ -128,7 +134,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row> -->
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
...@@ -161,6 +167,7 @@ import { ...@@ -161,6 +167,7 @@ import {
getRepairencode,//根据自编码获取设备信息 getRepairencode,//根据自编码获取设备信息
} from '@/api/smartSchool/schoolProperty/repairApplicant.js' } from '@/api/smartSchool/schoolProperty/repairApplicant.js'
export default { export default {
dicts: ['equipment_state',],
data() { data() {
return { return {
queryParams: { queryParams: {
...@@ -178,6 +185,7 @@ export default { ...@@ -178,6 +185,7 @@ export default {
adminUserListjs: [], adminUserListjs: [],
//新增 //新增
collectionForm: { collectionForm: {
equipmentId: '',
encode: '', encode: '',
equipmentName: '', equipmentName: '',
model: '', model: '',
...@@ -188,8 +196,6 @@ export default { ...@@ -188,8 +196,6 @@ export default {
receivedById: '', receivedById: '',
receivedBy: '', receivedBy: '',
returnEquipmentCondition: '', returnEquipmentCondition: '',
yjuseTime: '',
sjuseTime: '',
remark: '', remark: '',
}, },
dialogVisible: false, dialogVisible: false,
...@@ -213,12 +219,7 @@ export default { ...@@ -213,12 +219,7 @@ export default {
receivedById: [ receivedById: [
{ required: true, message: "接收人不能为空", trigger: "blur" } { required: true, message: "接收人不能为空", trigger: "blur" }
], ],
yjuseTime: [
{ required: true, message: "预计使用时间不能为空", trigger: "blur" }
],
sjuseTime: [
{ required: true, message: "实际使用时间不能为空", trigger: "blur" }
]
}, },
isEditable: true, isEditable: true,
} }
...@@ -244,6 +245,7 @@ export default { ...@@ -244,6 +245,7 @@ export default {
// 0新增、1编辑、2查看 // 0新增、1编辑、2查看
handleOption(type, item) { handleOption(type, item) {
this.collectionForm = { this.collectionForm = {
equipmentId: '',
id: '', id: '',
encode: '', encode: '',
equipmentName: '', equipmentName: '',
...@@ -255,8 +257,6 @@ export default { ...@@ -255,8 +257,6 @@ export default {
receivedById: '', receivedById: '',
receivedBy: '', receivedBy: '',
returnEquipmentCondition: '', returnEquipmentCondition: '',
yjuseTime: '',
sjuseTime: '',
remark: '', remark: '',
} }
this.nowType = type; this.nowType = type;
...@@ -355,8 +355,6 @@ export default { ...@@ -355,8 +355,6 @@ export default {
returnTime: null, returnTime: null,
receivedBy: null, receivedBy: null,
returnEquipmentCondition: null, returnEquipmentCondition: null,
yjuseTime: null,
sjuseTime: null,
remark: null, remark: null,
}; };
......
...@@ -21,14 +21,18 @@ ...@@ -21,14 +21,18 @@
<el-table v-loading="loading" :data="lendReturnData" stripe> <el-table v-loading="loading" :data="lendReturnData" stripe>
<el-table-column label="序号" type="index" width="55" align="center" /> <el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="自编码" align="center" prop="encode" width="140" /> <el-table-column label="自编码" align="center" prop="encode" width="140" />
<el-table-column label="设备名称" align="center" prop="equipmentName" /> <el-table-column label="设备名称" align="center" prop="equipmentName" width="130" />
<el-table-column label="型号" align="center" prop="model" /> <el-table-column label="型号" align="center" prop="model" />
<el-table-column label="借用日期" align="center" prop="borrowTime" width="160" /> <el-table-column label="借用日期" align="center" prop="borrowTime" width="160" />
<el-table-column label="借用人" align="center" prop="borrowBy" /> <el-table-column label="借用人" align="center" prop="borrowBy" />
<el-table-column label="用途" align="center" prop="purpose" /> <el-table-column label="用途" align="center" prop="purpose" />
<el-table-column label="借用期限(天)" align="center" prop="deadline" width="140" /> <el-table-column label="借用期限(天)" align="center" prop="deadline" width="140" />
<el-table-column label="归还日期" align="center" prop="returnTime" width="160" /> <el-table-column label="归还日期" align="center" prop="returnTime" width="160" />
<el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160" /> <el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160">
<template slot-scope="{ row }">
<dict-tag :options="dict.type.equipment_state" :value="row.returnEquipmentCondition" />
</template>
</el-table-column>
<el-table-column label="接收人" align="center" prop="receivedBy" /> <el-table-column label="接收人" align="center" prop="receivedBy" />
<el-table-column label="预计使用时间" align="center" prop="yjuseTime" width="160" /> <el-table-column label="预计使用时间" align="center" prop="yjuseTime" width="160" />
<el-table-column label="实际使用时间" align="center" prop="sjuseTime" width="160" /> <el-table-column label="实际使用时间" align="center" prop="sjuseTime" width="160" />
......
...@@ -9,14 +9,16 @@ ...@@ -9,14 +9,16 @@
<el-button type="primary" plain size="mini" @click="printTable">打印 <el-button type="primary" plain size="mini" @click="printTable">打印
</el-button> </el-button>
</div> </div>
</div> </div>
<el-card style="height: 100%;width: 900px;"> <el-card style="height: 100%;width: 900px;">
<br/> <br/> <br /> <br />
<div style="width: 100%; margin: auto;" id="postFormContainer"> <div id="postFormContainer">
<div style="text-align: center; font-weight: 800; font-size: 35px"> <div style="text-align: center; font-weight: 800; font-size: 35px">
学籍表 学籍表
</div> </div>
<br/> <br />
<table border="1px solid black" cellspacing="0" style="width: 860px"> <table border="1px solid black" cellspacing="0" style="width: 860px">
<tr> <tr>
<th rowspan="7" class="leftThree"> <th rowspan="7" class="leftThree">
...@@ -26,15 +28,22 @@ ...@@ -26,15 +28,22 @@
学校 学校
</th> </th>
<td style="height: 40px" colspan="6">东营市第二中学</td> <td style="height: 40px" colspan="6">东营市第二中学</td>
<td rowspan="4" class="tdStyle"><img :src="baseUrl + studentInfo.avatar " width="130px" height="160px" <td rowspan="4" class="tdStyle">
style="margin: 0 0 -3px 0;"></td> <img v-if="studentInfo.avatar" :src="baseUrl + studentInfo.avatar" width="130px" height="160px"
style="margin: 0 0 -3px 0;">
<div v-else
style="width: 130px; height: 160px; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center;"
:src="无照片">
</div>
</td>
</tr> </tr>
<tr> <tr>
<th>姓名</th> <th>姓名</th>
<td colspan="2" class="tdStyle" width="220px" style="height: 40px">{{ studentInfo.studentName }}</td> <td colspan="2" class="tdStyle" width="220px" style="height: 40px">{{ studentInfo.studentName }}</td>
<th width="80px">性别</th> <th width="80px">性别</th>
<td width="100px" class="tdStyle"> <td width="100px" class="tdStyle">
<dict-tag :options="dict.type.sys_user_sex" :value="studentInfo.sex"/> <dict-tag :options="dict.type.sys_user_sex" :value="studentInfo.sex" />
</td> </td>
<th width="80px">民族</th> <th width="80px">民族</th>
<td class="tdStyle">{{ studentInfo.nation }}</td> <td class="tdStyle">{{ studentInfo.nation }}</td>
...@@ -97,44 +106,44 @@ ...@@ -97,44 +106,44 @@
</tr> </tr>
<tr> <tr>
<td class="tdStyle" style="height: 40px"><span <td class="tdStyle" style="height: 40px"><span
v-if="studentParents.length>0 && studentParents[0].parentName">{{ studentParents[0].parentName }}</span> v-if="studentParents.length > 0 && studentParents[0].parentName">{{ studentParents[0].parentName }}</span>
</td> </td>
<td class="tdStyle"><span v-if="studentParents.length>0 && studentParents[0].relationship "> <td class="tdStyle"><span v-if="studentParents.length > 0 && studentParents[0].relationship">
<dict-tag :options="dict.type.relationship" :value="studentParents[0].relationship"/> <dict-tag :options="dict.type.relationship" :value="studentParents[0].relationship" />
</span></td> </span></td>
<td colspan="2"><span v-if="studentParents.length>0 && studentParents[0].workAddress ">{{ <td colspan="2"><span v-if="studentParents.length > 0 && studentParents[0].workAddress">{{
studentParents[0].workAddress studentParents[0].workAddress
}}</span></td> }}</span></td>
<td colspan="2"><span v-if="studentParents.length>0 && studentParents[0].contactAddress "> {{ <td colspan="2"><span v-if="studentParents.length > 0 && studentParents[0].contactAddress"> {{
studentParents[0].contactAddress studentParents[0].contactAddress
}}</span></td> }}</span></td>
<td><span v-if="studentParents.length>0 && studentParents[0].telephone ">{{ <td><span v-if="studentParents.length > 0 && studentParents[0].telephone">{{
studentParents[0].telephone studentParents[0].telephone
}}</span></td> }}</span></td>
<td><span v-if="studentParents.length>0 && studentParents[0].postalCode "> {{ <td><span v-if="studentParents.length > 0 && studentParents[0].postalCode"> {{
studentParents[0].postalCode studentParents[0].postalCode
}}</span></td> }}</span></td>
</tr> </tr>
<!-- 第二行--> <!-- 第二行-->
<tr> <tr>
<td class="tdStyle" style="height: 40px"><span <td class="tdStyle" style="height: 40px"><span
v-if="studentParents.length>1 && studentParents[1].parentName">{{ studentParents[1].parentName }}</span> v-if="studentParents.length > 1 && studentParents[1].parentName">{{ studentParents[1].parentName }}</span>
</td> </td>
<td class="tdStyle"><span v-if="studentParents.length>1 && studentParents[1].relationship "> <td class="tdStyle"><span v-if="studentParents.length > 1 && studentParents[1].relationship">
<dict-tag :options="dict.type.relationship" :value="studentParents[1].relationship"/> <dict-tag :options="dict.type.relationship" :value="studentParents[1].relationship" />
</span></td> </span></td>
<td colspan="2"><span v-if="studentParents.length>1 && studentParents[1].workAddress ">{{ <td colspan="2"><span v-if="studentParents.length > 1 && studentParents[1].workAddress">{{
studentParents[1].workAddress studentParents[1].workAddress
}}</span></td> }}</span></td>
<td colspan="2"><span v-if="studentParents.length>1 && studentParents[1].contactAddress "> {{ <td colspan="2"><span v-if="studentParents.length > 1 && studentParents[1].contactAddress"> {{
studentParents[1].contactAddress studentParents[1].contactAddress
}}</span></td> }}</span></td>
<td><span v-if="studentParents.length>1 && studentParents[1].telephone ">{{ <td><span v-if="studentParents.length > 1 && studentParents[1].telephone">{{
studentParents[1].telephone studentParents[1].telephone
}}</span></td> }}</span></td>
<td><span v-if="studentParents.length>1 && studentParents[1].postalCode "> {{ <td><span v-if="studentParents.length > 1 && studentParents[1].postalCode"> {{
studentParents[1].postalCode studentParents[1].postalCode
}}</span></td> }}</span></td>
</tr> </tr>
<tr> <tr>
<th rowspan="7" class="leftThree"> <th rowspan="7" class="leftThree">
...@@ -151,7 +160,7 @@ ...@@ -151,7 +160,7 @@
<tr> <tr>
<th style="height: 40px">政治面貌</th> <th style="height: 40px">政治面貌</th>
<td class="tdStyle" colspan="2"> <td class="tdStyle" colspan="2">
<dict-tag :options="dict.type.politics_tatus" :value="studentInfo.appearance"/> <dict-tag :options="dict.type.politics_tatus" :value="studentInfo.appearance" />
</td> </td>
<th>血型</th> <th>血型</th>
<td class="tdStyle" colspan="4">{{ studentInfo.bloodType }}</td> <td class="tdStyle" colspan="4">{{ studentInfo.bloodType }}</td>
...@@ -166,7 +175,7 @@ ...@@ -166,7 +175,7 @@
<tr> <tr>
<th style="height: 40px">独生子女</th> <th style="height: 40px">独生子女</th>
<td class="tdStyle" colspan="2"> <td class="tdStyle" colspan="2">
<dict-tag :options="dict.type.only_child" :value="studentInfo.onlyChild"/> <dict-tag :options="dict.type.only_child" :value="studentInfo.onlyChild" />
</td> </td>
<th>流动人口状况</th> <th>流动人口状况</th>
<td class="tdStyle" colspan="4">{{ studentInfo.floatingPopulation }}</td> <td class="tdStyle" colspan="4">{{ studentInfo.floatingPopulation }}</td>
...@@ -191,9 +200,9 @@ ...@@ -191,9 +200,9 @@
</template> </template>
<script> <script>
import printJS from "print-js"; import printJS from "print-js"
import {closeCurrentTab} from "@/utils/utilLibrary/routerBatch/routerBatch.js"; import { closeCurrentTab } from "@/utils/utilLibrary/routerBatch/routerBatch.js";
import {getTableInfo} from '@/api/smartSchool/teachAffairAdministration/affairStudentManage' import { getTableInfo } from '@/api/smartSchool/teachAffairAdministration/affairStudentManage'
export default { export default {
name: 'teachAffairStudentTable', name: 'teachAffairStudentTable',
...@@ -214,7 +223,9 @@ export default { ...@@ -214,7 +223,9 @@ export default {
let id = this.$route?.query?.id let id = this.$route?.query?.id
getTableInfo(id).then((res) => { getTableInfo(id).then((res) => {
this.studentInfo = res.data this.studentInfo = res.data
console.log(this.studentInfo, 'this.studentInfo');
this.studentParents = res.studentParents this.studentParents = res.studentParents
console.log(this.studentParents, 'this.studentParents');
}) })
}, },
closeCurrentTab, closeCurrentTab,
......
...@@ -910,16 +910,35 @@ export default { ...@@ -910,16 +910,35 @@ export default {
this.formDisabled = false; this.formDisabled = false;
}, },
// 学籍表 // 学籍表
// studentTable(row) {
// this.$router.push({
// path: '/teachAffairAdministration/studentTable',
// query: {
// id: row.id,
// // name: row.studentName,
// // idCard: row.idCard,
// // schoolNo: row.schoolNo
// }
// })
// },
studentTable(row) { studentTable(row) {
this.$router.push({ console.log('准备跳转');
path: '/teachAffairAdministration/studentTable', const baseUrl = window.location.origin; // 获取当前页面的协议、主机作为前缀URL
query: { // const baseUrl = window.location.protocol + '//' + window.location.host; // 获取当前页面的协议、主机作为前缀URL
id: row.id, console.log('im_1_0', baseUrl);
// name: row.studentName, // const url = `http://localhost:1024/studentRegistra?id=${row.id}&name=${row.studentName}&idCard=${row.idCard}&schoolNo=${row.schoolNo}`;
// idCard: row.idCard, const newURL = `${baseUrl}/studentTable?id=${encodeURIComponent(row.id)}&name=${encodeURIComponent(row.studentName)}&idCard=${encodeURIComponent(row.idCard)}&schoolNo=${encodeURIComponent(row.schoolNo)}`;
// schoolNo: row.schoolNo dd.biz.util.openLink({
url: newURL,
// url: url,
onSuccess: () => {
console.log(newURL, 'newURL');
console.log('跳转成功,准备打印');
},
onFail: (err) => {
console.log('跳转失败', err);
} }
}) });
}, },
// 学籍证明 // 学籍证明
// studentProve(row) { // studentProve(row) {
......
...@@ -89,13 +89,13 @@ public class StudentScoreController extends BaseController { ...@@ -89,13 +89,13 @@ public class StudentScoreController extends BaseController {
} }
/** /**
* 根据身份证号查询学生信息 * 根据号查询学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
@GetMapping("/selectStudent") @GetMapping("/selectStudent")
public AjaxResult selectStudent(@RequestParam("idCard") String idCard){ public AjaxResult selectStudent(@RequestParam("schoolNo") String schoolNo){
return AjaxResult.success(studentScoreService.selectStudent(idCard)); return AjaxResult.success(studentScoreService.selectStudent(schoolNo));
} }
/** /**
......
...@@ -100,7 +100,8 @@ public class SchoolPurchaseController extends BaseController { ...@@ -100,7 +100,8 @@ public class SchoolPurchaseController extends BaseController {
if (getDeptId() == null){ if (getDeptId() == null){
throw new ServiceException("未查询到当前部门id"); throw new ServiceException("未查询到当前部门id");
} }
schoolPurchase.setDeptId(getDeptId()); // schoolPurchase.setDeptId(getDeptId());
schoolPurchase.setApplyId(getUserId());
startPage(); startPage();
List<SchoolPurchaseVo> list = schoolPurchaseService.queryList(submitState,schoolPurchase); List<SchoolPurchaseVo> list = schoolPurchaseService.queryList(submitState,schoolPurchase);
return getDataTable(list); return getDataTable(list);
......
...@@ -137,7 +137,7 @@ public class LogisticsRepairsController extends BaseController ...@@ -137,7 +137,7 @@ public class LogisticsRepairsController extends BaseController
*/ */
@GetMapping("/listAll") @GetMapping("/listAll")
public TableDataInfo listAll(LogisticsRepairs logisticsRepairs){ public TableDataInfo listAll(LogisticsRepairs logisticsRepairs){
startPage(); // startPage();
return getDataTable(logisticsRepairsService.selectListAll(logisticsRepairs)); return getDataTable(logisticsRepairsService.selectListAll(logisticsRepairs));
} }
} }
...@@ -63,7 +63,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -63,7 +63,7 @@ public class SchoolExperimentPlanController extends BaseController
//如果是管理员,查询全部列表 //如果是管理员,查询全部列表
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo); List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectExperimentPlanListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -93,40 +93,12 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -93,40 +93,12 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds); schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo); List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
List<SchoolExperimentPlanVo> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (SchoolExperimentPlanVo experimentPlanVo : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(experimentPlanVo.getGradeId())){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(experimentPlanVo.getSub()))){
listNew.add(experimentPlanVo);
}
}
}
}
}
}
if (listNew.size() > 0){
for (SchoolExperimentPlanVo experimentPlanVo : listNew) {
list.remove(experimentPlanVo);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -322,7 +294,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -322,7 +294,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据 //管理员角色返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanService.countExperimentListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -368,39 +340,11 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -368,39 +340,11 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds); schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanService.gradeCountExperiment(schoolExperimentPlanVo);
List<Map<String, Object>> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (Map<String, Object> map : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(map.get("gradeId"))){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(map.get("sub")))){
listNew.add(map);
}
}
}
}
}
}
if (listNew.size() > 0){
for (Map<String, Object> map : listNew) {
list.remove(map);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -440,7 +384,7 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -440,7 +384,7 @@ public class SchoolExperimentPlanController extends BaseController
//管理员角色返回全部数据 //管理员角色返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo); List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClassListAdmin(schoolTeacherLabApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//计划实验数 //计划实验数
int jhsys = Integer.parseInt(list1.get("jhsys").toString()); int jhsys = Integer.parseInt(list1.get("jhsys").toString());
...@@ -484,13 +428,8 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -484,13 +428,8 @@ public class SchoolExperimentPlanController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolTeacherLabApplyVo.setGradeIds(gradeIds); schoolTeacherLabApplyVo.setGradeIds(gradeIds);
schoolTeacherLabApplyVo.setTeacherId(user.getUserId());
startPage(); startPage();
List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo); List<Map<String, Object>> list = schoolTeacherLabApplyService.gradeCountClass(schoolTeacherLabApplyVo);
list.forEach(list1 -> { list.forEach(list1 -> {
......
...@@ -63,8 +63,6 @@ public class SchoolLabClassYearController extends BaseController ...@@ -63,8 +63,6 @@ public class SchoolLabClassYearController extends BaseController
@Autowired @Autowired
private ISchoolGradeService gradeService; private ISchoolGradeService gradeService;
@Autowired @Autowired
private ISchoolGradeMentorService mentorService;
@Autowired
private ISchoolClassMentorService classMentorService; private ISchoolClassMentorService classMentorService;
/** /**
...@@ -78,7 +76,7 @@ public class SchoolLabClassYearController extends BaseController ...@@ -78,7 +76,7 @@ public class SchoolLabClassYearController extends BaseController
//如果是管理员返回全部数据 //如果是管理员返回全部数据
if (user.isAdmin()){ if (user.isAdmin()){
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectLabClassYearListAdmin(schoolLabClassYearVo);
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -111,38 +109,11 @@ public class SchoolLabClassYearController extends BaseController ...@@ -111,38 +109,11 @@ public class SchoolLabClassYearController extends BaseController
gradeIds.add(gradeId); gradeIds.add(gradeId);
}); });
//查询级部成员信息
LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
.eq(SchoolGradeMentor::getTeacherId,user.getUserId());
List<SchoolGradeMentor> schoolGradeMentors = mentorService.list(wrapper);
schoolLabClassYearVo.setGradeIds(gradeIds); schoolLabClassYearVo.setGradeIds(gradeIds);
schoolLabClassYearVo.setUserId(user.getUserId());
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo);
List<SchoolLabClassYearVo> listNew = new ArrayList<>();
//去除用户所在级部和所在学科组不匹配的数据
if (StringUtils.isNotNull(schoolGradeMentors)){
for (SchoolLabClassYearVo labClassYearVo : list) {
for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
if (schoolGradeMentor.getGradeId().equals(labClassYearVo.getGradeId())){
if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
if (!(schoolGradeMentor.getSubGroup().equals(labClassYearVo.getSub()))){
listNew.add(labClassYearVo);
}
}
}
}
}
}
if (listNew.size() > 0){
for (SchoolLabClassYearVo labClassYearVo : listNew) {
list.remove(labClassYearVo);
}
}
list.forEach(list1 -> { list.forEach(list1 -> {
String semester = ""; String semester = "";
if (list1.getSemester().equals("1")){ if (list1.getSemester().equals("1")){
...@@ -235,7 +206,86 @@ public class SchoolLabClassYearController extends BaseController ...@@ -235,7 +206,86 @@ public class SchoolLabClassYearController extends BaseController
@GetMapping("/getLab") @GetMapping("/getLab")
public AjaxResult getLab(SchoolExperimentPlanVo schoolExperimentPlanVo){ public AjaxResult getLab(SchoolExperimentPlanVo schoolExperimentPlanVo){
schoolExperimentPlanVo.setIsAppointment("0"); schoolExperimentPlanVo.setIsAppointment("0");
return AjaxResult.success(schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo)); SysUser user = SecurityUtils.getLoginUser().getUser();
//如果是管理员,查询全部列表
if (user.isAdmin()){
startPage();
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
semester = "上学期";
}else {
semester = "下学期";
}
list1.setSchoolYearSemester(list1.getSchoolYear() + semester);
list1.setPlannedTime(list1.getPlannedStartTime() + "至" + list1.getPlannedEndTime());
});
return AjaxResult.success(list);
}
//获取最新学年
int schoolYear = gradeService.isNewSchoolYear();
//教师级部
List<Map<String, Object>> gradeList = schoolExperimentPlanService.getGrade(schoolYear,user.getUserId());
if (StringUtils.isNull(gradeList) || gradeList.size() == 0) {
throw new ServiceException("没有您所在的级部信息");
}
//级部id集合
List<Long> gradeIds = new ArrayList<>();
gradeList.forEach(gradeList1 -> {
Object id = gradeList1.get("id");
Long gradeId = Long.valueOf(String.valueOf(id));
gradeIds.add(gradeId);
});
// //查询级部成员信息
// LambdaQueryWrapper<SchoolGradeMentor> wrapper = new LambdaQueryWrapper<>();
// wrapper.in(SchoolGradeMentor::getGradeId,gradeIds)
// .eq(SchoolGradeMentor::getTeacherId,user.getUserId());
// List<SchoolGradeMentor> schoolGradeMentors = schoolGradeMentorService.list(wrapper);
schoolExperimentPlanVo.setGradeIds(gradeIds);
schoolExperimentPlanVo.setTeacherId(getUserId());
List<SchoolExperimentPlanVo> list = schoolExperimentPlanService.selectSchoolExperimentPlanList(schoolExperimentPlanVo);
// List<SchoolExperimentPlanVo> listNew = new ArrayList<>();
//
// //去除用户所在级部和所在学科组不匹配的数据
// if (StringUtils.isNotNull(schoolGradeMentors)){
// for (SchoolExperimentPlanVo experimentPlanVo : list) {
// for (SchoolGradeMentor schoolGradeMentor : schoolGradeMentors) {
// if (schoolGradeMentor.getGradeId().equals(experimentPlanVo.getGradeId())){
// if (StringUtils.isNotBlank(schoolGradeMentor.getSubGroup())){
// if (!(schoolGradeMentor.getSubGroup().equals(experimentPlanVo.getSub()))){
// listNew.add(experimentPlanVo);
// }
// }else {
// listNew.add(experimentPlanVo);
// }
// }
// }
// }
// }
//
// if (listNew.size() > 0){
// for (SchoolExperimentPlanVo experimentPlanVo : listNew) {
// list.remove(experimentPlanVo);
// }
// }
list.forEach(list1 -> {
String semester = "";
if (list1.getSemester().equals("1")){
semester = "上学期";
}else {
semester = "下学期";
}
list1.setSchoolYearSemester(list1.getSchoolYear() + semester);
list1.setPlannedTime(list1.getPlannedStartTime() + "至" + list1.getPlannedEndTime());
});
return AjaxResult.success(list);
} }
/** /**
...@@ -305,7 +355,7 @@ public class SchoolLabClassYearController extends BaseController ...@@ -305,7 +355,7 @@ public class SchoolLabClassYearController extends BaseController
// 查询该教师属于哪个班级,教哪门课 // 查询该教师属于哪个班级,教哪门课
LambdaQueryWrapper<SchoolClassMentor> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolClassMentor> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolClassMentor::getTeacherId,user.getUserId()) wrapper.eq(SchoolClassMentor::getTeacherId,user.getUserId())
.in(SchoolClassMentor::getCourseId,6,8,9); .in(SchoolClassMentor::getCourseName,"物理","化学","生物");
List<SchoolClassMentor> schoolClassMentors = classMentorService.list(wrapper); List<SchoolClassMentor> schoolClassMentors = classMentorService.list(wrapper);
if (StringUtils.isNotNull(schoolClassMentors)){ if (StringUtils.isNotNull(schoolClassMentors)){
for (SchoolClassMentor schoolClassMentor : schoolClassMentors) { for (SchoolClassMentor schoolClassMentor : schoolClassMentors) {
...@@ -318,7 +368,9 @@ public class SchoolLabClassYearController extends BaseController ...@@ -318,7 +368,9 @@ public class SchoolLabClassYearController extends BaseController
} }
} }
schoolLabClassYearVo.setApplyId(user.getUserId()); schoolLabClassYearVo.setApplyId(user.getUserId());
schoolLabClassYearVo.setSubs(subs); if(subs.size() > 0){
schoolLabClassYearVo.setSubs(subs);
}
startPage(); startPage();
List<SchoolLabClassYearVo> list = schoolLabClassYearService.getTeacherLabList(schoolLabClassYearVo); List<SchoolLabClassYearVo> list = schoolLabClassYearService.getTeacherLabList(schoolLabClassYearVo);
list.forEach(list1 -> { list.forEach(list1 -> {
......
...@@ -396,7 +396,7 @@ public class SchoolStudentController extends BaseController { ...@@ -396,7 +396,7 @@ public class SchoolStudentController extends BaseController {
* @return * @return
*/ */
@GetMapping("/queryByrelationship/{id}/{relationship}") @GetMapping("/queryByrelationship/{id}/{relationship}")
public AjaxResult queryAllInfoByrelationship1(@PathVariable("id") Long id,@PathVariable("relationship") String relationship) { public AjaxResult queryAllInfoByrelationship1(@PathVariable("id") String id,@PathVariable("relationship") String relationship) {
//学生家长信息列表??? //学生家长信息列表???
/*SchoolStudentParent parent = new SchoolStudentParent(); /*SchoolStudentParent parent = new SchoolStudentParent();
...@@ -404,10 +404,13 @@ public class SchoolStudentController extends BaseController { ...@@ -404,10 +404,13 @@ public class SchoolStudentController extends BaseController {
parent.setRelationship(relationship); parent.setRelationship(relationship);
List<SchoolStudentParent> parentList = parentService.queryList(parent);*/ List<SchoolStudentParent> parentList = parentService.queryList(parent);*/
//SchoolStudentParent schoolStudentParent = new SchoolStudentParent(); //SchoolStudentParent schoolStudentParent = new SchoolStudentParent();
if (StringUtils.isEmpty(id) || id.equals("undefined")){
throw new ServiceException("请先选择学生!");
}
Long StudentId = Long.valueOf(id);
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw lqw
.eq(SchoolStudentParent::getStudentId,id) .eq(SchoolStudentParent::getStudentId,StudentId)
.eq(SchoolStudentParent::getRelationship,relationship); .eq(SchoolStudentParent::getRelationship,relationship);
List<SchoolStudentParent> list = parentService.list(lqw); List<SchoolStudentParent> list = parentService.list(lqw);
//对应关系的家长不存在,抛异常 //对应关系的家长不存在,抛异常
......
...@@ -17,8 +17,10 @@ public class SchoolOrganizationSignin extends OurBaseEntity ...@@ -17,8 +17,10 @@ public class SchoolOrganizationSignin extends OurBaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** id */ /** id */
@TableId(value = "id", type = IdType.AUTO)
@Excel(name = "id") @Excel(name = "id")
private Long id; private Long id;
/** 姓名 */ /** 姓名 */
@Excel(name = "姓名") @Excel(name = "姓名")
private String name; private String name;
......
...@@ -44,19 +44,19 @@ public class SchoolEquipmentLedger extends OurBaseEntity ...@@ -44,19 +44,19 @@ public class SchoolEquipmentLedger extends OurBaseEntity
private String unit; private String unit;
/** 归属类型(1公共区域,2信息中心,3个人) */ /** 归属类型(1公共区域,2信息中心,3个人) */
@Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人") @Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人", combo = {"公共区域","信息中心","个人"})
private String affiliationType; private String affiliationType;
/** 设备状态(1完好,2损坏,3报废) */ /** 设备状态(1完好,2损坏,3报废) */
@Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废") @Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废", combo = {"完好","损坏","报废"})
private String equipmentState; private String equipmentState;
/** 是否允许借出(1是,0否) */ /** 是否允许借出(1是,0否) */
@Excel(name = "是否允许借出", readConverterExp = "1=是,0=否") @Excel(name = "是否允许借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isAllowLend; private String isAllowLend;
/** 是否已借出(1是,0否) */ /** 是否已借出(1是,0否) */
@Excel(name = "是否已借出", readConverterExp = "1=是,0=否") @Excel(name = "是否已借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isLend; private String isLend;
/** 投产日期 */ /** 投产日期 */
......
...@@ -29,6 +29,9 @@ public class SchoolGradeMentor extends OurBaseEntity { ...@@ -29,6 +29,9 @@ public class SchoolGradeMentor extends OurBaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime; private Date endTime;
/** 类型(1年级部,2学科组长) */
private String type;
/** 职务 */ /** 职务 */
@NotBlank(message = "职务不能为空") @NotBlank(message = "职务不能为空")
private String teacherPost; private String teacherPost;
......
...@@ -17,11 +17,11 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> { ...@@ -17,11 +17,11 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> {
List<SchoolStudentScoreVo> selectStudentScoreList(SchoolStudentScoreVo schoolStudentScoreVo); List<SchoolStudentScoreVo> selectStudentScoreList(SchoolStudentScoreVo schoolStudentScoreVo);
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
SchoolStudentScoreVo selectStudent(@Param("idCard") String idCard); SchoolStudentScoreVo selectStudent(@Param("schoolNo") String schoolNo);
/** /**
* 查询学生成绩详细信息 * 查询学生成绩详细信息
......
...@@ -9,6 +9,7 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo; ...@@ -9,6 +9,7 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo;
import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo; import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo;
import java.util.List; import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface SchoolClassMentorMapper extends BaseMapper<SchoolClassMentor> { public interface SchoolClassMentorMapper extends BaseMapper<SchoolClassMentor> {
...@@ -18,6 +19,7 @@ public interface SchoolClassMentorMapper extends BaseMapper<SchoolClassMentor> { ...@@ -18,6 +19,7 @@ public interface SchoolClassMentorMapper extends BaseMapper<SchoolClassMentor> {
String selectByTeacherName(@Param("id") Long teacherId); String selectByTeacherName(@Param("id") Long teacherId);
SchoolClassMentorVo selectSchoolClassById(@Param("id") Long id); SchoolClassMentorVo selectSchoolClassById(@Param("id") Long id);
Map<String,String> selectTeacherGroupMentot(Long userId);
List<SchoolClassMentorVo> exportByIds(@Param("id") List<Integer> ids,@Param("classId") Long classId); List<SchoolClassMentorVo> exportByIds(@Param("id") List<Integer> ids,@Param("classId") Long classId);
......
...@@ -91,4 +91,18 @@ public interface SchoolDcwjRyMapper extends BaseMapper<SchoolDcwjRy> ...@@ -91,4 +91,18 @@ public interface SchoolDcwjRyMapper extends BaseMapper<SchoolDcwjRy>
public List<DcwjRyExportVo> getHeaderExportData(@Param("dcwjId") Long dcwjId, public List<DcwjRyExportVo> getHeaderExportData(@Param("dcwjId") Long dcwjId,
@Param("entity") SchoolDcwjAnVo vo, @Param("entity") SchoolDcwjAnVo vo,
@Param("studentIds")List<Long> studentIds); @Param("studentIds")List<Long> studentIds);
/**
* 批量新增调查问卷接收人(教师)
* @param schoolDcwjRyList
* @return
*/
int batchInsertDcwjRyTeacher(List<SchoolDcwjRy> schoolDcwjRyList);
/**
* 批量新增调查问卷接收人(家长)
* @param schoolDcwjRyList
* @return
*/
int batchInsertDcwjRyStudent(List<SchoolDcwjRy> schoolDcwjRyList);
} }
...@@ -34,6 +34,14 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP ...@@ -34,6 +34,14 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
*/ */
public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<SchoolExperimentPlanVo> selectSchoolExperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 新增实验计划 * 新增实验计划
...@@ -119,4 +127,11 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP ...@@ -119,4 +127,11 @@ public interface SchoolExperimentPlanMapper extends BaseMapper<SchoolExperimentP
* @return * @return
*/ */
List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo); List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 查看实验室完成情况列表(管理员)
* @param schoolExperimentPlanVo
* @return
*/
List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
} }
...@@ -35,6 +35,14 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear> ...@@ -35,6 +35,14 @@ public interface SchoolLabClassYearMapper extends BaseMapper<SchoolLabClassYear>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo); public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/** /**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约 * 新增年级实验室预约
* *
* @param schoolLabClassYear 年级实验室预约 * @param schoolLabClassYear 年级实验室预约
......
...@@ -122,6 +122,13 @@ public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLab ...@@ -122,6 +122,13 @@ public interface SchoolTeacherLabApplyMapper extends BaseMapper<SchoolTeacherLab
List<Map<String, Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo); List<Map<String, Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String, Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -40,11 +40,11 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> { ...@@ -40,11 +40,11 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
void checkImport(List<SchoolStudentScoreVo> list); void checkImport(List<SchoolStudentScoreVo> list);
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
SchoolStudentScoreVo selectStudent(String idCard); SchoolStudentScoreVo selectStudent(String schoolNo);
/** /**
* 新增学生成绩 * 新增学生成绩
......
...@@ -145,10 +145,12 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -145,10 +145,12 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
if (StringUtils.isNull(schoolStudentScoreVo.getStudentName())) { if (StringUtils.isNull(schoolStudentScoreVo.getStudentName())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、学生姓名为空,请你重新输入!"); failureMsg.append("<br/>" + failureNum + "、学生姓名为空,请你重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) { }
failureNum++; // else if (StringUtils.isNull(schoolStudentScoreVo.getIdCard())) {
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!"); // failureNum++;
} else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) { // failureMsg.append("<br/>" + failureNum + "、身份证号为空,请你重新输入!");
// }
else if (StringUtils.isEmpty(schoolStudentScoreVo.getStudentNumber())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、学号为空,请您重新输入!"); failureMsg.append("<br/>" + failureNum + "、学号为空,请您重新输入!");
} else if (StringUtils.isNull(schoolStudentScoreVo.getExamType())) { } else if (StringUtils.isNull(schoolStudentScoreVo.getExamType())) {
...@@ -157,7 +159,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -157,7 +159,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
} else { } else {
LambdaQueryWrapper<SchoolStudent> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudent> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolStudent::getStudentName,schoolStudentScoreVo.getStudentName()) wrapper.eq(SchoolStudent::getStudentName,schoolStudentScoreVo.getStudentName())
.eq(SchoolStudent::getIdCard,schoolStudentScoreVo.getIdCard()); .eq(SchoolStudent::getSchoolNo,schoolStudentScoreVo.getStudentNumber());
List<SchoolStudent> schoolStudents = schoolStudentMapper.selectList(wrapper); List<SchoolStudent> schoolStudents = schoolStudentMapper.selectList(wrapper);
if (StringUtils.isNull(schoolStudents) || schoolStudents.size() == 0){ if (StringUtils.isNull(schoolStudents) || schoolStudents.size() == 0){
failureNum++; failureNum++;
...@@ -175,15 +177,15 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch ...@@ -175,15 +177,15 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
} }
/** /**
* 根据身份证号获取学生信息 * 根据号获取学生信息
* @param idCard * @param schoolNo
* @return * @return
*/ */
@Override @Override
public SchoolStudentScoreVo selectStudent(String idCard) { public SchoolStudentScoreVo selectStudent(String schoolNo) {
SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(idCard); SchoolStudentScoreVo schoolStudentScoreVo = studentScoreMapper.selectStudent(schoolNo);
if (StringUtils.isNull(schoolStudentScoreVo)){ if (StringUtils.isNull(schoolStudentScoreVo)){
throw new ServiceException("未查询到该学生信息,请仔细核对身份证号码"); throw new ServiceException("未查询到该学生信息,请仔细核对学号");
} }
return schoolStudentScoreVo; return schoolStudentScoreVo;
} }
......
...@@ -37,6 +37,8 @@ import static com.core.constant.ProcessCommon.PENDING; ...@@ -37,6 +37,8 @@ import static com.core.constant.ProcessCommon.PENDING;
import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING; import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING;
import static com.core.constant.ProcessVariables.HANDUSERID1; import static com.core.constant.ProcessVariables.HANDUSERID1;
import static com.core.constant.ProcessVariables.HANDUSERID2; import static com.core.constant.ProcessVariables.HANDUSERID2;
import static com.ruoyi.common.utils.SecurityUtils.getUserId;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
import static com.ruoyi.common.utils.StringUtils.isNotNull; import static com.ruoyi.common.utils.StringUtils.isNotNull;
import static com.ruoyi.common.utils.StringUtils.substring; import static com.ruoyi.common.utils.StringUtils.substring;
import static yangtz.cs.liu.campus.constant.ProcessState.APPROVAL; import static yangtz.cs.liu.campus.constant.ProcessState.APPROVAL;
...@@ -84,8 +86,8 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper, ...@@ -84,8 +86,8 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper,
SchoolPurchase schoolPurchase = new SchoolPurchase(); SchoolPurchase schoolPurchase = new SchoolPurchase();
BeanUtils.copyProperties(purchase,schoolPurchase); BeanUtils.copyProperties(purchase,schoolPurchase);
schoolPurchase.setState(SAVE); schoolPurchase.setState(SAVE);
//schoolPurchase.setApplyId(getUserId()); schoolPurchase.setApplyId(getUserId());
//schoolPurchase.setApplyUser(getUsername()); schoolPurchase.setApplyUser(getUsername());
schoolPurchase.insert(); schoolPurchase.insert();
int flag = schoolPurchaseMapper.insert(schoolPurchase); int flag = schoolPurchaseMapper.insert(schoolPurchase);
if(flag > 0){ if(flag > 0){
......
...@@ -14,6 +14,7 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo; ...@@ -14,6 +14,7 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo;
import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo; import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
public class SchoolClassMentorImpl extends ServiceImpl<SchoolClassMentorMapper, SchoolClassMentor> implements ISchoolClassMentorService { public class SchoolClassMentorImpl extends ServiceImpl<SchoolClassMentorMapper, SchoolClassMentor> implements ISchoolClassMentorService {
...@@ -32,6 +33,15 @@ public class SchoolClassMentorImpl extends ServiceImpl<SchoolClassMentorMapper, ...@@ -32,6 +33,15 @@ public class SchoolClassMentorImpl extends ServiceImpl<SchoolClassMentorMapper,
List<SchoolClassMentorVo> list = schoolClassMentorMapper.selectSchoolClass(schoolClassMentorVo); List<SchoolClassMentorVo> list = schoolClassMentorMapper.selectSchoolClass(schoolClassMentorVo);
return list; return list;
} }
/**
* 查询老师所教的课程
* @param userId
* @return
*/
@Override
public Map<String,String> selectTeacherGroupMentot(Long userId) {
return schoolClassMentorMapper.selectTeacherGroupMentot(userId);
}
@Override @Override
public SchoolClassMentorVo selectSchoolClassMentorById(Long id) { public SchoolClassMentorVo selectSchoolClassMentorById(Long id) {
......
package yangtz.cs.liu.campus.service.impl.schoolDcwj; package yangtz.cs.liu.campus.service.impl.schoolDcwj;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -9,9 +11,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; ...@@ -9,9 +11,11 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.entity.SchoolTeacher; import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -28,8 +32,10 @@ import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper; ...@@ -28,8 +32,10 @@ import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.mapper.student.SchoolStudentMapper; import yangtz.cs.liu.campus.mapper.student.SchoolStudentMapper;
import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper; import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper;
import yangtz.cs.liu.campus.service.schoolDcwj.ISchoolDcwjService; import yangtz.cs.liu.campus.service.schoolDcwj.ISchoolDcwjService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo; import yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo;
import yangtz.cs.liu.campus.vo.schoolDcwj.DcwjSenateVo; import yangtz.cs.liu.campus.vo.schoolDcwj.DcwjSenateVo;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
import yangtz.cs.liu.wechat.vo.schoolDcwj.SchoolDcwjVo; import yangtz.cs.liu.wechat.vo.schoolDcwj.SchoolDcwjVo;
import yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj; import yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj;
...@@ -72,6 +78,12 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -72,6 +78,12 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
@Autowired @Autowired
private SchoolStudentMapper studentMapper; private SchoolStudentMapper studentMapper;
@Autowired
private ISchoolGradeService gradeService;
@Autowired
private SysDeptMapper deptMapper;
/** /**
* 查询调查问卷列表 * 查询调查问卷列表
* *
...@@ -338,22 +350,51 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -338,22 +350,51 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
for (SchoolDcwjPush push : pushes) { for (SchoolDcwjPush push : pushes) {
if (PUSHT.equals(push.getPubType())) { if (PUSHT.equals(push.getPubType())) {
//推送给全体教工类型的教师 //推送给全体教工类型的教师
SchoolTeacher t = new SchoolTeacher(); //获取最新学年
//设置用户类型为教工 int schoolYear = gradeService.isNewSchoolYear();
t.setEmployeeType(EmployeeType.TEACH); //获取最新三个级部
List<SchoolTeacher> teacherList = teacherMapper.getAllTeachers(t); List<SysDept> deptGrades = new ArrayList<>();
if (StringUtils.isNull(teacherList) || teacherList.size() == 0){ for (int i = 0; i< 3; i++){
SysDept sysDept = deptMapper.selectDeptGrade(String.valueOf(schoolYear - i));
if (StringUtils.isNotNull(sysDept)){
deptGrades.add(sysDept);
}
}
//推送全体教师的集合
List<SchoolTeacher> teacherList = new ArrayList<>();
//根据级部查询所有教师
for (SysDept deptGrade : deptGrades) {
SchoolTeacherVO t = new SchoolTeacherVO();
t.setDeptId(deptGrade.getDeptId());
List<SchoolTeacher> schoolTeachers = teacherMapper.teacherList(t);
teacherList.addAll(schoolTeachers);
}
if (teacherList.size() == 0){
throw new ServiceException("系统中暂无教职工类型为教工的教师,无法发布"); throw new ServiceException("系统中暂无教职工类型为教工的教师,无法发布");
} }
//去重
ArrayList<SchoolTeacher> schoolTeachers = teacherList.stream().collect(Collectors
.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator
.comparing(SchoolTeacher::getId))), ArrayList::new));
// SchoolTeacher t = new SchoolTeacher();
// //设置用户类型为教工
// t.setEmployeeType(EmployeeType.TEACH);
// List<SchoolTeacher> teacherList = teacherMapper.getAllTeachers(t);
//把教工存到调查问卷的接收人 //把教工存到调查问卷的接收人
for (SchoolTeacher teacher : teacherList){ List<SchoolDcwjRy> schoolDcwjRyList = new ArrayList<>();
for (SchoolTeacher teacher : schoolTeachers){
SchoolDcwjRy schoolDcwjRy = new SchoolDcwjRy(); SchoolDcwjRy schoolDcwjRy = new SchoolDcwjRy();
schoolDcwjRy.insert(); schoolDcwjRy.insert();
schoolDcwjRy.setDcwjId(id); schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setTeacherId(teacher.getId()); schoolDcwjRy.setTeacherId(teacher.getId());
schoolDcwjRy.setRyZdzt(DcwjType.FILLINON); schoolDcwjRy.setRyZdzt(DcwjType.FILLINON);
schoolDcwjRyMapper.insert(schoolDcwjRy); schoolDcwjRyList.add(schoolDcwjRy);
// schoolDcwjRyMapper.insert(schoolDcwjRy);
} }
//批量新增接收人
schoolDcwjRyMapper.batchInsertDcwjRyTeacher(schoolDcwjRyList);
break; break;
}else { }else {
//推送给级部家长 //推送给级部家长
...@@ -361,6 +402,10 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -361,6 +402,10 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
//查出学生所在的班级 //查出学生所在的班级
lqwClass.eq(SchoolClass::getGradeId, push.getGradeId()); lqwClass.eq(SchoolClass::getGradeId, push.getGradeId());
List<SchoolClass> schoolClassList = classMapper.selectList(lqwClass); List<SchoolClass> schoolClassList = classMapper.selectList(lqwClass);
//接收人集合
List<SchoolDcwjRy> schoolDcwjRyList = new ArrayList<>();
for (SchoolClass schoolClass : schoolClassList) { for (SchoolClass schoolClass : schoolClassList) {
//查出班级所有下所有学生 //查出班级所有下所有学生
LambdaQueryWrapper<SchoolStudent> lqwStudent = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudent> lqwStudent = new LambdaQueryWrapper<>();
...@@ -373,9 +418,13 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD ...@@ -373,9 +418,13 @@ public class SchoolDcwjServiceImpl extends ServiceImpl<SchoolDcwjMapper, SchoolD
schoolDcwjRy.setDcwjId(id); schoolDcwjRy.setDcwjId(id);
schoolDcwjRy.setStudentId(schoolStudent.getId()); schoolDcwjRy.setStudentId(schoolStudent.getId());
schoolDcwjRy.setRyZdzt(DcwjType.FILLINON); schoolDcwjRy.setRyZdzt(DcwjType.FILLINON);
schoolDcwjRyMapper.insert(schoolDcwjRy); schoolDcwjRyList.add(schoolDcwjRy);
// schoolDcwjRyMapper.insert(schoolDcwjRy);
} }
} }
//批量新增接收人
schoolDcwjRyMapper.batchInsertDcwjRyStudent(schoolDcwjRyList);
} }
} }
......
...@@ -85,6 +85,15 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive ...@@ -85,6 +85,15 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
String userName = sysUserMapper.selectUserById(schoolReceive.getReceivedById()).getUserName(); String userName = sysUserMapper.selectUserById(schoolReceive.getReceivedById()).getUserName();
schoolReceive.setReceivedBy(userName); schoolReceive.setReceivedBy(userName);
} }
if (StringUtils.isNotNull(schoolReceive.getReturnTime())){
schoolReceive.setReturnState("1");
SchoolEquipmentLedger schoolEquipmentLedger = new SchoolEquipmentLedger();
schoolEquipmentLedger.setId(schoolReceive.getEquipmentId());
schoolEquipmentLedger.setAffiliationType("2");
schoolEquipmentLedger.setUseId(null);
schoolEquipmentLedger.setUseName(null);
equipmentLedgerMapper.updateById(schoolEquipmentLedger);
}
schoolReceive.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName()); schoolReceive.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolReceive.setCreateTime(DateUtils.getNowDate()); schoolReceive.setCreateTime(DateUtils.getNowDate());
return receiveMapper.insert(schoolReceive); return receiveMapper.insert(schoolReceive);
......
...@@ -175,6 +175,8 @@ public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBor ...@@ -175,6 +175,8 @@ public class SchoolTeacherBorrowServiceImpl extends ServiceImpl<SchoolTeacherBor
*/ */
@Override @Override
public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) { public int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo) {
//设置状态为已归还
schoolTeacherBorrowVo.setBorrowState("1");
schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate()); schoolTeacherBorrowVo.setReturnTime(DateUtils.getNowDate());
SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow(); SchoolTeacherBorrow schoolTeacherBorrow = new SchoolTeacherBorrow();
BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow); BeanUtils.copyProperties(schoolTeacherBorrowVo,schoolTeacherBorrow);
......
package yangtz.cs.liu.campus.service.impl.schoolLab; package yangtz.cs.liu.campus.service.impl.schoolLab;
import com.ruoyi.framework.util.UserInfoUtil;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
...@@ -21,12 +22,14 @@ import java.util.Map; ...@@ -21,12 +22,14 @@ import java.util.Map;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass; import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolExperimentPlanMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan; import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlan;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMentorMapper; import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMentorMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolExperimentPlanVo;
/** /**
...@@ -44,9 +47,12 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -44,9 +47,12 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
private SchoolLabMapper schoolLabMapper; private SchoolLabMapper schoolLabMapper;
@Autowired @Autowired
private SchoolGradeMentorMapper schoolGradeMentorMapper; private SchoolGradeMentorMapper schoolGradeMentorMapper;
@Autowired
UserInfoUtil userInfoUtil;
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Autowired
private ISchoolGradeService schoolGradeService;
/** /**
* 查询实验计划 * 查询实验计划
* *
...@@ -72,12 +78,28 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -72,12 +78,28 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
} }
/** /**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划
*/
@Override
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo)
{
return schoolExperimentPlanMapper.selectExperimentPlanListAdmin(schoolExperimentPlanVo);
}
/**
* 获取计划下拉列表 * 获取计划下拉列表
* @param schoolExperimentPlanVo * @param schoolExperimentPlanVo
* @return * @return
*/ */
@Override @Override
public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo) { public List<Map<String, String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo) {
//判斷當前老師所在的级部
Long userId = userInfoUtil.getMpLoginUser().getUserId();
Long gradeId = schoolGradeService.getGradeId(userId);
schoolExperimentPlanVo.setGradeId(gradeId);
return schoolExperimentPlanMapper.selectNameByVo(schoolExperimentPlanVo); return schoolExperimentPlanMapper.selectNameByVo(schoolExperimentPlanVo);
} }
...@@ -346,7 +368,7 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -346,7 +368,7 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
*/ */
@Override @Override
public List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) { public List<Map<String, Object>> countExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) {
List<Map<String, Object>> list = schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo); List<Map<String, Object>> list = schoolExperimentPlanMapper.countExperimentListAdmin(schoolExperimentPlanVo);
list.forEach(list1 -> { list.forEach(list1 -> {
//总班级数 //总班级数
int totalClass = Integer.parseInt(list1.get("totalClass").toString()); int totalClass = Integer.parseInt(list1.get("totalClass").toString());
...@@ -506,4 +528,14 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen ...@@ -506,4 +528,14 @@ public class SchoolExperimentPlanServiceImpl extends ServiceImpl<SchoolExperimen
public List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) { public List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo); return schoolExperimentPlanMapper.countExperiment(schoolExperimentPlanVo);
} }
/**
* 实验室完成情况明细(管理员)
* @param schoolExperimentPlanVo
* @return
*/
@Override
public List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo) {
return schoolExperimentPlanMapper.countExperimentListAdmin(schoolExperimentPlanVo);
}
} }
...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.service.impl.schoolLab; ...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -15,12 +16,15 @@ import org.springframework.beans.BeanUtils; ...@@ -15,12 +16,15 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory; import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYearRelation;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApplyLabs;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoollTeacherExperimentApplyLabsService; import yangtz.cs.liu.campus.service.schoolLab.ISchoollTeacherExperimentApplyLabsService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
/** /**
...@@ -36,6 +40,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -36,6 +40,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper; private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper;
@Autowired @Autowired
private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService; private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService;
@Autowired
private ISchoolLabClassYearService schoolLabClassYearService;
/** /**
* 查询教师个人实验申请 * 查询教师个人实验申请
* *
...@@ -154,6 +160,22 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -154,6 +160,22 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
} }
if (list.size() > 0){ if (list.size() > 0){
schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyLabsId(id); schoolTeacherExperimentApplyMapper.deleteSchoolTeacherExperimentApplyLabsId(id);
SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo1 = schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyById(id);
//判断用户选择的实验室是否正在使用
SchoolLabClassYearVo schoolLabClassYearVo1 = new SchoolLabClassYearVo();
schoolLabClassYearVo1.setPlannedStartTime(schoolTeacherExperimentApplyVo1.getPlannedStartTime());
schoolLabClassYearVo1.setPlannedEndTime(schoolTeacherExperimentApplyVo1.getPlannedEndTime());
schoolLabClassYearVo1.setSub(schoolTeacherExperimentApplyVo1.getSub());
List<Map<String, Object>> labList = schoolLabClassYearService.getLabList(schoolLabClassYearVo1);
for (SchoolTeacherExperimentApplyLabs experimentApplyLabs : list) {
for (Map<String, Object> map : labList) {
if (experimentApplyLabs.getLabId().equals(Long.parseLong(String.valueOf(map.get("labId"))))){
if ("使用中".equals(String.valueOf(map.get("useState")))){
throw new ServiceException("您选择的" + map.get("labName") + "实验室正在使用,请重新选择!");
}
}
}
}
schoolTeacherExperimentApplyMapper.batchSchoolTeacherExperimentApplyLabs(list); schoolTeacherExperimentApplyMapper.batchSchoolTeacherExperimentApplyLabs(list);
} }
return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo); return schoolTeacherExperimentApplyMapper.updateSchoolTeacherExperimentApply(schoolTeacherExperimentApplyVo);
......
...@@ -392,6 +392,16 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -392,6 +392,16 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
} }
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
@Override
public List<Map<String, Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) {
return schoolTeacherLabApplyMapper.gradeCountClassListAdmin(schoolTeacherLabApplyVo);
}
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -143,10 +143,12 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -143,10 +143,12 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) { if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! "); failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! ");
} else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) { }
failureNum++; // else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) {
failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! "); // failureNum++;
} else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) { // failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! ");
// }
else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!"); failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!");
} else if (isNotNull(schoolTeacherWages.getWagesTime())) { } else if (isNotNull(schoolTeacherWages.getWagesTime())) {
......
...@@ -7,10 +7,12 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo; ...@@ -7,10 +7,12 @@ import yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo;
import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo; import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo;
import java.util.List; import java.util.List;
import java.util.Map;
public interface ISchoolClassMentorService extends IService<SchoolClassMentor> { public interface ISchoolClassMentorService extends IService<SchoolClassMentor> {
public List<SchoolClassMentorVo> selectSchoolClassMentorList(SchoolClassMentorVo schoolClassMentorVo); public List<SchoolClassMentorVo> selectSchoolClassMentorList(SchoolClassMentorVo schoolClassMentorVo);
public Map<String,String> selectTeacherGroupMentot(Long userId);
public SchoolClassMentorVo selectSchoolClassMentorById(Long id); public SchoolClassMentorVo selectSchoolClassMentorById(Long id);
......
...@@ -34,6 +34,14 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -34,6 +34,14 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo); public List<Map<String,String>> selectNameByVo(SchoolExperimentPlanVo schoolExperimentPlanVo);
/** /**
* 查询实验计划列表(管理员)
*
* @param schoolExperimentPlanVo 实验计划
* @return 实验计划集合
*/
public List<SchoolExperimentPlanVo> selectExperimentPlanListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 新增实验计划 * 新增实验计划
* *
* @param schoolExperimentPlanVo 实验计划 * @param schoolExperimentPlanVo 实验计划
...@@ -115,4 +123,11 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP ...@@ -115,4 +123,11 @@ public interface ISchoolExperimentPlanService extends IService<SchoolExperimentP
* @return * @return
*/ */
List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo); List<Map<String, Object>> gradeCountExperiment(SchoolExperimentPlanVo schoolExperimentPlanVo);
/**
* 实验室完成情况明细(管理员)
* @param schoolExperimentPlanVo
* @return
*/
List<Map<String, Object>> countExperimentListAdmin(SchoolExperimentPlanVo schoolExperimentPlanVo);
} }
...@@ -24,6 +24,7 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear> ...@@ -24,6 +24,7 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear>
* @return 年级实验室预约 * @return 年级实验室预约
*/ */
public SchoolLabClassYearVo selectSchoolLabClassYearById(Long id); public SchoolLabClassYearVo selectSchoolLabClassYearById(Long id);
public List<String> convertMentor(List<String> id);
/** /**
* 查询年级实验室预约列表 * 查询年级实验室预约列表
...@@ -34,6 +35,14 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear> ...@@ -34,6 +35,14 @@ public interface ISchoolLabClassYearService extends IService<SchoolLabClassYear>
public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo); public List<SchoolLabClassYearVo> selectSchoolLabClassYearList(SchoolLabClassYearVo schoolLabClassYearVo);
/** /**
* 查询年级实验室预约列表(管理员)
*
* @param schoolLabClassYearVo 年级实验室预约
* @return 年级实验室预约集合
*/
public List<SchoolLabClassYearVo> selectLabClassYearListAdmin(SchoolLabClassYearVo schoolLabClassYearVo);
/**
* 新增年级实验室预约 * 新增年级实验室预约
* *
* @param schoolLabClassYear 年级实验室预约 * @param schoolLabClassYear 年级实验室预约
......
...@@ -123,6 +123,13 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab ...@@ -123,6 +123,13 @@ public interface ISchoolTeacherLabApplyService extends IService<SchoolTeacherLab
List<Map<String,Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo); List<Map<String,Object>> gradeCountClass(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/** /**
* 班级完成情况明细(管理员)
* @param schoolTeacherLabApplyVo
* @return
*/
List<Map<String,Object>> gradeCountClassListAdmin(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo);
/**
* 级部-班级完成情况明细-查看班级完成情况详情 * 级部-班级完成情况明细-查看班级完成情况详情
* @param schoolTeacherLabApplyVo * @param schoolTeacherLabApplyVo
* @return * @return
......
...@@ -20,7 +20,6 @@ public class StudentScoreVo { ...@@ -20,7 +20,6 @@ public class StudentScoreVo {
@Excel(name = "学号") @Excel(name = "学号")
private String studentNumber; private String studentNumber;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "身份证号")
private String idCard; private String idCard;
/** 班级 */ /** 班级 */
@Excel(name = "班级") @Excel(name = "班级")
......
...@@ -79,6 +79,8 @@ public class SchoolExperimentPlanVo extends BaseEntity ...@@ -79,6 +79,8 @@ public class SchoolExperimentPlanVo extends BaseEntity
@Excel(name = "实验用品") @Excel(name = "实验用品")
private String experimentUseGoods; private String experimentUseGoods;
private Long teacherId;
/** 实验计划与班级关系信息 */ /** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList; private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
} }
...@@ -58,4 +58,12 @@ public class SchoolGradeMentorVo extends OurBaseEntity { ...@@ -58,4 +58,12 @@ public class SchoolGradeMentorVo extends OurBaseEntity {
private String sex; private String sex;
private String education; private String education;
/** 类型(1年级部,2学科组长) */
private String type;
/** 学科组(1物理学科组,2化学学科组,3生物学科组) */
private String subGroup;
} }
...@@ -25,7 +25,6 @@ public class SchoolStudentScoreVo extends OurBaseEntity { ...@@ -25,7 +25,6 @@ public class SchoolStudentScoreVo extends OurBaseEntity {
@Excel(name = "*学号") @Excel(name = "*学号")
private String studentNumber; private String studentNumber;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "*身份证号")
private String idCard; private String idCard;
/** 班级 */ /** 班级 */
@Excel(name = "班级") @Excel(name = "班级")
......
...@@ -239,8 +239,7 @@ public class DingJiaXiaoController { ...@@ -239,8 +239,7 @@ public class DingJiaXiaoController {
schoolClass.setGradeValue(date.getGradeValue()); schoolClass.setGradeValue(date.getGradeValue());
schoolClass.setGradeName(date.getGradeName()); schoolClass.setGradeName(date.getGradeName());
schoolClass.setClassValue(Integer.valueOf(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString())); schoolClass.setClassValue(Integer.valueOf(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString()));
String className = jsonArrays.getJSONObject(i).get("name").toString(); schoolClass.setClassName(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString()+"班");
schoolClass.setClassName(className.substring(className.length()-2));
schoolClass.setClassAlias(jsonArrays.getJSONObject(i).get("name").toString()); schoolClass.setClassAlias(jsonArrays.getJSONObject(i).get("name").toString());
schoolClass.setUpdateBy("admin"); schoolClass.setUpdateBy("admin");
schoolClass.setUpdateTime(new Date()); schoolClass.setUpdateTime(new Date());
...@@ -255,8 +254,7 @@ public class DingJiaXiaoController { ...@@ -255,8 +254,7 @@ public class DingJiaXiaoController {
schoolClass.setGradeValue(date.getGradeValue()); schoolClass.setGradeValue(date.getGradeValue());
schoolClass.setGradeName(date.getGradeName()); schoolClass.setGradeName(date.getGradeName());
schoolClass.setClassValue(Integer.valueOf(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString())); schoolClass.setClassValue(Integer.valueOf(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString()));
String className = jsonArrays.getJSONObject(i).get("name").toString(); schoolClass.setClassName(jsonArrays.getJSONObject(i).getJSONObject("feature").get("class_level").toString()+"班");
schoolClass.setClassName(className.substring(className.length()-2));
schoolClass.setClassAlias(jsonArrays.getJSONObject(i).get("name").toString()); schoolClass.setClassAlias(jsonArrays.getJSONObject(i).get("name").toString());
schoolClass.setCreateBy("admin"); schoolClass.setCreateBy("admin");
schoolClass.setCreateTime(new Date()); schoolClass.setCreateTime(new Date());
......
...@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.dingding.config.Constant; import yangtz.cs.liu.dingding.config.Constant;
import yangtz.cs.liu.dingding.service.impl.dingDept.DdDeptServcieImpl; import yangtz.cs.liu.dingding.service.impl.dingDept.DdDeptServcieImpl;
import yangtz.cs.liu.dingding.service.impl.dingUser.DdUserServiceImpl; import yangtz.cs.liu.dingding.service.impl.dingUser.DdUserServiceImpl;
import yangtz.cs.liu.dingding.utils.DingCallbackCrypto; import yangtz.cs.liu.dingding.utils.DingCallbackCrypto;
import javax.annotation.PostConstruct;
import java.util.Map; import java.util.Map;
/** /**
...@@ -82,34 +84,32 @@ public class DingEventController { ...@@ -82,34 +84,32 @@ public class DingEventController {
ddUserService.xjUserAdd(eventJson); ddUserService.xjUserAdd(eventJson);
}else if ("edu_user_update".equals(eventType)){ }else if ("edu_user_update".equals(eventType)){
// 家校人员身份更新 // 家校人员身份更新
eventJson.get(""); ddUserService.xjUserUpdate(eventJson);
}else if ("edu_user_delete".equals(eventType)){ }else if ("edu_user_delete".equals(eventType)){
// 家校人员身份删除 // 家校人员身份删除
eventJson.get(""); ddUserService.xjUserDelete(eventJson);
}else if ("edu_user_relation_insert".equals(eventType)){ }else if ("edu_user_relation_insert".equals(eventType)){
// 家校人员关系新增 // 家校人员关系新增
eventJson.get(""); ddUserService.relationInsert(eventJson);
}else if ("edu_user_relation_update".equals(eventType)){ }else if ("edu_user_relation_update".equals(eventType)){
// 家校人员关系更新 // 家校人员关系更新
eventJson.get(""); ddUserService.relationUpdate(eventJson);
} }
else if ("edu_user_relation_delete".equals(eventType)){ else if ("edu_user_relation_delete".equals(eventType)){
// 家校人员关系删除 // 家校人员关系删除
eventJson.get(""); ddUserService.relationDelete(eventJson);
}else if ("edu_dept_insert".equals(eventType)){ }else if ("edu_dept_insert".equals(eventType)){
// 家校部门 节点新增 // 家校部门 节点新增
eventJson.get(""); ddDeptServcie.eduDeptInsert(eventJson);
} }
else if ("edu_dept_update".equals(eventType)){ else if ("edu_dept_update".equals(eventType)){
// 家校部门 节点更新 // 家校部门 节点更新 当前不做任何操作,钉钉改班级只会改别名,别名不做保存
eventJson.get(""); eventJson.get("");
}else if ("edu_dept_delete".equals(eventType)){ }else if ("edu_dept_delete".equals(eventType)){
// 家校部门 节点更新 // 家校部门 删除
eventJson.get(""); ddDeptServcie.eduDeptDelete(eventJson);
} }
else { else {
// 添加其他已注册的 // 添加其他已注册的
log.info("发生了:" + eventType + "事件"); log.info("发生了:" + eventType + "事件");
...@@ -124,4 +124,5 @@ public class DingEventController { ...@@ -124,4 +124,5 @@ public class DingEventController {
} }
return null; return null;
} }
} }
package yangtz.cs.liu.dingding.service.impl.dingDept; package yangtz.cs.liu.dingding.service.impl.dingDept;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dingtalk.api.response.OapiV2DepartmentGetResponse; import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
import com.dingtalk.api.response.OapiV2DepartmentListsubResponse; import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.student.SchoolStudentClasses;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.dingding.domain.dingDept.SysDdDept; import yangtz.cs.liu.dingding.domain.dingDept.SysDdDept;
import yangtz.cs.liu.dingding.mapper.dingDept.DdDeptMapper; import yangtz.cs.liu.dingding.mapper.dingDept.DdDeptMapper;
import yangtz.cs.liu.dingding.service.dingDept.IDdDeptService; import yangtz.cs.liu.dingding.service.dingDept.IDdDeptService;
import yangtz.cs.liu.dingding.utils.AccessTokenUtils;
import yangtz.cs.liu.dingding.utils.DingDeptUtils; import yangtz.cs.liu.dingding.utils.DingDeptUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
...@@ -21,7 +31,15 @@ public class DdDeptServcieImpl implements IDdDeptService { ...@@ -21,7 +31,15 @@ public class DdDeptServcieImpl implements IDdDeptService {
private DingDeptUtils dingDeptUtils; private DingDeptUtils dingDeptUtils;
@Autowired @Autowired
private DdDeptMapper ddDeptMapper; private DdDeptMapper ddDeptMapper;
@Autowired
private AccessTokenUtils accessTokenUtils;
//年级表
@Autowired
ISchoolGradeService schoolGradeService;
//学校班级
@Autowired
ISchoolClassService iSchoolClassService;
/** /**
* 获取钉钉全部部门列表 * 获取钉钉全部部门列表
* @return * @return
...@@ -378,4 +396,167 @@ public class DdDeptServcieImpl implements IDdDeptService { ...@@ -378,4 +396,167 @@ public class DdDeptServcieImpl implements IDdDeptService {
} }
return i; return i;
} }
/**
* 家乡通讯录部门新增
*/
public Integer eduDeptInsert(JSONObject eventJson){
String token = accessTokenUtils.getToken();
Integer deptId = (Integer)eventJson.get("deptId");
JSONObject jxDeptDate = this.getJxDeptDate(deptId, token);
//部门别名
String nick = (String)jxDeptDate.get("nick");
//节点连,从顶层节点到当前节点的中间节点,其内容不包含当前节点。
String chain = (String)jxDeptDate.get("chain");
//部门ID。。
Integer deptIdd = (Integer)jxDeptDate.get("dept_id");
//部门类型节点类型。 campus:校区 period:学段 grade:年级 class:班级
String deptType = (String)jxDeptDate.get("dept_type");
//部 门 名称。
String name = (String)jxDeptDate.get("name");
//判断当前部 门 类型//只做 年级跟班级的判断
if (deptType.equals("grade")){
String gradeJi = name.substring(name.length() - 5);
String grade = gradeJi.substring(0,gradeJi.length()-1);
//年级直接新增
SchoolGrade schoolGrade = new SchoolGrade();
schoolGrade.setGradeValue(Integer.valueOf(this.gradeSubt(name)));
schoolGrade.setGradeYear(grade);
schoolGrade.setGradeName(gradeJi+"部");
schoolGrade.setRemark(name);
schoolGrade.setDdClassId(String.valueOf(deptId));
schoolGrade.setCreateTime(new Date());
schoolGrade.setCreateBy("admin");
schoolGrade.setDelFlag("0");
schoolGrade.setUpdateBy("admin");
schoolGrade.setUpdateTime(new Date());
schoolGradeService.save(schoolGrade);
}else if(deptType.equals("class")){
//找到级部
String[] arra = new String[]{chain};
String grDept = arra[arra.length-1];
//级部id
Long l = schoolGradeService.selectDdClassId(grDept);
SchoolGrade byId = schoolGradeService.getById(l);
//新增班级
SchoolClass schoolClass = new SchoolClass();
schoolClass.setSchoolYear(Integer.valueOf(byId.getSchoolYear()));
schoolClass.setClassType("4");
schoolClass.setGradeValue(byId.getGradeValue());
schoolClass.setGradeName(byId.getGradeName());
schoolClass.setClassValue(Integer.valueOf(jxDeptDate.getJSONObject("feature").get("class_level").toString()));
schoolClass.setClassName(jxDeptDate.getJSONObject("feature").get("class_level").toString()+"班");
schoolClass.setClassAlias(name);
schoolClass.setCreateBy("admin");
schoolClass.setCreateTime(new Date());
schoolClass.setUpdateBy("admin");
schoolClass.setUpdateTime(new Date());
schoolClass.setGradeId(byId.getId());
schoolClass.setDdClassId(deptIdd.toString());
iSchoolClassService.save(schoolClass);
}
return 0;
}
/**
* 删除部门 删除部门的时候人员必须清空才会去掉
* @param eventJson
* @return
*/
public Integer eduDeptDelete(JSONObject eventJson){
String token = accessTokenUtils.getToken();
Integer deptId = (Integer)eventJson.get("deptId");
JSONObject jxDeptDate = this.getJxDeptDate(deptId, token);
//部门别名
String nick = (String)jxDeptDate.get("nick");
//节点连,从顶层节点到当前节点的中间节点,其内容不包含当前节点。
String chain = (String)jxDeptDate.get("chain");
//部门ID。。
Integer deptIdd = (Integer)jxDeptDate.get("dept_id");
//部门类型节点类型。 campus:校区 period:学段 grade:年级 class:班级
String deptType = (String)jxDeptDate.get("dept_type");
//部 门 名称。
String name = (String)jxDeptDate.get("name");
//判断当前部 门 类型//只做 年级跟班级的判断
if (deptType.equals("grade")){
//删除年级下边所有的班级
Long l = schoolGradeService.selectDdClassId(deptIdd.toString());
SchoolGrade byId = schoolGradeService.getById(l);
//删除级部下的班级
LambdaQueryWrapper<SchoolClass> icsclqw=new LambdaQueryWrapper<>();
icsclqw.eq(SchoolClass::getGradeValue,byId.getGradeValue());
icsclqw.eq(SchoolClass::getGradeName,byId.getGradeName());
icsclqw.eq(SchoolClass::getSchoolYear,byId.getSchoolYear());
List<SchoolClass> list = iSchoolClassService.list(icsclqw);
//删除班级
for (SchoolClass date :list){
iSchoolClassService.removeById(date.getId());
}
//删除级部
schoolGradeService.removeById(l);
}else if(deptType.equals("class")){
//删除部门
Long l = iSchoolClassService.selectDdClassId(deptIdd.toString());
iSchoolClassService.removeById(l);
}
return 0;
}
/**
* 获取家校通讯录部门信息
*/
public JSONObject getJxDeptDate(Integer deptId,String token){
JSONObject bjParme = new JSONObject();
bjParme.put("dept_id",deptId);
String bjPost = HttpUtil.post("https://oapi.dingtalk.com/topapi/edu/dept/get?access_token="+token, bjParme);
JSONObject bjObject = JSONObject.parseObject(bjPost);
if ((Integer) bjObject.get("errcode") != 0){
throw new RuntimeException("获取部门失败:"+bjPost);
}
JSONObject jsonObject = bjObject.getJSONObject("result").getJSONObject("detail");
return jsonObject;
}
private String gradeSubt(String grade){
String gId = null;
switch (grade){
case "一年级": return gId = "1";
case "二年级": return gId = "2";
case "三年级": return gId = "3";
case "四年级": return gId = "4";
case "五年级": return gId = "5";
case "六年级": return gId = "6";
case "七年级": return gId = "7";
case "八年级": return gId = "8";
case "九年级": return gId = "9";
case "十年级": return gId = "10";
case "十一年级": return gId = "11";
case "十二年级": return gId = "12";
case "十三年级": return gId = "13";
case "十四年级": return gId = "14";
case "十五年级": return gId = "15";
case "十六年级": return gId = "16";
case "十七年级": return gId = "17";
case "十八年级": return gId = "18";
case "十九年级": return gId = "19";
case "二十年级": return gId = "20";
case "二十一年级": return gId = "21";
case "二十二级": return gId = "22";
case "二十三年级": return gId = "23";
case "二十四年级": return gId = "24";
case "二十五年级": return gId = "25";
case "二十六年级": return gId = "26";
case "二十七年级": return gId = "27";
case "二十八年级": return gId = "28";
case "二十九年级": return gId = "29";
case "三十年级": return gId = "30";
}
return gId;
}
} }
...@@ -85,6 +85,7 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -85,6 +85,7 @@ public class ExperimentAdministratorsControoler extends BaseController {
Date stDate = ft.parse(dateArray); Date stDate = ft.parse(dateArray);
Date enDate = ft.parse(dateArray1); Date enDate = ft.parse(dateArray1);
schoolLabClassYear.setPlannedStartTime(stDate); schoolLabClassYear.setPlannedStartTime(stDate);
schoolLabClassYear.setDeclareState("3");
schoolLabClassYear.setPlannedEndTime(enDate); schoolLabClassYear.setPlannedEndTime(enDate);
return toAjax(schoolLabClassYearService.updateLabClassYear(schoolLabClassYear)); return toAjax(schoolLabClassYearService.updateLabClassYear(schoolLabClassYear));
} }
......
...@@ -97,6 +97,7 @@ public class ExperimentLevelController extends BaseController { ...@@ -97,6 +97,7 @@ public class ExperimentLevelController extends BaseController {
public AjaxResult pxperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo) public AjaxResult pxperimentPlanList(SchoolExperimentPlanVo schoolExperimentPlanVo)
{ {
schoolExperimentPlanVo.setSub(schoolLabClassYearService.getSub()); schoolExperimentPlanVo.setSub(schoolLabClassYearService.getSub());
schoolExperimentPlanVo.setIsAppointment("0");
return AjaxResult.success(schoolExperimentPlanService.selectNameByVo(schoolExperimentPlanVo)); return AjaxResult.success(schoolExperimentPlanService.selectNameByVo(schoolExperimentPlanVo));
} }
/** /**
...@@ -153,7 +154,8 @@ public class ExperimentLevelController extends BaseController { ...@@ -153,7 +154,8 @@ public class ExperimentLevelController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear) public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear)
{ {
return AjaxResult.success(schoolLabClassYearService.getLabClassYear(schoolLabClassYear)); schoolLabClassYear.setApplyId(schoolLabClassYear.getUserId());
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear));
} }
/** /**
......
package yangtz.cs.liu.wechat.controller.experiment; package yangtz.cs.liu.wechat.controller.experiment;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
...@@ -12,18 +14,25 @@ import com.ruoyi.system.service.ISysRoleService; ...@@ -12,18 +14,25 @@ import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationActivationRecord;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassMentorService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService; import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 实验室 老师申请 * 实验室 老师申请
...@@ -46,12 +55,17 @@ public class TeacherExperimentController extends BaseController { ...@@ -46,12 +55,17 @@ public class TeacherExperimentController extends BaseController {
//学校班级 //学校班级
@Autowired @Autowired
ISchoolClassService iSchoolClassService; ISchoolClassService iSchoolClassService;
@Autowired
UserInfoUtil userInfoUtil;
/** /**
* 个人申请记录 * 个人申请记录
*/ */
@Autowired @Autowired
ISchoolTeacherExperimentApplyService schoolTeacherExperimentApplyService; ISchoolTeacherExperimentApplyService schoolTeacherExperimentApplyService;
@Autowired
private ISchoolGradeService schoolGradeService;
@Autowired
private ISchoolClassMentorService schoolClassMentorService;
/** /**
* 年级计划申请列表 * 年级计划申请列表
*/ */
...@@ -59,6 +73,18 @@ public class TeacherExperimentController extends BaseController { ...@@ -59,6 +73,18 @@ public class TeacherExperimentController extends BaseController {
@GetMapping(value = "/classYear/list") @GetMapping(value = "/classYear/list")
public AjaxResult classYearlist(SchoolLabClassYearVo schoolLabClassYearVo) public AjaxResult classYearlist(SchoolLabClassYearVo schoolLabClassYearVo)
{ {
//查看当前老师学科的任务 并且是老师级部的任务
Long userId = userInfoUtil.getMpLoginUser().getUserId();
Long gradeId = schoolGradeService.getGradeId(userId);
//设置级部
schoolLabClassYearVo.setGradeId(gradeId);
//获取学科
Map<String, String> map = schoolClassMentorService.selectTeacherGroupMentot(userId);
String s = map.get("courseId");
List<String> list = Arrays.asList(s.split(","));
List<String> myList = list.stream().distinct().collect(Collectors.toList());
List<String> strings = schoolLabClassYearService.convertMentor(myList);
schoolLabClassYearVo.setSubs(strings);
List<SchoolLabClassYearVo> schoolLabClassYears = schoolLabClassYearService.selectSchoolLabClassYearList( List<SchoolLabClassYearVo> schoolLabClassYears = schoolLabClassYearService.selectSchoolLabClassYearList(
schoolLabClassYearVo); schoolLabClassYearVo);
return AjaxResult.success(schoolLabClassYears); return AjaxResult.success(schoolLabClassYears);
...@@ -94,8 +120,6 @@ public class TeacherExperimentController extends BaseController { ...@@ -94,8 +120,6 @@ public class TeacherExperimentController extends BaseController {
} }
@Autowired @Autowired
UserInfoUtil userInfoUtil;
@Autowired
ISysUserService userService; ISysUserService userService;
@Autowired @Autowired
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
FROM curricula_student cs FROM curricula_student cs
LEFT JOIN school_student xs ON cs.student_id = xs.id LEFT JOIN school_student xs ON cs.student_id = xs.id
LEFT JOIN school_class bj ON xs.class_id = bj.id LEFT JOIN school_class bj ON xs.class_id = bj.id
WHERE xs.id_card = #{idCard} AND xs.del_flag = '0' WHERE xs.school_no = #{schoolNo} AND xs.del_flag = '0'
</select> </select>
<select id="selectStudentScoreById" parameterType="Long" resultMap="SchoolStudentScoreVoResult"> <select id="selectStudentScoreById" parameterType="Long" resultMap="SchoolStudentScoreVoResult">
...@@ -256,4 +256,4 @@ ...@@ -256,4 +256,4 @@
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
</if> </if>
<if test="entity.deptId != null and entity.deptId != ''">and dept_id like concat('%', #{entity.deptId}, '%') <if test="entity.deptId != null and entity.deptId != ''">and dept_id like concat('%', #{entity.deptId}, '%')
</if> </if>
<if test="entity.applyId != null">and apply_id = #{entity.applyId}
</if>
<if test="submitState == 0"> <if test="submitState == 0">
and instance_id is null and instance_id is null
</if> </if>
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
where a.id = #{id} where a.id = #{id}
</select> </select>
<select id="selectTeacherGroupMentot" parameterType="Long" resultType="Map">
SELECT teacher_id as teacherId,GROUP_CONCAT(course_id) AS courseId FROM school_class_mentor where teacher_id = #{userId} GROUP BY teacher_id
</select>
<select id="selectSchoolClassById" parameterType="Long" resultType="SchoolClassMentorVo"> <select id="selectSchoolClassById" parameterType="Long" resultType="SchoolClassMentorVo">
select sgm.id, select sgm.id,
sgm.teacher_id, sgm.teacher_id,
......
...@@ -218,4 +218,22 @@ ...@@ -218,4 +218,22 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<!--批量新增调查问卷接收人(教师)-->
<insert id="batchInsertDcwjRyTeacher">
insert into school_dcwj_ry(dcwj_id, ry_zdzt, teacher_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.dcwjId}, #{item.ryZdzt}, #{item.teacherId})
</foreach>
</insert>
<!--批量新增调查问卷接收人(家长)-->
<insert id="batchInsertDcwjRyStudent">
insert into school_dcwj_ry(student_id, dcwj_id, ry_zdzt)
values
<foreach collection="list" item="item" separator=",">
( #{item.studentId}, #{item.dcwjId}, #{item.ryZdzt})
</foreach>
</insert>
</mapper> </mapper>
...@@ -70,8 +70,7 @@ ...@@ -70,8 +70,7 @@
insert into school_instrument insert into school_instrument
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">instrument_name,</if> <if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if> <if test="instrumentTypeId != null">instrument_type_id,instrument_type_name,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="instrumentModel != null">instrument_model,</if> <if test="instrumentModel != null">instrument_model,</if>
<if test="instrumentNum != null">instrument_num,</if> <if test="instrumentNum != null">instrument_num,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
...@@ -83,8 +82,7 @@ ...@@ -83,8 +82,7 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">#{instrumentName},</if> <if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if> <if test="instrumentTypeId != null">#{instrumentTypeId},(select instrument_type_name from school_instrument_classify where id = #{instrumentTypeId}),</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="instrumentModel != null">#{instrumentModel},</if> <if test="instrumentModel != null">#{instrumentModel},</if>
<if test="instrumentNum != null">#{instrumentNum},</if> <if test="instrumentNum != null">#{instrumentNum},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
...@@ -100,8 +98,7 @@ ...@@ -100,8 +98,7 @@
update school_instrument update school_instrument
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="instrumentName != null">instrument_name = #{instrumentName},</if> <if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if> <if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},instrument_type_name = (select instrument_type_name from school_instrument_classify where id = #{instrumentTypeId}),</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="instrumentModel != null">instrument_model = #{instrumentModel},</if> <if test="instrumentModel != null">instrument_model = #{instrumentModel},</if>
<if test="instrumentNum != null">instrument_num = #{instrumentNum},</if> <if test="instrumentNum != null">instrument_num = #{instrumentNum},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
...@@ -124,4 +121,4 @@ ...@@ -124,4 +121,4 @@
#{id} #{id}
</foreach> </foreach>
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -41,6 +41,38 @@ ...@@ -41,6 +41,38 @@
</sql> </sql>
<select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult"> <select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
select ep.id, ep.sub, ep.grade_id, ep.grade, ep.school_year, ep.semester, ep.experiment_classify, ep.experiment_name,
ep.chapter_content, ep.is_appointment, ep.planned_start_time, ep.planned_end_time, ep.experiment_use_goods, ep.create_by, ep.create_time,
ep.update_by, ep.update_time, ep.del_flag from school_experiment_plan ep
LEFT JOIN school_grade_mentor gm ON ep.grade_id = gm.grade_id AND ep.sub = gm.sub_group
<where>
ep.del_flag = '0' AND gm.del_flag = '0'
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and ep.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and ep.semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and ep.experiment_classify = #{experimentClassify}</if>
<if test="experimentName != null and experimentName != ''"> and ep.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and ep.chapter_content = #{chapterContent}</if>
<if test="isAppointment != null and isAppointment != ''"> and ep.is_appointment = #{isAppointment}</if>
<if test="plannedStartTime != null and plannedStartTime != ''"> and ep.planned_start_time = #{plannedStartTime}</if>
<if test="plannedEndTime != null and plannedEndTime != ''"> and ep.planned_end_time = #{plannedEndTime}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and ep.experiment_use_goods = #{experimentUseGoods}</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
<if test="teacherId != null">
AND gm.teacher_id = #{teacherId}
</if>
</where>
order by create_time DESC
</select>
<select id="selectExperimentPlanListAdmin" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
<include refid="selectSchoolExperimentPlanVo"/> <include refid="selectSchoolExperimentPlanVo"/>
<where> <where>
del_flag = '0' del_flag = '0'
...@@ -61,7 +93,7 @@ ...@@ -61,7 +93,7 @@
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")"> <foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId} #{gradeId}
</foreach> </foreach>
</if> </if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
...@@ -255,8 +287,10 @@ ...@@ -255,8 +287,10 @@
FROM FROM
school_experiment_plan ep school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0' LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0'
LEFT JOIN school_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
WHERE WHERE
ep.del_flag = '0' ep.del_flag = '0' AND gm.del_flag = '0'
<if test="teacherId != null">AND gm.teacher_id = #{teacherId}</if>
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if> <if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if> <if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if> <if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
...@@ -277,4 +311,35 @@ ...@@ -277,4 +311,35 @@
</if> </if>
GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub
</select> </select>
</mapper>
\ No newline at end of file <select id="countExperimentListAdmin" parameterType="SchoolExperimentPlanVo" resultType="Map">
SELECT
ep.id as id, ep.grade_id as gradeId, ep.grade as grade, ep.school_year as schoolYear, ep.semester as semester, ep.experiment_name as experimentName, ep.sub as sub,
COUNT(epc.id) as totalClass,
(SELECT COUNT(tla.id) FROM school_teacher_lab_apply tla WHERE tla.del_flag = '0' AND tla.state = '1' AND tla.lab_class_year_id in (SELECT id FROM school_lab_class_year lcy WHERE lcy.del_flag = '0' AND lcy.experiment_plan_id = ep.id)) as completeClass
FROM
school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id AND epc.del_flag = '0'
WHERE
ep.del_flag = '0'
<if test="sub != null and sub != ''"> and ep.sub = #{sub}</if>
<if test="gradeId != null "> and ep.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and ep.grade like concat('%', #{grade}, '%')</if>
<if test="experimentName != null and experimentName != ''"> and ep.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and ep.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and ep.semester = #{semester}</if>
<if test="subs != null ">
and ep.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub}
</foreach>
</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
GROUP BY ep.id,ep.grade_id,ep.grade,ep.school_year,ep.semester,ep.experiment_name,ep.sub
</select>
</mapper>
...@@ -45,6 +45,52 @@ ...@@ -45,6 +45,52 @@
</sql> </sql>
<select id="selectSchoolLabClassYearList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult"> <select id="selectSchoolLabClassYearList" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult">
select lcy.id, lcy.experiment_plan_id, lcy.experiment_name, lcy.grade_id, lcy.grade,
lcy.school_year, lcy.semester, lcy.sub, lcy.experiment_classify, lcy.planned_start_time,
lcy.planned_end_time, lcy.chapter_content, lcy.experiment_use_goods, lcy.declare_state, lcy.apply_id,
lcy.apply_name, lcy.apply_time, lcy.create_by, lcy.create_time, lcy.update_by, lcy.update_time, lcy.del_flag
from school_lab_class_year lcy
LEFT JOIN school_grade_mentor gm ON gm.grade_id = lcy.grade_id AND lcy.sub = gm.sub_group
<where>
lcy.del_flag = '0' AND gm.del_flag = '0'
<if test="experimentPlanId != null "> and lcy.experiment_plan_id = #{experimentPlanId}</if>
<if test="experimentName != null and experimentName != ''"> and lcy.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="grade != null and grade != ''"> and lcy.grade like concat('%', #{grade}, '%')</if>
<if test="gradeId != null "> and lcy.grade_id = #{gradeId}</if>
<if test="schoolYear != null and schoolYear != ''"> and lcy.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and lcy.semester = #{semester}</if>
<if test="sub != null and sub != ''"> and lcy.sub = #{sub}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and lcy.experiment_classify = #{experimentClassify}</if>
<if test="plannedStartTime != null and plannedEndTime != null">
and lcy.planned_start_time between #{plannedStartTime} and #{plannedEndTime}
and lcy.planned_end_time between #{plannedStartTime} and #{plannedEndTime}
</if>
<if test="chapterContent != null and chapterContent != ''"> and lcy.chapter_content = #{chapterContent}</if>
<if test="experimentUseGoods != null and experimentUseGoods != ''"> and lcy.experiment_use_goods = #{experimentUseGoods}</if>
<if test="declareState != null and declareState != ''"> and lcy.declare_state = #{declareState}</if>
<if test="applyId != null "> and lcy.apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and lcy.apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and lcy.apply_time = #{applyTime}</if>
<if test="userId != null">
AND gm.teacher_id = #{userId}
</if>
<if test="gradeIds != null ">
and lcy.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
<if test="declareStates != null">
and lcy.declare_state in
<foreach item="declareState" collection="declareStates" open="(" separator="," close=")">
#{declareState}
</foreach>
</if>
</where>
order by create_time DESC
</select>
<select id="selectLabClassYearListAdmin" parameterType="SchoolLabClassYearVo" resultMap="SchoolLabClassYearVoResult">
<include refid="selectSchoolLabClassYearVo"/> <include refid="selectSchoolLabClassYearVo"/>
<where> <where>
del_flag = '0' del_flag = '0'
...@@ -78,6 +124,12 @@ ...@@ -78,6 +124,12 @@
#{declareState} #{declareState}
</foreach> </foreach>
</if> </if>
<if test="subs != null">
and sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub}
</foreach>
</if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
...@@ -256,7 +308,7 @@ ...@@ -256,7 +308,7 @@
(SELECT DISTINCT experiment_plan_id FROM school_experiment_plan_class (SELECT DISTINCT experiment_plan_id FROM school_experiment_plan_class
WHERE del_flag = '0' and class_id in WHERE del_flag = '0' and class_id in
(SELECT class_id FROM school_class_mentor (SELECT class_id FROM school_class_mentor
WHERE del_flag = '0' and course_id in (6,8,9) and teacher_id = #{applyId})) WHERE del_flag = '0' and course_name in ("物理","化学","生物") and teacher_id = #{applyId}))
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if> <if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if> <if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if>
...@@ -266,7 +318,7 @@ ...@@ -266,7 +318,7 @@
#{sub} #{sub}
</foreach> </foreach>
</if> </if>
<if test="declareState != null and declareState != ''"> and declare_state = #{declareState}</if> <if test="declareState != null and declareState != ''"> and declare_state = #{declareState}</if>
</select> </select>
<select id="classSituation" parameterType="ClassSituationVo" resultType="ClassSituationVo"> <select id="classSituation" parameterType="ClassSituationVo" resultType="ClassSituationVo">
...@@ -289,4 +341,4 @@ ...@@ -289,4 +341,4 @@
<if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if> <if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if>
GROUP BY ep.id GROUP BY ep.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -282,8 +282,10 @@ ...@@ -282,8 +282,10 @@
school_experiment_plan ep school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id
LEFT JOIN school_class c ON epc.class_id = c.id LEFT JOIN school_class c ON epc.class_id = c.id
LEFT JOIN school_grade_mentor gm ON gm.grade_id = ep.grade_id AND gm.sub_group = ep.sub
WHERE WHERE
ep.del_flag = '0' and epc.del_flag = '0' ep.del_flag = '0' and epc.del_flag = '0' and gm.del_flag = '0'
<if test="teacherId != null">AND gm.teacher_id = #{teacherId}</if>
<if test="semester != null and semester != ''">and ep.semester = #{semester}</if> <if test="semester != null and semester != ''">and ep.semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if>
<if test="gradeId != null">and ep.grade_id = #{gradeId}</if> <if test="gradeId != null">and ep.grade_id = #{gradeId}</if>
...@@ -298,6 +300,36 @@ ...@@ -298,6 +300,36 @@
GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name
</select> </select>
<select id="gradeCountClassListAdmin" parameterType="SchoolTeacherLabApplyVo" resultType="Map">
SELECT
ep.grade_id as gradeId,
ep.grade as grade,
ep.school_year as schoolYear,
ep.semester as semester,
epc.class_id as classId,
c.class_name as className,
COUNT( epc.class_id ) as jhsys,
( SELECT COUNT( CASE WHEN state = 1 THEN state END ) FROM school_teacher_lab_apply WHERE del_flag = '0' AND class_id = epc.class_id and grade_id = ep.grade_id ) as ywcsys
FROM
school_experiment_plan ep
LEFT JOIN school_experiment_plan_class epc ON ep.id = epc.experiment_plan_id
LEFT JOIN school_class c ON epc.class_id = c.id
WHERE
ep.del_flag = '0' and epc.del_flag = '0'
<if test="semester != null and semester != ''">and ep.semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and ep.school_year = #{schoolYear}</if>
<if test="gradeId != null">and ep.grade_id = #{gradeId}</if>
<if test="classId != null and classId != ''"> and epc.class_id = #{classId}</if>
<if test="className != null and className != ''"> and c.class_name like concat('%', #{className}, '%')</if>
<if test="gradeIds != null">
and ep.grade_id in
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</if>
GROUP BY ep.grade_id, ep.grade, ep.school_year, ep.semester, epc.class_id, c.class_name
</select>
<select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult"> <select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult">
<include refid="selectSchoolTeacherLabApplyVo"/> <include refid="selectSchoolTeacherLabApplyVo"/>
WHERE del_flag = '0' WHERE del_flag = '0'
...@@ -328,4 +360,4 @@ ...@@ -328,4 +360,4 @@
</if> </if>
GROUP BY apply_name GROUP BY apply_name
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<if test="statu != null and statu != ''"> and statu = #{statu}</if> <if test="statu != null and statu != ''"> and statu = #{statu}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(appointment_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if> <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(appointment_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where> </where>
order by apply_time DESC
</select> </select>
<select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult"> <select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult">
...@@ -93,4 +94,4 @@ ...@@ -93,4 +94,4 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -63,11 +63,11 @@ ...@@ -63,11 +63,11 @@
where school_year = (select max(school_year) from school_grade ) where school_year = (select max(school_year) from school_grade )
</select> </select>
<select id="selectDdClassId" resultType="java.lang.Long"> <select id="selectDdClassId" resultType="java.lang.Long">
select sg.id from school_grade_copy sg select sg.id from school_grade sg
where sg.del_flag = '0' and sg.dd_class_id=#{ddClssId} where sg.del_flag = '0' and sg.dd_class_id=#{ddClssId}
</select> </select>
<select id="selectUpToYear" resultType="java.lang.String"> <select id="selectUpToYear" resultType="java.lang.String">
select max(school_year) nowYear from school_grade_copy where del_flag = '0' select max(school_year) nowYear from school_grade where del_flag = '0'
</select> </select>
</mapper> </mapper>
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
sgm.teacher_id, sgm.teacher_id,
sgm.grade_id, sgm.grade_id,
sgm.teacher_post, sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name, st.teacher_name,
st.pic_url, st.pic_url,
st.teacher_code, st.teacher_code,
...@@ -38,6 +40,8 @@ ...@@ -38,6 +40,8 @@
sgm.teacher_id, sgm.teacher_id,
sgm.grade_id, sgm.grade_id,
sgm.teacher_post, sgm.teacher_post,
sgm.type,
sgm.sub_group,
st.teacher_name st.teacher_name
from school_grade_mentor sgm from school_grade_mentor sgm
left join school_teacher st on sgm.teacher_id = st.id left join school_teacher st on sgm.teacher_id = st.id
......
...@@ -354,7 +354,6 @@ ...@@ -354,7 +354,6 @@
left join sys_user u on u.user_id = t.id left join sys_user u on u.user_id = t.id
left join sys_dept d on d.dept_id = u.dept_id left join sys_dept d on d.dept_id = u.dept_id
where t.del_flag = '0' and u.del_flag = '0' and d.del_flag = '0' where t.del_flag = '0' and u.del_flag = '0' and d.del_flag = '0'
<if test="employeeType != null and employeeType != ''">and u.employee_type = #{employeeType}</if>
<if test="teacherName != null and teacherName != ''">and u.user_name like concat('%', #{teacherName}, <if test="teacherName != null and teacherName != ''">and u.user_name like concat('%', #{teacherName},
'%')</if> '%')</if>
<if test="teacherTel != null and teacherTel != ''">and u.phonenumber like concat('%', #{teacherTel}, <if test="teacherTel != null and teacherTel != ''">and u.phonenumber like concat('%', #{teacherTel},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment