一日流程评估计划名称自动获取&一日流程评估班级教师获取

This commit is contained in:
sk1551 2021-02-22 18:10:02 +08:00
parent 05af626470
commit acdd617cbd
6 changed files with 194 additions and 38 deletions

View File

@ -7,22 +7,29 @@
label-width="70px" label-width="70px"
> >
<el-form-item label="所属计划" prop="planid"> <el-form-item label="所属计划" prop="planid">
<el-input <el-select v-model="form.planid" placeholder="请选择评估计划">
v-model="queryParams.planid" <el-option
placeholder="请输入所属计划" v-for="dict in dayflowassessmentplanOptions"
clearable :key="dict.id"
size="small" :label="dict.name"
@keyup.enter.native="handleQuery" :value="dict.id"
/> ></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="班级编号" prop="classid"> <el-form-item label="班级编号" prop="classid">
<el-input <el-select
v-model="queryParams.classid" v-model="queryParams.classid"
placeholder="请输入班级编号"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" placeholder="请选择班级"
/> >
<el-option
v-for="dict in classOptions"
:key="dict.bjbh"
:label="dict.bjmc"
:value="dict.bjbh"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="学年学期" prop="xnxq"> <el-form-item label="学年学期" prop="xnxq">
<el-input <el-input
@ -88,22 +95,21 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column label="所属计划" align="center" prop="planid" /> <el-table-column label="所属计划" align="center" prop="planid" />
<!-- <el-table-column label="学校编号" align="center" prop="deptId" /> --> <el-table-column
<el-table-column label="班级编号" align="center" prop="classid" /> label="班级编号"
<!-- <el-table-column label="班长编号" align="center" prop="bzbh" /> --> align="center"
prop="classid"
:formatter="classFormat"
/>
<el-table-column label="班长姓名" align="center" prop="bzxm" /> <el-table-column label="班长姓名" align="center" prop="bzxm" />
<!-- <el-table-column label="配班教师" align="center" prop="pbbh" /> -->
<el-table-column label="配班教师姓名" align="center" prop="pbxm" /> <el-table-column label="配班教师姓名" align="center" prop="pbxm" />
<!-- <el-table-column label="助理教师" align="center" prop="zlbh" /> -->
<el-table-column label="助理教师姓名" align="center" prop="zlxm" /> <el-table-column label="助理教师姓名" align="center" prop="zlxm" />
<el-table-column label="学年学期" align="center" prop="xnxq" /> <el-table-column label="学年学期" align="center" prop="xnxq" />
<el-table-column label="评估标准编号" align="center" prop="bzid" /> <el-table-column label="评估标准编号" align="center" prop="bzid" />
<el-table-column label="扣分值" align="center" prop="kfz" /> <el-table-column label="扣分值" align="center" prop="kfz" />
<el-table-column label="扣分次数" align="center" prop="kfcs" /> <el-table-column label="扣分次数" align="center" prop="kfcs" />
<el-table-column label="评估对象" align="center" prop="pgdx" /> <el-table-column label="评估对象" align="center" prop="pgdx" />
<!-- <el-table-column label="执行人" align="center" prop="createUserid" /> -->
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -142,31 +148,79 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属计划" prop="planid"> <el-form-item label="所属计划" prop="planid">
<el-input v-model="form.planid" placeholder="请输入所属计划" /> <el-select
</el-form-item> v-model="form.planid"
<el-form-item label="学校编号" prop="deptId"> filterable
<el-input v-model="form.deptId" placeholder="请输入学校编号" /> placeholder="请选择评估计划"
>
<el-option
v-for="dict in dayflowassessmentplanOptions"
:key="dict.id"
:label="dict.name"
:value="dict.id"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="班级编号" prop="classid"> <el-form-item label="班级编号" prop="classid">
<el-input v-model="form.classid" placeholder="请输入班级编号" /> <el-select
v-model="queryParams.classid"
clearable
filterable
size="small"
placeholder="请选择班级"
>
<el-option
v-for="dict in classOptions"
:key="dict.bjbh"
:label="dict.bjmc"
:value="dict.bjbh"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="班长编号" prop="bzbh"> <el-form-item label="班长编号" prop="bzbh">
<el-input v-model="form.bzbh" placeholder="请输入班长编号" /> <el-select
</el-form-item> v-model="queryParams.bzbh"
<el-form-item label="班长姓名" prop="bzxm"> filterable
<el-input v-model="form.bzxm" placeholder="请输入班长姓名" /> placeholder="请选择主班教师"
>
<el-option
v-for="item in zbjsOptions"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="配班教师" prop="pbbh"> <el-form-item label="配班教师" prop="pbbh">
<el-input v-model="form.pbbh" placeholder="请输入配班教师" /> <el-select
</el-form-item> v-model="queryParams.pbbh"
<el-form-item label="配班教师姓名" prop="pbxm"> filterable
<el-input v-model="form.pbxm" placeholder="请输入配班教师姓名" /> placeholder="请选择配班教师"
>
<el-option
v-for="item in pbjsOptions"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="助理教师" prop="zlbh"> <el-form-item label="助理教师" prop="zlbh">
<el-input v-model="form.zlbh" placeholder="请输入助理教师" /> <el-select
</el-form-item> v-model="queryParams.zlbh"
<el-form-item label="助理教师姓名" prop="zlxm"> filterable
<el-input v-model="form.zlxm" placeholder="请输入助理教师姓名" /> placeholder="请选择助理教师"
>
<el-option
v-for="item in zljsOptions"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="评估学年学期" prop="xnxq"> <el-form-item label="评估学年学期" prop="xnxq">
<el-input v-model="form.xnxq" placeholder="请输入评估学年学期" /> <el-input v-model="form.xnxq" placeholder="请输入评估学年学期" />
@ -203,6 +257,12 @@ import {
addDayflowassessment, addDayflowassessment,
updateDayflowassessment, updateDayflowassessment,
} from "@/api/benyi/dayflowassessment"; } from "@/api/benyi/dayflowassessment";
import {
listDayflowassessmentplan,
getDayflowassessmentplan,
} from "@/api/benyi/dayflowassessmentplan";
import { listClass } from "@/api/system/class";
import { getUsersByRoleId } from "@/api/system/user";
export default { export default {
name: "Dayflowassessment", name: "Dayflowassessment",
@ -220,6 +280,16 @@ export default {
total: 0, total: 0,
// //
dayflowassessmentList: [], dayflowassessmentList: [],
//
dayflowassessmentplanOptions: [],
//
classOptions: [],
//
zbjsOptions: [],
//
pbjsOptions: [],
//
zljsOptions: [],
// //
title: "", title: "",
// //
@ -252,6 +322,14 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getClassList();
this.getDayflowassessmentplan();
//
getUsersByRoleId().then((response) => {
this.zbjsOptions = response.zbjs;
this.pbjsOptions = response.pbjs;
this.zljsOptions = response.zljs;
});
}, },
methods: { methods: {
/** 查询幼儿园一日流程评估列表 */ /** 查询幼儿园一日流程评估列表 */
@ -263,6 +341,31 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 查询一日流程评估计划列表 */
getDayflowassessmentplan() {
listDayflowassessmentplan(null).then((response) => {
this.dayflowassessmentplanOptions = response.rows;
console.log(this.dayflowassessmentplanOptions);
});
},
//
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
//
classFormat(row, column) {
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
}
});
return actions.join("");
},
// //
cancel() { cancel() {
this.open = false; this.open = false;

View File

@ -110,6 +110,7 @@
<span>{{ parseTime(scope.row.month, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.month, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="计划名称" align="center" prop="name" />
<el-table-column <el-table-column
label="评估学年学期" label="评估学年学期"
align="center" align="center"
@ -266,6 +267,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: undefined,
deptId: undefined, deptId: undefined,
month: undefined, month: undefined,
xnxq: undefined, xnxq: undefined,
@ -321,7 +323,6 @@ export default {
}, },
// //
classFormat(row, column) { classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = []; var actions = [];
var datas = this.classOptions; var datas = this.classOptions;
Object.keys(datas).map((key) => { Object.keys(datas).map((key) => {
@ -361,6 +362,7 @@ export default {
reset() { reset() {
this.form = { this.form = {
id: undefined, id: undefined,
name: undefined,
deptId: undefined, deptId: undefined,
month: undefined, month: undefined,
xnxq: undefined, xnxq: undefined,

View File

@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -72,6 +73,7 @@ public class ByDayflowassessmentController extends BaseController {
@Log(title = "幼儿园一日流程评估", businessType = BusinessType.INSERT) @Log(title = "幼儿园一日流程评估", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByDayflowassessment byDayflowassessment) { public AjaxResult add(@RequestBody ByDayflowassessment byDayflowassessment) {
byDayflowassessment.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
return toAjax(byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment)); return toAjax(byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment));
} }

View File

@ -3,6 +3,10 @@ package com.ruoyi.project.benyi.controller;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.service.IByDayFlowDetailService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.ISysDictDataService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -33,6 +37,14 @@ import com.ruoyi.framework.web.page.TableDataInfo;
public class ByDayflowassessmentplanController extends BaseController { public class ByDayflowassessmentplanController extends BaseController {
@Autowired @Autowired
private IByDayflowassessmentplanService byDayflowassessmentplanService; private IByDayflowassessmentplanService byDayflowassessmentplanService;
@Autowired
private IByClassService byClassService;
@Autowired
private ISysDictDataService sysDictDataService;
@Autowired
private IByDayFlowDetailService byDayFlowDetailService;
@Autowired
private SchoolCommon schoolCommon;
/** /**
* 查询幼儿园一日流程评估计划列表 * 查询幼儿园一日流程评估计划列表
@ -73,8 +85,16 @@ public class ByDayflowassessmentplanController extends BaseController {
@Log(title = "幼儿园一日流程评估计划", businessType = BusinessType.INSERT) @Log(title = "幼儿园一日流程评估计划", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody ByDayflowassessmentplan byDayflowassessmentplan) { public AjaxResult add(@RequestBody ByDayflowassessmentplan byDayflowassessmentplan) {
// 通过班级id 查询班级名称
String classId = byDayflowassessmentplan.getClassid();
// 通过内容id查询一日流程内容
Long connentId = Long.parseLong(byDayflowassessmentplan.getConnent());
// 通过学年学期查询学期名称
String dict_type = "sys_xnxq";
String dict_value = byDayflowassessmentplan.getXnxq();
byDayflowassessmentplan.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId()); byDayflowassessmentplan.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
byDayflowassessmentplan.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId()); byDayflowassessmentplan.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byDayflowassessmentplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-" + sysDictDataService.selectDictLabel(dict_type, dict_value) + "-" + byDayFlowDetailService.selectByDayFlowDetailById(connentId).getName() + "-" + "评估计划" );
return toAjax(byDayflowassessmentplanService.insertByDayflowassessmentplan(byDayflowassessmentplan)); return toAjax(byDayflowassessmentplanService.insertByDayflowassessmentplan(byDayflowassessmentplan));
} }
@ -85,6 +105,16 @@ public class ByDayflowassessmentplanController extends BaseController {
@Log(title = "幼儿园一日流程评估计划", businessType = BusinessType.UPDATE) @Log(title = "幼儿园一日流程评估计划", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody ByDayflowassessmentplan byDayflowassessmentplan) { public AjaxResult edit(@RequestBody ByDayflowassessmentplan byDayflowassessmentplan) {
// 通过班级id 查询班级名称
String classId = byDayflowassessmentplan.getClassid();
// 通过内容id查询一日流程内容
Long connentId = Long.parseLong(byDayflowassessmentplan.getConnent());
// 通过学年学期查询学期名称
String dict_type = "sys_xnxq";
String dict_value = byDayflowassessmentplan.getXnxq();
byDayflowassessmentplan.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
byDayflowassessmentplan.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byDayflowassessmentplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-" + sysDictDataService.selectDictLabel(dict_type, dict_value) + "-" + byDayFlowDetailService.selectByDayFlowDetailById(connentId).getName() + "-" + "评估计划" );
return toAjax(byDayflowassessmentplanService.updateByDayflowassessmentplan(byDayflowassessmentplan)); return toAjax(byDayflowassessmentplanService.updateByDayflowassessmentplan(byDayflowassessmentplan));
} }

View File

@ -22,6 +22,11 @@ public class ByDayflowassessmentplan extends BaseEntity {
*/ */
private Long id; private Long id;
/**
* 计划名称
*/
private String name;
/** /**
* 评估学校 * 评估学校
*/ */
@ -134,6 +139,7 @@ public class ByDayflowassessmentplan extends BaseEntity {
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("name", getName())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("month", getMonth()) .append("month", getMonth())
.append("xnxq", getXnxq()) .append("xnxq", getXnxq())
@ -144,4 +150,12 @@ public class ByDayflowassessmentplan extends BaseEntity {
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.toString(); .toString();
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} }

View File

@ -6,6 +6,7 @@
<resultMap type="ByDayflowassessmentplan" id="ByDayflowassessmentplanResult"> <resultMap type="ByDayflowassessmentplan" id="ByDayflowassessmentplanResult">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="name" column="name"/>
<result property="deptId" column="dept_id"/> <result property="deptId" column="dept_id"/>
<result property="month" column="month"/> <result property="month" column="month"/>
<result property="xnxq" column="xnxq"/> <result property="xnxq" column="xnxq"/>
@ -17,13 +18,14 @@
</resultMap> </resultMap>
<sql id="selectByDayflowassessmentplanVo"> <sql id="selectByDayflowassessmentplanVo">
select id, dept_id, month, xnxq, classid, connent, starttime, create_userid, create_time from by_dayflowassessmentplan select id, name, dept_id, month, xnxq, classid, connent, starttime, create_userid, create_time from by_dayflowassessmentplan
</sql> </sql>
<select id="selectByDayflowassessmentplanList" parameterType="ByDayflowassessmentplan" <select id="selectByDayflowassessmentplanList" parameterType="ByDayflowassessmentplan"
resultMap="ByDayflowassessmentplanResult"> resultMap="ByDayflowassessmentplanResult">
<include refid="selectByDayflowassessmentplanVo"/> <include refid="selectByDayflowassessmentplanVo"/>
<where> <where>
<if test="name != null and name != ''">and name = #{name}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if> <if test="deptId != null ">and dept_id = #{deptId}</if>
<if test="month != null ">and date_format(starttime,'%Y-%m') = date_format(#{month},'%Y-%m')</if> <if test="month != null ">and date_format(starttime,'%Y-%m') = date_format(#{month},'%Y-%m')</if>
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if> <if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
@ -43,6 +45,7 @@
keyProperty="id"> keyProperty="id">
insert into by_dayflowassessmentplan insert into by_dayflowassessmentplan
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="deptId != null ">dept_id,</if> <if test="deptId != null ">dept_id,</if>
<if test="month != null ">month,</if> <if test="month != null ">month,</if>
<if test="xnxq != null and xnxq != ''">xnxq,</if> <if test="xnxq != null and xnxq != ''">xnxq,</if>
@ -53,6 +56,7 @@
<if test="createTime != null ">create_time,</if> <if test="createTime != null ">create_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="deptId != null ">#{deptId},</if> <if test="deptId != null ">#{deptId},</if>
<if test="month != null ">#{month},</if> <if test="month != null ">#{month},</if>
<if test="xnxq != null and xnxq != ''">#{xnxq},</if> <if test="xnxq != null and xnxq != ''">#{xnxq},</if>
@ -67,6 +71,7 @@
<update id="updateByDayflowassessmentplan" parameterType="ByDayflowassessmentplan"> <update id="updateByDayflowassessmentplan" parameterType="ByDayflowassessmentplan">
update by_dayflowassessmentplan update by_dayflowassessmentplan
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="deptId != null ">dept_id = #{deptId},</if> <if test="deptId != null ">dept_id = #{deptId},</if>
<if test="month != null ">month = #{month},</if> <if test="month != null ">month = #{month},</if>
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if> <if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>