Commit 46e7b51b by zhaopanyu

Merge branch 'master' of 49.232.152.146:qangqi/dd_school

parents 60af7f88 11f8add3
......@@ -113,14 +113,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/webSocket/**").anonymous()
.antMatchers("/login", "/register", "/captchaImage").anonymous()
.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( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll()
......
......@@ -93,9 +93,9 @@ export function getNoticeInfo(query) {
}
//老师查看列表
export function getTeacherTnfo(userId,query) {
export function getTeacherTnfo(query) {
return request({
url: `/teacherFiles/files/getTeachList/${userId}`,
url: `/teacherFiles/files/getTeachList`,
// url: `/teacherFiles/files/getTeachList/${userId}`,
method: 'get',
params:query
......@@ -117,6 +117,14 @@ export function getFileTnfo(id) {
method: "get",
});
}
// //查看档案详情
// export function getFileTnfo(query) {
// return request({
// url: "/teacherFiles/files",
// method: "get",
// params: query,
// });
// }
// 同步档案
export function syncNotice(id) {
return request({
......@@ -182,3 +190,11 @@ export function addTeachaer(ids) {
method: "get",
});
}
// 导出
export function exportList(id) {
return request({
url: '/teacherFiles/notice/export/' + id,
method: 'get',
})
}
......@@ -44,11 +44,11 @@
</el-col>
<el-col :span="1.5">
<span>已填写:</span>
<span style="font-size: 14px">{{ completedCount }}</span>
<span style="font-size: 14px">{{ this.yfb }}</span>
</el-col>
<el-col :span="1.5">
<span>已确认:</span>
<span style="font-size: 14px">{{ confirmedCount }}</span>
<span style="font-size: 14px">{{ this.yqr }}</span>
</el-col>
</el-row>
</el-form>
......@@ -358,31 +358,38 @@
</el-table-column>
<el-table-column
align="center"
prop="thesisList.thesisName"
prop="thesisName"
label="论文名称"
>
</el-table-column>
<el-table-column
align="center"
prop="thesisList.level"
label="级别"
>
<el-table-column align="center" prop="level" label="级别">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.grade"
label="等级"
>
<el-table-column align="center" prop="grade" label="等级">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.publishTime"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column align="center" label="附件">
<el-table-column align="center" label="附件" prop="thesisList">
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.thesisListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -397,21 +404,36 @@
<el-table :data="tableSecondData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column
align="center"
prop="materialList.name"
label="名称"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column
align="center"
prop="materialList.publishTime"
label="发表时间"
label="附件"
prop="materialList"
>
</el-table-column>
<el-table-column align="center" label="附件">
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.matListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -426,25 +448,40 @@
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingTime"
prop="trainingTime"
label="培训时间"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingName"
prop="trainingName"
label="培训名称"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.isQualified"
prop="isQualified"
label="是否合格"
>
</el-table-column>
<el-table-column align="center" label="附件">
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.trainingListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -459,31 +496,51 @@
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardName"
prop="awardName"
label="获奖名称"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardTime"
prop="awardTime"
label="获奖时间"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.gradeOfAward"
prop="gradeOfAward"
label="获奖等级"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.licenseIssuingAuthority"
prop="licenseIssuingAuthority"
label="发证机关"
>
</el-table-column>
<el-table-column align="center" label="附件">
<el-table-column
align="center"
label="附件"
prop="awardList
"
>
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.accListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -528,6 +585,8 @@ export default {
loading: true,
// 总条数
total: 0,
yfb: 0,
yqr: 0,
queryForm: {
pageSize: 10,
pageNum: 1,
......@@ -554,6 +613,15 @@ export default {
tableForthData: [],
// 多选
ids: [],
tableFirstDataInfo: [], //awardList
tableFirstDataInfoRes: [], //1
tableSecondDataInfo: [], //materialList
tableSecondDataInfoRes: [], //2
tableThirdDataInfo: [], //trainingList
tableThirdDataInfoRes: [], //3
tableForthDataInfo: [], //thesisList
tableForthDataInfoRes: [], //4
baseUrl: process.env.VUE_APP_BASE_API,
};
},
mounted() {
......@@ -593,6 +661,8 @@ export default {
getGradeTnfo(params).then((res) => {
this.tableData = res.rows;
this.total = res.total;
this.yfb = res.yfb;
this.yqr = res.yqr;
this.completedCount = res.rows.filter(
(item) => item.state === 3
).length;
......@@ -617,6 +687,7 @@ export default {
noticeName: "",
name: "",
};
this.form = {};
this.handleQuery();
},
//多选
......@@ -647,20 +718,112 @@ export default {
});
},
//查看按钮
handleCheck(row, column, event) {
handleCheck(row) {
this.check = true;
this.title = "基本信息查看";
this.dialogVisible = true;
this.dialogForm = { ...row }; //Vue深拷贝
const id = row.id;
getFileTnfo(id).then((res) => {
this.dialogForm = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
console.log(this.tableForthDataInfo, "this.tableForthDataInfo333333");
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
},
//修改按钮
handleEdit(row) {
this.resetQuery();
this.check = false;
this.title = "基本信息修改";
this.dialogVisible = true;
const id = row.id;
getFileTnfo(id).then((res) => {
this.dialogForm = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
console.log(this.tableForthDataInfo, "this.tableForthDataInfo333333");
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
// this.handleCheck();
// this.dialogForm = row;
this.dialogForm = JSON.parse(JSON.stringify(row));
// this.dialogForm = JSON.parse(JSON.stringify(row));
},
//提交按钮
......@@ -699,12 +862,12 @@ export default {
},
// 提取 `
handleExtract() {
const id = this.form.id;
console.log(id, "id");
const id = this.dialogForm.id;
syncNotice(id).then((res) => {
console.log(id, "id");
console.log("res提取", res);
this.$modal.msgSuccess("提取成功");
this.getList();
});
},
//弹窗确定按钮
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="78px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="78px"
>
<el-form-item label="教师" prop="applyName">
<el-input v-model="queryParams.applyName" placeholder="请输入教师" clearable />
<el-input
v-model="queryParams.applyName"
placeholder="请输入教师"
clearable
/>
</el-form-item>
<el-form-item label="实验时间" prop="time">
<el-date-picker v-model="queryParams.startTime" type="date" placeholder="选择" value-format="yyyy-MM-dd">
<el-date-picker
v-model="queryParams.startTime"
type="date"
placeholder="选择"
value-format="yyyy-MM-dd"
>
</el-date-picker>
<el-date-picker v-model="queryParams.endTime" type="date" placeholder="选择" value-format="yyyy-MM-dd">
<el-date-picker
v-model="queryParams.endTime"
type="date"
placeholder="选择"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item label="实验分类">
<el-select v-model="queryParams.experimentClassify" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.experiment_classify" :key="dict.value" :label="dict.label"
:value="dict.value" />
<el-select
v-model="queryParams.experimentClassify"
placeholder="请选择"
clearable
>
<el-option
v-for="dict in dict.type.experiment_classify"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="实验名称">
<el-input v-model="queryParams.experimentName" placeholder="请输入"></el-input>
<el-input
v-model="queryParams.experimentName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</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="getList"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table border v-loading="loading" :data="tableData" stripe>
<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 label="学科" align="center" prop="sub">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.lab_sub, row.sub) }}</div>
......@@ -36,38 +81,58 @@
<el-table-column label="班级" align="center" prop="className" />
<el-table-column label="实验时间" align="center" prop="experimentTime" />
<el-table-column label="实验名称" align="center" prop="experimentName" />
<el-table-column label="实验分类" align="center" prop="experimentClassify">
<el-table-column
label="实验分类"
align="center"
prop="experimentClassify"
>
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.experiment_classify, row.experimentClassify) }}</div>
<div>
{{
selectDictLabel(
dict.type.experiment_classify,
row.experimentClassify
)
}}
</div>
</template>
</el-table-column>
<el-table-column label="实验室" align="center" prop="labName" />
<el-table-column label="实验用品" align="center" prop="experimentUseGoods" />
<el-table-column
label="实验用品"
align="center"
prop="experimentUseGoods"
/>
<el-table-column label="章节内容" align="center" prop="chapterContent" />
<el-table-column label="教师" align="center" prop="applyName" />
<el-table-column label="附件" align="center" prop="schoolAccessoryList">
<template slot-scope="scope">
<div v-for="(accessory, index) in scope.row.accessoryList" :key="index">
<a :href="baseUrl + accessory.accessoryUrl" target="_blank">{{ accessory.accessoryName }}</a>
<div
v-for="(accessory, index) in scope.row.accessoryList"
:key="index"
>
<a :href="baseUrl + accessory.accessoryUrl" target="_blank">{{
accessory.accessoryName
}}</a>
</div>
</template>
</el-table-column>
</el-table>
<pagination ref="pageBlock" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination
ref="pageBlock"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
getList,
} from '@/api/smartSchool/laboratoryManagement/experimentalRecords'
import { getList } from "@/api/smartSchool/laboratoryManagement/experimentalRecords";
export default {
dicts: ['experiment_classify', 'lab_sub'],
dicts: ["experiment_classify", "lab_sub"],
data() {
return {
baseUrl: process.env.VUE_APP_BASE_API,
......@@ -82,7 +147,7 @@ export default {
loading: false,
total: 0,
tableData: [],
}
};
},
mounted() {
this.getList();
......@@ -90,34 +155,31 @@ export default {
methods: {
//获取列表数据
getList() {
getList(this.queryParams).then(response => {
getList(this.queryParams).then((response) => {
this.tableData = response.rows;
console.log(this.tableData);
this.tableData = response.rows.map(item => {
this.tableData = response.rows.map((item) => {
item.accessoryList = item.schoolAccessoryList; // 将附件信息赋值给accessoryList属性
return item;
});
this.total = response.total
this.loading = false
})
this.total = response.total;
this.loading = false;
});
},
//重置
resetQuery() {
this.queryParams = {
(this.queryParams = {
pageNum: 1,
pageSize: 10,
applyName: "",
startTime: "",
endTime: "",
experimentClassify: "",
},
}),
this.getList();
},
},
}
};
</script>
<style lang="scss" scoped>
......
......@@ -67,14 +67,19 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope">
<el-image
<el-carousel trigger="click" height="150px" :interval="4000">
<el-carousel-item
v-for="(item, index) in scope.row.file.split(',')"
:key="index.id"
style="width: 100px; height: 100px"
:src="item"
:key="index"
>
<el-image
:src="pev + item"
style="width: 150px; height: 130px"
:preview-src-list="[pev + item]"
>
</el-image>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
<el-table-column
......@@ -222,12 +227,11 @@
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<!-- <img v-if="form.file" :src="form.file" class="avatar" /> -->
<div v-if="form.file">
<div v-if="form.file.length > 0">
<img
v-for="(item, img) in form.file"
:key="img.id"
:src="item"
v-for="(item, index) in form.file"
:key="index"
:src="pev + item"
class="avatar"
/>
</div>
......@@ -265,9 +269,8 @@ export default {
data() {
return {
//图片上传列表
uploadList: {},
uploadList: [],
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制
TEXT_SIZE,
......@@ -324,8 +327,8 @@ export default {
fzr: "",
id: "",
orgName: this.$route.query.name,
file: "",
remark: "",
file: [],
},
// 表单校验
rules: {
......@@ -401,7 +404,7 @@ export default {
};
getClubInfo(params).then((response) => {
this.picList = response.rows;
this.picList.file = response.rows.file;
// this.picList.file = response.rows.file;
this.total = response.total;
this.loading = false;
});
......@@ -430,6 +433,7 @@ export default {
picUrl: null,
seqencing: null,
isShow: 0,
file: [],
};
this.imageUrl = "";
this.resetForm("form");
......@@ -455,6 +459,7 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.uploadList = [];
this.check = false;
this.reset();
this.open = true;
this.title = "新增社团活动记录";
......@@ -467,10 +472,6 @@ export default {
this.uploadList = [];
this.form.file = [];
this.form.orgName = this.$route.query.name;
console.log(
this.form.orgName,
"this.form.orgName = this.$route.query.name;"
);
listClubInfo(ids).then((response) => {
this.form = response.data;
this.form.file = response.data.file.split(",");
......@@ -495,17 +496,17 @@ export default {
},
// 上传成功回调
handleAvatarSuccess(res, file) {
console.log("response上传成功回调", res);
console.log("file上传成功回调", file);
if (res.code == 200) {
this.uploadList.push(this.pev + res.fileName);
this.uploadList.push(res.fileName);
this.form.file = this.uploadList;
console.log("this.form.file5555", this.form.file);
}
console.log(this.pev, "this.uploadList111111");
console.log(res.fileName, "res.fileName");
console.log(this.form.file, "this.form.file");
// this.imageUrl = res.data.url;
// console.log(file);
// this.commonUpload(file);
console.log(this.uploadList, "this.uploadList11111111");
console.log(this.form.file, "this.form.file2222222222");
console.log(this.pev, "this.pev33333333");
console.log(res.fileName, "res.fileName444444");
},
// 上传前格式和图片大小限制
beforeAvatarUpload(file) {
......@@ -527,25 +528,6 @@ export default {
handleRemove(file, fileList) {
this.imageUrl = "";
},
// 上传图片
// uploadImage(file) {
// const fileData = file.file;
// const formData = new FormData();
// formData.append("file", fileData);
// this.uploadLoading = true;
// commonUpload(formData)
// .then((response) => {
// this.uploadLoading = false;
// this.$modal.msgSuccess("上传成功");
// this.imageUrl = this.pev + response.url;
// // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
// this.form.file = this.pev + response.url;
// console.log(this.form.picUrl, "this.form.picUrl");
// })
// .catch((error) => {
// this.uploadLoading = false;
// });
// },
/** 提交按钮 */
submitForm() {
......@@ -556,7 +538,6 @@ export default {
const params = {
id: this.form.id,
theme: this.form.theme,
// file: this.form.file,
file: this.uploadList.toString(),
};
console.log(params, "params");
......@@ -576,7 +557,6 @@ export default {
endTime: this.form.endTime,
fzr: this.form.fzr,
orgName: this.form.orgName,
// file: this.form.file,
file: this.uploadList.toString(),
remark: this.form.remark,
......@@ -617,31 +597,6 @@ export default {
});
}
},
/** 是否发布 */
handleIsShow(row) {
console.log(row);
const data = {
id: row.id,
};
this.$modal
.confirm()
.then(() => {
this.$modal.loading("正在编辑状态,请稍等...");
isCommunityFb(data)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("编辑成功");
})
.catch((error) => {
this.$modal.closeLoading();
});
})
.catch(() => {
// 取消操作时的逻辑
});
},
},
};
</script>
......
......@@ -63,14 +63,19 @@
<el-table-column label="活动主题" align="center" prop="theme" />
<el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope">
<el-image
<el-carousel trigger="click" height="150px" :interval="4000">
<el-carousel-item
v-for="(item, index) in scope.row.file.split(',')"
:key="index"
style="width: 100px; height: 100px"
>
<el-image
:src="pev + item"
style="width: 150px; height: 130px"
:preview-src-list="[pev + item]"
>
</el-image>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
<el-table-column label="是否发布" align="center" prop="isfb">
......@@ -157,12 +162,9 @@
<img
v-for="(item, index) in form.file"
:key="index"
:src="pev + form.file"
:src="pev + item"
class="avatar"
/>
{{ form.file }}
<br />
{{ pev + form.file }}
</div>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
......@@ -215,19 +217,6 @@ export default {
// 输入框字数限制
TEXT_SIZE,
srcList: [],
//是否上传的院徽
isUploadPic: false,
//照片是否删除
options: [
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
//获取子组件传来的信息
pic: [],
// 图片路径
......@@ -275,31 +264,6 @@ export default {
},
],
seqencing: [{ required: true, message: "请输入排序", trigger: "blur" }],
remark: [
{
max: TEXT_SIZE,
message: "备注信息在0到200字之间",
trigger: "blur",
},
],
},
//设置table列隐藏与显示
columns: [
{ key: 0, label: `园区照片`, visible: true },
{ key: 1, label: `相片名称`, visible: true },
// {key: 2, label: `相片路径`, visible: true},
{ key: 2, label: `排序`, visible: true },
{ key: 3, label: `备注`, visible: true },
{ key: 4, label: `创建者`, visible: true },
{ key: 5, label: `创建时间`, visible: true },
{ key: 6, label: `操作`, visible: true },
],
// 作为临时图片展示
tempImage: "",
// 导出选项
exportOptions: {
title: "选择导出类别",
open: false,
},
//查看状态
check: false,
......@@ -309,20 +273,7 @@ export default {
created() {
this.getList();
},
watch: {
pic: {
handler(newValue, oldValue) {
console.log("watch----oldValue", oldValue);
console.log("watch----newValue", newValue);
this.isUploadPic = newValue[3];
},
},
},
methods: {
//是否删除 选中值发生变化时id处理函数
selectChangeHandler(value) {
this.form.isShow = value;
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -331,20 +282,12 @@ export default {
cid: this.$route.query.id,
theme: this.queryParams.theme,
};
// console.log(params);
getCommunityInfo(params).then((response) => {
console.log("response", response);
this.picList = response.rows;
// this.picList.file = response.rows.file.split(',');
this.total = response.total;
this.loading = false;
});
},
//获取图片信息
getSchoolInfoPic(val) {
this.pic = val;
},
// 取消按钮
cancel() {
this.open = false;
......@@ -405,8 +348,6 @@ export default {
this.form = response.data;
this.form.file = response.data.file.split(",");
this.imageUrl = this.pev + this.form.picUrl;
console.log(this.form.file, "this.form.file222222222");
// console.log(this.imageUrl, "this.imageUrl");
this.open = true;
this.title = "修改园区照片";
});
......@@ -427,21 +368,10 @@ export default {
},
// 上传成功回调
handleAvatarSuccess(res, file) {
console.log("response上传成功回调", res);
console.log("file上传成功回调", file);
if (res.code == 200) {
this.uploadList.push(res.fileName);
this.form.file = this.uploadList;
console.log("this.form.file", this.form.file);
}
console.log(this.uploadList, "this.uploadList");
console.log(this.form.file, "this.form.file");
console.log(this.pev, "this.pev");
console.log(res.fileName, "res.fileName");
// this.imageUrl = res.data.url;
// console.log(file);
// this.commonUpload(file);
},
// 上传前格式和图片大小限制
beforeAvatarUpload(file) {
......@@ -463,26 +393,6 @@ export default {
handleRemove(file, fileList) {
this.imageUrl = "";
},
// 上传图片
// uploadImage(file) {
// const fileData = file.file;
// const formData = new FormData();
// formData.append("file", fileData);
// this.uploadLoading = true;
// commonUpload(formData)
// .then((response) => {
// this.uploadLoading = false;
// this.$modal.msgSuccess("上传成功");
// this.imageUrl = this.pev + response.url;
// // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
// this.form.file = this.pev + response.url;
// this.form.picUrl = response.url;
// })
// .catch((error) => {
// this.uploadLoading = false;
// });
// },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
......@@ -494,7 +404,6 @@ export default {
theme: this.form.theme,
file: this.uploadList.toString(),
};
console.log(params, "修改params");
editCommunityInfo(params)
.then((response) => {
this.getList();
......@@ -509,7 +418,6 @@ export default {
theme: this.form.theme,
file: this.uploadList.toString(),
};
console.log(params, "新增params");
addCommunityInfo(params)
.then((response) => {
this.getList();
......@@ -549,28 +457,6 @@ export default {
/** 是否发布 */
handleIsShow(row) {
// console.log(row);
// const data = {
// id: row.id,
// };
// this.$modal
// .confirm("是否发布此信息?")
// .then(() => {
// this.$modal.loading("正在修改状态,请稍等...");
// isCommunityFb(data)
// .then((response) => {
// this.$modal.closeLoading();
// this.$message.success("修改成功");
// this.getList();
// })
// .catch((error) => {
// this.$modal.closeLoading();
// });
// })
// .catch(() => {
// // 取消操作时的逻辑
// });
const data = {
id: row.id,
};
......@@ -582,7 +468,7 @@ export default {
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
// this.getList();
this.getList();
})
.catch((error) => {
this.$modal.closeLoading();
......
......@@ -71,7 +71,7 @@
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column label="身份证号" align="center" prop="cardid" />
<!-- <el-table-column label="身份证号" align="center" prop="cardid" /> -->
<el-table-column label="年级" align="center" prop="grade" />
<el-table-column label="班级" align="center" prop="classes" />
<el-table-column label="社团部门" align="center" prop="orgName" />
......@@ -140,9 +140,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="身份证号:" prop="cardid">
<!-- <el-form-item label="身份证号:" prop="cardid">
<el-input v-model="form.cardid" placeholder="请输入身份证号" />
</el-form-item>
</el-form-item> -->
<el-form-item label="年级:" prop="grade">
<el-input v-model="form.grade" placeholder="请输入年级" />
</el-form-item>
......@@ -231,7 +231,7 @@ export default {
id: "",
name: "",
sex: "",
cardid: "",
// cardid: "",
grade: "",
classes: "",
orgName: "",
......@@ -269,7 +269,7 @@ export default {
console.log(item, "item");
this.$set(this.form, "name", item.studentName);
this.$set(this.form, "sex", item.sex);
this.$set(this.form, "cardid", item.idCard);
// this.$set(this.form, "cardid", item.idCard);
this.$set(this.form, "grade", item.gradeName);
this.$set(this.form, "classes", item.className);
this.$set(this.form, "phone", item.stuTelephone);
......@@ -344,10 +344,10 @@ export default {
if (this.form.id != null) {
// 修改
const paramsedit = {
id: this.form.ids,
id: this.form.id,
name: this.form.name,
sex: this.form.sex,
cardid: this.form.cardid,
// cardid: this.form.cardid,
grade: this.form.grade,
classes: this.form.classes,
orgPosition: this.form.orgPosition,
......@@ -371,7 +371,7 @@ export default {
orgName: this.form.orgName,
name: this.form.name,
sex: this.form.sex,
cardid: this.form.cardid,
// cardid: this.form.cardid,
grade: this.form.grade,
classes: this.form.classes,
orgPosition: this.form.orgPosition,
......
......@@ -360,32 +360,34 @@
</el-table-column>
<el-table-column
align="center"
prop="thesisList.thesisName"
prop="thesisName"
label="论文名称"
>
</el-table-column>
<el-table-column
align="center"
prop="thesisList.level"
label="级别"
>
<el-table-column align="center" prop="level" label="级别">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.grade"
label="等级"
>
<el-table-column align="center" prop="grade" label="等级">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.publishTime"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column align="center" label="附件">
<!-- <template slot-scope="scope">
<el-link type="success" href=""></el-link>
</template> -->
<el-table-column align="center" label="附件" prop="thesisList">
<template slot-scope="scope">
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.thesisListInfo"
:key="index"
>
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
</div>
......@@ -399,83 +401,153 @@
<el-table :data="tableSecondData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column
align="center"
prop="materialList.name"
label="名称"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column
align="center"
prop="materialList.publishTime"
label="发表时间"
label="附件"
prop="materialList"
>
<template slot-scope="scope">
<!-- <div
v-for="(accessory, index) in scope.row.matListInfo"
:key="index"
> -->
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<!-- <img
:src="baseUrl + accessory.accessoryUrl"
style="width: 100px"
/>
</div> -->
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.matListInfo"
:key="index"
>
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
<el-table-column align="center" label="附件"> </el-table-column>
</el-table>
</div>
<div class="tableThird">
<div class="tableTitle">
<i class="el-icon-data-analysis"></i>
<span style="margin-left: 5px">发表成就奖论文情况</span>
<span style="margin-left: 5px">培训情况</span>
</div>
<el-table :data="tableThirdData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingTime"
prop="trainingTime"
label="培训时间"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingName"
prop="trainingName"
label="培训名称"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.isQualified"
prop="isQualified"
label="是否合格"
>
</el-table-column>
<el-table-column align="center" label="附件"> </el-table-column>
<el-table-column align="center" label="附件">
<template slot-scope="scope">
<!-- <div
v-for="(accessory, index) in scope.row.trainingListInfo"
:key="index"
>
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 100px"
/>
</div> -->
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.trainingListInfo"
:key="index"
>
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
</div>
<div class="tableForth">
<div class="tableTitle">
<i class="el-icon-trophy"></i>
<span style="margin-left: 5px">发表成就奖论文情况</span>
<span style="margin-left: 5px">业务获奖情况</span>
</div>
<el-table :data="tableForthData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardName"
prop="awardName"
label="获奖名称"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardTime"
prop="awardTime"
label="获奖时间"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.gradeOfAward"
prop="gradeOfAward"
label="获奖等级"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.licenselssuingAuthority"
prop="licenselssuingAuthority"
label="发证机关"
>
</el-table-column>
<el-table-column align="center" label="附件"> </el-table-column>
<el-table-column
align="center"
label="附件"
prop="awardList
"
>
<template slot-scope="scope">
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.accListInfo"
:key="index"
>
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
</div>
</div>
......@@ -557,6 +629,15 @@ export default {
tableThirdData: [],
//弹窗表格4
tableForthData: [],
tableFirstDataInfo: [], //awardList
tableFirstDataInfoRes: [], //1
tableSecondDataInfo: [], //materialList
tableSecondDataInfoRes: [], //2
tableThirdDataInfo: [], //trainingList
tableThirdDataInfoRes: [], //3
tableForthDataInfo: [], //thesisList
tableForthDataInfoRes: [], //4
baseUrl: process.env.VUE_APP_BASE_API,
};
},
mounted() {
......@@ -566,17 +647,16 @@ export default {
/** 查询信息列表 */
getList() {
this.loading = true;
const userId = this.$store.state.user.userId;
// const userId = this.$store.state.user.userId;
// const params = {
// // userId: this.$store.state.user.userId,
// noticeName: this.queryForm.noticeName,
// };
const params = {
// userId: this.$store.state.user.userId,
userId: this.$store.state.user.userId,
noticeName: this.queryForm.noticeName,
};
// const params = {
// pageNum: this.queryForm.pageNum,
// pageSize: this.queryForm.pageSize,
// teacherId: this.$store.state.user.userId,
// };
getTeacherTnfo(userId, params).then((res) => {
getTeacherTnfo(params).then((res) => {
this.tableData = res.rows;
console.log(params, "params");
console.log(res, "res");
......@@ -617,6 +697,46 @@ export default {
getFileTnfo(id).then((res) => {
this.form = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
},
//填写按钮
......@@ -624,12 +744,52 @@ export default {
this.check = false;
this.title = "基本信息修改";
this.dialogVisible = true;
// this.form = row;
const id = row.fid;
console.log(id, 33333333333333);
getFileTnfo(id).then((res) => {
this.form = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
// /teacherFiles/files/30 查看档案详情列表
},
//提交按钮
handleSubmit(row) {
......
......@@ -347,32 +347,39 @@
</el-table-column>
<el-table-column
align="center"
prop="thesisList.thesisName"
prop="thesisName"
label="论文名称"
>
</el-table-column>
<el-table-column
align="center"
prop="thesisList.level"
label="级别"
>
<el-table-column align="center" prop="level" label="级别">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.grade"
label="等级"
>
<el-table-column align="center" prop="grade" label="等级">
</el-table-column>
<el-table-column
align="center"
prop="thesisList.publishTime"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column align="center" label="附件">
<!-- <template slot-scope="scope">
<el-link type="success" href=""></el-link>
</template> -->
<el-table-column align="center" label="附件" prop="thesisList">
<template slot-scope="scope">
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.thesisListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
</div>
......@@ -386,21 +393,36 @@
<el-table :data="tableSecondData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column
align="center"
prop="materialList.name"
label="名称"
prop="publishTime"
label="发表时间"
>
</el-table-column>
<el-table-column
align="center"
prop="materialList.publishTime"
label="发表时间"
label="附件"
prop="materialList"
>
</el-table-column>
<el-table-column align="center" label="附件">
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.matListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -408,32 +430,47 @@
<div class="tableThird">
<div class="tableTitle">
<i class="el-icon-data-analysis"></i>
<span style="margin-left: 5px">发表成就奖论文情况</span>
<span style="margin-left: 5px">培训情况</span>
</div>
<el-table :data="tableThirdData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingTime"
prop="trainingTime"
label="培训时间"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.trainingName"
prop="trainingName"
label="培训名称"
>
</el-table-column>
<el-table-column
align="center"
prop="trainingList.isQualified"
prop="isQualified"
label="是否合格"
>
</el-table-column>
<el-table-column align="center" label="附件">
<template slot-scope="scope">
<el-link type="success" href=""></el-link>
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.trainingListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -441,38 +478,58 @@
<div class="tableForth">
<div class="tableTitle">
<i class="el-icon-trophy"></i>
<span style="margin-left: 5px">发表成就奖论文情况</span>
<span style="margin-left: 5px">业务获奖情况</span>
</div>
<el-table :data="tableForthData" border>
<el-table-column align="center" fixed type="index" label="序号">
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardName"
prop="awardName"
label="获奖名称"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.awardTime"
prop="awardTime"
label="获奖时间"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.gradeOfAward"
prop="gradeOfAward"
label="获奖等级"
>
</el-table-column>
<el-table-column
align="center"
prop="awardList.licenselssuingAuthority"
prop="licenselssuingAuthority"
label="发证机关"
>
</el-table-column>
<el-table-column align="center" label="附件">
<el-table-column
align="center"
label="附件"
prop="awardList
"
>
<template slot-scope="scope">
<!-- <el-link type="success" href=""></el-link> -->
<el-carousel trigger="click" height="60px">
<el-carousel-item
v-for="(accessory, index) in scope.row.accListInfo"
:key="index"
>
<!-- <a
:href="baseUrl + accessory.accessoryUrl"
target="_blank"
>{{ accessory.accessoryName }}</a
> -->
<img
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
/>
</el-carousel-item>
</el-carousel>
</template>
</el-table-column>
</el-table>
......@@ -555,10 +612,20 @@ export default {
tableSecondData: [],
tableThirdData: [],
tableForthData: [],
tableFirstDataInfo: [], //awardList
tableFirstDataInfoRes: [], //1
tableSecondDataInfo: [], //materialList
tableSecondDataInfoRes: [], //2
tableThirdDataInfo: [], //trainingList
tableThirdDataInfoRes: [], //3
tableForthDataInfo: [], //thesisList
tableForthDataInfoRes: [], //4
baseUrl: process.env.VUE_APP_BASE_API,
};
},
mounted() {
this.getList();
console.log(this.$route.query.status, "this.$route.query.status");
},
methods: {
......@@ -601,6 +668,46 @@ export default {
getFileTnfo(id).then((res) => {
this.form = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
},
......@@ -611,32 +718,59 @@ export default {
console.log(id, "id");
console.log("res提取", res);
this.$modal.msgSuccess("提取成功");
// this.tableFirstData = res;
// this.tableSecondData = res;
// this.tableThirdData = res;
// this.tableForthData = res;
});
// const id = this.form.id;
// this.$modal
// .confirm("是否提取信息?")
// .then(function () {
// return syncNotice(id);
// })
// .then(() => {
// this.$modal.msgSuccess("提取成功");
// this.tableFirstData = res;
// this.tableSecondData = res;
// this.tableThirdData = res;
// this.tableForthData = res;
// })
// .catch(() => {});
},
//修改按钮
handleEdit(row) {
this.check = false;
this.title = "基本信息修改";
this.dialogVisible = true;
this.form = row;
// this.form = row;
const id = row.id;
getFileTnfo(id).then((res) => {
this.form = res.data;
this.title = "基本信息查看";
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
val.matListInfo = val.accessories;
return val;
});
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
});
},
//弹窗确定按钮
......
......@@ -282,6 +282,7 @@
<script>
import {
exportList, //导出
addTeacherNotice, //添加任务
listTeacherNotice, // 任务列表
infoTeaNotice, //任务详情
......@@ -302,6 +303,8 @@ import {
fileSubRejected, //教师档案提交驳回
} from "@/api/smartSchool/teacherFiles/teacherElectronicFile";
import { format } from "@/utils/activiti/myUtil.js";
import { getToken } from "@/utils/auth";
import axios from "axios";
export default {
name: "teacherElectronicRecord",
data() {
......@@ -487,6 +490,7 @@ export default {
// 数据维护按钮
dataMaintenance(row) {
console.log(row, "数据维护按钮row");
const noticeName = row.noticeName;
const noticeId = row.id;
const pageNum = this.queryForm.pageNum;
const pageSize = this.queryForm.pageSize;
......@@ -495,6 +499,7 @@ export default {
this.$router.push({
path: "/teachAffairAdministration/smartSchool/teachAffairAdministration/electronicRecord/dataMaintenance",
query: {
noticeName,
noticeId,
pageNum,
pageSize,
......@@ -509,6 +514,7 @@ export default {
// 数据查看
dataInspection(row) {
const noticeId = row.id;
const noticeName = row.noticeName;
const pageNum = this.queryForm.pageNum;
const pageSize = this.queryForm.pageSize;
const status = row.noticeState;
......@@ -517,6 +523,7 @@ export default {
this.$router.push({
path: "/teachAffairAdministration/smartSchool/teachAffairAdministration/electronicRecord/dataMaintenance",
query: {
noticeName,
noticeId,
pageNum,
pageSize,
......@@ -526,10 +533,33 @@ export default {
},
// 导出按钮
handleExport(row) {
// this.download(`/artExam/exportAddress/${this.examId}`, {
// ...this.queryParams
// }, `教师电子档案${Date.now()}.xlsx`)
const id = row.id;
const loading = this.$loading({ target: ".loading-area" });
axios
.get(process.env.VUE_APP_BASE_API + "/teacherFiles/notice/export", {
params: { id: id }, // 将ids放入params选项中进行传递
responseType: "blob",
headers: { Authorization: "Bearer " + getToken() },
})
.then((res) => {
// 打印接口数据
console.log(res);
// 请求结束关闭loading
loading.close();
// 创建a标签
const elink = document.createElement("a");
//构建Blob对象
const blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
// 模拟下载
const objectUrl = URL.createObjectURL(blob);
elink.setAttribute("href", objectUrl);
elink.setAttribute("download", "教师电子档案" + ".xls");
elink.click();
});
},
// 撤回按钮
handleRevocation(row) {
this.$modal
......
package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScAwardsService;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScAwardsVo;
/**
* 学校获奖Controller
*
* @author ruoyi
* @date 2023-11-06
*/
@RestController
@RequestMapping("/school/awards")
public class SchoolScAwardsController extends BaseController
{
@Autowired
private ISchoolScAwardsService schoolScAwardsService;
/**
* 查询学校获奖列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolScAwardsVo schoolScAwardsVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//用户角色集合
List<SysRole> roles = user.getRoles();
//管理员查询全部
if (user.isAdmin()) {
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
} else if (roles.size() > 0){
for (SysRole role : roles) {
if (role.getRoleKey().equals("award_admin")){
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
}
}
//用户查看个人列表
schoolScAwardsVo.setApplyId(user.getUserId());
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
/**
* 导出学校获奖列表
*/
@Log(title = "学校获奖", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolScAwardsVo schoolScAwardsVo)
{
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
ExcelUtil<SchoolScAwardsVo> util = new ExcelUtil<SchoolScAwardsVo>(SchoolScAwardsVo.class);
util.exportExcel(response, list, "学校获奖数据");
}
/**
* 获取学校获奖详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolScAwardsService.selectSchoolScAwardsById(id));
}
/**
* 新增学校获奖
*/
@Log(title = "学校获奖", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{
return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo));
}
/**
* 修改学校获奖
*/
@Log(title = "学校获奖", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{
return toAjax(schoolScAwardsService.updateSchoolScAwards(schoolScAwardsVo));
}
/**
* 删除学校获奖
*/
@Log(title = "学校获奖", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolScAwardsService.deleteSchoolScAwardsByIds(ids));
}
/**
* 提交
*/
@PutMapping("/submit")
public AjaxResult submit(@RequestBody SchoolScAwards schoolScAwards)
{
return toAjax(schoolScAwardsService.submit(schoolScAwards));
}
}
package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
/**
* 学生违纪Controller
*
* @author ruoyi
* @date 2023-11-06
*/
@RestController
@RequestMapping("/school/discipline")
public class SchoolScDisciplineController extends BaseController
{
@Autowired
private ISchoolScDisciplineService schoolScDisciplineService;
/**
* 查询学生违纪列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolScDiscipline schoolScDiscipline)
{
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
}
/**
* 导出学生违纪列表
*/
@Log(title = "学生违纪", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolScDiscipline schoolScDiscipline)
{
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
ExcelUtil<SchoolScDiscipline> util = new ExcelUtil<SchoolScDiscipline>(SchoolScDiscipline.class);
util.exportExcel(response, list, "学生违纪数据");
}
/**
* 获取学生违纪详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolScDisciplineService.selectSchoolScDisciplineById(id));
}
/**
* 新增学生违纪
*/
@Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
}
/**
* 修改学生违纪
*/
@Log(title = "学生违纪", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline));
}
/**
* 删除学生违纪
*/
@Log(title = "学生违纪", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolScDisciplineService.deleteSchoolScDisciplineByIds(ids));
}
/**
* 获取最新三个年级
*/
@GetMapping("/getGrade")
public AjaxResult getGrade(){
return AjaxResult.success(schoolScDisciplineService.getGrade());
}
/**
* 根据年级获取班级
*/
@GetMapping("/getClassList/{gradeId}")
public AjaxResult getClassList(@PathVariable("gradeId") Long gradeId){
return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId));
}
}
package yangtz.cs.liu.campus.controller.teacherFiles;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
......@@ -15,7 +16,9 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 教师档案Controller
......@@ -91,14 +94,15 @@ public class TeacherFilesController extends BaseController
/**
*
* @param userId
* @param
* @param
* @return
*/
@GetMapping("getTeachList/{userId}")
public TableDataInfo teachList(@PathVariable("userId") Long userId,TeacherFilesNotice teacherFilesNotice){
@GetMapping("/getTeachList")
public TableDataInfo teachList(TeacherFiles teacherFiles){
startPage();
List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(userId,teacherFilesNotice);
Map map = new HashMap();
List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(teacherFiles);
return getDataTable(teacherFilesNotices);
}
......
......@@ -11,8 +11,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNoticeTotal;
import yangtz.cs.liu.campus.service.impl.teacherFiles.TeacherFilesExcelUtil;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesNoticeService;
import javax.annotation.security.DenyAll;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -29,10 +32,13 @@ public class TeacherFilesNoticeController extends BaseController
@Autowired
private ITeacherFilesNoticeService teacherFilesNoticeService;
@Autowired
private TeacherFilesExcelUtil teacherFilesExcelUtil;
/**
* 查询教师档案通知列表
*/
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:list')")
// @PreAuthorize("@ss.hasPermi('teacherFiles:notice:list')")
@GetMapping("/list")
public TableDataInfo list(TeacherFilesNotice teacherFilesNotice)
{
......@@ -45,14 +51,11 @@ public class TeacherFilesNoticeController extends BaseController
/**
* 导出教师档案通知列表
*/
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:export')")
@Log(title = "教室档案通知", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@GetMapping("/export")
@PermitAll
public void export(HttpServletResponse response, TeacherFilesNotice teacherFilesNotice)
{
List<TeacherFilesNoticeTotal> list = teacherFilesNoticeService.selectTeacherFilesNoticeList(teacherFilesNotice);
ExcelUtil<TeacherFilesNoticeTotal> util = new ExcelUtil<TeacherFilesNoticeTotal>(TeacherFilesNoticeTotal.class);
util.exportExcel(response, list, "教室档案通知数据");
teacherFilesExcelUtil.getExcel(teacherFilesNotice.getId(),response);
}
/**
......
package yangtz.cs.liu.campus.domain.schoolRewardsPunishments;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 学校获奖对象 school_sc_awards
*
* @author ruoyi
* @date 2023-11-06
*/
@Data
public class SchoolScAwards extends OurBaseEntity
{
/** 比赛名称 */
@Excel(name = "比赛名称")
private String competitionName;
/** 主办单位 */
@Excel(name = "主办单位")
private String organizer;
/** 获奖名称 */
@Excel(name = "获奖名称")
private String awardsName;
/** 主管部门id */
@Excel(name = "主管部门id")
private Long competentDeptId;
/** 主管部门 */
@Excel(name = "主管部门")
private String competentDept;
/** 获奖级别(字典) */
@Excel(name = "获奖级别(字典)")
private String awardsLevel;
/** 部门主任id */
@Excel(name = "部门主任id")
private Long deptDirectorId;
/** 部门主任 */
@Excel(name = "部门主任")
private String deptDirector;
/** 获奖时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "获奖时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date awardsTime;
/** 获奖类型(字典) */
@Excel(name = "获奖类型(字典)")
private String awardsType;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
@Excel(name = "审核状态(0未提交,1审核中,2通过,3驳回)")
private String auditState;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
}
package yangtz.cs.liu.campus.domain.schoolRewardsPunishments;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 学生违纪对象 school_sc_discipline
*
* @author ruoyi
* @date 2023-11-06
*/
@Data
public class SchoolScDiscipline extends OurBaseEntity
{
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期 */
@Excel(name = "学期")
private String semester;
/** 届别 */
@Excel(name = "届别")
private String gradeYear;
/** 年级id */
@Excel(name = "年级id")
private Long gradeId;
/** 年级 */
@Excel(name = "年级")
private String gradeName;
/** 班级id */
@Excel(name = "班级id")
private Long classId;
/** 班级 */
@Excel(name = "班级")
private String className;
/** 班级类型 */
@Excel(name = "班级类型")
private String classType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 性别 */
@Excel(name = "性别")
private String sex;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 班主任 */
@Excel(name = "班主任")
private String classTeacher;
/** 级部主任 */
@Excel(name = "级部主任")
private String gradeDirector;
/** 违纪类别(字典) */
@Excel(name = "违纪类别", readConverterExp = "字=典")
private String violateType;
/** 违纪次数(字典) */
@Excel(name = "违纪次数", readConverterExp = "字=典")
private String violateNum;
/** 处分结果(字典) */
@Excel(name = "处分结果", readConverterExp = "字=典")
private String punishResult;
/** 处分时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "处分时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date punishTime;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
@Excel(name = "审核状态(0未提交,1审核中,2通过,3驳回)")
private String auditState;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
}
......@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacherFiles;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
......@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author ruoyi
* @date 2023-09-05
*/
@Data
public class TeacherFiles extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -104,238 +106,9 @@ public class TeacherFiles extends BaseEntity
private Long gradeTeacherId;
public Long getGradeTeacherId() {
return gradeTeacherId;
}
private String userId;
public void setGradeTeacherId(Long gradeTeacherId) {
this.gradeTeacherId = gradeTeacherId;
}
private String noticeName;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setNoticeId(String noticeId)
{
this.noticeId = noticeId;
}
public String getNoticeId()
{
return noticeId;
}
public void setFilesSemester(String filesSemester)
{
this.filesSemester = filesSemester;
}
public String getFilesSemester()
{
return filesSemester;
}
public void setTeacherId(Long teacherId)
{
this.teacherId = teacherId;
}
public Long getTeacherId()
{
return teacherId;
}
public void setTeacherName(String teacherName)
{
this.teacherName = teacherName;
}
public String getTeacherName()
{
return teacherName;
}
public void setGradeId(Long gradeId)
{
this.gradeId = gradeId;
}
public Long getGradeId()
{
return gradeId;
}
public void setGradeName(String gradeName)
{
this.gradeName = gradeName;
}
public String getGradeName()
{
return gradeName;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setAge(Integer age)
{
this.age = age;
}
public Integer getAge()
{
return age;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setEducation(String education)
{
this.education = education;
}
public String getEducation()
{
return education;
}
public void setAppearance(String appearance)
{
this.appearance = appearance;
}
public String getAppearance()
{
return appearance;
}
public void setCourseName(String courseName)
{
this.courseName = courseName;
}
public String getCourseName()
{
return courseName;
}
public void setClassName(String className)
{
this.className = className;
}
public String getClassName()
{
return className;
}
public void setBzrClassName(String bzrClassName)
{
this.bzrClassName = bzrClassName;
}
public String getBzrClassName()
{
return bzrClassName;
}
public void setFbzrClassName(String fbzrClassName)
{
this.fbzrClassName = fbzrClassName;
}
public String getFbzrClassName()
{
return fbzrClassName;
}
public void setIsTeachingGroupLeader(String isTeachingGroupLeader)
{
this.isTeachingGroupLeader = isTeachingGroupLeader;
}
public String getIsTeachingGroupLeader()
{
return isTeachingGroupLeader;
}
public void setIsResearchGroupLeader(String isResearchGroupLeader)
{
this.isResearchGroupLeader = isResearchGroupLeader;
}
public String getIsResearchGroupLeader()
{
return isResearchGroupLeader;
}
public void setClassHour(Integer classHour)
{
this.classHour = classHour;
}
public Integer getClassHour()
{
return classHour;
}
public void setClassTeacherDetails(String classTeacherDetails)
{
this.classTeacherDetails = classTeacherDetails;
}
public String getClassTeacherDetails()
{
return classTeacherDetails;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("noticeId", getNoticeId())
.append("filesSemester", getFilesSemester())
.append("teacherId", getTeacherId())
.append("teacherName", getTeacherName())
.append("gradeId", getGradeId())
.append("gradeName", getGradeName())
.append("idCard", getIdCard())
.append("sex", getSex())
.append("age", getAge())
.append("title", getTitle())
.append("education", getEducation())
.append("appearance", getAppearance())
.append("courseName", getCourseName())
.append("className", getClassName())
.append("bzrClassName", getBzrClassName())
.append("fbzrClassName", getFbzrClassName())
.append("isTeachingGroupLeader", getIsTeachingGroupLeader())
.append("isResearchGroupLeader", getIsResearchGroupLeader())
.append("classHour", getClassHour())
.append("classTeacherDetails", getClassTeacherDetails())
.append("state", getState())
.toString();
}
}
......@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
/**
* 教师档案获奖情况对象 teacher_files_award
......@@ -46,6 +48,16 @@ public class TeacherFilesAward extends BaseEntity
@Excel(name = "发证机关")
private String licenseIssuingAuthority;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id)
{
this.id = id;
......
......@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
/**
* 教师档案课题编写情况对象 teacher_files_material
......@@ -38,6 +40,16 @@ public class TeacherFilesMaterial extends BaseEntity
@Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id)
{
this.id = id;
......
......@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
/**
* 教师档案论文情况对象 teacher_files_thesis
......@@ -46,6 +48,16 @@ public class TeacherFilesThesis extends BaseEntity
@Excel(name = "发表时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime;
private List<SchoolAccessory> schoolAccessoryList ;
public List<SchoolAccessory> getSchoolAccessoryList() {
return schoolAccessoryList;
}
public void setSchoolAccessoryList(List<SchoolAccessory> schoolAccessoryList) {
this.schoolAccessoryList = schoolAccessoryList;
}
public void setId(Long id)
{
this.id = id;
......
......@@ -5,8 +5,10 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
/**
* 教师档案培训情况对象 teacher_files_training
......@@ -42,6 +44,16 @@ public class TeacherFilesTraining extends BaseEntity
@Excel(name = "是否合格", readConverterExp = "1=合格,0不合格")
private String isQualified;
private List<SchoolAccessory> accessories;
public List<SchoolAccessory> getAccessories() {
return accessories;
}
public void setAccessories(List<SchoolAccessory> accessories) {
this.accessories = accessories;
}
public void setId(Long id)
{
this.id = id;
......
package yangtz.cs.liu.campus.mapper.schoolRewardsPunishments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScAwardsVo;
import java.util.List;
/**
* 学校获奖Mapper接口
*
* @author ruoyi
* @date 2023-11-06
*/
public interface SchoolScAwardsMapper extends BaseMapper<SchoolScAwards>
{
/**
* 查询学校获奖
*
* @param id 学校获奖主键
* @return 学校获奖
*/
public SchoolScAwardsVo selectSchoolScAwardsById(Long id);
/**
* 查询学校获奖列表
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
public int insertSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo);
/**
* 修改学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
public int updateSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo);
/**
* 删除学校获奖
*
* @param id 学校获奖主键
* @return 结果
*/
public int deleteSchoolScAwardsById(Long id);
/**
* 批量删除学校获奖
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolScAwardsByIds(Long[] ids);
/**
* 批量新增附件信息
*
* @param schoolAccessoryList 附件信息列表
* @return 结果
*/
public int batchSchoolAccessory(List<SchoolAccessory> schoolAccessoryList);
/**
* 批量删除附件信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolAccessoryByBusinessIds(Long[] ids);
/**
* 通过学校获奖主键删除附件信息信息
*
* @param id 学校获奖ID
* @return 结果
*/
public int deleteSchoolAccessoryByBusinessId(Long id);
/**
* 获取所有学校获奖附件
* @return
*/
public List<SchoolAccessory> selectAccessoryList();
}
package yangtz.cs.liu.campus.mapper.schoolRewardsPunishments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import java.util.List;
import java.util.Map;
/**
* 学生违纪Mapper接口
*
* @author ruoyi
* @date 2023-11-06
*/
public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
{
/**
* 查询学生违纪
*
* @param id 学生违纪主键
* @return 学生违纪
*/
public SchoolScDiscipline selectSchoolScDisciplineById(Long id);
/**
* 查询学生违纪列表
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
/**
* 删除学生违纪
*
* @param id 学生违纪主键
* @return 结果
*/
public int deleteSchoolScDisciplineById(Long id);
/**
* 批量删除学生违纪
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolScDisciplineByIds(Long[] ids);
/**
* 获取最新三个年级
* @return
*/
List<Map<String, Object>> getGrade();
/**
* 根据年级获取班级
* @param gradeId
* @return
*/
List<Map<String, Object>> getClassList(Long gradeId);
}
......@@ -9,6 +9,7 @@ import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo;
import yangtz.cs.liu.campus.vo.teacherFiles.SchoolGradeByClassVo;
import java.util.List;
import java.util.Map;
/**
* 教师档案通知Mapper接口
......@@ -43,7 +44,7 @@ public interface TeacherFilesNoticeMapper
public int insertTeacherFilesNotice(TeacherFilesNotice teacherFilesNotice);
public List<TeacherFilesNotice> selctTeacherByUserId(@Param("userId") Long userId, @Param("teacherFiles") TeacherFilesNotice teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles);
/**
* 修改教师档案通知
......
package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.mapper.schoolRewardsPunishments.SchoolScAwardsMapper;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScAwardsService;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScAwardsVo;
import java.util.ArrayList;
import java.util.List;
/**
* 学校获奖Service业务层处理
*
* @author ruoyi
* @date 2023-11-06
*/
@Service
public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper,SchoolScAwards> implements ISchoolScAwardsService
{
@Autowired
private SchoolScAwardsMapper schoolScAwardsMapper;
/**
* 查询学校获奖
*
* @param id 学校获奖主键
* @return 学校获奖
*/
@Override
public SchoolScAwardsVo selectSchoolScAwardsById(Long id)
{
return schoolScAwardsMapper.selectSchoolScAwardsById(id);
}
/**
* 查询学校获奖列表
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖
*/
@Override
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo)
{
List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsList(schoolScAwardsVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
//获取学校获奖所有附件
List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList();
schoolScAwardsVos.forEach(schoolScAwardsVo1 -> {
for (SchoolAccessory schoolAccessory : schoolAccessories) {
if (schoolAccessory.getBusinessId().equals(schoolScAwardsVo1.getId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
schoolScAwardsVo1.setSchoolAccessoryList(schoolAccessoryList);
}
});
return schoolScAwardsVos;
}
/**
* 新增学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
@Transactional
@Override
public int insertSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolScAwardsVo.setApplyId(user.getUserId());
schoolScAwardsVo.setApplyName(user.getUserName());
schoolScAwardsVo.setApplyTime(DateUtils.getNowDate());
schoolScAwardsVo.setCreateBy(user.getUserName());
schoolScAwardsVo.setCreateTime(DateUtils.getNowDate());
int i = schoolScAwardsMapper.insertSchoolScAwards(schoolScAwardsVo);
insertSchoolAccessory(schoolScAwardsVo);
return i;
}
/**
* 修改学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
@Transactional
@Override
public int updateSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo)
{
schoolScAwardsVo.setUpdateBy(SecurityUtils.getUsername());
schoolScAwardsVo.setUpdateTime(DateUtils.getNowDate());
schoolScAwardsMapper.deleteSchoolAccessoryByBusinessId(schoolScAwardsVo.getId());
insertSchoolAccessory(schoolScAwardsVo);
return schoolScAwardsMapper.updateSchoolScAwards(schoolScAwardsVo);
}
/**
* 批量删除学校获奖
*
* @param ids 需要删除的学校获奖主键
* @return 结果
*/
@Override
public int deleteSchoolScAwardsByIds(Long[] ids)
{
//删除附件
schoolScAwardsMapper.deleteSchoolAccessoryByBusinessIds(ids);
return schoolScAwardsMapper.deleteSchoolScAwardsByIds(ids);
}
/**
* 删除学校获奖信息
*
* @param id 学校获奖主键
* @return 结果
*/
@Override
public int deleteSchoolScAwardsById(Long id)
{
return schoolScAwardsMapper.deleteSchoolScAwardsById(id);
}
/**
* 提交
* @param schoolScAwards
* @return
*/
@Override
public int submit(SchoolScAwards schoolScAwards) {
return schoolScAwardsMapper.updateById(schoolScAwards);
}
/**
* 新增附件信息信息
*
* @param schoolScAwardsVo 学校获奖对象
*/
public void insertSchoolAccessory(SchoolScAwardsVo schoolScAwardsVo)
{
List<SchoolAccessory> schoolAccessoryList = schoolScAwardsVo.getSchoolAccessoryList();
Long id = schoolScAwardsVo.getId();
if (StringUtils.isNotNull(schoolAccessoryList))
{
List<SchoolAccessory> list = new ArrayList<SchoolAccessory>();
for (SchoolAccessory schoolAccessory : schoolAccessoryList)
{
schoolAccessory.setBusinessId(id);
schoolAccessory.setModuleName("获奖与违纪-学校获奖");
schoolAccessory.setAccessoryType("学校获奖附件");
schoolAccessory.setCreateBy(SecurityUtils.getUsername());
schoolAccessory.setCreateTime(DateUtils.getNowDate());
list.add(schoolAccessory);
}
if (list.size() > 0)
{
schoolScAwardsMapper.batchSchoolAccessory(list);
}
}
}
}
package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.mapper.schoolRewardsPunishments.SchoolScDisciplineMapper;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
import java.util.List;
import java.util.Map;
/**
* 学生违纪Service业务层处理
*
* @author ruoyi
* @date 2023-11-06
*/
@Service
public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplineMapper,SchoolScDiscipline> implements ISchoolScDisciplineService
{
@Autowired
private SchoolScDisciplineMapper schoolScDisciplineMapper;
/**
* 查询学生违纪
*
* @param id 学生违纪主键
* @return 学生违纪
*/
@Override
public SchoolScDiscipline selectSchoolScDisciplineById(Long id)
{
return schoolScDisciplineMapper.selectSchoolScDisciplineById(id);
}
/**
* 查询学生违纪列表
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪
*/
@Override
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline)
{
return schoolScDisciplineMapper.selectSchoolScDisciplineList(schoolScDiscipline);
}
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
@Override
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setCreateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline);
}
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
@Override
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setUpdateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline);
}
/**
* 批量删除学生违纪
*
* @param ids 需要删除的学生违纪主键
* @return 结果
*/
@Override
public int deleteSchoolScDisciplineByIds(Long[] ids)
{
return schoolScDisciplineMapper.deleteSchoolScDisciplineByIds(ids);
}
/**
* 删除学生违纪信息
*
* @param id 学生违纪主键
* @return 结果
*/
@Override
public int deleteSchoolScDisciplineById(Long id)
{
return schoolScDisciplineMapper.deleteSchoolScDisciplineById(id);
}
/**
* 获取最新三个年级
* @return
*/
@Override
public List<Map<String, Object>> getGrade() {
return schoolScDisciplineMapper.getGrade();
}
/**
* 根据年级获取班级
* @param gradeId
* @return
*/
@Override
public List<Map<String, Object>> getClassList(Long gradeId) {
return schoolScDisciplineMapper.getClassList(gradeId);
}
}
//package yangtz.cs.liu.campus.service.impl.teacherFiles;
//
//import com.ruoyi.common.config.RuoYiConfig;
//import com.ruoyi.common.core.domain.AjaxResult;
//import org.apache.poi.hssf.util.HSSFColor;
//import org.apache.poi.ss.usermodel.*;
//import org.apache.poi.ss.util.CellRangeAddress;
//import org.apache.poi.xssf.usermodel.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.io.File;
//import java.io.FileOutputStream;
//import java.text.ParseException;
//import java.util.*;
//
//@Service
//public class TeacherFilesExcelUtil {
//
// @Autowired
// private RuoYiConfig ruoYiConfig;
//
//
//// private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//// private SimpleDateFormat sdfS = new SimpleDateFormat("yyyy年MM月dd日");
//// private SimpleDateFormat sdfMS = new SimpleDateFormat("yyyy年MM月");
//
// public AjaxResult getExcel(String noticeId)
// throws Exception {
// // 创建新的Excel 工作簿
// XSSFWorkbook workbook = new XSSFWorkbook();
// /**
// * 主标题
// */
// XSSFCellStyle mainTitle = workbook.createCellStyle();
// //垂直居中
// mainTitle.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// mainTitle.setAlignment(HorizontalAlignment.CENTER);
// Font mainfont = workbook.createFont();
// mainfont.setFontHeightInPoints((short) 28);
// mainTitle.setFont(mainfont);
//
// /**
// * 标题
// */
// XSSFCellStyle datetitle = workbook.createCellStyle();
// //垂直居中
// datetitle.setVerticalAlignment(VerticalAlignment.CENTER);
// Font datefont = workbook.createFont();
// datefont.setFontHeightInPoints((short) 14);
// datetitle.setFont(datefont);
//
// /**
// * 标题
// */
// XSSFCellStyle title = workbook.createCellStyle();
// //垂直居中
// title.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// title.setAlignment(HorizontalAlignment.CENTER);
// Font font0 = workbook.createFont();
// font0.setFontHeightInPoints((short) 16);
// font0.setBold(true);
// title.setFont(font0);
// title.setBorderBottom(BorderStyle.THIN); //下边框
// title.setBorderLeft(BorderStyle.THIN);//左边框
// title.setBorderTop(BorderStyle.THIN);//上边框
// title.setBorderRight(BorderStyle.THIN);//右边框
//
// /**
// * 正常格
// */
// XSSFCellStyle cellStyle = workbook.createCellStyle();
// //垂直居中
// cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// cellStyle.setAlignment(HorizontalAlignment.CENTER);
// cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
// cellStyle.setBorderLeft(BorderStyle.THIN);//左边框
// cellStyle.setBorderTop(BorderStyle.THIN);//上边框
// cellStyle.setBorderRight(BorderStyle.THIN);//右边框
// cellStyle.setWrapText(true);
// Font font = workbook.createFont();
// font.setFontHeightInPoints((short) 12);
// cellStyle.setFont(font);
//
// /**
// * 黄背景格
// */
// XSSFCellStyle yellowFont = workbook.createCellStyle();
// yellowFont.setWrapText(true);
// yellowFont.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GOLD.getIndex());
// yellowFont.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// //垂直居中
// yellowFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// yellowFont.setAlignment(HorizontalAlignment.CENTER);
// yellowFont.setBorderBottom(BorderStyle.THIN); //下边框
// yellowFont.setBorderLeft(BorderStyle.THIN);//左边框
// yellowFont.setBorderTop(BorderStyle.THIN);//上边框
// yellowFont.setBorderRight(BorderStyle.THIN);//右边框
// yellowFont.setFont(font);
//
// /**
// * 红字体格
// */
// XSSFCellStyle redFont = workbook.createCellStyle();
// //垂直居中
// redFont.setVerticalAlignment(VerticalAlignment.CENTER);
// //水平居中
// redFont.setAlignment(HorizontalAlignment.CENTER);
// Font font1 = workbook.createFont();
// font1.setColor(HSSFColor.HSSFColorPredefined.DARK_RED.getIndex());
// font1.setFontHeightInPoints((short) 12);
// redFont.setFont(font1);
// redFont.setBorderBottom(BorderStyle.THIN); //下边框
// redFont.setBorderLeft(BorderStyle.THIN);//左边框
// redFont.setBorderTop(BorderStyle.THIN);//上边框
// redFont.setBorderRight(BorderStyle.THIN);//右边框
//
// List<Long> depaList = getDepaList(request.getDepartment());
// /**
// * 时间集合
// */
// List<AttendanceDatePoi> dateDes = getDateDes(request.getStartTime(), request.getEndTime());
//
// for (int t = 0; t < dateDes.size(); t++) {
//
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(dateDes.get(t).getStartDate());
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// int month = calendar.get(Calendar.MONTH);
// int year = calendar.get(Calendar.YEAR);
//
// XSSFSheet sheet = workbook.createSheet();
// workbook.setSheetName(t, dateDes.get(t).getMonth());
// /**
// * 第一行
// */
// XSSFRow row0 = sheet.createRow(0);
// row0.setHeightInPoints(51);
// sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 4 + actualMaximum));
// XSSFCell cell0 = row0.createCell(0);
// cell0.setCellStyle(mainTitle);
// cell0.setCellValue("考勤表");
//
// /**
// * 第二行
// */
// XSSFRow row1 = sheet.createRow(1);
// sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 4));
// XSSFCell cel1 = row1.createCell(0);
// cel1.setCellStyle(datetitle);
// cel1.setCellValue(sdfS.format(dateDes.get(t).getStartDate()) + "-" + sdfS.format(dateDes.get(t).getEndDate()));
//
// XSSFCell cel22 = row1.createCell(actualMaximum - 11);
// cel22.setCellValue("√");
// XSSFCell cel33 = row1.createCell(actualMaximum - 10);
// cel33.setCellValue("出勤");
// XSSFCell cel2 = row1.createCell(actualMaximum - 9);
// cel2.setCellValue("●");
// XSSFCell cel3 = row1.createCell(actualMaximum - 8);
// cel3.setCellValue("未签到");
// XSSFCell cel4 = row1.createCell(actualMaximum - 7);
// cel4.setCellValue("□");
// XSSFCell cel5 = row1.createCell(actualMaximum - 6);
// cel5.setCellValue("事假");
// XSSFCell cel6 = row1.createCell(actualMaximum - 5);
// cel6.setCellValue("☆");
// XSSFCell cel7 = row1.createCell(actualMaximum - 4);
// cel7.setCellValue("节假日");
// XSSFCell cel8 = row1.createCell(actualMaximum - 3);
// cel8.setCellValue("△");
// XSSFCell cel9 = row1.createCell(actualMaximum - 2);
// cel9.setCellValue("迟到");
// XSSFCell cel10 = row1.createCell(actualMaximum - 1);
// cel10.setCellValue("○");
// XSSFCell cel11 = row1.createCell(actualMaximum);
// cel11.setCellValue("早退");
// XSSFCell cel12 = row1.createCell(actualMaximum + 1);
// cel12.setCellValue("×");
// XSSFCell cel13 = row1.createCell(actualMaximum + 2);
// cel13.setCellValue("旷工");
// XSSFCell cel14 = row1.createCell(actualMaximum + 3);
// cel14.setCellValue("#");
// XSSFCell cel15 = row1.createCell(actualMaximum + 4);
// cel15.setCellValue("外勤");
// /**
// * 第三行
// */
// XSSFRow row2 = sheet.createRow(2);
// XSSFCell cell = row2.createCell(0);
// cell.setCellValue("序号");
// cell.setCellStyle(title);
// sheet.setColumnWidth(0, 34 * 45);
//
//
// XSSFCell cell1 = row2.createCell(1);
// cell1.setCellValue("姓名");
// cell1.setCellStyle(title);
// sheet.setColumnWidth(1, 34 * 65);
//
// XSSFCell cell2 = row2.createCell(2);
// cell2.setCellValue("科室名");
// cell2.setCellStyle(title);
// sheet.setColumnWidth(2, 34 * 75);
//
// XSSFCell cell3 = row2.createCell(3);
// cell3.setCellValue("签到异常天数");
// cell3.setCellStyle(title);
// sheet.setColumnWidth(3, 34 * 130);
//
// XSSFCell cell4 = row2.createCell(4);
// cell4.setCellValue("事假");
// cell4.setCellStyle(title);
// sheet.setColumnWidth(4, 34 * 45);
//
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell cell5 = row2.createCell(4 + i);
// cell5.setCellValue(i);
// cell5.setCellStyle(title);
// sheet.setColumnWidth(4 + i, 34 * 34);
// }
//
// /**
// * 职工集合
// */
// int x = 3;
// int id = 1;
// for (Long depaid : depaList) {
// System.out.println("查询"+depaid);
// List<XxdjEmployees> xxdjEmployeesList = employeesMapper.SelectByDepartment(String.valueOf(depaid));
// System.out.println("职工集合查询"+xxdjEmployeesList);
// Dept dept = deptMapper.selectDeptById(depaid);
// for (XxdjEmployees xxdjEmployees : xxdjEmployeesList) {
// XSSFRow xrow1 = sheet.createRow(x);
// XSSFRow xrow2 = sheet.createRow(x + 1);
// XSSFRow xrow3 = sheet.createRow(x + 2);
// XSSFRow xrow4 = sheet.createRow(x + 3);
// //序号
// XSSFCell xcell0 = xrow1.createCell(0);
// XSSFCell x2cell0 = xrow2.createCell(0);
// XSSFCell x3cell0 = xrow3.createCell(0);
// XSSFCell x4cell0 = xrow4.createCell(0);
// xcell0.setCellStyle(cellStyle);
// x2cell0.setCellStyle(cellStyle);
// x3cell0.setCellStyle(cellStyle);
// x4cell0.setCellStyle(cellStyle);
// xcell0.setCellValue(id);
// //姓名
// XSSFCell xcell1 = xrow1.createCell(1);
// XSSFCell x2cell1 = xrow2.createCell(1);
// XSSFCell x3cell1 = xrow3.createCell(1);
// XSSFCell x4cell1 = xrow4.createCell(1);
// xcell1.setCellStyle(cellStyle);
// x2cell1.setCellStyle(cellStyle);
// x3cell1.setCellStyle(cellStyle);
// x4cell1.setCellStyle(cellStyle);
// xcell1.setCellValue(xxdjEmployees.getName());
// //科室名
// XSSFCell xcell2 = xrow1.createCell(2);
// XSSFCell x2cell2 = xrow2.createCell(2);
// XSSFCell x3cell2 = xrow3.createCell(2);
// XSSFCell x4cell2 = xrow4.createCell(2);
// xcell2.setCellStyle(cellStyle);
// x2cell2.setCellStyle(cellStyle);
// x3cell2.setCellStyle(cellStyle);
// x4cell2.setCellStyle(cellStyle);
// xcell2.setCellValue(dept.getDeptName());
// //签到异常天数
// XSSFCell xcell3 = xrow1.createCell(3);
// XSSFCell x2cell3 = xrow2.createCell(3);
// XSSFCell x3cell3 = xrow3.createCell(3);
// XSSFCell x4cell3 = xrow4.createCell(3);
// xcell3.setCellStyle(cellStyle);
// x2cell3.setCellStyle(cellStyle);
// x3cell3.setCellStyle(cellStyle);
// x4cell3.setCellStyle(cellStyle);
// //事假
// XSSFCell xcell4 = xrow1.createCell(4);
// XSSFCell x2cell4 = xrow2.createCell(4);
// XSSFCell x3cell4 = xrow3.createCell(4);
// XSSFCell x4cell4 = xrow4.createCell(4);
// xcell4.setCellStyle(redFont);
// x2cell4.setCellStyle(redFont);
// x3cell4.setCellStyle(redFont);
// x4cell4.setCellStyle(redFont);
//
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 0, 0));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 1, 1));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 2, 2));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 3, 3));
// sheet.addMergedRegion(new CellRangeAddress(x, x + 3, 4, 4));
//
// String idcard = xxdjEmployees.getIdcard();
// if (idcard != null && !"".equals(idcard)) {
// Map map = new HashMap();
// map.put("idCard", idcard);
// map.put("startDay", sdf.format(dateDes.get(t).getStartDate()));
// map.put("endDay", sdf.format(dateDes.get(t).getEndDate()));
// List<XxdjAttendance> xxdjAttendances = attendanceMapper.selectMonth(map);
// Map<String, XxdjAttendance> attendanceMap = new HashMap();
// for (XxdjAttendance xxdjAttendance : xxdjAttendances) {
// attendanceMap.put(xxdjAttendance.getAttendanceDay(), xxdjAttendance);
// }
// int leaveDate = 0;
// int errorDate = 0;
// for (int i = 1; i <= actualMaximum; i++) {
// XSSFCell xcell5 = xrow1.createCell(4 + i);
// XSSFCell x2cell5 = xrow2.createCell(4 + i);
// XSSFCell x3cell5 = xrow3.createCell(4 + i);
// XSSFCell x4cell5 = xrow4.createCell(4 + i);
// Calendar xcalendar = Calendar.getInstance();
// xcalendar.set(year, month, i);
// int weekDay = xcalendar.get(Calendar.DAY_OF_WEEK);
// if (weekDay == 7 || weekDay == 1) {
// xcell5.setCellStyle(yellowFont);
// x2cell5.setCellStyle(yellowFont);
// x3cell5.setCellStyle(yellowFont);
// x4cell5.setCellStyle(yellowFont);
// } else {
// xcell5.setCellStyle(cellStyle);
// x2cell5.setCellStyle(cellStyle);
// x3cell5.setCellStyle(cellStyle);
// x4cell5.setCellStyle(cellStyle);
// }
// XxdjAttendance xxdjAttendance = attendanceMap.get(sdf.format(xcalendar.getTime()));
// if (xxdjAttendance != null) {
// xcell5.setCellValue(toFHstate(xxdjAttendance.getForenoonStart()) + toFHoutside(xxdjAttendance.getForenoonStartOutside()));
// x2cell5.setCellValue(toFHstate(xxdjAttendance.getForenoonEnd()) + toFHoutside(xxdjAttendance.getForenoonEndOutside()));
// x3cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonStart()) + toFHoutside(xxdjAttendance.getAfternoonStartOutside()));
// x4cell5.setCellValue(toFHstate(xxdjAttendance.getAfternoonEnd()) + toFHoutside(xxdjAttendance.getAfternoonEndOutside()));
// if ("1".equals(xxdjAttendance.getLeaveDate())) {
// leaveDate++;
// }
// if ("1".equals(xxdjAttendance.getErrorDate())) {
// errorDate++;
// }
//
// }
// }
// xcell3.setCellValue(errorDate);
// xcell4.setCellValue(leaveDate);
//
// }
// x = x + 4;
// id++;
// }
// }
// }
//
// FileOutputStream fos = new FileOutputStream(getAbsoluteFile("签到表.xlsx"));
// // 把相应的Excel 工作簿存盘
// workbook.write(fos);
// fos.flush();
// // 操作结束,关闭文件
// fos.close();
// return AjaxResult.success("签到表.xlsx");
// }
//
// /**
// * 获取下载路径
// *
// * @param filename 文件名称
// */
// public String getAbsoluteFile(String filename) {
// String downloadPath = ruoYiConfig.getDownloadPath() + filename;
// File desc = new File(downloadPath);
// if (!desc.getParentFile().exists()) {
// desc.getParentFile().mkdirs();
// }
// return downloadPath;
// }
//
// //(1.正常 2.迟到 3.早退 4.请假 5.未签到 6.节假日 7.旷工)
// private String toFHstate(String state) {
// if (state == null) {
// return "●";
// }
// switch (state) {
// case "1":
// return "√";
// case "2":
// return "△";
// case "3":
// return "○";
// case "4":
// return "□";
// case "6":
// return "☆";
// case "7":
// return "×";
// default:
// return "●";
// }
// }
//
// private String toFHoutside(String outside) {
// if (outside == null) {
// return "";
// }
// switch (outside) {
// case "1":
// return "#";
// default:
// return "";
// }
// }
//
// public List<AttendanceDatePoi> getDateDes(String startDate, String endDate) {
// List<AttendanceDatePoi> datePois = new ArrayList<>();
// try {
//
// Date start = sdf.parse(startDate);
// Date end = sdf.parse(endDate);
// Calendar startCalendar = Calendar.getInstance();
// startCalendar.setTime(start);
// int startYear = startCalendar.get(Calendar.YEAR);
// int startMonth = startCalendar.get(Calendar.MONTH);
// int startDay = startCalendar.get(Calendar.DAY_OF_MONTH);
// Calendar endCalendar = Calendar.getInstance();
// endCalendar.setTime(end);
// int endYear = endCalendar.get(Calendar.YEAR);
// int endMonth = endCalendar.get(Calendar.MONTH);
// int endDay = endCalendar.get(Calendar.DAY_OF_MONTH);
// for (int year = startYear; year <= endYear; year++) {
//
// if (year != startYear)
// startMonth = 1;
// int maxMonth = 12;
// if (year == endYear) {
// maxMonth = endMonth;
// }
// for (int month = startMonth; month <= maxMonth; month++) {
// Calendar calendar = Calendar.getInstance();
// calendar.set(Calendar.YEAR, year);
// calendar.set(Calendar.MONTH, month);
// int actualMaximum = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
// AttendanceDatePoi datePoi = new AttendanceDatePoi();
// if (month != startMonth)
// startDay = 1;
// if (month == endMonth && year == endYear)
// actualMaximum = endDay;
// datePoi.setMonth(sdfMS.format(calendar.getTime()));
// calendar.set(Calendar.DAY_OF_MONTH, startDay);
// datePoi.setStartDate(calendar.getTime());
// calendar.set(Calendar.DAY_OF_MONTH, actualMaximum);
// datePoi.setEndDate(calendar.getTime());
// datePois.add(datePoi);
// }
// }
// } catch (ParseException e) {
// e.printStackTrace();
// }
// return datePois;
// }
//
// //获取 单位id集合
// public List<Long> getDepaList(Long department) {
// List<Long> depaList = new ArrayList<>();
// List<Dept> depts = deptMapper.selectChildrenDeptById(department);
// if (depts == null || depts.size() == 0) {
// depaList.add(department);
// } else {
// for (Dept dept : depts) {
// List<Long> todepaList = getDepaList(dept.getDeptId());
// depaList.addAll(todepaList);
// }
// }
// return depaList;
// }
//}
package yangtz.cs.liu.campus.service.impl.teacherFiles;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.system.service.ISysDictDataService;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.teacherFiles.*;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
@Service
public class TeacherFilesExcelUtil {
@Autowired
private RuoYiConfig ruoYiConfig;
@Autowired
private ITeacherFilesService teacherFilesService;
@Autowired
private ISysDictDataService sysDictDataService;
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
public void getExcel(String noticeId, HttpServletResponse response) {
TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setNoticeId(noticeId);
List<TeacherFiles> teacherFilesList = teacherFilesService.selectTeacherFilesList(teacherFiles);
// 创建新的Excel 工作簿
XSSFWorkbook workbook = new XSSFWorkbook();
/**
* 主标题
*/
XSSFCellStyle mainTitle = workbook.createCellStyle();
//垂直居中
mainTitle.setVerticalAlignment(VerticalAlignment.CENTER);
//水平居中
mainTitle.setAlignment(HorizontalAlignment.CENTER);
Font mainfont = workbook.createFont();
mainfont.setFontHeightInPoints((short) 12);
mainfont.setBold(true);
mainTitle.setFont(mainfont);
mainTitle.setBorderBottom(BorderStyle.THIN); //下边框
mainTitle.setBorderLeft(BorderStyle.THIN);//左边框
mainTitle.setBorderTop(BorderStyle.THIN);//上边框
mainTitle.setBorderRight(BorderStyle.THIN);//右边框
/**
* 正文
*/
XSSFCellStyle title = workbook.createCellStyle();
//垂直居中
title.setVerticalAlignment(VerticalAlignment.CENTER);
//水平居中
title.setAlignment(HorizontalAlignment.CENTER);
Font font0 = workbook.createFont();
font0.setFontHeightInPoints((short) 12);
title.setFont(font0);
title.setBorderBottom(BorderStyle.THIN); //下边框
title.setBorderLeft(BorderStyle.THIN);//左边框
title.setBorderTop(BorderStyle.THIN);//上边框
title.setBorderRight(BorderStyle.THIN);//右边框
for (int t = 0; t < teacherFilesList.size(); t++) {
TeacherFilesVO files = teacherFilesService.selectTeacherFilesById(teacherFilesList.get(t).getId());
XSSFSheet sheet = workbook.createSheet();
workbook.setSheetName(t, files.getTeacherName()+t);
/**
* 第一行
*/
XSSFRow row0 = sheet.createRow(0);
row0.setHeightInPoints(34);
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 5));
XSSFCell cell0 = row0.createCell(0);
cell0.setCellStyle(mainTitle);
cell0.setCellValue("基本信息");
XSSFCell cell05 = row0.createCell(5);
cell05.setCellStyle(mainTitle);
sheet.setColumnWidth(0, 34 * 140);
sheet.setColumnWidth(1, 34 * 100);
sheet.setColumnWidth(2, 34 * 100);
sheet.setColumnWidth(3, 34 * 140);
sheet.setColumnWidth(4, 34 * 100);
sheet.setColumnWidth(5, 34 * 100);
/**
* 第二行
*/
for(int i=1;i<=8;i++){
XSSFRow row2 = sheet.createRow(i);
row2.setHeightInPoints(20);
XSSFCell cell = row2.createCell(0);
String cellValue1 = "";
switch (i){
case 1:
cellValue1="学年学期";
break;
case 2:
cellValue1="姓名";
break;
case 3:
cellValue1="年龄";
break;
case 4:
cellValue1="学历";
break;
case 5:
cellValue1="任教学科";
break;
case 6:
cellValue1="任正班主任班级";
break;
case 7:
cellValue1="是否教学组长";
break;
case 8:
cellValue1="设计课时量";
break;
}
cell.setCellValue(cellValue1);
cell.setCellStyle(title);
sheet.addMergedRegion(new CellRangeAddress(i, i, 1, 2));
XSSFCell cell1 = row2.createCell(1);
String cellValue2 = "";
switch (i){
case 1:
cellValue2=files.getFilesSemester();
break;
case 2:
cellValue2=files.getTeacherName();
break;
case 3:
if(files.getAge()!=null){
cellValue2=String.valueOf(files.getAge());
}
break;
case 4:
cellValue2=files.getEducation();
break;
case 5:
cellValue2=files.getCourseName();
break;
case 6:
cellValue2=files.getBzrClassName();
break;
case 7:
cellValue2=files.getIsTeachingGroupLeader();
break;
case 8:
if(files.getClassHour()!=null){
cellValue2=String.valueOf(files.getClassHour());
}
break;
}
cell1.setCellValue(cellValue2);
cell1.setCellStyle(title);
XSSFCell cell3 = row2.createCell(2);
cell3.setCellStyle(title);
XSSFCell cell2 = row2.createCell(3);
String cellValue3 = "";
switch (i){
case 1:
cellValue3="级部";
break;
case 2:
cellValue3="性别";
break;
case 3:
cellValue3="职称";
break;
case 4:
cellValue3="政治面貌";
break;
case 5:
cellValue3="任教班级";
break;
case 6:
cellValue3="任副班主任班级";
break;
case 7:
cellValue3="是否教研组长";
break;
case 8:
cellValue3="班主任情况";
break;
}
cell2.setCellValue(cellValue3);
cell2.setCellStyle(title);
sheet.addMergedRegion(new CellRangeAddress(i, i, 4, 5));
XSSFCell cell4 = row2.createCell(4);
String cellValue4 = "";
switch (i){
case 1:
cellValue4=files.getGradeName();
break;
case 2:
if(files.getSex()!=null){
if(files.getSex().equals("0")){
cellValue4="男";
}else{
cellValue4="女";
}
}
break;
case 3:
cellValue4=files.getTitle();
break;
case 4:
cellValue4=files.getAppearance();
break;
case 5:
cellValue4=files.getClassName();
break;
case 6:
cellValue4=files.getFbzrClassName();
break;
case 7:
cellValue4=files.getIsResearchGroupLeader();
break;
case 8:
cellValue4=files.getClassTeacherDetails();
break;
}
cell4.setCellValue(cellValue4);
cell4.setCellStyle(title);
XSSFCell cell5 = row2.createCell(5);
cell5.setCellStyle(title);
}
int h =9;
XSSFRow row9 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
row9.setHeightInPoints(34);
XSSFCell cell90 = row9.createCell(0);
cell90.setCellStyle(mainTitle);
cell90.setCellValue("发表成就奖论文情况");
XSSFCell cell95 = row9.createCell(5);
cell95.setCellStyle(mainTitle);
h++;
XSSFRow row10 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
row10.setHeightInPoints(20);
XSSFCell cell100 = row10.createCell(0);
cell100.setCellStyle(title);
cell100.setCellValue("序号");
XSSFCell cell101 = row10.createCell(1);
cell101.setCellStyle(title);
cell101.setCellValue("论文名称");
XSSFCell cell102 = row10.createCell(2);
cell102.setCellStyle(title);
XSSFCell cell103 = row10.createCell(3);
cell103.setCellStyle(title);
cell103.setCellValue("级别");
XSSFCell cell104 = row10.createCell(4);
cell104.setCellStyle(title);
cell104.setCellValue("等级");
XSSFCell cell105 = row10.createCell(5);
cell105.setCellStyle(title);
cell105.setCellValue("发表时间");
h++;
List<TeacherFilesThesis> thesisList = files.getThesisList();
int thesisxh=1;
for(TeacherFilesThesis thesis : thesisList){
XSSFRow row11 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
row11.setHeightInPoints(20);
XSSFCell cell110 = row11.createCell(0);
cell110.setCellStyle(title);
cell110.setCellValue(thesisxh);
XSSFCell cell111 = row11.createCell(1);
cell111.setCellStyle(title);
cell111.setCellValue(thesis.getThesisName());
XSSFCell cell112 = row11.createCell(2);
cell112.setCellStyle(title);
XSSFCell cell113 = row11.createCell(3);
cell113.setCellStyle(title);
cell113.setCellValue(sysDictDataService.selectDictLabel("level",thesis.getLevel()));
XSSFCell cell114 = row11.createCell(4);
cell114.setCellStyle(title);
cell114.setCellValue(sysDictDataService.selectDictLabel("grade_type1",thesis.getGrade()));
XSSFCell cell115 = row11.createCell(5);
cell115.setCellStyle(title);
cell115.setCellValue(sdf.format(thesis.getPublishTime()));
thesisxh++;
h++;
}
XSSFRow row12 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
row12.setHeightInPoints(34);
XSSFCell cell120 = row12.createCell(0);
cell120.setCellStyle(mainTitle);
cell120.setCellValue("课题、结题、专著、校本教材编写情况");
XSSFCell cell125 = row12.createCell(5);
cell125.setCellStyle(mainTitle);
h++;
XSSFRow row13 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 3));
sheet.addMergedRegion(new CellRangeAddress(h, h, 4, 5));
row13.setHeightInPoints(20);
XSSFCell cell130 = row13.createCell(0);
cell130.setCellStyle(title);
cell130.setCellValue("序号");
XSSFCell cell131 = row13.createCell(1);
cell131.setCellStyle(title);
cell131.setCellValue("名称");
XSSFCell cell132 = row13.createCell(2);
cell132.setCellStyle(title);
XSSFCell cell133 = row13.createCell(3);
cell133.setCellStyle(title);
XSSFCell cell134 = row13.createCell(4);
cell134.setCellStyle(title);
cell134.setCellValue("发表时间");
XSSFCell cell135 = row13.createCell(5);
cell135.setCellStyle(title);
h++;
List<TeacherFilesMaterial> materialList = files.getMaterialList();
int materialxh=1;
for(TeacherFilesMaterial material : materialList){
XSSFRow row11 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 3));
sheet.addMergedRegion(new CellRangeAddress(h, h, 4, 5));
row11.setHeightInPoints(20);
XSSFCell cell110 = row11.createCell(0);
cell110.setCellStyle(title);
cell110.setCellValue(materialxh);
XSSFCell cell111 = row11.createCell(1);
cell111.setCellStyle(title);
cell111.setCellValue(material.getName());
XSSFCell cell112 = row11.createCell(2);
cell112.setCellStyle(title);
XSSFCell cell113 = row11.createCell(3);
cell113.setCellStyle(title);
XSSFCell cell114 = row11.createCell(4);
cell114.setCellStyle(title);
cell114.setCellValue(sdf.format(material.getPublishTime()));
XSSFCell cell115 = row11.createCell(5);
cell115.setCellStyle(title);
materialxh++;
h++;
}
XSSFRow row14 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
row14.setHeightInPoints(34);
XSSFCell cell140 = row14.createCell(0);
cell140.setCellStyle(mainTitle);
cell140.setCellValue("培训情况");
XSSFCell cell145 = row14.createCell(5);
cell145.setCellStyle(mainTitle);
h++;
XSSFRow row15 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
sheet.addMergedRegion(new CellRangeAddress(h, h, 3, 4));
row15.setHeightInPoints(20);
XSSFCell cell150 = row15.createCell(0);
cell150.setCellStyle(title);
cell150.setCellValue("序号");
XSSFCell cell151 = row15.createCell(1);
cell151.setCellStyle(title);
cell151.setCellValue("培训时间");
XSSFCell cell152 = row15.createCell(2);
cell152.setCellStyle(title);
XSSFCell cell153 = row15.createCell(3);
cell153.setCellValue("培训名称");
cell153.setCellStyle(title);
XSSFCell cell154 = row15.createCell(4);
cell154.setCellStyle(title);
XSSFCell cell155 = row15.createCell(5);
cell155.setCellValue("是否合格");
cell155.setCellStyle(title);
h++;
List<TeacherFilesTraining> trainingList = files.getTrainingList();
int trainingxh=1;
for (TeacherFilesTraining training:trainingList){
XSSFRow row11 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
sheet.addMergedRegion(new CellRangeAddress(h, h, 3, 4));
row15.setHeightInPoints(20);
XSSFCell cell110 = row11.createCell(0);
cell110.setCellStyle(title);
cell110.setCellValue(trainingxh);
XSSFCell cell111 = row11.createCell(1);
cell111.setCellStyle(title);
cell111.setCellValue(sdf.format(training.getTrainingTime()));
XSSFCell cell112 = row11.createCell(2);
cell112.setCellStyle(title);
XSSFCell cell113 = row11.createCell(3);
cell113.setCellValue(training.getTrainingName());
cell113.setCellStyle(title);
XSSFCell cell114 = row11.createCell(4);
cell114.setCellStyle(title);
XSSFCell cell115 = row11.createCell(5);
cell115.setCellValue(sysDictDataService.selectDictLabel("is_qualified",training.getIsQualified()));
cell115.setCellStyle(title);
trainingxh++;
h++;
}
XSSFRow row16 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 0, 5));
row16.setHeightInPoints(34);
XSSFCell cell160 = row16.createCell(0);
cell160.setCellStyle(mainTitle);
cell160.setCellValue("业务获奖情况");
XSSFCell cell165 = row16.createCell(5);
cell165.setCellStyle(mainTitle);
h++;
XSSFRow row17 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
row15.setHeightInPoints(20);
XSSFCell cell170 = row17.createCell(0);
cell170.setCellStyle(title);
cell170.setCellValue("序号");
XSSFCell cell171 = row17.createCell(1);
cell171.setCellStyle(title);
cell171.setCellValue("获奖名称");
XSSFCell cell172 = row17.createCell(2);
cell172.setCellStyle(title);
XSSFCell cell173 = row17.createCell(3);
cell173.setCellValue("获奖时间");
cell173.setCellStyle(title);
XSSFCell cell174 = row17.createCell(4);
cell174.setCellValue("获奖等级");
cell174.setCellStyle(title);
XSSFCell cell175 = row17.createCell(5);
cell175.setCellValue("发证机关");
cell175.setCellStyle(title);
h++;
List<TeacherFilesAward> awardList = files.getAwardList();
int awardxh =1;
for (TeacherFilesAward award : awardList){
XSSFRow row11 = sheet.createRow(h);
sheet.addMergedRegion(new CellRangeAddress(h, h, 1, 2));
XSSFCell cell110 = row11.createCell(0);
cell110.setCellStyle(title);
cell110.setCellValue(awardxh);
XSSFCell cell111 = row11.createCell(1);
cell111.setCellStyle(title);
cell111.setCellValue(award.getAwardName());
XSSFCell cell112 = row11.createCell(2);
cell112.setCellStyle(title);
XSSFCell cell113 = row11.createCell(3);
cell113.setCellValue(sdf.format(award.getAwardTime()));
cell113.setCellStyle(title);
XSSFCell cell114 = row11.createCell(4);
cell114.setCellValue(sysDictDataService.selectDictLabel("grade_type1",award.getGradeOfAward()));
cell114.setCellStyle(title);
XSSFCell cell115 = row11.createCell(5);
cell115.setCellValue(award.getLicenseIssuingAuthority());
cell115.setCellStyle(title);
awardxh++;
h++;
}
}
// 把相应的Excel 工作簿存盘
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
try {
workbook.write(response.getOutputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
/**
* 获取下载路径
*
* @param filename 文件名称
*/
public String getAbsoluteFile(String filename) {
String downloadPath = ruoYiConfig.getDownloadPath() + filename;
File desc = new File(downloadPath);
if (!desc.getParentFile().exists()) {
desc.getParentFile().mkdirs();
}
return downloadPath;
}
}
package yangtz.cs.liu.campus.service.impl.teacherFiles;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.TermRange;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.award.Award;
import yangtz.cs.liu.campus.domain.material.Material;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
......@@ -13,6 +15,7 @@ import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor;
import yangtz.cs.liu.campus.domain.teacherFiles.*;
import yangtz.cs.liu.campus.domain.thesis.Thesis;
import yangtz.cs.liu.campus.domain.training.Training;
import yangtz.cs.liu.campus.mapper.accessory.AccessoryMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMentorMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
......@@ -64,6 +67,10 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Autowired
private SchoolClassMentorMapper classMentorMapper;
@Autowired
private AccessoryMapper accessoryMapper;
/**
* 查询教师档案
*
......@@ -73,11 +80,49 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Override
public TeacherFilesVO selectTeacherFilesById(Long id)
{
TeacherFilesVO teacherFiles = teacherFilesMapper.selectTeacherFilesById(id);
teacherFiles.setMaterialList(FmaterialMapper.selectTeacherFilesMaterialListByFilesId(id));
teacherFiles.setThesisList(FthesisMapper.selectTeacherFilesThesisListByFilesId(id));
teacherFiles.setTrainingList(FtrainingMapper.selectTeacherFilesTrainingListByFilesId(id));
teacherFiles.setAwardList(FawardMapper.selectTeacherFilesAwardListByFilesId(id));
//教师档案课题编写情况
List<TeacherFilesMaterial> teacherFilesMaterials = FmaterialMapper.selectTeacherFilesMaterialListByFilesId(id);
for (TeacherFilesMaterial date :teacherFilesMaterials){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"材料编写附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setMaterialList(teacherFilesMaterials);
//论文
List<TeacherFilesThesis> teacherFilesTheses = FthesisMapper.selectTeacherFilesThesisListByFilesId(id);
for (TeacherFilesThesis date : teacherFilesTheses){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"论文情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setSchoolAccessoryList(accessories);
}
teacherFiles.setThesisList(teacherFilesTheses);
//教师档案培训情况
List<TeacherFilesTraining> teacherFilesTrainings = FtrainingMapper.selectTeacherFilesTrainingListByFilesId(id);
for (TeacherFilesTraining date :teacherFilesTrainings){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"培训情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setTrainingList(teacherFilesTrainings);
//教师档案获奖情况
List<TeacherFilesAward> teacherFilesAwards = FawardMapper.selectTeacherFilesAwardListByFilesId(id);
for (TeacherFilesAward date :teacherFilesAwards){
LambdaQueryWrapper<SchoolAccessory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAccessory::getBusinessId,date.gettId())
.eq(SchoolAccessory::getAccessoryType,"获奖情况附件");
List<SchoolAccessory> accessories = accessoryMapper.selectList(wrapper);
date.setAccessories(accessories);
}
teacherFiles.setAwardList(teacherFilesAwards);
return teacherFiles;
}
......@@ -114,9 +159,8 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
}
@Override
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles) {
return teacherFilesNoticeMapper.selctTeacherByUserId(userId,teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles) {
return teacherFilesNoticeMapper.selctTeacherByUserId(teacherFiles);
}
/**
......
package yangtz.cs.liu.campus.service.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.vo.schoolRewardsPunishments.SchoolScAwardsVo;
import java.util.List;
/**
* 学校获奖Service接口
*
* @author ruoyi
* @date 2023-11-06
*/
public interface ISchoolScAwardsService extends IService<SchoolScAwards>
{
/**
* 查询学校获奖
*
* @param id 学校获奖主键
* @return 学校获奖
*/
public SchoolScAwardsVo selectSchoolScAwardsById(Long id);
/**
* 查询学校获奖列表
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
public int insertSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo);
/**
* 修改学校获奖
*
* @param schoolScAwardsVo 学校获奖
* @return 结果
*/
public int updateSchoolScAwards(SchoolScAwardsVo schoolScAwardsVo);
/**
* 批量删除学校获奖
*
* @param ids 需要删除的学校获奖主键集合
* @return 结果
*/
public int deleteSchoolScAwardsByIds(Long[] ids);
/**
* 删除学校获奖信息
*
* @param id 学校获奖主键
* @return 结果
*/
public int deleteSchoolScAwardsById(Long id);
/**
* 提交
* @param schoolScAwards
* @return
*/
int submit(SchoolScAwards schoolScAwards);
}
package yangtz.cs.liu.campus.service.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import java.util.List;
import java.util.Map;
/**
* 学生违纪Service接口
*
* @author ruoyi
* @date 2023-11-06
*/
public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
{
/**
* 查询学生违纪
*
* @param id 学生违纪主键
* @return 学生违纪
*/
public SchoolScDiscipline selectSchoolScDisciplineById(Long id);
/**
* 查询学生违纪列表
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
/**
* 修改学生违纪
*
* @param schoolScDiscipline 学生违纪
* @return 结果
*/
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline);
/**
* 批量删除学生违纪
*
* @param ids 需要删除的学生违纪主键集合
* @return 结果
*/
public int deleteSchoolScDisciplineByIds(Long[] ids);
/**
* 删除学生违纪信息
*
* @param id 学生违纪主键
* @return 结果
*/
public int deleteSchoolScDisciplineById(Long id);
/**
* 获取最新三个年级
* @return
*/
List<Map<String,Object>> getGrade();
/**
* 根据年级获取班级
* @param gradeId
* @return
*/
List<Map<String,Object>> getClassList(Long gradeId);
}
......@@ -6,6 +6,7 @@ import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO;
import java.util.List;
import java.util.Map;
/**
* 教师档案Service接口
......@@ -45,7 +46,6 @@ public interface ITeacherFilesService
* @return 教师档案集合
*/
public int countYqr(TeacherFiles teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles);
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId);
/**
......@@ -54,6 +54,7 @@ public interface ITeacherFilesService
* @return
*/
public Integer teacherAdd(Long[] ids);
public List<TeacherFilesNotice> selctTeacherByUserId(TeacherFiles teacherFiles);
/**
* 新增教师档案
......
package yangtz.cs.liu.campus.vo.schoolRewardsPunishments;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import java.util.Date;
import java.util.List;
@Data
public class SchoolScAwardsVo
{
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 比赛名称 */
@Excel(name = "比赛名称")
private String competitionName;
/** 主办单位 */
@Excel(name = "主办单位")
private String organizer;
/** 获奖名称 */
@Excel(name = "获奖名称")
private String awardsName;
/** 主管部门id */
private Long competentDeptId;
/** 主管部门 */
@Excel(name = "主管部门")
private String competentDept;
/** 获奖级别(字典) */
@Excel(name = "获奖级别")
private String awardsLevel;
/** 部门主任id */
private Long deptDirectorId;
/** 部门主任 */
@Excel(name = "部门主任")
private String deptDirector;
/** 获奖时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "获奖时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date awardsTime;
/** 获奖类型(字典) */
@Excel(name = "获奖类型")
private String awardsType;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 审核状态(0未提交,1审核中,2通过,3驳回) */
@Excel(name = "审核状态")
private String auditState;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 创建者 */
@TableField(fill = FieldFill.INSERT)
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/** 更新者 */
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
/** 是否删除 */
@TableField(fill = FieldFill.INSERT)
private String delFlag;
//图片附件
private List<SchoolAccessory> schoolAccessoryList;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
}
......@@ -80,6 +80,7 @@
</if>
and r.student_id = #{studentId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0'
</where>
order by d.create_time desc
</select>
<select id="teacherGetDcwjList" resultType="yangtz.cs.liu.wechat.vo.schoolDcwj.Vo_SchoolDcwj">
......@@ -95,6 +96,7 @@
</if>
and r.teacher_id = #{teacherId} and d.dcwj_zt = '2' and d.del_flag = '0' and r.del_flag = '0'
</where>
order by d.create_time desc
</select>
<select id="queryList" resultType="yangtz.cs.liu.campus.vo.schoolDcwj.DawjVo">
......
<?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.campus.mapper.schoolRewardsPunishments.SchoolScAwardsMapper">
<resultMap type="SchoolScAwardsVo" id="SchoolScAwardsVoResult">
<result property="id" column="id" />
<result property="competitionName" column="competition_name" />
<result property="organizer" column="organizer" />
<result property="awardsName" column="awards_name" />
<result property="competentDeptId" column="competent_dept_id" />
<result property="competentDept" column="competent_dept" />
<result property="awardsLevel" column="awards_level" />
<result property="deptDirectorId" column="dept_director_id" />
<result property="deptDirector" column="dept_director" />
<result property="awardsTime" column="awards_time" />
<result property="awardsType" column="awards_type" />
<result property="remark" column="remark" />
<result property="auditState" column="audit_state" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<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="delFlag" column="del_flag" />
</resultMap>
<resultMap id="SchoolScAwardsSchoolAccessoryResult" type="SchoolScAwardsVo" extends="SchoolScAwardsVoResult">
<collection property="schoolAccessoryList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SchoolAccessoryResult" />
</resultMap>
<resultMap type="SchoolAccessory" id="SchoolAccessoryResult">
<result property="id" column="sub_id" />
<result property="businessId" column="sub_business_id" />
<result property="moduleName" column="sub_module_name" />
<result property="accessoryType" column="sub_accessory_type" />
<result property="accessoryUrl" column="sub_accessory_url" />
<result property="accessoryName" column="sub_accessory_name" />
</resultMap>
<sql id="selectSchoolScAwardsVo">
select id, competition_name, organizer, awards_name, competent_dept_id, competent_dept,
awards_level, dept_director_id, dept_director, awards_time, awards_type, remark,
audit_state, apply_id, apply_name, apply_time, create_by, create_time, update_by,
update_time, del_flag
from school_sc_awards
</sql>
<select id="selectSchoolScAwardsList" parameterType="SchoolScAwardsVo" resultMap="SchoolScAwardsVoResult">
<include refid="selectSchoolScAwardsVo"/>
<where>
del_flag = '0'
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
<if test="organizer != null and organizer != ''"> and organizer = #{organizer}</if>
<if test="awardsName != null and awardsName != ''"> and awards_name like concat('%', #{awardsName}, '%')</if>
<if test="competentDeptId != null "> and competent_dept_id = #{competentDeptId}</if>
<if test="competentDept != null and competentDept != ''"> and competent_dept = #{competentDept}</if>
<if test="awardsLevel != null and awardsLevel != ''"> and awards_level = #{awardsLevel}</if>
<if test="deptDirectorId != null "> and dept_director_id = #{deptDirectorId}</if>
<if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if>
<if test="awardsTime != null "> and awards_time = #{awardsTime}</if>
<if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
</select>
<select id="selectSchoolScAwardsById" parameterType="Long" resultMap="SchoolScAwardsSchoolAccessoryResult">
select a.id, a.competition_name, a.organizer, a.awards_name, a.competent_dept_id, a.competent_dept,
a.awards_level, a.dept_director_id, a.dept_director, a.awards_time, a.awards_type, a.remark,
a.audit_state, a.apply_id, a.apply_name, a.apply_time, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.business_id as sub_business_id, b.module_name as sub_module_name, b.accessory_type as sub_accessory_type,
b.accessory_url as sub_accessory_url, b.accessory_name as sub_accessory_name
from school_sc_awards a
left join school_accessory b on b.business_id = a.id and b.accessory_type = "学校获奖附件"
where a.id = #{id}
</select>
<insert id="insertSchoolScAwards" parameterType="SchoolScAwardsVo" useGeneratedKeys="true" keyProperty="id">
insert into school_sc_awards
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="competitionName != null">competition_name,</if>
<if test="organizer != null">organizer,</if>
<if test="awardsName != null">awards_name,</if>
<if test="competentDeptId != null">competent_dept_id,competent_dept,</if>
<if test="awardsLevel != null">awards_level,</if>
<if test="deptDirectorId != null">dept_director_id,dept_director,</if>
<if test="awardsTime != null">awards_time,</if>
<if test="awardsType != null">awards_type,</if>
<if test="remark != null">remark,</if>
<if test="auditState != null">audit_state,</if>
<if test="applyId != null">apply_id,</if>
<if test="applyName != null">apply_name,</if>
<if test="applyTime != null">apply_time,</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="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="competitionName != null">#{competitionName},</if>
<if test="organizer != null">#{organizer},</if>
<if test="awardsName != null">#{awardsName},</if>
<if test="competentDeptId != null">#{competentDeptId},(select dept_name from sys_dept where dept_id = #{competentDeptId}),</if>
<if test="awardsLevel != null">#{awardsLevel},</if>
<if test="deptDirectorId != null">#{deptDirectorId},(select user_name from sys_user where user_id = #{deptDirectorId}),</if>
<if test="awardsTime != null">#{awardsTime},</if>
<if test="awardsType != null">#{awardsType},</if>
<if test="remark != null">#{remark},</if>
<if test="auditState != null">#{auditState},</if>
<if test="applyId != null">#{applyId},</if>
<if test="applyName != null">#{applyName},</if>
<if test="applyTime != null">#{applyTime},</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="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolScAwards" parameterType="SchoolScAwardsVo">
update school_sc_awards
<trim prefix="SET" suffixOverrides=",">
<if test="competitionName != null">competition_name = #{competitionName},</if>
<if test="organizer != null">organizer = #{organizer},</if>
<if test="awardsName != null">awards_name = #{awardsName},</if>
<if test="competentDeptId != null">competent_dept_id = #{competentDeptId},competent_dept = (select dept_name from sys_dept where dept_id = #{competentDeptId}),</if>
<if test="awardsLevel != null">awards_level = #{awardsLevel},</if>
<if test="deptDirectorId != null">dept_director_id = #{deptDirectorId},dept_director = (select user_name from sys_user where user_id = #{deptDirectorId}),</if>
<if test="awardsTime != null">awards_time = #{awardsTime},</if>
<if test="awardsType != null">awards_type = #{awardsType},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="auditState != null">audit_state = #{auditState},</if>
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</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="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolScAwardsById" parameterType="Long">
update school_sc_awards set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolScAwardsByIds" parameterType="String">
update school_sc_awards set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<insert id="batchSchoolAccessory">
insert into school_accessory( id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by, create_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.businessId}, #{item.moduleName}, #{item.accessoryType}, #{item.accessoryUrl}, #{item.accessoryName}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
<delete id="deleteSchoolAccessoryByBusinessIds" parameterType="String">
delete from school_accessory where accessory_type = "学校获奖附件" and business_id in
<foreach item="businessId" collection="array" open="(" separator="," close=")">
#{businessId}
</foreach>
</delete>
<delete id="deleteSchoolAccessoryByBusinessId" parameterType="Long">
delete from school_accessory where accessory_type = "学校获奖附件" and business_id = #{businessId}
</delete>
<select id="selectAccessoryList" resultType="SchoolAccessory">
select id, business_id, module_name, accessory_type, accessory_url, accessory_name, create_by, create_time
from school_accessory where accessory_type = "学校获奖附件" and del_flag = '0'
</select>
</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="com.ruoyi.system.mapper.schoolRewardsPunishments.SchoolScDisciplineMapper">
<resultMap type="SchoolScDiscipline" id="SchoolScDisciplineResult">
<result property="id" column="id" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="gradeYear" column="grade_year" />
<result property="gradeId" column="grade_id" />
<result property="gradeName" column="grade_name" />
<result property="classId" column="class_id" />
<result property="className" column="class_name" />
<result property="classType" column="class_type" />
<result property="name" column="name" />
<result property="sex" column="sex" />
<result property="idCard" column="id_card" />
<result property="classTeacher" column="class_teacher" />
<result property="gradeDirector" column="grade_director" />
<result property="violateType" column="violate_type" />
<result property="violateNum" column="violate_num" />
<result property="punishResult" column="punish_result" />
<result property="punishTime" column="punish_time" />
<result property="remark" column="remark" />
<result property="auditState" column="audit_state" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<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="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolScDisciplineVo">
select id, school_year, semester, grade_year, grade_id, grade_name, class_id, class_name,
class_type, name, sex, id_card, class_teacher, grade_director, violate_type, violate_num,
punish_result, punish_time, remark, audit_state, apply_id, apply_name, apply_time, create_by,
create_time, update_by, update_time, del_flag
from school_sc_discipline
</sql>
<select id="selectSchoolScDisciplineList" parameterType="SchoolScDiscipline" resultMap="SchoolScDisciplineResult">
<include refid="selectSchoolScDisciplineVo"/>
<where>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="gradeYear != null and gradeYear != ''"> and grade_year = #{gradeYear}</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="gradeName != null and gradeName != ''"> and grade_name like concat('%', #{gradeName}, '%')</if>
<if test="classId != null "> and class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="idCard != null and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher like concat('%', #{classTeacher}, '%')</if>
<if test="gradeDirector != null and gradeDirector != ''"> and grade_director = #{gradeDirector}</if>
<if test="violateType != null and violateType != ''"> and violate_type = #{violateType}</if>
<if test="violateNum != null and violateNum != ''"> and violate_num = #{violateNum}</if>
<if test="punishResult != null and punishResult != ''"> and punish_result = #{punishResult}</if>
<if test="punishTime != null "> and punish_time = #{punishTime}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if>
<if test="applyId != null "> and a.apply_id = #{applyId}</if>
</where>
</select>
<select id="selectSchoolScDisciplineById" parameterType="Long" resultMap="SchoolScDisciplineResult">
<include refid="selectSchoolScDisciplineVo"/>
where id = #{id}
</select>
<insert id="insertSchoolScDiscipline" parameterType="SchoolScDiscipline" useGeneratedKeys="true" keyProperty="id">
insert into school_sc_discipline
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="gradeYear != null">grade_year,</if>
<if test="gradeId != null">grade_id,</if>
<if test="gradeName != null">grade_name,</if>
<if test="classId != null">class_id,</if>
<if test="className != null">class_name,</if>
<if test="classType != null">class_type,</if>
<if test="name != null">name,</if>
<if test="sex != null">sex,</if>
<if test="idCard != null">id_card,</if>
<if test="classTeacher != null">class_teacher,</if>
<if test="gradeDirector != null">grade_director,</if>
<if test="violateType != null">violate_type,</if>
<if test="violateNum != null">violate_num,</if>
<if test="punishResult != null">punish_result,</if>
<if test="punishTime != null">punish_time,</if>
<if test="remark != null">remark,</if>
<if test="auditState != null">audit_state,</if>
<if test="applyId != null">apply_id,</if>
<if test="applyName != null">apply_name,</if>
<if test="applyTime != null">apply_time,</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="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="gradeYear != null">#{gradeYear},</if>
<if test="gradeId != null">#{gradeId},</if>
<if test="gradeName != null">#{gradeName},</if>
<if test="classId != null">#{classId},</if>
<if test="className != null">#{className},</if>
<if test="classType != null">#{classType},</if>
<if test="name != null">#{name},</if>
<if test="sex != null">#{sex},</if>
<if test="idCard != null">#{idCard},</if>
<if test="classTeacher != null">#{classTeacher},</if>
<if test="gradeDirector != null">#{gradeDirector},</if>
<if test="violateType != null">#{violateType},</if>
<if test="violateNum != null">#{violateNum},</if>
<if test="punishResult != null">#{punishResult},</if>
<if test="punishTime != null">#{punishTime},</if>
<if test="remark != null">#{remark},</if>
<if test="auditState != null">#{auditState},</if>
<if test="applyId != null">#{applyId},</if>
<if test="applyName != null">#{applyName},</if>
<if test="applyTime != null">#{applyTime},</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="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolScDiscipline" parameterType="SchoolScDiscipline">
update school_sc_discipline
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="gradeYear != null">grade_year = #{gradeYear},</if>
<if test="gradeId != null">grade_id = #{gradeId},</if>
<if test="gradeName != null">grade_name = #{gradeName},</if>
<if test="classId != null">class_id = #{classId},</if>
<if test="className != null">class_name = #{className},</if>
<if test="classType != null">class_type = #{classType},</if>
<if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="classTeacher != null">class_teacher = #{classTeacher},</if>
<if test="gradeDirector != null">grade_director = #{gradeDirector},</if>
<if test="violateType != null">violate_type = #{violateType},</if>
<if test="violateNum != null">violate_num = #{violateNum},</if>
<if test="punishResult != null">punish_result = #{punishResult},</if>
<if test="punishTime != null">punish_time = #{punishTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="auditState != null">audit_state = #{auditState},</if>
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</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="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolScDisciplineById" parameterType="Long">
delete from school_sc_discipline where id = #{id}
</delete>
<delete id="deleteSchoolScDisciplineByIds" parameterType="String">
delete from school_sc_discipline where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getGrade" resultType="Map">
SELECT id as gradeId, grade_value as gradeValue, school_year as schoolYear, grade_year as gradeYear,
grade_name as gradeName, remark as remark
FROM `school_grade` ORDER BY grade_year DESC LIMIT 3
</select>
<select id="getClassList" resultType="Map">
</select>
</mapper>
......@@ -45,19 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selctTeacherByUserId" resultType="yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice">
SELECT fn.*,tf.state,tf.id as fId from teacher_files tf LEFT JOIN teacher_files_notice fn on fn.id= tf.notice_id WHERE tf.teacher_id = #{userId}
and fn.notice_state = 2
<if test="teacherFiles.noticeRange != null and teacherFiles.noticeRange != ''"> and fn.notice_range = #{teacherFiles.noticeRange}</if>
<if test="teacherFiles.noticeYear != null and teacherFiles.noticeYear != ''"> and fn.notice_year = #{teacherFiles.noticeYear}</if>
<if test="teacherFiles.noticeSemester != null and teacherFiles.noticeSemester != ''"> and fn.notice_semester = #{teacherFiles.noticeSemester}</if>
<if test="teacherFiles.noticeName != null and teacherFiles.noticeName != ''"> and fn.notice_name like concat('%', #{teacherFiles.noticeName}, '%')</if>
<if test="teacherFiles.noticeState != null and teacherFiles.noticeState != ''"> and fn.notice_state = #{teacherFiles.noticeState}</if>
<if test="teacherFiles.startTime != null "> and start_time = #{teacherFiles.startTime}</if>
<if test="teacherFiles.endTime != null "> and end_time = #{teacherFiles.endTime}</if>
</select>
<select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal">
<include refid="selectTeacherFilesNoticeTotalVo"/>
<where>
......@@ -78,6 +65,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selctTeacherByUserId" parameterType="TeacherFiles" resultType="yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice">
SELECT fn.*,tf.state,tf.id as fId from teacher_files tf LEFT JOIN teacher_files_notice fn on fn.id= tf.notice_id WHERE tf.teacher_id = #{userId}
and fn.notice_state = 2
<if test="noticeName != null "> and fn.notice_name LIKE concat('%', #{noticeName}, '%') </if>
</select>
<insert id="insertTeacherFilesNotice" parameterType="TeacherFilesNotice">
insert into teacher_files_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
......
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