Commit 55c32ca8 by Cat
parents d3d838cb 05b3eb2d
No preview for this file type
...@@ -201,17 +201,36 @@ wx: ...@@ -201,17 +201,36 @@ wx:
# redirect-uri: y32025c600.goho.co:10087 # redirect-uri: y32025c600.goho.co:10087
dd: dd:
# 本地配置
appKey: dingclpf8qoxvinhksyh appKey: dingclpf8qoxvinhksyh
appSecret: CrlRmzkaFMH00cbipSf3g0nc_xpFGCitTAPA_cphUXg1e-DSX1hFcyVpqgos29r9 appSecret: CrlRmzkaFMH00cbipSf3g0nc_xpFGCitTAPA_cphUXg1e-DSX1hFcyVpqgos29r9
# 钉钉接口 获取钉钉access_token 的uri # 钉钉接口 获取钉钉access_token 的uri
access-token-uri: https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret} access-token-uri: https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
#企业id #企业id
corpId: dingaa3937ff8b7dd267f2c783f7214b6d69 corpId: dingaa3937ff8b7dd267f2c783f7214b6d69
#应用id #应用id
agentId: 2730043705 agentId: 2730043705
# 测试服务器配置
# appKey: ding5cbf7qhd55zun5jg
# appSecret: -er7LnIslFEJ2n8cJY9MdTCKiRDjoCZwQuA2XvU2Hr7fHw-cp_B2ZAhynVifqlL8
# # 钉钉接口 获取钉钉access_token 的uri
# access-token-uri: https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
# #企业id
# corpId: dingaa3937ff8b7dd267f2c783f7214b6d69
# #应用id
# agentId: 2760774127
# 正式配置
# appKey: dingggqchzyvxm9e6e7v
# appSecret: ts5hRNjO_o3QNMfEu4pM2dn71YJzw7yalnuh5LztHuCGWqUNjM2lMB1eNCSOlxNN
# # 钉钉接口 获取钉钉access_token 的uri
# access-token-uri: https://oapi.dingtalk.com/gettoken?appkey=${dd.appKey}&appsecret=${dd.appSecret}
# #企业id
# corpId: dingccea40788226c988f2c783f7214b6d69
# #应用id
# agentId: 2765311628
#重定向地址 #重定向地址
redirect-uri: www.dyzmxx.com redirect-uri: www.dyzmxx.com
......
...@@ -132,6 +132,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -132,6 +132,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/wx/user/getToken").permitAll() .antMatchers("/wx/user/getToken").permitAll()
//钉钉免登录接口 //钉钉免登录接口
.antMatchers("/dd/App/user/**").permitAll() .antMatchers("/dd/App/user/**").permitAll()
.antMatchers("/dd/djtx/**").permitAll()
//开发一个接口字典 //开发一个接口字典
.antMatchers("/system/dict/data/type/**").permitAll() .antMatchers("/system/dict/data/type/**").permitAll()
// .antMatchers("/**").permitAll() // .antMatchers("/**").permitAll()
......
...@@ -27,6 +27,7 @@ public interface ISysRoleService ...@@ -27,6 +27,7 @@ public interface ISysRoleService
* @return 角色列表 * @return 角色列表
*/ */
public List<SysRole> selectRolesByUserId(Long userId); public List<SysRole> selectRolesByUserId(Long userId);
public List<SysRole> selectRolesByUserIdDdApp(Long userId);
/** /**
* 根据用户ID查询角色权限 * 根据用户ID查询角色权限
......
...@@ -83,6 +83,25 @@ public class SysRoleServiceImpl implements ISysRoleService ...@@ -83,6 +83,25 @@ public class SysRoleServiceImpl implements ISysRoleService
return roles; return roles;
} }
public List<SysRole> selectRolesByUserIdDdApp(Long userId)
{
List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId);
List<SysRole> roles = roleMapper.selectRoleList(new SysRole());
for (SysRole role : roles)
{
for (SysRole userRole : userRoles)
{
if (role.getRoleId().longValue() == userRole.getRoleId().longValue())
{
role.setFlag(true);
break;
}
}
}
return roles;
}
/** /**
* 根据用户ID查询权限 * 根据用户ID查询权限
* *
......
...@@ -7,7 +7,7 @@ git clone https://gitee.com/y_project/RuoYi-Vue ...@@ -7,7 +7,7 @@ git clone https://gitee.com/y_project/RuoYi-Vue
# 进入项目目录 # 进入项目目录
cd ruoyi-ui cd ruoyi-ui
__
# 安装依赖 # 安装依赖
npm install npm install
......
...@@ -8,7 +8,14 @@ import { isRelogin } from "@/utils/request"; ...@@ -8,7 +8,14 @@ import { isRelogin } from "@/utils/request";
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/auth-redirect", "/bind", "/register", "/index"]; const whiteList = [
"/login",
"/auth-redirect",
"/bind",
"/register",
"/index",
"/dd",
];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start(); NProgress.start();
......
...@@ -501,10 +501,7 @@ export default { ...@@ -501,10 +501,7 @@ export default {
} }
}, },
created() { created() {
// 钉钉code码,正式时打开 this.init()
// this.getCode()
// token,测试用
this.csToken()
}, },
mounted() { mounted() {
...@@ -529,59 +526,7 @@ export default { ...@@ -529,59 +526,7 @@ export default {
}, },
methods: { methods: {
// 获取code
getCode() {
dd.getAuthCode({
corpId: 'dingaa3937ff8b7dd267f2c783f7214b6d69',
success: (res) => {
console.log('获取新的免登码成功', res);
const code = res.code
// this.code = code;
// this.authCodeTimestamp = currentTime;
// console.log('this.authCodeTimestamp', this.authCodeTimestamp);
console.log('code', code);
this.getToken(code)
// console.log('loginResponse', loginResponse);
},
fail: (res) => {
console.log('获取免登码失败', res);
},
complete: () => { },
});
},
// 获取token
getToken(code) {
getCode(code).then(res => {
console.log('res', res.token);
if (res.token) {
setToken(res.token)
this.$store.commit('SET_TOKEN', res.token)
// this.$router.push({ path: '/index' });
// 判断当前用户是否已拉取完user_info信息
this.$store.dispatch('GetInfo').then((res) => {
this.$store.dispatch('GenerateRoutes').then(accessRoutes => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
this.init()
})
})
} else {
this.$message.error(res.message)
}
})
},
// 测试token
csToken() {
if (getToken()) {
console.log('getToken', getToken());
this.init()
} else {
this.$router.push({ path: '/login' });
}
},
//从后端获取任务数量 //从后端获取任务数量
taskNum() { taskNum() {
......
...@@ -20,7 +20,11 @@ ...@@ -20,7 +20,11 @@
<el-table stripe :data="tableData" border style="width: 98%"> <el-table stripe :data="tableData" border style="width: 98%">
<el-table-column align="center" type="index" label="序号" width="55" /> <el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="borrowBy" label="申请人" /> <el-table-column align="center" prop="borrowBy" label="申请人" />
<el-table-column align="center" prop="borrowState" label="借用状态" /> <el-table-column align="center" prop="borrowState" label="借用状态">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.borrow_state, row.borrowState) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="schoolTeacherBorrowDetailList" label="借用明细"> <el-table-column align="center" prop="schoolTeacherBorrowDetailList" label="借用明细">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div v-for="detail in row.schoolTeacherBorrowDetailList" :key="detail.id"> <div v-for="detail in row.schoolTeacherBorrowDetailList" :key="detail.id">
...@@ -34,10 +38,14 @@ ...@@ -34,10 +38,14 @@
<el-table-column align="center" prop="remark" label="备注" /> <el-table-column align="center" prop="remark" label="备注" />
<el-table-column align="center" fixed="right" label="操作"> <el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">详情</el-button> <el-button v-if="scope.row.borrowState === '0' || scope.row.borrowState === '1'"
<el-button @click="processItem(scope.row)" type="text" size="small">借用</el-button> @click="handleLook(scope.row)" type="text" size="small">详情</el-button>
<el-button @click="returnItem(scope.row)" type="text" size="small">归还</el-button> <el-button v-if="scope.row.borrowState === '0'" @click="returnItem(scope.row)" type="text"
size="small">归还</el-button>
<el-button v-if="scope.row.borrowState === '2'" @click="processItem(scope.row)" type="text"
size="small">借用</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -203,6 +211,7 @@ import { ...@@ -203,6 +211,7 @@ import {
} from '@/api/smartSchool/InstrumentDrugAdministration/instrumentBorrowManagement/warehouseEquipmentLoan' } from '@/api/smartSchool/InstrumentDrugAdministration/instrumentBorrowManagement/warehouseEquipmentLoan'
export default { export default {
name: 'warehouseEquipmentLoan', name: 'warehouseEquipmentLoan',
dicts: ['borrow_state'],
data() { data() {
return { return {
queryForm: { queryForm: {
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->
<el-table :data="tableData" v-loading="loading" row-key="id" :default-expand-all="isExpandAll" <el-table :data="tableData" v-loading="loading" row-key="id" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
...@@ -43,7 +41,6 @@ ...@@ -43,7 +41,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 弹窗 --> <!-- 弹窗 -->
<el-dialog :title="title" :visible.sync="dialogTableVisible" width="30%" show-close> <el-dialog :title="title" :visible.sync="dialogTableVisible" width="30%" show-close>
<el-form :model="form" ref="form" size="small" :rules="rules" label-width="108px"> <el-form :model="form" ref="form" size="small" :rules="rules" label-width="108px">
...@@ -77,7 +74,6 @@ ...@@ -77,7 +74,6 @@
<el-radio label='1'></el-radio> <el-radio label='1'></el-radio>
<el-radio label='0'></el-radio> <el-radio label='0'></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -89,13 +85,11 @@ ...@@ -89,13 +85,11 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button type="primary" @click="submitparentForm">确定</el-button> <el-button type="primary" @click="submitparentForm">确定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 分页 --> <!-- 分页 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryForm.pageNum" :limit.sync="queryForm.pageSize"
@pagination="getList" /> @pagination="getList" />
...@@ -120,20 +114,18 @@ export default { ...@@ -120,20 +114,18 @@ export default {
queryForm: { queryForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentTypeName: "", instrumentTypeName: null,
id: "", id: null,
}, },
selectedRows: [], // 用于存储选择的行数据 selectedRows: [], // 用于存储选择的行数据
//表格数据 //表格数据
tableData: [ tableData: [ ],
],
nowType: 0, // 0新增、1编辑、2查看 nowType: 0, // 0新增、1编辑、2查看
title: '', title: '',
// 弹窗 // 弹窗
form: { form: {
instrumentTypeName: "", instrumentTypeName: null,
parentId: "", parentId: null,
orderNum: "", orderNum: "",
isConsumables: "", isConsumables: "",
remark: "", remark: "",
...@@ -178,6 +170,7 @@ export default { ...@@ -178,6 +170,7 @@ export default {
this.loading = false; this.loading = false;
}) })
}, },
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children;
...@@ -193,8 +186,8 @@ export default { ...@@ -193,8 +186,8 @@ export default {
this.queryForm = { this.queryForm = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentTypeName: "", instrumentTypeName: null,
id: "", id: null,
}, },
this.getList(); this.getList();
}, },
...@@ -203,8 +196,8 @@ export default { ...@@ -203,8 +196,8 @@ export default {
handleOption(type, item) { handleOption(type, item) {
this.form = { this.form = {
id: '', id: '',
instrumentTypeName: "", instrumentTypeName: null,
parentId: "", parentId: null,
orderNum: "", orderNum: "",
isConsumables: "", isConsumables: "",
remark: "", remark: "",
...@@ -217,6 +210,7 @@ export default { ...@@ -217,6 +210,7 @@ export default {
Object.keys(this.form).forEach(key => { Object.keys(this.form).forEach(key => {
if (res.data[key]) { if (res.data[key]) {
this.$set(this.form, key, res.data[key]); this.$set(this.form, key, res.data[key]);
} }
}); });
} }
...@@ -266,7 +260,7 @@ export default { ...@@ -266,7 +260,7 @@ export default {
// 这里需要重置对话框表单 // 这里需要重置对话框表单
this.form = { this.form = {
instrumentTypeName: "", instrumentTypeName: "",
parentId: "", parentId: null,
orderNum: "", orderNum: "",
isConsumables: "", isConsumables: "",
remark: "", remark: "",
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: null,
daterange: "", daterange: "",
startTime: "", startTime: "",
endTime: "", endTime: "",
...@@ -99,6 +99,8 @@ export default { ...@@ -99,6 +99,8 @@ export default {
}, },
/** 转换分类编码数据结构 */ /** 转换分类编码数据结构 */
normalizer(node) { normalizer(node) {
console.log('queryForm.instrumentTypeId', this.queryForm.instrumentTypeId);
console.log('node', node);
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children;
} }
...@@ -114,7 +116,7 @@ export default { ...@@ -114,7 +116,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: null,
startTime: "", startTime: "",
endTime: "", endTime: "",
}, },
......
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: null,
}, },
//表格数据 //表格数据
tableData: [ tableData: [
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
form: { form: {
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: "",
instrumentTypeName: "", instrumentTypeName: null,
instrumentModel: "", instrumentModel: "",
instrumentNum: "", instrumentNum: "",
remark: "", remark: "",
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: null,
}, },
this.getList(); this.getList();
}, },
...@@ -300,7 +300,7 @@ export default { ...@@ -300,7 +300,7 @@ export default {
id: '', id: '',
instrumentName: "", instrumentName: "",
instrumentTypeId: "", instrumentTypeId: "",
instrumentTypeName: "", instrumentTypeName: null,
instrumentModel: "", instrumentModel: "",
instrumentNum: "", instrumentNum: "",
remark: "", remark: "",
...@@ -426,7 +426,7 @@ export default { ...@@ -426,7 +426,7 @@ export default {
this.form = { this.form = {
id: null, id: null,
instrumentName: null, instrumentName: null,
instrumentTypeId: null, instrumentTypeId: '',
instrumentTypeName: null, instrumentTypeName: null,
instrumentModel: null, instrumentModel: null,
instrumentNum: null, instrumentNum: null,
......
...@@ -361,8 +361,6 @@ export default { ...@@ -361,8 +361,6 @@ export default {
} else { } else {
this.postForm.accessoryUrl = ''; this.postForm.accessoryUrl = '';
this.postForm.accessoryName = ''; this.postForm.accessoryName = '';
} }
}, },
......
...@@ -339,7 +339,6 @@ export default { ...@@ -339,7 +339,6 @@ export default {
console.log('response', response); console.log('response', response);
this.loading = false; this.loading = false;
this.getClasslist(); this.getClasslist();
this.dialogTableVisible = true; this.dialogTableVisible = true;
}); });
}, },
......
...@@ -406,8 +406,7 @@ export default { ...@@ -406,8 +406,7 @@ export default {
methods: { methods: {
getList() { getList() {
getApplylist(this.queryForm) getApplylist(this.queryForm).then(response => {
.then(response => {
this.tableData = response.rows; this.tableData = response.rows;
this.tableData = response.rows.map(item => { this.tableData = response.rows.map(item => {
item.accessoryList = item.schoolAccessoryList; // 将附件信息赋值给accessoryList属性 item.accessoryList = item.schoolAccessoryList; // 将附件信息赋值给accessoryList属性
...@@ -519,6 +518,7 @@ export default { ...@@ -519,6 +518,7 @@ export default {
}, },
//上传按钮 //上传按钮
getFileList(data) { getFileList(data) {
console.log('data', data); console.log('data', data);
...@@ -527,6 +527,8 @@ export default { ...@@ -527,6 +527,8 @@ export default {
if (this.fileList.length != 0) { if (this.fileList.length != 0) {
this.postForm.accessoryUrl = data[0].fjlj; this.postForm.accessoryUrl = data[0].fjlj;
this.postForm.accessoryName = data[0].fjmc; this.postForm.accessoryName = data[0].fjmc;
console.log(this.postForm.accessoryName);
console.log(this.postForm.accessoryUrl);
console.log('this.postForm', this.postForm); console.log('this.postForm', this.postForm);
} else { } else {
this.postForm.accessoryUrl = ''; this.postForm.accessoryUrl = '';
...@@ -724,6 +726,4 @@ export default { ...@@ -724,6 +726,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
\ No newline at end of file
</style>
\ No newline at end of file
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="申请老师"> <el-form-item label="申请老师">
<el-input v-model="postForm.applyName" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="postForm.applyName" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
...@@ -187,12 +187,13 @@ ...@@ -187,12 +187,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="实验名称"> <el-form-item label="实验名称">
<el-input v-model="postForm.experimentName" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="postForm.experimentName" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学科"> <el-form-item label="学科">
<el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;" :disabled="isEdit"> <el-select v-model="postForm.sub" placeholder="请选择" clearable style="width: 100%;"
:disabled="isEdit">
<el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.lab_sub" :key="dict.value" :label="dict.label"
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
...@@ -204,7 +205,8 @@ ...@@ -204,7 +205,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="章节内容"> <el-form-item label="章节内容">
<el-input v-model="postForm.chapterContent" placeholder="请输入" clearable :disabled="isEdit"></el-input> <el-input v-model="postForm.chapterContent" placeholder="请输入" clearable
:disabled="isEdit"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -213,12 +215,12 @@ ...@@ -213,12 +215,12 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="级部"> <el-form-item label="级部">
<el-input v-model="postForm.grade" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="postForm.grade" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学年"> <el-form-item label="学年">
<el-input v-model="postForm.schoolYear" placeholder="请输入" clearable :disabled="isEdit"/> <el-input v-model="postForm.schoolYear" placeholder="请输入" clearable :disabled="isEdit" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleOption(0)">新增</el-button> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleOption(0)">新增</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table border v-loading="loading" :data="competitionData" stripe> <el-table border v-loading="loading" :data="competitionData" stripe>
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" /> <el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
...@@ -43,7 +42,6 @@ ...@@ -43,7 +42,6 @@
:preview-src-list="scope.row.previewUrls"></el-image> :preview-src-list="scope.row.previewUrls"></el-image>
</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" />
<el-table-column label="备注2" align="center" prop="remark2" /> <el-table-column label="备注2" align="center" prop="remark2" />
<el-table-column label="备注3" align="center" prop="remark3" /> <el-table-column label="备注3" align="center" prop="remark3" />
...@@ -57,19 +55,18 @@ ...@@ -57,19 +55,18 @@
</el-table> </el-table>
<pagination ref="pageBlock" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination ref="pageBlock" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" /> :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 新增、编辑、查看弹窗 --> <!-- 新增、编辑、查看弹窗 -->
<el-dialog title="详细信息" :visible.sync="dialogVisible" width="50%"> <el-dialog title="详细信息" :visible.sync="dialogVisible" width="50%">
<el-form :model="form" ref="form" size="small" label-width="108px" :disabled="isEdit"> <el-form :model="form" ref="form" size="small" label-width="108px" :disabled="isEdit" :rules="rules">
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="学年"> <el-form-item label="学年" prop="schoolYear">
<el-input v-model="form.schoolYear" placeholder="请输入" clearable <el-input v-model="form.schoolYear" placeholder="请输入" clearable
:disabled="nowType == 2 ? true : false"></el-input> :disabled="nowType == 2 ? true : false"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="参赛老师"> <el-form-item label="参赛老师" prop="teacherName">
<el-select v-model="form.teacherName" placeholder="请选择级部" clearable style="width: 100%;" <el-select v-model="form.teacherName" placeholder="请选择级部" clearable style="width: 100%;"
:disabled="nowType == 2 ? true : false"> :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in teacherList" :key="index" :label="item.userName" <el-option v-for="(item, index) in teacherList" :key="index" :label="item.userName"
...@@ -103,7 +100,7 @@ ...@@ -103,7 +100,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="比赛级别"> <el-form-item label="比赛级别" prop="competitionLevel">
<el-select v-model="form.competitionLevel" placeholder="请选择" clearable style="width: 100%;" <el-select v-model="form.competitionLevel" placeholder="请选择" clearable style="width: 100%;"
:disabled="nowType == 2 ? true : false"> :disabled="nowType == 2 ? true : false">
<el-option v-for="dict in dict.type.competition_level" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.competition_level" :key="dict.value" :label="dict.label"
...@@ -151,14 +148,12 @@ ...@@ -151,14 +148,12 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog ref="previewDialog" title="预览图片" :visible.sync="previewDialogVisible"> <el-dialog ref="previewDialog" title="预览图片" :visible.sync="previewDialogVisible">
<el-image style="width: 100%; max-height: 80vh; object-fit: contain" :src="previewImageUrl" <el-image style="width: 100%; max-height: 80vh; object-fit: contain" :src="previewImageUrl"
fit="contain"></el-image> fit="contain"></el-image>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
addCompetition, addCompetition,
...@@ -185,6 +180,8 @@ export default { ...@@ -185,6 +180,8 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
competitionType: "",
competitionName: "",
}, },
previewImageUrl: '', previewImageUrl: '',
//获取子组件传来的信息 //获取子组件传来的信息
...@@ -216,6 +213,27 @@ export default { ...@@ -216,6 +213,27 @@ export default {
schoolAccessoryList: [], schoolAccessoryList: [],
}, },
rules: {
schoolYear: [
{ required: true, message: "学年不能为空", trigger: "change" }
],
teacherName: [
{ required: true, message: "教师名称不能为空", trigger: "change" }
],
entrySubject: [
{ required: true, message: "参赛课题不能为空", trigger: "change" }
],
competitionType: [
{ required: true, message: "比赛类型不能为空", trigger: "change" }
],
competitionLevel: [
{ required: true, message: "比赛级别不能为空", trigger: "change" }
],
schoolAccessoryList: [
{ required: true, message: "证书照片不能为空", trigger: "change" }
],
},
previewDialogVisible: false, previewDialogVisible: false,
teacherList: [], teacherList: [],
rules: {}, rules: {},
...@@ -242,19 +260,19 @@ export default { ...@@ -242,19 +260,19 @@ export default {
}, },
//获取列表数据 //获取列表数据
getList() { getList() {
getCompetition(this.queryForm).then(response => { getCompetition(this.queryParams).then(response => {
this.competitionData = response.rows; this.competitionData = response.rows.map(item => {
item.previewUrls = item.schoolAccessoryList.map(accessory => accessory.accessoryUrl);
item.pictureUrl = item.schoolAccessoryList[0]?.accessoryUrl || ''; // 取第一个照片的URL或者为空字符串
return item;
});
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 => {
item.previewUrls = [item.schoolAccessoryList.map(accessory => accessory.accessoryUrl)];
item.pictureUrl = item.schoolAccessoryList.map(accessory => accessory.accessoryUrl);
});
}); });
}, },
//获取图片信息 //获取图片信息
getSchoolInfoPic(val) { getSchoolInfoPic(val) {
this.pic = val this.pic = val
...@@ -306,7 +324,13 @@ export default { ...@@ -306,7 +324,13 @@ export default {
//重置 //重置
resetQuery() { resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
competitionType: "",
competitionName: "",
},
this.getList();
}, },
...@@ -330,6 +354,7 @@ export default { ...@@ -330,6 +354,7 @@ export default {
//编辑 0新增 1编辑 2查看 //编辑 0新增 1编辑 2查看
handleOption(type, row) { handleOption(type, row) {
this.imageUrl = ''; this.imageUrl = '';
this.form.schoolAccessoryList = [];
this.form = { this.form = {
id: '', id: '',
schoolYear: '', schoolYear: '',
......
<!--社团风采-->
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
<el-table-column label="风采主题" align="center" prop="theme" /> <el-table-column label="风采主题" align="center" prop="theme" />
<el-table-column label="附件" align="center" prop="file"> <el-table-column label="附件" align="center" prop="file">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image style="width: 100px; height: 100px" :src="scope.row.file"> <el-image v-for="(item,index) in scope.row.file.split(',')" :key="index" style="width: 100px; height: 100px" :src="item" :preview-src-list="[item]">
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
...@@ -137,17 +138,21 @@ ...@@ -137,17 +138,21 @@
" "
> >
<el-upload <el-upload
multiple
v-loading="uploadLoading" v-loading="uploadLoading"
class="avatar-uploader" class="avatar-uploader"
action="#" :action="uploadFileUrl"
accept="image/*" accept="image/*"
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:http-request="uploadImage"
> >
<img v-if="form.file" :src="form.file" class="avatar" /> <!-- <img v-for="(item,index) in form.file" :key="index" v-if="form.file" :src="item" class="avatar" />-->
<div v-if="form.file">
<img v-for="(item,index) in form.file" :key="index" :src="item" class="avatar" />
</div>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
...@@ -191,6 +196,9 @@ export default { ...@@ -191,6 +196,9 @@ export default {
components: { picAvatar }, components: { picAvatar },
data() { data() {
return { return {
//图片上传列表
uploadList: [],
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
// 输入框字数限制 // 输入框字数限制
TEXT_SIZE, TEXT_SIZE,
...@@ -313,10 +321,9 @@ export default { ...@@ -313,10 +321,9 @@ export default {
}; };
// console.log(params); // console.log(params);
getCommunityInfo(params).then((response) => { getCommunityInfo(params).then((response) => {
// console.log("response", response); console.log("response", response);
this.picList = response.rows; this.picList = response.rows;
this.picList.file = response.rows.file; // this.picList.file = response.rows.file.split(',');
// console.log(this.picList.file);
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -369,8 +376,10 @@ export default { ...@@ -369,8 +376,10 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.uploadList = []
this.check = false; this.check = false;
this.reset(); this.reset();
console.log('form.file',this.form.file)
this.open = true; this.open = true;
this.title = "新增社团风采"; this.title = "新增社团风采";
}, },
...@@ -378,22 +387,31 @@ export default { ...@@ -378,22 +387,31 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.uploadList = []
this.form.file = []
listCommunityInfo(ids).then((response) => { listCommunityInfo(ids).then((response) => {
console.log('修改',response)
this.form = response.data; this.form = response.data;
this.form.file = response.data.file.split(',')
console.log("this.form.file", this.form.file);
this.imageUrl = this.pev + this.form.picUrl; this.imageUrl = this.pev + this.form.picUrl;
console.log(this.imageUrl, "this.imageUrl");
this.open = true; this.open = true;
this.title = "修改园区照片"; this.title = "修改园区照片";
}); });
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCheck(row) { handleCheck(row) {
this.uploadList = []
this.form.file = []
this.check = true; this.check = true;
this.open = true; this.open = true;
const ids = row.id || this.ids; const ids = row.id || this.ids;
listCommunityInfo(ids).then((response) => { listCommunityInfo(ids).then((response) => {
console.log('查看',response)
this.form = response.data; this.form = response.data;
this.form.file = response.data.file; console.log('this.form.file',this.form.file)
this.form.file = response.data.file.split(',');
console.log(this.form.file); console.log(this.form.file);
this.open = true; this.open = true;
}); });
...@@ -401,9 +419,19 @@ export default { ...@@ -401,9 +419,19 @@ export default {
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl = res.data.url;
console.log(file); console.log('Success res',res)
this.commonUpload(file); console.log('Success file',file)
if(res.code == 200){
this.uploadList.push( this.pev + res.fileName );
this.form.file = this.uploadList
console.log('this.uploadList',this.uploadList)
console.log('this.form.file',this.form.file)
}
// this.imageUrl = res.data.url;
// console.log(file);
// this.commonUpload(file);
}, },
// 上传前格式和图片大小限制 // 上传前格式和图片大小限制
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
...@@ -427,6 +455,7 @@ export default { ...@@ -427,6 +455,7 @@ export default {
}, },
// 上传图片 // 上传图片
uploadImage(file) { uploadImage(file) {
console.log('file',file)
const fileData = file.file; const fileData = file.file;
const formData = new FormData(); const formData = new FormData();
formData.append("file", fileData); formData.append("file", fileData);
...@@ -454,7 +483,8 @@ export default { ...@@ -454,7 +483,8 @@ export default {
const params = { const params = {
id: this.form.id, id: this.form.id,
theme: this.form.theme, theme: this.form.theme,
file: this.form.file, // file: this.form.file,
file:this.uploadList.toString()
}; };
console.log(params, "params"); console.log(params, "params");
editCommunityInfo(params) editCommunityInfo(params)
...@@ -469,7 +499,7 @@ export default { ...@@ -469,7 +499,7 @@ export default {
const params = { const params = {
cid: this.$route.query.id, cid: this.$route.query.id,
theme: this.form.theme, theme: this.form.theme,
file: this.form.file, file:this.uploadList.toString()
}; };
console.log(params, "params"); console.log(params, "params");
addCommunityInfo(params) addCommunityInfo(params)
......
...@@ -21,9 +21,9 @@ export default { ...@@ -21,9 +21,9 @@ export default {
}, },
created() { created() {
// 钉钉code码,正式时打开 // 钉钉code码,正式时打开
// this.getCode() this.getCode()
// token,测试用 // token,测试用
this.csToken() // this.csToken()
}, },
methods: { methods: {
// 获取code // 获取code
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
if (res.token) { if (res.token) {
setToken(res.token) setToken(res.token)
this.$store.commit('SET_TOKEN', res.token) this.$store.commit('SET_TOKEN', res.token)
// this.$router.push({ path: '/index' }); this.$router.push({ path: '/index' });
// 判断当前用户是否已拉取完user_info信息 // 判断当前用户是否已拉取完user_info信息
this.$store.dispatch('GetInfo').then((res) => { this.$store.dispatch('GetInfo').then((res) => {
this.$store.dispatch('GenerateRoutes').then(accessRoutes => { this.$store.dispatch('GenerateRoutes').then(accessRoutes => {
......
...@@ -44,10 +44,10 @@ module.exports = { ...@@ -44,10 +44,10 @@ module.exports = {
//target: ` http://43.143.63.140:8848`, //target: ` http://43.143.63.140:8848`,
//target: ` http://43.143.63.140:8095`, //target: ` http://43.143.63.140:8095`,
//部署时后端地址 //部署时后端地址
//target: `http://47.105.176.202:8137`, target: `http://47.105.176.202:5131`,
//学校内网 //学校内网
// target: `http://10.20.100.201:57321`, // target: `http://10.20.100.201:57321`,
target: `http://47.105.176.202:5112`, // target: `http://47.105.176.202:5112`,
// target: `http://192.168.1.113:8848`, // target: `http://192.168.1.113:8848`,
changeOrigin: true, changeOrigin: true,
......
...@@ -100,4 +100,5 @@ public class SchoolClass extends OurBaseEntity { ...@@ -100,4 +100,5 @@ public class SchoolClass extends OurBaseEntity {
"7=物理+地理+化学,8=物理+地理+生物,9=物理+化学+生物,10=物理+历史+地理,11=化学+政治+地理,12=化学+政治+历史" + "7=物理+地理+化学,8=物理+地理+生物,9=物理+化学+生物,10=物理+历史+地理,11=化学+政治+地理,12=化学+政治+历史" +
"13=化学+政治+生物,14=化学+历史+地理,15=化学+历史+生物,16=化学+地理+生物,17=生物+政治+地理,18=生物+历史+地理,19=生物+政治+历史,20=政治+历史+地理",width = 25) "13=化学+政治+生物,14=化学+历史+地理,15=化学+历史+生物,16=化学+地理+生物,17=生物+政治+地理,18=生物+历史+地理,19=生物+政治+历史,20=政治+历史+地理",width = 25)
private String chooseCourse; private String chooseCourse;
private String ddClassId;
} }
...@@ -36,4 +36,7 @@ public class SchoolGrade extends OurBaseEntity { ...@@ -36,4 +36,7 @@ public class SchoolGrade extends OurBaseEntity {
/** 级部名称 */ /** 级部名称 */
@Excel(name = "级部名称") @Excel(name = "级部名称")
private String gradeName; private String gradeName;
private String ddClassId;
} }
...@@ -147,6 +147,8 @@ public class SchoolStudent extends OurBaseEntity { ...@@ -147,6 +147,8 @@ public class SchoolStudent extends OurBaseEntity {
private String support; private String support;
//独生子女(0否 1是) //独生子女(0否 1是)
private String onlyChild; private String onlyChild;
//钉钉userId
private String ddUserId;
/* /*
* 校园一卡通 * 校园一卡通
......
...@@ -43,6 +43,9 @@ public interface SchoolClassMapper extends BaseMapper<SchoolClass> { ...@@ -43,6 +43,9 @@ public interface SchoolClassMapper extends BaseMapper<SchoolClass> {
* @return * @return
*/ */
List<SchoolClassVo> getUserClassByTeacher(Long teacherId); List<SchoolClassVo> getUserClassByTeacher(Long teacherId);
List<SchoolClassVo> selectSchoolClassSchoolYear(String schoolYear);
List<SchoolClassVo> getTeacherClass(@Param("teacherId") Long teacherId, List<SchoolClassVo> getTeacherClass(@Param("teacherId") Long teacherId,
@Param("schoolYear") int schoolYear); @Param("schoolYear") int schoolYear);
...@@ -63,4 +66,6 @@ public interface SchoolClassMapper extends BaseMapper<SchoolClass> { ...@@ -63,4 +66,6 @@ public interface SchoolClassMapper extends BaseMapper<SchoolClass> {
* 获取本级部下的班级 * 获取本级部下的班级
* */ * */
List<Long> getClassesIdByGradeId(Long gradeId); List<Long> getClassesIdByGradeId(Long gradeId);
public Long selectDdClassId(String ddClssId);
} }
...@@ -31,4 +31,6 @@ public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> { ...@@ -31,4 +31,6 @@ public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> {
public List<String> getYearList(); public List<String> getYearList();
List<SchoolGrade> selectNowSchoolGrade(); List<SchoolGrade> selectNowSchoolGrade();
public Long selectDdClassId(String ddClssId);
} }
...@@ -151,6 +151,12 @@ public class SchoolClassImpl extends ServiceImpl<SchoolClassMapper, SchoolClass> ...@@ -151,6 +151,12 @@ public class SchoolClassImpl extends ServiceImpl<SchoolClassMapper, SchoolClass>
return schoolClassMapper.getTeacherClass(teacherId,schoolYear); return schoolClassMapper.getTeacherClass(teacherId,schoolYear);
} }
@Override
public List<SchoolClassVo> selectSchoolClassSchoolYear(String schoolYear) {
return schoolClassMapper.selectSchoolClassSchoolYear(schoolYear);
}
@Override @Override
public void checkImport(List<SchoolClassDrVo> list) { public void checkImport(List<SchoolClassDrVo> list) {
//是否为空 //是否为空
...@@ -2427,4 +2433,8 @@ public class SchoolClassImpl extends ServiceImpl<SchoolClassMapper, SchoolClass> ...@@ -2427,4 +2433,8 @@ public class SchoolClassImpl extends ServiceImpl<SchoolClassMapper, SchoolClass>
} }
@Override
public Long selectDdClassId(String ddId) {
return schoolClassMapper.selectDdClassId(ddId);
}
} }
...@@ -8,15 +8,19 @@ import com.ruoyi.common.utils.DateUtils; ...@@ -8,15 +8,19 @@ 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;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolEquipment.SchoolCirculation; import yangtz.cs.liu.campus.domain.schoolEquipment.SchoolCirculation;
import yangtz.cs.liu.campus.domain.schoolEquipment.SchoolEquipmentLedger;
import yangtz.cs.liu.campus.mapper.schoolEquipment.CirculationMapper; import yangtz.cs.liu.campus.mapper.schoolEquipment.CirculationMapper;
import yangtz.cs.liu.campus.mapper.schoolEquipment.EquipmentLedgerMapper;
import yangtz.cs.liu.campus.service.schoolEquipment.ICirculationService; import yangtz.cs.liu.campus.service.schoolEquipment.ICirculationService;
import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolCirculationVo; import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolCirculationVo;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolReceiveQuery; import yangtz.cs.liu.campus.vo.schoolEquipment.SchoolReceiveQuery;
...@@ -28,6 +32,8 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -28,6 +32,8 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
private CirculationMapper circulationMapper; private CirculationMapper circulationMapper;
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Autowired
private EquipmentLedgerMapper equipmentLedgerMapper;
@Override @Override
public List<SchoolCirculationVo> getReturningEquipmentByadminId(SchoolReceiveQuery schoolReceiveQuery) { public List<SchoolCirculationVo> getReturningEquipmentByadminId(SchoolReceiveQuery schoolReceiveQuery) {
...@@ -100,6 +106,15 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -100,6 +106,15 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
String userName = sysUserMapper.selectUserById(schoolCirculation.getReceivedById()).getUserName(); String userName = sysUserMapper.selectUserById(schoolCirculation.getReceivedById()).getUserName();
schoolCirculation.setReceivedBy(userName); schoolCirculation.setReceivedBy(userName);
} }
if (StringUtils.isNotNull(schoolCirculation.getReturnTime())){
if (schoolCirculation.getReturnTime().before(DateUtils.getNowDate()) || schoolCirculation.getReturnTime().equals(DateUtils.getNowDate())){
schoolCirculation.setReturnState("1");
SchoolEquipmentLedger schoolEquipmentLedger = new SchoolEquipmentLedger();
schoolEquipmentLedger.setId(schoolCirculation.getEquipmentId());
schoolEquipmentLedger.setIsLend("0");
equipmentLedgerMapper.updateById(schoolEquipmentLedger);
}
}
schoolCirculation.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName()); schoolCirculation.setCreateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolCirculation.setCreateTime(DateUtils.getNowDate()); schoolCirculation.setCreateTime(DateUtils.getNowDate());
return circulationMapper.insert(schoolCirculation); return circulationMapper.insert(schoolCirculation);
...@@ -121,6 +136,15 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -121,6 +136,15 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
String userName = sysUserMapper.selectUserById(schoolCirculation.getReceivedById()).getUserName(); String userName = sysUserMapper.selectUserById(schoolCirculation.getReceivedById()).getUserName();
schoolCirculation.setReceivedBy(userName); schoolCirculation.setReceivedBy(userName);
} }
if (StringUtils.isNotNull(schoolCirculation.getReturnTime())){
if (schoolCirculation.getReturnTime().before(DateUtils.getNowDate()) || schoolCirculation.getReturnTime().equals(DateUtils.getNowDate())){
schoolCirculation.setReturnState("1");
SchoolEquipmentLedger schoolEquipmentLedger = new SchoolEquipmentLedger();
schoolEquipmentLedger.setId(schoolCirculation.getEquipmentId());
schoolEquipmentLedger.setIsLend("0");
equipmentLedgerMapper.updateById(schoolEquipmentLedger);
}
}
schoolCirculation.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName()); schoolCirculation.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolCirculation.setUpdateTime(DateUtils.getNowDate()); schoolCirculation.setUpdateTime(DateUtils.getNowDate());
return circulationMapper.updateById(schoolCirculation); return circulationMapper.updateById(schoolCirculation);
......
...@@ -20,6 +20,7 @@ import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper; ...@@ -20,6 +20,7 @@ import yangtz.cs.liu.campus.mapper.schoolLab.SchoolTeacherExperimentApplyMapper;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper; import yangtz.cs.liu.campus.mapper.schoolLab.SchoollTeacherExperimentApplyLabsMapper;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoollTeacherExperimentApplyLabsService;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolTeacherExperimentApplyVo;
/** /**
...@@ -33,7 +34,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -33,7 +34,8 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
{ {
@Autowired @Autowired
private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper; private SchoolTeacherExperimentApplyMapper schoolTeacherExperimentApplyMapper;
@Autowired
private ISchoollTeacherExperimentApplyLabsService schoollTeacherExperimentApplyLabsService;
/** /**
* 查询教师个人实验申请 * 查询教师个人实验申请
* *
...@@ -43,7 +45,12 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -43,7 +45,12 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
@Override @Override
public SchoolTeacherExperimentApplyVo selectSchoolTeacherExperimentApplyById(Long id) public SchoolTeacherExperimentApplyVo selectSchoolTeacherExperimentApplyById(Long id)
{ {
return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyById(id); SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo = schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyById(id);
LambdaQueryWrapper<SchoolTeacherExperimentApplyLabs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,schoolTeacherExperimentApplyVo.getId());
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
schoolTeacherExperimentApplyVo.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
return schoolTeacherExperimentApplyVo;
} }
/** /**
...@@ -55,7 +62,14 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT ...@@ -55,7 +62,14 @@ public class SchoolTeacherExperimentApplyServiceImpl extends ServiceImpl<SchoolT
@Override @Override
public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo) public List<SchoolTeacherExperimentApplyVo> selectSchoolTeacherExperimentApplyList(SchoolTeacherExperimentApplyVo schoolTeacherExperimentApplyVo)
{ {
return schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo); List<SchoolTeacherExperimentApplyVo> schoolTeacherExperimentApplyVos = schoolTeacherExperimentApplyMapper.selectSchoolTeacherExperimentApplyList(schoolTeacherExperimentApplyVo);
for ( SchoolTeacherExperimentApplyVo date : schoolTeacherExperimentApplyVos){
LambdaQueryWrapper<SchoolTeacherExperimentApplyLabs> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolTeacherExperimentApplyLabs::getTeacherExperimentApplyId,date.getId());
List<SchoolTeacherExperimentApplyLabs> schoolTeacherExperimentApplyLabs = schoollTeacherExperimentApplyLabsService.list(wrapper);
date.setSchoolTeacherExperimentApplyLabsList(schoolTeacherExperimentApplyLabs);
}
return schoolTeacherExperimentApplyVos;
} }
@Override @Override
......
...@@ -80,6 +80,7 @@ public class ISchoolGradeImpl extends ServiceImpl<SchoolGradeMapper, SchoolGrade ...@@ -80,6 +80,7 @@ public class ISchoolGradeImpl extends ServiceImpl<SchoolGradeMapper, SchoolGrade
//如果是级部成员 //如果是级部成员
List<Long> ids = schoolGradeMapper.getMemberGradeId(userId, schoolYear); List<Long> ids = schoolGradeMapper.getMemberGradeId(userId, schoolYear);
if (StringUtils.isNull(ids) || ids.size() == 0) { if (StringUtils.isNull(ids) || ids.size() == 0) {
throw new ServiceException("当前学年为" + schoolYear + "学年,该学年没有您所在的级部信息"); throw new ServiceException("当前学年为" + schoolYear + "学年,该学年没有您所在的级部信息");
} }
return ids.get(0); return ids.get(0);
...@@ -237,4 +238,9 @@ public class ISchoolGradeImpl extends ServiceImpl<SchoolGradeMapper, SchoolGrade ...@@ -237,4 +238,9 @@ public class ISchoolGradeImpl extends ServiceImpl<SchoolGradeMapper, SchoolGrade
public int isNewSchoolYear() { public int isNewSchoolYear() {
return schoolGradeMapper.isNewSchoolYear(); return schoolGradeMapper.isNewSchoolYear();
} }
@Override
public Long selectDdClassId(String ddId) {
return schoolGradeMapper.selectDdClassId(ddId);
}
} }
...@@ -16,10 +16,8 @@ import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesNoticeService; ...@@ -16,10 +16,8 @@ import yangtz.cs.liu.campus.service.teacherFiles.ITeacherFilesNoticeService;
import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo; import yangtz.cs.liu.campus.vo.teacherFiles.SchoolClassByGradeVo;
import yangtz.cs.liu.campus.vo.teacherFiles.SchoolGradeByClassVo; import yangtz.cs.liu.campus.vo.teacherFiles.SchoolGradeByClassVo;
import java.util.HashMap; import java.text.SimpleDateFormat;
import java.util.List; import java.util.*;
import java.util.Map;
import java.util.UUID;
/** /**
...@@ -178,7 +176,15 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService ...@@ -178,7 +176,15 @@ public class TeacherFilesNoticeServiceImpl implements ITeacherFilesNoticeService
teacherFiles.setIdCard(schoolTeacher.getIdCard()); teacherFiles.setIdCard(schoolTeacher.getIdCard());
teacherFiles.setSex(schoolTeacher.getSex()); teacherFiles.setSex(schoolTeacher.getSex());
teacherFiles.setEducation(schoolTeacher.getEducation()); teacherFiles.setEducation(schoolTeacher.getEducation());
teacherFiles.setAge(1); System.out.println(schoolTeacher.getTeacherName()+"---------"+schoolTeacher.getBirthday());
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.setTitle("");
teacherFiles.setAppearance(""); teacherFiles.setAppearance("");
return teacherFiles; return teacherFiles;
......
...@@ -39,6 +39,9 @@ public interface ISchoolClassService extends IService<SchoolClass> { ...@@ -39,6 +39,9 @@ public interface ISchoolClassService extends IService<SchoolClass> {
List<SchoolClassVo> getTeacherClass(Long teacherId); List<SchoolClassVo> getTeacherClass(Long teacherId);
List<SchoolClassVo> selectSchoolClassSchoolYear(String schoolYear);
// /** // /**
// * 校验 // * 校验
// * @param list // * @param list
...@@ -88,4 +91,8 @@ public interface ISchoolClassService extends IService<SchoolClass> { ...@@ -88,4 +91,8 @@ public interface ISchoolClassService extends IService<SchoolClass> {
/**批量新增班级*/ /**批量新增班级*/
int batchAdd(ClassBatchVo vo); int batchAdd(ClassBatchVo vo);
Long selectDdClassId(String ddId);
} }
...@@ -25,5 +25,6 @@ public interface ISchoolGradeService extends IService<SchoolGrade> { ...@@ -25,5 +25,6 @@ public interface ISchoolGradeService extends IService<SchoolGrade> {
//获取最新学年 //获取最新学年
int isNewSchoolYear(); int isNewSchoolYear();
Long selectDdClassId(String ddId);
} }
...@@ -301,4 +301,5 @@ public class SchoolStudentVO { ...@@ -301,4 +301,5 @@ public class SchoolStudentVO {
//教务-学生管理-学籍表-所在年级 //教务-学生管理-学籍表-所在年级
private String currentGrade; private String currentGrade;
private String ddUserId;
} }
...@@ -5,10 +5,17 @@ package yangtz.cs.liu.dingding.config; ...@@ -5,10 +5,17 @@ package yangtz.cs.liu.dingding.config;
*/ */
public class Constant { public class Constant {
//测试 事件回调配置
public static final String AES_TOKEN="jGt2S7Kqh475czbgxtr7j1cQsXHWYia"; public static final String AES_TOKEN="jGt2S7Kqh475czbgxtr7j1cQsXHWYia";
public static final String AES_KEY="hz6q2qTgLGD5SHWLvVddOm9HfvrKgKBcDCCf145egyi"; public static final String AES_KEY="hz6q2qTgLGD5SHWLvVddOm9HfvrKgKBcDCCf145egyi";
public static final String OWNER_KEY = "dingclpf8qoxvinhksyh"; public static final String OWNER_KEY = "dingclpf8qoxvinhksyh";
//正式 事件回调配置
// public static final String AES_TOKEN="awLoV2xJlrg6xUK3wQIF88HhVuSVS7Tmpb5MKFI1j7DaLKcn";
//
// public static final String AES_KEY="xGO08pQerwFgBOcabx2eUxLUrAOwa5Q2FJtdylY7ksf";
//
// public static final String OWNER_KEY = "dingggqchzyvxm9e6e7v";
} }
...@@ -115,8 +115,9 @@ public class DdAppLoginController { ...@@ -115,8 +115,9 @@ public class DdAppLoginController {
wxLoginBody.setOpenId(unionId); wxLoginBody.setOpenId(unionId);
wxLoginBody.setParentTelephone(sysUser.getPhonenumber()); wxLoginBody.setParentTelephone(sysUser.getPhonenumber());
if (null != sysUser.getStudentId()){ if (null != sysUser.getStudentId()){
SchoolStudent schoolStudent = schoolStudentMapper.selectByIdCard(sysUser.getStudentId().toString()); SchoolStudent schoolStudent = schoolStudentMapper.selectById(sysUser.getStudentId().toString());
wxLoginBody.setStudentIdCard(schoolStudent.getIdCard()); wxLoginBody.setStudentIdCard(schoolStudent.getIdCard());
wxLoginBody.setStudentName(schoolStudent.getStudentName());
} }
wxLoginBody.setParentName(sysUser.getUserName()); wxLoginBody.setParentName(sysUser.getUserName());
wxLoginBody.setTeacherName(sysUser.getUserName()); wxLoginBody.setTeacherName(sysUser.getUserName());
......
package yangtz.cs.liu.dingding.vo;
import lombok.Data;
import java.util.List;
@Data
public class DingJiaXiaoVo {
/**
* 年纪id
*/
Integer gradeId;
/**
* 年纪名称
*/
String gradeName;
/**
* 班级信息
*/
List<ClassInfo> classInfoList;
/**
* 班级信息
*/
@Data
public class ClassInfo{
/**
* 班级id
*/
Integer classId;
/**
* 年纪名称
*/
String className;
/**
* 学生信息
*/
List<StudentUserInfo> studentUserInfos;
/**
* 老师信息
*/
List<StudentUserInfo> teacherUserInfos;
/**
* 监护人信息
*/
List<StudentUserInfo> guardianUserInfos;
}
/**
* 学生信息
*/
@Data
public class StudentUserInfo{
/**
* 班级id
*/
Integer classId;
/**
* 人员的userId。
*/
String userId;
/**
* 人员姓名。
*/
String name;
/**
* 人员的unionId,无手机号的学生为""。
*/
String unionid;
/**
* 家校人员角色。
* teacher:老师
* guardian:监护人
* student:学生
*/
String role;
/**
* 只在老师角色下意义。
* 1:班主任
* 0:非班主任
*/
String isAdviser;
/**
* 学号,只有在学生角色下才有意义,并且需确认各个班级的设置,如果没有设置,则不会返回此字段。
*/
String studentNo;
/**
* 手机号
*/
String mobile;
}
}
...@@ -3,14 +3,19 @@ package yangtz.cs.liu.wechat.controller.experiment; ...@@ -3,14 +3,19 @@ package yangtz.cs.liu.wechat.controller.experiment;
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;
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.core.domain.model.MpLoginUser;
import com.ruoyi.framework.util.UserInfoUtil; import com.ruoyi.framework.util.UserInfoUtil;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabClassYear;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherExperimentApply;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply; import yangtz.cs.liu.campus.domain.schoolLab.SchoolTeacherLabApply;
import yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolLabClassYearService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherExperimentApplyService;
import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService; import yangtz.cs.liu.campus.service.schoolLab.ISchoolTeacherLabApplyService;
...@@ -38,6 +43,10 @@ public class TeacherExperimentController extends BaseController { ...@@ -38,6 +43,10 @@ public class TeacherExperimentController extends BaseController {
@Autowired @Autowired
ISchoolLabClassYearService schoolLabClassYearService; ISchoolLabClassYearService schoolLabClassYearService;
//学校班级
@Autowired
ISchoolClassService iSchoolClassService;
/** /**
* 个人申请记录 * 个人申请记录
*/ */
...@@ -89,6 +98,11 @@ public class TeacherExperimentController extends BaseController { ...@@ -89,6 +98,11 @@ public class TeacherExperimentController extends BaseController {
@Autowired @Autowired
ISysUserService userService; ISysUserService userService;
@Autowired
ISysRoleService roleService;
@Autowired
ISysDictDataService dictDataService;
/** /**
* 获取班级 * 获取班级
*/ */
...@@ -139,6 +153,28 @@ public class TeacherExperimentController extends BaseController { ...@@ -139,6 +153,28 @@ public class TeacherExperimentController extends BaseController {
} }
/** /**
* 获取当前登录角色学科
*/
@GetMapping("/getSubject")
public AjaxResult getSubject(){
Long userId = userInfoUtil.getMpLoginUser().getUserId();
List<SysRole> sysRoles = roleService.selectRolesByUserIdDdApp(userId);
for (SysRole role : sysRoles) {
if (role.getRoleKey().equals("phy_lab_admin")){
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","1"));
}else if (role.getRoleKey().equals("che_lab_admin")){
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","2"));
}else if (role.getRoleKey().equals("bio_lab_admin")){
return AjaxResult.success(dictDataService.selectDictLabel("lab_sub","3"));
}
}
return AjaxResult.success("当前用户未分配学科角色");
}
/**
*新增申请 *新增申请
*/ */
@PostMapping("/apply/add") @PostMapping("/apply/add")
...@@ -170,7 +206,7 @@ public class TeacherExperimentController extends BaseController { ...@@ -170,7 +206,7 @@ public class TeacherExperimentController extends BaseController {
/** /**
* 删除教师个人实验申请 * 删除教师个人实验申请
*/ */
@PostMapping("/apply/{ids}") @DeleteMapping("/apply/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(schoolTeacherExperimentApplyService.deleteSchoolTeacherExperimentApplyByIds(ids)); return toAjax(schoolTeacherExperimentApplyService.deleteSchoolTeacherExperimentApplyByIds(ids));
......
...@@ -38,6 +38,16 @@ ...@@ -38,6 +38,16 @@
order by g.grade_value, g.class_value order by g.grade_value, g.class_value
</select> </select>
<select id="selectSchoolClassSchoolYear" resultMap="SchoolClassResult">
select g.grade_value, g.grade_name, g.class_value, g.class_name, g.school_year, g.id
from school_class g
where g.del_flag = '0'
and g.school_year = #{schoolYear}
order by g.grade_value, g.class_value
</select>
<select id="getUserClassByParent" resultType="SchoolClass"> <select id="getUserClassByParent" resultType="SchoolClass">
SELECT sg.pic_url, SELECT sg.pic_url,
sg.class_value, sg.class_value,
...@@ -149,4 +159,9 @@ ...@@ -149,4 +159,9 @@
where del_flag = '0' and grade_id = #{gradeId} where del_flag = '0' and grade_id = #{gradeId}
</select> </select>
<select id="selectDdClassId" resultType="java.lang.Long">
select sg.id from school_class_copy sg
where sg.del_flag = '0' and sg.dd_class_id=#{ddClssId}
</select>
</mapper> </mapper>
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<if test="applyName != null and applyName != ''"> and tla.apply_name like concat('%', #{applyName}, '%')</if> <if test="applyName != null and applyName != ''"> and tla.apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and tla.apply_time = #{applyTime}</if> <if test="applyTime != null "> and tla.apply_time = #{applyTime}</if>
<if test="state != null "> and tla.state = #{state}</if> <if test="state != null "> and tla.state = #{state}</if>
<if test="querText != null ">
and concat(tla.experiment_name,tla.grade) like concat('%', #{querText}, '%')
</if>
<if test="subs != null "> <if test="subs != null ">
and tla.sub in and tla.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")"> <foreach item="sub" collection="subs" open="(" separator="," close=")">
......
...@@ -54,5 +54,8 @@ ...@@ -54,5 +54,8 @@
<include refid="selectSchoolGradeVo"/> <include refid="selectSchoolGradeVo"/>
where school_year = (select max(school_year) from school_grade ) where school_year = (select max(school_year) from school_grade )
</select> </select>
<select id="selectDdClassId" resultType="java.lang.Long">
select sg.id from school_grade_copy sg
where sg.del_flag = '0' and sg.dd_class_id=#{ddClssId}
</select>
</mapper> </mapper>
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<result property="appearance" column="appearance"/> <result property="appearance" column="appearance"/>
<result property="registeredAddress" column="registered_address"/> <result property="registeredAddress" column="registered_address"/>
<result property="registeredType" column="registered_type"/> <result property="registeredType" column="registered_type"/>
<result property="ddUserId" column="dd_user_id"/>
</resultMap> </resultMap>
<sql id="selectSchoolStudentVo"> <sql id="selectSchoolStudentVo">
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
native_place, native_place,
avatar, avatar,
id_card, id_card,
dd_user_id,
school_no, school_no,
student_status, student_status,
student_type, student_type,
...@@ -72,6 +74,7 @@ ...@@ -72,6 +74,7 @@
<if test="studentStatus != null">student_status,</if> <if test="studentStatus != null">student_status,</if>
<if test="studentType != null">student_type,</if> <if test="studentType != null">student_type,</if>
<if test="oneCard != null and oneCard != ''">one_card,</if> <if test="oneCard != null and oneCard != ''">one_card,</if>
<if test="ddUserId != null and oneCard != ''">dd_user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="classId != null">#{classId},</if> <if test="classId != null">#{classId},</if>
...@@ -90,6 +93,7 @@ ...@@ -90,6 +93,7 @@
<if test="studentStatus != null">#{studentStatus},</if> <if test="studentStatus != null">#{studentStatus},</if>
<if test="studentType != null">#{studentType},</if> <if test="studentType != null">#{studentType},</if>
<if test="oneCard != null and oneCard != ''">#{oneCard},</if> <if test="oneCard != null and oneCard != ''">#{oneCard},</if>
<if test="ddUserId != null and ddUserId != ''">#{ddUserId},</if>
</trim> </trim>
</insert> </insert>
...@@ -100,7 +104,7 @@ ...@@ -100,7 +104,7 @@
<select id="queryList" parameterType="SchoolStudentVO" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO"> <select id="queryList" parameterType="SchoolStudentVO" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO">
select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code, select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code,
ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address, ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address,
ss.native_place, ss.avatar, ss.id_card,ss.school_no, ss.student_status, ss.platform, ss.native_place, ss.avatar,ss.dd_user_id, ss.id_card,ss.school_no, ss.student_status, ss.platform,
ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages, ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages,
ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child, ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child,
ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type, ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type,
...@@ -123,6 +127,7 @@ ...@@ -123,6 +127,7 @@
<if test="schoolNo != null and schoolNo != ''">and ss.school_no like concat('%', #{schoolNo}, '%')</if> <if test="schoolNo != null and schoolNo != ''">and ss.school_no like concat('%', #{schoolNo}, '%')</if>
<if test="studentStatus != null and studentStatus !=''">and ss.student_status = #{studentStatus}</if> <if test="studentStatus != null and studentStatus !=''">and ss.student_status = #{studentStatus}</if>
<if test="studentType != null and studentType !=''">and ss.student_type = #{studentType}</if> <if test="studentType != null and studentType !=''">and ss.student_type = #{studentType}</if>
<if test="ddUserId != null and ddUserId !=''">and ss.dd_user_id = #{ddUserId}</if>
</where> </where>
order by ss.class_id asc order by ss.class_id asc
</select> </select>
...@@ -146,6 +151,7 @@ ...@@ -146,6 +151,7 @@
<if test="studentStatus != null and studentStatus !=''">and student_status = #{studentStatus}</if> <if test="studentStatus != null and studentStatus !=''">and student_status = #{studentStatus}</if>
<if test="studentType != null and studentType !=''">and student_type = #{studentType}</if> <if test="studentType != null and studentType !=''">and student_type = #{studentType}</if>
<if test="oneCard != null and oneCard !=''">and one_card = #{oneCard}</if> <if test="oneCard != null and oneCard !=''">and one_card = #{oneCard}</if>
<if test="ddUserId != null and ddUserId !=''">and dd_user_id = #{ddUserId}</if>
and del_flag = '0' and del_flag = '0'
</where> </where>
order by create_time desc order by create_time desc
...@@ -179,6 +185,7 @@ ...@@ -179,6 +185,7 @@
ss.student_type, ss.student_type,
ss.one_card, ss.one_card,
sg.class_alias sg.class_alias
sg.dd_user_id
FROM school_student ss FROM school_student ss
LEFT JOIN school_class sg ON sg.id = ss.class_id LEFT JOIN school_class sg ON sg.id = ss.class_id
LEFT JOIN school_teacher st ON st.id = sg.teacher_id LEFT JOIN school_teacher st ON st.id = sg.teacher_id
...@@ -213,6 +220,7 @@ ...@@ -213,6 +220,7 @@
ssp.parent_name, ssp.parent_name,
ssp.relationship, ssp.relationship,
ssp.telephone ssp.telephone
ssp.dd_user_id
FROM school_student s FROM school_student s
LEFT JOIN school_class sg on sg.id = s.class_id LEFT JOIN school_class sg on sg.id = s.class_id
LEFT JOIN school_student_parent ssp on ssp.student_id = s.id LEFT JOIN school_student_parent ssp on ssp.student_id = s.id
...@@ -244,7 +252,7 @@ ...@@ -244,7 +252,7 @@
<select id="getInfo" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO"> <select id="getInfo" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO">
select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code, select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code,
ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address, ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address,
ss.native_place, ss.avatar, ss.id_card,ss.school_no, ss.student_status, ss.platform, ss.native_place, ss.avatar,ss.dd_user_id, ss.id_card,ss.school_no, ss.student_status, ss.platform,
ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages, ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages,
ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child, ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child,
ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type, ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type,
...@@ -284,7 +292,7 @@ ...@@ -284,7 +292,7 @@
<select id="getInfoByidCard" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO"> <select id="getInfoByidCard" resultType="yangtz.cs.liu.campus.vo.student.SchoolStudentVO">
select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code, select ss.id,ss.class_id,ss.student_name,ss.sex,ss.birthday,ss.nation,ss.stu_telephone,ss.postal_code,
ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address, ss.nature,ss.provincial_number,ss.national_number,ss.enrollment_year,ss.home_address,
ss.native_place,sc.school_year, ss.avatar, ss.id_card,ss.school_no, ss.student_status,ss.platform, ss.native_place,sc.school_year, ss.dd_user_id,ss.avatar, ss.id_card,ss.school_no, ss.student_status,ss.platform,
ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages, ss.birth_address,ss.postal_address,ss.junior_school,ss.region,ss.foreign_languages,
ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child, ss.blood_type,ss.health,ss.other_regions,ss.floating_population,ss.support,ss.only_child,
ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type, ss.student_type, ss.one_card, ss.enrollment_time, ss.appearance, ss.registered_address, ss.registered_type,
...@@ -314,6 +322,7 @@ ...@@ -314,6 +322,7 @@
<if test="data.studentStatus != null and data.studentStatus != ''">student_status,</if> <if test="data.studentStatus != null and data.studentStatus != ''">student_status,</if>
<if test="data.studentType != null and data.studentType != ''">student_type,</if> <if test="data.studentType != null and data.studentType != ''">student_type,</if>
<if test="data.oneCard != null and data.oneCard != ''">one_card,</if> <if test="data.oneCard != null and data.oneCard != ''">one_card,</if>
<if test="data.ddUserId != null and data.ddUserId != ''">dd_user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="data.classId != null">#{data.classId},</if> <if test="data.classId != null">#{data.classId},</if>
...@@ -330,6 +339,7 @@ ...@@ -330,6 +339,7 @@
<if test="data.studentStatus != null and data.studentStatus != ''">#{data.studentStatus},</if> <if test="data.studentStatus != null and data.studentStatus != ''">#{data.studentStatus},</if>
<if test="data.studentType != null and data.studentType != ''">#{data.studentType},</if> <if test="data.studentType != null and data.studentType != ''">#{data.studentType},</if>
<if test="data.oneCard != null and data.oneCard != ''">#{data.oneCard},</if> <if test="data.oneCard != null and data.oneCard != ''">#{data.oneCard},</if>
<if test="data.ddUserId != null and data.ddUserId != ''">#{data.ddUserId},</if>
</trim> </trim>
</foreach> </foreach>
</insert> </insert>
......
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