Commit 29b98245 by peijy

Merge remote-tracking branch 'origin/master'

parents 220e2cf5 042e1a10
...@@ -50,4 +50,14 @@ public class ProcessDefinition { ...@@ -50,4 +50,14 @@ public class ProcessDefinition {
*/ */
public static final String PURCHASEREQUEST = "schoolPurchase"; public static final String PURCHASEREQUEST = "schoolPurchase";
/**
* 礼堂预约申请流程
*/
public static final String AUDITORIUMAPPLY = "auditoriumApply";
/**
* 科室预算申请流程
*/
public static final String DEPARTMENTBUDGET = "departmentBudget";
} }
...@@ -11,6 +11,21 @@ public class ProcessVariables { ...@@ -11,6 +11,21 @@ public class ProcessVariables {
public static final String APPLYUSER = "applyUser"; public static final String APPLYUSER = "applyUser";
/** /**
* 礼堂预约申请分管领导
*/
public static final String LEADERSHIPID = "leadershipId";
/**
* 科室预算申请人
*/
public static final String DEPARTMENTAPPLYUSERID = "departmentApplyUserId";
/**
* 科室预算申请分管领导
*/
public static final String DEPARTMENTUSERID = "departmentUserId";
/**
* 教师请假级部/处室主任 * 教师请假级部/处室主任
* */ * */
public static final String HANDUSERID1 = "handUserId1"; public static final String HANDUSERID1 = "handUserId1";
......
import request from "@/utils/request";
// 礼堂申请审批待办列表
export function audiDetail(data) {
return request({
url: "/auditorium/taskList",
method: "get",
data: data,
});
}
/** 礼堂预约申请审批*/
export function completelt({ taskId, instanceId, comment, pass }) {
return request({
url: `/auditorium/complete/${taskId}/${instanceId}`,
method: "post",
data: {
comment,
pass,
},
});
}
// 查询礼堂申请已办列表
export function taskDoneList() {
return request({
url: "/auditorium/taskDoneList",
method: "get",
});
}
import request from "@/utils/request";
// 查看科室预算待办列表
export function departiDetail(data) {
return request({
url: "/departmentBudget/taskList",
method: "get",
data: data,
});
}
/** 科室预算填报审批*/
export function complete({ taskId, instanceId, comment, pass }) {
return request({
url: `departmentBudget/complete/${taskId}/${instanceId}`,
method: "post",
data: {
comment,
pass,
},
});
}
// 查看科室预算已办列表
export function taskDoneList() {
return request({
url: "/departmentBudget/taskDoneList",
method: "get",
});
}
import request from "@/utils/request"; import request from "@/utils/request";
//查询列表 //查询列表
export function getListlb(query) { export function getListlb(query) {
const { budgetName, purchaseName } = query;
return request({ return request({
url: "/purchaseApproval/selectPurchaseList", url: `/purchaseApproval/selectPurchaseList?budgetName=${budgetName}&purchaseName=${purchaseName}`,
method: "get", method: "get",
params: query,
}); });
} }
// 查看详情 // 查看详情
......
...@@ -40,3 +40,10 @@ export function deleteDepart(id) { ...@@ -40,3 +40,10 @@ export function deleteDepart(id) {
method: "delete", method: "delete",
}); });
} }
// 提交申请
export function submitApply(id) {
return request({
url: "/departmentBudget/submitApply/" + id,
method: "post",
});
}
...@@ -3,13 +3,12 @@ import request from "@/utils/request"; ...@@ -3,13 +3,12 @@ import request from "@/utils/request";
// 查询礼堂预约列表 // 查询礼堂预约列表
export function listAuditor(query) { export function listAuditor(query) {
return request({ return request({
url: "/auditorium/list", url: "/auditorium/listGr",
method: "get", method: "get",
params: query, params: query,
}); });
} }
// 新增礼堂预约 // 新增礼堂预约
export function addAuditor(data) { export function addAuditor(data) {
return request({ return request({
...@@ -51,16 +50,11 @@ export function submitAuditor(id) { ...@@ -51,16 +50,11 @@ export function submitAuditor(id) {
}); });
} }
//获取校领导下拉框 //获取校领导下拉框
export function getGradeOfficeDirectorList() { export function getLeaderList(data) {
return request({ return request({
url: "/school/teacherLeave/getSchoolLeader" , url: "/school/teacherLeave/getSchoolLeader",
params: form,
method: "get", method: "get",
params: data,
}); });
} }
...@@ -18,9 +18,9 @@ export function getAppointmentList(data) { ...@@ -18,9 +18,9 @@ export function getAppointmentList(data) {
}); });
} }
// 查询录播室使用情况 // 查询录播室使用情况
export function getstudioUse() { export function getstudioUse(startTime, studioId) {
return request({ return request({
url: "/studioUse/list", url: "/studioUse/list?startTime=" + startTime + "&studioId=" + studioId,
method: "get", method: "get",
}); });
} }
...@@ -46,13 +46,13 @@ export const approves = [ ...@@ -46,13 +46,13 @@ export const approves = [
}, },
{ {
label: "礼堂申请审批", label: "礼堂申请审批",
name: "audApplicationapproval", name: "auditoriumNum",
icon: "food", icon: "food",
path: "/indexMould/myTask/audApplicationapproval", path: "/indexMould/myTask/audApplicationapproval",
}, },
{ {
label: "科室预算审批", label: "科室预算审批",
name: "depBudgetapproval", name: "departmentBudgetNum",
icon: "teacher", icon: "teacher",
path: "/indexMould/myTask/depBudgetapproval", path: "/indexMould/myTask/depBudgetapproval",
}, },
......
<template> <template>
<!-- 办理 -->
<div style="height: 100%;"> <div style="height: 100%;">
<el-dialog :visible.sync="open" :modal="false" :fullscreen="true" :modal-append-to-body="false" :show-close="false"> <el-dialog :visible.sync="open" :modal="false" :fullscreen="true" :modal-append-to-body="false" :show-close="false">
<template slot="title"> <template slot="title">
......
<template> <template>
<!-- 历史 -->
<div style="height: 100%;"> <div style="height: 100%;">
<el-dialog :visible.sync="open" :modal="false" :fullscreen="true" :modal-append-to-body="false" :show-close="false"> <el-dialog :visible.sync="open" :modal="false" :fullscreen="true" :modal-append-to-body="false" :show-close="false">
<template slot="title"> <template slot="title">
......
...@@ -8,30 +8,38 @@ ...@@ -8,30 +8,38 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="活动名称"> <el-form-item label="活动名称">
<el-input :value="infoForm.purchaseName"></el-input> <el-input :value="infoForm.activityName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动地点"> <el-form-item label="活动场地">
<el-input :value="infoForm.budgetName"></el-input> <el-input :value="infoForm.activityArea"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="负责人"> <el-form-item label="负责人">
<el-input :value="infoForm.purchaseMoney"></el-input> <el-input :value="infoForm.specificUserName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动人数"> <el-form-item label="活动人数">
<el-input :value="infoForm.deptName"></el-input> <el-input :value="infoForm.activityNumber"></el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否彩排"> <el-form-item label="是否彩排">
<el-input :value="infoForm.deptName"></el-input> <el-input :value="infoForm.isRehearsal"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="书否录像">
<el-input :value="infoForm.applyUser"></el-input> </el-col>
<el-col :span="12">
<el-form-item label="是否录像">
<el-input :value="infoForm.isRehearsal"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否直播"> <el-form-item label="是否直播">
<el-input :value="infoForm.expectedDate"></el-input> <el-input :value="infoForm.isLive"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input :value="infoForm.expectedDate"></el-input> <el-input :value="infoForm.applyDept"></el-input>
</el-form-item>
<el-form-item label="申请人">
<el-input :value="infoForm.applyName"></el-input>
</el-form-item>
<el-form-item label="申请时间">
<el-input :value="infoForm.applyTime"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -45,8 +53,12 @@ ...@@ -45,8 +53,12 @@
</template> </template>
<script> <script>
import { purchaseApprovalDetail } from "@/api/smartSchool/indexMould/myTask/teacherLeaveInfo"; import {
import TaskResolve from "@/views/smartSchool/indexMould/myTask/purchaseApproval/components/TaskResolve.vue"
getAuditor,// 查看详情
} from "@/api/smartSchool/personWork/auditoriumReservation";
import TaskResolve from "@/views/smartSchool/indexMould/myTask/audApplicationapproval/components/autaskResolve.vue"
export default { export default {
name: "auinfo", name: "auinfo",
...@@ -104,8 +116,9 @@ export default { ...@@ -104,8 +116,9 @@ export default {
methods: { methods: {
/** 获取详情 */ /** 获取详情 */
getDetailInfo() { getDetailInfo() {
purchaseApprovalDetail(this.id).then(res => { getAuditor(this.id).then(res => {
this.infoForm = res.data this.infoForm = res.data
console.log(111,this.infoForm);
}) })
}, },
......
...@@ -35,8 +35,11 @@ ...@@ -35,8 +35,11 @@
</template> </template>
<script> <script>
import { complete } from "@/api/smartSchool/index/purchaseApproval.js"; import {
completelt,/** 礼堂预约申请审批*/
} from "@/api/smartSchool/indexMould/myTask/audApplicationapproval";
export default { export default {
name: "TaskResolve", name: "TaskResolve",
dicts: ['template_comments', 'apply_results'], dicts: ['template_comments', 'apply_results'],
...@@ -54,7 +57,7 @@ export default { ...@@ -54,7 +57,7 @@ export default {
return { return {
postForm: { postForm: {
comment: '', comment: '',
pass: "1", pass: "true",
}, },
// 意见模板 // 意见模板
templateComment: '', templateComment: '',
...@@ -86,7 +89,7 @@ export default { ...@@ -86,7 +89,7 @@ export default {
if (valid) { if (valid) {
this.$modal.loading('正在提交数据,请稍等...'); this.$modal.loading('正在提交数据,请稍等...');
complete({ completelt({
taskId: this.$attrs.taskId, taskId: this.$attrs.taskId,
instanceId: this.instanceId, instanceId: this.instanceId,
comment: this.postForm.comment, comment: this.postForm.comment,
......
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
<div class="task-right-content"> <div class="task-right-content">
<el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small"> <el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small">
</el-form> </el-form>
<el-table :data="tableData" v-loading="loading"> <el-table :data="tableData">
<el-table-column prop="lesson" label="序号" width="60" type="index" align="center" <el-table-column prop="lesson" label="序号" width="60" type="index" align="center"
style="height: 20px;" /> style="height: 20px;" />
<el-table-column prop="hdmc" label="活动名称" align="center" /> <el-table-column prop="activityName" label="活动名称" align="center" />
<el-table-column label="活动地点" align="center" prop="budgetName" /> <el-table-column label="活动地点" align="center" prop="activityArea" />
<el-table-column label="负责人" align="center" prop="purchaseMoney" /> <el-table-column label="负责人" align="center" prop="specificUserName" />
<el-table-column label="活动人数" align="center" prop="expectedDate" /> <el-table-column label="活动人数" align="center" prop="activityNumber" />
<el-table-column prop="deptName" label="是否彩排" align="center" /> <el-table-column prop="isRehearsal" label="是否彩排" align="center" />
<el-table-column label="是否录像" align="center" prop="applyUser" /> <el-table-column label="是否录像" align="center" prop="isVideo" />
<el-table-column label="是否直播" align="center" prop="sfzb" /> <el-table-column label="是否直播" align="center" prop="isVideo" />
<el-table-column label="申请部门" align="center" prop="applydepart" /> <el-table-column label="申请部门" align="center" prop="applyDept" />
<el-table-column label="申请人" align="center" prop="applypeople" /> <el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="申请时间" align="center" prop="applyTime" /> <el-table-column label="申请时间" align="center" prop="applyTime" />
<el-table-column label="操作" align="center" width="80"> <el-table-column label="操作" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -61,11 +61,9 @@ ...@@ -61,11 +61,9 @@
<script> <script>
import { import {
queryMyClaim, taskDoneList, //查询礼堂申请已办列表
getTaskDoneList, audiDetail,// 礼堂申请审批待办列表
complete, } from "@/api/smartSchool/indexMould/myTask/audApplicationapproval";
getTaskListe,
} from "@/api/smartSchool/index/purchaseApproval.js";
import auhandleResolv from "@/views/smartSchool/indexMould/myTask/audApplicationapproval/components/auhandleResolv.vue"; import auhandleResolv from "@/views/smartSchool/indexMould/myTask/audApplicationapproval/components/auhandleResolv.vue";
import hisHandleResolve from "@/views/smartSchool/indexMould/myTask/audApplicationapproval/components/auhishandleResolve.vue"; import hisHandleResolve from "@/views/smartSchool/indexMould/myTask/audApplicationapproval/components/auhishandleResolve.vue";
...@@ -84,9 +82,7 @@ export default { ...@@ -84,9 +82,7 @@ export default {
// pageSize: 10, // pageSize: 10,
}, },
tableData: [ tableData: [
{
hdmc:'活动',
}
], ],
// 存储行数据 // 存储行数据
rowData: {}, rowData: {},
...@@ -115,7 +111,7 @@ export default { ...@@ -115,7 +111,7 @@ export default {
console.log("历史人物") console.log("历史人物")
this.isTaskListe = false this.isTaskListe = false
this.loading = true; this.loading = true;
getTaskDoneList().then((response) => { taskDoneList().then((response) => {
this.tableData = response.rows this.tableData = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -124,7 +120,7 @@ export default { ...@@ -124,7 +120,7 @@ export default {
console.log("金额人物") console.log("金额人物")
this.loading = true; this.loading = true;
this.isTaskListe = true this.isTaskListe = true
getTaskListe().then((response) => { audiDetail().then((response) => {
this.tableData = response.rows this.tableData = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -140,12 +136,12 @@ export default { ...@@ -140,12 +136,12 @@ export default {
pageSize: 10, pageSize: 10,
} }
this.isTaskListe = true this.isTaskListe = true
// getTaskListe().then((response) => { audiDetail().then((response) => {
// this.tableData = response.rows this.tableData = response.rows
// // console.log(response.rows); // console.log(response.rows);
// this.loading = false this.loading = false
// }); });
}, },
// 搜索查询 // 搜索查询
...@@ -154,7 +150,7 @@ export default { ...@@ -154,7 +150,7 @@ export default {
this.isTaskListe = true this.isTaskListe = true
// console.log(445566); // console.log(445566);
getTaskListe(this.queryParams.purchaseName).then((response) => { audiDetail(this.queryParams.purchaseName).then((response) => {
// this.tableData = response.rows // this.tableData = response.rows
console.log(response.rows); console.log(response.rows);
// this.loading = false // this.loading = false
...@@ -178,12 +174,18 @@ export default { ...@@ -178,12 +174,18 @@ export default {
this.process.id = row.id; this.process.id = row.id;
this.process.taskId = row.taskId; this.process.taskId = row.taskId;
this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看 this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看
this.rowData.purchaseName = row.purchaseName this.rowData.applyUserName = row.applyUserName;
this.rowData.applyUser = row.applyUser this.rowData.activityName = row.activityName;
this.rowData.deptName = row.deptName this.rowData.activityArea = row.activityArea;
this.rowData.expectedDate = row.expectedDate this.rowData.activityTime = row.activityTime;
this.rowData.purchaseMoney = row.purchaseMoney this.rowData.htNumber = row.htNumber;
this.rowData.budgetName = row.budgetName this.rowData.specificUserName = row.specificUserName;
this.rowData.activityNumber = row.activityNumber;
this.rowData.isRehearsal = row.isRehearsal;
this.rowData.isVideo = row.isVideo;
this.rowData.isBigScreen = row.isBigScreen;
this.rowData.applyName = row.applyName;
this.rowData.applyDept = row.applyDept;
}, },
/**历史 */ /**历史 */
...@@ -194,12 +196,18 @@ export default { ...@@ -194,12 +196,18 @@ export default {
this.process.id = row.id; this.process.id = row.id;
this.process.taskId = row.taskId; this.process.taskId = row.taskId;
this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看 this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看
this.rowData.purchaseName = row.purchaseName this.rowData.applyUserName = row.applyUserName;
this.rowData.applyUser = row.applyUser this.rowData.activityName = row.activityName;
this.rowData.deptName = row.deptName this.rowData.activityArea = row.activityArea;
this.rowData.expectedDate = row.expectedDate this.rowData.activityTime = row.activityTime;
this.rowData.purchaseMoney = row.purchaseMoney this.rowData.htNumber = row.htNumber;
this.rowData.budgetName = row.budgetName this.rowData.specificUserName = row.specificUserName;
this.rowData.activityNumber = row.activityNumber;
this.rowData.isRehearsal = row.isRehearsal;
this.rowData.isVideo = row.isVideo;
this.rowData.isBigScreen = row.isBigScreen;
this.rowData.applyName = row.applyName;
this.rowData.applyDept = row.applyDept;
}, },
}, },
......
...@@ -8,18 +8,18 @@ ...@@ -8,18 +8,18 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="科室"> <el-form-item label="科室">
<el-input :value="infoForm.purchaseName"></el-input> <el-input :value="infoForm.deptName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="填报人"> <el-form-item label="填报人">
<el-input :value="infoForm.budgetName"></el-input> <el-input :value="infoForm.informant"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="分管领导"> <el-form-item label="分管领导">
<el-input :value="infoForm.deptName"></el-input> <el-input :value="infoForm.leadershipName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="填报时间"> <el-form-item label="填报时间">
<el-input :value="infoForm.applyUser"></el-input> <el-input :value="infoForm.tbTime"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -33,13 +33,15 @@ ...@@ -33,13 +33,15 @@
</template> </template>
<script> <script>
import { purchaseApprovalDetail } from "@/api/smartSchool/indexMould/myTask/teacherLeaveInfo"; import {
import detaskResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/detaskResolve.vue" queryDepart,//查看本单位预算填报列表;
} from '@/api/smartSchool/officialWork/budgetFilling'
import TaskResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/detaskResolve.vue"
export default { export default {
name: "auinfo", name: "deinfo",
dicts: ['biz_leave_type', 'course_num'], dicts: ['biz_leave_type', 'course_num'],
components: { detaskResolve }, components: { TaskResolve },
props: { props: {
id: { id: {
type: [String, Number], type: [String, Number],
...@@ -92,7 +94,7 @@ export default { ...@@ -92,7 +94,7 @@ export default {
methods: { methods: {
/** 获取详情 */ /** 获取详情 */
getDetailInfo() { getDetailInfo() {
purchaseApprovalDetail(this.id).then(res => { queryDepart(this.id).then(res => {
this.infoForm = res.data this.infoForm = res.data
}) })
}, },
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</template> </template>
<script> <script>
import { complete } from "@/api/smartSchool/index/purchaseApproval.js"; import { complete } from "@/api/smartSchool/indexMould/myTask/depBudgetapproval";
export default { export default {
name: "TaskResolve", name: "TaskResolve",
......
...@@ -15,12 +15,11 @@ ...@@ -15,12 +15,11 @@
<el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small"> <el-form :model="queryParams" :inline="true" style="padding:0 0 0 0" size="small">
</el-form> </el-form>
<el-table :data="tableData" v-loading="loading"> <el-table :data="tableData" v-loading="loading">
<el-table-column prop="nd" label="年度" width="60" type="index" align="center" <el-table-column prop="year" label="年度" width="60" type="index" align="center" style="height: 20px;" />
style="height: 20px;" /> <el-table-column prop="deptName" label="科室" align="center" />
<el-table-column prop="ks" label="科室" align="center" /> <el-table-column label="填报人" align="center" prop="informant" />
<el-table-column label="填报人" align="center" prop="budgetName" /> <el-table-column label="分管领导" align="center" prop="leadershipName" />
<el-table-column label="分管领导" align="center" prop="purchaseMoney" /> <el-table-column label="填报时间" align="center" prop="tbTime" />
<el-table-column label="填报时间" align="center" prop="applyTime" />
<el-table-column label="操作" align="center" width="80"> <el-table-column label="操作" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="isTaskListe" type="text" size="mini" icon="el-icon-edit" <el-button v-if="isTaskListe" type="text" size="mini" icon="el-icon-edit"
...@@ -54,11 +53,11 @@ ...@@ -54,11 +53,11 @@
<script> <script>
import { import {
queryMyClaim, taskDoneList,// 查看科室预算已办列表
getTaskDoneList,
complete, complete,
getTaskListe, departiDetail,// 查看科室预算待办列表
} from "@/api/smartSchool/index/purchaseApproval.js";
} from "@/api/smartSchool/indexMould/myTask/depBudgetapproval";
import HandleResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/dehandleResolv.vue"; import HandleResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/dehandleResolv.vue";
import hisHandleResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/dehishandleResolve.vue"; import hisHandleResolve from "@/views/smartSchool/indexMould/myTask/depBudgetapproval/components/dehishandleResolve.vue";
...@@ -108,7 +107,7 @@ export default { ...@@ -108,7 +107,7 @@ export default {
console.log("历史人物") console.log("历史人物")
this.isTaskListe = false this.isTaskListe = false
this.loading = true; this.loading = true;
getTaskDoneList().then((response) => { taskDoneList().then((response) => {
this.tableData = response.rows this.tableData = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -117,7 +116,7 @@ export default { ...@@ -117,7 +116,7 @@ export default {
console.log("金额人物") console.log("金额人物")
this.loading = true; this.loading = true;
this.isTaskListe = true this.isTaskListe = true
getTaskListe().then((response) => { departiDetail().then((response) => {
this.tableData = response.rows this.tableData = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -133,12 +132,12 @@ export default { ...@@ -133,12 +132,12 @@ export default {
pageSize: 10, pageSize: 10,
} }
this.isTaskListe = true this.isTaskListe = true
// getTaskListe().then((response) => { departiDetail().then((response) => {
// this.tableData = response.rows this.tableData = response.rows
// // console.log(response.rows); // console.log(response.rows);
// this.loading = false this.loading = false
// }); });
}, },
// 搜索查询 // 搜索查询
...@@ -146,8 +145,8 @@ export default { ...@@ -146,8 +145,8 @@ export default {
// this.loading = true; // this.loading = true;
this.isTaskListe = true this.isTaskListe = true
// console.log(445566); // console.log(445566);
getTaskListe(this.queryParams.purchaseName).then((response) => { departiDetail().then((response) => {
// this.tableData = response.rows this.tableData = response.rows
console.log(response.rows); console.log(response.rows);
// this.loading = false // this.loading = false
...@@ -170,12 +169,12 @@ export default { ...@@ -170,12 +169,12 @@ export default {
this.process.id = row.id; this.process.id = row.id;
this.process.taskId = row.taskId; this.process.taskId = row.taskId;
this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看 this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看
this.rowData.purchaseName = row.purchaseName this.rowData.year = row.year
this.rowData.applyUser = row.applyUser
this.rowData.deptName = row.deptName this.rowData.deptName = row.deptName
this.rowData.informant = row.informant
this.rowData.expectedDate = row.expectedDate this.rowData.expectedDate = row.expectedDate
this.rowData.purchaseMoney = row.purchaseMoney this.rowData.leadershipName = row.leadershipName
this.rowData.budgetName = row.budgetName this.rowData.tbTime = row.tbTime
}, },
/**历史 */ /**历史 */
...@@ -186,12 +185,12 @@ export default { ...@@ -186,12 +185,12 @@ export default {
this.process.id = row.id; this.process.id = row.id;
this.process.taskId = row.taskId; this.process.taskId = row.taskId;
this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看 this.process.readOnly = readOnly; // 主要用来判断是否为历史任务。或者是申请人查看
this.rowData.purchaseName = row.purchaseName this.rowData.year = row.year
this.rowData.applyUser = row.applyUser
this.rowData.deptName = row.deptName this.rowData.deptName = row.deptName
this.rowData.informant = row.informant
this.rowData.expectedDate = row.expectedDate this.rowData.expectedDate = row.expectedDate
this.rowData.purchaseMoney = row.purchaseMoney this.rowData.leadershipName = row.leadershipName
this.rowData.budgetName = row.budgetName this.rowData.tbTime = row.tbTime
}, },
}, },
......
...@@ -314,23 +314,26 @@ export default { ...@@ -314,23 +314,26 @@ export default {
// 使用页面跳转方法,例如 Vue Router // 使用页面跳转方法,例如 Vue Router
this.$router.push(detailUrl); this.$router.push(detailUrl);
console.log(1222, row.projectName);
}, },
// 已使用金额操作 // 已使用金额操作
handleAmountClick(row) { handleAmountClick(row) {
console.log('row', row);
this.$router.push({ this.$router.push({
path: "/logisticsManage/detailsofFundusage", path: "/logisticsManage/detailsofFundusage",
query: { projectName: row.projectName } query: {
budgetName: row.budgetName,
purchaseName: row.purchaseName
}
}); });
}, },
// 获取列表 // 获取列表
getList() { getList() {
this.loading = true; this.loading = true;
getBudgetList(this.queryForm).then(response => { getBudgetList(this.queryForm).then(response => {
this.loading = false; this.loading = false;
this.budgetList = response.rows; this.budgetList = response.rows;
console.log(111, this.budgetList);
this.total = response.total; this.total = response.total;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="clockRecordList" stripe> <el-table :data="clockRecordList" stripe>
<el-table-column label="序号" type="index" width="55" align="center" /> <el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="标题" align="center" prop="purchaseName" /> <el-table-column label="标题" align="center" prop="purchaseName" />
<el-table-column label="采购费用-元" align="center" prop="purchaseMoney" /> <el-table-column label="采购费用-元" align="center" prop="purchaseMoney" />
...@@ -93,12 +93,17 @@ export default { ...@@ -93,12 +93,17 @@ export default {
name: 'detailsofFundusage', name: 'detailsofFundusage',
data() { data() {
return { return {
// 预算项目
budgetName: '',
dialogEditNote: false, dialogEditNote: false,
form: {}, form: {},
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
// 模糊搜索 // 模糊搜索
queryParams: {}, queryParams: {
purchaseName: "",
budgetName: "",
},
// 加载遮罩 // 加载遮罩
loading: true, loading: true,
// 记录条数 // 记录条数
...@@ -120,14 +125,32 @@ export default { ...@@ -120,14 +125,32 @@ export default {
}, },
// 目标页面的组件 // 目标页面的组件
created() { created() {
const projectName = this.$route.query.projectName; // const budgetName = this.$route.query.budgetName;
console.log(111,projectName); // 在控制台中输出 projectName 的值 // console.log(this.$route);
// console.log(111, budgetName); // 在控制台中输出 budgetName 的值
},
mounted() {
// const budgetName = this.$route.query.budgetName;
// console.log(this.$route);
// console.log('budgetName', budgetName);
}, },
methods: { methods: {
// 获取列表 // 获取列表
getList() { getList() {
this.loading = true;
getListlb(this.queryParams).then(response => { this.budgetName = this.$route.query.budgetName;
this.purchaseName = this.$route.query.purchaseName == undefined ? '' : this.$route.query.purchaseName;
console.log('this.budgetName', this.budgetName);
const query = {
budgetName: this.budgetName,
purchaseName: this.purchaseName
};
getListlb(query).then(response => {
console.log(111, this.budgetName);
this.clockRecordList = response.rows; this.clockRecordList = response.rows;
console.log(this.clockRecordList); console.log(this.clockRecordList);
this.total = response.total; this.total = response.total;
......
<template>
<el-dialog :visible.sync="openDialog" :title="title" :width="width" @close="dialogClose">
<!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="teacherName" label="姓名">
<el-input v-model.trim="form.teacherName" placeholder="请输入姓名" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item prop="teacherTel" label="联系电话">
<el-input v-model.trim="form.teacherTel" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
<el-button @click="reset" icon="el-icon-refresh" size="mini">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表数据-->
<el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
@row-click="rowClick">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column v-if="execute === 'leaderList'" key="avatar" prop="avatar" label="头像" align="center">
<template slot-scope="scope">
<el-image :src="baseURL + scope.row.avatar" :preview-src-list="[baseURL + scope.row.avatar]"
class="custom-image radius-image">
<template slot="error">
{{ }}
</template>
</el-image>
</template>
</el-table-column>
<el-table-column v-if="execute != 'leaderList'" key="teacherCode" prop="teacherCode" label="教师编号"
align="center"></el-table-column>
<el-table-column key="teacherName" prop="teacherName" label="姓名" align="center"></el-table-column>
<el-table-column key="teacherTel" prop="teacherTel" label="联系电话" align="center"></el-table-column>
<el-table-column key="sex" prop="sex" label="性别" align="center">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"></dict-tag>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
@pagination="search"></pagination>
<!-- 底部-->
<div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
<el-button @click="quit" size="small">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import {
getLeaderList,//获取校领导下拉框
} from "@/api/smartSchool/personWork/auditoriumReservation";
export default {
name: "SelectUser",
dicts: ['sys_user_sex'],
props: {
open: {
type: Boolean,
require: true
},
title: {
type: String,
default: ''
},
width: {
type: [Number, String],
default: '50%'
},
execute: {
type: [String]
},
// 选择级部、处室主任
id: {
type: [Number, String]
}
},
data() {
return {
baseURL: process.env.VUE_APP_BASE_API,
form: {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
},
total: 0,
loading: false,
userList: [],
selectUser: null
}
},
computed: {
openDialog: {
get() {
return this.open;
},
set(value) {
this.$emit('update:open', value);
}
}
},
watch: {
open(value) {
if (value) {
this.$nextTick(() => {
this.reset();
})
}
}
},
methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() {
if (isNaN(Number(this.id))) {
console.error('Invalid ID');
return;
}
try {
this.loading = true;
const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || [];
this.total = response.total;
this.loading = false;
} catch (exception) {
this.loading = false;
throw new Error(exception);
}
},
/** 重置表单 */
reset() {
this.form = {
teacherName: '',
teacherTel: '',
pageNum: 1,
pageSize: 10
};
this.resetForm('form');
this.search();
},
/** 选项选中发生变化 */
selectionChange(selections) {
this.selectUser = selections[0];
},
/** 点击选中、取消 */
rowClick(row, column) {
this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true);
},
/** 提交选中 */
submit() {
this.$emit('select', {
id: this.selectUser.id,
name: this.selectUser.teacherName,
tel: this.selectUser.teacherTel
});
this.quit();
},
/** 取消 */
quit() {
this.openDialog = false;
},
/** 分管领导、主要领导 */
leaderList(form) {
return getLeaderList(form);
},
dialogClose() {
this.userList = []
}
}
}
</script>
<style scoped>
.footer {
display: flex;
justify-content: center;
margin-top: 30px;
}
.radius-image {
border-radius: 40px;
}
</style>
...@@ -20,19 +20,32 @@ ...@@ -20,19 +20,32 @@
<el-table-column label="分管领导" prop="leadershipName" align="center" /> <el-table-column label="分管领导" prop="leadershipName" align="center" />
<el-table-column label="备注" prop="remark" align="center" /> <el-table-column label="备注" prop="remark" align="center" />
<el-table-column label="填报时间" prop="tbTime" align="center" /> <el-table-column label="填报时间" prop="tbTime" align="center" />
<el-table-column label="当前任务" prop="giveMoney" align="center" /> <el-table-column label="当前任务" prop="state" align="center">
<el-table-column label="操作" align="center"> <template slot-scope="{ row }">
<template slot-scope="scope"> {{ row.state === '0' ? "未提交" :
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" row.state === '1' ? "分管领导审核" :
v-hasPermi="['system:assets:edit']">修改 row.state === '2' ? "审核通过" :
</el-button> "审核不通过" }}
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleLook(scope.row)">查看
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:assets:delete']">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<div v-if="scope.row.state === '0'">
<!-- 未提交状态 -->
<el-button size="mini" type="text" icon="el-icon-s-promotion"
@click="submitApply(scope.row)">提交申请</el-button>
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</div>
<div v-else>
<!-- 审核中、审核通过、审核不通过状态 -->
<el-button size="mini" type="text" icon="el-icon-search"
@click="handleLook(scope.row)">查看</el-button>
</div>
</template>
</el-table-column>>
</el-table> </el-table>
<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" />
...@@ -56,39 +69,38 @@ ...@@ -56,39 +69,38 @@
<el-button class="el-icon-plus" size="mini" @click="addLine()">增加</el-button> <el-button class="el-icon-plus" size="mini" @click="addLine()">增加</el-button>
<el-table border :data="xzTable" ref="xzTable" class="xzTable"> <el-table border :data="xzTable" ref="xzTable" class="xzTable">
<el-table-column label="序号" type="index" align="center" /> <el-table-column label="序号" type="index" align="center" />
<el-table-column prop="xmmc" label="项目名称" width="150" align="center"> <el-table-column prop="projectName" label="项目名称" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.xmmc" placeholder="请输入内容"></el-input> <el-input v-model="scope.row.projectName" placeholder="请输入内容"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sbzc" label="*申报政策依据、理由及主要内容" width="300" align="center"> <el-table-column prop="content" label="*申报政策依据、理由及主要内容" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.sbzc" placeholder="请输入内容"></el-input> <el-input v-model="scope.row.content" placeholder="请输入内容"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="xmzcmx" label="*项目支出明细" align="center"> <el-table-column prop="projectExpenditures" label="*项目支出明细" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.xmzcmx" placeholder="请输入内容"></el-input> <el-input v-model="scope.row.projectExpenditures" placeholder="请输入内容"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否政府采购" prop="sfzfcg" align="center"> <el-table-column label="是否政府采购" prop="isGovernmentPurchase" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.sfzfcg" placeholder="请选择" filterable default-first-option <el-select v-model="scope.row.isGovernmentPurchase" placeholder="请选择" filterable
ref="selectInput"> default-first-option ref="selectInput">
<el-option v-for="option in options" :key="option.userId" :label="option.userName" <el-option label="是" value="0"></el-option>
:value="option.userId"> <el-option label="否" value="1"></el-option>
</el-option>
</el-select> </el-select>
</template> </template>
</el-table-column>> </el-table-column>>
<el-table-column prop="sgje" label="*申请金额" align="center"> <el-table-column prop="applyMoney" label="*申请金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.sgje" placeholder="请输入内容"></el-input> <el-input v-model="scope.row.applyMoney" placeholder="请输入内容"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bz" label="备注" align="center"> <el-table-column prop="remark" label="备注" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.bz" placeholder="请输入内容"></el-input> <el-input v-model="scope.row.remark" placeholder="请输入内容"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
...@@ -98,19 +110,22 @@ ...@@ -98,19 +110,22 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-row style="margin-top: 15px;margin-left: 20px;"> <el-row style="margin-top: 15px;margin-left: 20px;">
<el-col :span="14"> <el-col :span="14">
<span class="uploadname" style="font-size: 16px;font-weight: bold;">填报人 : <span class="uploadname" style="font-size: 16px;font-weight: bold;">填报人 :
<!-- <img v-if="jlqztp" :src="jlqztp" alt=""> {{ postForm.informant }}
<span v-else>{{ jlmc }}</span> -->
</span> </span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<!-- <el-form-item label="分管领导" prop="handUserName2"> -->
<!-- <el-input :value="postForm.handUserName2" placeholder="请选择分管领导"
@focus="openSelect('选择分管领导', 'leaderList', 2)"></el-input> -->
<span class="uploadname" style="font-size: 16px;font-weight: bold;">分管领导: <span class="uploadname" style="font-size: 16px;font-weight: bold;">分管领导:
<!-- <img v-if="sjqztp" :src="sjqztp" alt=""> <span style="display: inline-block; width: 100px;height: 20px;"
<span v-else>{{ sjmc }}</span> --> @click="openSelect('选择分管领导', 'leaderList', 2)">{{ postForm.handUserName2 }}
</span>
</span> </span>
<!-- </el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -118,39 +133,43 @@ ...@@ -118,39 +133,43 @@
<!-- 查看对话框 --> <!-- 查看对话框 -->
<el-dialog :title="title" :visible.sync="openLook" width="80%"> <el-dialog :title="title" :visible.sync="openLook" width="80%">
<div class="dialog-footer btn"> <div class="dialog-footer btn">
<el-button class="btnup" @click="cancel">关 闭</el-button> <el-button class="btnup" @click="cancel">关 闭</el-button>
</div> </div>
<el-form ref="postForm" :model="postForm" :rules="rules" label-width="90px">
<div> <div>
<h2 class="title">{{ year }}年{{ deptName }}科室预算</h2> <h2 class="title">{{ postForm.year }}年{{ postForm.deptName }}科室预算</h2>
<div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">单位:万元</div> <div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">单位:万元</div>
</div> </div>
<!-- 表格数据 --> <!-- 表格数据 -->
<el-table border :data="lookTable" ref="table" class="lookTable"> <el-table border :data="lookTable" ref="table" class="lookTable">
<el-table-column label="序号" width="60" type="index" align="center" /> <el-table-column label="序号" width="60" type="index" align="center" />
<el-table-column prop="xmmc" label="项目名称" align="center" /> <el-table-column prop="projectName" label="项目名称" align="center" />
<el-table-column prop="sbzc" label="申报政策依据、理由及主要内容" width="300" align="center" /> <el-table-column prop="content" label="申报政策依据、理由及主要内容" width="300" align="center" />
<el-table-column label="项目支出明细" prop="xmzcmx" align="center" /> <el-table-column label="项目支出明细" prop="projectExpenditures" align="center" />
<el-table-column label="是否政府采购" prop="sfzfcg" align="center" width="200" /> <el-table-column label="是否政府采购" prop="isGovernmentPurchase" align="center" width="200" />
<el-table-column label="申请金额" prop="sqje" align="center" width="200" /> <el-table-column label="申请金额" prop="applyMoney" align="center" width="200" />
<el-table-column label="备注" prop="bz" align="center" width="200" /> <el-table-column label="备注" prop="remark" align="center" width="200" />
</el-table> </el-table>
<el-row style="margin-top: 15px;margin-left: 20px;"> <el-row style="margin-top: 15px;margin-left: 20px;">
<el-col :span="14"> <el-col :span="14">
<span class="uploadname" style="font-size: 16px;font-weight: bold;">填报人: <span class="uploadname" style="font-size: 16px;font-weight: bold;">填报人 :
<!-- <img v-if="jlqztp" :src="jlqztp"> {{ postForm.informant }}
<span v-else>{{ jlmc }}</span> -->
</span> </span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span class="uploadname" style="font-size: 16px;font-weight: bold;">分管领导: <span class="uploadname" style="font-size: 16px;font-weight: bold;">分管领导:
<!-- <img v-if="sjqztp" :src="sjqztp"> {{ postForm.leadershipName }}
<span v-else>{{ sjmc }}</span> -->
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-dialog> </el-dialog>
<!-- 选择对应处理人 -->
<SelectUser :id="selectHandles.id" :open.sync="selectHandles.open" :title="selectHandles.title"
:width="selectHandles.width" :execute="selectHandles.method" @select="selectUser"></SelectUser>
</div> </div>
</template> </template>
...@@ -160,20 +179,31 @@ import { ...@@ -160,20 +179,31 @@ import {
editdeBudget,// 修改预算填报 editdeBudget,// 修改预算填报
queryDepart,//查看预算填报列表; queryDepart,//查看预算填报列表;
getdeBudgetList,//查看本单位预算填报列表; getdeBudgetList,//查看本单位预算填报列表;
deleteDepart,//// 删除预算填报 deleteDepart,// 删除预算填报
submitApply,//提交
} from '@/api/smartSchool/officialWork/budgetFilling' } from '@/api/smartSchool/officialWork/budgetFilling'
import {
getLeaderList,//获取校领导下拉框
} from "@/api/smartSchool/personWork/auditoriumReservation";
import { deptTreeSelect } from "@/api/system/user"; import { deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { MessageBox } from "element-ui";
import SelectUser from "./components/SelectUser";
export default { export default {
name: "budgetFilling", name: "budgetFilling",
components: { components: {
Treeselect Treeselect,
SelectUser
}, },
data() { data() {
return { return {
handUserName2: "",
title: '', // 初始化 "title" 属性
// 填报人
informant: "",
// 查询表单 // 查询表单
queryForm: { queryForm: {
budgetYear: '',// 预算年度 budgetYear: '',// 预算年度
...@@ -199,7 +229,33 @@ export default { ...@@ -199,7 +229,33 @@ export default {
xzTable: [ xzTable: [
{}, {},
], ],
form: {},
//后端传校领导列表
schoolLeaderList: [],
// 部门树选项
deptOptions: undefined,
teacherSelect: '教师信息',
teacherSelectDialog: false,
// 弹出层标题
dialogTitle: "",
dialogTeacherLeaveView: false,
dialogViewTeacherLeave: false,
dialogTeacherLeave: false,
options: "", options: "",
// 审批人
entrust: {
open: false,
title: '选择审批人'
},
// 选择对应处理人
selectHandles: {
id: null,
open: false,
title: '',
width: '50%',
method: null,
type: null // 处理类型: 1 级部/处室; 2 分管; 3 主管
},
// 查看表格 // 查看表格
lookTable: [], lookTable: [],
// 是否显示弹出层 // 是否显示弹出层
...@@ -247,46 +303,90 @@ export default { ...@@ -247,46 +303,90 @@ export default {
created() { created() {
this.getList(); this.getList();
// 获取科室信息
this.getDeptTree();
}, },
methods: { methods: {
/** 增加空行按钮 */ // 新增空行数据
addLine() { addLine() {
const newLine = { const newLine = {
xh: "", projectName: "",
xmmc: "", content: "",
sbzc: "", projectExpenditures: "",
xmzcmx: "", isGovernmentPurchase: "",
sfzfcg: "", applyMoney: "",
sbje: "", remark: "",
bz: "", };
} this.xzTable.push(newLine);
this.index++ },
this.xzTable.push(newLine) // 删除空行数据
}, deleteLine() {
/** 删除空行按钮 */ if (this.xzTable.length > 0) {
deleteLine(row) { MessageBox.confirm("是否确认删除本行数据?", "提示", {
console.log('multiple', this.multiple) confirmButtonText: "确定",
console.log('single', this.single) cancelButtonText: "取消",
if (this.multiple == false) { type: "warning",
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除当前项数据")
.then(function () {
return delMyTidings(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.xzTable.pop();
this.$modal.msgSuccess("删除成功");
}) })
.catch(() => { .catch(() => {
// 用户取消删除操作
}); });
} else { }
this.xzTable.pop() },
confirm() {
this.dialogViewTeacherLeave = false;
},
openViewTeacherLeaveForm(row) {
this.reset();
const id = row.id || this.ids
getTeacherLeave(id).then(response => {
this.form = response.data;
this.dialogViewTeacherLeave = true;
});
},
dialogOpenApproveHistory(row) {
this.dialogApproveHistory = true
this.getApproveHistoryList(row)
},
getApproveHistoryList(row) {
listHistory({ instanceId: row.instanceId }).then(res => {
})
},
openTeacherSelect() {
this.teacherSelectDialog = true
},
// 新增操作
setTeacherInfo(data) {
this.teacherSelectDialog = false;
this.$set(this.form, 'teacherName', data.teacherName);
this.$set(this.form, 'teacherId', data.id);
this.dialogTeacherAward = true;
this.title = "新增请假信息";
},
/** 获取教师信息列表 */
getTeacherList(queryForm, callback) {
listInform(queryForm).then(response => {
callback(response.rows, response.total);
}).catch(error => {
callback([], 0);
})
},
//获校领导下拉框、
schoolLeader() {
getLeaderList().then(((res) => {
if (res.code == 200) {
this.schoolLeaderList = res.rows
} }
}))
},
handleDeputyLeader(data) {
const { handUserName2, handUserId2 } = data;
this.form.handUserName2 = handUserName2;
this.form.handUserId2 = handUserId2;
}, },
// 处理精度 // 处理精度
handlePrecision(value, precision = 2) { handlePrecision(value, precision = 2) {
if (precision < 1) { if (precision < 1) {
...@@ -301,11 +401,38 @@ export default { ...@@ -301,11 +401,38 @@ export default {
getdeBudgetList(this.queryForm).then(response => { getdeBudgetList(this.queryForm).then(response => {
this.loading = false; this.loading = false;
this.budgetList = response.rows; this.budgetList = response.rows;
console.log(111, response.rows);
this.total = response.total; this.total = response.total;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}) })
}, },
readNodes(nodes = [], arr = []) {
for (let item of nodes) {
arr.push({ id: item.id, label: item.label })
if (item.children && item.children.length) this.readNodes(item.children, arr)
}
return arr
},
// 选择处理人:打开对话框
openSelect(title, method, type) {
console.log(1);
this.selectHandles.open = true;
this.selectHandles.title = title;
this.selectHandles.method = method;
this.selectHandles.type = type;
},
// 选择处理人
selectUser(select) {
// 这种写法存在一定危险,后续最好是可以有更好的字段名对应
this.$set(this.form, `handUserName${this.selectHandles.type}`, select.name);
this.$set(this.form, `handUserId${this.selectHandles.type}`, select.id);
this.postForm.handUserName2 = select.name;
console.log(124, this.postForm.handUserName2);
this.postForm.leadershipId = select.id;
},
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getDeptTree() { getDeptTree() {
...@@ -340,32 +467,75 @@ export default { ...@@ -340,32 +467,75 @@ export default {
// 编辑按钮 // 编辑按钮
handleUpdate(row) { handleUpdate(row) {
this.title = '修改预算批复信息';
queryDepart(row.id).then(response => { queryDepart(row.id).then(response => {
this.postForm = response.data; this.xzTable = response.data.schoolDepartmentBudgetProjectmxList;
this.postForm.informant = this.$store.state.user.name;
this.postForm.year = response.data.year;
this.postForm.deptName = response.data.deptName;
this.postForm.projectName = this.xzTable[0].projectName;
this.postForm.content = this.xzTable[0].content;
this.postForm.projectExpenditures = this.xzTable[0].projectExpenditures;
this.postForm.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
this.open = true; this.open = true;
this.$modal.closeLoading(); this.$modal.closeLoading();
}).catch(err => { }).catch(err => {
this.$modal.closeLoading();
})
},
// 提交按钮
submitApply(row) {
this.$confirm('确认要提交申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
submitApply(row.id).then(res => {
if (res.code == 200) {
this.$message({
type: 'success',
message: '提交成功!'
})
this.getList()
}
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消提交'
})
}) })
}, },
// 查看按钮 // 查看按钮
handleLook(row) { handleLook(row) {
this.title = '修改预算批复信息';
this.$modal.loading('正在加载数据。请稍等...');
queryDepart(row.id).then(response => { queryDepart(row.id).then(response => {
this.postForm = response.data; this.lookTable = response.data.schoolDepartmentBudgetProjectmxList;
console.log(111, this.lookTable);
this.postForm.informant = this.$store.state.user.name;
this.postForm.leadershipName = response.data.leadershipName;
this.postForm.year = response.data.year;
this.postForm.deptName = response.data.deptName;
this.openLook = true; this.openLook = true;
this.$modal.closeLoading(); this.$modal.closeLoading();
}).catch(err => { }).catch(err => {
this.$modal.closeLoading();
}) })
}, },
// 新增按钮 // 新增按钮
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.xzTable = [{
projectName: "",
content: "",
projectExpenditures: "",
isGovernmentPurchase: "",
applyMoney: "",
remark: "",
}];
this.open = true; this.open = true;
this.postForm.informant = this.$store.state.user.name;
this.title = '新增预算批复信息' this.title = '新增预算批复信息'
}, },
...@@ -392,9 +562,22 @@ export default { ...@@ -392,9 +562,22 @@ export default {
this.$refs["postForm"].validate(valid => { this.$refs["postForm"].validate(valid => {
if (valid) { if (valid) {
this.$modal.loading('正在上传数据,请稍等...'); this.$modal.loading('正在上传数据,请稍等...');
if (this.postForm.id != null) { if (this.xzTable[0].id != null) {
const newObj = {};
newObj.leadershipName = this.postForm.handUserName2;
newObj.leadershipId = this.postForm.leadershipId;
newObj.xzTable = this.schoolDepartmentBudgetProjectmxList;
newObj.year = this.postForm.year;
newObj.deptName = this.postForm.deptName;
newObj.projectName = this.xzTable[0].projectName;
newObj.content = this.xzTable[0].content;
newObj.projectExpenditures = this.xzTable[0].projectExpenditures;
newObj.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
newObj.applyMoney = this.xzTable[0].applyMoney;
newObj.remark = this.xzTable[0].remark;
console.log('newObj', newObj)
// 编辑 // 编辑
editdeBudget(this.postForm).then(response => { editdeBudget(newObj).then(response => {
this.$modal.closeLoading(); this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
...@@ -404,7 +587,20 @@ export default { ...@@ -404,7 +587,20 @@ export default {
}); });
} else { } else {
// 新增 // 新增
adddeBudget(this.postForm).then(response => { const newObj = {};
newObj.leadershipName = this.postForm.handUserName2;
newObj.leadershipId = this.postForm.leadershipId;
newObj.xzTable = this.schoolDepartmentBudgetProjectmxList;
newObj.year = this.postForm.year;
newObj.deptName = this.postForm.deptName;
newObj.projectName = this.xzTable[0].projectName;
newObj.content = this.xzTable[0].content;
newObj.projectExpenditures = this.xzTable[0].projectExpenditures;
newObj.isGovernmentPurchase = this.xzTable[0].isGovernmentPurchas;
newObj.applyMoney = this.xzTable[0].applyMoney;
newObj.remark = this.xzTable[0].remark;
console.log('newObj', newObj)
adddeBudget(newObj).then(response => {
this.$modal.closeLoading(); this.$modal.closeLoading();
console.log(this); console.log(this);
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
...@@ -421,14 +617,12 @@ export default { ...@@ -421,14 +617,12 @@ export default {
// 重置 // 重置
reset() { reset() {
this.postForm = { this.postForm = {
budgetYear: '',// 预算年度 projectName: "",
deptId: null,// 部门ID科室 content: "",
deptName: '', projectExpenditures: "",
budgetName: '',// 项目名称 isGovernmentPurchase: "",
isGov: '',// 是否政府采购 applyMoney: "",
remark: '',// 备注 remark: "",
giveMoney: '',// 批复金额
schoolBudgetDetailsList: []
} }
this.resetForm('postForm'); this.resetForm('postForm');
}, },
...@@ -534,6 +728,11 @@ export default { ...@@ -534,6 +728,11 @@ export default {
} }
.uploadname {
font-size: 16px;
font-weight: bold;
}
.btnup { .btnup {
margin-left: 12px; margin-left: 12px;
padding: 9px 25px; padding: 9px 25px;
......
...@@ -3,12 +3,10 @@ ...@@ -3,12 +3,10 @@
<!-- 模糊查询--> <!-- 模糊查询-->
<el-form :model="form" ref="form" size="small" inline> <el-form :model="form" ref="form" size="small" inline>
<el-form-item prop="teacherName" label="姓名"> <el-form-item prop="teacherName" label="姓名">
<el-input v-model.trim="form.teacherName" placeholder="请输入姓名" clearable <el-input v-model.trim="form.teacherName" placeholder="请输入姓名" clearable @keyup.enter.native="search"></el-input>
@keyup.enter.native="search"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="teacherTel" label="联系电话"> <el-form-item prop="teacherTel" label="联系电话">
<el-input v-model.trim="form.teacherTel" placeholder="请输入联系电话" clearable <el-input v-model.trim="form.teacherTel" placeholder="请输入联系电话" clearable @keyup.enter.native="search"></el-input>
@keyup.enter.native="search"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button> <el-button @click="search" type="primary" icon="el-icon-search" size="mini">搜索</el-button>
...@@ -16,13 +14,8 @@ ...@@ -16,13 +14,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 列表数据--> <!-- 列表数据-->
<el-table <el-table ref="tableList" v-loading="loading" :data="userList" @selection-change="selectionChange"
ref="tableList" @row-click="rowClick">
v-loading="loading"
:data="userList"
@selection-change="selectionChange"
@row-click="rowClick"
>
<el-table-column type="selection" align="center"></el-table-column> <el-table-column type="selection" align="center"></el-table-column>
<el-table-column v-if="execute === 'leaderList'" key="avatar" prop="avatar" label="头像" align="center"> <el-table-column v-if="execute === 'leaderList'" key="avatar" prop="avatar" label="头像" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -45,13 +38,8 @@ ...@@ -45,13 +38,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页--> <!-- 分页-->
<pagination <pagination v-show="total > 0" :total="total" :limit.sync="form.pageSize" :page.sync="form.pageNum"
v-show="total > 0" @pagination="search"></pagination>
:total="total"
:limit.sync="form.pageSize"
:page.sync="form.pageNum"
@pagination="search"
></pagination>
<!-- 底部--> <!-- 底部-->
<div slot="footer"> <div slot="footer">
<el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button> <el-button :disabled="!selectUser" @click="submit" type="primary" size="small">确 定</el-button>
...@@ -62,8 +50,10 @@ ...@@ -62,8 +50,10 @@
<script> <script>
import {getGradeOfficeDirectorList, getLeaderList} from "@/api/smartSchool/personWork/leaveApply"; import {
getLeaderList,//获取校领导下拉框
} from "@/api/smartSchool/personWork/auditoriumReservation";
export default { export default {
name: "SelectUser", name: "SelectUser",
dicts: ['sys_user_sex'], dicts: ['sys_user_sex'],
...@@ -126,13 +116,14 @@ export default { ...@@ -126,13 +116,14 @@ export default {
methods: { methods: {
/** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */ /** 搜索(交给子组件维护,当然也可以把接口交给父组件处理) */
async search() { async search() {
// if (!this.id || Number(this.id) === NaN) { if (isNaN(Number(this.id))) {
if (!this.id || isNaN(this.id)) { console.error('Invalid ID');
throw TypeError('级部/处室id应为非空数字类型!'); return;
} }
try { try {
this.loading = true; this.loading = true;
const response = await this[this.execute]({applyOrgid: this.id, ...this.form}); const response = await this[this.execute]({ applyOrgid: this.id, ...this.form });
this.userList = response.rows || []; this.userList = response.rows || [];
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
...@@ -141,6 +132,7 @@ export default { ...@@ -141,6 +132,7 @@ export default {
throw new Error(exception); throw new Error(exception);
} }
}, },
/** 重置表单 */ /** 重置表单 */
reset() { reset() {
this.form = { this.form = {
...@@ -158,6 +150,7 @@ export default { ...@@ -158,6 +150,7 @@ export default {
}, },
/** 点击选中、取消 */ /** 点击选中、取消 */
rowClick(row, column) { rowClick(row, column) {
console.log('row', row);
this.$refs['tableList'].clearSelection(); this.$refs['tableList'].clearSelection();
this.$refs['tableList'].toggleRowSelection(row, true); this.$refs['tableList'].toggleRowSelection(row, true);
}, },
...@@ -175,10 +168,7 @@ export default { ...@@ -175,10 +168,7 @@ export default {
this.openDialog = false; this.openDialog = false;
}, },
/** 级部、处室主任选择 */
gradeOfficeDirector(form) {
return getGradeOfficeDirectorList(form);
},
/** 分管领导、主要领导 */ /** 分管领导、主要领导 */
leaderList(form) { leaderList(form) {
......
...@@ -5,16 +5,10 @@ ...@@ -5,16 +5,10 @@
<el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input> <el-input v-model="queryForm.activityName" @keyup.enter.native="handleQuery" placeholder="活动名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- <el-date-picker style="width: 170px;" size="small" v-model="queryForm.sj" type="datetime" <el-date-picker v-model="queryForm.sj" type="daterange" range-separator="至" start-placeholder="开始日期"
format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="选择日期时间" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeData(queryForm.sj)">
@change="changeData(queryForm.sj)">
</el-date-picker> -->
<el-date-picker v-model="dateRange" type="datetime" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
@change="changeData(queryForm.sj)">
</el-date-picker> </el-date-picker>
<span v-if="week !== ''" style="font-size: 14px">({{ week }})</span> <span v-if="diffDate !== ''" style="font-size: 14px">({{ diffDate }})天</span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-circle-plus" size="mini" @click="handleAdd">新增</el-button> <el-button type="primary" icon="el-icon-circle-plus" size="mini" @click="handleAdd">新增</el-button>
...@@ -100,15 +94,15 @@ ...@@ -100,15 +94,15 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="活动时间" prop="activityTime" style="width: 276.66px"> <el-form-item label="活动时间" prop="activityTime" style="width: 276.66px">
<el-date-picker v-model="postForm.activityTime" type="datetime" <el-date-picker v-model="postForm.activityTime" type="datetime"
value-format="yyyy-MM-dd-HH:mm:ss" placeholder="请选择日期"> value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="具体负责人" prop="specificUserId"> <el-form-item label="具体负责人" prop="specificUserName">
<el-input v-model="postForm.specificUserId"></el-input> <el-input type="text" v-model="postForm.specificUserName" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -163,8 +157,8 @@ ...@@ -163,8 +157,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="分管领导" prop="leadershipName" v-if="postForm.totalTime > 0.5"> <el-form-item label="分管领导" prop="handUserName2">
<el-input :value="postForm.leadershipName" placeholder="请选择分管领导" <el-input :value="postForm.handUserName2" placeholder="请选择分管领导"
@focus="openSelect('选择分管领导', 'leaderList', 2)"></el-input> @focus="openSelect('选择分管领导', 'leaderList', 2)"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -236,33 +230,33 @@ ...@@ -236,33 +230,33 @@
<td class="btntext" colspan="5">{{ isBigScreen }}</td> <td class="btntext" colspan="5">{{ isBigScreen }}</td>
</tr> </tr>
<tr> <tr>
<td rowspan="2" class="btntxt">附件</td> <td rowspan="2" class="btntxt">附件
<template slot-scope="scope">
<p v-for="item in scope.row.dzbFjList" :key="item.id">
<el-link type="primary" :href="item.fjlj" :underline="false" target="_blank">{{
item.fjmc
}}</el-link>
</p>
</template>
</td>
<td colspan="7">{{ fjmc }}</td> <td colspan="7">{{ fjmc }}</td>
<!-- <div style="color:#ff4949;font-size: 12px"
v-if="this.dzbFjList.length == 0 && this.dzbFjList.length == 0">提示:会议记录不能为空
</div> -->
<!-- <div v-else></div>
<UploadFileNew @input="getFileList" :value="fileList">
</UploadFileNew> -->
</tr> </tr>
</table> </table>
<el-row style="margin-top: 15px; margin-left: 20px"> <el-row style="margin-top: 15px; margin-left: 20px">
<el-col :span="8"> <el-col :span="8">
<span class="uploadname" style="font-size: 16px; font-weight: bold">申请人: <span class="uploadname" style="font-size: 16px; font-weight: bold">申请人:
<!-- <img v-if="jlqztp" :src="jlqztp"> {{ applyName }}
<span v-else>{{ jlmc }}</span> -->
</span> </span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<span class="uploadname" style="font-size: 16px; font-weight: bold">申请部门: <span class="uploadname" style="font-size: 16px; font-weight: bold">申请部门:
<!-- <img v-if="sjqztp" :src="sjqztp"> {{ applyDept }}
<span v-else>{{ sjmc }}</span> -->
</span> </span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<span class="uploadname" style="font-size: 16px; font-weight: bold">学校分管领导: <span class="uploadname" style="font-size: 16px; font-weight: bold">学校分管领导:
<!-- <img v-if="sjqztp" :src="sjqztp"> {{ leadershipName }}
<span v-else>{{ sjmc }}</span> -->
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -292,12 +286,13 @@ import { ...@@ -292,12 +286,13 @@ import {
updateAuditor, //修改礼堂预约信息 updateAuditor, //修改礼堂预约信息
delAuditor, // 删除礼堂预约 delAuditor, // 删除礼堂预约
submitAuditor,//提交礼堂预约申请 submitAuditor,//提交礼堂预约申请
getGradeOfficeDirectorList,//获取校领导下拉框 getLeaderList,//获取校领导下拉框
} from "@/api/smartSchool/personWork/auditoriumReservation"; } from "@/api/smartSchool/personWork/auditoriumReservation";
import { CustomCellStyle } from "@/enums/customStyle"; import { CustomCellStyle } from "@/enums/customStyle";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { SubmitState } from "@/enums/apply"; import { SubmitState } from "@/enums/apply";
import SelectUser from "./components/SelectUser"; import SelectUser from "./components/SelectUser";
import moment from 'moment'
export default { export default {
name: "auditoriumReservation", name: "auditoriumReservation",
...@@ -305,8 +300,12 @@ export default { ...@@ -305,8 +300,12 @@ export default {
SelectUser SelectUser
}, },
data() { data() {
return { return {
// 天数
diffDate: "",
title: '', // 初始化 "title" 属性
week: "", // 选择的天数 week: "", // 选择的天数
dateRange: [], // 用于存储选定的时间段 dateRange: [], // 用于存储选定的时间段
// 提交状态 // 提交状态
...@@ -337,14 +336,31 @@ export default { ...@@ -337,14 +336,31 @@ export default {
htNumber: "", htNumber: "",
// 附件名称 // 附件名称
fjmc: "", fjmc: "",
// 申请人
applyName: "",
//申请部门
applyDept: "",
// 学校分管领导
leadershipName: "",
//后端传校领导列表
schoolLeaderList: [],
// 部门树选项
deptOptions: undefined,
teacherSelect: '教师信息',
teacherSelectDialog: false,
// 查询表单 // 查询表单
queryForm: { queryForm: {
activityName: "", activityName: "",
dateRange: [null, null], // 选择的开始日期和结束日期 dateRange: [null, null], // 选择的开始日期和结束日期
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
sj: ''
}, },
// 弹出层标题
dialogTitle: "",
dialogTeacherLeaveView: false,
dialogViewTeacherLeave: false,
dialogTeacherLeave: false,
// 遮罩层 // 遮罩层
loading: false, loading: false,
// 选中数组 // 选中数组
...@@ -363,14 +379,15 @@ export default { ...@@ -363,14 +379,15 @@ export default {
infoList: [ infoList: [
], ],
form: {},
// 数据总数 // 数据总数
total: 0, total: 0,
// 新增/修改表单 // 新增/修改表单
postForm: { postForm: {
activityName: "", activityName: "",
activityArea: "", activityArea: '',
activityTime: "", activityTime: "",
specificUserName: "", specificUserName: this.$store.state.user.name,
activityNumber: "", activityNumber: "",
duration: "", duration: "",
isRehearsal: "", isRehearsal: "",
...@@ -379,8 +396,15 @@ export default { ...@@ -379,8 +396,15 @@ export default {
isBigScreen: "", isBigScreen: "",
htNumber: "", htNumber: "",
fjmc: "", fjmc: "",
leadershipId: "",
},
// 分管领导id
leadershipId: '',
// 审批人
entrust: {
open: false,
title: '选择审批人'
}, },
// 选择对应处理人 // 选择对应处理人
selectHandles: { selectHandles: {
...@@ -401,8 +425,7 @@ export default { ...@@ -401,8 +425,7 @@ export default {
isDisabled: false, isDisabled: false,
// // 表单校验 // // 表单校验
rules: {}, rules: {},
// 弹出层标题
title: "",
// 列表信息 // 列表信息
columns: [], columns: [],
}; };
...@@ -412,29 +435,72 @@ export default { ...@@ -412,29 +435,72 @@ export default {
}, },
methods: { methods: {
//时间段(天)
// calculateTimeRange() {
// if (this.queryForm.dateRange.length === 2) {
// const startDate = new Date(this.queryForm.dateRange[0]);
// const endDate = new Date(this.queryForm.dateRange[1]);
// const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
// const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24)) + 1;
// return daysDiff;
// } else {
// return '';
// }
// },
/** 获取列表数据 */ /** 获取列表数据 */
getList() { getList() {
listAuditor(this.addDateRange(this.queryForm, this.dateRange)).then(response => { listAuditor(this.queryForm).then(response => {
this.loading = false; this.loading = false;
this.infoList = response.rows; this.infoList = response.rows;
console.log(111, response.rows.state); console.log(111, response.rows);
this.total = response.total; this.total = response.total;
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}) })
}, },
confirm() {
this.dialogViewTeacherLeave = false;
},
openViewTeacherLeaveForm(row) {
this.reset();
const id = row.id || this.ids
getTeacherLeave(id).then(response => {
this.form = response.data;
this.dialogViewTeacherLeave = true;
});
},
dialogOpenApproveHistory(row) {
this.dialogApproveHistory = true
this.getApproveHistoryList(row)
},
getApproveHistoryList(row) {
listHistory({ instanceId: row.instanceId }).then(res => {
})
},
openTeacherSelect() {
this.teacherSelectDialog = true
},
// 新增操作
setTeacherInfo(data) {
this.teacherSelectDialog = false;
this.$set(this.form, 'teacherName', data.teacherName);
this.$set(this.form, 'teacherId', data.id);
this.dialogTeacherAward = true;
this.title = "新增请假信息";
},
/** 获取教师信息列表 */
getTeacherList(queryForm, callback) {
listInform(queryForm).then(response => {
callback(response.rows, response.total);
}).catch(error => {
callback([], 0);
})
},
//获校领导下拉框、
schoolLeader() {
getLeaderList().then(((res) => {
if (res.code == 200) {
this.schoolLeaderList = res.rows
}
}))
},
handleDeputyLeader(data) {
const { handUserName2, handUserId2 } = data;
this.form.handUserName2 = handUserName2;
this.form.handUserId2 = handUserId2;
},
/** 查看 */ /** 查看 */
lookForm(row) { lookForm(row) {
this.reset(); this.reset();
...@@ -455,50 +521,50 @@ export default { ...@@ -455,50 +521,50 @@ export default {
this.isLive = response.data.isLive; this.isLive = response.data.isLive;
this.htNumber = response.data.htNumber; this.htNumber = response.data.htNumber;
this.isBigScreen = response.data.isBigScreen; this.isBigScreen = response.data.isBigScreen;
this.applyName = response.data.applyName;
this.applyDept = response.data.applyDept;
this.leadershipName = response.data.leadershipName;
this.fjmc = response.data.fjmc; this.fjmc = response.data.fjmc;
console.log(response.data.state); console.log(response.data.state);
this.loading = false; this.loading = false;
this.look = true; this.look = true;
}); });
}, },
// 选择天
// changeData(value) { // 计算天数
// if (value != null) {
// let selectedDate = new Date(value); //选择的日期时间
// let currentDate = new Date(); //当前日期时间
// // 计算日期差(以天为单位)
// let timeDiff = Math.abs(selectedDate.getTime() - currentDate.getTime());
// let daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
// this.week = daysDiff + '天'; // 时间段(以天为单位)
// console.log('Selected date: ', selectedDate);
// console.log('Days difference: ', daysDiff);
// } else {
// this.week = '';
// }
// },
changeData(value) { changeData(value) {
if (value !== null) { const startDate = value[0];
const startDate = new Date(value[0]); // 开始日期 const endDate = value[1];
const endDate = new Date(value[1]); // 结束日期 const diffDate = moment(endDate).diff(startDate, 'day');
const today = new Date(); // 当前日期 this.diffDate = diffDate; // 更新diffDate属性的值
// 计算日期差(以天为单位) },
const timeDiff = Math.abs(endDate.getTime() - startDate.getTime()); // 提交按钮
const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24)); submitApply(row) {
// 如果选择的日期超过了今天,则显示日期差 this.$confirm('确认要提交申请?', '提示', {
if (endDate > today) { confirmButtonText: '确定',
this.week = daysDiff + "天"; cancelButtonText: '取消',
} else { type: 'warning'
this.week = ""; })
} .then(() => {
console.log("Start date: ", startDate); submitAuditor(row.id).then(res => {
console.log("End date: ", endDate); if (res.code == 200) {
console.log("Days difference: ", daysDiff); this.$message({
} else { type: 'success',
this.week = ""; message: '提交成功!'
})
this.getList()
} }
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消提交'
})
})
}, },
// 搜索按钮 // 搜索按钮
handleQuery() { handleQuery() {
this.throttle(() => { this.throttle(() => {
...@@ -519,76 +585,8 @@ export default { ...@@ -519,76 +585,8 @@ export default {
this.week = ""; this.week = "";
this.handleQuery(); // 重新发一次请求 this.handleQuery(); // 重新发一次请求
}, },
//获校领导下拉框、
schoolLeader() {
getLeaderList().then(((res) => {
if (res.code == 200) {
this.schoolLeaderList = res.rows
}
}))
},
//填充级部/处室数据到form,并且根据id获取主任列表
getGradeOfficeDirector(data) {
if (this.form.handUserName1) {
this.form.handUserName1 = ""
}
const { id, label } = data;
console.log(id, label, 758)
this.form.applyOrgname = label;
this.form.applyOrgid = id;
getGradeOfficeDirectorList(id).then(((res) => {
if (res.code == 200) {
this.gradeOfficeDirectorList = res.rows
}
}))
},
handleDirector(data) {
const { handUserName1, handUserId1 } = data;
this.form.handUserName1 = handUserName1;
this.form.handUserId1 = handUserId1;
},
handleDeputyLeader(data) {
const { handUserName2, handUserId2 } = data;
this.form.handUserName2 = handUserName2;
this.form.handUserId2 = handUserId2;
},
handleLeader(data) {
const { handUserName3, handUserId3 } = data;
this.form.handUserName3 = handUserName3;
this.form.handUserId3 = handUserId3;
},
leaveTime() {
//0代表教工,1代表职工
if (this.employeeType == 0) {
if (this.form.startTime && this.form.endTime && this.form.startSort && this.form.endSort) {
getLeaveTime({
startTime: formatDate(this.form.startTime),
endTime: formatDate(this.form.endTime),
startSort: this.form.startSort,
endSort: this.form.endSort,
applyType: this.employeeType
}).then((res) => {
if (res.code == 200) {
this.$set(this.form, 'dayCourse', res.dayCourse)
this.$set(this.form, 'totalTime', res.data)
}
})
}
} else {
if (this.form.startTime && this.form.endTime) {
getLeaveTime({
startTime: formatDate(this.form.startTime),
endTime: formatDate(this.form.endTime),
applyType: this.employeeType
}).then((res) => {
if (res.code == 200) {
this.$set(this.form, 'totalTime', res.data)
}
})
}
}
},
getFormatDate(timeDate) { getFormatDate(timeDate) {
let date = new Date(timeDate); let date = new Date(timeDate);
let year = date.getFullYear(); let year = date.getFullYear();
...@@ -596,41 +594,9 @@ export default { ...@@ -596,41 +594,9 @@ export default {
let day = date.getDate(); let day = date.getDate();
return [year, '-', month, '-', day].join(''); return [year, '-', month, '-', day].join('');
}, },
//获取级部/处室 主任 下拉框
gradeDirectorList() {
this.$nextTick(() => {
getGradeOfficeDirectorList(this.form.applyOrgid).then(((res) => {
if (res.code == 200) {
this.gradeOfficeDirectorList = res.rows
}
}))
})
},
formReady() {
//获取级部处室下拉框
getGradeOfficeList().then(((res) => {
this.gradeOfficeList = res.data;
})).then(() => {
getDepId().then(res => {
this.$set(this.form, "applyOrgid", res.data);
this.form.applyOrgid = res.data
let arr = this.readNodes(this.gradeOfficeList)
const node = arr.find(item => {
if (item.id == this.form.applyOrgid) {
return item
}
})
this.form.applyOrgname = node.label
//获取级部/处室 主任 下拉框
// getGradeOfficeDirectorList(this.form.applyOrgid).then(((res) => {
// if (res.code == 200) {
// this.gradeOfficeDirectorList = res.rows
// }
// }))
})
})
},
readNodes(nodes = [], arr = []) { readNodes(nodes = [], arr = []) {
for (let item of nodes) { for (let item of nodes) {
arr.push({ id: item.id, label: item.label }) arr.push({ id: item.id, label: item.label })
...@@ -645,21 +611,28 @@ export default { ...@@ -645,21 +611,28 @@ export default {
this.selectHandles.title = title; this.selectHandles.title = title;
this.selectHandles.method = method; this.selectHandles.method = method;
this.selectHandles.type = type; this.selectHandles.type = type;
// 将级部、处室 id赋值
this.selectHandles.id = this.form.applyOrgid;
}, },
// 选择处理人 // 选择处理人
selectUser(select) { selectUser(select) {
console.log('select', select);
// 这种写法存在一定危险,后续最好是可以有更好的字段名对应 // 这种写法存在一定危险,后续最好是可以有更好的字段名对应
this.$set(this.form, `handUserName${this.selectHandles.type}`, select.name); this.$set(this.form, `handUserName${this.selectHandles.type}`, select.name);
this.$set(this.form, `handUserId${this.selectHandles.type}`, select.id); this.$set(this.form, `handUserId${this.selectHandles.type}`, select.id);
this.postForm.handUserName2 = select.name;
this.postForm.leadershipId = select.id;
}, },
// 新增按钮操作 // 新增按钮操作
handleAdd() { handleAdd() {
this.reset(); this.reset();
// const userId = this.$store.state.user.userId; // const userId = this.$store.state.user.userId;
this.postForm.activityArea = "博远礼堂";
// this.postForm.specificUserName = this.$store.state.user.name;
this.isShow = true; this.isShow = true;
this.isDisabled = false; this.isDisabled = false;
this.open = true; this.open = true;
...@@ -673,7 +646,8 @@ export default { ...@@ -673,7 +646,8 @@ export default {
this.postForm = row; this.postForm = row;
getAuditor(id).then(response => { getAuditor(id).then(response => {
this.postForm = response.data; this.postForm = response.data;
console.log(1111, response.data.isRehearsal); this.postForm.handUserName2 = response.data.leadershipName
console.log(1111, response.data);
this.open = true; this.open = true;
this.isDisabled = false; this.isDisabled = false;
}); });
...@@ -723,6 +697,7 @@ export default { ...@@ -723,6 +697,7 @@ export default {
}); });
} else { } else {
// 新增 // 新增
console.log('this.postForm', this.postForm);
addAuditor(this.postForm) addAuditor(this.postForm)
.then((response) => { .then((response) => {
this.$modal.closeLoading(); this.$modal.closeLoading();
...@@ -749,32 +724,25 @@ export default { ...@@ -749,32 +724,25 @@ export default {
reset() { reset() {
// 这里需要重置对话框表单 // 这里需要重置对话框表单
this.postForm = { this.postForm = {
activityName: "",
activityArea: '',
activityTime: "",
specificUserName: this.$store.state.user.name,
activityNumber: "",
duration: "",
isRehearsal: "",
isVideo: "",
isLive: "",
isBigScreen: "",
htNumber: "",
fjmc: "",
leadershipId: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}; };
this.resetForm("postForm"); this.resetForm("postForm");
}, },
// 提交申请
submitApply(row) {
this.throttle(() => {
const id = row.id;
this.$modal
.confirm(`是否提交此用车申请`)
.then(() => {
this.$modal.loading("正在提交申请中...");
return submitApply(id);
})
.then(() => {
this.$modal.closeLoading();
this.$message.success("提交成功");
this.getList();
})
.catch((err) => {
this.$modal.closeLoading();
});
});
},
}, },
}; };
</script> </script>
...@@ -844,4 +812,10 @@ export default { ...@@ -844,4 +812,10 @@ export default {
.btntext { .btntext {
width: 260px; width: 260px;
} }
// 新增弹窗输入框宽度
.equal-width {
width: 100%;
/* 设置宽度为100% */
}
</style> </style>
...@@ -146,10 +146,11 @@ export default { ...@@ -146,10 +146,11 @@ export default {
changeDate() { changeDate() {
this.endTime = moment(this.queryParams.startTime).add(9, 'days') this.endTime = moment(this.queryParams.startTime).add(9, 'days')
}, },
fetchStudioUseData() { fetchStudioUseData() {
// 调用接口获取录播室占用情况数据 // 调用接口获取录播室占用情况数据
console.log(123654, this.queryParams); console.log(123654, this.queryParams);
getstudioUse(this.queryParams).then((res) => { getstudioUse(this.queryParams.startTime, this.queryParams.studioId).then((res) => {
this.studioUseData = res.rows; this.studioUseData = res.rows;
console.log(123, this.studioUseData); console.log(123, this.studioUseData);
}); });
......
<template> <template>
<div class="" style="padding:15px 10px 0 10px"> <div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <!-- 搜索条件表单 -->
<el-form-item label="日期" prop="startTime"><el-date-picker v-model="queryParams.startTime" type="daterange" <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="showSearch">
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" placeholder="请选择录播室" clearable> <el-form-item label="日期" prop="startTime">
</el-date-picker></el-form-item> <el-date-picker size="small" v-model="queryParams.startTime" type="date" placeholder="开始日期"
<el-form-item label="录播室" prop="roomId"> value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDate" :picker-options="pickerOptions"
<el-select v-model="queryParams.roomId" placeholder="请选择录播室" clearable> style="margin-right:10px">
<el-option v-for="room in rooms" :key="room.id" :value="room.id" :label="room.name"></el-option> </el-date-picker>
<el-date-picker size="small" type="date" v-model="endTime" disabled>
</el-date-picker>
</el-form-item>
<el-form-item prop="studioId" :rules="[{ required: true, message: '请选择录播室', trigger: 'change,blur' }]">
<el-select v-model="queryParams.studioId" placeholder="录播室">
<el-option v-for="item in options" :key="item.id" :label="item.studioName" :value="item.id">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-button @click="fetchData">查询</el-button> <el-button size="mini" type="primary" icon="el-icon-search" @click="fetchData">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form> </el-form>
<p style="margin: 0 0 0 30px;font-size: 14px">
<table class="tabstyle" > 说明:(1)录播室每天开放上午四节、下午四节、晚上三节。共计每天11节。(2)请提前一天进行预约。(3)预约不可跨天,跨天请进行多次预约</p>
<!-- 录播室占用情况表格 -->
<table style="margin-left: 30px">
<thead> <thead>
<tr> <tr>
<th></th> <!-- 表头 -->
<th v-for="day in days" :key="day">{{ day }}</th> <th style="background:none"></th>
<!-- 表格表头日期-->
<th style="background:none;font-size:16px;font-weight:normal" v-for="day in days" :key="day">{{ day }}
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(timeSlot, index) in timeSlots" :key="index"> <tr v-for="(timeSlot, index) in timeSlots" :key="index">
<td>{{ timeSlot }}</td> <td>{{ timeSlot }}</td>
<td v-for="(day, dayIndex) in days" :key="dayIndex" :class="{ occupied: isOccupied(day, index) }" <!-- <td v-for="(day, dayIndex) in days" :key="dayIndex" :class="{-->
@click="selectTimeSlot(day, index)"> <!-- occupied: isOccupied(day, index),-->
<!-- selected: isSelected(day, index),-->
<!-- }" @mousedown="handleMouseDown(day, index)" @mouseup="handleMouseUp(day, index)"-->
<!-- @mouseenter="handleMouseEnter(day, index)" @click="handleCellClick(day, index)">-->
<!-- {{ isOccupied(day, index) ? "占用" : "" }}-->
<!-- </td>-->
<td v-for="(day, dayIndex) in days" :key="dayIndex" :class="{
occupied: isOccupied(day, index),
selected: isSelected(day, index),
}" @click="handleCellClick(day, index)">
{{ isOccupied(day, index) ? "占用" : "" }} {{ isOccupied(day, index) ? "占用" : "" }}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- 预约录播室 -->
<!-- <el-dialog :visible.sync="dialogVisible" title="预约录播室">
<el-form :model="bookingForm">
<el-form-item label="开始时间">
<el-date-picker
v-model="bookingForm.startTime"
type="datetime"
placeholder="请选择开始时间"
></el-date-picker>
</el-form-item>
<el-form-item label="节次">
<el-checkbox-group v-model="bookingForm.timeSlots">
<el-checkbox
v-for="timeSlot in timeSlots"
:key="timeSlot"
:label="timeSlot"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="录播内容">
<el-input
v-model="bookingForm.content"
placeholder="请输入录播内容"
></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmBooking">确定</el-button>
</div>
</el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
import {
getAppointmentList, // 录播室下拉框列表
addIdle, // 新增录播室预约
getstudioUse, // 查询录播室使用情况
} from "@/api/smartSchool/personWork/recordingroomAppointment/IdleSituation";
import moment from 'moment'
export default { export default {
data() { data() {
return { return {
showSearch: true, // 显示搜索条件 //选择日期限制
dialogVisible: false, //预约录播室弹窗 pickerOptions: {
successDialogVisible: false, //预约录播室成功弹窗 disabledDate(time) {
//包含今天
// return time.getTime() < Date.now() - 8.64e7;
//不含今天
return time.getTime() < Date.now();
}
},
time: '',
studioUseData: [], // 存储录播室占用情况数据
showSearch: true, // 是否显示搜索条件
successDialogVisible: false, // 预约录播室成功的弹窗是否可见
//弹框表单
form: {
studioContent: ''
},
days: [], // 存储日期的数组 days: [], // 存储日期的数组
timeSlots: [], // 存储时间段的数组 timeSlots: [], // 存储时间段的数组
selectedTimeSlots: [], // 存储已选时间段的数组 selectedTimeSlots: [], // 存储已选时间段的数组
isMouseDown: false, // 鼠标按下标志位
startSelection: null, // 选中的开始时间段
endSelection: null, // 选中的结束时间段
options: "",
bookingForm: { bookingForm: {
startTime: "", startTime: "", // 录播开始时间
timeSlots: "", timeSlots: "", // 预约的时间段
}, },
queryParams: { queryParams: {
roomId: "", studioId: "", // 录播室名称
startTime: "", startTime: "", // 查询的开始时间
}, },
rooms: [ //表格占用数据
// 录播室列表 occupiedData: [],
{ id: 1, name: "录播室1" }, //弹框标记符
{ id: 2, name: "录播室2" }, remark: false,
{ id: 3, name: "录播室3" }, rooms: [], //录播室下拉列表存储
], endTime: ''
}; };
}, },
created() { created() {
this.queryParams.startTime = moment(new Date()).add(1, 'days').format("YYYY-MM-DD");
this.endTime = moment(this.queryParams.startTime).add(9, 'days')
// 初始化日期和时间段 // 初始化日期和时间段
this.initDays(); this.initDays();
this.initTimeSlots(); this.initTimeSlots();
// 获取录播室下拉框列表
this.getRoomList();
this.fetchStudioUseData();
// this.fetchData();
}, },
methods: { methods: {
// 表格侧面节次循环 changeDate() {
this.endTime = moment(this.queryParams.startTime).add(9, 'days')
},
fetchStudioUseData() {
// 调用接口获取录播室占用情况数据
console.log(123654, this.queryParams);
getstudioUse(this.queryParams.startTime, this.queryParams.studioId).then((res) => {
this.studioUseData = res.rows;
console.log(123, this.studioUseData);
});
},
//表格占用显示
isOccupied(day, index) {
// 判断指定的时间段是否被占用
const occupiedData = this.studioUseData.find((item) => {
// console.log('Array.from(item.useJc)',item.useJc.split(','))
// console.log('Array.from(item.useJc)',index + 1)
return item.useDate === day && item.useJc.split(',').includes((index + 1).toString());
});
return occupiedData ? occupiedData.useUserId : false;
},
//表格点击选中
isSelected(day, index) {
if (this.isOccupied(day, index)) {
return false
} else {
// 检查时间段是否已选中
return this.selectedTimeSlots.some((selectedSlot) => {
// console.log('selectedSlot',selectedSlot)
return selectedSlot.day === day && selectedSlot.index === index;
});
}
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryParams");
this.fetchStudioUseData();
},
// 表单重置
reset() {
this.queryParams = {
startTime: "",
studioName: "",
};
this.resetForm("queryParams");
},
//表格点击事件
handleCellClick(day, index) {
console.log('day', day)
console.log('index', index + 1)
//占用点击不生效
if (this.isOccupied(day, index) && this.selectedTimeSlots.length == 0) {
this.remark = false
return
} else if (this.selectedTimeSlots.length == 0) {
// 处理单元格点击事件,点击第一个
this.selectedTimeSlots.push({ day, index })
this.remark = true
//没有选同一天
} else if (this.selectedTimeSlots[0].day != day) {
this.remark = true
this.$modal.alertWarning("预约不可跨天");
return;
} else {
this.remark = true
//筛选出符合条件的对象
const selectObj = this.selectedTimeSlots.find((item) => {
console.log('find', item.day == day && item.index == index)
return item.day == day && item.index == index
})
console.log('selectObj', selectObj)
if (selectObj != undefined) {
this.remark = true
this.selectedTimeSlots = this.selectedTimeSlots.filter(item => item.index != index)
this.selectedTimeSlots.length == 0 ? this.remark = false : this.selectedTimeSlots
} else {
this.selectedTimeSlots.push({ day, index })
}
}
},
// -----------------------------------------------------
/**录播室下拉框列表*/
getRoomList() {
getAppointmentList({}).then((res) => {
this.options = res.rows;
console.log('res', res)
});
},
initTimeSlots() { initTimeSlots() {
// 初始化时间段 // 初始化时间段
this.timeSlots = [ this.timeSlots = [
...@@ -117,127 +229,166 @@ export default { ...@@ -117,127 +229,166 @@ export default {
"第十一节(晚上)", "第十一节(晚上)",
]; ];
}, },
// 表格日期循环 //表格头部日期
initDays() { initDays() {
// 假设从明天开始,获取未来10天的日期 // 假设从明天开始,获取未来10天的日期
const startDate = new Date(); // const startDate = new Date();
startDate.setDate(startDate.getDate() + 1); // startDate.setDate(startDate.getDate() + 1);
// console.log('startDate',startDate)
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
const currentDate = new Date(startDate); const formattedDate = moment(this.queryParams.startTime).add(i, 'days').format("YYYY-MM-DD");
currentDate.setDate(currentDate.getDate() + i); console.log('formattedDate', formattedDate)
const formattedDate = this.formatDate(currentDate); // const currentDate = new Date(startDate);
// currentDate.setDate(currentDate.getDate() + i);
// const formattedDate = this.formatDate(currentDate);
this.days.push(formattedDate); this.days.push(formattedDate);
} }
}, },
formatDate(date) { // formatDate(date) {
// 格式化日期为'YYYY-MM-DD'的形式 // // 格式化日期为'YYYY-MM-DD'的形式
const year = date.getFullYear(); // const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0"); // const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0"); // const day = String(date.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`; // return `${year}-${month}-${day}`;
// },
// isOccupied(day, index) {
// // 判断指定的时间段是否被占用
// // 这里假设你有一个函数可以根据日期和时间段查询录播室的占用情况
// const isOccupied = false; // 使用你的接口或数据来判断
// return isOccupied;
// },
handleMouseDown(day, index) {
// 处理鼠标按下事件
this.isMouseDown = true;
this.startSelection = { day, index };
this.endSelection = { day, index };
}, },
// 指定某一天时间段录播室是否被占用 handleMouseUp(day, index) {
isOccupied(day, index) { // 处理鼠标松开事件
// 判断指定的时间段是否被占用 this.isMouseDown = false;
// 这里假设你有一个函数可以根据日期和时间段查询录播室的占用情况 this.endSelection = { day, index };
const isOccupied = false; // 使用你的接口或数据来判断
return isOccupied; // 根据按下的键盘按键进行选择操作
}, if (event.ctrlKey) {
// 检查录播室是否被占用 // 按住 Ctrl 键进行跨格单选
selectTimeSlot(day, index) { this.selectedTimeSlots = [this.startSelection];
// 选择或取消选择时间段 } else if (event.shiftKey) {
const selectedSlot = { day, index }; // 按住 Shift 键进行不跨格多选(同一天内)
const isSelected = this.isSelected(selectedSlot); this.selectedTimeSlots = [];
this.selectMultipleSlots();
if (isSelected) {
// 如果已选择,则取消选择
this.selectedTimeSlots = this.selectedTimeSlots.filter((slot) => {
return !(
slot.day === selectedSlot.day && slot.index === selectedSlot.index
);
});
} else { } else {
// 如果未选择,则添加选择 // 单格单选
this.selectedTimeSlots.push(selectedSlot); this.selectedTimeSlots = [this.startSelection];
} }
}, },
isSelected(slot) { handleMouseEnter(day, index) {
// 检查时间段是否已选择 // 处理鼠标进入单元格事件(用于 Shift 键多选)
return this.selectedTimeSlots.some((selectedSlot) => { if (this.isMouseDown && event.shiftKey) {
return ( this.endSelection = { day, index };
selectedSlot.day === slot.day && selectedSlot.index === slot.index this.selectMultipleSlots();
); }
}); },
//多选事件
selectMultipleSlots() {
// 选择多个时间段(同一天内)
const startDay = this.startSelection.day;
const endDay = this.endSelection.day;
const startIndex = this.startSelection.index;
const endIndex = this.endSelection.index;
const selectedTimeSlots = [];
// 遍历日期范围内的时间段,选择符合条件的时间段
for (
let dayIndex = this.days.indexOf(startDay);
dayIndex <= this.days.indexOf(endDay);
dayIndex++
) {
const day = this.days[dayIndex];
// 对于同一天内的时间段,根据索引范围进行选择
if (
dayIndex === this.days.indexOf(startDay) &&
dayIndex === this.days.indexOf(endDay)
) {
for (let index = startIndex; index <= endIndex; index++) {
selectedTimeSlots.push({ day, index });
}
} else if (dayIndex === this.days.indexOf(startDay)) {
// 对于起始日期,选择从起始索引到最后一个时间段
for (let index = startIndex; index < this.timeSlots.length; index++) {
selectedTimeSlots.push({ day, index });
}
} else if (dayIndex === this.days.indexOf(endDay)) {
// 对于结束日期,选择从第一个时间段到结束索引
for (let index = 0; index <= endIndex; index++) {
selectedTimeSlots.push({ day, index });
}
} else {
// 其他日期完全选择
for (let index = 0; index < this.timeSlots.length; index++) {
selectedTimeSlots.push({ day, index });
}
}
}
this.selectedTimeSlots = selectedTimeSlots;
}, },
// 查询按钮
fetchData() { fetchData() {
// 预约按钮的点击事件处理程序 this.studioUseData = []
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约操作 this.fetchStudioUseData()
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约 // this.days = [];
// 预约成功后,你可以根据已选时间段的数据来更新录播室的占用情况 // // 查询按钮的点击事件处理程序
// 提示预约成功等其他操作 // this.initDays()
console.log("查询成功"); // getstudioUse({
}, // startTime: this.queryParams.startTime,
// 预约按钮 // studioId: this.queryParams.studioId,
reserve() { // })
// 预约按钮的点击事件处理程序 // .then((res) => {
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约操作 // this.studioUseData = res;
this.successDialogVisible = true; // })
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约 // .then((response) => {
// 预约成功后,你可以根据已选时间段的数据来更新录播室的占用情况 // // console.log(response);
// 提示预约成功等其他操作 // if (response.code == 200) {
console.log("预约成功"); // this.studioUseData = response.rows;
}, // console.log(222, response.rows);
// 弹窗确定 // }
confirmBooking() { // });
// 预约按钮的点击事件处理程序 // // 在这里,你可以发送请求获取录播室占用情况等数据
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约操作 // console.log("查询成功");
this.successDialogVisible = false;
this.$message({
message: "预约成功",
type: "success",
});
// 在这里,你可以处理预约操作,例如弹出对话框来录入录播内容并进行预约
// 预约成功后,你可以根据已选时间段的数据来更新录播室的占用情况
// 提示预约成功等其他操作
console.log("确定");
}, },
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.tabstyle { table {
border-collapse: collapse; border-collapse: collapse;
margin-bottom: 15px; margin-top: 20px;
font-size: 16px !important; }
.el-form {
margin-top: 20px;
margin-left: 30px;
} }
.tabstyle td, th,
.tabstyle th { td {
border: 1px solid black; border: 1px solid #000;
padding: 8px; padding: 8px;
position: relative; text-align: center;
} }
.tabstyle input[type="text"] { th {
border: none; background-color: #ccc;
outline: none;
font-size: inherit;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
/* opacity: 0; */
} }
.occupied { .occupied {
background-color: #ccc; background-color: #ccc;
color: #000; color: #000;
cursor: not-allowed; cursor: not-allowed;
} }
.selected {
background-color: #66b3ff;
}
</style> </style>
package yangtz.cs.liu.campus.controller.auditorium;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import yangtz.cs.liu.activiti.domain.HistoricActivity;
import yangtz.cs.liu.activiti.service.IProcessService;
import yangtz.cs.liu.campus.domain.auditorium.SchoolAuditorium;
import yangtz.cs.liu.campus.domain.teacher.SchoolTeacherLeave;
import yangtz.cs.liu.campus.domain.temp.AuditoriumTemplate;
import yangtz.cs.liu.campus.domain.temp.LeaveResultTemplate;
import yangtz.cs.liu.campus.domain.temp.TeacherLeaveTemplate;
import yangtz.cs.liu.campus.service.auditorium.ISchoolAuditoriumService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherService;
import yangtz.cs.liu.campus.vo.auditorium.SchoolAuditoriumVo;
import yangtz.cs.liu.campus.vo.teacher.TeacherLeaveVO;
import yangtz.cs.liu.wechat.service.api.IWxApiService;
import static com.core.constant.ProcessDefinition.*;
import static yangtz.cs.liu.campus.constant.ProcessState.*;
import static yangtz.cs.liu.campus.constant.ProcessState.ZHUYAO;
/**
* 学校礼堂预约Controller
*
* @author ruoyi
* @date 2023-06-14
*/
@RestController
@RequestMapping("/auditorium")
public class SchoolAuditoriumController extends BaseController
{
@Autowired
private ISchoolAuditoriumService schoolAuditoriumService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IProcessService processService;
@Autowired
private ISchoolTeacherService teacherService;
@Autowired
private IWxApiService wxApiService;
/**
* 查询全部学校礼堂预约列表
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolAuditoriumVo schoolAuditorium)
{
startPage();
List<SchoolAuditoriumVo> list = schoolAuditoriumService.selectSchoolAuditoriumList(schoolAuditorium);
return getDataTable(list);
}
/**
* 查询个人学校礼堂预约列表
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:list')")
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolAuditoriumVo schoolAuditorium)
{
startPage();
List<SchoolAuditoriumVo> list = schoolAuditoriumService.selectSchoolAuditoriumListGr(schoolAuditorium);
return getDataTable(list);
}
/**
* 导出学校礼堂预约列表
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:export')")
@Log(title = "学校礼堂预约", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolAuditoriumVo schoolAuditorium)
{
List<SchoolAuditoriumVo> list = schoolAuditoriumService.selectSchoolAuditoriumList(schoolAuditorium);
ExcelUtil<SchoolAuditoriumVo> util = new ExcelUtil<SchoolAuditoriumVo>(SchoolAuditoriumVo.class);
util.exportExcel(response, list, "学校礼堂预约数据");
}
/**
* 获取学校礼堂预约详细信息
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolAuditoriumService.selectSchoolAuditoriumById(id));
}
/**
* 新增学校礼堂预约
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:add')")
@Log(title = "学校礼堂预约", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolAuditorium schoolAuditorium)
{
return toAjax(schoolAuditoriumService.insertSchoolAuditorium(schoolAuditorium));
}
/**
* 修改学校礼堂预约
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:edit')")
@Log(title = "学校礼堂预约", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolAuditorium schoolAuditorium)
{
return toAjax(schoolAuditoriumService.updateSchoolAuditorium(schoolAuditorium));
}
/**
* 删除学校礼堂预约
*/
// @PreAuthorize("@ss.hasPermi('auditorium:auditorium:remove')")
@Log(title = "学校礼堂预约", businessType = BusinessType.DELETE)
@DeleteMapping("/deleteByIds/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolAuditoriumService.deleteSchoolAuditoriumByIds(ids));
}
/**
* 提交申请
*/
@PostMapping("/submitApply/{id}")
public AjaxResult submitApply(@PathVariable("id") Long id){
SchoolAuditorium schoolAuditorium = schoolAuditoriumService.getById(id);
if (StringUtils.isNull(schoolAuditorium)) {
throw new ServiceException("提交申请失败,未查询到相关信息");
}
String userName = getUsername();
schoolAuditorium.setApplyId(getUserId());
schoolAuditorium.setApplyName(userName);
schoolAuditorium.setApplyDeptId(getDeptId());
schoolAuditorium.setApplyTime(DateUtils.getNowDate());
schoolAuditoriumService.submitApply(schoolAuditorium, userName, AUDITORIUMAPPLY, new HashMap<>());
/**发送模板消息到分管领导*/
AuditoriumTemplate template = new AuditoriumTemplate();
String openId = teacherService.getOpenIdByUserId(schoolAuditorium.getLeadershipId());
template.setToUserOpenId(openId);
template.setFirst("您好,您有礼堂预约申请等待审批。");
template.setApplyUser(schoolAuditorium.getApplyName());
template.setContent(schoolAuditorium.getActivityName());
template.setApplyTime(schoolAuditorium.getApplyTime());
template.setRemark("请您尽快处理。");
wxApiService.sendAuditoriumTemplate(template);
return AjaxResult.success("提交成功");
}
/**
* 待办事项列表
*/
@GetMapping("/taskList")
public TableDataInfo taskList(SchoolAuditorium entity) {
String userId = getUserId().toString();
List<SchoolAuditoriumVo> list = schoolAuditoriumService.findTodoTasks(AUDITORIUMAPPLY, entity, userId);
return getTaskTable(list, list.size());
}
/**
* 已办事项列表
*/
@GetMapping("/taskDoneList")
public TableDataInfo taskDoneList(SchoolAuditorium entity) {
String userId = getUserId().toString();
List<SchoolAuditoriumVo> list = schoolAuditoriumService.findDoneTasks(AUDITORIUMAPPLY, entity, userId);
return getTaskTable(list,list.size());
}
/**
* 完成任务
*/
@PostMapping("/complete/{taskId}/{instanceId}")
@Transactional(rollbackFor = Exception.class)
public AjaxResult complete(@PathVariable("taskId") String taskId, @PathVariable("instanceId") String instanceId, @RequestBody Map<String, Object> variables) {
processService.completeTask(taskId, instanceId, variables);
LambdaQueryWrapper<SchoolAuditorium> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolAuditorium::getInstanceId,instanceId);
SchoolAuditorium leave = schoolAuditoriumService.getOne(wrapper);
Boolean flag = Boolean.parseBoolean(variables.get("pass").toString());
/**判断流程是否结束,如果结束则更新礼堂预约状态*/
ProcessInstance rpi = runtimeService
.createProcessInstanceQuery()//创建流程实例查询对象
.processInstanceId(instanceId)
.singleResult();
//说明流程实例结束了
if(rpi==null){
if(flag){
leave.setState("2");
}else {
leave.setState("3");
}
/** 修改任务结果 */
schoolAuditoriumService.updateById(leave);
/**发送模板消息到申请人,审批结果*/
LeaveResultTemplate template = new LeaveResultTemplate();
template.setFirst("您好,您的礼堂预约申请已回复。");
//获取申请人openId
String openId = teacherService.getOpenIdByUserId(leave.getApplyId());
template.setToUserOpenId(openId);
template.setResult(flag ? "已通过" : "已驳回");
template.setRemark("审批留言: "+ variables.get("comment"));
List<HistoricActivity> list = processService.selectHistoryList(instanceId,new HistoricActivity());
if(StringUtils.isNotNull(list) && list.size() > 0){
HistoricActivity activity = list.get(0);
template.setAuditTime(activity.getEndTime());
}
wxApiService.sendLeaveResultTemplate(template);
return AjaxResult.success("审批完成");
}
return AjaxResult.success("审批完成");
}
}
\ No newline at end of file
...@@ -323,4 +323,16 @@ public class SchoolPurchaseController extends BaseController { ...@@ -323,4 +323,16 @@ public class SchoolPurchaseController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 资金使用明细列表
* @param schoolPurchase
* @return
*/
@GetMapping("/selectPurchaseList")
public TableDataInfo selectPurchaseList(SchoolPurchase schoolPurchase){
startPage();
List<SchoolPurchaseVo> list = schoolPurchaseService.selectPurchaseList(schoolPurchase);
return getDataTable(list);
}
} }
package yangtz.cs.liu.campus.controller.schoolDepartmentBudget;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.activiti.domain.HistoricActivity;
import yangtz.cs.liu.activiti.service.IProcessService;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudget;
import yangtz.cs.liu.campus.domain.temp.DepartmentBudgetTemplate;
import yangtz.cs.liu.campus.domain.temp.LeaveResultTemplate;
import yangtz.cs.liu.campus.service.schoolDepartmentBudget.ISchoolDepartmentBudgetService;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherService;
import yangtz.cs.liu.campus.vo.schoolDepartmentBudget.SchoolDepartmentBudgetVo;
import yangtz.cs.liu.wechat.service.api.IWxApiService;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.core.constant.ProcessDefinition.DEPARTMENTBUDGET;
/**
* 科室预算填报Controller
*
* @author ruoyi
* @date 2023-07-11
*/
@RestController
@RequestMapping("/departmentBudget")
public class SchoolDepartmentBudgetController extends BaseController
{
@Autowired
private ISchoolDepartmentBudgetService schoolDepartmentBudgetService;
@Autowired
private IProcessService processService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private ISchoolTeacherService teacherService;
@Autowired
private IWxApiService wxApiService;
/**
* 查询全部科室预算填报列表
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolDepartmentBudget schoolDepartmentBudget)
{
startPage();
List<SchoolDepartmentBudgetVo> list = schoolDepartmentBudgetService.selectSchoolDepartmentBudgetList(schoolDepartmentBudget);
return getDataTable(list);
}
/**
* 查询本单位科室预算填报列表
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:list')")
@GetMapping("/listDw")
public TableDataInfo listDw(SchoolDepartmentBudget schoolDepartmentBudget)
{
startPage();
List<SchoolDepartmentBudgetVo> list = schoolDepartmentBudgetService.selectSchoolDepartmentBudgetListDw(schoolDepartmentBudget);
return getDataTable(list);
}
/**
* 导出科室预算填报列表
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:export')")
@Log(title = "科室预算填报", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolDepartmentBudget schoolDepartmentBudget)
{
List<SchoolDepartmentBudgetVo> list = schoolDepartmentBudgetService.selectSchoolDepartmentBudgetList(schoolDepartmentBudget);
ExcelUtil<SchoolDepartmentBudgetVo> util = new ExcelUtil<SchoolDepartmentBudgetVo>(SchoolDepartmentBudgetVo.class);
util.exportExcel(response, list, "科室预算填报数据");
}
/**
* 获取科室预算填报详细信息
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolDepartmentBudgetService.selectSchoolDepartmentBudgetById(id));
}
/**
* 新增科室预算填报
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:add')")
@Log(title = "科室预算填报", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolDepartmentBudgetVo schoolDepartmentBudget)
{
return toAjax(schoolDepartmentBudgetService.insertSchoolDepartmentBudget(schoolDepartmentBudget));
}
/**
* 修改科室预算填报
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:edit')")
@Log(title = "科室预算填报", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolDepartmentBudgetVo schoolDepartmentBudget)
{
return toAjax(schoolDepartmentBudgetService.updateSchoolDepartmentBudget(schoolDepartmentBudget));
}
/**
* 删除科室预算填报
*/
// @PreAuthorize("@ss.hasPermi('departmentBudget:budget:remove')")
@Log(title = "科室预算填报", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolDepartmentBudgetService.deleteSchoolDepartmentBudgetByIds(ids));
}
/**
* 提交申请
*/
@PostMapping("/submitApply/{id}")
public AjaxResult submitApply(@PathVariable("id") Long id){
SchoolDepartmentBudget schoolDepartmentBudget = schoolDepartmentBudgetService.getById(id);
if (StringUtils.isNull(schoolDepartmentBudget)) {
throw new ServiceException("提交申请失败,未查询到相关信息");
}
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//设置申请人id
schoolDepartmentBudget.setApplyId(user.getUserId());
//设置申请人
schoolDepartmentBudget.setApplyName(user.getUserName());
//设置申请时间
schoolDepartmentBudget.setApplyTime(DateUtils.getNowDate());
String userName = user.getUserName();
schoolDepartmentBudgetService.submitApply(schoolDepartmentBudget,userName,DEPARTMENTBUDGET,new HashMap<>());
/**发送模板消息到分管领导*/
DepartmentBudgetTemplate template = new DepartmentBudgetTemplate();
String openId = teacherService.getOpenIdByUserId(schoolDepartmentBudget.getLeadershipId());
template.setToUserOpenId(openId);
template.setFirst("您好,您有科室预算申请等待审批。");
template.setApplyUser(schoolDepartmentBudget.getApplyName());
template.setContent(schoolDepartmentBudget.getYear() + "年度" + schoolDepartmentBudget.getDeptName() + "预算申请");
template.setApplyTime(schoolDepartmentBudget.getApplyTime());
template.setRemark("请您尽快处理。");
wxApiService.sendDepartmentBudgetTemplate(template);
return AjaxResult.success("提交成功");
}
/**
* 待办事项列表
*/
@GetMapping("/taskList")
public TableDataInfo taskList(SchoolDepartmentBudget entity) {
String userId = getUserId().toString();
List<SchoolDepartmentBudgetVo> list = schoolDepartmentBudgetService.findTodoTasks(DEPARTMENTBUDGET, entity, userId);
return getTaskTable(list, list.size());
}
/**
* 已办事项列表
*/
@GetMapping("/taskDoneList")
public TableDataInfo taskDoneList(SchoolDepartmentBudget entity) {
String userId = getUserId().toString();
List<SchoolDepartmentBudgetVo> list = schoolDepartmentBudgetService.findDoneTasks(DEPARTMENTBUDGET, entity, userId);
return getTaskTable(list,list.size());
}
/**
* 完成任务
*/
@PostMapping("/complete/{taskId}/{instanceId}")
@Transactional(rollbackFor = Exception.class)
public AjaxResult complete(@PathVariable("taskId") String taskId, @PathVariable("instanceId") String instanceId, @RequestBody Map<String, Object> variables) {
processService.completeTask(taskId, instanceId, variables);
LambdaQueryWrapper<SchoolDepartmentBudget> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolDepartmentBudget::getInstanceId,instanceId);
SchoolDepartmentBudget leave = schoolDepartmentBudgetService.getOne(wrapper);
Boolean flag = Boolean.parseBoolean(variables.get("pass").toString());
/**判断流程是否结束,如果结束则更新礼堂预约状态*/
ProcessInstance rpi = runtimeService
.createProcessInstanceQuery()//创建流程实例查询对象
.processInstanceId(instanceId)
.singleResult();
//说明流程实例结束了
if(rpi==null){
if(flag){
leave.setState("2");
}else {
leave.setState("3");
}
/** 修改任务结果 */
schoolDepartmentBudgetService.updateById(leave);
/**发送模板消息到申请人,审批结果*/
LeaveResultTemplate template = new LeaveResultTemplate();
template.setFirst("您好,您的科室预算申请已回复。");
//获取申请人openId
String openId = teacherService.getOpenIdByUserId(leave.getApplyId());
template.setToUserOpenId(openId);
template.setResult(flag ? "已通过" : "已驳回");
template.setRemark("审批留言: "+ variables.get("comment"));
List<HistoricActivity> list = processService.selectHistoryList(instanceId,new HistoricActivity());
if(StringUtils.isNotNull(list) && list.size() > 0){
HistoricActivity activity = list.get(0);
template.setAuditTime(activity.getEndTime());
}
wxApiService.sendLeaveResultTemplate(template);
return AjaxResult.success("审批完成");
}
return AjaxResult.success("审批完成");
}
/**
* 获取当前登录人信息
*/
@GetMapping("/getUserXx")
public AjaxResult getUserXx(){
SysUser user = SecurityUtils.getLoginUser().getUser();
Map<String,Object> map = new HashMap<>();
map.put("userId",user.getUserId());
map.put("userName",user.getUserName());
map.put("deptId",user.getDeptId());
map.put("deptName",user.getDept().getDeptName());
return AjaxResult.success(map);
}
}
package yangtz.cs.liu.campus.controller.schoolDepartmentBudget;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import yangtz.cs.liu.campus.service.schoolDepartmentBudget.ISchoolDepartmentBudgetProjectmxService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 科室预算填报项目明细Controller
*
* @author ruoyi
* @date 2023-07-11
*/
@RestController
@RequestMapping("/departmentBudgetProjectmx")
public class SchoolDepartmentBudgetProjectmxController extends BaseController
{
@Autowired
private ISchoolDepartmentBudgetProjectmxService schoolDepartmentBudgetProjectmxService;
/**
* 查询科室预算填报项目明细列表
*/
// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
{
startPage();
List<SchoolDepartmentBudgetProjectmx> list = schoolDepartmentBudgetProjectmxService.selectList(schoolDepartmentBudgetProjectmx);
return getDataTable(list);
}
/**
* 导出科室预算填报项目明细列表
*/
// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:export')")
@Log(title = "科室预算填报项目明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
{
List<SchoolDepartmentBudgetProjectmx> list = schoolDepartmentBudgetProjectmxService.selectList(schoolDepartmentBudgetProjectmx);
ExcelUtil<SchoolDepartmentBudgetProjectmx> util = new ExcelUtil<SchoolDepartmentBudgetProjectmx>(SchoolDepartmentBudgetProjectmx.class);
util.exportExcel(response, list, "科室预算填报项目明细数据");
}
/**
* 获取科室预算填报项目明细详细信息
*/
// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolDepartmentBudgetProjectmxService.selectSchoolDepartmentBudgetProjectmxById(id));
}
// /**
// * 新增科室预算填报项目明细
// */
//// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:add')")
// @Log(title = "科室预算填报项目明细", businessType = BusinessType.INSERT)
// @PostMapping
// public AjaxResult add(@RequestBody SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
// {
// return toAjax(schoolDepartmentBudgetProjectmxService.insertSchoolDepartmentBudgetProjectmx(schoolDepartmentBudgetProjectmx));
// }
//
// /**
// * 修改科室预算填报项目明细
// */
//// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:edit')")
// @Log(title = "科室预算填报项目明细", businessType = BusinessType.UPDATE)
// @PutMapping
// public AjaxResult edit(@RequestBody SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
// {
// return toAjax(schoolDepartmentBudgetProjectmxService.updateSchoolDepartmentBudgetProjectmx(schoolDepartmentBudgetProjectmx));
// }
//
// /**
// * 删除科室预算填报项目明细
// */
//// @PreAuthorize("@ss.hasPermi('departmentBudgetProjectmx:projectmx:remove')")
// @Log(title = "科室预算填报项目明细", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(schoolDepartmentBudgetProjectmxService.deleteSchoolDepartmentBudgetProjectmxByIds(ids));
// }
}
package yangtz.cs.liu.campus.controller.schoolStudio;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudio;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioAppointment;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioAppointmentService;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 录播室预约情况Controller
*
* @author ruoyi
* @date 2023-07-10
*/
@RestController
@RequestMapping("/studioAppointment")
public class SchoolStudioAppointmentController extends BaseController
{
@Autowired
private ISchoolStudioAppointmentService schoolStudioAppointmentService;
@Autowired
private ISchoolStudioService schoolStudioService;
/**
* 查询全部录播室预约情况列表
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolStudioAppointment schoolStudioAppointment)
{
startPage();
List<SchoolStudioAppointment> list = schoolStudioAppointmentService.selectSchoolStudioAppointmentList(schoolStudioAppointment);
return getDataTable(list);
}
/**
* 查询个人录播室预约情况列表
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:listGr')")
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolStudioAppointment schoolStudioAppointment)
{
startPage();
List<SchoolStudioAppointment> list = schoolStudioAppointmentService.selectSchoolStudioAppointmentListGr(schoolStudioAppointment);
return getDataTable(list);
}
/**
* 导出录播室预约情况列表
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:export')")
@Log(title = "录播室预约情况", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolStudioAppointment schoolStudioAppointment)
{
List<SchoolStudioAppointment> list = schoolStudioAppointmentService.selectSchoolStudioAppointmentList(schoolStudioAppointment);
ExcelUtil<SchoolStudioAppointment> util = new ExcelUtil<SchoolStudioAppointment>(SchoolStudioAppointment.class);
util.exportExcel(response, list, "录播室预约情况数据");
}
/**
* 获取录播室预约情况详细信息
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolStudioAppointmentService.selectSchoolStudioAppointmentById(id));
}
/**
* 新增录播室预约
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:add')")
@Log(title = "录播室预约情况", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolStudioAppointment schoolStudioAppointment)
{
return toAjax(schoolStudioAppointmentService.insertSchoolStudioAppointment(schoolStudioAppointment));
}
/**
* 取消录播室预约
*/
// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:edit')")
@Log(title = "录播室预约情况", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolStudioAppointment schoolStudioAppointment)
{
return toAjax(schoolStudioAppointmentService.updateSchoolStudioAppointment(schoolStudioAppointment));
}
/**
* 录播室下拉框列表
* @return
*/
@GetMapping("/studioList")
public TableDataInfo studioList(){
SchoolStudio schoolStudio = new SchoolStudio();
schoolStudio.setStudioStatu("1");
List<SchoolStudio> schoolStudios = schoolStudioService.selectSchoolStudioList(schoolStudio);
return getDataTable(schoolStudios);
}
// /**
// * 删除录播室预约情况
// */
//// @PreAuthorize("@ss.hasPermi('studioAppointment:appointment:remove')")
// @Log(title = "录播室预约情况", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(schoolStudioAppointmentService.deleteSchoolStudioAppointmentByIds(ids));
// }
}
package yangtz.cs.liu.campus.controller.schoolStudio;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudio;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 录播室管理Controller
*
* @author ruoyi
* @date 2023-07-10
*/
@RestController
@RequestMapping("/studio")
public class SchoolStudioController extends BaseController
{
@Autowired
private ISchoolStudioService schoolStudioService;
/**
* 查询录播室管理列表
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolStudio schoolStudio)
{
startPage();
List<SchoolStudio> list = schoolStudioService.selectSchoolStudioList(schoolStudio);
return getDataTable(list);
}
/**
* 导出录播室管理列表
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:export')")
@Log(title = "录播室管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolStudio schoolStudio)
{
List<SchoolStudio> list = schoolStudioService.selectSchoolStudioList(schoolStudio);
ExcelUtil<SchoolStudio> util = new ExcelUtil<SchoolStudio>(SchoolStudio.class);
util.exportExcel(response, list, "录播室管理数据");
}
/**
* 获取录播室管理详细信息
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolStudioService.selectSchoolStudioById(id));
}
/**
* 新增录播室管理
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:add')")
@Log(title = "录播室管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolStudio schoolStudio)
{
return toAjax(schoolStudioService.insertSchoolStudio(schoolStudio));
}
/**
* 修改录播室管理
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:edit')")
@Log(title = "录播室管理", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolStudio schoolStudio)
{
return toAjax(schoolStudioService.updateSchoolStudio(schoolStudio));
}
/**
* 删除录播室管理
*/
// @PreAuthorize("@ss.hasPermi('studio:studio:remove')")
@Log(title = "录播室管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolStudioService.deleteSchoolStudioByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolStudio;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioUseService;
/**
* 录播室使用情况Controller
*
* @author ruoyi
* @date 2023-07-10
*/
@RestController
@RequestMapping("/studioUse")
public class SchoolStudioUseController extends BaseController
{
@Autowired
private ISchoolStudioUseService schoolStudioUseService;
/**
* 查询录播室使用情况
* @param schoolStudioUse
* @return
*/
@GetMapping("/list")
public TableDataInfo list(SchoolStudioUse schoolStudioUse){
return getDataTable(schoolStudioUseService.selectStudioUse(schoolStudioUse));
}
// /**
// * 查询录播室使用情况列表
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:list')")
// @GetMapping("/list")
// public TableDataInfo list(SchoolStudioUse schoolStudioUse)
// {
// startPage();
// List<SchoolStudioUse> list = schoolStudioUseService.selectSchoolStudioUseList(schoolStudioUse);
// return getDataTable(list);
// }
//
// /**
// * 导出录播室使用情况列表
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:export')")
// @Log(title = "录播室使用情况", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(HttpServletResponse response, SchoolStudioUse schoolStudioUse)
// {
// List<SchoolStudioUse> list = schoolStudioUseService.selectSchoolStudioUseList(schoolStudioUse);
// ExcelUtil<SchoolStudioUse> util = new ExcelUtil<SchoolStudioUse>(SchoolStudioUse.class);
// util.exportExcel(response, list, "录播室使用情况数据");
// }
//
// /**
// * 获取录播室使用情况详细信息
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:query')")
// @GetMapping(value = "/{id}")
// public AjaxResult getInfo(@PathVariable("id") Long id)
// {
// return AjaxResult.success(schoolStudioUseService.selectSchoolStudioUseById(id));
// }
//
// /**
// * 新增录播室使用情况
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:add')")
// @Log(title = "录播室使用情况", businessType = BusinessType.INSERT)
// @PostMapping
// public AjaxResult add(@RequestBody SchoolStudioUse schoolStudioUse)
// {
// return toAjax(schoolStudioUseService.insertSchoolStudioUse(schoolStudioUse));
// }
//
// /**
// * 修改录播室使用情况
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:edit')")
// @Log(title = "录播室使用情况", businessType = BusinessType.UPDATE)
// @PutMapping
// public AjaxResult edit(@RequestBody SchoolStudioUse schoolStudioUse)
// {
// return toAjax(schoolStudioUseService.updateSchoolStudioUse(schoolStudioUse));
// }
//
// /**
// * 删除录播室使用情况
// */
// @PreAuthorize("@ss.hasPermi('studioUse:use:remove')")
// @Log(title = "录播室使用情况", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(schoolStudioUseService.deleteSchoolStudioUseByIds(ids));
// }
}
package yangtz.cs.liu.campus.domain.auditorium;
import java.math.BigDecimal;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import yangtz.cs.liu.activiti.domain.ProcessBaseEntity;
/**
* 学校礼堂预约对象 school_auditorium
*
* @author ruoyi
* @date 2023-06-14
*/
@Data
public class SchoolAuditorium extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** 礼堂预约id */
private Long id;
/** 流程实例id */
private String instanceId;
/** 活动名称 */
private String activityName;
/** 活动场地 */
private String activityArea;
/** 活动时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date activityTime;
/** 话筒数量 */
private Integer htNumber;
/** 具体负责人id */
private Long specificUserId;
/** 具体负责人 */
private String specificUserName;
/** 活动人数 */
private Long activityNumber;
/** 预计时长 */
private BigDecimal duration;
/** 是否彩排(1-是,0-否) */
private String isRehearsal;
/** 是否录像(1-是,0-否) */
private String isVideo;
/** 是否直播(1-是,0-否) */
private String isLive;
/** 是否需要大屏(1-是,0-否) */
private String isBigScreen;
/** 其他要求 */
private String otherRequirements;
/** 学校分管领导id */
private Long leadershipId;
/** 学校分管领导 */
private String leadershipName;
/** 审核状态(0-未提交,1-审核中,2-审核通过,3-审核不通过) */
private String state;
/** 审批意见 */
private String opinion;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请部门id */
private Long applyDeptId;
/** 申请部门 */
private String applyDept;
/** 附件路径 */
private String fjlj;
/** 附件名称 */
private String fjmc;
/** 创建人id */
private Long createById;
/** 修改人id */
private Long updateById;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public void setActivityName(String activityName)
{
this.activityName = activityName;
}
public String getActivityName()
{
return activityName;
}
public void setActivityArea(String activityArea)
{
this.activityArea = activityArea;
}
public String getActivityArea()
{
return activityArea;
}
public void setActivityTime(Date activityTime)
{
this.activityTime = activityTime;
}
public Date getActivityTime()
{
return activityTime;
}
public void setHtNumber(Integer htNumber)
{
this.htNumber = htNumber;
}
public Integer getHtNumber()
{
return htNumber;
}
public void setSpecificUserId(Long specificUserId)
{
this.specificUserId = specificUserId;
}
public Long getSpecificUserId()
{
return specificUserId;
}
public void setSpecificUserName(String specificUserName)
{
this.specificUserName = specificUserName;
}
public String getSpecificUserName()
{
return specificUserName;
}
public void setActivityNumber(Long activityNumber)
{
this.activityNumber = activityNumber;
}
public Long getActivityNumber()
{
return activityNumber;
}
public void setDuration(BigDecimal duration)
{
this.duration = duration;
}
public BigDecimal getDuration()
{
return duration;
}
public void setIsRehearsal(String isRehearsal)
{
this.isRehearsal = isRehearsal;
}
public String getIsRehearsal()
{
return isRehearsal;
}
public void setIsVideo(String isVideo)
{
this.isVideo = isVideo;
}
public String getIsVideo()
{
return isVideo;
}
public void setIsLive(String isLive)
{
this.isLive = isLive;
}
public String getIsLive()
{
return isLive;
}
public void setIsBigScreen(String isBigScreen)
{
this.isBigScreen = isBigScreen;
}
public String getIsBigScreen()
{
return isBigScreen;
}
public void setOtherRequirements(String otherRequirements)
{
this.otherRequirements = otherRequirements;
}
public String getOtherRequirements()
{
return otherRequirements;
}
public void setLeadershipId(Long leadershipId)
{
this.leadershipId = leadershipId;
}
public Long getLeadershipId()
{
return leadershipId;
}
public void setLeadershipName(String leadershipName)
{
this.leadershipName = leadershipName;
}
public String getLeadershipName()
{
return leadershipName;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
public void setOpinion(String opinion)
{
this.opinion = opinion;
}
public String getOpinion()
{
return opinion;
}
public void setApplyId(Long applyId)
{
this.applyId = applyId;
}
public Long getApplyId()
{
return applyId;
}
public void setApplyName(String applyName)
{
this.applyName = applyName;
}
public String getApplyName()
{
return applyName;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setApplyDept(String applyDept)
{
this.applyDept = applyDept;
}
public String getApplyDept()
{
return applyDept;
}
public void setFjlj(String fjlj)
{
this.fjlj = fjlj;
}
public String getFjlj()
{
return fjlj;
}
public void setFjmc(String fjmc)
{
this.fjmc = fjmc;
}
public String getFjmc()
{
return fjmc;
}
public void setCreateById(Long createById)
{
this.createById = createById;
}
public Long getCreateById()
{
return createById;
}
public void setUpdateById(Long updateById)
{
this.updateById = updateById;
}
public Long getUpdateById()
{
return updateById;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("activityName", getActivityName())
.append("activityArea", getActivityArea())
.append("activityTime", getActivityTime())
.append("htNumber", getHtNumber())
.append("specificUserId", getSpecificUserId())
.append("specificUserName", getSpecificUserName())
.append("activityNumber", getActivityNumber())
.append("duration", getDuration())
.append("isRehearsal", getIsRehearsal())
.append("isVideo", getIsVideo())
.append("isLive", getIsLive())
.append("isBigScreen", getIsBigScreen())
.append("otherRequirements", getOtherRequirements())
.append("leadershipId", getLeadershipId())
.append("leadershipName", getLeadershipName())
.append("state", getState())
.append("opinion", getOpinion())
.append("applyId", getApplyId())
.append("applyName", getApplyName())
.append("applyTime", getApplyTime())
.append("applyDept", getApplyDept())
.append("fjlj", getFjlj())
.append("fjmc", getFjmc())
.append("createById", getCreateById())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateById", getUpdateById())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package yangtz.cs.liu.campus.domain.schoolDepartmentBudget;
import java.util.List;
import java.util.Date;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 科室预算填报对象 school_department_budget
*
* @author ruoyi
* @date 2023-07-11
*/
@Data
public class SchoolDepartmentBudget extends OurBaseEntity
{
private static final long serialVersionUID = 1L;
/** 科室预算填报主键id */
private Long id;
/** 流程实例id */
private String instanceId;
/** 年度 */
private String year;
/** 科室id */
private Long deptId;
/** 科室名称 */
private String deptName;
/** 填报人id */
private Long informantId;
/** 填报人名称 */
private String informant;
/** 分管领导id */
private Long leadershipId;
/** 分管领导名称 */
private String leadershipName;
/** 填报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date tbTime;
/** 审核状态(0-未提交,1-分管领导审核,2-审核通过,3-审核不通过) */
private String state;
/** 申请人id */
private Long applyId;
/** 申请人 */
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 创建人id */
private Long createById;
/** 修改人id */
private Long updateById;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setInstanceId(String instanceId)
{
this.instanceId = instanceId;
}
public String getInstanceId()
{
return instanceId;
}
public void setYear(String year)
{
this.year = year;
}
public String getYear()
{
return year;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getDeptName()
{
return deptName;
}
public void setInformantId(Long informantId)
{
this.informantId = informantId;
}
public Long getInformantId()
{
return informantId;
}
public void setInformant(String informant)
{
this.informant = informant;
}
public String getInformant()
{
return informant;
}
public void setLeadershipId(Long leadershipId)
{
this.leadershipId = leadershipId;
}
public Long getLeadershipId()
{
return leadershipId;
}
public void setLeadershipName(String leadershipName)
{
this.leadershipName = leadershipName;
}
public String getLeadershipName()
{
return leadershipName;
}
public void setTbTime(Date tbTime)
{
this.tbTime = tbTime;
}
public Date getTbTime()
{
return tbTime;
}
public void setState(String state)
{
this.state = state;
}
public String getState()
{
return state;
}
public void setCreateById(Long createById)
{
this.createById = createById;
}
public Long getCreateById()
{
return createById;
}
public void setUpdateById(Long updateById)
{
this.updateById = updateById;
}
public Long getUpdateById()
{
return updateById;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("instanceId", getInstanceId())
.append("year", getYear())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("informantId", getInformantId())
.append("informant", getInformant())
.append("leadershipId", getLeadershipId())
.append("leadershipName", getLeadershipName())
.append("tbTime", getTbTime())
.append("state", getState())
.append("createById", getCreateById())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateById", getUpdateById())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package yangtz.cs.liu.campus.domain.schoolDepartmentBudget;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 科室预算填报项目明细对象 school_department_budget_projectmx
*
* @author ruoyi
* @date 2023-07-11
*/
public class SchoolDepartmentBudgetProjectmx extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 科室预算填报明细主键id */
private Long id;
/** 年度 */
@Excel(name = "年度")
private String year;
/** 科室id */
private Long deptId;
/** 科室名称 */
@Excel(name = "科室")
private String deptName;
/** 科室预算填报id */
private Long departmentBudgetId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 申报政策依据、理由及主要内容 */
@Excel(name = "申报政策依据、理由及主要内容")
private String content;
/** 项目支出明细 */
@Excel(name = "项目明细")
private String projectExpenditures;
/** 申请总额(万元) */
@Excel(name = "申请总额(万元)")
private BigDecimal applyMoney;
/** 是否政府采购(1-是,0-否) */
@Excel(name = "是否政府采购", readConverterExp = "1=-是,0-否")
private String isGovernmentPurchase;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 填报人id */
private Long informantId;
/** 填报人名称 */
private String informant;
/** 分管领导id */
private Long leadershipId;
/** 分管领导名称 */
private String leadershipName;
public Long getInformantId() {
return informantId;
}
public void setInformantId(Long informantId) {
this.informantId = informantId;
}
public String getInformant() {
return informant;
}
public void setInformant(String informant) {
this.informant = informant;
}
public Long getLeadershipId() {
return leadershipId;
}
public void setLeadershipId(Long leadershipId) {
this.leadershipId = leadershipId;
}
public String getLeadershipName() {
return leadershipName;
}
public void setLeadershipName(String leadershipName) {
this.leadershipName = leadershipName;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDepartmentBudgetId(Long departmentBudgetId)
{
this.departmentBudgetId = departmentBudgetId;
}
public Long getDepartmentBudgetId()
{
return departmentBudgetId;
}
public void setProjectName(String projectName)
{
this.projectName = projectName;
}
public String getProjectName()
{
return projectName;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setProjectExpenditures(String projectExpenditures)
{
this.projectExpenditures = projectExpenditures;
}
public String getProjectExpenditures()
{
return projectExpenditures;
}
public void setIsGovernmentPurchase(String isGovernmentPurchase)
{
this.isGovernmentPurchase = isGovernmentPurchase;
}
public String getIsGovernmentPurchase()
{
return isGovernmentPurchase;
}
public void setApplyMoney(BigDecimal applyMoney)
{
this.applyMoney = applyMoney;
}
public BigDecimal getApplyMoney()
{
return applyMoney;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("departmentBudgetId", getDepartmentBudgetId())
.append("projectName", getProjectName())
.append("content", getContent())
.append("projectExpenditures", getProjectExpenditures())
.append("isGovernmentPurchase", getIsGovernmentPurchase())
.append("applyMoney", getApplyMoney())
.append("remark", getRemark())
.toString();
}
}
package yangtz.cs.liu.campus.domain.schoolStudio;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 录播室管理对象 school_studio
*
* @author ruoyi
* @date 2023-07-10
*/
public class SchoolStudio extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 录播室主键id */
private Long id;
/** 录播室简称 */
@Excel(name = "录播室简称")
private String studioName;
/** 录播室地点 */
@Excel(name = "录播室地点")
private String studioArea;
/** 录播室状态(1-启用,2禁用) */
@Excel(name = "录播室状态", readConverterExp = "1-启用,2-禁用")
private String studioStatu;
/** 创建人id */
@Excel(name = "创建人id")
private Long createById;
/** 修改人id */
@Excel(name = "修改人id")
private Long updateById;
/** 删除状态(1-已删除,0-未删除) */
@Excel(name = "删除状态", readConverterExp = "1=-已删除,0-未删除")
private String delFlg;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStudioName(String studioName)
{
this.studioName = studioName;
}
public String getStudioName()
{
return studioName;
}
public void setStudioArea(String studioArea)
{
this.studioArea = studioArea;
}
public String getStudioArea()
{
return studioArea;
}
public void setStudioStatu(String studioStatu)
{
this.studioStatu = studioStatu;
}
public String getStudioStatu()
{
return studioStatu;
}
public void setCreateById(Long createById)
{
this.createById = createById;
}
public Long getCreateById()
{
return createById;
}
public void setUpdateById(Long updateById)
{
this.updateById = updateById;
}
public Long getUpdateById()
{
return updateById;
}
public void setDelFlg(String delFlg)
{
this.delFlg = delFlg;
}
public String getDelFlg()
{
return delFlg;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("studioName", getStudioName())
.append("studioArea", getStudioArea())
.append("studioStatu", getStudioStatu())
.append("createById", getCreateById())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateById", getUpdateById())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("delFlg", getDelFlg())
.toString();
}
}
package yangtz.cs.liu.campus.domain.schoolStudio;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 录播室预约情况对象 school_studio_appointment
*
* @author ruoyi
* @date 2023-07-10
*/
public class SchoolStudioAppointment extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 录播室预约主键id */
private Long id;
/** 录播室id */
@Excel(name = "录播室id")
private Long studioId;
/** 录播室名称 */
@Excel(name = "录播室名称")
private String studioName;
/** 预约日期 */
@Excel(name = "预约日期", width = 30)
private String appointmentTime;
/** 预约节次 */
@Excel(name = "预约节次")
private String appointmentJc;
/** 录播内容 */
@Excel(name = "录播内容")
private String studioContent;
/** 预约人id */
@Excel(name = "预约人id")
private Long appointmentUserId;
/** 预约人 */
@Excel(name = "预约人")
private String appointmentUserName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 状态(1-预约成功,2-已取消) */
@Excel(name = "状态", readConverterExp = "1-预约成功,2-已取消")
private String statu;
private String startTime;
private String endTime;
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStudioId(Long studioId)
{
this.studioId = studioId;
}
public Long getStudioId()
{
return studioId;
}
public void setStudioName(String studioName)
{
this.studioName = studioName;
}
public String getStudioName()
{
return studioName;
}
public void setAppointmentTime(String appointmentTime)
{
this.appointmentTime = appointmentTime;
}
public String getAppointmentTime()
{
return appointmentTime;
}
public void setAppointmentJc(String appointmentJc)
{
this.appointmentJc = appointmentJc;
}
public String getAppointmentJc()
{
return appointmentJc;
}
public void setStudioContent(String studioContent)
{
this.studioContent = studioContent;
}
public String getStudioContent()
{
return studioContent;
}
public void setAppointmentUserId(Long appointmentUserId)
{
this.appointmentUserId = appointmentUserId;
}
public Long getAppointmentUserId()
{
return appointmentUserId;
}
public void setAppointmentUserName(String appointmentUserName)
{
this.appointmentUserName = appointmentUserName;
}
public String getAppointmentUserName()
{
return appointmentUserName;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setStatu(String statu)
{
this.statu = statu;
}
public String getStatu()
{
return statu;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("studioId", getStudioId())
.append("studioName", getStudioName())
.append("appointmentTime", getAppointmentTime())
.append("appointmentJc", getAppointmentJc())
.append("studioContent", getStudioContent())
.append("appointmentUserId", getAppointmentUserId())
.append("appointmentUserName", getAppointmentUserName())
.append("applyTime", getApplyTime())
.append("statu", getStatu())
.toString();
}
}
package yangtz.cs.liu.campus.domain.schoolStudio;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 录播室使用情况对象 school_studio_use
*
* @author ruoyi
* @date 2023-07-10
*/
public class SchoolStudioUse extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 录播室使用情况主键id */
private Long id;
/** 预约id */
@Excel(name = "预约id")
private Long appointmentId;
/** 录播室id */
@Excel(name = "录播室id")
private Long studioId;
/** 录播室名称 */
@Excel(name = "录播室名称")
private String studioName;
/** 使用日期 */
@Excel(name = "使用日期", width = 30)
private String useDate;
/** 使用节次 */
@Excel(name = "使用节次")
private String useJc;
/** 使用人id */
@Excel(name = "使用人id")
private Long useUserId;
/** 使用人 */
@Excel(name = "使用人")
private String useUserName;
/** 开始时间 */
private String startTime;
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public void setId(Long id)
{
this.id = id;
}
public Long getAppointmentId() {
return appointmentId;
}
public void setAppointmentId(Long appointmentId) {
this.appointmentId = appointmentId;
}
public Long getId()
{
return id;
}
public void setStudioId(Long studioId)
{
this.studioId = studioId;
}
public Long getStudioId()
{
return studioId;
}
public void setStudioName(String studioName)
{
this.studioName = studioName;
}
public String getStudioName()
{
return studioName;
}
public void setUseDate(String useDate)
{
this.useDate = useDate;
}
public String getUseDate()
{
return useDate;
}
public void setUseJc(String useJc)
{
this.useJc = useJc;
}
public String getUseJc()
{
return useJc;
}
public void setUseUserId(Long useUserId)
{
this.useUserId = useUserId;
}
public Long getUseUserId()
{
return useUserId;
}
public void setUseUserName(String useUserName)
{
this.useUserName = useUserName;
}
public String getUseUserName()
{
return useUserName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("studioId", getStudioId())
.append("studioName", getStudioName())
.append("useDate", getUseDate())
.append("useJc", getUseJc())
.append("useUserId", getUseUserId())
.append("useUserName", getUseUserName())
.toString();
}
}
package yangtz.cs.liu.campus.domain.temp;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class AuditoriumTemplate {
private String first;
/**
* 目标客户
*/
private String toUserOpenId;
//申请人
private String applyUser;
//活动名称
private String content;
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date applyTime;
//备注
private String remark;
}
package yangtz.cs.liu.campus.domain.temp;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class DepartmentBudgetTemplate {
private String first;
/**
* 目标客户
*/
private String toUserOpenId;
//申请人
private String applyUser;
//科室预算
private String content;
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date applyTime;
//备注
private String remark;
}
package yangtz.cs.liu.campus.mapper.auditorium;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.auditorium.SchoolAuditorium;
import yangtz.cs.liu.campus.vo.auditorium.SchoolAuditoriumVo;
import java.util.List;
/**
* 学校礼堂预约Mapper接口
*
* @author ruoyi
* @date 2023-06-14
*/
public interface SchoolAuditoriumMapper extends BaseMapper<SchoolAuditorium>
{
/**
* 查询学校礼堂预约
*
* @param id 学校礼堂预约主键
* @return 学校礼堂预约
*/
public SchoolAuditoriumVo selectSchoolAuditoriumById(Long id);
/**
* 查询学校礼堂预约列表
*
* @param schoolAuditorium 学校礼堂预约
* @return 学校礼堂预约集合
*/
public List<SchoolAuditoriumVo> selectSchoolAuditoriumList(SchoolAuditoriumVo schoolAuditorium);
/**
* 查询个人学校礼堂预约列表
*
* @param schoolAuditorium 学校礼堂预约
* @return 学校礼堂预约集合
*/
public List<SchoolAuditoriumVo> selectSchoolAuditoriumListGr(SchoolAuditoriumVo schoolAuditorium);
/**
* 新增学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
public int insertSchoolAuditorium(SchoolAuditorium schoolAuditorium);
/**
* 修改学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
public int updateSchoolAuditorium(SchoolAuditorium schoolAuditorium);
/**
* 删除学校礼堂预约
*
* @param id 学校礼堂预约主键
* @return 结果
*/
public int deleteSchoolAuditoriumById(Long id);
/**
* 批量删除学校礼堂预约
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolAuditoriumByIds(Long[] ids);
}
...@@ -17,4 +17,6 @@ public interface SchoolPurchaseMapper extends BaseMapper<SchoolPurchase> { ...@@ -17,4 +17,6 @@ public interface SchoolPurchaseMapper extends BaseMapper<SchoolPurchase> {
List<SchoolPurchase> findPurchaseName(@Param("handUserId") Long handUserId); List<SchoolPurchase> findPurchaseName(@Param("handUserId") Long handUserId);
List<SchoolPurchaseVo> queryList(@Param("submitState") String submitState,@Param("entity") SchoolPurchase schoolPurchase); List<SchoolPurchaseVo> queryList(@Param("submitState") String submitState,@Param("entity") SchoolPurchase schoolPurchase);
List<SchoolPurchaseVo> selectPurchaseList(@Param("entity") SchoolPurchase schoolPurchase);
} }
package yangtz.cs.liu.campus.mapper.schoolDepartmentBudget;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudget;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import yangtz.cs.liu.campus.vo.schoolDepartmentBudget.SchoolDepartmentBudgetVo;
import java.util.List;
/**
* 科室预算填报Mapper接口
*
* @author ruoyi
* @date 2023-07-11
*/
public interface SchoolDepartmentBudgetMapper extends BaseMapper<SchoolDepartmentBudget>
{
/**
* 查询科室预算填报
*
* @param id 科室预算填报主键
* @return 科室预算填报
*/
public SchoolDepartmentBudgetVo selectSchoolDepartmentBudgetById(Long id);
/**
* 查询科室预算填报列表
*
* @param schoolDepartmentBudget 科室预算填报
* @return 科室预算填报集合
*/
public List<SchoolDepartmentBudgetVo> selectSchoolDepartmentBudgetList(SchoolDepartmentBudget schoolDepartmentBudget);
/**
* 新增科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
public int insertSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget);
/**
* 修改科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
public int updateSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget);
/**
* 删除科室预算填报
*
* @param id 科室预算填报主键
* @return 结果
*/
public int deleteSchoolDepartmentBudgetById(Long id);
/**
* 批量删除科室预算填报
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolDepartmentBudgetByIds(Long[] ids);
/**
* 批量删除科室预算填报项目明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetIds(Long[] ids);
/**
* 批量新增科室预算填报项目明细
*
* @param schoolDepartmentBudgetProjectmxList 科室预算填报项目明细列表
* @return 结果
*/
public int batchSchoolDepartmentBudgetProjectmx(List<SchoolDepartmentBudgetProjectmx> schoolDepartmentBudgetProjectmxList);
/**
* 通过科室预算填报主键删除科室预算填报项目明细信息
*
* @param id 科室预算填报ID
* @return 结果
*/
public int deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetId(Long id);
}
package yangtz.cs.liu.campus.mapper.schoolDepartmentBudget;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import java.util.List;
/**
* 科室预算填报项目明细Mapper接口
*
* @author ruoyi
* @date 2023-07-11
*/
@Repository
public interface SchoolDepartmentBudgetProjectmxMapper
{
/**
* 查询科室预算填报项目明细
*
* @param id 科室预算填报项目明细主键
* @return 科室预算填报项目明细
*/
public SchoolDepartmentBudgetProjectmx selectSchoolDepartmentBudgetProjectmxById(Long id);
/**
* 查询科室预算填报项目明细列表
*
* @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
* @return 科室预算填报项目明细集合
*/
public List<SchoolDepartmentBudgetProjectmx> selectList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
// /**
// * 查询科室预算填报项目明细列表
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 科室预算填报项目明细集合
// */
// public List<SchoolDepartmentBudgetProjectmx> selectSchoolDepartmentBudgetProjectmxList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
// /**
// * 新增科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// public int insertSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
//
// /**
// * 修改科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// public int updateSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
//
// /**
// * 删除科室预算填报项目明细
// *
// * @param id 科室预算填报项目明细主键
// * @return 结果
// */
// public int deleteSchoolDepartmentBudgetProjectmxById(Long id);
//
// /**
// * 批量删除科室预算填报项目明细
// *
// * @param ids 需要删除的数据主键集合
// * @return 结果
// */
// public int deleteSchoolDepartmentBudgetProjectmxByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolStudio;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioAppointment;
import java.util.List;
/**
* 录播室预约情况Mapper接口
*
* @author ruoyi
* @date 2023-07-10
*/
@Repository
public interface SchoolStudioAppointmentMapper
{
/**
* 查询录播室预约情况
*
* @param id 录播室预约情况主键
* @return 录播室预约情况
*/
public SchoolStudioAppointment selectSchoolStudioAppointmentById(Long id);
/**
* 查询录播室预约情况列表
*
* @param schoolStudioAppointment 录播室预约情况
* @return 录播室预约情况集合
*/
public List<SchoolStudioAppointment> selectSchoolStudioAppointmentList(SchoolStudioAppointment schoolStudioAppointment);
/**
* 新增录播室预约情况
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
public int insertSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment);
/**
* 修改录播室预约情况
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
public int updateSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment);
/**
* 删除录播室预约情况
*
* @param id 录播室预约情况主键
* @return 结果
*/
public int deleteSchoolStudioAppointmentById(Long id);
/**
* 批量删除录播室预约情况
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudioAppointmentByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolStudio;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudio;
import java.util.List;
/**
* 录播室管理Mapper接口
*
* @author ruoyi
* @date 2023-07-10
*/
public interface SchoolStudioMapper
{
/**
* 查询录播室管理
*
* @param id 录播室管理主键
* @return 录播室管理
*/
public SchoolStudio selectSchoolStudioById(Long id);
/**
* 查询录播室管理列表
*
* @param schoolStudio 录播室管理
* @return 录播室管理集合
*/
public List<SchoolStudio> selectSchoolStudioList(SchoolStudio schoolStudio);
/**
* 新增录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
public int insertSchoolStudio(SchoolStudio schoolStudio);
/**
* 修改录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
public int updateSchoolStudio(SchoolStudio schoolStudio);
/**
* 批量删除录播室管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudioByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolStudio;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import java.util.List;
/**
* 录播室使用情况Mapper接口
*
* @author ruoyi
* @date 2023-07-10
*/
@Repository
public interface SchoolStudioUseMapper
{
/**
* 根据预约id删除录播室使用情况
* @return
*/
public int deleteSchoolStudioUseByAppId(@Param("appId") Long appId);
/**
* 录播室使用情况统计
* @param schoolStudioUse
* @return
*/
public List<SchoolStudioUse> selectStudioUse(SchoolStudioUse schoolStudioUse);
/**
* 查询录播室使用情况
*
* @param id 录播室使用情况主键
* @return 录播室使用情况
*/
public SchoolStudioUse selectSchoolStudioUseById(Long id);
/**
* 查询录播室使用情况列表
*
* @param schoolStudioUse 录播室使用情况
* @return 录播室使用情况集合
*/
public List<SchoolStudioUse> selectSchoolStudioUseList(SchoolStudioUse schoolStudioUse);
/**
* 新增录播室使用情况
*
* @param schoolStudioUse 录播室使用情况
* @return 结果
*/
public int insertSchoolStudioUse(SchoolStudioUse schoolStudioUse);
/**
* 修改录播室使用情况
*
* @param schoolStudioUse 录播室使用情况
* @return 结果
*/
public int updateSchoolStudioUse(SchoolStudioUse schoolStudioUse);
/**
* 删除录播室使用情况
*
* @param id 录播室使用情况主键
* @return 结果
*/
public int deleteSchoolStudioUseById(Long id);
/**
* 批量删除录播室使用情况
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudioUseByIds(Long[] ids);
}
package yangtz.cs.liu.campus.service.auditorium;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.auditorium.SchoolAuditorium;
import yangtz.cs.liu.campus.vo.auditorium.SchoolAuditoriumVo;
import java.util.List;
import java.util.Map;
/**
* 学校礼堂预约Service接口
*
* @author ruoyi
* @date 2023-06-14
*/
public interface ISchoolAuditoriumService extends IService<SchoolAuditorium>
{
/**
* 查询学校礼堂预约
*
* @param id 学校礼堂预约主键
* @return 学校礼堂预约
*/
public SchoolAuditoriumVo selectSchoolAuditoriumById(Long id);
/**
* 查询全部学校礼堂预约列表
*
* @param schoolAuditorium 学校礼堂预约
* @return 学校礼堂预约集合
*/
public List<SchoolAuditoriumVo> selectSchoolAuditoriumList(SchoolAuditoriumVo schoolAuditorium);
/**
* 新增学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
public int insertSchoolAuditorium(SchoolAuditorium schoolAuditorium);
/**
* 修改学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
public int updateSchoolAuditorium(SchoolAuditorium schoolAuditorium);
/**
* 批量删除学校礼堂预约
*
* @param ids 需要删除的学校礼堂预约主键集合
* @return 结果
*/
public int deleteSchoolAuditoriumByIds(Long[] ids);
/**
* 删除学校礼堂预约信息
*
* @param id 学校礼堂预约主键
* @return 结果
*/
public int deleteSchoolAuditoriumById(Long id);
/**
* 流程定义
* @param schoolAuditorium
* @param username
* @param key
* @param variables
*/
public int submitApply(SchoolAuditorium schoolAuditorium , String username, String key, Map<String, Object> variables);
/**
* 查询个人学校礼堂预约列表
* @param schoolAuditorium
* @return
*/
List<SchoolAuditoriumVo> selectSchoolAuditoriumListGr(SchoolAuditoriumVo schoolAuditorium);
/**
* 待办列表
*
* @param entity
* @param userId
* @return
*/
List<SchoolAuditoriumVo> findTodoTasks(String key, SchoolAuditorium entity, String userId);
/**
* 已办列表
* @param key
* @param entity
* @param userId
* @return
*/
List<SchoolAuditoriumVo> findDoneTasks(String key, SchoolAuditorium entity, String userId);
}
package yangtz.cs.liu.campus.service.impl.auditorium;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.activiti.service.IProcessService;
import yangtz.cs.liu.campus.domain.auditorium.SchoolAuditorium;
import yangtz.cs.liu.campus.mapper.auditorium.SchoolAuditoriumMapper;
import yangtz.cs.liu.campus.service.auditorium.ISchoolAuditoriumService;
import yangtz.cs.liu.campus.vo.auditorium.SchoolAuditoriumVo;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.core.constant.ProcessCommon.PENDING;
import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING;
import static com.core.constant.ProcessVariables.LEADERSHIPID;
/**
* 学校礼堂预约Service业务层处理
*
* @author ruoyi
* @date 2023-06-14
*/
@Service
public class SchoolAuditoriumServiceImpl extends ServiceImpl<SchoolAuditoriumMapper,SchoolAuditorium> implements ISchoolAuditoriumService
{
@Autowired
private SchoolAuditoriumMapper schoolAuditoriumMapper;
@Resource
private IdentityService identityService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IProcessService processService;
@Autowired
private HistoryService historyService;
/**
* 查询学校礼堂预约
*
* @param id 学校礼堂预约主键
* @return 学校礼堂预约
*/
@Override
public SchoolAuditoriumVo selectSchoolAuditoriumById(Long id)
{
SchoolAuditoriumVo schoolAuditoriumVo = schoolAuditoriumMapper.selectSchoolAuditoriumById(id);
return schoolAuditoriumVo;
}
/**
* 查询全部学校礼堂预约列表
*
* @param schoolAuditorium 学校礼堂预约
* @return 学校礼堂预约
*/
@Override
public List<SchoolAuditoriumVo> selectSchoolAuditoriumList(SchoolAuditoriumVo schoolAuditorium)
{
List<SchoolAuditoriumVo> list = schoolAuditoriumMapper.selectSchoolAuditoriumList(schoolAuditorium);
return list;
}
/**
* 查询个人学校礼堂预约列表
* @param schoolAuditorium
* @return
*/
@Override
public List<SchoolAuditoriumVo> selectSchoolAuditoriumListGr(SchoolAuditoriumVo schoolAuditorium) {
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolAuditorium.setCreateById(user.getUserId());
List<SchoolAuditoriumVo> list = schoolAuditoriumMapper.selectSchoolAuditoriumListGr(schoolAuditorium);
return list;
}
/**
* 新增学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
@Override
@Transactional
public int insertSchoolAuditorium(SchoolAuditorium schoolAuditorium)
{
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//设置申请人id
schoolAuditorium.setApplyId(user.getUserId());
//设置申请部门id
schoolAuditorium.setApplyDeptId(user.getDeptId());
//设置申请时间
schoolAuditorium.setApplyTime(DateUtils.getNowDate());
//设置状态为未提交
schoolAuditorium.setState("0");
//设置创建人id
schoolAuditorium.setCreateById(user.getUserId());
//设置创建时间
schoolAuditorium.setCreateTime(DateUtils.getNowDate());
return schoolAuditoriumMapper.insertSchoolAuditorium(schoolAuditorium);
}
/**
* 修改学校礼堂预约
*
* @param schoolAuditorium 学校礼堂预约
* @return 结果
*/
@Override
@Transactional
public int updateSchoolAuditorium(SchoolAuditorium schoolAuditorium)
{
//获取当前登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolAuditorium.setUpdateById(user.getUserId());
schoolAuditorium.setUpdateTime(DateUtils.getNowDate());
return schoolAuditoriumMapper.updateSchoolAuditorium(schoolAuditorium);
}
/**
* 批量删除学校礼堂预约
*
* @param ids 需要删除的学校礼堂预约主键
* @return 结果
*/
@Override
@Transactional
public int deleteSchoolAuditoriumByIds(Long[] ids)
{
return schoolAuditoriumMapper.deleteSchoolAuditoriumByIds(ids);
}
/**
* 删除学校礼堂预约信息
*
* @param id 学校礼堂预约主键
* @return 结果
*/
@Override
@Transactional
public int deleteSchoolAuditoriumById(Long id)
{
return schoolAuditoriumMapper.deleteSchoolAuditoriumById(id);
}
/**
*
* @param schoolAuditorium 业务实体
* @param username 提交申请人 记录到底是哪个人提交了申请
* @param key 流程标识 用于指定到底启动的是哪个流程(请假流程 办公流程 会议流程等) 这里启动的是 礼堂预约申请流程
* @param variables 变量集合 流程中指定一些变量,这里我们主要用于动态指定审批人
*
* 启动流程
* 1. 设置流程申请人.
* 2. 设置审批人.审批人因为是动态的,所以放在variables集合里面
* 3. 启动流程
*/
@Override
public int submitApply(SchoolAuditorium schoolAuditorium, String username, String key, Map<String, Object> variables) {
String businessKey = schoolAuditorium.getId().toString();
identityService.setAuthenticatedUserId(username);
//分管领导
variables.put(LEADERSHIPID,schoolAuditorium.getLeadershipId());
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(key, businessKey, variables);
String instanceId = processInstance.getId();
//与我们的业务表开始建立关系
schoolAuditorium.setInstanceId(instanceId);
//审批中
schoolAuditorium.setState("1");
return schoolAuditoriumMapper.updateSchoolAuditorium(schoolAuditorium);
}
/**
* 待办列表
* @param key
* @param entity
* @param userId
* @return
*/
@Override
public List<SchoolAuditoriumVo> findTodoTasks(String key, SchoolAuditorium entity, String userId) {
List<SchoolAuditoriumVo> list = new ArrayList<>();
//当前登录人待办任务集合
List<Task> taskList = processService.findAssigneeTasks(userId, key);
for (Task task : taskList) {
TaskEntityImpl taskImpl = (TaskEntityImpl) task;
//拿到当前任务id
String processInstanceId = taskImpl.getProcessInstanceId();
//拿到流程定义对象
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
//业务id(我们当时新增的时候指定了businessKey为id)
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolAuditoriumVo schoolAuditorium = schoolAuditoriumMapper.selectSchoolAuditoriumById(new Long(businessKey));
if (StringUtils.isNull(schoolAuditorium)) {
continue;
}
//转vo
SchoolAuditoriumVo schoolAuditoriumVo = new SchoolAuditoriumVo();
BeanUtils.copyProperties(schoolAuditorium, schoolAuditoriumVo);
schoolAuditoriumVo.setTaskId(taskImpl.getId());
if (SUSPENDSTATE_PENDING.equals(taskImpl.getSuspensionState())) {
//挂起
schoolAuditoriumVo.setTaskName(PENDING);
} else {
schoolAuditoriumVo.setTaskName(taskImpl.getName());
}
list.add(schoolAuditoriumVo);
}
List<SchoolAuditoriumVo> resList = list.stream().sorted(Comparator.comparing(SchoolAuditoriumVo::getApplyTime).reversed()).collect(Collectors.toList());
return resList;
}
/**
* 已办列表
* @param key
* @param entity
* @param userId
* @return
*/
@Override
public List<SchoolAuditoriumVo> findDoneTasks(String key, SchoolAuditorium entity, String userId) {
List<SchoolAuditoriumVo> list = new ArrayList<>();
//当前登录人完成的历史集合
List<HistoricTaskInstance> hisList = processService.findDoneTasks(userId, key);
for (HistoricTaskInstance instance : hisList) {
//流程实例key
String processInstanceId = instance.getProcessInstanceId();
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(processInstanceId)
.singleResult();
//业务id
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolAuditorium schoolAuditorium = schoolAuditoriumMapper.selectById(new Long(businessKey));
if (StringUtils.isNull(schoolAuditorium)) {
continue;
}
//转vo
SchoolAuditoriumVo schoolAuditoriumVo = new SchoolAuditoriumVo();
BeanUtils.copyProperties(schoolAuditorium, schoolAuditoriumVo);
list.add(schoolAuditoriumVo);
}
List<SchoolAuditoriumVo> resList = list.stream().sorted(Comparator.comparing(SchoolAuditoriumVo::getApplyTime).reversed()).collect(Collectors.toList());
return resList;
}
}
...@@ -10,19 +10,25 @@ import org.springframework.beans.BeanUtils; ...@@ -10,19 +10,25 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.activiti.service.IProcessService; import yangtz.cs.liu.activiti.service.IProcessService;
import yangtz.cs.liu.campus.domain.auditorium.SchoolAuditorium;
import yangtz.cs.liu.campus.domain.purchase.SchoolPurchase; import yangtz.cs.liu.campus.domain.purchase.SchoolPurchase;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudget;
import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficialFlow; import yangtz.cs.liu.campus.domain.schooloffical.SchoolOfficialFlow;
import yangtz.cs.liu.campus.domain.student.SchoolStudentLeave; import yangtz.cs.liu.campus.domain.student.SchoolStudentLeave;
import yangtz.cs.liu.campus.domain.teacher.SchoolTeacherLeave; import yangtz.cs.liu.campus.domain.teacher.SchoolTeacherLeave;
import yangtz.cs.liu.campus.mapper.auditorium.SchoolAuditoriumMapper;
import yangtz.cs.liu.campus.mapper.exam.ExamMainMapper; import yangtz.cs.liu.campus.mapper.exam.ExamMainMapper;
import yangtz.cs.liu.campus.mapper.purchase.SchoolPurchaseMapper; import yangtz.cs.liu.campus.mapper.purchase.SchoolPurchaseMapper;
import yangtz.cs.liu.campus.mapper.schoolDepartmentBudget.SchoolDepartmentBudgetMapper;
import yangtz.cs.liu.campus.mapper.schooloffical.SchoolOfficialFlowMapper; import yangtz.cs.liu.campus.mapper.schooloffical.SchoolOfficialFlowMapper;
import yangtz.cs.liu.campus.mapper.student.SchoolStudentLeaveMapper; import yangtz.cs.liu.campus.mapper.student.SchoolStudentLeaveMapper;
import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherLeaveMapper; import yangtz.cs.liu.campus.mapper.teacher.SchoolTeacherLeaveMapper;
import yangtz.cs.liu.campus.service.common.ICountService; import yangtz.cs.liu.campus.service.common.ICountService;
import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherLeaveService; import yangtz.cs.liu.campus.service.teacher.ISchoolTeacherLeaveService;
import yangtz.cs.liu.campus.vo.auditorium.SchoolAuditoriumVo;
import yangtz.cs.liu.campus.vo.common.CountVo; import yangtz.cs.liu.campus.vo.common.CountVo;
import yangtz.cs.liu.campus.vo.purchase.SchoolPurchaseVo; import yangtz.cs.liu.campus.vo.purchase.SchoolPurchaseVo;
import yangtz.cs.liu.campus.vo.schoolDepartmentBudget.SchoolDepartmentBudgetVo;
import yangtz.cs.liu.campus.vo.student.StudentLeaveVO; import yangtz.cs.liu.campus.vo.student.StudentLeaveVO;
import yangtz.cs.liu.campus.vo.teacher.TeacherLeaveVO; import yangtz.cs.liu.campus.vo.teacher.TeacherLeaveVO;
...@@ -55,6 +61,12 @@ public class CountServiceImpl implements ICountService { ...@@ -55,6 +61,12 @@ public class CountServiceImpl implements ICountService {
private SchoolPurchaseMapper schoolPurchaseMapper; private SchoolPurchaseMapper schoolPurchaseMapper;
@Autowired @Autowired
private SchoolAuditoriumMapper schoolAuditoriumMapper;
@Autowired
private SchoolDepartmentBudgetMapper schoolDepartmentBudgetMapper;
@Autowired
private RuntimeService runtimeService; private RuntimeService runtimeService;
@Override @Override
...@@ -77,11 +89,19 @@ public class CountServiceImpl implements ICountService { ...@@ -77,11 +89,19 @@ public class CountServiceImpl implements ICountService {
/**学生请假审批任务数*/ /**学生请假审批任务数*/
int sLeaveNum = getNum(STUDENTLEAVE, userId.toString()); int sLeaveNum = getNum(STUDENTLEAVE, userId.toString());
/**礼堂预约审批任务数*/
int auditoriumNum = getNum(AUDITORIUMAPPLY, userId.toString());
/**科室预算审批任务数*/
int departmentBudgetNum = getNum(DEPARTMENTBUDGET, userId.toString());
vo.setTLeaveNum(tLeaveNum); vo.setTLeaveNum(tLeaveNum);
vo.setOfficialNum(officialNum); vo.setOfficialNum(officialNum);
vo.setInvestigate(investigate); vo.setInvestigate(investigate);
vo.setPurchaseRequisition(purchaseRequisition); vo.setPurchaseRequisition(purchaseRequisition);
vo.setSLeaveNum(sLeaveNum); vo.setSLeaveNum(sLeaveNum);
vo.setAuditoriumNum(auditoriumNum);
vo.setDepartmentBudgetNum(departmentBudgetNum);
return vo; return vo;
} }
...@@ -159,6 +179,54 @@ public class CountServiceImpl implements ICountService { ...@@ -159,6 +179,54 @@ public class CountServiceImpl implements ICountService {
} }
return list.size(); return list.size();
} }
if(AUDITORIUMAPPLY.equals(key)){
List<SchoolAuditoriumVo> list = new ArrayList<>();
//当前登录人待办任务集合
List<Task> taskList = processService.findAssigneeTasks(userId, key);
for (Task task : taskList) {
TaskEntityImpl taskImpl = (TaskEntityImpl) task;
//拿到当前任务id
String processInstanceId = taskImpl.getProcessInstanceId();
//拿到流程定义对象
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
//业务id(我们当时新增的时候指定了businessKey为id)
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolAuditorium schoolAuditorium = schoolAuditoriumMapper.selectById(new Long(businessKey));
if (StringUtils.isNull(schoolAuditorium)) {
continue;
}
SchoolAuditoriumVo schoolAuditoriumVo = new SchoolAuditoriumVo();
BeanUtils.copyProperties(schoolAuditorium, schoolAuditoriumVo);
list.add(schoolAuditoriumVo);
}
return list.size();
}
if(DEPARTMENTBUDGET.equals(key)){
List<SchoolDepartmentBudgetVo> list = new ArrayList<>();
//当前登录人待办任务集合
List<Task> taskList = processService.findAssigneeTasks(userId, key);
for (Task task : taskList) {
TaskEntityImpl taskImpl = (TaskEntityImpl) task;
//拿到当前任务id
String processInstanceId = taskImpl.getProcessInstanceId();
//拿到流程定义对象
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
//业务id(我们当时新增的时候指定了businessKey为id)
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolDepartmentBudget departmentBudget = schoolDepartmentBudgetMapper.selectById(new Long(businessKey));
if (StringUtils.isNull(departmentBudget)) {
continue;
}
SchoolDepartmentBudgetVo schoolDepartmentBudgetVo = new SchoolDepartmentBudgetVo();
BeanUtils.copyProperties(departmentBudget, schoolDepartmentBudgetVo);
list.add(schoolDepartmentBudgetVo);
}
return list.size();
}
return 0; return 0;
} }
} }
...@@ -401,4 +401,14 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper, ...@@ -401,4 +401,14 @@ public class SchoolPurchaseServiceImpl extends ServiceImpl<SchoolPurchaseMapper,
/*******************通过用户id查询用户的职务*****************************/ /*******************通过用户id查询用户的职务*****************************/
return workFlowVo; return workFlowVo;
} }
/**
* 资金使用明细列表
* @param schoolPurchase
* @return
*/
@Override
public List<SchoolPurchaseVo> selectPurchaseList(SchoolPurchase schoolPurchase) {
return schoolPurchaseMapper.selectPurchaseList(schoolPurchase);
}
} }
package yangtz.cs.liu.campus.service.impl.schoolDepartmentBudget;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import yangtz.cs.liu.campus.mapper.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmxMapper;
import yangtz.cs.liu.campus.service.schoolDepartmentBudget.ISchoolDepartmentBudgetProjectmxService;
import java.util.List;
/**
* 科室预算填报项目明细Service业务层处理
*
* @author ruoyi
* @date 2023-07-11
*/
@Service
public class SchoolDepartmentBudgetProjectmxServiceImpl implements ISchoolDepartmentBudgetProjectmxService
{
@Autowired
private SchoolDepartmentBudgetProjectmxMapper schoolDepartmentBudgetProjectmxMapper;
/**
* 查询科室预算填报项目明细
*
* @param id 科室预算填报项目明细主键
* @return 科室预算填报项目明细
*/
@Override
public SchoolDepartmentBudgetProjectmx selectSchoolDepartmentBudgetProjectmxById(Long id)
{
return schoolDepartmentBudgetProjectmxMapper.selectSchoolDepartmentBudgetProjectmxById(id);
}
/**
* 查询科室预算填报项目明细列表
* @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
* @return
*/
@Override
public List<SchoolDepartmentBudgetProjectmx> selectList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx) {
return schoolDepartmentBudgetProjectmxMapper.selectList(schoolDepartmentBudgetProjectmx);
}
// /**
// * 查询科室预算填报项目明细列表
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 科室预算填报项目明细
// */
// @Override
// public List<SchoolDepartmentBudgetProjectmx> selectSchoolDepartmentBudgetProjectmxList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
// {
// return schoolDepartmentBudgetProjectmxMapper.selectSchoolDepartmentBudgetProjectmxList(schoolDepartmentBudgetProjectmx);
// }
//
// /**
// * 新增科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// @Override
// public int insertSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
// {
// return schoolDepartmentBudgetProjectmxMapper.insertSchoolDepartmentBudgetProjectmx(schoolDepartmentBudgetProjectmx);
// }
//
// /**
// * 修改科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// @Override
// public int updateSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx)
// {
// return schoolDepartmentBudgetProjectmxMapper.updateSchoolDepartmentBudgetProjectmx(schoolDepartmentBudgetProjectmx);
// }
//
// /**
// * 批量删除科室预算填报项目明细
// *
// * @param ids 需要删除的科室预算填报项目明细主键
// * @return 结果
// */
// @Override
// public int deleteSchoolDepartmentBudgetProjectmxByIds(Long[] ids)
// {
// return schoolDepartmentBudgetProjectmxMapper.deleteSchoolDepartmentBudgetProjectmxByIds(ids);
// }
//
// /**
// * 删除科室预算填报项目明细信息
// *
// * @param id 科室预算填报项目明细主键
// * @return 结果
// */
// @Override
// public int deleteSchoolDepartmentBudgetProjectmxById(Long id)
// {
// return schoolDepartmentBudgetProjectmxMapper.deleteSchoolDepartmentBudgetProjectmxById(id);
// }
}
package yangtz.cs.liu.campus.service.impl.schoolDepartmentBudget;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.activiti.service.IProcessService;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudget;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import yangtz.cs.liu.campus.mapper.schoolDepartmentBudget.SchoolDepartmentBudgetMapper;
import yangtz.cs.liu.campus.service.schoolDepartmentBudget.ISchoolDepartmentBudgetService;
import yangtz.cs.liu.campus.vo.schoolDepartmentBudget.SchoolDepartmentBudgetVo;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
import static com.core.constant.ProcessCommon.PENDING;
import static com.core.constant.ProcessCommon.SUSPENDSTATE_PENDING;
import static com.core.constant.ProcessDefinition.DEPARTMENTBUDGET;
import static com.core.constant.ProcessVariables.DEPARTMENTAPPLYUSERID;
import static com.core.constant.ProcessVariables.DEPARTMENTUSERID;
/**
* 科室预算填报Service业务层处理
*
* @author ruoyi
* @date 2023-07-11
*/
@Service
public class SchoolDepartmentBudgetServiceImpl extends ServiceImpl<SchoolDepartmentBudgetMapper, SchoolDepartmentBudget> implements ISchoolDepartmentBudgetService
{
@Autowired
private SchoolDepartmentBudgetMapper schoolDepartmentBudgetMapper;
@Resource
private IdentityService identityService;
@Autowired
private IProcessService processService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private HistoryService historyService;
/**
* 查询科室预算填报
*
* @param id 科室预算填报主键
* @return 科室预算填报
*/
@Override
public SchoolDepartmentBudgetVo selectSchoolDepartmentBudgetById(Long id)
{
return schoolDepartmentBudgetMapper.selectSchoolDepartmentBudgetById(id);
}
/**
* 查询全部科室预算填报列表
*
* @param schoolDepartmentBudget 科室预算填报
* @return 科室预算填报
*/
@Override
public List<SchoolDepartmentBudgetVo> selectSchoolDepartmentBudgetList(SchoolDepartmentBudget schoolDepartmentBudget)
{
return schoolDepartmentBudgetMapper.selectSchoolDepartmentBudgetList(schoolDepartmentBudget);
}
/**
* 新增科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
@Transactional
@Override
public int insertSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolDepartmentBudget.setDeptId(user.getDeptId());
schoolDepartmentBudget.setInformantId(user.getUserId());
schoolDepartmentBudget.setInformant(user.getUserName());
schoolDepartmentBudget.setCreateById(user.getUserId());
schoolDepartmentBudget.setCreateBy(user.getUserName());
schoolDepartmentBudget.setTbTime(DateUtils.getNowDate());
schoolDepartmentBudget.setCreateTime(DateUtils.getNowDate());
int rows = schoolDepartmentBudgetMapper.insertSchoolDepartmentBudget(schoolDepartmentBudget);
insertSchoolDepartmentBudgetProjectmx(schoolDepartmentBudget);
return rows;
}
/**
* 修改科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
@Transactional
@Override
public int updateSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolDepartmentBudget.setUpdateById(user.getUserId());
schoolDepartmentBudget.setUpdateTime(DateUtils.getNowDate());
schoolDepartmentBudgetMapper.deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetId(schoolDepartmentBudget.getId());
insertSchoolDepartmentBudgetProjectmx(schoolDepartmentBudget);
return schoolDepartmentBudgetMapper.updateSchoolDepartmentBudget(schoolDepartmentBudget);
}
/**
* 批量删除科室预算填报
*
* @param ids 需要删除的科室预算填报主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolDepartmentBudgetByIds(Long[] ids)
{
schoolDepartmentBudgetMapper.deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetIds(ids);
return schoolDepartmentBudgetMapper.deleteSchoolDepartmentBudgetByIds(ids);
}
/**
* 删除科室预算填报信息
*
* @param id 科室预算填报主键
* @return 结果
*/
@Transactional
@Override
public int deleteSchoolDepartmentBudgetById(Long id)
{
schoolDepartmentBudgetMapper.deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetId(id);
return schoolDepartmentBudgetMapper.deleteSchoolDepartmentBudgetById(id);
}
/**
* 查询本单位科室预算填报列表
* @param schoolDepartmentBudget
* @return
*/
@Override
public List<SchoolDepartmentBudgetVo> selectSchoolDepartmentBudgetListDw(SchoolDepartmentBudget schoolDepartmentBudget) {
schoolDepartmentBudget.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
return schoolDepartmentBudgetMapper.selectSchoolDepartmentBudgetList(schoolDepartmentBudget);
}
/**
* 新增科室预算填报项目明细信息
*
* @param schoolDepartmentBudget 科室预算填报对象
*/
public void insertSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetVo schoolDepartmentBudget)
{
List<SchoolDepartmentBudgetProjectmx> schoolDepartmentBudgetProjectmxList = schoolDepartmentBudget.getSchoolDepartmentBudgetProjectmxList();
Long id = schoolDepartmentBudget.getId();
if (StringUtils.isNotNull(schoolDepartmentBudgetProjectmxList))
{
List<SchoolDepartmentBudgetProjectmx> list = new ArrayList<SchoolDepartmentBudgetProjectmx>();
for (SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx : schoolDepartmentBudgetProjectmxList)
{
schoolDepartmentBudgetProjectmx.setDepartmentBudgetId(id);
list.add(schoolDepartmentBudgetProjectmx);
}
if (list.size() > 0)
{
schoolDepartmentBudgetMapper.batchSchoolDepartmentBudgetProjectmx(list);
}
}
}
/**
* 提交申请
* @param schoolDepartmentBudget
* @param userName
* @param key
* @param variables
* @return
*/
@Override
@Transactional
public int submitApply(SchoolDepartmentBudget schoolDepartmentBudget, String userName, String key, Map<String, Object> variables) {
// 业务type 表示是什么流程类型, businessKey表示礼堂预约申请id
String businessKey = schoolDepartmentBudget.getId().toString();
identityService.setAuthenticatedUserId(userName);
//设置申请人
variables.put(DEPARTMENTAPPLYUSERID,schoolDepartmentBudget.getApplyId());
//设置分管领导
variables.put(DEPARTMENTUSERID,schoolDepartmentBudget.getLeadershipId());
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(key, businessKey, variables);
String instanceId = processInstance.getId();
//与我们的业务表开始建立关系
schoolDepartmentBudget.setInstanceId(instanceId);
schoolDepartmentBudget.setState("1");
int i = schoolDepartmentBudgetMapper.updateById(schoolDepartmentBudget);
SchoolDepartmentBudgetVo schoolDepartmentBudgetVo = schoolDepartmentBudgetMapper.selectSchoolDepartmentBudgetById(new Long(businessKey));
//当前登录人待办任务集合
String userId = SecurityUtils.getLoginUser().getUser().getUserId().toString();
List<Task> taskList = processService.findAssigneeTasks(userId, DEPARTMENTBUDGET);
for (Task task : taskList) {
TaskEntityImpl taskImpl = (TaskEntityImpl) task;
//拿到当前任务id
String processInstanceId = taskImpl.getProcessInstanceId();
//拿到流程定义对象
ProcessInstance processInstance1 = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
//业务id(我们当时新增的时候指定了businessKey为id)
String businessKey1 = processInstance1.getBusinessKey();
if (businessKey1.equals(businessKey)){
schoolDepartmentBudgetVo.setTaskId(taskImpl.getId());
}
}
String taskId = schoolDepartmentBudgetVo.getTaskId();
Map<String,Object> variables1 = new HashMap<>();
variables1.put("comment","同意");
variables1.put("pass","true");
processService.completeTask(taskId, instanceId, variables1);
return i;
}
/**
* 待办列表
* @param key
* @param entity
* @param userId
* @return
*/
@Override
public List<SchoolDepartmentBudgetVo> findTodoTasks(String key, SchoolDepartmentBudget entity, String userId) {
List<SchoolDepartmentBudgetVo> list = new ArrayList<>();
//当前登录人待办任务集合
List<Task> taskList = processService.findAssigneeTasks(userId, key);
for (Task task : taskList) {
TaskEntityImpl taskImpl = (TaskEntityImpl) task;
//拿到当前任务id
String processInstanceId = taskImpl.getProcessInstanceId();
//拿到流程定义对象
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
//业务id(我们当时新增的时候指定了businessKey为id)
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolDepartmentBudget schoolDepartmentBudget = schoolDepartmentBudgetMapper.selectById(new Long(businessKey));
if (StringUtils.isNull(schoolDepartmentBudget)) {
continue;
}
//转vo
SchoolDepartmentBudgetVo schoolDepartmentBudgetVo = new SchoolDepartmentBudgetVo();
BeanUtils.copyProperties(schoolDepartmentBudget, schoolDepartmentBudgetVo);
schoolDepartmentBudgetVo.setTaskId(taskImpl.getId());
if (SUSPENDSTATE_PENDING.equals(taskImpl.getSuspensionState())) {
//挂起
schoolDepartmentBudgetVo.setTaskName(PENDING);
} else {
schoolDepartmentBudgetVo.setTaskName(taskImpl.getName());
}
list.add(schoolDepartmentBudgetVo);
}
List<SchoolDepartmentBudgetVo> resList = list.stream().sorted(Comparator.comparing(SchoolDepartmentBudgetVo::getApplyTime).reversed()).collect(Collectors.toList());
return resList;
}
@Override
public List<SchoolDepartmentBudgetVo> findDoneTasks(String key, SchoolDepartmentBudget entity, String userId) {
List<SchoolDepartmentBudgetVo> list = new ArrayList<>();
//当前登录人完成的历史集合
List<HistoricTaskInstance> hisList = processService.findDoneTasks(userId, key);
for (HistoricTaskInstance instance : hisList) {
//流程实例key
String processInstanceId = instance.getProcessInstanceId();
HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(processInstanceId)
.singleResult();
//业务id
String businessKey = processInstance.getBusinessKey();
//通过id查询出我们业务对象
SchoolDepartmentBudget schoolDepartmentBudget = schoolDepartmentBudgetMapper.selectById(new Long(businessKey));
if (StringUtils.isNull(schoolDepartmentBudget)) {
continue;
}
//转vo
SchoolDepartmentBudgetVo schoolDepartmentBudgetVo = new SchoolDepartmentBudgetVo();
BeanUtils.copyProperties(schoolDepartmentBudget, schoolDepartmentBudgetVo);
list.add(schoolDepartmentBudgetVo);
}
List<SchoolDepartmentBudgetVo> resList = list.stream().sorted(Comparator.comparing(SchoolDepartmentBudgetVo::getApplyTime).reversed()).collect(Collectors.toList());
return resList;
}
}
package yangtz.cs.liu.campus.service.impl.schoolStudio;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioAppointment;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioAppointmentMapper;
import yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioUseMapper;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioAppointmentService;
import java.util.List;
/**
* 录播室预约情况Service业务层处理
*
* @author ruoyi
* @date 2023-07-10
*/
@Service
public class SchoolStudioAppointmentServiceImpl implements ISchoolStudioAppointmentService
{
@Autowired
private SchoolStudioAppointmentMapper schoolStudioAppointmentMapper;
@Autowired
private SchoolStudioUseMapper schoolStudioUseMapper;
/**
* 查询录播室预约情况
*
* @param id 录播室预约情况主键
* @return 录播室预约情况
*/
@Override
public SchoolStudioAppointment selectSchoolStudioAppointmentById(Long id)
{
SchoolStudioAppointment schoolStudioAppointment = schoolStudioAppointmentMapper.selectSchoolStudioAppointmentById(id);
if (StringUtils.isNotNull(schoolStudioAppointment)){
schoolStudioAppointment.setAppointmentJc("第" + schoolStudioAppointment.getAppointmentJc() + "节");
}
return schoolStudioAppointment;
}
/**
* 查询全部录播室预约情况列表
*
* @param schoolStudioAppointment 录播室预约情况
* @return 录播室预约情况
*/
@Override
public List<SchoolStudioAppointment> selectSchoolStudioAppointmentList(SchoolStudioAppointment schoolStudioAppointment)
{
List<SchoolStudioAppointment> list = schoolStudioAppointmentMapper.selectSchoolStudioAppointmentList(schoolStudioAppointment);
if (list.size() > 0){
for (SchoolStudioAppointment studioAppointment : list) {
studioAppointment.setAppointmentJc("第" + studioAppointment.getAppointmentJc() + "节");
}
}
return list;
}
/**
* 查询个人录播室预约情况列表
* @param schoolStudioAppointment
* @return
*/
@Override
public List<SchoolStudioAppointment> selectSchoolStudioAppointmentListGr(SchoolStudioAppointment schoolStudioAppointment) {
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolStudioAppointment.setAppointmentUserId(user.getUserId());
List<SchoolStudioAppointment> list = schoolStudioAppointmentMapper.selectSchoolStudioAppointmentList(schoolStudioAppointment);
if (list.size() > 0){
for (SchoolStudioAppointment studioAppointment : list) {
studioAppointment.setAppointmentJc("第" + studioAppointment.getAppointmentJc() + "节");
}
}
return list;
}
/**
* 新增录播室预约
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
@Override
@Transactional
public int insertSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//设置预约人
schoolStudioAppointment.setAppointmentUserId(user.getUserId());
schoolStudioAppointment.setAppointmentUserName(user.getUserName());
//设置申请时间
schoolStudioAppointment.setApplyTime(DateUtils.getNowDate());
//设置预约状态
schoolStudioAppointment.setStatu("1");
int rows = schoolStudioAppointmentMapper.insertSchoolStudioAppointment(schoolStudioAppointment);
insertSchoolStudioUse(schoolStudioAppointment);
return rows;
}
/**
* 新增录播室使用情况
* @param schoolStudioAppointment
*/
private void insertSchoolStudioUse(SchoolStudioAppointment schoolStudioAppointment)
{
Long appId = schoolStudioAppointment.getId();
String[] split = schoolStudioAppointment.getAppointmentJc().split(",");
for (String s : split) {
SchoolStudioUse schoolStudioUse = new SchoolStudioUse();
schoolStudioUse.setAppointmentId(appId);
schoolStudioUse.setStudioId(schoolStudioAppointment.getStudioId());
schoolStudioUse.setUseDate(schoolStudioAppointment.getAppointmentTime());
schoolStudioUse.setUseJc(s);
schoolStudioUse.setUseUserId(schoolStudioAppointment.getAppointmentUserId());
schoolStudioUse.setUseUserName(schoolStudioAppointment.getAppointmentUserName());
//新增录播室使用
schoolStudioUseMapper.insertSchoolStudioUse(schoolStudioUse);
}
}
/**
* 取消录播室预约
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
@Override
@Transactional
public int updateSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment)
{
//取消预约对应录播室使用情况
schoolStudioUseMapper.deleteSchoolStudioUseByAppId(schoolStudioAppointment.getId());
return schoolStudioAppointmentMapper.updateSchoolStudioAppointment(schoolStudioAppointment);
}
// /**
// * 批量删除录播室预约情况
// *
// * @param ids 需要删除的录播室预约情况主键
// * @return 结果
// */
// @Override
// public int deleteSchoolStudioAppointmentByIds(Long[] ids)
// {
// return schoolStudioAppointmentMapper.deleteSchoolStudioAppointmentByIds(ids);
// }
//
// /**
// * 删除录播室预约情况信息
// *
// * @param id 录播室预约情况主键
// * @return 结果
// */
// @Override
// public int deleteSchoolStudioAppointmentById(Long id)
// {
// return schoolStudioAppointmentMapper.deleteSchoolStudioAppointmentById(id);
// }
}
package yangtz.cs.liu.campus.service.impl.schoolStudio;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudio;
import yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioMapper;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioService;
import java.util.List;
/**
* 录播室管理Service业务层处理
*
* @author ruoyi
* @date 2023-07-10
*/
@Service
public class SchoolStudioServiceImpl implements ISchoolStudioService
{
@Autowired
private SchoolStudioMapper schoolStudioMapper;
/**
* 查询录播室管理
*
* @param id 录播室管理主键
* @return 录播室管理
*/
@Override
public SchoolStudio selectSchoolStudioById(Long id)
{
return schoolStudioMapper.selectSchoolStudioById(id);
}
/**
* 查询录播室管理列表
*
* @param schoolStudio 录播室管理
* @return 录播室管理
*/
@Override
public List<SchoolStudio> selectSchoolStudioList(SchoolStudio schoolStudio)
{
return schoolStudioMapper.selectSchoolStudioList(schoolStudio);
}
/**
* 新增录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
@Override
public int insertSchoolStudio(SchoolStudio schoolStudio)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolStudio.setCreateById(user.getUserId());
schoolStudio.setCreateTime(DateUtils.getNowDate());
return schoolStudioMapper.insertSchoolStudio(schoolStudio);
}
/**
* 修改录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
@Override
public int updateSchoolStudio(SchoolStudio schoolStudio)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolStudio.setUpdateById(user.getUserId());
schoolStudio.setUpdateTime(DateUtils.getNowDate());
return schoolStudioMapper.updateSchoolStudio(schoolStudio);
}
/**
* 批量删除录播室管理
*
* @param ids 需要删除的录播室管理主键
* @return 结果
*/
@Override
public int deleteSchoolStudioByIds(Long[] ids)
{
return schoolStudioMapper.deleteSchoolStudioByIds(ids);
}
}
package yangtz.cs.liu.campus.service.impl.schoolStudio;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioUseMapper;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioUseService;
import java.util.List;
/**
* 录播室使用情况Service业务层处理
*
* @author ruoyi
* @date 2023-07-10
*/
@Service
public class SchoolStudioUseServiceImpl implements ISchoolStudioUseService
{
@Autowired
private SchoolStudioUseMapper schoolStudioUseMapper;
/**
* 录播室使用情况统计
* @param schoolStudioUse
* @return
*/
@Override
public List<SchoolStudioUse> selectStudioUse(SchoolStudioUse schoolStudioUse) {
return schoolStudioUseMapper.selectStudioUse(schoolStudioUse);
}
// /**
// * 查询录播室使用情况
// *
// * @param id 录播室使用情况主键
// * @return 录播室使用情况
// */
// @Override
// public SchoolStudioUse selectSchoolStudioUseById(Long id)
// {
// return schoolStudioUseMapper.selectSchoolStudioUseById(id);
// }
//
// /**
// * 查询录播室使用情况列表
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 录播室使用情况
// */
// @Override
// public List<SchoolStudioUse> selectSchoolStudioUseList(SchoolStudioUse schoolStudioUse)
// {
// return schoolStudioUseMapper.selectSchoolStudioUseList(schoolStudioUse);
// }
//
// /**
// * 新增录播室使用情况
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 结果
// */
// @Override
// public int insertSchoolStudioUse(SchoolStudioUse schoolStudioUse)
// {
// return schoolStudioUseMapper.insertSchoolStudioUse(schoolStudioUse);
// }
//
// /**
// * 修改录播室使用情况
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 结果
// */
// @Override
// public int updateSchoolStudioUse(SchoolStudioUse schoolStudioUse)
// {
// return schoolStudioUseMapper.updateSchoolStudioUse(schoolStudioUse);
// }
//
// /**
// * 批量删除录播室使用情况
// *
// * @param ids 需要删除的录播室使用情况主键
// * @return 结果
// */
// @Override
// public int deleteSchoolStudioUseByIds(Long[] ids)
// {
// return schoolStudioUseMapper.deleteSchoolStudioUseByIds(ids);
// }
//
// /**
// * 删除录播室使用情况信息
// *
// * @param id 录播室使用情况主键
// * @return 结果
// */
// @Override
// public int deleteSchoolStudioUseById(Long id)
// {
// return schoolStudioUseMapper.deleteSchoolStudioUseById(id);
// }
}
...@@ -31,13 +31,16 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -31,13 +31,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import yangtz.cs.liu.campus.domain.purchase.SchoolPurchase;
import yangtz.cs.liu.campus.domain.schoolAtt.SchoolAtt; import yangtz.cs.liu.campus.domain.schoolAtt.SchoolAtt;
import yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudget; import yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudget;
import yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudgetDetails; import yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudgetDetails;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade; import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.mapper.purchase.SchoolPurchaseMapper;
import yangtz.cs.liu.campus.mapper.schoolbudget.SchoolBudgetDetailsMapper; import yangtz.cs.liu.campus.mapper.schoolbudget.SchoolBudgetDetailsMapper;
import yangtz.cs.liu.campus.mapper.schoolbudget.SchoolBudgetMapper; import yangtz.cs.liu.campus.mapper.schoolbudget.SchoolBudgetMapper;
import yangtz.cs.liu.campus.service.schoolbudget.ISchoolBudgetService; import yangtz.cs.liu.campus.service.schoolbudget.ISchoolBudgetService;
import yangtz.cs.liu.campus.vo.purchase.SchoolPurchaseVo;
import yangtz.cs.liu.campus.vo.schoolAtt.SchoolAttVO; import yangtz.cs.liu.campus.vo.schoolAtt.SchoolAttVO;
import yangtz.cs.liu.campus.vo.schoolbudget.SchoolBudgetVo; import yangtz.cs.liu.campus.vo.schoolbudget.SchoolBudgetVo;
import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO; import yangtz.cs.liu.campus.vo.teacher.SchoolTeacherVO;
...@@ -67,6 +70,9 @@ public class SchoolBudgetServiceImpl extends ServiceImpl<SchoolBudgetMapper, Sch ...@@ -67,6 +70,9 @@ public class SchoolBudgetServiceImpl extends ServiceImpl<SchoolBudgetMapper, Sch
@Autowired @Autowired
private SysDeptMapper deptMapper; private SysDeptMapper deptMapper;
@Autowired
private SchoolPurchaseMapper schoolPurchaseMapper;
/** /**
* 查询预算项目 * 查询预算项目
* *
...@@ -130,6 +136,17 @@ public class SchoolBudgetServiceImpl extends ServiceImpl<SchoolBudgetMapper, Sch ...@@ -130,6 +136,17 @@ public class SchoolBudgetServiceImpl extends ServiceImpl<SchoolBudgetMapper, Sch
/* vo.setSchoolBudgetDetailsList(details); /* vo.setSchoolBudgetDetailsList(details);
list.add(vo);*/ list.add(vo);*/
budget.setSchoolBudgetDetailsList(details); budget.setSchoolBudgetDetailsList(details);
SchoolPurchase schoolPurchase1 = new SchoolPurchase();
schoolPurchase1.setBudgetId(budget.getId());
List<SchoolPurchaseVo> schoolPurchaseVos = schoolPurchaseMapper.selectPurchaseList(schoolPurchase1);
BigDecimal bigDecimal = new BigDecimal("0");
for (SchoolPurchaseVo schoolPurchase : schoolPurchaseVos) {
BigDecimal add = bigDecimal.add(new BigDecimal(schoolPurchase.getPurchaseMoney().toString()));
bigDecimal = add;
}
BigDecimal bigDecimal1 = new BigDecimal("10000");
BigDecimal amountSpent = bigDecimal.divide(bigDecimal1);
budget.setAmountSpent(amountSpent);
} }
return budgets; return budgets;
} }
......
...@@ -38,4 +38,6 @@ public interface ISchoolPurchaseService extends IService<SchoolPurchase> { ...@@ -38,4 +38,6 @@ public interface ISchoolPurchaseService extends IService<SchoolPurchase> {
public List<SchoolPurchase> findPurchaseName(Long handUserId); public List<SchoolPurchase> findPurchaseName(Long handUserId);
WorkFlowVo purchaseFlows(Long id); WorkFlowVo purchaseFlows(Long id);
public List<SchoolPurchaseVo> selectPurchaseList(SchoolPurchase schoolPurchase);
} }
package yangtz.cs.liu.campus.service.schoolDepartmentBudget;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import java.util.List;
/**
* 科室预算填报项目明细Service接口
*
* @author ruoyi
* @date 2023-07-11
*/
public interface ISchoolDepartmentBudgetProjectmxService
{
/**
* 查询科室预算填报项目明细
*
* @param id 科室预算填报项目明细主键
* @return 科室预算填报项目明细
*/
public SchoolDepartmentBudgetProjectmx selectSchoolDepartmentBudgetProjectmxById(Long id);
/**
* 查询科室预算填报项目明细列表
*
* @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
* @return 科室预算填报项目明细集合
*/
public List<SchoolDepartmentBudgetProjectmx> selectList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
// /**
// * 查询科室预算填报项目明细列表
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 科室预算填报项目明细集合
// */
// public List<SchoolDepartmentBudgetProjectmx> selectSchoolDepartmentBudgetProjectmxList(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
//
// /**
// * 新增科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// public int insertSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
//
// /**
// * 修改科室预算填报项目明细
// *
// * @param schoolDepartmentBudgetProjectmx 科室预算填报项目明细
// * @return 结果
// */
// public int updateSchoolDepartmentBudgetProjectmx(SchoolDepartmentBudgetProjectmx schoolDepartmentBudgetProjectmx);
//
// /**
// * 批量删除科室预算填报项目明细
// *
// * @param ids 需要删除的科室预算填报项目明细主键集合
// * @return 结果
// */
// public int deleteSchoolDepartmentBudgetProjectmxByIds(Long[] ids);
//
// /**
// * 删除科室预算填报项目明细信息
// *
// * @param id 科室预算填报项目明细主键
// * @return 结果
// */
// public int deleteSchoolDepartmentBudgetProjectmxById(Long id);
}
package yangtz.cs.liu.campus.service.schoolDepartmentBudget;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudget;
import yangtz.cs.liu.campus.vo.schoolDepartmentBudget.SchoolDepartmentBudgetVo;
import java.util.List;
import java.util.Map;
/**
* 科室预算填报Service接口
*
* @author ruoyi
* @date 2023-07-11
*/
public interface ISchoolDepartmentBudgetService extends IService<SchoolDepartmentBudget>
{
/**
* 查询科室预算填报
*
* @param id 科室预算填报主键
* @return 科室预算填报
*/
public SchoolDepartmentBudgetVo selectSchoolDepartmentBudgetById(Long id);
/**
* 查询科室预算填报列表
*
* @param schoolDepartmentBudget 科室预算填报
* @return 科室预算填报集合
*/
public List<SchoolDepartmentBudgetVo> selectSchoolDepartmentBudgetList(SchoolDepartmentBudget schoolDepartmentBudget);
/**
* 新增科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
public int insertSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget);
/**
* 修改科室预算填报
*
* @param schoolDepartmentBudget 科室预算填报
* @return 结果
*/
public int updateSchoolDepartmentBudget(SchoolDepartmentBudgetVo schoolDepartmentBudget);
/**
* 批量删除科室预算填报
*
* @param ids 需要删除的科室预算填报主键集合
* @return 结果
*/
public int deleteSchoolDepartmentBudgetByIds(Long[] ids);
/**
* 删除科室预算填报信息
*
* @param id 科室预算填报主键
* @return 结果
*/
public int deleteSchoolDepartmentBudgetById(Long id);
/**
* 查询本单位科室预算填报列表
* @param schoolDepartmentBudget
* @return
*/
List<SchoolDepartmentBudgetVo> selectSchoolDepartmentBudgetListDw(SchoolDepartmentBudget schoolDepartmentBudget);
/**
* 流程定义
* @param schoolDepartmentBudget
* @param userName
* @param key
* @param variables
* @return
*/
int submitApply(SchoolDepartmentBudget schoolDepartmentBudget, String userName, String key, Map<String, Object> variables);
/**
* 待办列表
* @param key
* @param entity
* @param userId
* @return
*/
List<SchoolDepartmentBudgetVo> findTodoTasks(String key, SchoolDepartmentBudget entity, String userId);
/**
* 已办列表
* @param key
* @param entity
* @param userId
* @return
*/
List<SchoolDepartmentBudgetVo> findDoneTasks(String key, SchoolDepartmentBudget entity, String userId);
}
package yangtz.cs.liu.campus.service.schoolStudio;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioAppointment;
import java.util.List;
/**
* 录播室预约情况Service接口
*
* @author ruoyi
* @date 2023-07-10
*/
public interface ISchoolStudioAppointmentService
{
/**
* 查询全部录播室预约情况
*
* @param id 录播室预约情况主键
* @return 录播室预约情况
*/
public SchoolStudioAppointment selectSchoolStudioAppointmentById(Long id);
/**
* 查询录播室预约情况列表
*
* @param schoolStudioAppointment 录播室预约情况
* @return 录播室预约情况集合
*/
public List<SchoolStudioAppointment> selectSchoolStudioAppointmentList(SchoolStudioAppointment schoolStudioAppointment);
/**
* 新增录播室预约
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
public int insertSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment);
/**
* 取消录播室预约
*
* @param schoolStudioAppointment 录播室预约情况
* @return 结果
*/
public int updateSchoolStudioAppointment(SchoolStudioAppointment schoolStudioAppointment);
/**
* 查询个人录播室预约情况列表
* @param schoolStudioAppointment
* @return
*/
List<SchoolStudioAppointment> selectSchoolStudioAppointmentListGr(SchoolStudioAppointment schoolStudioAppointment);
// /**
// * 批量删除录播室预约情况
// *
// * @param ids 需要删除的录播室预约情况主键集合
// * @return 结果
// */
// public int deleteSchoolStudioAppointmentByIds(Long[] ids);
//
// /**
// * 删除录播室预约情况信息
// *
// * @param id 录播室预约情况主键
// * @return 结果
// */
// public int deleteSchoolStudioAppointmentById(Long id);
}
package yangtz.cs.liu.campus.service.schoolStudio;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudio;
import java.util.List;
/**
* 录播室管理Service接口
*
* @author ruoyi
* @date 2023-07-10
*/
public interface ISchoolStudioService
{
/**
* 查询录播室管理
*
* @param id 录播室管理主键
* @return 录播室管理
*/
public SchoolStudio selectSchoolStudioById(Long id);
/**
* 查询录播室管理列表
*
* @param schoolStudio 录播室管理
* @return 录播室管理集合
*/
public List<SchoolStudio> selectSchoolStudioList(SchoolStudio schoolStudio);
/**
* 新增录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
public int insertSchoolStudio(SchoolStudio schoolStudio);
/**
* 修改录播室管理
*
* @param schoolStudio 录播室管理
* @return 结果
*/
public int updateSchoolStudio(SchoolStudio schoolStudio);
/**
* 批量删除录播室管理
*
* @param ids 需要删除的录播室管理主键集合
* @return 结果
*/
public int deleteSchoolStudioByIds(Long[] ids);
}
package yangtz.cs.liu.campus.service.schoolStudio;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import java.util.List;
/**
* 录播室使用情况Service接口
*
* @author ruoyi
* @date 2023-07-10
*/
public interface ISchoolStudioUseService
{
/**
* 录播室使用情况统计
* @param schoolStudioUse
* @return
*/
public List<SchoolStudioUse> selectStudioUse(SchoolStudioUse schoolStudioUse);
// /**
// * 查询录播室使用情况
// *
// * @param id 录播室使用情况主键
// * @return 录播室使用情况
// */
// public SchoolStudioUse selectSchoolStudioUseById(Long id);
//
// /**
// * 查询录播室使用情况列表
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 录播室使用情况集合
// */
// public List<SchoolStudioUse> selectSchoolStudioUseList(SchoolStudioUse schoolStudioUse);
//
// /**
// * 新增录播室使用情况
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 结果
// */
// public int insertSchoolStudioUse(SchoolStudioUse schoolStudioUse);
//
// /**
// * 修改录播室使用情况
// *
// * @param schoolStudioUse 录播室使用情况
// * @return 结果
// */
// public int updateSchoolStudioUse(SchoolStudioUse schoolStudioUse);
//
// /**
// * 批量删除录播室使用情况
// *
// * @param ids 需要删除的录播室使用情况主键集合
// * @return 结果
// */
// public int deleteSchoolStudioUseByIds(Long[] ids);
//
// /**
// * 删除录播室使用情况信息
// *
// * @param id 录播室使用情况主键
// * @return 结果
// */
// public int deleteSchoolStudioUseById(Long id);
}
package yangtz.cs.liu.campus.vo.auditorium;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.activiti.domain.ProcessBaseEntity;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class SchoolAuditoriumVo extends ProcessBaseEntity {
/** 礼堂预约id */
private Long id;
/** 流程实例id */
private String instanceId;
/** 活动名称 */
@Excel(name = "活动名称")
private String activityName;
/** 活动场地 */
@Excel(name = "活动场地")
private String activityArea;
/** 活动时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date activityTime;
/** 话筒数量 */
@Excel(name = "话筒数量")
private Integer htNumber;
/** 具体负责人id */
@Excel(name = "具体负责人id")
private Long specificUserId;
/** 具体负责人 */
@Excel(name = "具体负责人")
private String specificUserName;
/** 活动人数 */
@Excel(name = "活动人数")
private Long activityNumber;
/** 预计时长 */
@Excel(name = "预计时长")
private BigDecimal duration;
/** 是否彩排(1-是,0-否) */
@Excel(name = "是否彩排", readConverterExp = "1=-是,0-否")
private String isRehearsal;
/** 是否录像(1-是,0-否) */
@Excel(name = "是否录像", readConverterExp = "1=-是,0-否")
private String isVideo;
/** 是否直播(1-是,0-否) */
@Excel(name = "是否直播", readConverterExp = "1=-是,0-否")
private String isLive;
/** 是否需要大屏(1-是,0-否) */
@Excel(name = "是否需要大屏", readConverterExp = "1=-是,0-否")
private String isBigScreen;
/** 其他要求 */
@Excel(name = "其他要求")
private String otherRequirements;
/** 学校分管领导id */
@Excel(name = "学校分管领导id")
private Long leadershipId;
/** 学校分管领导 */
@Excel(name = "学校分管领导")
private String leadershipName;
/** 审核状态(0-未提交,1-审核中,2-审核通过,3-审核不通过) */
@Excel(name = "审核状态", readConverterExp = "0=-未提交,1-审核中,2-审核通过,3-审核不通过")
private String state;
/** 审批意见 */
@Excel(name = "审批意见")
private String opinion;
/** 申请人id */
@Excel(name = "申请人id")
private Long applyId;
/** 申请人 */
@Excel(name = "申请人")
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请部门id */
@Excel(name = "申请部门id")
private Long applyDeptId;
/** 申请部门 */
@Excel(name = "申请部门")
private String applyDept;
/** 附件路径 */
private String fjlj;
/** 附件名称 */
@Excel(name = "附件名称")
private String fjmc;
/** 附件下载路径 */
private String fjxzlj;
/** 创建人id */
private Long createById;
/** 创建人 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 修改人 */
private String updateBy;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String startTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endTime;
}
...@@ -18,4 +18,10 @@ public class CountVo { ...@@ -18,4 +18,10 @@ public class CountVo {
/**学生请假审批任务数*/ /**学生请假审批任务数*/
private int sLeaveNum; private int sLeaveNum;
/**礼堂预约审批任务数*/
private int auditoriumNum;
/**科室预算审批任务数*/
private int departmentBudgetNum;
} }
package yangtz.cs.liu.campus.vo.schoolDepartmentBudget;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.activiti.domain.ProcessBaseEntity;
import yangtz.cs.liu.campus.domain.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmx;
import java.util.Date;
import java.util.List;
@Data
public class SchoolDepartmentBudgetVo extends ProcessBaseEntity {
/** 科室预算填报主键id */
private Long id;
/** 流程实例id */
@Excel(name = "流程实例id")
private String instanceId;
/** 年度 */
@Excel(name = "年度")
private String year;
/** 科室id */
@Excel(name = "科室id")
private Long deptId;
/** 科室名称 */
@Excel(name = "科室名称")
private String deptName;
/** 填报人id */
@Excel(name = "填报人id")
private Long informantId;
/** 填报人名称 */
@Excel(name = "填报人名称")
private String informant;
/** 分管领导id */
@Excel(name = "分管领导id")
private Long leadershipId;
/** 分管领导名称 */
@Excel(name = "分管领导名称")
private String leadershipName;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 填报时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "填报时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date tbTime;
/** 审核状态(0-未提交,1-分管领导审核,2-审核通过,3-审核不通过) */
@Excel(name = "审核状态", readConverterExp = "0-未提交,1-分管领导审核,2-审核通过,3-审核不通过")
private String state;
/** 申请人id */
@Excel(name = "申请人id")
private Long applyId;
/** 申请人 */
@Excel(name = "申请人")
private String applyName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 创建人id */
private Long createById;
/** 创建人 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 修改人id */
private Long updateById;
/** 修改人 */
private String updateBy;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 科室预算填报项目明细信息 */
private List<SchoolDepartmentBudgetProjectmx> schoolDepartmentBudgetProjectmxList;
}
...@@ -45,6 +45,11 @@ public class SchoolBudgetVo extends OurBaseEntity ...@@ -45,6 +45,11 @@ public class SchoolBudgetVo extends OurBaseEntity
// @NotBlank(message = "批复总额不能为空") // @NotBlank(message = "批复总额不能为空")
private BigDecimal giveMoney; private BigDecimal giveMoney;
/** 已使用金额(万元) */
@Excel(name = "已使用金额(万元)", needMerge = true)
// @NotBlank(message = "已使用金额不能为空")
private BigDecimal amountSpent;
/** 是否政府采购(0是 1否) */ /** 是否政府采购(0是 1否) */
@Excel(name = "是否政府采购", combo = {"是","否"}, readConverterExp = "0=是,1=否", needMerge = true) @Excel(name = "是否政府采购", combo = {"是","否"}, readConverterExp = "0=是,1=否", needMerge = true)
@NotBlank(message = "是否政府采购不能为空") @NotBlank(message = "是否政府采购不能为空")
......
package yangtz.cs.liu.wechat.service.api; package yangtz.cs.liu.wechat.service.api;
import yangtz.cs.liu.campus.domain.temp.LeaveResultTemplate; import yangtz.cs.liu.campus.domain.temp.*;
import yangtz.cs.liu.campus.domain.temp.OfficalTemplate;
import yangtz.cs.liu.campus.domain.temp.PurchaseTemplate;
import yangtz.cs.liu.campus.domain.temp.TeacherLeaveTemplate;
import yangtz.cs.liu.wechat.domain.template.LeaveStateTemplate; import yangtz.cs.liu.wechat.domain.template.LeaveStateTemplate;
import yangtz.cs.liu.wechat.domain.template.LeaveTemplate; import yangtz.cs.liu.wechat.domain.template.LeaveTemplate;
import yangtz.cs.liu.wechat.domain.template.StudentLeaveTemplate; import yangtz.cs.liu.wechat.domain.template.StudentLeaveTemplate;
...@@ -39,6 +36,12 @@ public interface IWxApiService { ...@@ -39,6 +36,12 @@ public interface IWxApiService {
//采购申请模板 //采购申请模板
String sendPurchaseTemplate(PurchaseTemplate template); String sendPurchaseTemplate(PurchaseTemplate template);
//礼堂预约申请模板
String sendAuditoriumTemplate(AuditoriumTemplate template);
//科室预算申请模板
String sendDepartmentBudgetTemplate(DepartmentBudgetTemplate template);
//公文流转模板 //公文流转模板
String sendOfficalTemplate(OfficalTemplate template); String sendOfficalTemplate(OfficalTemplate template);
} }
...@@ -7,10 +7,7 @@ import com.ruoyi.common.utils.http.HttpUtils; ...@@ -7,10 +7,7 @@ import com.ruoyi.common.utils.http.HttpUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.temp.LeaveResultTemplate; import yangtz.cs.liu.campus.domain.temp.*;
import yangtz.cs.liu.campus.domain.temp.OfficalTemplate;
import yangtz.cs.liu.campus.domain.temp.PurchaseTemplate;
import yangtz.cs.liu.campus.domain.temp.TeacherLeaveTemplate;
import yangtz.cs.liu.wechat.domain.template.LeaveStateTemplate; import yangtz.cs.liu.wechat.domain.template.LeaveStateTemplate;
import yangtz.cs.liu.wechat.domain.template.LeaveTemplate; import yangtz.cs.liu.wechat.domain.template.LeaveTemplate;
import yangtz.cs.liu.wechat.domain.MsgTemplate; import yangtz.cs.liu.wechat.domain.MsgTemplate;
...@@ -342,6 +339,68 @@ public class WxApiServiceImpl implements IWxApiService { ...@@ -342,6 +339,68 @@ public class WxApiServiceImpl implements IWxApiService {
} }
@Override @Override
public String sendAuditoriumTemplate(AuditoriumTemplate template) {
String toUserOpenId = template.getToUserOpenId();
String accessToken = accessTokenUtil.getToken();
Map<String, TemplateInfo> data = new HashMap<>();
TemplateInfo first = new TemplateInfo(template.getFirst(), "#DC143C");
data.put("first", first);
TemplateInfo keyword1 = new TemplateInfo(template.getApplyUser(), "#173177");
data.put("keyword1", keyword1);
TemplateInfo keyword2 = new TemplateInfo(template.getContent(), "#173177");
data.put("keyword2", keyword2);
//申请时间
String applyTime = HolidayDateUtil.format.format(template.getApplyTime());
TemplateInfo keyword3 = new TemplateInfo(applyTime, "#173177");
data.put("keyword3", keyword3);
TemplateInfo remark = new TemplateInfo( template.getRemark() , "#DC143C");
data.put("remark", remark);
MsgTemplate msgTemplate = new MsgTemplate();
msgTemplate.setData(data);
msgTemplate.setTemplate_id(purchaseTemplateId);
// msgTemplate.setUrl("www.baidu.com");
msgTemplate.setTouser(toUserOpenId);
String jsonObject = JSONUtil.parseObj(template).toString();
String sendUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + accessToken;
String result = HttpUtils.sendPost(sendUrl, jsonObject);
return result;
}
@Override
public String sendDepartmentBudgetTemplate(DepartmentBudgetTemplate template) {
String toUserOpenId = template.getToUserOpenId();
String accessToken = accessTokenUtil.getToken();
Map<String, TemplateInfo> data = new HashMap<>();
TemplateInfo first = new TemplateInfo(template.getFirst(), "#DC143C");
data.put("first", first);
TemplateInfo keyword1 = new TemplateInfo(template.getApplyUser(), "#173177");
data.put("keyword1", keyword1);
TemplateInfo keyword2 = new TemplateInfo(template.getContent(), "#173177");
data.put("keyword2", keyword2);
//申请时间
String applyTime = HolidayDateUtil.format.format(template.getApplyTime());
TemplateInfo keyword3 = new TemplateInfo(applyTime, "#173177");
data.put("keyword3", keyword3);
TemplateInfo remark = new TemplateInfo( template.getRemark() , "#DC143C");
data.put("remark", remark);
MsgTemplate msgTemplate = new MsgTemplate();
msgTemplate.setData(data);
msgTemplate.setTemplate_id(purchaseTemplateId);
// msgTemplate.setUrl("www.baidu.com");
msgTemplate.setTouser(toUserOpenId);
String jsonObject = JSONUtil.parseObj(template).toString();
String sendUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + accessToken;
String result = HttpUtils.sendPost(sendUrl, jsonObject);
return result;
}
@Override
public String sendOfficalTemplate(OfficalTemplate template) { public String sendOfficalTemplate(OfficalTemplate template) {
String toUserOpenId = template.getToUserOpenId(); String toUserOpenId = template.getToUserOpenId();
String accessToken = accessTokenUtil.getToken(); String accessToken = accessTokenUtil.getToken();
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.auditorium.SchoolAuditoriumMapper">
<resultMap type="SchoolAuditoriumVo" id="SchoolAuditoriumResult">
<result property="id" column="id" />
<result property="instanceId" column="instance_id" />
<result property="activityName" column="activity_name" />
<result property="activityArea" column="activity_area" />
<result property="activityTime" column="activity_time" />
<result property="htNumber" column="ht_number" />
<result property="specificUserId" column="specific_user_id" />
<result property="specificUserName" column="specific_user_name" />
<result property="activityNumber" column="activity_number" />
<result property="duration" column="duration" />
<result property="isRehearsal" column="is_rehearsal" />
<result property="isVideo" column="is_video" />
<result property="isLive" column="is_live" />
<result property="isBigScreen" column="is_big_screen" />
<result property="otherRequirements" column="other_requirements" />
<result property="leadershipId" column="leadership_id" />
<result property="leadershipName" column="leadership_name" />
<result property="state" column="state" />
<result property="opinion" column="opinion" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<result property="applyDeptId" column="apply_dept_id" />
<result property="applyDept" column="apply_dept" />
<result property="fjlj" column="fjlj" />
<result property="fjmc" column="fjmc" />
<result property="createById" column="create_by_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateById" column="update_by_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSchoolAuditoriumVo">
select id, instance_id, activity_name, activity_area, activity_time, ht_number, specific_user_id, specific_user_name, activity_number, duration, is_rehearsal, is_video, is_live, is_big_screen, other_requirements, leadership_id, leadership_name, state, opinion, apply_id, apply_name, apply_time, apply_dept, apply_dept_id, fjlj, fjmc, create_by_id, create_by, create_time, update_by_id, update_by, update_time from school_auditorium
</sql>
<select id="selectSchoolAuditoriumList" parameterType="SchoolAuditoriumVo" resultMap="SchoolAuditoriumResult">
<include refid="selectSchoolAuditoriumVo"/>
<where>
state != '0'
<if test="activityName != null and activityName != ''"> and activity_name like concat('%', #{activityName}, '%')</if>
<if test="activityArea != null and activityArea != ''"> and activity_area = #{activityArea}</if>
<if test="activityTime != null "> and activity_time = #{activityTime}</if>
<if test="htNumber != null "> and ht_number = #{htNumber}</if>
<if test="specificUserId != null "> and specific_user_id = #{specificUserId}</if>
<if test="specificUserName != null and specificUserName != ''"> and specific_user_name like concat('%', #{specificUserName}, '%')</if>
<if test="activityNumber != null "> and activity_number = #{activityNumber}</if>
<if test="duration != null "> and duration = #{duration}</if>
<if test="isRehearsal != null and isRehearsal != ''"> and is_rehearsal = #{isRehearsal}</if>
<if test="isVideo != null and isVideo != ''"> and is_video = #{isVideo}</if>
<if test="isLive != null and isLive != ''"> and is_live = #{isLive}</if>
<if test="isBigScreen != null and isBigScreen != ''"> and is_big_screen = #{isBigScreen}</if>
<if test="otherRequirements != null and otherRequirements != ''"> and other_requirements = #{otherRequirements}</if>
<if test="leadershipId != null "> and leadership_id = #{leadershipId}</if>
<if test="leadershipName != null and leadershipName != ''"> and leadership_name like concat('%', #{leadershipName}, '%')</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="applyDeptId != null and applyDeptId != ''"> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(activity_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
ORDER BY activity_time DESC
</select>
<select id="selectSchoolAuditoriumListGr" parameterType="SchoolAuditoriumVo" resultMap="SchoolAuditoriumResult">
<include refid="selectSchoolAuditoriumVo"/>
<where>
<if test="activityName != null and activityName != ''"> and activity_name like concat('%', #{activityName}, '%')</if>
<if test="activityArea != null and activityArea != ''"> and activity_area = #{activityArea}</if>
<if test="activityTime != null "> and activity_time = #{activityTime}</if>
<if test="htNumber != null "> and ht_number = #{htNumber}</if>
<if test="specificUserId != null "> and specific_user_id = #{specificUserId}</if>
<if test="specificUserName != null and specificUserName != ''"> and specific_user_name like concat('%', #{specificUserName}, '%')</if>
<if test="activityNumber != null "> and activity_number = #{activityNumber}</if>
<if test="duration != null "> and duration = #{duration}</if>
<if test="isRehearsal != null and isRehearsal != ''"> and is_rehearsal = #{isRehearsal}</if>
<if test="isVideo != null and isVideo != ''"> and is_video = #{isVideo}</if>
<if test="isLive != null and isLive != ''"> and is_live = #{isLive}</if>
<if test="isBigScreen != null and isBigScreen != ''"> and is_big_screen = #{isBigScreen}</if>
<if test="otherRequirements != null and otherRequirements != ''"> and other_requirements = #{otherRequirements}</if>
<if test="leadershipId != null "> and leadership_id = #{leadershipId}</if>
<if test="leadershipName != null and leadershipName != ''"> and leadership_name like concat('%', #{leadershipName}, '%')</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="applyDeptId != null and applyDeptId != ''"> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(activity_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
ORDER BY activity_time DESC
</select>
<select id="selectSchoolAuditoriumById" parameterType="Long" resultMap="SchoolAuditoriumResult">
<include refid="selectSchoolAuditoriumVo"/>
where id = #{id}
</select>
<insert id="insertSchoolAuditorium" parameterType="SchoolAuditorium" useGeneratedKeys="true" keyProperty="id">
insert into school_auditorium
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null and instanceId != ''">instance_id,</if>
<if test="activityName != null and activityName != ''">activity_name,</if>
<if test="activityArea != null and activityArea != ''">activity_area,</if>
<if test="activityTime != null">activity_time,</if>
<if test="htNumber != null">ht_number,</if>
<if test="specificUserId != null">specific_user_id,</if>
<if test="specificUserName != null and specificUserName != ''">specific_user_name,</if>
<if test="activityNumber != null">activity_number,</if>
<if test="duration != null">duration,</if>
<if test="isRehearsal != null and isRehearsal != ''">is_rehearsal,</if>
<if test="isVideo != null and isVideo != ''">is_video,</if>
<if test="isLive != null and isLive != ''">is_live,</if>
<if test="isBigScreen != null and isBigScreen != ''">is_big_screen,</if>
<if test="otherRequirements != null">other_requirements,</if>
<if test="leadershipId != null">leadership_id,leadership_name,</if>
<if test="state != null and state != ''">state,</if>
<if test="opinion != null">opinion,</if>
<if test="applyId != null">apply_id,apply_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="applyDeptId != null">apply_dept_id,apply_dept,</if>
<if test="fjlj != null">fjlj,</if>
<if test="fjmc != null">fjmc,</if>
<if test="createById != null">create_by_id,create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateById != null">update_by_id,update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null and instanceId != ''">#{instanceId},</if>
<if test="activityName != null and activityName != ''">#{activityName},</if>
<if test="activityArea != null and activityArea != ''">#{activityArea},</if>
<if test="activityTime != null">#{activityTime},</if>
<if test="htNumber != null">#{htNumber},</if>
<if test="specificUserId != null">#{specificUserId},</if>
<if test="specificUserName != null and specificUserName != ''">#{specificUserName},</if>
<if test="activityNumber != null">#{activityNumber},</if>
<if test="duration != null">#{duration},</if>
<if test="isRehearsal != null and isRehearsal != ''">#{isRehearsal},</if>
<if test="isVideo != null and isVideo != ''">#{isVideo},</if>
<if test="isLive != null and isLive != ''">#{isLive},</if>
<if test="isBigScreen != null and isBigScreen != ''">#{isBigScreen},</if>
<if test="otherRequirements != null">#{otherRequirements},</if>
<if test="leadershipId != null">#{leadershipId},(select user_name from sys_user where user_id = #{leadershipId}),</if>
<if test="state != null and state != ''">#{state},</if>
<if test="opinion != null">#{opinion},</if>
<if test="applyId != null">#{applyId},(select user_name from sys_user where user_id = #{applyId}),</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="applyDeptId != null">#{applyDeptId},(select dept_name from sys_dept where dept_id = #{applyDeptId}),</if>
<if test="fjlj != null">#{fjlj},</if>
<if test="fjmc != null">#{fjmc},</if>
<if test="createById != null">#{createById},(select user_name from sys_user where user_id = #{createById}),</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateById != null">#{updateById},(select user_name from sys_user where user_id = #{updateById}),</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolAuditorium" parameterType="SchoolAuditorium">
update school_auditorium
<trim prefix="SET" suffixOverrides=",">
<if test="instanceId != null and instanceId != ''">instance_id = #{instanceId},</if>
<if test="activityName != null and activityName != ''">activity_name = #{activityName},</if>
<if test="activityArea != null and activityArea != ''">activity_area = #{activityArea},</if>
<if test="activityTime != null">activity_time = #{activityTime},</if>
<if test="htNumber != null">ht_number = #{htNumber},</if>
<if test="specificUserId != null">specific_user_id = #{specificUserId},</if>
<if test="specificUserName != null and specificUserName != ''">specific_user_name = #{specificUserName},</if>
<if test="activityNumber != null">activity_number = #{activityNumber},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="isRehearsal != null and isRehearsal != ''">is_rehearsal = #{isRehearsal},</if>
<if test="isVideo != null and isVideo != ''">is_video = #{isVideo},</if>
<if test="isLive != null and isLive != ''">is_live = #{isLive},</if>
<if test="isBigScreen != null and isBigScreen != ''">is_big_screen = #{isBigScreen},</if>
<if test="otherRequirements != null">other_requirements = #{otherRequirements},</if>
<if test="leadershipId != null">leadership_id = #{leadershipId},leadership_name = (select user_name from sys_user where user_id = #{leadershipId}),</if>
<if test="state != null and state != ''">state = #{state},</if>
<if test="opinion != null">opinion = #{opinion},</if>
<if test="applyId != null">apply_id = #{applyId},apply_name = (select user_name from sys_user where user_id = #{applyId}),</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyDeptId != null">apply_dept_id = #{applyDeptId},apply_dept = (select dept_name from sys_dept where dept_id = #{applyDeptId}),</if>
<if test="fjlj != null">fjlj = #{fjlj},</if>
<if test="fjmc != null">fjmc = #{fjmc},</if>
<if test="createById != null">create_by_id = #{createById},create_by = (select user_name from sys_user where user_id = #{createById}),</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateById != null">update_by_id = #{updateById},update_by = (select user_name from sys_user where user_id = #{updateById}),</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolAuditoriumById" parameterType="Long">
delete from school_auditorium where id = #{id}
</delete>
<delete id="deleteSchoolAuditoriumByIds" parameterType="String">
delete from school_auditorium where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -22,4 +22,15 @@ ...@@ -22,4 +22,15 @@
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
<select id="selectPurchaseList" resultType="yangtz.cs.liu.campus.vo.purchase.SchoolPurchaseVo">
select * from school_purchase
<where>
state = '0' and del_flag = '0'
<if test="entity.purchaseName != null and entity.purchaseName != ''">and purchase_name like concat('%', #{entity.purchaseName}, '%')</if>
<if test="entity.budgetName != null and entity.budgetName != ''">and budget_name like concat('%', #{entity.budgetName}, '%')</if>
<if test="entity.budgetId != null">and budget_id = #{entity.budgetId}</if>
</where>
order by create_time desc
</select>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolDepartmentBudget.SchoolDepartmentBudgetMapper">
<resultMap type="SchoolDepartmentBudgetVo" id="SchoolDepartmentBudgetResult">
<result property="id" column="id" />
<result property="instanceId" column="instance_id" />
<result property="year" column="year" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="informantId" column="informant_id" />
<result property="informant" column="informant" />
<result property="leadershipId" column="leadership_id" />
<result property="leadershipName" column="leadership_name" />
<result property="remark" column="remark" />
<result property="tbTime" column="tb_time" />
<result property="state" column="state" />
<result property="applyId" column="apply_id" />
<result property="applyName" column="apply_name" />
<result property="applyTime" column="apply_time" />
<result property="createById" column="create_by_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateById" column="update_by_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<resultMap id="SchoolDepartmentBudgetSchoolDepartmentBudgetProjectmxResult" type="SchoolDepartmentBudgetVo" extends="SchoolDepartmentBudgetResult">
<collection property="schoolDepartmentBudgetProjectmxList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SchoolDepartmentBudgetProjectmxResult" />
</resultMap>
<resultMap type="SchoolDepartmentBudgetProjectmx" id="SchoolDepartmentBudgetProjectmxResult">
<result property="id" column="sub_id" />
<result property="departmentBudgetId" column="sub_department_budget_id" />
<result property="projectName" column="sub_project_name" />
<result property="content" column="sub_content" />
<result property="projectExpenditures" column="sub_project_expenditures" />
<result property="isGovernmentPurchase" column="sub_is_government_purchase" />
<result property="applyMoney" column="sub_apply_money" />
<result property="remark" column="sub_remark" />
</resultMap>
<sql id="selectSchoolDepartmentBudgetVo">
select id, instance_id, year, dept_id, dept_name, informant_id, informant, leadership_id, leadership_name, remark, tb_time, state, apply_id, apply_name, apply_time, create_by_id, create_by, create_time, update_by_id, update_by, update_time from school_department_budget
</sql>
<select id="selectSchoolDepartmentBudgetList" parameterType="SchoolDepartmentBudgetVo" resultMap="SchoolDepartmentBudgetResult">
select b.id, b.instance_id, b.year, b.dept_id, b.dept_name, b.informant_id, b.informant, b.leadership_id, b.leadership_name, b.remark,
b.tb_time, b.state, b.apply_id, b.apply_name, b.apply_time, b.create_by_id, b.create_by, b.create_time, b.update_by_id, b.update_by, b.update_time from school_department_budget b
left join sys_dept d on b.dept_id = d.dept_id
<where>
<if test="instanceId != null and instanceId != ''"> and b.instance_id = #{instanceId}</if>
<if test="year != null and year != ''"> and b.year = #{year}</if>
<if test="deptId != null "> and (b.dept_id=#{deptId} or FIND_IN_SET(#{deptId},d.ancestors))</if>
<if test="deptName != null and deptName != ''"> and b.dept_name like concat('%', #{deptName}, '%')</if>
<if test="informantId != null "> and b.informant_id = #{informantId}</if>
<if test="informant != null and informant != ''"> and b.informant = #{informant}</if>
<if test="leadershipId != null "> and b.leadership_id = #{leadershipId}</if>
<if test="leadershipName != null and leadershipName != ''"> and b.leadership_name like concat('%', #{leadershipName}, '%')</if>
<if test="tbTime != null "> and b.tb_time = #{tbTime}</if>
<if test="state != null and state != ''"> and b.state = #{state}</if>
<if test="createById != null "> and b.create_by_id = #{createById}</if>
<if test="updateById != null "> and b.update_by_id = #{updateById}</if>
</where>
</select>
<select id="selectSchoolDepartmentBudgetById" parameterType="Long" resultMap="SchoolDepartmentBudgetSchoolDepartmentBudgetProjectmxResult">
select a.id, a.instance_id, a.year, a.dept_id, a.dept_name, a.informant_id, a.informant, a.leadership_id, a.leadership_name, a.remark, a.tb_time, a.state, a.apply_id, a.apply_name, a.apply_time, a.create_by_id, a.create_by, a.create_time, a.update_by_id, a.update_by, a.update_time,
b.id as sub_id, b.department_budget_id as sub_department_budget_id, b.project_name as sub_project_name, b.content as sub_content, b.project_expenditures as sub_project_expenditures, b.is_government_purchase as sub_is_government_purchase, b.apply_money as sub_apply_money, b.remark as sub_remark
from school_department_budget a
left join school_department_budget_projectmx b on b.department_budget_id = a.id
where a.id = #{id}
</select>
<insert id="insertSchoolDepartmentBudget" parameterType="SchoolDepartmentBudgetVo" useGeneratedKeys="true" keyProperty="id">
insert into school_department_budget
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null">instance_id,</if>
<if test="year != null and year != ''">year,</if>
<if test="deptId != null">dept_id,dept_name,</if>
<if test="informantId != null">informant_id,informant,</if>
<if test="leadershipId != null">leadership_id,leadership_name,</if>
<if test="remark != null">remark,</if>
<if test="tbTime != null">tb_time,</if>
state,
<if test="applyId != null">apply_id,apply_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="createById != null">create_by_id,create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateById != null">update_by_id,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null">#{instanceId},</if>
<if test="year != null and year != ''">#{year},</if>
<if test="deptId != null">#{deptId},(select dept_name from sys_dept where dept_id = #{deptId}),</if>
<if test="informantId != null">#{informantId},(select user_name from sys_user where user_id = #{informantId}),</if>
<if test="leadershipId != null">#{leadershipId},(select user_name from sys_user where user_id = #{leadershipId}),</if>
<if test="remark != null">#{remark},</if>
<if test="tbTime != null">#{tbTime},</if>
'0',
<if test="applyId != null">#{applyId},(select user_name from sys_user where user_id = #{applyId}),</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="createById != null">#{createById},(select user_name from sys_user where user_id = #{createById}),</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateById != null">#{updateById},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolDepartmentBudget" parameterType="SchoolDepartmentBudgetVo">
update school_department_budget
<trim prefix="SET" suffixOverrides=",">
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="year != null and year != ''">year = #{year},</if>
<if test="deptId != null">dept_id = #{deptId},dept_name = (select dept_name from sys_dept where dept_id = #{deptId}),</if>
<if test="informantId != null">informant_id = #{informantId},informant = (select user_name from sys_user where user_id = #{informantId}),</if>
<if test="leadershipId != null">leadership_id = #{leadershipId},leadership_name = (select user_name from sys_user where user_id = #{leadershipId}),</if>
<if test="remark != null">remark = #{remark},</if>
<if test="tbTime != null">tb_time = #{tbTime},</if>
<if test="state != null and state != ''">state = #{state},</if>
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="applyName != null and applyName != ''">apply_name = #{applyName},</if>
<if test="applyTime != null and applyTime != ''">apply_time = #{applyTime},</if>
<if test="createById != null">create_by_id = #{createById},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateById != null">update_by_id = #{updateById},update_by = (select user_name from sys_user where user_id = #{updateById}),</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolDepartmentBudgetById" parameterType="Long">
delete from school_department_budget where id = #{id}
</delete>
<delete id="deleteSchoolDepartmentBudgetByIds" parameterType="String">
delete from school_department_budget where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetIds" parameterType="String">
delete from school_department_budget_projectmx where department_budget_id in
<foreach item="departmentBudgetId" collection="array" open="(" separator="," close=")">
#{departmentBudgetId}
</foreach>
</delete>
<delete id="deleteSchoolDepartmentBudgetProjectmxByDepartmentBudgetId" parameterType="Long">
delete from school_department_budget_projectmx where department_budget_id = #{departmentBudgetId}
</delete>
<insert id="batchSchoolDepartmentBudgetProjectmx">
insert into school_department_budget_projectmx( id, department_budget_id, project_name, content, project_expenditures, is_government_purchase, apply_money, remark) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.departmentBudgetId}, #{item.projectName}, #{item.content}, #{item.projectExpenditures}, #{item.isGovernmentPurchase}, #{item.applyMoney}, #{item.remark})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolDepartmentBudget.SchoolDepartmentBudgetProjectmxMapper">
<resultMap type="SchoolDepartmentBudgetProjectmx" id="SchoolDepartmentBudgetProjectmxResult">
<result property="id" column="id" />
<result property="year" column="year" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="departmentBudgetId" column="department_budget_id" />
<result property="projectName" column="project_name" />
<result property="content" column="content" />
<result property="projectExpenditures" column="project_expenditures" />
<result property="isGovernmentPurchase" column="is_government_purchase" />
<result property="applyMoney" column="apply_money" />
<result property="remark" column="remark" />
<result property="informantId" column="informant_id" />
<result property="informant" column="informant" />
<result property="leadershipId" column="leadership_id" />
<result property="leadershipName" column="leadership_name" />
</resultMap>
<sql id="selectSchoolDepartmentBudgetProjectmxVo">
select id, department_budget_id, project_name, content, project_expenditures, is_government_purchase, apply_money, remark from school_department_budget_projectmx
</sql>
<select id="selectList" parameterType="SchoolDepartmentBudgetProjectmx" resultMap="SchoolDepartmentBudgetProjectmxResult">
select p.id, d.year, d.dept_id, d.dept_name, p.department_budget_id, p.project_name,
p.content, p.project_expenditures, p.is_government_purchase, p.apply_money, p.remark
from school_department_budget_projectmx p left join school_department_budget d on p.department_budget_id = d.id
<where>
d.state = '2'
<if test="year != null and year != ''"> and d.year = #{year}</if>
<if test="projectName != null and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
<if test="isGovernmentPurchase != null and isGovernmentPurchase != ''"> and p.is_government_purchase = #{isGovernmentPurchase}</if>
</where>
</select>
<select id="selectSchoolDepartmentBudgetProjectmxById" parameterType="Long" resultMap="SchoolDepartmentBudgetProjectmxResult">
select p.id, d.year, d.dept_id, d.dept_name, p.department_budget_id, p.project_name, p.content, p.project_expenditures,
p.is_government_purchase, p.apply_money, p.remark, d.informant_id, d.informant, d.leadership_id, d.leadership_name
from school_department_budget_projectmx p left join school_department_budget d on p.department_budget_id = d.id
where p.id = #{id}
</select>
<select id="selectSchoolDepartmentBudgetProjectmxList" parameterType="SchoolDepartmentBudgetProjectmx" resultMap="SchoolDepartmentBudgetProjectmxResult">
<include refid="selectSchoolDepartmentBudgetProjectmxVo"/>
<where>
<if test="departmentBudgetId != null "> and department_budget_id = #{departmentBudgetId}</if>
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="projectExpenditures != null and projectExpenditures != ''"> and project_expenditures = #{projectExpenditures}</if>
<if test="isGovernmentPurchase != null and isGovernmentPurchase != ''"> and is_government_purchase = #{isGovernmentPurchase}</if>
<if test="applyMoney != null "> and apply_money = #{applyMoney}</if>
</where>
</select>
<insert id="insertSchoolDepartmentBudgetProjectmx" parameterType="SchoolDepartmentBudgetProjectmx">
insert into school_department_budget_projectmx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="departmentBudgetId != null">department_budget_id,</if>
<if test="projectName != null and projectName != ''">project_name,</if>
<if test="content != null and content != ''">content,</if>
<if test="projectExpenditures != null and projectExpenditures != ''">project_expenditures,</if>
<if test="isGovernmentPurchase != null and isGovernmentPurchase != ''">is_government_purchase,</if>
<if test="applyMoney != null">apply_money,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="departmentBudgetId != null">#{departmentBudgetId},</if>
<if test="projectName != null and projectName != ''">#{projectName},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="projectExpenditures != null and projectExpenditures != ''">#{projectExpenditures},</if>
<if test="isGovernmentPurchase != null and isGovernmentPurchase != ''">#{isGovernmentPurchase},</if>
<if test="applyMoney != null">#{applyMoney},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSchoolDepartmentBudgetProjectmx" parameterType="SchoolDepartmentBudgetProjectmx">
update school_department_budget_projectmx
<trim prefix="SET" suffixOverrides=",">
<if test="departmentBudgetId != null">department_budget_id = #{departmentBudgetId},</if>
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="projectExpenditures != null and projectExpenditures != ''">project_expenditures = #{projectExpenditures},</if>
<if test="isGovernmentPurchase != null and isGovernmentPurchase != ''">is_government_purchase = #{isGovernmentPurchase},</if>
<if test="applyMoney != null">apply_money = #{applyMoney},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolDepartmentBudgetProjectmxById" parameterType="Long">
delete from school_department_budget_projectmx where id = #{id}
</delete>
<delete id="deleteSchoolDepartmentBudgetProjectmxByIds" parameterType="String">
delete from school_department_budget_projectmx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioAppointmentMapper">
<resultMap type="SchoolStudioAppointment" id="SchoolStudioAppointmentResult">
<result property="id" column="id" />
<result property="studioId" column="studio_id" />
<result property="studioName" column="studio_name" />
<result property="appointmentTime" column="appointment_time" />
<result property="appointmentJc" column="appointment_jc" />
<result property="studioContent" column="studio_content" />
<result property="appointmentUserId" column="appointment_user_id" />
<result property="appointmentUserName" column="appointment_user_name" />
<result property="applyTime" column="apply_time" />
<result property="statu" column="statu" />
</resultMap>
<sql id="selectSchoolStudioAppointmentVo">
select id, studio_id, studio_name, appointment_time, appointment_jc, studio_content, appointment_user_id, appointment_user_name, apply_time, statu from school_studio_appointment
</sql>
<select id="selectSchoolStudioAppointmentList" parameterType="SchoolStudioAppointment" resultMap="SchoolStudioAppointmentResult">
<include refid="selectSchoolStudioAppointmentVo"/>
<where>
<if test="studioId != null "> and studio_id = #{studioId}</if>
<if test="studioName != null and studioName != ''"> and studio_name like concat('%', #{studioName}, '%')</if>
<if test="appointmentTime != null "> and appointment_time = #{appointmentTime}</if>
<if test="appointmentJc != null and appointmentJc != ''"> and appointment_jc = #{appointmentJc}</if>
<if test="studioContent != null and studioContent != ''"> and studio_content like concat('%', #{studioContent}, '%')</if>
<if test="appointmentUserId != null "> and appointment_user_id = #{appointmentUserId}</if>
<if test="appointmentUserName != null and appointmentUserName != ''"> and appointment_user_name like concat('%', #{appointmentUserName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="statu != null and statu != ''"> and statu = #{statu}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(appointment_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
</select>
<select id="selectSchoolStudioAppointmentById" parameterType="Long" resultMap="SchoolStudioAppointmentResult">
<include refid="selectSchoolStudioAppointmentVo"/>
where id = #{id}
</select>
<insert id="insertSchoolStudioAppointment" parameterType="SchoolStudioAppointment" useGeneratedKeys="true" keyProperty="id">
insert into school_studio_appointment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="studioId != null">studio_id,studio_name,</if>
<if test="appointmentTime != null">appointment_time,</if>
<if test="appointmentJc != null and appointmentJc != ''">appointment_jc,</if>
<if test="studioContent != null">studio_content,</if>
<if test="appointmentUserId != null">appointment_user_id,</if>
<if test="appointmentUserName != null and appointmentUserName != ''">appointment_user_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="statu != null and statu != ''">statu,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="studioId != null">#{studioId},(select studio_name from school_studio where id = #{studioId}),</if>
<if test="appointmentTime != null">#{appointmentTime},</if>
<if test="appointmentJc != null and appointmentJc != ''">#{appointmentJc},</if>
<if test="studioContent != null">#{studioContent},</if>
<if test="appointmentUserId != null">#{appointmentUserId},</if>
<if test="appointmentUserName != null and appointmentUserName != ''">#{appointmentUserName},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="statu != null and statu != ''">#{statu},</if>
</trim>
</insert>
<update id="updateSchoolStudioAppointment" parameterType="SchoolStudioAppointment">
update school_studio_appointment
<trim prefix="SET" suffixOverrides=",">
<if test="studioId != null">studio_id = #{studioId},studio_name = (select studio_name from school_studio where id = #{studioId}),</if>
<if test="appointmentTime != null">appointment_time = #{appointmentTime},</if>
<if test="appointmentJc != null and appointmentJc != ''">appointment_jc = #{appointmentJc},</if>
<if test="studioContent != null">studio_content = #{studioContent},</if>
<if test="appointmentUserId != null">appointment_user_id = #{appointmentUserId},</if>
<if test="appointmentUserName != null and appointmentUserName != ''">appointment_user_name = #{appointmentUserName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="statu != null and statu != ''">statu = #{statu},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolStudioAppointmentById" parameterType="Long">
delete from school_studio_appointment where id = #{id}
</delete>
<delete id="deleteSchoolStudioAppointmentByIds" parameterType="String">
delete from school_studio_appointment where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioMapper">
<resultMap type="SchoolStudio" id="SchoolStudioResult">
<result property="id" column="id" />
<result property="studioName" column="studio_name" />
<result property="studioArea" column="studio_area" />
<result property="studioStatu" column="studio_statu" />
<result property="createById" column="create_by_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateById" column="update_by_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlg" column="del_flg" />
</resultMap>
<sql id="selectSchoolStudioVo">
select id, studio_name, studio_area, studio_statu, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flg from school_studio
</sql>
<select id="selectSchoolStudioList" parameterType="SchoolStudio" resultMap="SchoolStudioResult">
<include refid="selectSchoolStudioVo"/>
<where>
del_flg = '0'
<if test="studioName != null and studioName != ''"> and studio_name like concat('%', #{studioName}, '%')</if>
<if test="studioArea != null and studioArea != ''"> and studio_area like concat('%', #{studioArea}, '%')</if>
<if test="studioStatu != null and studioStatu != ''"> and studio_statu = #{studioStatu}</if>
<if test="createById != null "> and create_by_id = #{createById}</if>
<if test="updateById != null "> and update_by_id = #{updateById}</if>
</where>
</select>
<select id="selectSchoolStudioById" parameterType="Long" resultMap="SchoolStudioResult">
<include refid="selectSchoolStudioVo"/>
where id = #{id}
</select>
<insert id="insertSchoolStudio" parameterType="SchoolStudio" useGeneratedKeys="true" keyProperty="id">
insert into school_studio
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="studioName != null and studioName != ''">studio_name,</if>
<if test="studioArea != null and studioArea != ''">studio_area,</if>
<if test="studioStatu != null and studioStatu != ''">studio_statu,</if>
<if test="createById != null">create_by_id,create_by,</if>
<if test="createTime != null">create_time,</if>
del_flg,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="studioName != null and studioName != ''">#{studioName},</if>
<if test="studioArea != null and studioArea != ''">#{studioArea},</if>
<if test="studioStatu != null and studioStatu != ''">#{studioStatu},</if>
<if test="createById != null">#{createById},(select user_name from sys_user where user_id = #{createById}),</if>
<if test="createTime != null">#{createTime},</if>
'0',
</trim>
</insert>
<update id="updateSchoolStudio" parameterType="SchoolStudio">
update school_studio
<trim prefix="SET" suffixOverrides=",">
<if test="studioName != null and studioName != ''">studio_name = #{studioName},</if>
<if test="studioArea != null and studioArea != ''">studio_area = #{studioArea},</if>
<if test="studioStatu != null and studioStatu != ''">studio_statu = #{studioStatu},</if>
<if test="updateById != null">update_by_id = #{updateById},update_by = (select user_name from sys_user where user_id = #{updateById}),</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlg != null and delFlg != ''">del_flg = #{delFlg},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolStudioByIds" parameterType="String">
update school_studio set del_flg = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolStudio.SchoolStudioUseMapper">
<resultMap type="SchoolStudioUse" id="SchoolStudioUseResult">
<result property="id" column="id" />
<result property="appointmentId" column="appointment_id" />
<result property="studioId" column="studio_id" />
<result property="studioName" column="studio_name" />
<result property="useDate" column="use_date" />
<result property="useJc" column="use_jc" />
<result property="useUserId" column="use_user_id" />
<result property="useUserName" column="use_user_name" />
</resultMap>
<sql id="selectSchoolStudioUseVo">
select id,appointment_id, studio_id, studio_name, use_date, use_jc, use_user_id, use_user_name from school_studio_use
</sql>
<!--录播室使用情况统计-->
<select id="selectStudioUse" parameterType="SchoolStudioUse" resultMap="SchoolStudioUseResult">
<include refid="selectSchoolStudioUseVo"/>
<where>
<if test="studioId != null "> and studio_id = #{studioId}</if>
<if test="startTime != null and startTime != ''"> and use_date BETWEEN #{startTime} AND DATE_ADD(#{startTime}, INTERVAL 9 DAY)</if>
</where>
</select>
<select id="selectSchoolStudioUseList" parameterType="SchoolStudioUse" resultMap="SchoolStudioUseResult">
<include refid="selectSchoolStudioUseVo"/>
<where>
<if test="studioId != null "> and studio_id = #{studioId}</if>
<if test="studioName != null and studioName != ''"> and studio_name like concat('%', #{studioName}, '%')</if>
<if test="useDate != null "> and use_date = #{useDate}</if>
<if test="useJc != null and useJc != ''"> and use_jc = #{useJc}</if>
<if test="useUserId != null "> and use_user_id = #{useUserId}</if>
<if test="useUserName != null and useUserName != ''"> and use_user_name like concat('%', #{useUserName}, '%')</if>
</where>
</select>
<select id="selectSchoolStudioUseById" parameterType="Long" resultMap="SchoolStudioUseResult">
<include refid="selectSchoolStudioUseVo"/>
where id = #{id}
</select>
<insert id="insertSchoolStudioUse" parameterType="SchoolStudioUse" useGeneratedKeys="true" keyProperty="id">
insert into school_studio_use
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appointmentId != null">appointment_id,</if>
<if test="studioId != null">studio_id,studio_name,</if>
<if test="useDate != null">use_date,</if>
<if test="useJc != null and useJc != ''">use_jc,</if>
<if test="useUserId != null">use_user_id,</if>
<if test="useUserName != null">use_user_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="appointmentId != null">#{appointmentId},</if>
<if test="studioId != null">#{studioId},(select studio_name from school_studio where id = #{studioId}),</if>
<if test="useDate != null">#{useDate},</if>
<if test="useJc != null and useJc != ''">#{useJc},</if>
<if test="useUserId != null">#{useUserId},</if>
<if test="useUserName != null">#{useUserName},</if>
</trim>
</insert>
<update id="updateSchoolStudioUse" parameterType="SchoolStudioUse">
update school_studio_use
<trim prefix="SET" suffixOverrides=",">
<if test="studioId != null">studio_id = #{studioId},studio_name = (select studio_name from school_studio where id = #{studioId}),</if>
<if test="useDate != null">use_date = #{useDate},</if>
<if test="useJc != null and useJc != ''">use_jc = #{useJc},</if>
<if test="useUserId != null">use_user_id = #{useUserId},</if>
<if test="useUserName != null">use_user_name = #{useUserName},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolStudioUseById" parameterType="Long">
delete from school_studio_use where id = #{id}
</delete>
<delete id="deleteSchoolStudioUseByIds" parameterType="String">
delete from school_studio_use where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteSchoolStudioUseByAppId" parameterType="Long">
delete from school_studio_use where appointment_id = #{appId}
</delete>
</mapper>
\ No newline at end of file
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