Commit 6cdedff9 by Cat
parents c9d607c2 8cca9710
...@@ -126,6 +126,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -126,6 +126,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/dd/school/**").permitAll() .antMatchers( "/dd/school/**").permitAll()
//打印下载接口放行 //打印下载接口放行
.antMatchers("/school/student/queryOne/**","/school/studentStatus/proofStatus/**").permitAll() .antMatchers("/school/student/queryOne/**","/school/studentStatus/proofStatus/**").permitAll()
//打印设备条码信息
.antMatchers("/equipmentLedger/getEquipmentledger/**").permitAll()
.antMatchers("/school/studentStatus/exportStatus/**","/school/student/queryAllInfo/**").permitAll()
//网页注册登录接口放行 //网页注册登录接口放行
.antMatchers( "/web/artStudent/register","/web/artStudent/login").permitAll() .antMatchers( "/web/artStudent/register","/web/artStudent/login").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
......
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>smart-campus</artifactId>
</dependency>
</dependencies> </dependencies>
......
package com.ruoyi.quartz.task; package com.ruoyi.quartz.task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import yangtz.cs.liu.dingding.controller.DingJiaXiaoController;
/** /**
* 定时任务调度测试 * 定时任务调度测试
...@@ -11,6 +13,9 @@ import com.ruoyi.common.utils.StringUtils; ...@@ -11,6 +13,9 @@ import com.ruoyi.common.utils.StringUtils;
@Component("ryTask") @Component("ryTask")
public class RyTask public class RyTask
{ {
@Autowired
DingJiaXiaoController dingJiaXiaoController;
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
{ {
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
...@@ -25,4 +30,14 @@ public class RyTask ...@@ -25,4 +30,14 @@ public class RyTask
{ {
System.out.println("执行无参方法"); System.out.println("执行无参方法");
} }
public void updateLabClassYear(){
dingJiaXiaoController.updateLabClassYear();
}
public void updateLabUser(){
dingJiaXiaoController.updateLabUser();
}
} }
...@@ -57,8 +57,15 @@ export function deleteEquipmentLedger(id) { ...@@ -57,8 +57,15 @@ export function deleteEquipmentLedger(id) {
**/ **/
export function getUserList(params) { export function getUserList(params) {
return request({ return request({
url: '/equipmentLedger/getUser', url: "/equipmentLedger/getUser",
method: "GET", method: "GET",
params params,
});
}
//获取打印设备条码信息
export function equipmentPrint(ids) {
return request({
url: `/equipmentLedger/getEquipmentledger/${ids}`,
method: "get",
}); });
} }
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
telephone: [{required: true, message: "联系方式不能为空", trigger: "blur"}], telephone: [{required: true, message: "联系方式不能为空", trigger: "blur"}],
relationship: [{required: true, message: "与学生关系不能为空", trigger: "blur"}], relationship: [{required: true, message: "与学生关系不能为空", trigger: "blur"}],
contactAddress: [{required: true, message: "联系地址不能为空", trigger: "blur"}], contactAddress: [{required: true, message: "联系地址不能为空", trigger: "blur"}],
idCard: [{required: true, message: "身份证号不能为空", trigger: "blur"}], // idCard: [{required: true, message: "身份证号不能为空", trigger: "blur"}],
} }
}; };
}, },
......
...@@ -39,12 +39,14 @@ ...@@ -39,12 +39,14 @@
</el-table-column> </el-table-column>
<el-table-column label="证书照片" align="center"> <el-table-column label="证书照片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <el-carousel :interval="4000" height="100px">
<el-image v-for="(accessory, index) in scope.row.schoolAccessoryList" :key="index" <el-carousel-item v-for="(item, index) in scope.row.schoolAccessoryList" :key="index">
style="width: 100px; height: 100px" :src="accessory.accessoryUrl" <el-image style="width: 100px; height: 100px" :src="item.accessoryUrl"
:preview-src-list="[accessory.accessoryUrl]"></el-image> :preview-src-list="[item.accessoryUrl]"></el-image>
</div> </el-carousel-item>
</el-carousel>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注1" align="center" prop="remark1" /> <el-table-column label="备注1" align="center" prop="remark1" />
...@@ -118,13 +120,19 @@ ...@@ -118,13 +120,19 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item prop="schoolAccessoryList" label="证书照片"> <el-form-item prop="schoolAccessoryList" label="证书照片">
<el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*" <el-upload v-loading="uploadLoading" class="avatar-uploader" :action="uploadFileUrl" accept="image/*"
:show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"
:http-request="uploadImage"> :on-remove="handleRemove">
<img v-for="item in form.schoolAccessoryList" :key="item.accessoryUrl" :src="item.accessoryUrl" <div v-if="form.schoolAccessoryList.length === 0">
class="avatar" /> <i class="el-icon-plus avatar-uploader-icon"></i>
<i v-if="form.schoolAccessoryList.length === 0" class="el-icon-plus avatar-uploader-icon"></i> </div>
<div v-else>
<div v-for="(item, index) in form.schoolAccessoryList" :key="index">
<img :src="item.accessoryUrl" class="avatar" />
</div>
</div>
</el-upload> </el-upload>
<i class="el-icon-delete" @click="handleRemove(index)"></i> <!-- 添加删除按钮 -->
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -181,6 +189,7 @@ export default { ...@@ -181,6 +189,7 @@ export default {
components: { picAvatar }, components: { picAvatar },
data() { data() {
return { return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
//缩略图 //缩略图
srcList: [], srcList: [],
// 图片路径 // 图片路径
...@@ -222,7 +231,7 @@ export default { ...@@ -222,7 +231,7 @@ export default {
schoolYear: [ schoolYear: [
{ required: true, message: "学年不能为空", trigger: "change" } { required: true, message: "学年不能为空", trigger: "change" }
], ],
teacherName: [ teacherId: [
{ required: true, message: "教师名称不能为空", trigger: "change" } { required: true, message: "教师名称不能为空", trigger: "change" }
], ],
entrySubject: [ entrySubject: [
...@@ -271,15 +280,15 @@ export default { ...@@ -271,15 +280,15 @@ export default {
console.log('response', response); console.log('response', response);
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
this.competitionData.forEach(item => { // this.competitionData.forEach(item => {
if (item.schoolAccessoryList) { // if (item.schoolAccessoryList) {
item.previewUrls = [item.schoolAccessoryList.map(accessory => accessory.accessoryUrl)]; // item.previewUrls = [item.schoolAccessoryList.map(accessory => accessory.accessoryUrl)];
item.pictureUrl = item.schoolAccessoryList.map(accessory => accessory.accessoryUrl); // item.pictureUrl = item.schoolAccessoryList.map(accessory => accessory.accessoryUrl);
} else { // } else {
item.previewUrls = []; // item.previewUrls = [];
item.pictureUrl = []; // item.pictureUrl = [];
} // }
}); // });
}); });
...@@ -290,19 +299,21 @@ export default { ...@@ -290,19 +299,21 @@ export default {
this.pic = val this.pic = val
}, },
// 移除图片 // 移除图片
handleRemove() { handleRemove(index) {
this.imageUrl = undefined this.form.schoolAccessoryList.splice(index, 1);
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(response, file) { handleAvatarSuccess(response, file) {
console.log('response', response);
console.log('file', file);
// 处理上传成功的逻辑 // 处理上传成功的逻辑
const accessoryUrl = response.data.url; // 假设响应中包含了图片的访问URL const accessoryUrl = this.pev + response.fileName; // 假设响应中包含了图片的访问URL
const accessoryName = file.name; // 获取上传文件的名称 const accessoryName = response.originalFilename; // 获取上传文件的名称
this.form.schoolAccessoryList.push({ this.form.schoolAccessoryList.push({
accessoryUrl: accessoryUrl, accessoryUrl: accessoryUrl,
accessoryName: accessoryName accessoryName: accessoryName
}); });
console.log('this.form.schoolAccessoryList', this.form.schoolAccessoryList);
}, },
// 上传前格式和图片大小限制 // 上传前格式和图片大小限制
...@@ -318,27 +329,7 @@ export default { ...@@ -318,27 +329,7 @@ export default {
return type && isLt2M return type && isLt2M
}, },
// 上传图片
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 = process.env.VUE_APP_BASE_API + response.url
// 添加以下代码将文件信息添加到 uploadedFiles 数组中
this.uploadedFiles.push({
accessoryUrl: process.env.VUE_APP_BASE_API + response.url,
accessoryName: fileData.name
})
})
.catch(error => {
this.uploadLoading = false
})
},
//重置 //重置
resetQuery() { resetQuery() {
...@@ -430,16 +421,6 @@ export default { ...@@ -430,16 +421,6 @@ export default {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != "") { if (this.form.id != "") {
// 清空原有图片
this.form.schoolAccessoryList.splice(0);
for (let i = 0; i < this.uploadedFiles.length; i++) {
const file = this.uploadedFiles[i];
this.form.schoolAccessoryList.push({
accessoryUrl: file.accessoryUrl,
accessoryName: file.accessoryName
});
}
updateCompetition(this.form).then(({ code }) => { updateCompetition(this.form).then(({ code }) => {
if (code == 200) { if (code == 200) {
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess('修改成功')
...@@ -450,17 +431,6 @@ export default { ...@@ -450,17 +431,6 @@ export default {
this.$modal.msgError("修改失败"); this.$modal.msgError("修改失败");
}); });
} else { } else {
// 清空原有图片
this.form.schoolAccessoryList = [];
for (let i = 0; i < this.uploadedFiles.length; i++) {
const file = this.uploadedFiles[i];
this.form.schoolAccessoryList.push({
accessoryUrl: file.accessoryUrl,
accessoryName: file.accessoryName
});
}
addCompetition(this.form).then(response => { addCompetition(this.form).then(response => {
console.log(this.form, 'this.form'); console.log(this.form, 'this.form');
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess('新增成功')
......
...@@ -153,7 +153,6 @@ ...@@ -153,7 +153,6 @@
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
> >
<!-- <img v-for="(item,index) in form.file" :key="index" v-if="form.file" :src="item" class="avatar" />-->
<div v-if="form.file"> <div v-if="form.file">
<img <img
v-for="(item, index) in form.file" v-for="(item, index) in form.file"
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
<el-table-column label="型号" align="center" prop="model" /> <el-table-column label="型号" align="center" prop="model" />
<el-table-column label="借用日期" align="center" prop="borrowTime" /> <el-table-column label="借用日期" align="center" prop="borrowTime" />
<el-table-column label="借用人" align="center" prop="borrowBy" /> <el-table-column label="借用人" align="center" prop="borrowBy" />
<el-table-column label="归还状态" align="center" prop="returnState">
<template slot-scope="scope">
<dict-tag :options="dict.type.return_state" :value="scope.row.returnState"></dict-tag>
</template>
</el-table-column>
<el-table-column label="用途" align="center" prop="purpose" /> <el-table-column label="用途" align="center" prop="purpose" />
<el-table-column label="借用期限" align="center" prop="deadline" /> <el-table-column label="借用期限" align="center" prop="deadline" />
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
...@@ -80,6 +85,14 @@ ...@@ -80,6 +85,14 @@
<el-input v-model="postForm.deadline" /> <el-input v-model="postForm.deadline" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="归还状态" prop="returnState">
<el-select v-model="postForm.returnState" clearable style="width: 100%;">
<el-option v-for="dict in dict.type.return_state" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -100,7 +113,7 @@ import { ...@@ -100,7 +113,7 @@ import {
listTeacherjyxq listTeacherjyxq
} from "@/api/smartSchool/personWork/propertyManagement"; } from "@/api/smartSchool/personWork/propertyManagement";
export default { export default {
dicts: ['return_state'],
data() { data() {
return { return {
queryParams: { queryParams: {
......
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报修时间:" prop="reportrepairtime"> <el-form-item label="报修时间:" prop="reportRepairTime">
<el-date-picker v-model="postForm.reportrepairtime" type="date" style="width: 100%;" <el-date-picker v-model="postForm.reportRepairTime" type="date" style="width: 100%;"
value-format="yyyy-MM-dd" clearable></el-date-picker> value-format="yyyy-MM-dd" clearable></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
...@@ -656,7 +656,7 @@ export default { ...@@ -656,7 +656,7 @@ export default {
console.log(encodes, 'encodes'); console.log(encodes, 'encodes');
const printListParam = encodeURIComponent(JSON.stringify(this.printList)); const printListParam = encodeURIComponent(JSON.stringify(this.printList));
dd.biz.util.openLink({ dd.biz.util.openLink({
url: `${baseUrl}?ids=${ids}&encodes=${encodes}&printList=${printListParam}`, url: `${baseUrl}?ids=${ids}`,
onSuccess: () => { onSuccess: () => {
console.log('跳转成功,准备打印'); console.log('跳转成功,准备打印');
// 打印条码 // 打印条码
......
...@@ -50,7 +50,9 @@ import { getToken } from "@/utils/auth"; ...@@ -50,7 +50,9 @@ import { getToken } from "@/utils/auth";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import QRCode from "qrcodejs2"; // 生成二维码插件 import QRCode from "qrcodejs2"; // 生成二维码插件
import printJS from "print-js"; // 打印插件 import printJS from "print-js"; // 打印插件
import {
equipmentPrint
} from "../../../../api/smartSchool/schoolProperty/equipmenTledger";
export default { export default {
name: "index", name: "index",
...@@ -81,22 +83,28 @@ export default { ...@@ -81,22 +83,28 @@ export default {
}; };
}, },
created() { created() {
const ids = this.$route.query.ids; this.getList();
const encodes = this.$route.query.encodes;
const printList = JSON.parse(decodeURIComponent(this.$route.query.printList));
this.printBarcodes(ids, encodes, printList);
}, },
methods: { methods: {
getList() {
this.loading = true
const ids = this.$route.query.ids;
console.log(ids, 'ids');
equipmentPrint(ids).then(res => {
this.printList = res;
console.log(this.printList, 'this.printList');
this.chooseList = res;
console.log(this.chooseList, 'this.chooseList');
this.loading = false
this.printBarcodes();
})
},
//生成批量打印条码 //生成批量打印条码
printBarcodes(ids, encodes, printList) { printBarcodes() {
this.printDialog = true; this.printDialog = true;
console.log(ids, encodes);
this.printList = [...printList];
this.chooseList = [...this.printList];
console.log(this.chooseList, '122');
this.$nextTick(() => { this.$nextTick(() => {
this.printList.map((item, index) => { this.printList.map((item, index) => {
const domPrint = document.getElementById(`print${index}`).lastElementChild; const domPrint = document.getElementById(`print${index}`).lastElementChild;
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
<el-table-column label="借用人" align="center" prop="borrowBy" /> <el-table-column label="借用人" align="center" prop="borrowBy" />
<el-table-column label="用途" align="center" prop="purpose" /> <el-table-column label="用途" align="center" prop="purpose" />
<el-table-column label="借用期限(天)" align="center" prop="deadline" width="140" /> <el-table-column label="借用期限(天)" align="center" prop="deadline" width="140" />
<el-table-column label="归还日期" align="center" prop="returnTime" width="160" /> <el-table-column label="预计使用期限" align="center" prop="yjuseTime" width="160" />
<el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160"> <el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag :options="dict.type.equipment_state" :value="row.returnEquipmentCondition" /> <dict-tag :options="dict.type.equipment_state" :value="row.returnEquipmentCondition" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="接收人" align="center" prop="receivedBy" /> <el-table-column label="接收人" align="center" prop="receivedBy" />
<el-table-column label="预计使用时间" align="center" prop="yjuseTime" width="160" /> <el-table-column label="归还日期" align="center" prop="returnTime" width="160" />
<el-table-column label="实际使用时间" align="center" prop="sjuseTime" width="160" /> <el-table-column label="实际使用时间" align="center" prop="sjuseTime" width="160" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" prop="orgname" width="150" fixed="right"> <el-table-column label="操作" align="center" prop="orgname" width="150" fixed="right">
...@@ -137,17 +137,19 @@ ...@@ -137,17 +137,19 @@
</el-row> </el-row>
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预计使用时间" prop="yjuseTime"> <el-form-item label="预计使用期限" prop="yjuseTime">
<el-date-picker v-model="lendReturnForm.yjuseTime" type="datetime" clearable class="selectWidth" <el-date-picker v-model="lendReturnForm.yjuseTime" type="datetime" clearable class="selectWidth"
placeholder="请选择预计使用时间" value-format="yyyy-MM-dd HH:mm:ss" :disabled="nowType == 2 ? true : false"> placeholder="请选择" value-format="yyyy-MM-dd HH:mm:ss" :disabled="nowType == 2 ? true : false">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际使用时间" prop="sjuseTime"> <el-form-item label="实际使用时间" prop="sjuseTime">
<el-date-picker v-model="lendReturnForm.sjuseTime" type="datetime" clearable class="selectWidth" <!-- <el-date-picker v-model="lendReturnForm.sjuseTime" type="datetime" clearable class="selectWidth"
placeholder="请选择实际使用时间" value-format="yyyy-MM-dd HH:mm:ss" :disabled="nowType == 2 ? true : false"> placeholder="请选择实际使用时间" value-format="yyyy-MM-dd HH:mm:ss" :disabled="nowType == 2 ? true : false">
</el-date-picker> </el-date-picker> -->
<el-input v-model="lendReturnForm.sjuseTime" placeholder="请输入" :disabled="nowType == 2 ? true : false"
type="number"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
<el-card style="height: 950px"> <el-card style="height: 950px" class="scrollable-card">
<el-form :model="queryParams" style="border-bottom: 1px solid #dfe6ec; padding: 10px 0 0 5px"> <el-form :model="queryParams" style="border-bottom: 1px solid #dfe6ec; padding: 10px 0 0 5px">
<el-form-item label="班级信息" prop="schoolYear"> <el-form-item label="班级信息" prop="schoolYear">
<el-select v-model="queryParams.schoolYear" @change="getTreeData" style="width: 100%" size="mini"> <el-select v-model="queryParams.schoolYear" @change="getTreeData" style="width: 100%" size="mini">
...@@ -678,6 +678,10 @@ export default { ...@@ -678,6 +678,10 @@ export default {
padding-right: 0px; padding-right: 0px;
} }
.scrollable-card {
overflow: auto;
}
/*.dragBox[data-v-86c11aba] {*/ /*.dragBox[data-v-86c11aba] {*/
/* font-size: 20px;*/ /* font-size: 20px;*/
/* width: 100%;*/ /* width: 100%;*/
......
package yangtz.cs.liu.campus.controller.SchoolEquipment; package yangtz.cs.liu.campus.controller.SchoolEquipment;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
...@@ -7,17 +8,21 @@ import com.ruoyi.common.core.domain.entity.SysUser; ...@@ -7,17 +8,21 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.schoolEquipment.SchoolEquipmentLedger; import yangtz.cs.liu.campus.domain.schoolEquipment.SchoolEquipmentLedger;
import yangtz.cs.liu.campus.service.schoolEquipment.IEquipmentLedgerService; import yangtz.cs.liu.campus.service.schoolEquipment.IEquipmentLedgerService;
import yangtz.cs.liu.campus.vo.curricula.CurriculaStudentVo; import yangtz.cs.liu.campus.vo.curricula.CurriculaStudentVo;
import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentLedgerDcVo;
import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentLedgerVo; import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentLedgerVo;
import yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo; import yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 设备基础信息 * 设备基础信息
...@@ -58,8 +63,17 @@ public class EquipmentLedgerController extends BaseController { ...@@ -58,8 +63,17 @@ public class EquipmentLedgerController extends BaseController {
public void export(HttpServletResponse response, SchoolEquipmentLedgerVo schoolEquipmentLedgerVo) public void export(HttpServletResponse response, SchoolEquipmentLedgerVo schoolEquipmentLedgerVo)
{ {
List<SchoolEquipmentLedger> list = equipmentLedgerService.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo); List<SchoolEquipmentLedger> list = equipmentLedgerService.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
ExcelUtil<SchoolEquipmentLedger> util = new ExcelUtil<SchoolEquipmentLedger>(SchoolEquipmentLedger.class); List<SchoolEquipmentLedgerDcVo> list1 = new ArrayList<>();
util.exportExcel(response, list, "设备台账数据"); int i = 1;
for (SchoolEquipmentLedger schoolEquipmentLedger : list) {
SchoolEquipmentLedgerDcVo schoolEquipmentLedgerDcVo = new SchoolEquipmentLedgerDcVo();
BeanUtils.copyProperties(schoolEquipmentLedger,schoolEquipmentLedgerDcVo);
schoolEquipmentLedgerDcVo.setSerialNumber(i);
list1.add(schoolEquipmentLedgerDcVo);
i++;
}
ExcelUtil<SchoolEquipmentLedgerDcVo> util = new ExcelUtil<SchoolEquipmentLedgerDcVo>(SchoolEquipmentLedgerDcVo.class);
util.exportExcel(response, list1, "设备台账数据");
} }
/** /**
...@@ -138,4 +152,13 @@ public class EquipmentLedgerController extends BaseController { ...@@ -138,4 +152,13 @@ public class EquipmentLedgerController extends BaseController {
public TableDataInfo getUser(SysUser sysUser){ public TableDataInfo getUser(SysUser sysUser){
return getDataTable(equipmentLedgerService.getUser(sysUser)); return getDataTable(equipmentLedgerService.getUser(sysUser));
} }
/**
* 打印设备条码信息
*/
@GetMapping("/getEquipmentledger/{ids}")
public AjaxResult getEquipmentledger(@PathVariable Long[] ids){
List<Map<String,Object>> mapList = equipmentLedgerService.getEquipmentledger(ids);
return AjaxResult.success(mapList);
}
} }
...@@ -69,6 +69,18 @@ public class SchoolOrganizationFcController extends BaseController ...@@ -69,6 +69,18 @@ public class SchoolOrganizationFcController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SchoolOrganizationFc schoolOrganizationFc) public AjaxResult add(@RequestBody SchoolOrganizationFc schoolOrganizationFc)
{ {
//先将file的前缀去掉
String file = schoolOrganizationFc.getFile();
if (file!=null){
String str ="";
String[] split = file.split(",");
for (int i = 0; i < split.length; i++) {
String substring = split[i].substring(8, split[i].length());
str = str+","+substring;
}
schoolOrganizationFc.setFile(str.substring(1, str.length()));
}
return toAjax(schoolOrganizationFcService.save(schoolOrganizationFc)); return toAjax(schoolOrganizationFcService.save(schoolOrganizationFc));
} }
......
package yangtz.cs.liu.campus.controller.organization; package yangtz.cs.liu.campus.controller.organization;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
...@@ -20,8 +21,15 @@ import com.ruoyi.common.enums.BusinessType; ...@@ -20,8 +21,15 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo; import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationInfo;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember; import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationMember;
import yangtz.cs.liu.campus.domain.organization.SchoolOrganizationSignin;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.student.SchoolStudentClassRelation;
import yangtz.cs.liu.campus.domain.student.SchoolStudentClasses;
import yangtz.cs.liu.campus.domain.student.SchoolStudentParent; import yangtz.cs.liu.campus.domain.student.SchoolStudentParent;
import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService; import yangtz.cs.liu.campus.service.organization.ISchoolOrganizationMemberService;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentClassRelationService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentClassesService;
import yangtz.cs.liu.campus.service.student.ISchoolStudentParentService; import yangtz.cs.liu.campus.service.student.ISchoolStudentParentService;
import yangtz.cs.liu.campus.vo.organization.MemberListVo; import yangtz.cs.liu.campus.vo.organization.MemberListVo;
...@@ -44,6 +52,15 @@ public class SchoolOrganizationMemberController extends BaseController ...@@ -44,6 +52,15 @@ public class SchoolOrganizationMemberController extends BaseController
@Autowired @Autowired
private ISchoolStudentParentService schoolStudentParentService; private ISchoolStudentParentService schoolStudentParentService;
@Autowired
private ISchoolStudentClassesService schoolStudentClassesService;
@Autowired
private ISchoolStudentClassRelationService schoolStudentClassRelationService;
@Autowired
private ISchoolClassService schoolClassService;
/** /**
* 查询社团成员列表 * 查询社团成员列表
*/ */
...@@ -58,6 +75,21 @@ public class SchoolOrganizationMemberController extends BaseController ...@@ -58,6 +75,21 @@ public class SchoolOrganizationMemberController extends BaseController
.orderByDesc(SchoolOrganizationMember::getCreateTime); .orderByDesc(SchoolOrganizationMember::getCreateTime);
startPage(); startPage();
List<SchoolOrganizationMember> list = schoolOrganizationMemberService.list(wrapper); List<SchoolOrganizationMember> list = schoolOrganizationMemberService.list(wrapper);
//查询社团成员时 应根据当前这个学生 去动态查询那个班级
if (list!=null){
for (int i = 0; i < list.size(); i++) {
Long userId = list.get(i).getUserId();
LambdaQueryWrapper<SchoolStudentClassRelation> wrapper1 = Wrappers.lambdaQuery();
wrapper1.eq(SchoolStudentClassRelation::getStudentId,userId);
SchoolStudentClassRelation one = schoolStudentClassRelationService.getOne(wrapper1);
LambdaQueryWrapper<SchoolClass> wrapper2 = Wrappers.lambdaQuery();
wrapper2.eq(SchoolClass::getId,one.getClassId());
SchoolClass res = schoolClassService.getOne(wrapper2);
list.get(i).setGrade(res.getGradeName());
list.get(i).setClasses(res.getClassName());
}
}
return getDataTable(list); return getDataTable(list);
} }
...@@ -82,7 +114,8 @@ public class SchoolOrganizationMemberController extends BaseController ...@@ -82,7 +114,8 @@ public class SchoolOrganizationMemberController extends BaseController
// wrapper.eq(SchoolStudentParent::getIdCard,schoolOrganizationMember.getCardid()); // wrapper.eq(SchoolStudentParent::getIdCard,schoolOrganizationMember.getCardid());
// SchoolStudentParent one = schoolStudentParentService.getOne(wrapper); // SchoolStudentParent one = schoolStudentParentService.getOne(wrapper);
// schoolOrganizationMember.setUserId(one.getUserId()); // schoolOrganizationMember.setUserId(one.getUserId());
return toAjax(schoolOrganizationMemberService.save(schoolOrganizationMember)); boolean save = schoolOrganizationMemberService.save(schoolOrganizationMember);
return toAjax(save);
} }
/** /**
......
...@@ -106,7 +106,8 @@ public class SchoolOrganizationSigninController extends BaseController ...@@ -106,7 +106,8 @@ public class SchoolOrganizationSigninController extends BaseController
boolean save = schoolOrganizationMemberService.save(member); boolean save = schoolOrganizationMemberService.save(member);
System.out.println(save); System.out.println(save);
} }
return toAjax(schoolOrganizationSigninService.updateById(so)); boolean b = schoolOrganizationSigninService.updateById(so);
return toAjax(b);
} }
/** /**
......
...@@ -41,6 +41,7 @@ import yangtz.cs.liu.campus.domain.schoolDcwj.*; ...@@ -41,6 +41,7 @@ import yangtz.cs.liu.campus.domain.schoolDcwj.*;
import yangtz.cs.liu.campus.domain.schoolDuty.SchoolDuty; import yangtz.cs.liu.campus.domain.schoolDuty.SchoolDuty;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.student.SchoolStudent; import yangtz.cs.liu.campus.domain.student.SchoolStudent;
import yangtz.cs.liu.campus.mapper.schoolDcwj.SchoolDcwjPushMapper;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService; import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolDcwj.*; import yangtz.cs.liu.campus.service.schoolDcwj.*;
import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService; import yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService;
...@@ -88,6 +89,7 @@ public class SchoolDcwjController extends BaseController { ...@@ -88,6 +89,7 @@ public class SchoolDcwjController extends BaseController {
@Autowired @Autowired
private ISchoolDcwjPushService pushService; private ISchoolDcwjPushService pushService;
@Value("${server.port}") @Value("${server.port}")
private String p; private String p;
...@@ -513,9 +515,122 @@ public class SchoolDcwjController extends BaseController { ...@@ -513,9 +515,122 @@ public class SchoolDcwjController extends BaseController {
ajax.put("titles", titlesVo); ajax.put("titles", titlesVo);
//获取内容 //获取内容
List<SchoolDcwjAnVo> list = schoolDcwjRyService.getSenateAnData(dcwjId, vo); // List<SchoolDcwjAnVo> list = schoolDcwjRyService.getSenateAnData(dcwjId, vo);
//判断是推送给教师还是家长
LambdaQueryWrapper<SchoolDcwjPush> pushLqw = new LambdaQueryWrapper<>();
pushLqw.eq(SchoolDcwjPush::getDcwjId,dcwjId);
List<SchoolDcwjPush> pushes = pushService.list(pushLqw);
if(DcwjType.PUSHT.equals(pushes.get(0).getPubType())){
//教师
//获取固定列的值,,获取到的list的id为ry表的id
startPage();
List<SchoolDcwjAnVo> list = schoolDcwjRyService.getTeaAnData(dcwjId, vo);
//获取问卷调查题目
LambdaQueryWrapper<SchoolDcwjNr> nrlqw = new LambdaQueryWrapper<>();
nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime);
List<SchoolDcwjNr> nrs = schoolDcwjNrService.list(nrlqw);
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId)
;
//a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = schoolDcwjAnService.list(lqw);
//教师调查问卷回答的内容
for (SchoolDcwjAnVo anVo : list) {
List<SchoolDcwjAn> ans = new ArrayList<>();
//设置空对象,是为了,通俗的说就是站位,如果不占位的话,就目前来说,如果用户第一题没写,第二题写了,那么第2题的答案会显示在第1题的位置
SchoolDcwjAn entity = new SchoolDcwjAn();
//获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值
for(SchoolDcwjNr nr : nrs){
// LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
// lqw
// .eq(SchoolDcwjAn::getDcwjId, dcwjId)
// .eq(SchoolDcwjAn::getRyId, anVo.getId())
// .eq(SchoolDcwjAn::getNrId, nr.getId())
// ;
// //a里要么有1个值,要么没有值
// List<SchoolDcwjAn> a = anMapper.selectList(lqw);
for (SchoolDcwjAn schoolDcwjAn : a) {
if (schoolDcwjAn.getRyId().equals(anVo.getId()) && schoolDcwjAn.getNrId().equals(nr.getId())){
ans.add(schoolDcwjAn);
}else {
ans.add(entity);
}
}
// if(StringUtils.isNotNull(a) && a.size() > 0){
// ans.add(a.get(0));
// }else {
// ans.add(entity);
// }
}
anVo.setList(ans);
}
List<ViewDataVo> voList = schoolDcwjNrService.turnData(list);
ajax.put("data", voList);
ajax.put("total",getDataTable(list).getTotal());
return ajax;
}
//推送类型为学生家长
//获取固定列的值,,获取到的list的id为ry表的id
startPage();
List<SchoolDcwjAnVo> list = schoolDcwjRyService.getAnData1(dcwjId, vo);
//获取问卷调查题目
LambdaQueryWrapper<SchoolDcwjNr> nrlqw = new LambdaQueryWrapper<>();
nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime);
List<SchoolDcwjNr> nrs = schoolDcwjNrService.list(nrlqw);
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId)
;
//a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = schoolDcwjAnService.list(lqw);
//学生家长调查问卷回答的内容
for (SchoolDcwjAnVo anVo : list) {
List<SchoolDcwjAn> ans = new ArrayList<>();
//设置空对象,是为了,通俗的说就是站位,如果不占位的话,就目前来说,如果用户第一题没写,第二题写了,那么第2题的答案会显示在第1题的位置
SchoolDcwjAn entity = new SchoolDcwjAn();
//获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值
for(SchoolDcwjNr nr : nrs){
// LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
// lqw
// .eq(SchoolDcwjAn::getDcwjId, dcwjId)
// .eq(SchoolDcwjAn::getRyId, anVo.getId())
// .eq(SchoolDcwjAn::getNrId, nr.getId())
// ;
// //a里要么有1个值,要么没有值
// List<SchoolDcwjAn> a = anMapper.selectList(lqw);
for (SchoolDcwjAn schoolDcwjAn : a) {
if (schoolDcwjAn.getRyId().equals(anVo.getId()) && schoolDcwjAn.getNrId().equals(nr.getId())){
ans.add(schoolDcwjAn);
}else {
ans.add(entity);
}
}
// if(StringUtils.isNotNull(a) && a.size() > 0){
// ans.add(a.get(0));
// }else {
// ans.add(entity);
// }
}
anVo.setList(ans);
}
List<ViewDataVo> voList = schoolDcwjNrService.turnData(list); List<ViewDataVo> voList = schoolDcwjNrService.turnData(list);
ajax.put("data", voList); ajax.put("data", voList);
ajax.put("total",getDataTable(list).getTotal());
return ajax; return ajax;
} }
......
...@@ -122,7 +122,9 @@ public class StudentStatusController { ...@@ -122,7 +122,9 @@ public class StudentStatusController {
map.put("avatar", image); map.put("avatar", image);
} }
map.put("idCard",baseInfo.getIdCard()); map.put("idCard",baseInfo.getIdCard());
map.put("birthday",new SimpleDateFormat("yyyy-MM-dd").format(baseInfo.getBirthday())); if (StringUtils.isNotNull(baseInfo.getBirthday())){
map.put("birthday",new SimpleDateFormat("yyyy-MM-dd").format(baseInfo.getBirthday()));
}
map.put("nation",baseInfo.getNation()); map.put("nation",baseInfo.getNation());
map.put("stuTelephone",baseInfo.getStuTelephone()); map.put("stuTelephone",baseInfo.getStuTelephone());
map.put("postalCode",baseInfo.getPostalCode()); map.put("postalCode",baseInfo.getPostalCode());
...@@ -285,7 +287,9 @@ public class StudentStatusController { ...@@ -285,7 +287,9 @@ public class StudentStatusController {
}else{ }else{
map.put("sex","女"); map.put("sex","女");
} }
map.put("birthday",new SimpleDateFormat("yyyy-MM-dd").format(baseInfo.getBirthday())); if (StringUtils.isNotNull(baseInfo.getBirthday())){
map.put("birthday",new SimpleDateFormat("yyyy-MM-dd").format(baseInfo.getBirthday()));
}
map.put("idCard",baseInfo.getIdCard()); map.put("idCard",baseInfo.getIdCard());
// 图片 // 图片
//路径去掉/profile //路径去掉/profile
......
...@@ -238,49 +238,65 @@ public class SchoolTeacherController extends BaseController { ...@@ -238,49 +238,65 @@ public class SchoolTeacherController extends BaseController {
//查询设备号 //查询设备号
if(StringUtils.isNotNull(schoolTeacher.getDeviceNum())){ if(StringUtils.isNotNull(schoolTeacher.getDeviceNum())){
LambdaQueryWrapper<SchoolTeacher> lqw1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolTeacher> lqw1 = new LambdaQueryWrapper<>();
lqw1.eq(SchoolTeacher::getDeviceNum,schoolTeacher.getDeviceNum()); lqw1.notIn(SchoolTeacher::getId,schoolTeacher.getId())
.eq(SchoolTeacher::getDeviceNum,schoolTeacher.getDeviceNum());
SchoolTeacher teacher = schoolTeacherService.getOne(lqw1); SchoolTeacher teacher = schoolTeacherService.getOne(lqw1);
if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) { if (StringUtils.isNotNull(teacher)){
}else if(schoolTeacher.getDeviceNum().equals(teacher.getDeviceNum())){
throw new ServiceException("设备号已存在"); throw new ServiceException("设备号已存在");
} }
// if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) {
//
// }else if(schoolTeacher.getDeviceNum().equals(teacher.getDeviceNum())){
// throw new ServiceException("设备号已存在");
// }
} }
//查询身份证号 //查询身份证号
if(StringUtils.isNotNull(schoolTeacher.getIdCard())){ if(StringUtils.isNotNull(schoolTeacher.getIdCard())){
LambdaQueryWrapper<SchoolTeacher> lqw2 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolTeacher> lqw2 = new LambdaQueryWrapper<>();
lqw2.eq(SchoolTeacher::getIdCard,schoolTeacher.getIdCard()); lqw2.notIn(SchoolTeacher::getId,schoolTeacher.getId())
.eq(SchoolTeacher::getIdCard,schoolTeacher.getIdCard());
SchoolTeacher teacher = schoolTeacherService.getOne(lqw2); SchoolTeacher teacher = schoolTeacherService.getOne(lqw2);
if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) { if (StringUtils.isNotNull(teacher)){
}else if(schoolTeacher.getIdCard().equals(teacher.getIdCard())){
throw new ServiceException("身份证号已存在"); throw new ServiceException("身份证号已存在");
} }
// if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) {
//
// }else if(schoolTeacher.getIdCard().equals(teacher.getIdCard())){
// throw new ServiceException("身份证号已存在");
// }
} }
//查询编号 //查询编号
if(StringUtils.isNotNull(schoolTeacher.getTeacherCode())){ if(StringUtils.isNotNull(schoolTeacher.getTeacherCode())){
LambdaQueryWrapper<SchoolTeacher> lqw3 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolTeacher> lqw3 = new LambdaQueryWrapper<>();
lqw3.eq(SchoolTeacher::getTeacherCode,schoolTeacher.getTeacherCode()); lqw3.notIn(SchoolTeacher::getId,schoolTeacher.getId())
.eq(SchoolTeacher::getTeacherCode,schoolTeacher.getTeacherCode());
SchoolTeacher teacher = schoolTeacherService.getOne(lqw3); SchoolTeacher teacher = schoolTeacherService.getOne(lqw3);
if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) { if (StringUtils.isNotNull(teacher)){
}else if(schoolTeacher.getTeacherCode().equals(teacher.getTeacherCode())){
throw new ServiceException("编号已存在"); throw new ServiceException("编号已存在");
} }
// if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) {
//
// }else if(schoolTeacher.getTeacherCode().equals(teacher.getTeacherCode())){
// throw new ServiceException("编号已存在");
// }
} }
//查询电话号码 //查询电话号码
if(StringUtils.isNotNull(schoolTeacher.getTeacherCode())){ if(StringUtils.isNotNull(schoolTeacher.getTeacherCode())){
LambdaQueryWrapper<SchoolTeacher> lqw4 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolTeacher> lqw4 = new LambdaQueryWrapper<>();
lqw4.eq(SchoolTeacher::getTeacherTel,schoolTeacher.getTeacherTel()); lqw4.notIn(SchoolTeacher::getId,schoolTeacher.getId())
.eq(SchoolTeacher::getTeacherTel,schoolTeacher.getTeacherTel());
SchoolTeacher teacher = schoolTeacherService.getOne(lqw4); SchoolTeacher teacher = schoolTeacherService.getOne(lqw4);
if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) { if (StringUtils.isNotNull(teacher)){
}else if(schoolTeacher.getTeacherTel().equals(teacher.getTeacherTel())){
throw new ServiceException("电话号码已存在"); throw new ServiceException("电话号码已存在");
} }
// if (StringUtils.isNotNull(schoolTeacher.getId()) && schoolTeacher.getId().equals(teacher.getId())) {
//
// }else if(schoolTeacher.getTeacherTel().equals(teacher.getTeacherTel())){
// throw new ServiceException("电话号码已存在");
// }
} }
......
...@@ -9,6 +9,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; ...@@ -9,6 +9,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.controller.A;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService; import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
...@@ -60,12 +61,34 @@ public class TeacherFilesController extends BaseController ...@@ -60,12 +61,34 @@ public class TeacherFilesController extends BaseController
} }
/** /**
* 老师查看自己的档案任务 * 新增教师档案
* @param
* @return
*/
@GetMapping("/teacherAdd/{ids}")
public AjaxResult teacherAdd(Long[] ids){
return AjaxResult.success(teacherFilesService.teacherAdd(ids));
}
/**
* 获取教师列表
* @param
* @return
*/
@GetMapping("/getTeacherRocer/{tId}")
public AjaxResult getTeacherRocer(@PathVariable("tId") String tId){
return AjaxResult.success(teacherFilesService.getTeacherRocer(tId));
}
/**
*
* @param userId
* @param
* @return
*/ */
@GetMapping("getTeachList/{userId}") @GetMapping("getTeachList/{userId}")
public TableDataInfo teachList(@PathVariable("userId") Long userId){ public TableDataInfo teachList(@PathVariable("userId") Long userId,TeacherFilesNotice teacherFilesNotice){
startPage(); startPage();
List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(userId); List<TeacherFilesNotice> teacherFilesNotices = teacherFilesService.selctTeacherByUserId(userId,teacherFilesNotice);
return getDataTable(teacherFilesNotices); return getDataTable(teacherFilesNotices);
} }
...@@ -127,7 +150,6 @@ public class TeacherFilesController extends BaseController ...@@ -127,7 +150,6 @@ public class TeacherFilesController extends BaseController
return toAjax(teacherFilesService.deleteTeacherFilesByIds(ids)); return toAjax(teacherFilesService.deleteTeacherFilesByIds(ids));
} }
/** /**
* 教师档案同步 * 教师档案同步
*/ */
...@@ -139,27 +161,34 @@ public class TeacherFilesController extends BaseController ...@@ -139,27 +161,34 @@ public class TeacherFilesController extends BaseController
return toAjax(teacherFilesService.synchronous(id)); return toAjax(teacherFilesService.synchronous(id));
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核通过", businessType = BusinessType.UPDATE) @Log(title = "教师档案审核通过", businessType = BusinessType.UPDATE)
@PutMapping("/passThrough/{id}") @PutMapping("/passThrough/{id}")
public AjaxResult passThrough(@PathVariable("id") Long id) public AjaxResult passThrough(@PathVariable("id") Long[] id)
{ {
Integer date = null;
for (int i = 0 ; i< id.length ; i++){
TeacherFiles teacherFiles = new TeacherFiles(); TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setId(id); teacherFiles.setId(id[i]);
teacherFiles.setState("5"); teacherFiles.setState("5");
return toAjax(teacherFilesService.updateTeacherFiles(teacherFiles)); date = teacherFilesService.updateTeacherFiles(teacherFiles);
}
return toAjax(date);
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
@Log(title = "教师档案审核驳回", businessType = BusinessType.UPDATE) @Log(title = "教师档案审核驳回", businessType = BusinessType.UPDATE)
@PutMapping("/reject/{id}") @PutMapping("/reject/{id}")
public AjaxResult reject(@PathVariable("id") Long id) public AjaxResult reject(@PathVariable("id") Long[] id)
{ {
TeacherFiles teacherFiles = new TeacherFiles(); Integer date = null;
teacherFiles.setId(id); for (int i = 0 ; i< id.length ; i++){
teacherFiles.setState("9"); TeacherFiles teacherFiles = new TeacherFiles();
return toAjax(teacherFilesService.updateTeacherFiles(teacherFiles)); teacherFiles.setId(id[i]);
teacherFiles.setState("9");
date = teacherFilesService.updateTeacherFiles(teacherFiles);
}
return toAjax(date);
} }
@PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')") @PreAuthorize("@ss.hasPermi('teacherFiles:notice:edit')")
......
...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.domain.organization; ...@@ -3,6 +3,7 @@ package yangtz.cs.liu.campus.domain.organization;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.core.domain.OurBaseEntity; import com.core.domain.OurBaseEntity;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
...@@ -13,12 +14,11 @@ import com.ruoyi.common.annotation.Excel; ...@@ -13,12 +14,11 @@ import com.ruoyi.common.annotation.Excel;
* @date 2023-09-06 * @date 2023-09-06
*/ */
@Data @Data
public class SchoolOrganizationSignin extends OurBaseEntity public class SchoolOrganizationSignin extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** id */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
@Excel(name = "id")
private Long id; private Long id;
/** 姓名 */ /** 姓名 */
......
package yangtz.cs.liu.campus.domain.schoolEquipment; package yangtz.cs.liu.campus.domain.schoolEquipment;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.core.domain.OurBaseEntity; import com.core.domain.OurBaseEntity;
...@@ -52,13 +54,12 @@ public class SchoolCirculation extends OurBaseEntity ...@@ -52,13 +54,12 @@ public class SchoolCirculation extends OurBaseEntity
/** 接收人 */ /** 接收人 */
private String receivedBy; private String receivedBy;
/** 预计使用时间 */ /** 预计使用期限 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date yjuseTime; private Date yjuseTime;
/** 实际使用时间 */ /** 实际使用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String sjuseTime;
private Date sjuseTime;
/** 备注 */ /** 备注 */
private String remark; private String remark;
......
...@@ -48,6 +48,10 @@ public class SchoolEquipmentRepair extends OurBaseEntity ...@@ -48,6 +48,10 @@ public class SchoolEquipmentRepair extends OurBaseEntity
/** 修理人 */ /** 修理人 */
private String repairName; private String repairName;
/**
* 地点
*/
private String place;
/** 修理人联系方式 */ /** 修理人联系方式 */
private Long repairPhone; private Long repairPhone;
......
...@@ -33,7 +33,6 @@ public class SchoolGradeMentor extends OurBaseEntity { ...@@ -33,7 +33,6 @@ public class SchoolGradeMentor extends OurBaseEntity {
private String type; private String type;
/** 职务 */ /** 职务 */
@NotBlank(message = "职务不能为空")
private String teacherPost; private String teacherPost;
/** 学科组(1物理学科组,2化学学科组,3生物学科组) */ /** 学科组(1物理学科组,2化学学科组,3生物学科组) */
......
...@@ -40,9 +40,14 @@ public class SchoolTeacherWages extends OurBaseEntity { ...@@ -40,9 +40,14 @@ public class SchoolTeacherWages extends OurBaseEntity {
private BigDecimal basePay; private BigDecimal basePay;
/** /**
* 教师电话
*/
@Excel(name = "教师联系方式")
private String teacherTel;
/**
* 身份证号 * 身份证号
*/ */
@Excel(name = "身份证号")
private String idCard; private String idCard;
/** /**
......
...@@ -46,4 +46,8 @@ public class ShebeiJy extends OurBaseEntity { ...@@ -46,4 +46,8 @@ public class ShebeiJy extends OurBaseEntity {
@Excel(name = "借用期限") @Excel(name = "借用期限")
private int deadline; private int deadline;
//归还状态(1已归还,0未归还)
@Excel(name = "归还状态", readConverterExp = "1=已归还,0=未归还", combo = {"已归还","未归还"})
private String returnState;
} }
...@@ -52,4 +52,8 @@ public class TeacherJy extends OurBaseEntity { ...@@ -52,4 +52,8 @@ public class TeacherJy extends OurBaseEntity {
@Excel(name = "借用期限") @Excel(name = "借用期限")
private int deadline; private int deadline;
//归还状态(1已归还,0未归还)
@Excel(name = "归还状态", readConverterExp = "1=已归还,0=未归还", combo = {"已归还","未归还"})
private String returnState;
} }
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;
/**
* 教师档案删除对象 TeacherFilesDeletRecord
*
* @author ruoyi
* @date 2023-09-05
*/
@Data
public class TeacherFilesDeletRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 通知id
*/
private String tId;
/**
* 级部id
*/
private Long gId;
/**
* 身份证
*/
private String tel;
/**
* 级部
*/
private String gruoName;
/**
*用户名称
*/
private String userName;
}
...@@ -50,9 +50,12 @@ public interface CirculationMapper extends BaseMapper<SchoolCirculation> { ...@@ -50,9 +50,12 @@ public interface CirculationMapper extends BaseMapper<SchoolCirculation> {
SchoolCirculationVo getSchoolCirculationVoById(@Param("id")Long id); SchoolCirculationVo getSchoolCirculationVoById(@Param("id")Long id);
@Select("SELECT sc.id,el.encode,sc.equipment_id,el.equipment_name,el.model,sc.borrow_time,sc.borrow_by_id,sc.borrow_by,sc.purpose,sc.deadline,sc.return_state,el.is_lend,sc.return_time,sc.return_equipment_condition,sc.received_by_id,sc.received_by,sc.yjuse_time,sc.sjuse_time,sc.remark from school_equipment_ledger el LEFT JOIN school_circulation sc on el.id = sc.equipment_id \n" @Select("SELECT sc.id,el.encode,sc.equipment_id,el.equipment_name,el.model,sc.borrow_time,sc.borrow_by_id,sc.borrow_by,sc.purpose,sc.deadline,sc.return_state,sc.yjuse_time,sc.sjuse_time,el.is_lend,sc.return_time,sc.return_equipment_condition,sc.received_by_id,sc.received_by,sc.yjuse_time,sc.sjuse_time,sc.remark from school_equipment_ledger el LEFT JOIN school_circulation sc on el.id = sc.equipment_id \n"
+ "WHERE el.encode = #{encode} AND sc.return_state=0 and el.del_flag=0") + "WHERE el.encode = #{encode} AND sc.return_state=0 and el.del_flag=0")
SchoolCirculationVo getSchoolCirculationVoByenCode(@Param("encode")String encode); SchoolCirculationVo getSchoolCirculationVoByenCode(@Param("encode")String encode);
@Select("SELECT sc.id,el.encode,sc.equipment_id,el.equipment_name,sc.return_equipment_condition ,el.model,sc.borrow_time,sc.borrow_by_id,sc.borrow_by,sc.purpose,sc.deadline,sc.return_state,el.is_lend,sc.return_time,sc.return_equipment_condition,sc.received_by_id,sc.received_by,sc.yjuse_time,sc.sjuse_time,sc.remark from school_circulation sc LEFT JOIN school_equipment_ledger el on el.id = sc.equipment_id WHERE sc.id=#{id} and el.del_flag=0")
SchoolCirculationVo getReturningEquipmentById(@Param("id")String id);
} }
...@@ -35,4 +35,11 @@ public interface EquipmentLedgerMapper extends BaseMapper<SchoolEquipmentLedger> ...@@ -35,4 +35,11 @@ public interface EquipmentLedgerMapper extends BaseMapper<SchoolEquipmentLedger>
* @return * @return
*/ */
List<SchoolEquipmentLedger> selectSchoolEquipmentLedgerListGr(SchoolEquipmentLedgerVo schoolEquipmentLedgerVo); List<SchoolEquipmentLedger> selectSchoolEquipmentLedgerListGr(SchoolEquipmentLedgerVo schoolEquipmentLedgerVo);
/**
* 打印设备条码信息
* @param ids
* @return
*/
List<Map<String, Object>> getEquipmentledger(Long[] ids);
} }
...@@ -14,7 +14,7 @@ import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolReceiveQuery; ...@@ -14,7 +14,7 @@ import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolReceiveQuery;
public interface EquipmentRepairMapper extends BaseMapper<SchoolEquipmentRepair> { public interface EquipmentRepairMapper extends BaseMapper<SchoolEquipmentRepair> {
@Select("SELECT er.id,er.equipment_id,el.encode,el.equipment_name,er.dispose_state,el.model,el.date_of_production,el.place ,\n" @Select("SELECT er.id,er.equipment_id,el.encode,el.equipment_name,er.dispose_state,er.place,el.model,el.date_of_production,el.place ,\n"
+ "el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,\n" + "el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,\n"
+ "er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark\n" + "er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark\n"
+ "FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id WHERE er.id=#{id} and er.del_flag=0") + "FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id WHERE er.id=#{id} and er.del_flag=0")
...@@ -24,7 +24,7 @@ public interface EquipmentRepairMapper extends BaseMapper<SchoolEquipmentRepair> ...@@ -24,7 +24,7 @@ public interface EquipmentRepairMapper extends BaseMapper<SchoolEquipmentRepair>
public List<SchoolEquipmentRepairVo> getMaintenanceList(SchoolReceiveQuery schoolReceiveQuery); public List<SchoolEquipmentRepairVo> getMaintenanceList(SchoolReceiveQuery schoolReceiveQuery);
@Select("SELECT er.id,er.equipment_id,el.encode,er.dispose_state,el.equipment_name,el.model,el.date_of_production,el.place ,\n" @Select("SELECT er.id,er.equipment_id,el.encode,er.dispose_state,el.equipment_name,el.model,el.date_of_production,el.place ,\n"
+ "el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,\n" + "el.classification_code,er.report_repair_time,er.place,er.report_repair_id,er.report_repair,er.problem,\n"
+ "er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark\n" + "er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark\n"
+ "FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id where er.del_flag=0 ") + "FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id where er.del_flag=0 ")
public List<SchoolEquipmentRepairVo> getlist(); public List<SchoolEquipmentRepairVo> getlist();
......
...@@ -13,4 +13,11 @@ public interface SchoolTeacherWagesMapper extends BaseMapper<SchoolTeacherWages> ...@@ -13,4 +13,11 @@ public interface SchoolTeacherWagesMapper extends BaseMapper<SchoolTeacherWages>
List<SchoolTeacherWages> query(SchoolTeacherWages schoolTeacherWages); List<SchoolTeacherWages> query(SchoolTeacherWages schoolTeacherWages);
/**
* 批量新增教师工资
* @param list
* @return
*/
int batchInsertTeacherWages(List<SchoolTeacherWages> list);
} }
package yangtz.cs.liu.campus.mapper.teacherFiles;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesDeletRecord;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO;
import java.util.List;
import java.util.Map;
/**
* 教师档案删除记录mapper
*
* @author ruoyi
* @date 2023-09-06
*/
@Mapper
public interface TeacherFilesDeletRecordMapper
{
/**
* 添加记录
*/
@Insert("insert into teacher_file_delet_record (user_id,tel,gruo_name,user_name,t_id,g_id) VALUES (#{userId},#{tel},#{gruoName},#{userName},#{tId},#{gId}) ")
public Integer addTeacherFilesDeletRecord(TeacherFilesDeletRecord teacherFilesDeletRecord);
/**
* 删除记录
*/
@Delete("delete from teacher_file_delet_record where id =#{id} ")
public Integer deletRecord(Long id);
/**
* 查询老师
* @param tId
* @return
*/
@Select("select * from teacher_file_delet_record where t_id =#{tId} ")
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId);
@Select("select * from teacher_file_delet_record where id =#{id} ")
public TeacherFilesDeletRecord getByid(Long id);
}
...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.mapper.teacherFiles; ...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.mapper.teacherFiles;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNoticeTotal; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNoticeTotal;
import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo; import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo;
...@@ -42,8 +43,7 @@ public interface TeacherFilesNoticeMapper ...@@ -42,8 +43,7 @@ public interface TeacherFilesNoticeMapper
public int insertTeacherFilesNotice(TeacherFilesNotice teacherFilesNotice); public int insertTeacherFilesNotice(TeacherFilesNotice teacherFilesNotice);
@Select("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") public List<TeacherFilesNotice> selctTeacherByUserId(@Param("userId") Long userId, @Param("teacherFiles") TeacherFilesNotice teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId);
/** /**
* 修改教师档案通知 * 修改教师档案通知
......
...@@ -179,6 +179,13 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch ...@@ -179,6 +179,13 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch
nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime); nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime);
List<SchoolDcwjNr> nrs = nrMapper.selectList(nrlqw); List<SchoolDcwjNr> nrs = nrMapper.selectList(nrlqw);
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId)
;
//a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = anMapper.selectList(lqw);
//教师调查问卷回答的内容 //教师调查问卷回答的内容
for (SchoolDcwjAnVo anVo : list) { for (SchoolDcwjAnVo anVo : list) {
List<SchoolDcwjAn> ans = new ArrayList<>(); List<SchoolDcwjAn> ans = new ArrayList<>();
...@@ -187,19 +194,28 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch ...@@ -187,19 +194,28 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch
//获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值 //获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值
for(SchoolDcwjNr nr : nrs){ for(SchoolDcwjNr nr : nrs){
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw // lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId) // .eq(SchoolDcwjAn::getDcwjId, dcwjId)
.eq(SchoolDcwjAn::getRyId, anVo.getId()) // .eq(SchoolDcwjAn::getRyId, anVo.getId())
.eq(SchoolDcwjAn::getNrId, nr.getId()) // .eq(SchoolDcwjAn::getNrId, nr.getId())
; // ;
//a里要么有1个值,要么没有值 // //a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = anMapper.selectList(lqw); // List<SchoolDcwjAn> a = anMapper.selectList(lqw);
if(StringUtils.isNotNull(a) && a.size() > 0){
ans.add(a.get(0)); for (SchoolDcwjAn schoolDcwjAn : a) {
}else { if (schoolDcwjAn.getRyId().equals(anVo.getId()) && schoolDcwjAn.getNrId().equals(nr.getId())){
ans.add(entity); ans.add(schoolDcwjAn);
}else {
ans.add(entity);
}
} }
// if(StringUtils.isNotNull(a) && a.size() > 0){
// ans.add(a.get(0));
// }else {
// ans.add(entity);
// }
} }
anVo.setList(ans); anVo.setList(ans);
} }
...@@ -215,6 +231,13 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch ...@@ -215,6 +231,13 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch
nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime); nrlqw.eq(SchoolDcwjNr::getDcwjId, dcwjId).orderByAsc(SchoolDcwjNr::getNrPx).orderByDesc(SchoolDcwjNr::getCreateTime);
List<SchoolDcwjNr> nrs = nrMapper.selectList(nrlqw); List<SchoolDcwjNr> nrs = nrMapper.selectList(nrlqw);
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId)
;
//a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = anMapper.selectList(lqw);
//学生家长调查问卷回答的内容 //学生家长调查问卷回答的内容
for (SchoolDcwjAnVo anVo : list) { for (SchoolDcwjAnVo anVo : list) {
List<SchoolDcwjAn> ans = new ArrayList<>(); List<SchoolDcwjAn> ans = new ArrayList<>();
...@@ -223,19 +246,28 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch ...@@ -223,19 +246,28 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch
//获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值 //获取该学生从第一题到最后一题的答案,如果当前题没有答案,,附空值
for(SchoolDcwjNr nr : nrs){ for(SchoolDcwjNr nr : nrs){
LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<SchoolDcwjAn> lqw = new LambdaQueryWrapper<>();
lqw // lqw
.eq(SchoolDcwjAn::getDcwjId, dcwjId) // .eq(SchoolDcwjAn::getDcwjId, dcwjId)
.eq(SchoolDcwjAn::getRyId, anVo.getId()) // .eq(SchoolDcwjAn::getRyId, anVo.getId())
.eq(SchoolDcwjAn::getNrId, nr.getId()) // .eq(SchoolDcwjAn::getNrId, nr.getId())
; // ;
//a里要么有1个值,要么没有值 // //a里要么有1个值,要么没有值
List<SchoolDcwjAn> a = anMapper.selectList(lqw); // List<SchoolDcwjAn> a = anMapper.selectList(lqw);
if(StringUtils.isNotNull(a) && a.size() > 0){
ans.add(a.get(0)); for (SchoolDcwjAn schoolDcwjAn : a) {
}else { if (schoolDcwjAn.getRyId().equals(anVo.getId()) && schoolDcwjAn.getNrId().equals(nr.getId())){
ans.add(entity); ans.add(schoolDcwjAn);
}else {
ans.add(entity);
}
} }
// if(StringUtils.isNotNull(a) && a.size() > 0){
// ans.add(a.get(0));
// }else {
// ans.add(entity);
// }
} }
anVo.setList(ans); anVo.setList(ans);
} }
...@@ -2060,4 +2092,14 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch ...@@ -2060,4 +2092,14 @@ public class SchoolDcwjRyServiceImpl extends ServiceImpl<SchoolDcwjRyMapper, Sch
} }
return list; return list;
} }
@Override
public List<SchoolDcwjAnVo> getTeaAnData(Long dcwjId, SchoolDcwjAnVo vo) {
return schoolDcwjRyMapper.getTeaAnData(dcwjId,vo);
}
@Override
public List<SchoolDcwjAnVo> getAnData1(Long dcwjId, SchoolDcwjAnVo vo) {
return schoolDcwjRyMapper.getAnData(dcwjId,vo);
}
} }
...@@ -50,6 +50,10 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -50,6 +50,10 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
public SchoolCirculationVo getSchoolCirculationVoByenCode(String enCode) { public SchoolCirculationVo getSchoolCirculationVoByenCode(String enCode) {
return circulationMapper.getSchoolCirculationVoByenCode(enCode); return circulationMapper.getSchoolCirculationVoByenCode(enCode);
} }
@Override
public SchoolCirculationVo getReturningEquipmentById(String id) {
return circulationMapper.getReturningEquipmentById(id);
}
/** /**
...@@ -101,6 +105,9 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -101,6 +105,9 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
public int insertSchoolCirculation(SchoolCirculation schoolCirculation) { public int insertSchoolCirculation(SchoolCirculation schoolCirculation) {
//判断该设备是否允许借出 //判断该设备是否允许借出
SchoolEquipmentLedger schoolEquipmentLedger1 = equipmentLedgerMapper.selectById(schoolCirculation.getEquipmentId()); SchoolEquipmentLedger schoolEquipmentLedger1 = equipmentLedgerMapper.selectById(schoolCirculation.getEquipmentId());
if (StringUtils.isNull(schoolEquipmentLedger1)){
throw new ServiceException("未查询到该设备,请重新输入!");
}
if (schoolEquipmentLedger1.getIsAllowLend().equals("0")){ if (schoolEquipmentLedger1.getIsAllowLend().equals("0")){
throw new ServiceException("该设备不允许借出"); throw new ServiceException("该设备不允许借出");
} }
......
...@@ -19,8 +19,10 @@ import yangtz.cs.liu.campus.mapper.schoolEquipment.*; ...@@ -19,8 +19,10 @@ import yangtz.cs.liu.campus.mapper.schoolEquipment.*;
import yangtz.cs.liu.campus.service.schoolEquipment.IEquipmentLedgerService; import yangtz.cs.liu.campus.service.schoolEquipment.IEquipmentLedgerService;
import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentLedgerVo; import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentLedgerVo;
import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -223,16 +225,6 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe ...@@ -223,16 +225,6 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
}else if(schoolEquipmentLedger.getClassificationCode().length() < 4){ }else if(schoolEquipmentLedger.getClassificationCode().length() < 4){
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、分类编码长度最少为4位,请你核对后重新输入!"); failureMsg.append("<br/>" + failureNum + "、分类编码长度最少为4位,请你核对后重新输入!");
}else if(StringUtils.isNotNull(schoolEquipmentLedger.getClassificationCode())){
//查询分类编码是否重复
LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolProductCategory::getClassificationCode,schoolEquipmentLedger.getClassificationCode())
.eq(SchoolProductCategory::getDelFlag,"0");
List<SchoolProductCategory> schoolProductCategories = productCategoryMapper.selectList(wrapper);
if (schoolProductCategories.size()<=0) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、分类编码不存在,请你重新输入!");
}
}else if (StringUtils.isNull(schoolEquipmentLedger.getUnit())){ }else if (StringUtils.isNull(schoolEquipmentLedger.getUnit())){
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、单位为空,请你重新输入!"); failureMsg.append("<br/>" + failureNum + "、单位为空,请你重新输入!");
...@@ -260,6 +252,31 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe ...@@ -260,6 +252,31 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
}else if (StringUtils.isNull(schoolEquipmentLedger.getPlace())){ }else if (StringUtils.isNull(schoolEquipmentLedger.getPlace())){
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、地点为空,请你重新输入!"); failureMsg.append("<br/>" + failureNum + "、地点为空,请你重新输入!");
}else {
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date dateOfProduction = schoolEquipmentLedger.getDateOfProduction();
sdf.format(dateOfProduction);
} catch (Exception e) {
throw new ServiceException("格式不对,请检查日期格式");
}
try {
Integer.parseInt(schoolEquipmentLedger.getPlace());
throw new ServiceException("地点输入错误,请重新输入!");
} catch (NumberFormatException e) {
e.printStackTrace();
}
}
if(StringUtils.isNotNull(schoolEquipmentLedger.getClassificationCode())){
//查询分类编码是否重复
LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolProductCategory::getClassificationCode,schoolEquipmentLedger.getClassificationCode())
.eq(SchoolProductCategory::getDelFlag,"0");
List<SchoolProductCategory> schoolProductCategories = productCategoryMapper.selectList(wrapper);
if (schoolProductCategories.size()<=0) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、分类编码不存在,请你重新输入!");
}
} }
} }
if (failureNum > 0) { if (failureNum > 0) {
...@@ -276,4 +293,14 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe ...@@ -276,4 +293,14 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
public List<Map<String, Object>> getUser(SysUser sysUser) { public List<Map<String, Object>> getUser(SysUser sysUser) {
return equipmentLedgerMapper.getUser(sysUser); return equipmentLedgerMapper.getUser(sysUser);
} }
/**
* 打印设备条码信息
* @param ids
* @return
*/
@Override
public List<Map<String, Object>> getEquipmentledger(Long[] ids) {
return equipmentLedgerMapper.getEquipmentledger(ids);
}
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
...@@ -144,7 +145,11 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe ...@@ -144,7 +145,11 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
@Override @Override
public Map<String, String> getEquipment(String encode) { public Map<String, String> getEquipment(String encode) {
// Long userId = SecurityUtils.getLoginUser().getUser().getUserId(); // Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
return equipmentRepairMapper.getEquipment(encode); Map<String, String> equipment = equipmentRepairMapper.getEquipment(encode);
if (StringUtils.isNull(equipment)){
throw new ServiceException("未查询到设备信息,请重新输入设备编号!");
}
return equipment;
} }
/** /**
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
...@@ -71,6 +72,14 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive ...@@ -71,6 +72,14 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
*/ */
@Override @Override
public int insertSchoolReceive(SchoolReceive schoolReceive) { public int insertSchoolReceive(SchoolReceive schoolReceive) {
//判断该设备是否允许借出
SchoolEquipmentLedger schoolEquipmentLedger1 = equipmentLedgerMapper.selectById(schoolReceive.getEquipmentId());
if (StringUtils.isNull(schoolEquipmentLedger1)){
throw new ServiceException("未查询到该设备,请重新输入!");
}
if (schoolEquipmentLedger1.getIsAllowLend().equals("0")){
throw new ServiceException("该设备不允许借出");
}
if (StringUtils.isNotNull(schoolReceive.getRecipientById())){ if (StringUtils.isNotNull(schoolReceive.getRecipientById())){
String userName = sysUserMapper.selectUserById(schoolReceive.getRecipientById()).getUserName(); String userName = sysUserMapper.selectUserById(schoolReceive.getRecipientById()).getUserName();
schoolReceive.setRecipientBy(userName); schoolReceive.setRecipientBy(userName);
......
...@@ -10,9 +10,12 @@ import com.ruoyi.system.mapper.SysUserMapper; ...@@ -10,9 +10,12 @@ import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabClassYearMapper;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolLabMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -33,6 +36,8 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -33,6 +36,8 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Autowired
private SchoolLabClassYearMapper schoolLabClassYearMapper;
/** /**
* 查询实验室 * 查询实验室
* *
......
...@@ -139,8 +139,8 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta ...@@ -139,8 +139,8 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta
} }
boolean isMerge = isMergedRegion(sheet, i, 0); boolean isMerge = isMergedRegion(sheet, i, 0);
//schoolBudgetDetails.setBudgetDetailed(row.getCell(6).getStringCellValue()); //schoolBudgetDetails.setBudgetDetailed(row.getCell(6).getStringCellValue());
schoolBudgetDetails.setBudgetDetailed(TemplateExcelUtils.getCellValue(row.getCell(6), workbook)); schoolBudgetDetails.setBudgetDetailed(TemplateExcelUtils.getCellValue(row.getCell(7), workbook));
schoolBudgetDetails.setMoneyDetailed(new BigDecimal(new DataFormatter().formatCellValue(row.getCell(7)))); schoolBudgetDetails.setMoneyDetailed(new BigDecimal(new DataFormatter().formatCellValue(row.getCell(8))));
if(isMerge){ //如果是合并单元格 if(isMerge){ //如果是合并单元格
isSameCell = isSameMergeRegion(sheet,i,0); //判断与上一行是否为同一单元格 isSameCell = isSameMergeRegion(sheet,i,0); //判断与上一行是否为同一单元格
if(!isSameCell){ if(!isSameCell){
...@@ -157,14 +157,14 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta ...@@ -157,14 +157,14 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta
schoolBudget.setBudgetName(budgetName); schoolBudget.setBudgetName(budgetName);
giveMoney = getMergedRegionValue(sheet, row.getRowNum(), 3); giveMoney = getMergedRegionValue(sheet, row.getRowNum(), 3);
schoolBudget.setGiveMoney(new BigDecimal(giveMoney)); schoolBudget.setGiveMoney(new BigDecimal(giveMoney));
isGov = getMergedRegionValue(sheet, row.getRowNum(), 4); isGov = getMergedRegionValue(sheet, row.getRowNum(), 5);
if(isGov.equals("是")){ if(isGov.equals("是")){
schoolBudget.setIsGov("0"); schoolBudget.setIsGov("0");
} }
if(isGov.equals("否")){ if(isGov.equals("否")){
schoolBudget.setIsGov("1"); schoolBudget.setIsGov("1");
} }
remark = getMergedRegionValue(sheet, row.getRowNum(), 5); remark = getMergedRegionValue(sheet, row.getRowNum(), 6);
schoolBudget.setRemark(remark); schoolBudget.setRemark(remark);
schoolBudgetMapper.insert(schoolBudget); schoolBudgetMapper.insert(schoolBudget);
budgetId = schoolBudget.getId(); budgetId = schoolBudget.getId();
...@@ -182,14 +182,14 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta ...@@ -182,14 +182,14 @@ public class SchoolBudgetDetailsServiceImpl extends ServiceImpl<SchoolBudgetDeta
schoolBudget.setDeptId(deptId); schoolBudget.setDeptId(deptId);
schoolBudget.setBudgetName(new DataFormatter().formatCellValue(row.getCell(2))); schoolBudget.setBudgetName(new DataFormatter().formatCellValue(row.getCell(2)));
schoolBudget.setGiveMoney(new BigDecimal(new DataFormatter().formatCellValue(row.getCell(3)))); schoolBudget.setGiveMoney(new BigDecimal(new DataFormatter().formatCellValue(row.getCell(3))));
isGov = new DataFormatter().formatCellValue(row.getCell(4)); isGov = new DataFormatter().formatCellValue(row.getCell(5));
if(isGov.equals("是")){ if(isGov.equals("是")){
schoolBudget.setIsGov("0"); schoolBudget.setIsGov("0");
} }
if(isGov.equals("否")){ if(isGov.equals("否")){
schoolBudget.setIsGov("1"); schoolBudget.setIsGov("1");
} }
schoolBudget.setRemark(new DataFormatter().formatCellValue(row.getCell(5))); schoolBudget.setRemark(new DataFormatter().formatCellValue(row.getCell(6)));
schoolBudgetMapper.insert(schoolBudget); schoolBudgetMapper.insert(schoolBudget);
schoolBudgetDetails.setBudgetId(schoolBudget.getId()); schoolBudgetDetails.setBudgetId(schoolBudget.getId());
schoolBudgetDetailsMapper.insert(schoolBudgetDetails); schoolBudgetDetailsMapper.insert(schoolBudgetDetails);
......
...@@ -116,15 +116,24 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S ...@@ -116,15 +116,24 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S
if (isNull(list) || list.size() == 0) { if (isNull(list) || list.size() == 0) {
return new ArrayList<>(); return new ArrayList<>();
} }
//获取所有学生家长
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw.orderByDesc(SchoolStudentParent::getCreateTime);
List<SchoolStudentParent> studentParentList = schoolStudentParentMapper.selectList(lqw);
for (SchoolStudentVO vo : list) { for (SchoolStudentVO vo : list) {
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolStudentParent::getStudentId, vo.getId()) // lqw.eq(SchoolStudentParent::getStudentId, vo.getId())
.orderByDesc(SchoolStudentParent::getCreateTime); // .orderByDesc(SchoolStudentParent::getCreateTime);
List<SchoolStudentParent> parentList = schoolStudentParentMapper.selectList(lqw); // List<SchoolStudentParent> parentList = schoolStudentParentMapper.selectList(lqw);
List<SchoolStudentParent> parentList = new ArrayList<>();
for (SchoolStudentParent studentParent : studentParentList) {
if (vo.getId().equals(studentParent.getStudentId())){
parentList.add(studentParent);
}
}
if (isNull(parentList) || parentList.size() == 0) { if (isNull(parentList) || parentList.size() == 0) {
continue; continue;
} }
//获取学生家长,至多2人 //获取学生家长,至多2人
int i = 1; int i = 1;
for (SchoolStudentParent parent : parentList) { for (SchoolStudentParent parent : parentList) {
...@@ -172,22 +181,46 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S ...@@ -172,22 +181,46 @@ public class SchoolStudentServiceImpl extends ServiceImpl<SchoolStudentMapper, S
List<SchoolStudentVO> list = new ArrayList<>(); List<SchoolStudentVO> list = new ArrayList<>();
List<SchoolStudent> studentList = schoolStudentMapper.selectBatchIds(ids); List<SchoolStudent> studentList = schoolStudentMapper.selectBatchIds(ids);
//获取所有班级
List<SchoolClass> schoolClasses = schoolClassMapper.selectList(new LambdaQueryWrapper<>());
//获取所有家长
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw.orderByDesc(SchoolStudentParent::getCreateTime);
List<SchoolStudentParent> studentParentList = schoolStudentParentMapper.selectList(lqw);
for (SchoolStudent student : studentList) { for (SchoolStudent student : studentList) {
SchoolStudentVO vo = new SchoolStudentVO(); SchoolStudentVO vo = new SchoolStudentVO();
BeanUtils.copyProperties(student, vo); BeanUtils.copyProperties(student, vo);
//学年年级班级 for (SchoolClass schoolClass : schoolClasses) {
SchoolClass theClass = schoolClassMapper.selectById(student.getClassId()); if (schoolClass.getId().equals(student.getClassId())){
if (isNotNull(theClass)) { vo.setSchoolYear(schoolClass.getSchoolYear());
vo.setSchoolYear(theClass.getSchoolYear()); vo.setGradeValue(schoolClass.getGradeValue());
vo.setGradeValue(theClass.getGradeValue()); vo.setClassValue(schoolClass.getClassValue());
vo.setClassValue(theClass.getClassValue()); }
} }
// //学年年级班级
// SchoolClass theClass = schoolClassMapper.selectById(student.getClassId());
// if (isNotNull(theClass)) {
// vo.setSchoolYear(theClass.getSchoolYear());
// vo.setGradeValue(theClass.getGradeValue());
// vo.setClassValue(theClass.getClassValue());
// }
//家长信息 //家长信息
LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<SchoolStudentParent> lqw = new LambdaQueryWrapper<>();
lqw.eq(SchoolStudentParent::getStudentId, student.getId()) // lqw.eq(SchoolStudentParent::getStudentId, student.getId())
.orderByDesc(SchoolStudentParent::getCreateTime); // .orderByDesc(SchoolStudentParent::getCreateTime);
List<SchoolStudentParent> parentList = schoolStudentParentMapper.selectList(lqw); // List<SchoolStudentParent> parentList = schoolStudentParentMapper.selectList(lqw);
List<SchoolStudentParent> parentList = new ArrayList<>();
for (SchoolStudentParent studentParent : studentParentList) {
if (vo.getId().equals(studentParent.getStudentId())){
parentList.add(studentParent);
}
}
if (isNull(parentList) || parentList.size() == 0) { if (isNull(parentList) || parentList.size() == 0) {
list.add(vo); list.add(vo);
continue; continue;
......
...@@ -16,6 +16,7 @@ import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherWagesMapper; ...@@ -16,6 +16,7 @@ import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherWagesMapper;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherWagesService; import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherWagesService;
import yangtz.cs.liu.campus.vo.student.SchoolTeacherWagesVO; import yangtz.cs.liu.campus.vo.student.SchoolTeacherWagesVO;
import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -123,7 +124,7 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -123,7 +124,7 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
public int insertByTeacherId(Long teacherId,SchoolTeacherWages schoolTeacherWages) { public int insertByTeacherId(Long teacherId,SchoolTeacherWages schoolTeacherWages) {
SchoolTeacher schoolTeacher = schoolTeacherMapper.selectById(teacherId); SchoolTeacher schoolTeacher = schoolTeacherMapper.selectById(teacherId);
schoolTeacherWages.setTeacherName(schoolTeacher.getTeacherName()); schoolTeacherWages.setTeacherName(schoolTeacher.getTeacherName());
schoolTeacherWages.setIdCard(schoolTeacher.getIdCard()); schoolTeacherWages.setTeacherTel(schoolTeacher.getTeacherTel());
return schoolTeacherWagesMapper.insert(schoolTeacherWages); return schoolTeacherWagesMapper.insert(schoolTeacherWages);
} }
...@@ -143,12 +144,10 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -143,12 +144,10 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) { if (StringUtils.isEmpty(schoolTeacherWages.getTeacherName())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! "); failureMsg.append("<br/>" + failureNum + "、教师姓名为空,请您重新输入! ");
} } else if (StringUtils.isEmpty(schoolTeacherWages.getTeacherTel())) {
// else if (StringUtils.isEmpty(schoolTeacherWages.getIdCard())) { failureNum++;
// failureNum++; failureMsg.append("<br/>" + failureNum + "、教师联系方式为空,请您重新输入! ");
// failureMsg.append("<br/>" + failureNum + "、身份证号为空,请您重新输入! "); } else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
// }
else if (StringUtils.isNull(schoolTeacherWages.getWagesTime())) {
failureNum++; failureNum++;
failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!"); failureMsg.append("<br/>" + failureNum + "、工资日期为空,请您重新输入!");
} else if (isNotNull(schoolTeacherWages.getWagesTime())) { } else if (isNotNull(schoolTeacherWages.getWagesTime())) {
...@@ -159,15 +158,62 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -159,15 +158,62 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException("格式不对,请检查日期格式"); throw new ServiceException("格式不对,请检查日期格式");
} }
}
// else {
// LambdaQueryWrapper<SchoolTeacherWages> lqw = new LambdaQueryWrapper<>();
// lqw
// .eq(SchoolTeacherWages::getTeacherTel, schoolTeacherWages.getTeacherTel());
// SchoolTeacherWages teacherWages = schoolTeacherWagesMapper.selectOne(lqw);
// if (isNull(teacherWages)){
// failureNum++;
// failureMsg.append("<br/>" + failureNum + "、该老师不存在,请您重新输入! ");
// }
// }
if (StringUtils.isNull(schoolTeacherWages.getBasePay())) {
schoolTeacherWages.setBasePay(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getBonus())) {
schoolTeacherWages.setBonus(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getPension())) {
schoolTeacherWages.setPension(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getAccumulationFund())) {
schoolTeacherWages.setAccumulationFund(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getMedicalInsurance())) {
schoolTeacherWages.setMedicalInsurance(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getFareSubsidy())) {
schoolTeacherWages.setFareSubsidy(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getTelephoneSubsidy())) {
schoolTeacherWages.setTelephoneSubsidy(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getMealAllowance())) {
schoolTeacherWages.setMealAllowance(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getIncomeTax())) {
schoolTeacherWages.setIncomeTax(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getUnemploymentBenefits())) {
schoolTeacherWages.setUnemploymentBenefits(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getOvertimePay())) {
schoolTeacherWages.setOvertimePay(new BigDecimal(0));
}
if (StringUtils.isNull(schoolTeacherWages.getRemarks())) {
schoolTeacherWages.setRemarks("");
}
LambdaQueryWrapper<SchoolTeacher> lqw = new LambdaQueryWrapper<>();
lqw
.eq(SchoolTeacher::getTeacherTel, schoolTeacherWages.getTeacherTel());
SchoolTeacher schoolTeacher = schoolTeacherMapper.selectOne(lqw);
if (isNull(schoolTeacher)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、该老师不存在,请您重新输入! ");
}else { }else {
LambdaQueryWrapper<SchoolTeacherWages> lqw = new LambdaQueryWrapper<>(); schoolTeacherWages.setTeacherId(schoolTeacher.getId());
lqw
.eq(SchoolTeacherWages::getIdCard, schoolTeacherWages.getIdCard());
SchoolTeacherWages teacherWages = schoolTeacherWagesMapper.selectOne(lqw);
if (isNull(teacherWages)){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、该老师不存在,请您重新输入! ");
}
} }
} }
if (failureNum > 0) { if (failureNum > 0) {
...@@ -186,16 +232,19 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage ...@@ -186,16 +232,19 @@ public class SchoolTeacherWagesServiceImpl extends ServiceImpl<SchoolTeacherWage
// 准备记录日志数据 // 准备记录日志数据
int successNum = 0; int successNum = 0;
StringBuilder successMsg = new StringBuilder(); StringBuilder successMsg = new StringBuilder();
for (SchoolTeacherWages schoolTeacherWages : list) {
try { schoolTeacherWagesMapper.batchInsertTeacherWages(list);
schoolTeacherWagesMapper.insert(schoolTeacherWages);
successNum++; // for (SchoolTeacherWages schoolTeacherWages : list) {
successMsg.append("<br/>" + successNum + "数据" + " 导入成功"); // try {
} catch (Exception e) { // schoolTeacherWagesMapper.insert(schoolTeacherWages);
throw new ServiceException("导入失败"); // successNum++;
} // successMsg.append("<br/>" + successNum + "数据" + " 导入成功");
} // } catch (Exception e) {
successMsg.insert(0, "恭喜您,数据已导入成功!共有 " + successNum + " 条,数据如下:"); // throw new ServiceException("导入失败");
// }
// }
successMsg.insert(0, "恭喜您,数据已导入成功!");
return successMsg.toString(); return successMsg.toString();
} }
......
package yangtz.cs.liu.campus.service.impl.teacherFiles; package yangtz.cs.liu.campus.service.impl.teacherFiles;
import com.ruoyi.common.core.domain.entity.SchoolTeacher;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.TermRange; import com.ruoyi.common.utils.TermRange;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.award.Award; import yangtz.cs.liu.campus.domain.award.Award;
import yangtz.cs.liu.campus.domain.material.Material; import yangtz.cs.liu.campus.domain.material.Material;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClass;
import yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor;
import yangtz.cs.liu.campus.domain.teacherFiles.*; import yangtz.cs.liu.campus.domain.teacherFiles.*;
import yangtz.cs.liu.campus.domain.thesis.Thesis; import yangtz.cs.liu.campus.domain.thesis.Thesis;
import yangtz.cs.liu.campus.domain.training.Training; import yangtz.cs.liu.campus.domain.training.Training;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper;
import yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMentorMapper;
import yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper;
import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherMapper;
import yangtz.cs.liu.campus.mapper.teacherFiles.*; import yangtz.cs.liu.campus.mapper.teacherFiles.*;
import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService; import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesService;
import yangtz.cs.liu.wechat.vo.schoolClass.SchoolClassVo;
import java.util.HashMap; import java.text.SimpleDateFormat;
import java.util.List; import java.util.*;
import java.util.Map;
/** /**
...@@ -44,7 +52,18 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -44,7 +52,18 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Autowired @Autowired
private TeacherFilesNoticeMapper teacherFilesNoticeMapper; private TeacherFilesNoticeMapper teacherFilesNoticeMapper;
@Autowired
private TeacherFilesDeletRecordMapper teacherFilesDeletRecordMapper;
@Autowired
private SchoolClassMapper schoolClassMapper;
@Autowired
private SchoolTeacherMapper schoolTeacherMapper;
@Autowired
private SchoolGradeMapper gradeMapper;
@Autowired
private SchoolClassMentorMapper classMentorMapper;
/** /**
* 查询教师档案 * 查询教师档案
* *
...@@ -76,8 +95,8 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -76,8 +95,8 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Override @Override
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId) { public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles) {
return teacherFilesNoticeMapper.selctTeacherByUserId(userId); return teacherFilesNoticeMapper.selctTeacherByUserId(userId,teacherFiles);
} }
/** /**
...@@ -113,7 +132,91 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -113,7 +132,91 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
@Override @Override
public int deleteTeacherFilesByIds(Long[] ids) public int deleteTeacherFilesByIds(Long[] ids)
{ {
return teacherFilesMapper.deleteTeacherFilesByIds(ids); //1.保留人员到删除信息表中
for (int i=0 ; i < ids.length ;i++){
TeacherFilesVO teacherFilesVO = teacherFilesMapper.selectTeacherFilesById(ids[i]);
TeacherFilesDeletRecord teacherFilesDeletRecord = new TeacherFilesDeletRecord();
teacherFilesDeletRecord.setTel(teacherFilesVO.getIdCard() == null ? "" : teacherFilesVO.getIdCard());
teacherFilesDeletRecord.setUserName(teacherFilesVO.getTeacherName());
teacherFilesDeletRecord.setGruoName(teacherFilesVO.getGradeName());
teacherFilesDeletRecord.setUserId(teacherFilesVO.getTeacherId());
teacherFilesDeletRecord.setTId(teacherFilesVO.getNoticeId());
teacherFilesDeletRecord.setGId(teacherFilesVO.getGradeId());
teacherFilesDeletRecordMapper.addTeacherFilesDeletRecord(teacherFilesDeletRecord);
}
//2.删除人员
int i = teacherFilesMapper.deleteTeacherFilesByIds(ids);
return i;
}
/**
* 查询老师
* @param tId
* @return
*/
@Override
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId) {
List<TeacherFilesDeletRecord> teacherRocer = teacherFilesDeletRecordMapper.getTeacherRocer(tId);
return teacherRocer;
}
/**
* 新增老师数据
* @param ids
* @return
*/
@Override
public Integer teacherAdd(Long[] ids) {
List<TeacherFiles> teacherFilesList = new ArrayList<>();
for (int i =0; i< ids.length ;i++){
TeacherFilesDeletRecord byid = teacherFilesDeletRecordMapper.getByid(ids[i]);
TeacherFilesNotice teacherFilesNotice = teacherFilesNoticeMapper.selectTeacherFilesNoticeById(byid.getTId().toString());
List<SchoolClassVo> schoolClassVos = schoolClassMapper.selectTeacherByTeachId(byid.getUserId());
String teahClassName = null;
String className = null;
//只取第一个
if (!schoolClassVos.isEmpty()){
teahClassName = schoolClassVos.get(0).getClassName();
className = schoolClassVos.get(0).getClassName();
}
//班主任信息
TeacherFiles teacherFiles = new TeacherFiles();
teacherFiles.setTeacherId(byid.getUserId());
teacherFiles = teacherFilesAddXx(teacherFiles);
teacherFiles.setNoticeId(byid.getTId().toString());
teacherFiles.setFilesSemester(teacherFilesNotice.getNoticeYear()+"学年"+teacherFilesNotice.getNoticeSemester());
teacherFiles.setGradeId(byid.getGId());
teacherFiles.setGradeName(byid.getGruoName());
teacherFiles.setBzrClassName(teahClassName);
teacherFiles.setState("2");
teacherFiles = teacherFilesAddXx(teacherFiles); //老师个人信息
//找到老师课程
// TODO 修改最新学年
int schoolYear = gradeMapper.isNewSchoolYear();
List<SchoolClassMentor> mentorByTeacherId = classMentorMapper.getMentorByTeacherId(byid.getUserId(), schoolYear);
if (!mentorByTeacherId.isEmpty()){
teacherFiles.setCourseName(mentorByTeacherId.get(0).getCourseName());
if (StringUtils.isEmpty(className)){
//根据课程关联找寻班级
SchoolClass schoolClass = schoolClassMapper.selectById(mentorByTeacherId.get(0).getClassId());
className = schoolClass.getClassName();
}
}
teacherFiles.setClassName(className);
teacherFilesList.add(teacherFiles);
teacherFilesDeletRecordMapper.deletRecord(ids[i]);
}
//导入数据库
teacherFilesList.forEach(date->{
teacherFilesMapper.insertTeacherFiles(date);
});
//删除id
return 1;
} }
/** /**
...@@ -185,4 +288,24 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService ...@@ -185,4 +288,24 @@ public class TeacherFilesServiceImpl implements ITeacherFilesService
public List<Long> getGradeId(Long teacherId) { public List<Long> getGradeId(Long teacherId) {
return teacherFilesMapper.getGradeId(teacherId); return teacherFilesMapper.getGradeId(teacherId);
} }
TeacherFiles teacherFilesAddXx(TeacherFiles teacherFiles){
SchoolTeacher schoolTeacher = schoolTeacherMapper.selectSchoolTeacherById(teacherFiles.getTeacherId());
teacherFiles.setTeacherName(schoolTeacher.getTeacherName());
teacherFiles.setIdCard(schoolTeacher.getIdCard());
teacherFiles.setSex(schoolTeacher.getSex());
teacherFiles.setEducation(schoolTeacher.getEducation());
Date birthday = schoolTeacher.getBirthday();
if(birthday!=null){
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy");
Integer birthdayYear = Integer.valueOf(dateFormat.format(birthday));
Date date = new Date();
Integer nowYear = Integer.valueOf(dateFormat.format(date));
teacherFiles.setAge(nowYear-birthdayYear);
}
teacherFiles.setTitle("");
teacherFiles.setAppearance("");
return teacherFiles;
}
} }
...@@ -91,4 +91,8 @@ public interface ISchoolDcwjRyService extends IService<SchoolDcwjRy> ...@@ -91,4 +91,8 @@ public interface ISchoolDcwjRyService extends IService<SchoolDcwjRy>
//班主任-问卷结果-统计 //班主任-问卷结果-统计
public List<DataCountVo> getHeaderCount(Long id,List<Long> studentIds); public List<DataCountVo> getHeaderCount(Long id,List<Long> studentIds);
List<SchoolDcwjAnVo> getTeaAnData(Long dcwjId, SchoolDcwjAnVo vo);
List<SchoolDcwjAnVo> getAnData1(Long dcwjId, SchoolDcwjAnVo vo);
} }
...@@ -15,6 +15,9 @@ public interface ICirculationService extends IService<SchoolCirculation> { ...@@ -15,6 +15,9 @@ public interface ICirculationService extends IService<SchoolCirculation> {
SchoolCirculationVo getSchoolCirculationVoById(Long id); SchoolCirculationVo getSchoolCirculationVoById(Long id);
SchoolCirculationVo getSchoolCirculationVoByenCode(String enCode); SchoolCirculationVo getSchoolCirculationVoByenCode(String enCode);
SchoolCirculationVo getReturningEquipmentById(String id);
/** /**
* 查看设备借出归还列表 * 查看设备借出归还列表
* @param schoolCirculationVo * @param schoolCirculationVo
......
...@@ -70,4 +70,10 @@ public interface IEquipmentLedgerService extends IService<SchoolEquipmentLedger> ...@@ -70,4 +70,10 @@ public interface IEquipmentLedgerService extends IService<SchoolEquipmentLedger>
*/ */
List<Map<String,Object>> getUser(SysUser sysUser); List<Map<String,Object>> getUser(SysUser sysUser);
/**
* 打印设备条码信息
* @param ids
* @return
*/
List<Map<String, Object>> getEquipmentledger(Long[] ids);
} }
package yangtz.cs.liu.campus.service.teacherFiles; package yangtz.cs.liu.campus.service.teacherFiles;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFiles;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesDeletRecord;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesNotice;
import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO; import yangtz.cs.liu.campus.domain.teacherFiles.TeacherFilesVO;
...@@ -29,7 +30,15 @@ public interface ITeacherFilesService ...@@ -29,7 +30,15 @@ public interface ITeacherFilesService
* @return 教师档案集合 * @return 教师档案集合
*/ */
public List<TeacherFiles> selectTeacherFilesList(TeacherFiles teacherFiles); public List<TeacherFiles> selectTeacherFilesList(TeacherFiles teacherFiles);
public List<TeacherFilesNotice> selctTeacherByUserId(Long userId); public List<TeacherFilesNotice> selctTeacherByUserId(Long userId,TeacherFilesNotice teacherFiles);
public List<TeacherFilesDeletRecord> getTeacherRocer(String tId);
/**
* 新增教师档案
* @param ids
* @return
*/
public Integer teacherAdd(Long[] ids);
/** /**
* 新增教师档案 * 新增教师档案
......
...@@ -86,13 +86,12 @@ public class SchoolCirculationVo extends BaseEntity ...@@ -86,13 +86,12 @@ public class SchoolCirculationVo extends BaseEntity
/** 预计使用时间 */ /** 预计使用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "预计使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "预计使用期限", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date yjuseTime; private Date yjuseTime;
/** 实际使用时间 */ /** 实际使用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "实际使用时间")
@Excel(name = "实际使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private String sjuseTime;
private Date sjuseTime;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
......
package yangtz.cs.liu.campus.vo.schoolEquipment;
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 com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 设备台账对象 school_equipment_ledger
*
* @author ruoyi
* @date 2023-08-09
*/
@Data
public class SchoolEquipmentLedgerDcVo extends OurBaseEntity
{
@Excel(name = "序号")
private Integer serialNumber;
/** 自编码 */
@Excel(name = "设备名称")
private String encode;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipmentName;
/** 型号 */
@Excel(name = "型号")
private String model;
/** 规格 */
@Excel(name = "规格")
private String specification;
/** 分类编码 */
@Excel(name = "分类编码")
private String classificationCode;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 归属类型(1公共区域,2信息中心,3个人) */
@Excel(name = "归属类型", readConverterExp = "1=公共区域,2=信息中心,3=个人", combo = {"公共区域","信息中心","个人"})
private String affiliationType;
/** 设备状态(1完好,2损坏,3报废) */
@Excel(name = "设备状态", readConverterExp = "1=完好,2=损坏,3=报废", combo = {"完好","损坏","报废"})
private String equipmentState;
/** 是否允许借出(1是,0否) */
@Excel(name = "是否允许借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isAllowLend;
/** 是否已借出(1是,0否) */
@Excel(name = "是否已借出", readConverterExp = "1=是,0=否", combo = {"是","否"})
private String isLend;
/** 投产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "投产日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date dateOfProduction;
/** 价格 */
@Excel(name = "价格(元)")
private BigDecimal price;
/** 效用年限(年) */
@Excel(name = "效用年限(年)")
private String lifeOfUtility;
/** 地点 */
@Excel(name = "地点")
private String place;
/** 使用人id */
@TableField(fill = FieldFill.UPDATE)
private Long useId;
/** 使用人 */
@TableField(fill = FieldFill.UPDATE)
@Excel(name = "使用人")
private String useName;
/** 备注 */
@Excel(name = "备注")
private String remark;
}
...@@ -104,6 +104,7 @@ public class StudentLeaveVO extends ProcessBaseEntity { ...@@ -104,6 +104,7 @@ public class StudentLeaveVO extends ProcessBaseEntity {
private String handUserName; private String handUserName;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
......
...@@ -93,7 +93,7 @@ public class EquipmentLeaseController { ...@@ -93,7 +93,7 @@ public class EquipmentLeaseController {
calendar.add(Calendar.DATE,Integer.valueOf(deadline.toString())); calendar.add(Calendar.DATE,Integer.valueOf(deadline.toString()));
Date targetDate = calendar.getTime(); Date targetDate = calendar.getTime();
schoolCirculation.setReturnState("0"); schoolCirculation.setReturnState("0");
schoolCirculation.setReturnTime(targetDate); schoolCirculation.setYjuseTime(targetDate);
boolean save = iCirculationService.save(schoolCirculation); boolean save = iCirculationService.save(schoolCirculation);
//修改设备表借出状态 //修改设备表借出状态
SchoolEquipmentLedger byId = iEquipmentService.getById(schoolCirculation.getEquipmentId()); SchoolEquipmentLedger byId = iEquipmentService.getById(schoolCirculation.getEquipmentId());
...@@ -258,29 +258,37 @@ public class EquipmentLeaseController { ...@@ -258,29 +258,37 @@ public class EquipmentLeaseController {
* 管理员查看详情 * 管理员查看详情
*/ */
@GetMapping("/getReturningEquipmentByList/{encode}") @GetMapping("/getReturningEquipmentByList/{encode}")
private AjaxResult getReturningEquipmentByList(@PathVariable("encode") String encode){ private AjaxResult getReturningEquipmentByList(@PathVariable("encode") String encode) {
SchoolCirculationVo schoolCirculationVo = new SchoolCirculationVo(); SchoolCirculationVo schoolCirculationVo = new SchoolCirculationVo();
//先查询物品表有没有借出去 //先查询物品表有没有借出去
LambdaQueryWrapper<SchoolEquipmentLedger> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolEquipmentLedger> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolEquipmentLedger::getEncode,encode); wrapper.eq(SchoolEquipmentLedger::getEncode, encode);
SchoolEquipmentLedger one = iEquipmentService.getOne(wrapper); SchoolEquipmentLedger one = iEquipmentService.getOne(wrapper);
if (one.getIsLend().equals("0")){ if (one.getIsLend().equals("0")) {
//未借出 //未借出
schoolCirculationVo.setEquipmentId(one.getId()); schoolCirculationVo.setEquipmentId(one.getId());
schoolCirculationVo.setEquipmentName(one.getEquipmentName()); schoolCirculationVo.setEquipmentName(one.getEquipmentName());
schoolCirculationVo.setModel(one.getModel()); schoolCirculationVo.setModel(one.getModel());
schoolCirculationVo.setIsLend(one.getIsLend()); schoolCirculationVo.setIsLend(one.getIsLend());
return AjaxResult.success(schoolCirculationVo); return AjaxResult.success(schoolCirculationVo);
}else { } else {
//已借出 //已借出
SchoolCirculationVo schoolCirculationVoByenCode = iCirculationService SchoolCirculationVo schoolCirculationVoByenCode = iCirculationService
.getSchoolCirculationVoByenCode(encode); .getSchoolCirculationVoByenCode(encode);
//根据管理员信息查看信息详情 //根据管理员信息查看信息详情
return AjaxResult.success(schoolCirculationVoByenCode); return AjaxResult.success(schoolCirculationVoByenCode);
}
}
}
@GetMapping("/getReturningEquipmentById/{id}")
public AjaxResult getReturningEquipmentById(@PathVariable("id") String id){
SchoolCirculationVo schoolCirculationVoByenCode = iCirculationService
.getReturningEquipmentById(id);
//根据管理员信息查看信息详情
return AjaxResult.success(schoolCirculationVoByenCode);
} }
/** /**
* 管理员归还操作 * 管理员归还操作
*/ */
...@@ -291,6 +299,7 @@ public class EquipmentLeaseController { ...@@ -291,6 +299,7 @@ public class EquipmentLeaseController {
//修改设备表借出状态 //修改设备表借出状态
SchoolEquipmentLedger byId = iEquipmentService.getById(schoolCirculation.getEquipmentId()); SchoolEquipmentLedger byId = iEquipmentService.getById(schoolCirculation.getEquipmentId());
byId.setIsLend("0"); byId.setIsLend("0");
byId.setEquipmentState(schoolCirculation.getReturnEquipmentCondition());
iEquipmentService.updateById(byId); iEquipmentService.updateById(byId);
return AjaxResult.success(b); return AjaxResult.success(b);
} }
......
...@@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController; ...@@ -5,6 +5,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -54,8 +55,12 @@ public class ExperimentAdministratorsControoler extends BaseController { ...@@ -54,8 +55,12 @@ public class ExperimentAdministratorsControoler extends BaseController {
@GetMapping("/classYear/list") @GetMapping("/classYear/list")
public AjaxResult classYearList(SchoolLabClassYearVo schoolLabClassYearVo) public AjaxResult classYearList(SchoolLabClassYearVo schoolLabClassYearVo)
{ {
schoolLabClassYearVo.setSub(schoolLabClassYearService.getSub()); schoolLabClassYearVo.setSub(schoolLabClassYearService.getSub());
List<String> listSt =new ArrayList<>();
listSt.add("1");
listSt.add("2");
listSt.add("3");
schoolLabClassYearVo.setDeclareStates(listSt);
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo)); return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYearVo));
} }
......
...@@ -8,9 +8,10 @@ import com.ruoyi.common.core.domain.entity.SysDept; ...@@ -8,9 +8,10 @@ import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import java.util.Calendar;
import java.util.List;
import java.util.*;
import com.ruoyi.framework.util.UserInfoUtil;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -20,6 +21,7 @@ import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; ...@@ -20,6 +21,7 @@ import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherLabApplyMapper;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassMentorService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolExperimentPlanService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
...@@ -30,6 +32,7 @@ import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo; ...@@ -30,6 +32,7 @@ import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* 实验室 级部申请 * 实验室 级部申请
...@@ -57,6 +60,11 @@ public class ExperimentLevelController extends BaseController { ...@@ -57,6 +60,11 @@ public class ExperimentLevelController extends BaseController {
@Autowired @Autowired
private ISysDeptService deptService; private ISysDeptService deptService;
@Autowired
UserInfoUtil userInfoUtil;
@Autowired
private ISchoolClassMentorService schoolClassMentorService;
/** /**
* 获取当前学年+学期 * 获取当前学年+学期
*/ */
...@@ -154,7 +162,17 @@ public class ExperimentLevelController extends BaseController { ...@@ -154,7 +162,17 @@ public class ExperimentLevelController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear) public AjaxResult list(SchoolLabClassYearVo schoolLabClassYear)
{ {
schoolLabClassYear.setApplyId(schoolLabClassYear.getUserId()); Long userId = userInfoUtil.getMpLoginUser().getUserId();
Long gradeId = schoolGradeService.getGradeId(userId);
//根据当前角色查看对应的学科
//获取学科
Map<String, String> map = schoolClassMentorService.selectTeacherGroupMentot(userId);
String s = map.get("courseId");
List<String> list = Arrays.asList(s.split(","));
List<String> myList = list.stream().distinct().collect(Collectors.toList());
List<String> strings = schoolLabClassYearService.convertMentor(myList);
schoolLabClassYear.setSubs(strings);
schoolLabClassYear.setGradeId(gradeId);
return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear)); return AjaxResult.success(schoolLabClassYearService.selectSchoolLabClassYearList(schoolLabClassYear));
} }
...@@ -205,6 +223,9 @@ public class ExperimentLevelController extends BaseController { ...@@ -205,6 +223,9 @@ public class ExperimentLevelController extends BaseController {
*/ */
@GetMapping("/getexperimentList") @GetMapping("/getexperimentList")
public AjaxResult getexperimentList(ClassSituationVo classSituationVo){ public AjaxResult getexperimentList(ClassSituationVo classSituationVo){
//获取管理员学科
String sub = schoolLabClassYearService.getSub();
classSituationVo.setSub(sub);
List<ClassSituationVo> classSituationVos = schoolLabClassYearService.getexperimentList( List<ClassSituationVo> classSituationVos = schoolLabClassYearService.getexperimentList(
classSituationVo); classSituationVo);
return AjaxResult.success(classSituationVos); return AjaxResult.success(classSituationVos);
......
...@@ -29,9 +29,7 @@ import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo; ...@@ -29,9 +29,7 @@ import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherLabApplyVo;
import java.util.Arrays; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -145,7 +143,10 @@ public class TeacherExperimentController extends BaseController { ...@@ -145,7 +143,10 @@ public class TeacherExperimentController extends BaseController {
*/ */
@GetMapping(value = "/list") @GetMapping(value = "/list")
public AjaxResult list(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo) public AjaxResult list(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo)
{ {
Long userId = userInfoUtil.getMpLoginUser().getUserId();
schoolTeacherLabApplyVo.setApplyId(userId);
return AjaxResult.success(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo)); return AjaxResult.success(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo));
} }
/** /**
...@@ -183,21 +184,25 @@ public class TeacherExperimentController extends BaseController { ...@@ -183,21 +184,25 @@ public class TeacherExperimentController extends BaseController {
@GetMapping("/getSubject") @GetMapping("/getSubject")
public AjaxResult getSubject(){ public AjaxResult getSubject(){
Long userId = userInfoUtil.getMpLoginUser().getUserId(); Long userId = userInfoUtil.getMpLoginUser().getUserId();
List<SysRole> sysRoles = roleService.selectRolesByUserIdDdApp(userId); Map<String,String> mapList = new HashMap<>();
for (SysRole role : sysRoles) { //设置级部
if (role.getRoleKey().equals("phy_lab_admin")){ //获取学科
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","1")); Map<String, String> map = schoolClassMentorService.selectTeacherGroupMentot(userId);
}else if (role.getRoleKey().equals("che_lab_admin")){ String s = map.get("courseId");
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","2")); List<String> list = Arrays.asList(s.split(","));
}else if (role.getRoleKey().equals("bio_lab_admin")){ List<String> myList = list.stream().distinct().collect(Collectors.toList());
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","3")); List<String> strings = schoolLabClassYearService.convertMentor(myList);
for (String date : strings){
if (date.equals("1")){
mapList.put("物理","1");
}else if (date.equals("2")){
mapList.put("化学","2");
}else if (date.equals("3")){
mapList.put("生物","3");
} }
} }
return AjaxResult.success("当前用户未分配学科角色"); return AjaxResult.success(mapList);
} }
/** /**
*新增申请 *新增申请
*/ */
......
...@@ -8,6 +8,7 @@ import com.ruoyi.common.enums.BusinessType; ...@@ -8,6 +8,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.UserInfoUtil; import com.ruoyi.framework.util.UserInfoUtil;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -18,7 +19,9 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -18,7 +19,9 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
import yangtz.cs.liu.campus.service.impl.schoolLab.SchoolLabClassYearServiceImpl;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabClassYearVo;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabVo;
/** /**
...@@ -33,16 +36,17 @@ public class WxSchoolLabControoler extends BaseController { ...@@ -33,16 +36,17 @@ public class WxSchoolLabControoler extends BaseController {
@Autowired @Autowired
private UserInfoUtil userInfoUtil; private UserInfoUtil userInfoUtil;
@Autowired
private SchoolLabClassYearServiceImpl schoolLabClassYearService;
/** /**
* 查询实验室列表 * 查询实验室列表
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SchoolLabVo schoolLabVo) public AjaxResult list(SchoolLabClassYearVo schoolLabClassYearVo)
{ {
startPage(); List<Map<String, Object>> labList = schoolLabClassYearService.getLabList(schoolLabClassYearVo);
Long teacherUserId = userInfoUtil.getMpLoginUser().getUserId(); return AjaxResult.success(labList);
List<SchoolLabVo> list = schoolLabService.selectSchoolLabList(schoolLabVo,teacherUserId);
return getDataTable(list);
} }
/** /**
......
...@@ -155,8 +155,7 @@ public class WxSchoolOrganizationController extends BaseController { ...@@ -155,8 +155,7 @@ public class WxSchoolOrganizationController extends BaseController {
//根据当前登录人 查询当前社团的报名状态 //根据当前登录人 查询当前社团的报名状态
LambdaQueryWrapper<SchoolOrganizationSignin> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<SchoolOrganizationSignin> wrapper = Wrappers.lambdaQuery();
wrapper.eq(SchoolOrganizationSignin::getUserId,userId) wrapper.eq(SchoolOrganizationSignin::getUserId,userId)
.eq(SchoolOrganizationSignin::getCid,vo.getCid()) .eq(SchoolOrganizationSignin::getCid,vo.getCid());
.eq(SchoolOrganizationSignin::getDelFlag,"0");
SchoolOrganizationSignin one = schoolOrganizationSigninService.getOne(wrapper); SchoolOrganizationSignin one = schoolOrganizationSigninService.getOne(wrapper);
if (one==null){ if (one==null){
//根据studentId 获取当前登录人信息 返回给前端 //根据studentId 获取当前登录人信息 返回给前端
......
...@@ -63,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -63,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if> <if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if> <if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
order by c.create_time DESC
</select> </select>
<select id="selectSchoolCirculationVoListGr" parameterType="SchoolCirculationVo" resultMap="schoolCirculationVoResult"> <select id="selectSchoolCirculationVoListGr" parameterType="SchoolCirculationVo" resultMap="schoolCirculationVoResult">
...@@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if> <if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if> <if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
order by c.create_time DESC
</select> </select>
<select id="selectSchoolCirculationVoById" parameterType="Long" resultMap="schoolCirculationVoResult"> <select id="selectSchoolCirculationVoById" parameterType="Long" resultMap="schoolCirculationVoResult">
......
...@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''" >and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''" >and el.equipment_state = #{equipmentState}</if>
<if test="affiliationType != null and affiliationType != ''" >and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''" >and el.affiliation_type = #{affiliationType}</if>
order by el.create_time DESC
</select> </select>
<select id="selectSchoolEquipmentLedgerListGr" parameterType="SchoolEquipmentLedgerVo" resultMap="schoolEquipmentLedgerResult"> <select id="selectSchoolEquipmentLedgerListGr" parameterType="SchoolEquipmentLedgerVo" resultMap="schoolEquipmentLedgerResult">
...@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''" >and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''" >and el.equipment_state = #{equipmentState}</if>
<if test="affiliationType != null and affiliationType != ''" >and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''" >and el.affiliation_type = #{affiliationType}</if>
order by el.create_time DESC
</select> </select>
<update id="outSchoolEquipmentLedger" parameterType="String"> <update id="outSchoolEquipmentLedger" parameterType="String">
...@@ -79,4 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -79,4 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND user_name like concat('%', #{userName}, '%') AND user_name like concat('%', #{userName}, '%')
</if> </if>
</select> </select>
<select id="getEquipmentledger" parameterType="String" resultType="Map">
select id as id, encode as encode, equipment_name as equipmentName, model as model, place as place from school_equipment_ledger where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper> </mapper>
...@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="delFalg" column="del_flag" /> <result property="delFalg" column="del_flag" />
<result property="place" column="place" />
</resultMap> </resultMap>
<select id="selectSchoolEquipmentRepairVoList" parameterType="SchoolEquipmentRepairVo" resultMap="schoolEquipmentRepairVoResult"> <select id="selectSchoolEquipmentRepairVoList" parameterType="SchoolEquipmentRepairVo" resultMap="schoolEquipmentRepairVoResult">
...@@ -40,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -40,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
el.equipment_name, el.equipment_name,
el.model, el.model,
el.date_of_production, el.date_of_production,
el.place, er.place,
el.classification_code, el.classification_code,
er.report_repair_time, er.report_repair_time,
er.report_repair_id, er.report_repair_id,
...@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="repairState != null and repairState != ''">and er.repair_state = #{repairState}</if> <if test="repairState != null and repairState != ''">and er.repair_state = #{repairState}</if>
<if test="disposeState != null and disposeState != ''">and er.dispose_state = #{disposeState}</if> <if test="disposeState != null and disposeState != ''">and er.dispose_state = #{disposeState}</if>
order by er.create_time DESC
</select> </select>
<select id="selectSchoolEquipmentRepairVoListGr" parameterType="SchoolEquipmentRepairVo" resultMap="schoolEquipmentRepairVoResult"> <select id="selectSchoolEquipmentRepairVoListGr" parameterType="SchoolEquipmentRepairVo" resultMap="schoolEquipmentRepairVoResult">
...@@ -75,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -75,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
el.equipment_name, el.equipment_name,
el.model, el.model,
el.date_of_production, el.date_of_production,
el.place, er.place,
el.classification_code, el.classification_code,
er.report_repair_time, er.report_repair_time,
er.report_repair_id, er.report_repair_id,
...@@ -100,27 +102,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -100,27 +102,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''" >and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="repairState != null and repairState != ''">and er.repair_state = #{repairState}</if> <if test="repairState != null and repairState != ''">and er.repair_state = #{repairState}</if>
<if test="disposeState != null and disposeState != ''">and er.dispose_state = #{disposeState}</if> <if test="disposeState != null and disposeState != ''">and er.dispose_state = #{disposeState}</if>
order by er.create_time DESC
</select> </select>
<select id="getMaintenanceUserList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult"> <select id="getMaintenanceUserList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult">
SELECT er.id,er.equipment_id,el.encode,er.dispose_state,el.equipment_name,el.model,el.date_of_production,el.place , SELECT er.id,er.equipment_id,el.encode,er.dispose_state,er.place,el.equipment_name,el.model,el.date_of_production,el.place ,
el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem, el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,
er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark
FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id
where er.del_flag=0 where er.del_flag=0 and er.dispose_state = 0
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
</select> </select>
<select id="getMaintenanceList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult"> <select id="getMaintenanceList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult">
SELECT er.id,er.equipment_id,el.encode,er.dispose_state,el.equipment_name,el.model,el.date_of_production,el.place , SELECT er.id,er.equipment_id,el.encode,er.dispose_state,er.place,el.equipment_name,el.model,el.date_of_production,el.place ,
el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem, el.classification_code,er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,
er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark er.repair_id,er.evaluate,er.repair_name,er.repair_phone,er.repair_time,er.repair_state,er.remark
FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id WHERE er.report_repair_id=#{reportRepairid} and er.del_flag=0 FROM school_equipment_repair er LEFT JOIN school_equipment_ledger el ON er.equipment_id=el.id WHERE er.report_repair_id=#{reportRepairid} and er.del_flag=0
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
ORDER BY er.report_repair_time DESC
</select> </select>
...@@ -133,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -133,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
el.equipment_name, el.equipment_name,
el.model, el.model,
el.date_of_production, el.date_of_production,
el.place, er.place,
el.classification_code, el.classification_code,
er.report_repair_time, er.report_repair_time,
er.report_repair_id, er.report_repair_id,
...@@ -155,12 +157,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -155,12 +157,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getAdminList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult"> <select id="getAdminList" parameterType="SchoolReceiveQuery" resultMap="schoolEquipmentRepairVoResult">
SELECT er.id,er.equipment_id,el.encode,el.equipment_name,el.model,el.date_of_production,el.place,el.classification_code, SELECT er.id,er.equipment_id,el.encode,el.equipment_name,el.model,el.date_of_production,er.place,el.place,el.classification_code,
er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,er.repair_id,er.repair_name,er.repair_phone, er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,er.repair_id,er.repair_name,er.repair_phone,
er.repair_time,er.repair_state,er.dispose_state,er.evaluate,er.remark FROM school_equipment_repair er LEFT JOIN er.repair_time,er.repair_state,er.dispose_state,er.evaluate,er.remark FROM school_equipment_repair er LEFT JOIN
school_equipment_ledger el on er.equipment_id = el.id LEFT JOIN school_product_category pc school_equipment_ledger el on er.equipment_id = el.id LEFT JOIN school_product_category pc
on pc.classification_code = el.classification_code WHERE pc.admin_id=#{reportRepairid} AND er.del_flag=0 on pc.classification_code = el.classification_code WHERE pc.admin_id=#{reportRepairid} AND er.del_flag=0
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
ORDER BY er.report_repair_time DESC
</select> </select>
...@@ -177,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -177,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
school_equipment_ledger school_equipment_ledger
WHERE WHERE
encode = #{encode} encode = #{encode}
and del_flag = '0'
</select> </select>
......
...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if>
<if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if>
order by i.create_time DESC
</select> </select>
<select id="selectSchoolInStockVoListGr" parameterType="SchoolInStockVo" resultMap="schoolInStockVoResult"> <select id="selectSchoolInStockVoListGr" parameterType="SchoolInStockVo" resultMap="schoolInStockVoResult">
...@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if>
<if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if>
order by i.create_time DESC
</select> </select>
<select id="selectSchoolInStockVoById" parameterType="Long" resultMap="schoolInStockVoResult"> <select id="selectSchoolInStockVoById" parameterType="Long" resultMap="schoolInStockVoResult">
......
...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if>
<if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if>
order by create_time DESC
</select> </select>
<select id="selectSchoolOutStockVoListGr" parameterType="SchoolOutStockVo" resultMap="schoolOutStockVoResult"> <select id="selectSchoolOutStockVoListGr" parameterType="SchoolOutStockVo" resultMap="schoolOutStockVoResult">
...@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if> <if test="affiliationType != null and affiliationType != ''">and el.affiliation_type = #{affiliationType}</if>
<if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if> <if test="classificationCode != null and classificationCode != ''">and el.classification_code like concat('%', #{classificationCode}, '%')</if>
<if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if> <if test="equipmentState != null and equipmentState != ''">and el.equipment_state = #{equipmentState}</if>
order by create_time DESC
</select> </select>
<select id="selectSchoolOutStockVoById" parameterType="Long" resultMap="schoolOutStockVoResult"> <select id="selectSchoolOutStockVoById" parameterType="Long" resultMap="schoolOutStockVoResult">
......
...@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.del_flag = '0' r.del_flag = '0'
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="recipientBy != null and recipientBy != ''">and r.recipient_by like concat('%', #{recipientBy}, '%')</if> <if test="recipientBy != null and recipientBy != ''">and r.recipient_by like concat('%', #{recipientBy}, '%')</if>
order by r.create_time DESC
</select> </select>
<select id="selectSchoolReceiveVoListGr" parameterType="SchoolReceiveVo" resultMap="schoolReceiveVoResult"> <select id="selectSchoolReceiveVoListGr" parameterType="SchoolReceiveVo" resultMap="schoolReceiveVoResult">
...@@ -89,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -89,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
r.del_flag = '0' and u.user_id = #{adminId} r.del_flag = '0' and u.user_id = #{adminId}
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="recipientBy != null and recipientBy != ''">and r.recipient_by like concat('%', #{recipientBy}, '%')</if> <if test="recipientBy != null and recipientBy != ''">and r.recipient_by like concat('%', #{recipientBy}, '%')</if>
order by r.create_time DESC
</select> </select>
<select id="selectSchoolReceiveVoById" parameterType="Long" resultMap="schoolReceiveVoResult"> <select id="selectSchoolReceiveVoById" parameterType="Long" resultMap="schoolReceiveVoResult">
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
AND gm.teacher_id = #{teacherId} AND gm.teacher_id = #{teacherId}
</if> </if>
</where> </where>
order by create_time DESC order by cy.create_time DESC
</select> </select>
<select id="selectExperimentPlanListAdmin" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult"> <select id="selectExperimentPlanListAdmin" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
......
...@@ -86,6 +86,12 @@ ...@@ -86,6 +86,12 @@
#{declareState} #{declareState}
</foreach> </foreach>
</if> </if>
<if test="subs != null">
and lcy.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")">
#{sub}
</foreach>
</if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
...@@ -339,6 +345,7 @@ ...@@ -339,6 +345,7 @@
LEFT JOIN school_lab_class_year cy on cy.experiment_plan_id = ep.id LEFT JOIN school_lab_class_year cy on cy.experiment_plan_id = ep.id
WHERE ep.school_year = #{schoolYear} AND ep.semester =#{semester} AND ep.del_flag = 0 AND pc.del_flag=0 WHERE ep.school_year = #{schoolYear} AND ep.semester =#{semester} AND ep.del_flag = 0 AND pc.del_flag=0
<if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if> <if test="querText != null "> and concat(ep.experiment_name,ep.grade ) like concat('%', #{querText}, '%') </if>
<if test="sub != null "> and ep.sub = #{sub} </if>
GROUP BY ep.id GROUP BY ep.id
</select> </select>
</mapper> </mapper>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<result property="id" column="id" /> <result property="id" column="id" />
<result property="teacherId" column="teacher_id" /> <result property="teacherId" column="teacher_id" />
<result property="teacherName" column="teacher_name" /> <result property="teacherName" column="teacher_name" />
<result property="teacherTel" column="teacher_tel" />
<result property="idCard" column="id_card" /> <result property="idCard" column="id_card" />
<result property="basePay" column="base_pay" /> <result property="basePay" column="base_pay" />
<result property="bonus" column="bonus" /> <result property="bonus" column="bonus" />
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</resultMap> </resultMap>
<sql id="selectSchoolTeacherWagesVo"> <sql id="selectSchoolTeacherWagesVo">
select id, teacher_id, teacher_name, id_card, base_pay, bonus, pension, accumulation_fund, medical_insurance, fare_subsidy, telephone_subsidy, meal_allowance, income_tax, unemployment_benefits, overtime_pay, pay_slip_url, wages_time, remarks from school_teacher_wages select id, teacher_id, teacher_name, teacher_tel, id_card, base_pay, bonus, pension, accumulation_fund, medical_insurance, fare_subsidy, telephone_subsidy, meal_allowance, income_tax, unemployment_benefits, overtime_pay, pay_slip_url, wages_time, remarks from school_teacher_wages
</sql> </sql>
<select id="queryList" parameterType="SchoolTeacherWages" resultMap="SchoolTeacherWagesResult"> <select id="queryList" parameterType="SchoolTeacherWages" resultMap="SchoolTeacherWagesResult">
...@@ -55,4 +56,15 @@ ...@@ -55,4 +56,15 @@
order by create_time desc order by create_time desc
</select> </select>
<insert id="batchInsertTeacherWages">
insert into school_teacher_wages(teacher_id, teacher_name, teacher_tel, base_pay, bonus, pension, accumulation_fund, medical_insurance,
fare_subsidy, telephone_subsidy, meal_allowance, income_tax, unemployment_benefits, overtime_pay, wages_time, remarks, create_by, create_time )
values
<foreach collection="list" item="item" separator=",">
(#{item.teacherId}, #{item.teacherName}, #{item.teacherTel}, #{item.basePay}, #{item.bonus}, #{item.pension}, #{item.accumulationFund},
#{item.medicalInsurance}, #{item.fareSubsidy}, #{item.telephoneSubsidy}, #{item.mealAllowance}, #{item.incomeTax}, #{item.unemploymentBenefits},
#{item.overtimePay}, #{item.wagesTime}, #{item.remarks}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
</mapper> </mapper>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<select id="shebeilist2" parameterType="ShebeiBx" resultMap="ShebeiBxResult"> <select id="shebeilist2" parameterType="ShebeiBx" resultMap="ShebeiBxResult">
SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark SELECT ser.id,encode,report_repair_id,equipment_name,model,date_of_production,ser.place,report_repair_time,report_repair,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark
FROM school_equipment_repair ser FROM school_equipment_repair ser
JOIN school_equipment_ledger sel JOIN school_equipment_ledger sel
ON ser.equipment_id=sel.id ON ser.equipment_id=sel.id
......
...@@ -14,11 +14,12 @@ ...@@ -14,11 +14,12 @@
<result property="borrowBy" column="borrow_by"/> <result property="borrowBy" column="borrow_by"/>
<result property="purpose" column="purpose"/> <result property="purpose" column="purpose"/>
<result property="deadline" column="deadline"/> <result property="deadline" column="deadline"/>
<result property="returnState" column="return_state"/>
</resultMap> </resultMap>
<select id="shebeilist" parameterType="ShebeiJy" resultMap="ShebeiJyResult"> <select id="shebeilist" parameterType="ShebeiJy" resultMap="ShebeiJyResult">
SELECT ss.id,encode,equipment_name,model,borrow_time,borrow_by_id,borrow_by,deadline,purpose SELECT ss.id,encode,equipment_name,model,borrow_time,borrow_by_id,borrow_by,deadline,purpose,ss.return_state
FROM school_circulation ss FROM school_circulation ss
JOIN school_equipment_ledger ssc JOIN school_equipment_ledger ssc
ON ss.equipment_id=ssc.id ON ss.equipment_id=ssc.id
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</resultMap> </resultMap>
<select id="querylistbx" parameterType="TeacherBx" resultMap="TeacherBxResult"> <select id="querylistbx" parameterType="TeacherBx" resultMap="TeacherBxResult">
SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,report_repair,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark SELECT ser.id,encode,equipment_name,model,date_of_production,ser.place,report_repair_time,report_repair,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark
FROM school_equipment_repair ser FROM school_equipment_repair ser
JOIN school_equipment_ledger sel JOIN school_equipment_ledger sel
ON ser.equipment_id=sel.id ON ser.equipment_id=sel.id
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
<result property="borrowBy" column="borrow_by"/> <result property="borrowBy" column="borrow_by"/>
<result property="purpose" column="purpose"/> <result property="purpose" column="purpose"/>
<result property="deadline" column="deadline"/> <result property="deadline" column="deadline"/>
<result property="returnState" column="return_state"/>
</resultMap> </resultMap>
<select id="queryList" parameterType="TeacherJy" resultMap="TeacherJyResult"> <select id="queryList" parameterType="TeacherJy" resultMap="TeacherJyResult">
SELECT ss.id,encode,equipment_name,model,borrow_time,borrow_by_id,borrow_by,deadline,purpose SELECT ss.id,encode,equipment_name,model,borrow_time,borrow_by_id,borrow_by,deadline,purpose,ss.return_state
FROM school_circulation ss FROM school_circulation ss
JOIN school_equipment_ledger ssc JOIN school_equipment_ledger ssc
ON ss.equipment_id=ssc.id ON ss.equipment_id=ssc.id
......
...@@ -44,6 +44,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -44,6 +44,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </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="noticeRange != null and noticeRange != ''"> and fn.notice_range = #{teacherFiles.noticeRange}</if>
<if test="noticeYear != null and noticeYear != ''"> and fn.notice_year = #{teacherFiles.noticeYear}</if>
<if test="noticeSemester != null and noticeSemester != ''"> and fn.notice_semester = #{teacherFiles.noticeSemester}</if>
<if test="noticeName != null and noticeName != ''"> and fn.notice_name like concat('%', #{teacherFiles.noticeName}, '%')</if>
<if test="noticeState != null and noticeState != ''"> and fn.notice_state = #{teacherFiles.noticeState}</if>
<if test="startTime != null "> and start_time = #{teacherFiles.startTime}</if>
<if test="endTime != null "> and end_time = #{teacherFiles.endTime}</if>
</select>
<select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal"> <select id="selectTeacherFilesNoticeListByUser" parameterType="TeacherFilesNotice" resultType="TeacherFilesNoticeTotal">
<include refid="selectTeacherFilesNoticeTotalVo"/> <include refid="selectTeacherFilesNoticeTotalVo"/>
<where> <where>
......
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