Commit 1ccd7110 by Cat
parents 5222be6c c1696fe7
......@@ -32,7 +32,7 @@ public class SysDept extends BaseEntity
private String deptName;
/** 显示顺序 */
private Integer orderNum;
private Long orderNum;
/** 负责人 */
private String leader;
......@@ -98,12 +98,12 @@ public class SysDept extends BaseEntity
}
@NotNull(message = "显示顺序不能为空")
public Integer getOrderNum()
public Long getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
public void setOrderNum(Long orderNum)
{
this.orderNum = orderNum;
}
......
......@@ -116,6 +116,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/dd/user/login").permitAll()
.antMatchers( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll()
//打印下载接口放行
.antMatchers("/school/student/queryOne/**","/school/studentStatus/proofStatus/**").permitAll()
//网页注册登录接口放行
.antMatchers( "/web/artStudent/register","/web/artStudent/login").permitAll()
// 静态资源,可匿名访问
......
......@@ -33,4 +33,7 @@ npm run build:prod
在index页面,打开created中 this.csToken()
#生产环境
在index页面,打开created中 this.getCode()
Navbar.vue中的退出登录注销。
<!-- <el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item> -->
......@@ -15,6 +15,8 @@ const whiteList = [
"/register",
"/index",
"/dd",
"/studentRegistra",
"/printBarcodes",
];
router.beforeEach((to, from, next) => {
......
......@@ -62,6 +62,31 @@ export const constantRoutes = [
hidden: true,
},
{
path: "/studentRegistra",
component: () =>
import(
"@/views/smartSchool/teachAffairAdministration/affairStudentManage/studentRegistra"
),
hidden: true,
},
//设备台账
{
path: "/printBarcodes",
component: () =>
import(
"@/views/smartSchool/schoolProperty/equipmenTledger/printBarcodes"
),
hidden: true,
},
{
path: "/studentRegistra",
component: () =>
import(
"@/views/smartSchool/teachAffairAdministration/affairStudentManage/studentRegistra"
),
hidden: true,
},
{
path: "/register",
component: () => import("@/views/register"),
hidden: true,
......
......@@ -130,7 +130,7 @@
<script>
import { listDefinition, delDefinition, suspendOrActiveDefinition, convert2Model } from "@/api/activiti/definition.js"
import { format } from "@/utils/activiti/myUtil.js"
import { format } from "@/utils/activiti/myUtil.js"
export default {
name: "Definition",
......
......@@ -6,7 +6,7 @@
</el-form-item>
<el-form-item label="仪器分类">
<treeselect v-model="queryForm.instrumentTypeId" :options="equiList" :normalizer="normalizer"
placeholder="选择分类编码" clearable style="width: 192px" />
placeholder="选择分类编码" clearable style="width: 192px" noOptionsText="暂无数据" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
......@@ -58,7 +58,7 @@
<el-col :span="20">
<el-form-item label="仪器分类" prop="instrumentTypeName">
<treeselect v-model="form.instrumentTypeName" :options="equiList" :normalizer="normalizer"
placeholder="选择" clearable style="width: 100%" />
placeholder="选择" clearable style="width: 100%" noOptionsText="暂无数据"/>
</el-form-item>
</el-col>
</el-row>
......
......@@ -202,21 +202,33 @@ export default {
resetQuery() {
this.queryForm = {
pageNum: 1,
pageSize: 10,
curriculaId: "",
studentName: "",
classId: "",
selectedCourse: "",
pageNum: 1,
pageSize: 10
};
this.resetForm("queryForm");
this.getList();
},
// 重置
reset() {
this.postForm = {
curriculaId: '',
this.form = {
curriculaId: "",
course: "",
courseName: "",
coursePeopleNumber: "",
classesNumber: "",
peopleNumber: "",
divisionClassesRule: "",
divisionClassesFrequency: '1',
}
this.resetForm('postForm');
this.resetForm('form');
},
// 取消按钮
cancel() {
this.open = false;
......@@ -232,45 +244,32 @@ export default {
},
// 分班按钮
submitForm() {
// 检查是否已经分班
const alreadyDivided = this.selectedCourse.every(course => course.divisionClassesRule !== "");
console.log('this.selectedCourse', this.selectedCourse);
if (alreadyDivided) {
this.$message.warning("已经分班,无法重复操作");
return;
}
this.$confirm('确定要分班吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// let that = this;
// for (let i = 0; i < this.selectedCourse.length; i++) {
// that.selectedCourse[i].divisionClassesRule = that.form.divisionClassesRule;
// const course = this.selectedCourse[i];
// console.log('course.divisionClassesRule:', course.divisionClassesRule);
// console.log('course.classesNumber:', course.classesNumber);
// console.log('course.peopleNumber:', course.peopleNumber);
// if (course.divisionClassesRule === '' || course.classesNumber === '' || course.peopleNumber === '') {
// this.$message.error("分班规则、班级数量和每班人数不能为空");
// return;
// }
// let totalPeopleNumber = course.classesNumber * course.peopleNumber;
// if (totalPeopleNumber > this.selectedCourse.length) {
// this.$message.error("班级数量和每班人数相乘不能超过总人数");
// return;
// }
// }
// console.log('this.selectedCourse', this.selectedCourse);
addDivisionec(this.selectedCourse).then((response) => {
console.log('this.selectedCourse', this.selectedCourse);
this.$modal.msgSuccess("分班成功");
const formData = this.selectedCourse.map((course) => {
console.log(course);
return {
curriculaId: this.queryForm.curriculaId,
course: course.course,
classesNumber: course.classesNumber,
peopleNumber: course.peopleNumber,
coursePeopleNumber: course.peopleNumber,
divisionClassesRule: this.form.divisionClassesRule,
divisionClassesFrequency: course.divisionClassesFrequency
};
});
addDivisionec(formData).then((response) => {
console.log(response);
this.$modal.msgSuccess('分班成功');
this.open = false;
this.getList();
}).catch(error => {
console.error(error);
});
})
})
......
......@@ -49,8 +49,8 @@
<el-col :span="24">
<el-form-item label="分班规则" prop="divisionClassesRule">
<el-radio-group v-model="form.divisionClassesRule">
<el-radio label='1'>平行分班</el-radio>
<el-radio label='2'>分层分班</el-radio>
<el-radio label="1">平行分班</el-radio>
<el-radio label="2">分层分班</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
......@@ -63,9 +63,9 @@
<el-input v-model="course.peopleNumber" placeholder="每班人数"></el-input>
</div>
</el-form-item>
</div>
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
......@@ -88,15 +88,15 @@ export default {
dicts: ['section_type'],
data() {
return {
divisionClassesRule: '',
selectedCourse: [],
classList: [],
// 查询表单
queryForm: {
divisionClassesRule: '',
curriculaId: '',
studentsName: '',
classId: '',
selectedCourse: '',
curriculaId: "",
studentName: "",
classId: "",
selectedCourse: "",
pageNum: 1,
pageSize: 10
},
......@@ -188,12 +188,12 @@ export default {
coursePeopleNumber: item.peopleNumber,
classesNumber: '',
peopleNumber: '',
divisionClassesRule: '',
divisionClassesRule: "",
divisionClassesFrequency: '1'
}
});
// console.log('this.selectedCourse', this.selectedCourse);
console.log('this.selectedCourse', this.selectedCourse);
}
})
},
......@@ -202,7 +202,14 @@ export default {
resetQuery() {
this.queryForm = {
pageNum: 1,
pageSize: 10,
curriculaId: "",
studentName: "",
classId: "",
selectedCourse: "",
pageNum: 1,
pageSize: 10
};
this.resetForm("queryForm");
this.getList();
......@@ -210,10 +217,17 @@ export default {
// 重置
reset() {
this.postForm = {
curriculaId: '',
this.form = {
curriculaId: "",
course: "",
courseName: "",
coursePeopleNumber: "",
classesNumber: "",
peopleNumber: "",
divisionClassesRule: "",
divisionClassesFrequency: '1',
}
this.resetForm('postForm');
this.resetForm('form');
},
// 取消按钮
......@@ -230,47 +244,33 @@ export default {
},
// 分班按钮
submitForm() {
// 检查是否已经分班
const alreadyDivided = this.selectedCourse.every(course => course.divisionClassesRule !== "");
console.log('this.selectedCourse', this.selectedCourse);
if (alreadyDivided) {
this.$message.warning("已经分班,无法重复操作");
return;
}
this.$confirm('确定要分班吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// let that = this;
// for (let i = 0; i < this.selectedCourse.length; i++) {
// that.selectedCourse[i].divisionClassesRule = that.form.divisionClassesRule;
// const course = this.selectedCourse[i];
// console.log('course.divisionClassesRule:', course.divisionClassesRule);
// console.log('course.classesNumber:', course.classesNumber);
// console.log('course.peopleNumber:', course.peopleNumber);
// if (course.divisionClassesRule === '' || course.classesNumber === '' || course.peopleNumber === '') {
// this.$message.error("分班规则、班级数量和每班人数不能为空");
// return;
// }
// let totalPeopleNumber = course.classesNumber * course.peopleNumber;
// console.log('totalPeopleNumber', totalPeopleNumber);
// if (totalPeopleNumber > this.coursePeopleNumber) {
// console.log('this.coursePeopleNumber', this.coursePeopleNumber);
// this.$message.error("班级数量和每班人数相乘不能超过总人数");
// return;
// }
// }
// console.log('this.selectedCourse', this.selectedCourse);
addDivision(this.selectedCourse).then((response) => {
console.log('this.selectedCourse', this.selectedCourse);
this.$modal.msgSuccess("分班成功");
const formData = this.selectedCourse.map((course) => {
return {
curriculaId: this.queryForm.curriculaId,
course: course.course,
classesNumber: course.classesNumber,
peopleNumber: course.peopleNumber,
coursePeopleNumber: course.peopleNumber,
divisionClassesRule: this.form.divisionClassesRule,
divisionClassesFrequency: course.divisionClassesFrequency
};
});
addDivision(formData).then((response) => {
console.log(response);
this.$modal.msgSuccess('分班成功');
this.open = false;
this.getList();
}).catch(error => {
console.error(error);
});
})
})
......@@ -285,6 +285,8 @@ export default {
}
}
</script>
......
......@@ -72,8 +72,8 @@
<el-col :span="16">
<el-form-item label="发布时间">
<el-date-picker v-model="dateRange" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss" :style="{ width: '100%' }">
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" :style="{ width: '100%' }">
</el-date-picker>
</el-form-item>
</el-col>
......
......@@ -86,8 +86,6 @@
<el-option v-for="item in tableList" :key="item.id" :value="item.experimentName"
:label="item.experimentName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -267,7 +265,6 @@ export default {
},
methods: {
//表单查询
getList() {
getLabplanlist(this.queryForm).then(response => {
......@@ -289,10 +286,8 @@ export default {
//选择实验名称自动带出信息
getName() {
const selectedExperiment = this.tableList.find(experiment => experiment.experimentName === this.form.experimentName);
if (selectedExperiment) {
this.selectedExperiment = selectedExperiment; // 确保将选中的实验赋值给 selectedExperiment
// 将实验的字段赋值给表单字段
this.form.experimentPlanId = selectedExperiment.chapterContent?.id || "";
this.form.chapterContent = selectedExperiment.chapterContent || "";
......@@ -368,7 +363,8 @@ export default {
this.nowType = type;
this.getSchholyear();
if (type != 0) {
const id = row.id
if (row && row.id) {
const id = row.id;
getLabplanxq(id).then(response => {
if (response.code == 200) {
console.log(response);
......@@ -376,9 +372,11 @@ export default {
if (response.data[key]) {
this.$set(this.form, key, response.data[key]);
}
})
});
}
})
});
}
}
this.dialogTableVisible = true;
},
......@@ -418,7 +416,7 @@ export default {
declareState: '0',
};
console.log(params);
addLabplan(params).then(response => {
this.$modal.msgSuccess('保存成功');
this.dialogTableVisible = false;
......
......@@ -8,7 +8,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="老师姓名" prop="teacherName">
<el-input readonly :value="infoForm.teacherName"/>
<el-input readonly :value="infoForm.teacherName" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -32,14 +32,14 @@
<el-col :span="12">
<el-form-item label="请假开始时间" prop="startTime">
<el-date-picker readonly style="width: 100%" v-model="infoForm.startTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择开始时间"></el-date-picker>
value-format="yyyy/MM/dd HH:mm:ss" placeholder="选择开始时间"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="请假结束时间" prop="endTime">
<el-date-picker readonly style="width: 100%" v-model="infoForm.endTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择结束时间"></el-date-picker>
value-format="yyyy/MM/dd HH:mm:ss" placeholder="选择结束时间"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -74,7 +74,7 @@
<el-col>
<el-form-item label="请假原因">
<el-input readonly :value="infoForm.reasonForLeave" type="textarea" placeholder=""
:autosize="{ minRows: 3 }"/>
:autosize="{ minRows: 3 }" />
</el-form-item>
</el-col>
</el-row>
......@@ -82,15 +82,13 @@
<el-col :span="12">
<el-form-item label="实际开始时间" prop="realityStartTime">
<el-date-picker style="width: 100%" v-model="infoForm.realityStartTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" placeholder=""
:picker-options="limitStartTime"></el-date-picker>
value-format="yyyy-MM-dd HH:mm:ss" placeholder="" :picker-options="limitStartTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实际结束时间" prop="realityEndTime">
<el-date-picker style="width: 100%" v-model="infoForm.realityEndTime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" placeholder=""
:picker-options="limitEndTime"></el-date-picker>
value-format="yyyy-MM-dd HH:mm:ss" placeholder="" :picker-options="limitEndTime"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -156,8 +154,8 @@ export default {
limitStartTime,
infoForm: {},
rules: {
realityStartTime: [{required: true, message: '实际开始时间不能为空', trigger: 'change'}],
realityEndTime: [{required: true, message: '实际结束时间不能为空', trigger: 'change'}]
realityStartTime: [{ required: true, message: '实际开始时间不能为空', trigger: 'change' }],
realityEndTime: [{ required: true, message: '实际结束时间不能为空', trigger: 'change' }]
}
}
},
......
......@@ -5,7 +5,6 @@
:modal="false"
fullscreen
:modal-append-to-body="false"
>
<!-- <template slot="title">-->
<!-- <div class="custom-dialog__header">-->
......@@ -15,7 +14,6 @@
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<div class="resolve-dialog-bady" >
<div class="left-menu">
<el-tabs tab-position="left" v-model="asyncComponent" @tab-click="selectMenu" style="height: 800px">
......@@ -40,8 +38,6 @@
</keep-alive>
</div>
</div>
</el-dialog>
</div>
</template>
......
......@@ -38,10 +38,15 @@
</el-table-column>
<el-table-column label="证书照片" align="center" prop="schoolAccessoryList">
<template slot-scope="scope">
<el-image style="width: 100px; height: 100px" :src="scope.row.pictureUrl"
:preview-src-list="scope.row.previewUrls"></el-image>
<el-carousel :interval="4000" height="100px">
<el-carousel-item v-for="(item, index) in scope.row.schoolAccessoryList" :key="index">
<el-image style="width: 100px; height: 100px" :src="item.accessoryUrl"
:preview-src-list="[item.accessoryUrl]"></el-image>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
<el-table-column label="备注1" align="center" prop="remark1" />
<el-table-column label="备注2" align="center" prop="remark2" />
<el-table-column label="备注3" align="center" prop="remark3" />
......@@ -115,11 +120,15 @@
<el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"
:http-request="uploadImage">
<img v-if="form.schoolAccessoryList && form.schoolAccessoryList.length > 0"
:src="form.schoolAccessoryList[0].accessoryUrl" class="avatar" />
<div v-if="form.schoolAccessoryList && form.schoolAccessoryList.length > 0">
<el-image v-for="(photo, index) in form.schoolAccessoryList" :key="index"
style="width: 100px; height: 100px; margin-right: 10px" :src="photo.accessoryUrl"
:preview-src-list="[photo.accessoryUrl]"></el-image>
</div>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="备注1">
......@@ -232,11 +241,13 @@ export default {
schoolAccessoryList: [
{ required: true, message: "证书照片不能为空", trigger: "change" }
],
competitionName: [
{ required: true, message: "比赛项目名称不能为空", trigger: "change" }
],
},
previewDialogVisible: false,
teacherList: [],
rules: {},
nowType: 0, // 0新增、1编辑、2查看
}
},
......@@ -301,27 +312,30 @@ export default {
// 上传图片
uploadImage(file) {
const fileData = file.file
const formData = new FormData()
formData.append('file', fileData)
this.uploadLoading = true
const fileData = file.file;
const formData = new FormData();
formData.append('file', fileData);
this.uploadLoading = true;
// Upload the file and add the uploaded file to the schoolAccessoryList
commonUpload(formData)
.then(response => {
this.uploadLoading = false
this.$modal.msgSuccess('上传成功')
this.imageUrl = process.env.VUE_APP_BASE_API + response.url
// 添加以下代码将文件信息添加到 uploadedFiles 数组中
this.uploadedFiles.push({
this.uploadLoading = false;
this.$modal.msgSuccess('上传成功');
// Add the uploaded file to the schoolAccessoryList
this.form.schoolAccessoryList.push({
accessoryUrl: process.env.VUE_APP_BASE_API + response.url,
accessoryName: fileData.name
})
});
})
.catch(error => {
this.uploadLoading = false
})
this.uploadLoading = false;
});
},
//重置
resetQuery() {
this.queryParams = {
......@@ -371,25 +385,26 @@ export default {
}
this.nowType = type;
if (type != 0) {
const id = row.id
const id = row.id;
getCompetitionxq(id).then(response => {
if (response.code == 200) {
Object.keys(this.form).forEach(key => {
if (response.data[key]) {
this.$set(this.form, key, response.data[key]);
}
});
// Populate the schoolAccessoryList with multiple images
if (response.data.schoolAccessoryList && response.data.schoolAccessoryList.length > 0) {
this.imageUrl = response.data.schoolAccessoryList[0].accessoryUrl; // 将图片地址赋值给 imageUrl
this.form.schoolAccessoryList = response.data.schoolAccessoryList;
}
})
}
})
});
}
this.dialogVisible = true;
},
//查询老师
getTeacher() {
getTeacher().then(response => {
......@@ -412,7 +427,6 @@ export default {
accessoryName: file.accessoryName
});
}
updateCompetition(this.form).then(({ code }) => {
if (code == 200) {
this.$modal.msgSuccess('修改成功')
......
<template>
<div class="app-container">
<el-form
:model="queryForm"
ref="queryForm"
size="small"
:inline="true"
label-width="80px"
>
<el-form :model="queryForm" ref="queryForm" size="small" :inline="true" label-width="80px">
<el-form-item prop="name" label="社团名称">
<el-input v-model="queryForm.name" placeholder="社团名称"></el-input>
</el-form-item>
<el-form-item prop="teachers" label="指导教师">
<el-input
v-model="queryForm.teachers"
placeholder="指导教师"
></el-input>
<el-input v-model="queryForm.teachers" placeholder="指导教师"></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd()"
>新增</el-button
>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd()">新增</el-button>
</el-col>
</el-row>
<!-- 列表 -->
<div class="listBlock">
<div class="itemBlock" v-for="(task, index) in tasks" :key="index">
<div
style="
<div style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
">
<div style="width: 50%">
<!-- 任务详细信息 -->
<div class="task-info">
......@@ -77,49 +52,17 @@
<!-- 按钮 -->
<div class="task-buttons">
<el-button
style="margin-left: 10px"
size="mini"
type="danger"
round
@click="handleDelete(task)"
>删除
<el-button style="margin-left: 10px" size="mini" type="danger" round @click="handleDelete(task)">删除
</el-button>
<el-button
type="success"
size="small"
round
@click="clubRegistrationReview(task.id, task.teachers)"
>社团报名审核</el-button
>
<el-button
type="info"
size="small"
round
@click="clubActivityRecord(task.id)"
>社团活动记录</el-button
>
<el-button
type="warning"
size="small"
round
@click="memberManagement(task.id)"
>成员管理
<el-button type="success" size="small" round
@click="clubRegistrationReview(task.id, task.teachers)">社团报名审核</el-button>
<el-button type="info" size="small" round @click="clubActivityRecord(task.id)">社团活动记录</el-button>
<el-button type="warning" size="small" round @click="memberManagement(task.id)">成员管理
</el-button>
<el-button
class="purpleBtn"
size="small"
round
type="primary"
@click="communityStyle(task.id, task.teachers)"
>社团风采
<el-button class="purpleBtn" size="small" round type="primary"
@click="communityStyle(task.id, task.teachers)">社团风采
</el-button>
<el-button
type="primary"
size="small"
round
@click="basicInformation(task.id, task.teachers)"
>基础信息管理
<el-button type="primary" size="small" round @click="basicInformation(task.id, task.teachers)">基础信息管理
</el-button>
</div>
</div>
......@@ -129,45 +72,22 @@
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div>
<el-form-item label="社团名称" prop="name">
<el-input
v-model="form.name"
placeholder="请输入社团名称"
></el-input>
<el-input v-model="form.name" placeholder="请输入社团名称"></el-input>
</el-form-item>
<el-form-item label="指导教师" prop="teachers">
<el-select
style="width: 100%"
multiple
v-model="form.teachers"
filterable
placeholder="请选择指导教师"
@change="changeTeacher"
>
<el-option
v-for="item in teacherInfo"
:key="item.teacherCode"
:label="item.teacherName"
:value="item.teacherCode"
>
<el-select style="width: 100%" multiple v-model="form.teachers" filterable placeholder="请选择指导教师"
@change="changeTeacher">
<el-option v-for="item in teacherInfo" :key="item.teacherCode" :label="item.teacherName"
:value="item.teacherCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="社团宗旨" prop="aim">
<el-input
type="textarea"
:rows="4"
v-model="form.aim"
placeholder="请输入社团宗旨"
></el-input>
<el-input type="textarea" :rows="4" v-model="form.aim" placeholder="请输入社团宗旨"></el-input>
</el-form-item>
<el-form-item label="社团简介" prop="intro">
<el-input
type="textarea"
:rows="4"
v-model="form.intro"
placeholder="请输入社团简介"
></el-input>
<el-input type="textarea" :rows="4" v-model="form.intro" placeholder="请输入社团简介"></el-input>
</el-form-item>
</div>
</el-form>
......@@ -368,7 +288,7 @@ export default {
this.$message.success("修改成功");
this.open = false;
})
.catch((err) => {});
.catch((err) => { });
} else {
// 新增
const params = {
......@@ -385,7 +305,7 @@ export default {
this.$message.success("新增成功");
this.open = false;
})
.catch((err) => {});
.catch((err) => { });
}
}
});
......@@ -403,7 +323,7 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
.catch(() => { });
},
// 重置表单
reset() {
......@@ -466,7 +386,7 @@ export default {
text-align: left;
}
.task-level > span {
.task-level>span {
margin-right: 25px;
}
......@@ -490,13 +410,13 @@ export default {
padding-left: 60%;
}
.task-count > .count {
.task-count>.count {
font-weight: bold;
color: #307def;
font-size: 45px;
}
.task-count > .sun {
.task-count>.sun {
color: rgba(16, 16, 16, 1);
font-size: 18px;
text-align: center;
......
<!--社团风采-->
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="标题" prop="theme">
<el-input
v-model="queryParams.theme"
placeholder="请输入标题"
clearable
/>
<el-input v-model="queryParams.theme" placeholder="请输入标题" clearable />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除
</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
ref="table"
:data="picList"
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" ref="table" :data="picList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="80" />
<el-table-column label="风采主题" align="center" prop="theme" />
......@@ -69,68 +34,32 @@
</el-table-column>
<el-table-column label="是否发布" align="center" prop="isfb">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isShow"
active-value="1"
inactive-value="0"
@change="handleIsShow(scope.row)"
></el-switch>
<el-switch v-model="scope.row.isShow" active-value="1" inactive-value="0"
@change="handleIsShow(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 未发布可以修改删除 -->
<div>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除
</el-button>
</div>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleCheck(scope.row)"
>查看
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改社团主题对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="90px"
style="width: 80%; margin: auto"
>
<el-form-item
prop="file"
style="
<el-form ref="form" :model="form" :rules="rules" label-width="90px" style="width: 80%; margin: auto">
<el-form-item prop="file" style="
display: flex;
text-align: center;
justify-content: center;
......@@ -159,12 +88,8 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="风采主题:" prop="theme">
<el-input
:readonly="check == true ? true : false"
v-model="form.theme"
placeholder="请输入风采主题"
style="width: 100%"
/>
<el-input :readonly="check == true ? true : false" v-model="form.theme" placeholder="请输入风采主题"
style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
......@@ -493,7 +418,7 @@ export default {
this.$message.success("修改成功");
this.open = false;
})
.catch((err) => {});
.catch((err) => { });
} else {
// 新增
const params = {
......@@ -508,7 +433,7 @@ export default {
this.$message.success("新增成功");
this.open = false;
})
.catch((err) => {});
.catch((err) => { });
}
}
});
......@@ -519,8 +444,7 @@ export default {
if (ids) {
this.$modal
.confirm(
`是否确认删除选中的${
Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
`是否确认删除选中的${Object.hasOwnProperty.call(ids, "length") ? ids.length : 1
}条数据?`
)
.then(() => {
......@@ -552,7 +476,7 @@ export default {
isCommunityFb(data)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
this.$message.success("修改成功");
})
.catch((error) => {
this.$modal.closeLoading();
......@@ -562,6 +486,7 @@ export default {
// 取消操作时的逻辑
});
},
},
};
</script>
......
......@@ -502,8 +502,11 @@ export default {
}
}
});
})
})();
},
// 反馈结果按钮
submitFormfk() {
this.$refs.formfk.validate((valid) => {
......
......@@ -188,7 +188,7 @@ export default {
/** 关闭 */
handleClose() {
this.$tab.closeOpenPage({
path: '/schoolManage/schoolInfoPush'
path: '/schoolManage/schoolNotice/school'
});
},
......
......@@ -6,7 +6,6 @@
<el-tab-pane label="停用" :name="State.STOP"></el-tab-pane>
</el-tabs>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="标题" prop="title">
<el-input size="small" v-model="queryParams.title" placeholder="请输入标题" clearable
......
......@@ -244,7 +244,7 @@ export default {
// 返回按钮
handleClose() {
const obj = { path: "/system/role" };
const obj = { path: "/schoolManage/schoolNotice/personnelGrouping" };
this.$tab.closeOpenPage(obj);
},
......
......@@ -316,6 +316,7 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import QRCode from "qrcodejs2"; // 生成二维码插件
import printJS from "print-js"; // 打印插件
import * as dd from 'dingtalk-jsapi';
export default {
......@@ -621,58 +622,55 @@ export default {
}, `设备台账_${Date.now()}.xlsx`)
},
//生成批量打印条码
//点击批量打印跳转
printBarcodes() {
this.printDialog = true
this.printList = this.chooseList
this.$nextTick(() => {
this.chooseList.map((item, index) => {
const dom = document.getElementById(`qrcode${index}`).lastElementChild
if (dom == null) {
new QRCode(`qrcode${index}`, {
width: 150,
height: 150,
text: item.encode,
});
// this.printDialog = true;
this.printList = this.chooseList;
console.log(11, this.printList);
const url = 'http://localhost:1024/printBarcodes';
console.log(url, 'url');
const ids = this.electItem.join(',');
console.log(ids, 'ids');
const encodes = this.chooseList.map(item => item.encode).join(',');
console.log(encodes, 'encodes');
const printListParam = encodeURIComponent(JSON.stringify(this.printList));
dd.biz.util.openLink({
url: `${url}?ids=${ids}&encodes=${encodes}&printList=${printListParam}`,
onSuccess: () => {
console.log('跳转成功,准备打印');
// 打印条码
// this.printCode();
},
onFail: (error) => {
console.error('跳转失败', error);
}
})
this.printList.map((item, index) => {
const domPrint = document.getElementById(`print${index}`).lastElementChild
if (domPrint == null) {
new QRCode(`print${index}`, {
width: 60,
height: 60,
text: item.encode,
});
}
})
})
},
//打印条码
printCode() {
printJS({
printable: 'printBlock', // 标签元素id
type: 'html',
targetStyles: ['*'],
font_size: '10px',
style: `
@media print{
@page{
size:auto;
margin:4mm 0mm 0mm 0mm
}
@page :first {
margin-top:2mm
}
#printBlock{
display:block!important
}
}`
})
},
// printCode() {
// printJS({
// printable: 'printBlock', // 标签元素id
// type: 'html',
// targetStyles: ['*'],
// font_size: '10px',
// style: `
// @media print{
// @page{
// size:auto;
// margin:4mm 0mm 0mm 0mm
// }
// @page :first {
// margin-top:2mm
// }
// #printBlock{
// display:block!important
// }
// }`
// })
// },
// 多选框选中数据
handleSelectionChange(selection) {
......
<template>
<div>
<!-- 打印二维码 弹框部分 -->
<el-dialog title="打印条码预览" :visible.sync="printDialog" width="30%">
<div class="qrCodeList">
<div v-for="(item, index) in chooseList" :key="index">
<div class="titlShow">东营市二中</div>
<div class="flexBlock qrCode">
<div class="qrCodeLeft">
<div :id="'qrcode' + index"></div>
<div>{{ item.encode }}</div>
</div>
<div class="qrCodeRight">
<div>{{ item.equipmentName }}{{ item.model }}</div>
<div>地点:{{ item.place }}</div>
</div>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="printCode">打 印</el-button>
</div>
</el-dialog>
<!-- 打印二维码 弹框部分 -->
<!-- 隐藏二维码页面样式 -->
<div id="printBlock">
<div v-for="(item, index) in printList" :key="index" class="printBody">
<div class="titlePrint">东营市二中</div>
<div class="flexBlock printQrCode">
<div class="printLeft">
<div :id="'print' + index" class="printImg"></div>
<div>{{ item.encode }}</div>
</div>
<div class="printRight">
<div>{{ item.equipmentName }}{{ item.model }}</div>
<div>地点:{{ item.place }}</div>
</div>
</div>
<div style="page-break-after:always"></div>
</div>
</div>
<!-- 隐藏二维码页面样式 -->
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import QRCode from "qrcodejs2"; // 生成二维码插件
import printJS from "print-js"; // 打印插件
export default {
name: "index",
data() {
return {
loading: true, // 遮罩层
total: 0, // 总条数
deviceData: [], // 设备台账表格数据
title: "", // 弹出层标题
dialogVisible: false, // 添加或修改
queryParams: { // 查询参数
pageNum: 1,
pageSize: 10,
equipmentName: '',
classificationCode: undefined,
equipmentState: '',
affiliationType: '',
},
classificationOptions: [], // 分类编码树状结构
formModel: {},
nowOptionType: '', // 0 入库 1 编辑 2 查看
electItem: [], // 选中的数据
isDisabledBtn: true,
chooseList: [], //用户选择的table数据
printDialog: false, // 打印二维码预览
printList: [],
userList: [] //使用人列表
};
},
created() {
const ids = this.$route.query.ids;
const encodes = this.$route.query.encodes;
const printList = JSON.parse(decodeURIComponent(this.$route.query.printList));
this.printBarcodes(ids, encodes, printList);
},
methods: {
//生成批量打印条码
printBarcodes(ids, encodes, printList) {
this.printDialog = true;
console.log(ids, encodes);
this.printList = [...printList];
this.chooseList = [...this.printList];
console.log(this.chooseList, '122');
this.$nextTick(() => {
this.printList.map((item, index) => {
const domPrint = document.getElementById(`print${index}`).lastElementChild;
if (domPrint == null) {
new QRCode(`print${index}`, {
width: 60,
height: 60,
text: item.encode,
});
}
});
this.chooseList.map((item, index) => {
const dom = document.getElementById(`qrcode${index}`).lastElementChild;
if (dom == null) {
new QRCode(`qrcode${index}`, {
width: 150,
height: 150,
text: item.encode,
});
}
});
});
},
//打印条码
printCode() {
printJS({
printable: printBlock,
type: 'html',
targetStyles: ['*'],
font_size: '10px',
style: `
@media print{
@page{
size:auto;
margin:4mm 0mm 0mm 0mm
}
@page :first{
margin-top:2mm
}
#printBlock{
display:block!important
}
}`
});
}
},
}
</script>
<style scoped>
::v-deep .el-form-item,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-form-item--small .el-form-item__content {
width: 75%;
}
.qrCodeList {
max-height: 500px;
overflow-y: scroll;
}
.qrCode {
width: 300px;
font-size: 14px;
line-height: 30px;
align-items: flex-start;
margin: 0 auto 20px auto;
}
.qrCodeLeft {
text-align: center;
}
.qrCodeRight {
padding: 20px 0 20px 15px;
}
.titlShow {
font-weight: bold;
text-align: center;
padding-bottom: 10px;
font-size: 16px;
}
#printBlock {
display: none;
margin: 0px !important;
}
.printLeft {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.printBody {
width: 250px;
}
.printQrCode {
font-size: 6px;
line-height: 20px;
align-items: center;
padding: 8px;
}
.printRight {
width: 60%;
padding: 0 5px;
}
.titlePrint {
font-size: 8px;
font-weight: bold;
text-align: center;
}
.printImg {
display: block;
}
</style>
......@@ -100,8 +100,8 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="借用期限(天)" prop="deadline">
<el-input v-model="lendReturnForm.deadline" placeholder="请输入借用期限"
:disabled="nowType == 2 ? true : false"></el-input>
<el-input v-model="lendReturnForm.deadline" placeholder="请输入借用期限" :disabled="nowType == 2 ? true : false"
type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
......
......@@ -619,7 +619,8 @@ import { uploadImage as commonUpload } from '@/api/common'
import { ExportType, Gender, Nations, Area } from '@/enums/common'
import { getYearList } from '@/utils/utilLibrary/getYearList'
import { getNewYear } from "@/api/smartSchool/teachAffairAdministration/affairClassView";
import * as dd from 'dingtalk-jsapi';
import { im_1_0 } from '@alicloud/dingtalk'
export default {
name: 'AffairStudentManage',
components: { ClassSelect, PicAvatar },
......@@ -921,17 +922,40 @@ export default {
})
},
// 学籍证明
// studentProve(row) {
// this.$router.push({
// path: '/teachAffairAdministration/studentProve',
// query: {
// id: row.id,
// name: row.studentName,
// idCard: row.idCard,
// schoolNo: row.schoolNo
// }
// })
// },
studentProve(row) {
this.$router.push({
path: '/teachAffairAdministration/studentProve',
query: {
id: row.id,
name: row.studentName,
idCard: row.idCard,
schoolNo: row.schoolNo
console.log('准备跳转');
const baseUrl = window.location.protocol + '//' + window.location.host; // 获取当前页面的协议、主机作为前缀URL
console.log('im_1_0', baseUrl);
const url = `http://localhost:1024/studentRegistra?id=${row.id}&name=${row.studentName}&idCard=${row.idCard}&schoolNo=${row.schoolNo}`;
// const newURL = `${baseUrl}/studentRegistra?id=${encodeURIComponent(row.id)}&name=${encodeURIComponent(row.studentName)}&idCard=${encodeURIComponent(row.idCard)}&schoolNo=${encodeURIComponent(row.schoolNo)}`;
dd.biz.util.openLink({
// url: newURL,
url: url,
onSuccess: () => {
console.log(newURL, 'newURL');
console.log('跳转成功,准备打印');
},
onFail: (err) => {
console.log('跳转失败', err);
}
})
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs['form'].validate(valid => {
......
<template>
<div class="app-container">
<div style="width: 100%; display: flex; justify-content: center; flex-wrap: nowrap;">
<!-- <el-button type="primary" plain size="mini" @click="closeCurrentTab">关闭
</el-button> -->
<el-button type="primary" plain size="mini" @click="downloadProve">下载
</el-button>
<el-button type="primary" plain size="mini" @click="printTable">打印
</el-button>
</div>
<el-card :style="{ width: '850px', height: clientHeight, margin: '0 auto' }">
<div id="postFormContainer">
<br /><br />
<div style="display: block; font-weight: 600; font-size: 35px; text-align: center">学籍证明</div>
<br />
<span style="display: block; font-size: 25px; text-indent:50px; line-height: 40px">
{{ studentInfo.studentName }}同学,身份证号{{ studentInfo.idCard }} ,性别{{
studentInfo.sex
}}{{ studentInfo.birthday }}生,
省学籍辅号{{ studentInfo.schoolNo }},全国学籍号{{
studentInfo.nationalNumber
}},系东营市第二中学{{ studentInfo.enrollmentYear }}{{ studentInfo.classValue }}班学生,特此证明。
</span>
<br /><br /><br />
<div style="width: 100%; display:flex; justify-content: center; font-size:20px;">
<div>
<el-image style="width: 160px; height: 200px" :src="url"></el-image>
<br />
<div style="text-align: center">山东学籍管理</div>
</div>
</div>
<br /><br /><br />
<div style="position: relative; background: #1ab394">
<div style="position: absolute; right: 30px; font-size: 20px ">
<span>东营市第二中学</span>
<br /><br />
<span> {{ time }}</span>
</div>
</div>
</div>
</el-card>
</div>
</template>
<script>
import printJS from "print-js";
import { closeCurrentTab } from "@/utils/utilLibrary/routerBatch/routerBatch.js";
import { getStudent } from '@/api/smartSchool/teachAffairAdministration/affairStudentManage'
export default {
name: 'StudentProve',
data() {
return {
clientHeight: document.body.scrollHeight + 'px',
baseUrl: process.env.VUE_APP_BASE_API,
studentInfo: {},
url: '',
time: " ",
}
},
components: {},
methods: {
closeCurrentTab,
getImage() {
const studentId = this.$route.query.id;
getStudent(studentId).then((res) => {
this.studentInfo = res.data
if (res.data.sex == 0) {
this.studentInfo.sex = "男"
} else {
this.studentInfo.sex = "女"
}
if (res.data.birthday.charAt(5) == 0) {
if (res.data.birthday.charAt(8) == 0) {
this.studentInfo.birthday = res.data.birthday.slice(0, 4) + "年" + res.data.birthday.slice(6, 7) + "月" + res.data.birthday.slice(9, 10) + "日"
} else {
this.studentInfo.birthday = res.data.birthday.slice(0, 4) + "年" + res.data.birthday.slice(6, 7) + "月" + res.data.birthday.slice(8, 10) + "日"
}
} else {
if (res.data.birthday.charAt(8) == 0) {
this.studentInfo.birthday = res.data.birthday.slice(0, 4) + "年" + res.data.birthday.slice(5, 7) + "月" + res.data.birthday.slice(9, 10) + "日"
} else {
this.studentInfo.birthday = res.data.birthday.slice(0, 4) + "年" + res.data.birthday.slice(5, 7) + "月" + res.data.birthday.slice(8, 10) + "日"
}
}
this.url = this.baseUrl + this.studentInfo.avatar
console.log(this.url, 107)
});
},
// 打印
printTable() {
// 重置表单
printJS({
printable: 'postFormContainer',
targetStyles: ['*'],
type: "html",
})
},
/**
* 获取当前时间
*/
currentTime() {
var date = new Date();
var year = date.getFullYear(); //月份从0~11,所以加一
let month = date.getMonth();
console.log("month", month);
var dateArr = [
date.getMonth() + 1,
date.getDate(),
];
var strDate =
year + "年" + dateArr[0] + "月" + dateArr[1] + "日"
console.log("strDate", strDate);
return strDate
},
downloadProve() {
this.download(`/school/studentStatus/proofStatus/${this.$route.query.id}`, {}, `${this.studentInfo.studentName}.docx`)
},
},
created() {
this.getImage()
this.time = this.currentTime()
},
activated() {
this.getImage()
this.time = this.currentTime()
}
}
</script>
<style scoped></style>
......@@ -247,7 +247,7 @@ export default {
// 关闭页面
closePage() {
this.$tab.closeOpenPage({
path: '/teacherManage/teacherInforManage'
path: '/schoolManage/teacherManage/teacherInforManage'
})
},
},
......
<template>
<div class="app-container">
<span>老师信息</span>
<hr/>
<br/>
<hr />
<br />
<el-form :model="techerInfoForm" ref="reftecherInfoForm" size="small" :inline="true" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="教师名称" clearable prop="teacherName">
<el-input v-model="techerInfoForm.teacherName" disabled clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="techerInfoForm.teacherName" disabled clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -22,19 +22,19 @@
<el-row>
<el-col :span="12">
<el-form-item label="教师电话" clearable prop="teacherTel">
<el-input disabled v-model="techerInfoForm.teacherTel" clearable @keyup.enter.native="handleQuery"/>
<el-input disabled v-model="techerInfoForm.teacherTel" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工作编号" clearable prop="teacherCode">
<el-input disabled v-model="techerInfoForm.teacherCode" clearable @keyup.enter.native="handleQuery"/>
<el-input disabled v-model="techerInfoForm.teacherCode" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<span>履历信息</span>
<hr/>
<br/>
<hr />
<br />
<el-row>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="resumeAdd">增加</el-button>
<el-button type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="resumeEdit">修改</el-button>
......@@ -42,27 +42,26 @@
</el-button>
<el-button type="info" size="mini" plain icon="el-icon-close" @click="closePage">关闭</el-button>
</el-row>
<br/>
<el-table stripe v-loading="loading" style="width: 100%" :data="resumeList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="序号" type="index" align="center" width="55"/>
<el-table-column label="学校/工作单位" width="width" align="center" prop="learnSchool"/>
<br />
<el-table stripe v-loading="loading" style="width: 100%" :data="resumeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55" />
<el-table-column label="序号" type="index" align="center" width="55" />
<el-table-column label="学校/工作单位" width="width" align="center" prop="learnSchool" />
<el-table-column label="履历开始时间" :formatter="dateFormat" width="width" align="center"
prop="learnStart"></el-table-column>
<el-table-column label="履历结束时间" :formatter="dateFormat" width="width" align="center"
prop="learnEnd"></el-table-column>
<el-table-column label="备注" width="width" align="center" prop="remark"/>
<el-table-column label="备注" width="width" align="center" prop="remark" />
</el-table>
<ExPagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
@pagination="getList" />
<!-- 履历编辑修改,新增弹窗-->
<el-dialog :title="title" :visible.sync="openTeacherResume" width="800px">
<el-form :model="resumeForm" :rules="resumeRules" ref="refresumeForm" size="small"
style="width: 90%; margin: auto" label-width="110px">
<el-form :model="resumeForm" :rules="resumeRules" ref="refresumeForm" size="small" style="width: 90%; margin: auto"
label-width="110px">
<el-form-item label="学校/工作单位" prop="learnSchool">
<el-input v-model="resumeForm.learnSchool" clearable style="width: 100%"/>
<el-input v-model="resumeForm.learnSchool" clearable style="width: 100%" />
</el-form-item>
<el-form-item label="履历开始时间" prop="learnStart">
<el-date-picker v-model="resumeForm.learnStart" type="date" style="width: 100%"
......@@ -73,7 +72,7 @@
placeholder="履历结束时间"></el-date-picker>
</el-form-item>
<el-form-item label="备注" clearable prop="remark">
<el-input type="textarea" :rows="3" style="width: 100%" v-model="resumeForm.remark" clearable/>
<el-input type="textarea" :rows="3" style="width: 100%" v-model="resumeForm.remark" clearable />
</el-form-item>
<el-form-item>
<div style="width: 300px; margin: auto">
......@@ -87,8 +86,8 @@
</template>
<script>
import {getInform} from '@/api/smartSchool/teacherManage/teacherInformation'
import {listResume, getOneResume, addResume, editResume, deleteResume} from '@/api/smartSchool/teacherManage/resume'
import { getInform } from '@/api/smartSchool/teacherManage/teacherInformation'
import { listResume, getOneResume, addResume, editResume, deleteResume } from '@/api/smartSchool/teacherManage/resume'
// import message from "@/views/home/message/message";
export default {
......@@ -126,9 +125,9 @@ export default {
resumeForm: {},
// 履历校验规则
resumeRules: {
learnSchool: [{required: true, message: '学校/工作单位不能为空', trigger: 'blur'}],
learnStart: [{required: true, message: '履历开始时间不能为空', trigger: 'blur'}],
learnEnd: [{required: true, message: '履历结束时间不能为空', trigger: 'blur'}]
learnSchool: [{ required: true, message: '学校/工作单位不能为空', trigger: 'blur' }],
learnStart: [{ required: true, message: '履历开始时间不能为空', trigger: 'blur' }],
learnEnd: [{ required: true, message: '履历结束时间不能为空', trigger: 'blur' }]
}
}
},
......@@ -280,7 +279,7 @@ export default {
// 关闭页面
closePage() {
this.$tab.closeOpenPage({
path: '/teacherManage/teacherInforManage'
path: '/schoolManage/teacherManage/teacherInforManage'
})
}
},
......
......@@ -28,7 +28,7 @@
</el-form-item>
<el-form-item label="职工类型" prop="employeeType">
<el-select v-model="queryParams.employeeType" placeholder="请选择职工类型">
<el-select v-model="queryParams.employeeType" placeholder="请选择职工类型" clearable>
<el-option v-for="dict in dict.type.employee_type" :key="dict.value" :label="dict.label"
:value="dict.value">
</el-option>
......@@ -456,6 +456,7 @@ export default {
education: null,
status: null,
deptId: null,
employeeType: null,
},
// 表单参数
form: {},
......
......@@ -10,12 +10,12 @@
<!-- </el-col>-->
<el-col :span="8" :offset="2">
<el-form-item label="登录账号" prop="phonenumber">
<el-input v-model="form.phonenumber" disabled/>
<el-input v-model="form.phonenumber" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="form.userName" disabled/>
<el-input v-model="form.userName" disabled />
</el-form-item>
</el-col>
</el-row>
......@@ -23,24 +23,24 @@
<h4 class="form-header h4">角色信息</h4>
<el-table v-loading="loading" :row-key="getRowKey" @row-click="clickRow" ref="table"
@selection-change="handleSelectionChange" :data="roles.slice((pageNum-1)*pageSize,pageNum*pageSize)">
@selection-change="handleSelectionChange" :data="roles.slice((pageNum - 1) * pageSize, pageNum * pageSize)">
<el-table-column type="selection" :reserve-selection="true" width="85"></el-table-column>
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="角色编号" align="center" prop="roleId"/>
<el-table-column label="角色名称" align="center" prop="roleName"/>
<el-table-column label="权限字符" align="center" prop="roleKey"/>
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.createTime) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="角色编号" align="center" prop="roleId" />
<el-table-column label="角色名称" align="center" prop="roleName" />
<el-table-column label="权限字符" align="center" prop="roleKey" />
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.createTime) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize"/>
<pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
<el-form label-width="100px">
<el-form-item style="text-align: center;margin-left:-120px;margin-top:30px;">
......@@ -52,7 +52,7 @@
</template>
<script>
import {getAuthRole, updateAuthRole} from "@/api/system/user";
import { getAuthRole, updateAuthRole } from "@/api/system/user";
export default {
name: "AuthRole",
......@@ -109,14 +109,14 @@ export default {
submitForm() {
const userId = this.form.userId;
const roleIds = this.roleIds.join(",");
updateAuthRole({userId: userId, roleIds: roleIds}).then((response) => {
updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => {
this.$modal.msgSuccess("授权成功");
this.close();
});
},
/** 关闭按钮 */
close() {
const obj = {path: "/teacherManage/teacherInforManage"};
const obj = { path: "/schoolManage/teacherManage/teacherInforManage" };
this.$tab.closeOpenPage(obj);
},
},
......
<template>
<div>
<button @click="csToken">获取钉钉授权码</button>
<!-- <button @click="csToken">获取钉钉授权码</button> -->
</div>
</template>
......
......@@ -35,7 +35,7 @@ module.exports = {
host: "",
port: 1024,
hot: true,
open: true,
open: "chrome",
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
......@@ -44,10 +44,10 @@ module.exports = {
//target: ` http://43.143.63.140:8848`,
//target: ` http://43.143.63.140:8095`,
//部署时后端地址
target: `http://47.105.176.202:5131`,
//target: `http://47.105.176.202:8137`,
//学校内网
// target: `http://10.20.100.201:57321`,
// target: `http://47.105.176.202:5112`,
target: `http://47.105.176.202:5112`,
// target: `http://192.168.1.113:8848`,
changeOrigin: true,
......
......@@ -16,7 +16,9 @@ import com.ruoyi.common.annotation.Excel;
public class SchoolOrganizationSignin extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
@Excel(name = "id")
private Long id;
/** 姓名 */
@Excel(name = "姓名")
private String name;
......
......@@ -33,4 +33,6 @@ public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> {
List<SchoolGrade> selectNowSchoolGrade();
public Long selectDdClassId(String ddClssId);
String selectUpToYear();
}
......@@ -243,4 +243,9 @@ public class ISchoolGradeImpl extends ServiceImpl<SchoolGradeMapper, SchoolGrade
public Long selectDdClassId(String ddId) {
return schoolGradeMapper.selectDdClassId(ddId);
}
@Override
public String selectUpToYear() {
return schoolGradeMapper.selectUpToYear();
}
}
......@@ -26,5 +26,6 @@ public interface ISchoolGradeService extends IService<SchoolGrade> {
//获取最新学年
int isNewSchoolYear();
Long selectDdClassId(String ddId);
String selectUpToYear();
}
......@@ -6,8 +6,10 @@ import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiUserGetuserinfoRequest;
import com.dingtalk.api.request.OapiV2UserGetRequest;
import com.dingtalk.api.request.OapiV2UserGetuserinfoRequest;
import com.dingtalk.api.response.OapiUserGetuserinfoResponse;
import com.dingtalk.api.response.OapiV2UserGetResponse;
import com.dingtalk.api.response.OapiV2UserGetuserinfoResponse;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SchoolTeacher;
......@@ -55,40 +57,40 @@ public class DdLoginController {
@RequestMapping(value = "/login", method = RequestMethod.GET)
public AjaxResult login (@RequestParam("code") String code) {
AjaxResult ajaxResult = new AjaxResult();
// // 获取access_token,注意正式代码要有异常流处理
// String access_token= accessTokenUtils.getToken();
// // 获取用户信息
// DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/user/getuserinfo");
// OapiUserGetuserinfoRequest request = new OapiUserGetuserinfoRequest();
// request.setCode(code);
// request.setHttpMethod("GET");
// OapiUserGetuserinfoResponse response;
// try {
// response = client.execute(request, access_token);
// } catch (ApiException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// return null;
// }
// // 查询得到当前用户的userId
// // 获得到userId之后应用应该处理应用自身的登录会话管理(session),避免后续的业务交互(前端到应用服务端)每次都要重新获取用户身份,提升用户体验
// String userId = response.getUserid();
// if (StringUtils.isEmpty(userId)){
// throw new ServiceException("免登码已失效,请重新获取");
// }
// //获取用户详细信息
// Map<String, Object> userInfo = getUserInfo(userId, access_token);
// String phone = (String) userInfo.get("phone");
// String unionId = (String) userInfo.get("unionId");
SchoolTeacher schoolTeacher = schoolTeacherService.selectTeacherByPhone("15888888888");
// 获取access_token,注意正式代码要有异常流处理
String access_token= accessTokenUtils.getToken();
// 获取用户信息
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/user/getuserinfo");
OapiUserGetuserinfoRequest request = new OapiUserGetuserinfoRequest();
request.setCode(code);
request.setHttpMethod("GET");
OapiUserGetuserinfoResponse response;
try {
response = client.execute(request, access_token);
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
// 查询得到当前用户的userId
// 获得到userId之后应用应该处理应用自身的登录会话管理(session),避免后续的业务交互(前端到应用服务端)每次都要重新获取用户身份,提升用户体验
String userId = response.getUserid();
if (StringUtils.isEmpty(userId)){
throw new ServiceException("免登码已失效,请重新获取");
}
//获取用户详细信息
Map<String, Object> userInfo = getUserInfo(userId, access_token);
String phone = (String) userInfo.get("phone");
String unionId = (String) userInfo.get("unionId");
SchoolTeacher schoolTeacher = schoolTeacherService.selectTeacherByPhone(phone);
if (StringUtils.isNull(schoolTeacher)){
throw new ServiceException("未查询到该用户信息");
}
Long userId = schoolTeacher.getId();
SysUser sysUser = sysUserService.selectUserById(userId);
Long userId1 = schoolTeacher.getId();
SysUser sysUser = sysUserService.selectUserById(userId1);
//更新钉钉用户iid和unionId
// sysUser.setUnionId(unionId);
// schoolTeacherService.updateDdUserId(sysUser, userId);
sysUser.setUnionId(unionId);
schoolTeacherService.updateDdUserId(sysUser, userId);
String token = loginService.loginNew(sysUser);
ajaxResult.put(Constants.TOKEN, token);
return ajaxResult;
......
package yangtz.cs.liu.dingding.controller;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/dd/school/dept")
public class DdSchoolDeptController {
@GetMapping("/getDeptList")
public TableDataInfo getDeptList(){
return null;
}
}
......@@ -2,44 +2,35 @@ package yangtz.cs.liu.dingding.controller;
import cn.hutool.http.HttpUtil;
//import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.core.domain.entity.SchoolTeacherCopy;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysUserService;
import org.apache.regexp.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.controller.schoolClass.SchoolClassController;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassCopy;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassHeadmaster;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeCopy;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor;
import yangtz.cs.liu.campus.domain.student.SchoolStudent;
import yangtz.cs.liu.campus.domain.student.SchoolStudentClassRelation;
import yangtz.cs.liu.campus.domain.student.SchoolStudentClasses;
import yangtz.cs.liu.campus.domain.student.SchoolStudentParent;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassCopyService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassHeadmasterService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassMentorService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeCopyService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentClassRelationService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentClassesService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentParentService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentService;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherCopyService;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherService;
import yangtz.cs.liu.campus.vo.student.SchoolStudentVO;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
......@@ -48,7 +39,6 @@ import yangtz.cs.liu.dingding.vo.DingJiaXiaoVo;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 家校通讯录
......@@ -68,9 +58,6 @@ public class DingJiaXiaoController {
@Autowired
ISchoolGradeService schoolGradeService;
//年级临时表
@Autowired
ISchoolGradeCopyService iSchoolGradeCopyService;
//职工与年级关系 ----------------
@Autowired
......@@ -78,9 +65,6 @@ public class DingJiaXiaoController {
//学校班级
@Autowired
ISchoolClassService iSchoolClassService;
//班级表临时
@Autowired
ISchoolClassCopyService iSchoolClassCopyService;
//班主任和班级关系 ------------------
@Autowired
ISchoolClassHeadmasterService iSchoolClassHeadmasterService;
......@@ -102,15 +86,10 @@ public class DingJiaXiaoController {
//老师表
@Autowired
ISchoolTeacherService schoolTeacherService;
//老师表 临时表
@Autowired
ISchoolTeacherCopyService schoolTeacherCopyService;
//用户表 ----------------
@Autowired
ISysUserService sysUserService;
public List<String> userTypes = new ArrayList<String>(){
{
this.add("teacher");
......@@ -284,7 +263,7 @@ public class DingJiaXiaoController {
@GetMapping("/updateLabUser")
private String updateLabUser(){
//查找当前学年 所有的班级
String nowSchoolYear = iSchoolGradeCopyService.selectUpToYear();
String nowSchoolYear = schoolGradeService.selectUpToYear();
SchoolClass schoolClass = new SchoolClass();
schoolClass.setSchoolYear(Integer.valueOf(nowSchoolYear));
List<SchoolClass> schoolClassCopies = iSchoolClassService.selectSchoolClassList(schoolClass);
......@@ -356,7 +335,7 @@ public class DingJiaXiaoController {
schoolStudentClassRelation.setClassId(date.getId());
iSchoolStudentClassRelationService.save(schoolStudentClassRelation);
//学生与班级历史关系
SchoolClassCopy school= iSchoolClassCopyService.selectSchoolClassById(date.getId());
SchoolClass school= iSchoolClassService.selectSchoolClassById(date.getId());
SchoolStudentClasses schoolStudentClasses = new SchoolStudentClasses();
schoolStudentClasses.setStudentId(schoolStudent.getId());
schoolStudentClasses.setGrade(school.getGradeName());
......
package yangtz.cs.liu.dingding.controller.dingDept;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.dingding.service.impl.dingDept.DdDeptServcieImpl;
@RestController
@RequestMapping("/dd/school/dept")
public class DdDeptController extends BaseController {
@Autowired
private DdDeptServcieImpl ddDeptServcie;
/**
* 获取钉钉全部部门列表
*/
@GetMapping("/getDeptList")
public TableDataInfo getDeptList(){
return getDataTable(ddDeptServcie.getDeptList());
}
/**
* 下拉钉钉部门列表到系统
*/
@PostMapping("/addDdDept")
public AjaxResult addDdDept(){
return toAjax(ddDeptServcie.addDdDept());
}
/**
* 同步钉钉部门列表
*/
@GetMapping("/syncDdDept")
public AjaxResult syncDdDept(){
return AjaxResult.success(ddDeptServcie.syncDdDept());
}
}
......@@ -4,9 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.dingding.config.Constant;
import yangtz.cs.liu.dingding.utils.AccessTokenUtils;
import yangtz.cs.liu.dingding.service.impl.dingDept.DdDeptServcieImpl;
import yangtz.cs.liu.dingding.service.impl.dingUser.DdUserServiceImpl;
import yangtz.cs.liu.dingding.utils.DingCallbackCrypto;
import java.util.Map;
......@@ -20,6 +22,11 @@ public class DingEventController {
private static Logger log = LoggerFactory.getLogger(DingEventController.class);
@Autowired
private DdDeptServcieImpl ddDeptServcie;
@Autowired
private DdUserServiceImpl ddUserService;
@PostMapping("/callBack")
public Map<String, String> callBack(
@RequestParam(value = "msg_signature", required = false) String msg_signature,
......@@ -47,12 +54,26 @@ public class DingEventController {
// 测试回调url的正确性
log.info("测试回调url的正确性");
} else if ("user_add_org".equals(eventType)) {
// 处理通讯录用户增加事件
log.info("发生了:" + eventType + "事件");
// 处理通讯录用户增加
ddUserService.addUser(eventJson);
} else if ("user_modify_org".equals(eventType)) {
// 处理通讯录用户修改
ddUserService.updateUser(eventJson);
} else if ("user_leave_org".equals(eventType)) {
// 处理通讯录用户离职
ddUserService.leaveUser(eventJson);
} else if ("org_dept_create".equals(eventType)){
// 处理通讯录企业部门创建
ddDeptServcie.ddDeptCreate(eventJson);
} else if ("org_dept_modify".equals(eventType)){
// 处理通讯录企业部门修改
ddDeptServcie.ddDeptUpdate(eventJson);
} else if ("org_dept_remove".equals(eventType)){
// 处理通讯录企业部门删除
ddDeptServcie.ddDeptDelete(eventJson);
} else if ("bpms_instance_change".equals(eventType)){
// 处理审批实例事件
processInstance(eventJson);
log.info("发生了:" + eventType + "事件");
} else if ("bpms_task_change".equals(eventType)){
// 处理审批任务事件
eventJson.get("");
......@@ -70,16 +91,4 @@ public class DingEventController {
}
return null;
}
/**
* 处理审批实例事件
*/
public void processInstance(JSONObject eventJson){
//获取审批类型
String type = eventJson.getString("type");
//判断审批实例是否正常结束
if ("finish".equals(type)){
}
}
}
......@@ -4,10 +4,8 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.dingding.service.impl.dingUser.DdUserServiceImpl;
import yangtz.cs.liu.dingding.utils.DingUserUtils;
/**
......@@ -18,42 +16,38 @@ import yangtz.cs.liu.dingding.utils.DingUserUtils;
public class DingUserController extends BaseController {
@Autowired
private DingUserUtils dingUserUtils;
private DdUserServiceImpl ddUserService;
/**
* 获取部门用户基础信息
* 获取钉钉所有用户id
*/
@GetMapping("/getUserByDeptId")
public TableDataInfo getUserByDeptId(@RequestParam("deptId") Long deptId,
@RequestParam("cursor") Long cursor,
@RequestParam("size") Long size,
@RequestParam("orderField") String orderField,
@RequestParam("containAccessLimit") String containAccessLimit,
@RequestParam("language") String language)
{
return getDataTable(dingUserUtils.getUserByDeptId(deptId, cursor, size, orderField, containAccessLimit, language));
@GetMapping("/getDdUserListAll")
public TableDataInfo getDdUserListAll(){
return getDataTable(ddUserService.getDdUserListAll());
}
/**
* 获取部门用户完整信息
* 下拉钉钉用户到系统
*/
@GetMapping("/getUserInfoByDeptId")
public TableDataInfo getUserInfoByDeptId(@RequestParam("deptId") Long deptId,
@RequestParam("cursor") Long cursor,
@RequestParam("size") Long size,
@RequestParam("orderField") String orderField,
@RequestParam("containAccessLimit") String containAccessLimit,
@RequestParam("language") String language)
{
return getDataTable(dingUserUtils.getUserInfoByDeptId(deptId, cursor, size, orderField, containAccessLimit, language));
@PostMapping("/addDdUser")
public AjaxResult addDdUser(){
return toAjax(ddUserService.addDdUser());
}
/**
* 获取用户详情
* 用户表数据同步到教师表
* @return
*/
@GetMapping("/getUser")
public AjaxResult getUser(@RequestParam("userId") String userId){
return AjaxResult.success(dingUserUtils.getUser(userId));
@PostMapping("/addDdTeacher")
public AjaxResult addDdTeacher(){
return toAjax(ddUserService.addDdTeacher());
}
/**
* 同步钉钉用户列表
*/
@GetMapping("/syncDdUser")
public AjaxResult syncDdUser(){
return AjaxResult.success(ddUserService.syncDdUser());
}
}
package yangtz.cs.liu.dingding.domain.dingDept;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
public class SysDdDept extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private Long orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 钉钉部门id */
private Long ddDeptId;
/** 钉钉父部门id */
private Long ddParentId;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 子部门 */
private List<SysDdDept> children = new ArrayList<SysDdDept>();
public Long getDdDeptId() {
return ddDeptId;
}
public void setDdDeptId(Long ddDeptId) {
this.ddDeptId = ddDeptId;
}
public Long getDdParentId() {
return ddParentId;
}
public void setDdParentId(Long ddParentId) {
this.ddParentId = ddParentId;
}
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
@NotNull(message = "显示顺序不能为空")
public Long getOrderNum() {
return orderNum;
}
public void setOrderNum(Long orderNum) {
this.orderNum = orderNum;
}
public String getLeader()
{
return leader;
}
public void setLeader(String leader)
{
this.leader = leader;
}
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
public String getPhone()
{
return phone;
}
public void setPhone(String phone)
{
this.phone = phone;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public List<SysDdDept> getChildren() {
return children;
}
public void setChildren(List<SysDdDept> children) {
this.children = children;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("deptId", getDeptId())
.append("parentId", getParentId())
.append("ancestors", getAncestors())
.append("deptName", getDeptName())
.append("orderNum", getOrderNum())
.append("leader", getLeader())
.append("phone", getPhone())
.append("email", getEmail())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package yangtz.cs.liu.dingding.domain.dingGrade;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class SchoolGradeMentorCopy extends OurBaseEntity {
/** 老师主键 */
@NotNull(message = "级部教师不能为空")
private Long teacherId;
/** 年级级部主键 */
private Long gradeId;
/** 教师任职开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/** 教师任职结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/** 类型(1年级部,2学科组长) */
private String type;
/** 职务 */
private String teacherPost;
/** 学科组(1物理学科组,2化学学科组,3生物学科组) */
private String subGroup;
}
package yangtz.cs.liu.dingding.domain.dingUser;
import lombok.Data;
@Data
public class SysDdUserDept {
private Long userId;
private Long deptId;
}
package yangtz.cs.liu.dingding.domain.schoolTeacher;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
@Data
public class SysDdTeacher extends BaseEntity
{
private static final long serialVersionUID = 1L;
private Long id;
/**
* 照片路径
*/
@Excel(name = "照片", cellType = Excel.ColumnType.IMAGE, height = 55, type = Excel.Type.EXPORT)
private String picUrl;
/**
* 老师名称
*/
@Excel(name = "老师名称")
@NotBlank(message = "老师名字不能为空")
private String teacherName;
/**
* 性别
*/
@Excel(name = "性别", readConverterExp = "0=男,1=女")
@NotBlank(message = "性别不能为空")
private String sex;
/**
* 民族
*/
@Excel(name = "民族")
private String nation;
/**
* 工作编号
*/
@Excel(name = "工作编号")
private String teacherCode;
/*
* 系统表 用户id
* */
@TableField(exist = false)
private Long userId;
/**
* 生日
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生日", width = 25, dateFormat = "yyyy-MM-dd")
private Date birthday;
/**
* 学历
*/
@Excel(name = "学历", readConverterExp = "0=高中,1=专科,2=本科,3=研究生,4=硕士,5=博士",combo = {"高中","专科","本科","研究生","硕士","博士"})
private String education;
/**
* 老师电话
*/
@Excel(name = "老师电话")
@NotBlank(message = "老师电话不能为空")
private String teacherTel;
/**
* 身份证号
*/
@Excel(name = "身份证号", width = 30)
@NotBlank(message = "身份证号不能为空")
private String idCard;
/**
* 家庭住址
*/
@Excel(name = "家庭住址", width = 35)
private String homeAddress;
/*
* 微信openid
* */
private String openId;
/*
* 钉钉用户unionId
* */
private String unionId;
/*
* 钉钉用户id
* */
private String ddUserId;
//设备工号
private String deviceNum;
/**部门id**/
@TableField(exist = false)
private Long deptId;
/**部门名称**/
@TableField(exist = false)
private String deptName;
/** 密码 */
@TableField(exist = false)
private String password;
/** 帐号状态(0正常 1停用) */
//@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
@TableField(exist = false)
private String status;
/**签名路径*/
@TableField(exist = false)
private String sign;
/**头像**/
@TableField(exist = false)
private String avatar;
/*职工类型**/
@TableField(exist = false)
private String employeeType;
@TableField(exist = false)
private String email;
/** 父部门ID */
@TableField(exist = false)
private Long parentId;
/** 父部门名称 */
@TableField(exist = false)
private String parentName;
}
package yangtz.cs.liu.dingding.mapper.dingDept;
import yangtz.cs.liu.dingding.domain.dingDept.SysDdDept;
import java.util.List;
import java.util.Map;
public interface DdDeptMapper {
/**
* 查询系统部门列表
* @param sysDdDept
* @return
*/
List<SysDdDept> selectDdDeptList(SysDdDept sysDdDept);
/**
* 根据钉钉部门id查询系统部门信息
*/
SysDdDept selectDeptByDdDeptId(Long ddDeptId);
/**
* 根据部门id查询系统部门信息
*/
SysDdDept selectDeptByDeptId(Long deptId);
/**
* 查询级部信息
*/
List<Map<String,Object>> selectGradeList();
/**
* 新增钉钉部门
* @return
*/
int insertDdDept(SysDdDept sysDdDept);
/**
* 更新钉钉部门
* @param sysDdDept
* @return
*/
int updateDdDeptByDdDeptId(SysDdDept sysDdDept);
/**
* 删除部门
* @param deptId
* @return
*/
int deleteDdDeptById(Long deptId);
/**
* 根据钉钉部门id删除部门
* @param ddDeptId
* @return
*/
int deleteDdDeptByDdDeptId(Long ddDeptId);
}
package yangtz.cs.liu.dingding.mapper.dingUser;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.dingding.domain.dingGrade.SchoolGradeMentorCopy;
import yangtz.cs.liu.dingding.domain.dingUser.SysDdUser;
import yangtz.cs.liu.dingding.domain.dingUser.SysDdUserDept;
import java.util.List;
public interface DdUserMapper {
/**
* 批量新增钉钉用户
*/
int batchInsertDdUser(@Param("list") List<SysDdUser> list);
/**
* 新增用户
*/
int insertDdUser(SysDdUser sysDdUser);
/**
* 更新用户
*/
int updateDdUser(SysDdUser sysDdUser);
/**
* 查询全部用户
*/
List<SysDdUser> selectDdUserList(SysDdUser sysDdUser);
/**
* 新增用户部门关系
*/
int insertDdUserDept(SysDdUserDept sysDdUserDept);
/**
* 删除用户
*/
int deleteDdUser(Long userId);
/**
* 删除用户和部门关系
*/
int deleteDdUserDept(Long userId);
/**
* 删除教师
*/
int deleteDdTeacher(Long userId);
/**
* 根据用户id查询用户部门id列表
*/
List<Long> selectDeptIdByUserId(Long userId);
/**
* 根据钉钉用户id查询用户信息
* @param ddUserId
* @return
*/
SysDdUser selectDdUserByDdUserId(String ddUserId);
/**
* 新增级部成员
* @param schoolGradeMentorCopy
* @return
*/
int insertGradeMentor(SchoolGradeMentorCopy schoolGradeMentorCopy);
/**
* 删除级部成员
* @param userId
* @return
*/
int deleteGradeMentor(Long userId);
}
package yangtz.cs.liu.dingding.mapper.schoolTeacher;
import org.apache.ibatis.annotations.Param;
import yangtz.cs.liu.dingding.domain.schoolTeacher.SysDdTeacher;
import java.util.List;
public interface DdTeacherMapper {
/**
* 批量新增教师
*/
int batchInsertTeacher(@Param("list") List<SysDdTeacher> list);
/**
* 新增教师
*/
int addTeacherList(SysDdTeacher sysDdTeacher);
/**
* 更新教师信息
*/
int updateDdTeacher(SysDdTeacher sysDdTeacher);
}
package yangtz.cs.liu.dingding.service.dingDept;
import com.alibaba.fastjson.JSONObject;
import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
import java.util.List;
public interface IDdDeptService {
/**
* 获取钉钉全部部门列表
* @return
*/
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> getDeptList();
/**
* 下拉钉钉部门列表到系统
* @return
*/
int addDdDept();
/**
* 同步钉钉部门列表
* @return
*/
String syncDdDept();
/**
* 钉钉部门创建
*/
int ddDeptCreate(JSONObject eventJson);
/**
* 钉钉部门修改
*/
int ddDeptUpdate(JSONObject eventJson);
/**
* 钉钉部门删除
*/
int ddDeptDelete(JSONObject eventJson);
}
package yangtz.cs.liu.dingding.service.dingUser;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
public interface IDdUserService {
/**
* 获取钉钉全部用户id
*/
List<String> getDdUserListAll();
/**
* 下拉钉钉用户到系统
*/
int addDdUser();
/**
* 用户表数据同步到教师表
* @return
*/
int addDdTeacher();
/**
* 同步钉钉用户
*/
String syncDdUser();
/**
* 处理通讯录用户增加
*/
int addUser(JSONObject eventJson);
/**
* 处理通讯录用户修改
*/
int updateUser(JSONObject eventJson);
/**
* 处理通讯录用户离职
*/
int leaveUser(JSONObject eventJson);
}
......@@ -195,6 +195,14 @@ public class WxSchoolOrganizationController extends BaseController {
@PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationSignin schoolOrganizationSignin)
{
//判断cid和userid是否存在 如果存在则先删除 再添加
LambdaQueryWrapper<SchoolOrganizationSignin> wrapper = Wrappers.lambdaQuery();
wrapper.eq(SchoolOrganizationSignin::getCid,schoolOrganizationSignin.getCid());
wrapper.eq(SchoolOrganizationSignin::getUserId,schoolOrganizationSignin.getUserId());
SchoolOrganizationSignin one = schoolOrganizationSigninService.getOne(wrapper);
if (one!=null){
schoolOrganizationSigninService.removeById(one.getId());
}
schoolOrganizationSignin.setStatus("1"); //适配重新报名的情况
return toAjax(schoolOrganizationSigninService.save(schoolOrganizationSignin));
}
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.dingding.mapper.dingDept.DdDeptMapper">
<resultMap type="SysDdDept" id="SysDdDeptResult">
<id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="deptName" column="dept_name" />
<result property="orderNum" column="order_num" />
<result property="leader" column="leader" />
<result property="phone" column="phone" />
<result property="email" column="email" />
<result property="status" column="status" />
<result property="ddDeptId" column="dd_dept_id" />
<result property="ddParentId" column="dd_parent_id" />
<result property="delFlag" column="del_flag" />
<result property="parentName" column="parent_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDdDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.dd_dept_id, d.dd_parent_id, d.del_flag, d.create_by, d.create_time
from sys_dd_dept d
</sql>
<select id="selectDdDeptList" parameterType="SysDdDept" resultMap="SysDdDeptResult">
<include refid="selectDdDeptVo"/>
where d.del_flag = '0'
<if test="deptId != null and deptId != 0">
AND dept_id = #{deptId}
</if>
<if test="parentId != null and parentId != 0">
AND parent_id = #{parentId}
</if>
<if test="deptName != null and deptName != ''">
AND dept_name like concat('%', #{deptName}, '%')
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
order by d.parent_id, d.order_num
</select>
<select id="selectDeptByDdDeptId" parameterType="Long" resultMap="SysDdDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.dd_dept_id, d.dd_parent_id, d.del_flag, d.create_by, d.create_time
from sys_dd_dept d
where d.dd_dept_id = #{ddDeptId}
</select>
<select id="selectDeptByDeptId" parameterType="Long" resultMap="SysDdDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.dd_dept_id, d.dd_parent_id, d.del_flag, d.create_by, d.create_time
from sys_dd_dept d
where d.dept_id = #{deptId}
</select>
<select id="selectGradeList" resultType="Map">
select id as gradeId, grade_year as gradeYear from school_grade_copy where del_flag = "0" order by grade_value ASC
</select>
<insert id="insertDdDept" parameterType="SysDdDept" useGeneratedKeys="true" keyProperty="deptId">
insert into sys_dd_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null ">parent_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
<if test="ancestors != null and ancestors != ''">ancestors,</if>
<if test="orderNum != null">order_num,</if>
<if test="leader != null and leader != ''">leader,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if>
<if test="ddDeptId != null">dd_dept_id,</if>
<if test="ddParentId != null">dd_parent_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
<if test="parentId != null">#{parentId},</if>
<if test="deptName != null and deptName != ''">#{deptName},</if>
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="leader != null and leader != ''">#{leader},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if>
<if test="ddDeptId != null">#{ddDeptId},</if>
<if test="ddParentId != null">#{ddParentId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<update id="updateDdDept" parameterType="SysDdDept">
update sys_dd_dept
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="leader != null">leader = #{leader},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="ddDeptId != null ">dd_dept_id = #{ddDeptId},</if>
<if test="ddParentId != null">dd_parent_id = #{ddParentId},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}
</update>
<update id="updateDdDeptByDdDeptId" parameterType="SysDdDept">
update sys_dd_dept
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="leader != null">leader = #{leader},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="ddParentId != null">dd_parent_id = #{ddParentId},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where dd_dept_id = #{ddDeptId}
</update>
<delete id="deleteDdDeptById" parameterType="Long">
update sys_dd_dept set del_flag = '2' where dept_id = #{deptId} and dept_id != 100
</delete>
<delete id="deleteDdDeptByDdDeptId" parameterType="Long">
update sys_dd_dept set del_flag = '2' where dd_dept_id = #{ddDeptId}
</delete>
</mapper>
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="yangtz.cs.liu.dingding.mapper.schoolTeacher.DdTeacherMapper">
<resultMap type="SysDdTeacher" id="SysDdTeacherResult">
<result property="id" column="id"/>
<result property="teacherName" column="teacher_name"/>
<result property="teacherTel" column="teacher_tel"/>
<result property="teacherCode" column="teacher_code"/>
<result property="idCard" column="id_card"/>
<result property="deviceNum" column="device_num"/>
<result property="homeAddress" column="home_address"/>
<result property="nation" column="nation"/>
<result property="picUrl" column="pic_url"/>
<result property="birthday" column="birthday"/>
<result property="education" column="education"/>
<result property="sex" column="sex"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="openId" column="open_id"/>
<result property="ddUserId" column="dd_user_id"/>
<result property="unionId" column="union_id"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<insert id="addTeacherList" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id">
insert into sys_dd_teacher
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="teacherName != null">teacher_name,</if>
<if test="teacherTel != null">teacher_tel,</if>
<if test="teacherCode != null">teacher_code,</if>
<if test="idCard != null">id_card,</if>
<if test="homeAddress != null">home_address,</if>
<if test="nation != null">nation,</if>
<if test="picUrl != null">pic_url,</if>
<if test="birthday != null">birthday,</if>
<if test="education != null">education,</if>
<if test="sex != null">sex,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="openId != null">open_id,</if>
<if test="ddUserId != null">dd_user_id,</if>
<if test="unionId != null">union_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="deviceNum != null">device_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="teacherName != null">#{teacherName},</if>
<if test="teacherTel != null">#{teacherTel},</if>
<if test="teacherCode != null">#{teacherCode},</if>
<if test="idCard != null">#{idCard},</if>
<if test="homeAddress != null">#{homeAddress},</if>
<if test="nation != null">#{nation},</if>
<if test="picUrl != null">#{picUrl},</if>
<if test="birthday != null">#{birthday},</if>
<if test="education != null">#{education},</if>
<if test="sex != null">#{sex},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="openId != null">#{openId},</if>
<if test="ddUserId != null">#{ddUserId},</if>
<if test="unionId != null">#{unionId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="deviceNum != null">#{deviceNum},</if>
</trim>
</insert>
<update id="updateDdTeacher" parameterType="SysDdTeacher">
update sys_dd_teacher
<trim prefix="SET" suffixOverrides=",">
<if test="teacherName != null">teacher_name = #{teacherName},</if>
<if test="teacherTel != null">teacher_tel = #{teacherTel},</if>
<if test="teacherCode != null">teacher_code = #{teacherCode},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="homeAddress != null">home_address = #{homeAddress},</if>
<if test="nation != null">nation = #{nation},</if>
<if test="picUrl != null">pic_url = #{picUrl},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="education != null">education = #{education},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="openId != null">open_id = #{openId}</if>
<if test="ddUserId != null">dd_user_id = #{ddUserId}</if>
<if test="unionId != null">union_id = #{unionId}</if>
</trim>
where id = #{id}
</update>
<!--批量新增教师-->
<insert id="batchInsertTeacher" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id">
<foreach collection="list" item="data" separator=";">
insert into sys_dd_teacher
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="data.id != null">id,</if>
<if test="data.teacherName != null">teacher_name,</if>
<if test="data.teacherTel != null">teacher_tel,</if>
<if test="data.teacherCode != null">teacher_code,</if>
<if test="data.idCard != null">id_card,</if>
<if test="data.homeAddress != null">home_address,</if>
<if test="data.nation != null">nation,</if>
<if test="data.picUrl != null">pic_url,</if>
<if test="data.birthday != null">birthday,</if>
<if test="data.education != null">education,</if>
<if test="data.sex != null">sex,</if>
<if test="data.createBy != null">create_by,</if>
<if test="data.createTime != null">create_time,</if>
<if test="data.updateBy != null">update_by,</if>
<if test="data.updateTime != null">update_time,</if>
<if test="data.openId != null">open_id,</if>
<if test="data.ddUserId != null">dd_user_id,</if>
<if test="data.unionId != null">union_id,</if>
<if test="data.delFlag != null and data.delFlag != ''">del_flag,</if>
<if test="data.deviceNum != null">device_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="data.id != null">#{data.id},</if>
<if test="data.teacherName != null">#{data.teacherName},</if>
<if test="data.teacherTel != null">#{data.teacherTel},</if>
<if test="data.teacherCode != null">#{data.teacherCode},</if>
<if test="data.idCard != null">#{data.idCard},</if>
<if test="data.homeAddress != null">#{data.homeAddress},</if>
<if test="data.nation != null">#{data.nation},</if>
<if test="data.picUrl != null">#{data.picUrl},</if>
<if test="data.birthday != null">#{data.birthday},</if>
<if test="data.education != null">#{data.education},</if>
<if test="data.sex != null">#{data.sex},</if>
<if test="data.createBy != null">#{data.createBy},</if>
<if test="data.createTime != null">#{data.createTime},</if>
<if test="data.updateBy != null">#{data.updateBy},</if>
<if test="data.updateTime != null">#{data.updateTime},</if>
<if test="data.openId != null">#{data.openId},</if>
<if test="data.ddUserId != null">#{data.ddUserId},</if>
<if test="data.unionId != null">#{data.unionId},</if>
<if test="data.delFlag != null and data.delFlag != ''">#{data.delFlag},</if>
<if test="data.deviceNum != null">#{data.deviceNum},</if>
</trim>
</foreach>
</insert>
</mapper>
......@@ -58,4 +58,8 @@
select sg.id from school_grade_copy sg
where sg.del_flag = '0' and sg.dd_class_id=#{ddClssId}
</select>
<select id="selectUpToYear" resultType="java.lang.String">
select max(school_year) nowYear from school_grade_copy where del_flag = '0'
</select>
</mapper>
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