一日流程评估页面

This commit is contained in:
sk1551 2021-02-25 17:53:31 +08:00
parent 728dd00a97
commit b65757c8bf
10 changed files with 195 additions and 69 deletions

View File

@ -454,6 +454,21 @@ export const constantRoutes = [{
}
}]
},
{
path: '/benyi/dayflowassessment',
component: Layout,
hidden: true,
children: [{
path: 'teacher/:id(\\d+)',
component: () =>
import ('@/views/benyi/dayflowassessment/teacher'),
name: 'dayflowassessmentteacher',
meta: {
title: '一日流程评估详情',
icon: ''
}
}]
},
{
path: '/benyi/assessmentchild',
component: Layout,

View File

@ -177,6 +177,7 @@ export default {
taskCode: undefined,
standardTitle: undefined,
standardSort: undefined,
score: undefined,
createuser: undefined,
createtime: undefined,
updateuser: undefined,
@ -237,6 +238,7 @@ export default {
taskCode: undefined,
standardTitle: undefined,
standardSort: 0,
score: undefined,
createuser: undefined,
createtime: undefined,
updateuser: undefined,

View File

@ -55,41 +55,6 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['benyi:dayflowassessment:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['benyi:dayflowassessment:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['benyi:dayflowassessment:remove']"
>删除</el-button
>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="dayflowassessmentList"
@ -103,13 +68,15 @@
prop="classid"
:formatter="classFormat"
/>
<el-table-column label="班长姓名" align="center" prop="bzbh" :formatter="bzbhFormat" />
<el-table-column label="配班教师姓名" align="center" prop="pbbh" :formatter="pbbhFormat"/>
<el-table-column label="助理教师姓名" align="center" prop="zlbh" :formatter="zlbhFormat"/>
<el-table-column label="主班教师" align="center" prop="bzbh" :formatter="bzbhFormat" />
<el-table-column label="配班教师" align="center" prop="pbbh" :formatter="pbbhFormat"/>
<el-table-column label="助理教师" align="center" prop="zlbh" :formatter="zlbhFormat"/>
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat"/>
<el-table-column label="评估标准编号" align="center" prop="bzid" />
<el-table-column label="评估标准" align="center" prop="bzid" :formatter="dayFlowFormat"/>
<el-table-column label="标准满分" align="center" prop="bzmf" />
<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="zzdf" />
<el-table-column label="评估对象" align="center" prop="pgdx" :formatter="pgdxFormat"/>
<el-table-column
label="操作"
@ -121,18 +88,18 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleAssessment(scope.row)"
v-hasPermi="['benyi:dayflowassessment:edit']"
>修改</el-button
>评估</el-button
>
<el-button
<!-- <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:dayflowassessment:remove']"
>删除</el-button
>
> -->
</template>
</el-table-column>
</el-table>
@ -238,9 +205,9 @@
<el-form-item label="扣分值" prop="kfz">
<el-input v-model="form.kfz" placeholder="请输入扣分值" />
</el-form-item>
<el-form-item label="扣分次数" prop="kfcs">
<!-- <el-form-item label="扣分次数" prop="kfcs">
<el-input v-model="form.kfcs" placeholder="请输入扣分次数" />
</el-form-item>
</el-form-item> -->
<el-form-item label="评估对象" prop="pgdx">
<el-select
v-model="form.pgdx"
@ -281,6 +248,7 @@ import { listDayflowassessmentplan, getDayflowassessmentplan, } from "@/api/beny
import { listClass } from "@/api/system/class";
import { getUsersByRoleId } from "@/api/system/user";
import { listUser } from "@/api/system/user";
import { listDetail, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
export default {
name: "Dayflowassessment",
@ -312,6 +280,8 @@ export default {
xnxqOptions: [],
//
userOptions: [],
//
detailOptions: [],
//
title: "",
//
@ -332,6 +302,8 @@ export default {
xnxq: undefined,
bzid: undefined,
kfz: undefined,
bzmf: undefined,
zzdf: undefined,
kfcs: undefined,
pgdx: undefined,
createUserid: undefined,
@ -346,6 +318,7 @@ export default {
this.getList();
this.getClassList();
this.getUserList();
this.getDayFlowList();
this.getDayflowassessmentplan();
//
getUsersByRoleId().then((response) => {
@ -456,7 +429,6 @@ export default {
planFormat(row, column) {
var actions = [];
var datas = this.dayflowassessmentplanOptions;
console.log(this.dayflowassessmentplanOptions);
Object.keys(datas).map((key) => {
if (datas[key].id == "" + row.planid) {
actions.push(datas[key].name);
@ -465,6 +437,25 @@ export default {
});
return actions.join("");
},
/** 查询一日流程列表 */
getDayFlowList() {
listDetail(null).then((response) => {
this.detailOptions = response.rows;
});
},
//
dayFlowFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.detailOptions;
Object.keys(datas).map((key) => {
if (datas[key].id + "" == "" + row.bzid) {
actions.push(datas[key].name);
return false;
}
});
return actions.join("");
},
// --
xnxqFormat(row, column) {
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
@ -490,6 +481,8 @@ export default {
xnxq: undefined,
bzid: undefined,
kfz: undefined,
bzmf: undefined,
zzdf: undefined,
kfcs: undefined,
pgdx: undefined,
createUserid: undefined,
@ -525,6 +518,10 @@ export default {
this.zljsOptions = response.zljs;
});
},
handleAssessment(row) {
const id = row.id;
this.$router.push({ path: "/benyi/dayflowassessment/teacher/" + id });
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

View File

@ -3,6 +3,7 @@ package com.ruoyi.project.benyi.controller;
import java.util.List;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.benyi.service.IByDayFlowStandardService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -33,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
public class ByDayflowassessmentController extends BaseController {
@Autowired
private IByDayflowassessmentService byDayflowassessmentService;
@Autowired
private IByDayFlowStandardService byDayFlowStandardService;
/**
* 查询幼儿园一日流程评估列表
@ -85,7 +88,21 @@ public class ByDayflowassessmentController extends BaseController {
@Log(title = "幼儿园一日流程评估", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByDayflowassessment byDayflowassessment) {
if (byDayflowassessment.getItems() != null) {
// 取出标准id并根据id查询此标准的分数
String[] arr = byDayflowassessment.getItems().split(",");
// 勾选的总分数sum
Double sum = 0.0;
for (int i=0; i<arr.length; i++) {
sum += byDayFlowStandardService.selectByDayFlowStandardById(Long.parseLong(arr[i])).getScore();
}
byDayflowassessment.setZzdf(sum);
byDayflowassessment.setKfz(byDayflowassessment.getBzmf()-sum);
return toAjax(byDayflowassessmentService.updateByDayflowassessment(byDayflowassessment));
}else {
return AjaxResult.error("未勾选评估选项");
}
}
/**

View File

@ -99,31 +99,26 @@ public class ByDayflowassessmentplanController extends BaseController {
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() + "-" + "评估计划");
if
( byClassService.selectByClassById(classId).getZbjs() == null &&
if (byClassService.selectByClassById(classId).getZbjs() == null &&
byClassService.selectByClassById(classId).getPbjs() == null &&
byClassService.selectByClassById(classId).getZljs() == null
)
{
byClassService.selectByClassById(classId).getZljs() == null) {
return AjaxResult.error("当前班级下没有教师,无法创建评估计划");
}
int iCount = byDayflowassessmentplanService.insertByDayflowassessmentplan(byDayflowassessmentplan);
if (iCount > 0) {
// 判断班级下是否有老师
int sum = 0;
Long zbjsNew = byClassService.selectByClassById(classId).getZbjs();
Long pbjsNew = byClassService.selectByClassById(classId).getPbjs();
Long zljsNew = byClassService.selectByClassById(classId).getZljs();
ByDayflowassessment byDayflowassessment = null;
if (zbjsNew != null) {
System.out.println("这是主班教师111");
byDayflowassessment = new ByDayflowassessment();
byDayflowassessment.setPlanid(byDayflowassessmentplan.getId());
byDayflowassessment.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byDayflowassessment.setDeptId(byDayflowassessmentplan.getDeptId());
byDayflowassessment.setBzbh(zbjsNew);
byDayflowassessment.setPgdx(zbjsNew);
byDayflowassessment.setBzmf(byDayflowassessmentplan.getScore());
byDayflowassessment.setClassid(classId);
byDayflowassessment.setXnxq(byDayflowassessmentplan.getXnxq());
byDayflowassessment.setBzid(Long.parseLong(byDayflowassessmentplan.getConnent()));
@ -134,15 +129,44 @@ public class ByDayflowassessmentplanController extends BaseController {
byDayflowassessment.setZlbh(zljsNew);
}
byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment);
sum += 1;
}
if (pbjsNew != null) {
System.out.println("这是配班教师222");
sum += 1;
byDayflowassessment = new ByDayflowassessment();
byDayflowassessment.setPlanid(byDayflowassessmentplan.getId());
byDayflowassessment.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byDayflowassessment.setDeptId(byDayflowassessmentplan.getDeptId());
byDayflowassessment.setPbbh(pbjsNew);
byDayflowassessment.setPgdx(pbjsNew);
byDayflowassessment.setBzmf(byDayflowassessmentplan.getScore());
byDayflowassessment.setClassid(classId);
byDayflowassessment.setXnxq(byDayflowassessmentplan.getXnxq());
byDayflowassessment.setBzid(Long.parseLong(byDayflowassessmentplan.getConnent()));
if (zbjsNew != null) {
byDayflowassessment.setBzbh(zbjsNew);
}
if (zljsNew != null) {
System.out.println("这是助理教师333");
sum += 1;
byDayflowassessment.setZlbh(zljsNew);
}
byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment);
}
if (zljsNew != null) {
byDayflowassessment = new ByDayflowassessment();
byDayflowassessment.setPlanid(byDayflowassessmentplan.getId());
byDayflowassessment.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
byDayflowassessment.setDeptId(byDayflowassessmentplan.getDeptId());
byDayflowassessment.setZlbh(zljsNew);
byDayflowassessment.setPgdx(zljsNew);
byDayflowassessment.setBzmf(byDayflowassessmentplan.getScore());
byDayflowassessment.setClassid(classId);
byDayflowassessment.setXnxq(byDayflowassessmentplan.getXnxq());
byDayflowassessment.setBzid(Long.parseLong(byDayflowassessmentplan.getConnent()));
if (pbjsNew != null) {
byDayflowassessment.setPbbh(pbjsNew);
}
if (zbjsNew != null) {
byDayflowassessment.setBzbh(zbjsNew);
}
byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment);
}
}
return toAjax(iCount);

View File

@ -38,6 +38,10 @@ public class ByDayFlowStandard extends BaseEntity {
@Excel(name = "标准排序")
private Long standardSort;
// 标准的分数
private Double score;
/**
* 标准数量
*/
@ -154,7 +158,15 @@ public class ByDayFlowStandard extends BaseEntity {
.append("createtime", getCreatetime())
.append("updateuser", getUpdateuser())
.append("updatetime", getUpdatetime())
.append("score", getScore())
.toString();
}
public Double getScore() {
return score;
}
public void setScore(Double score) {
this.score = score;
}
}

View File

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import java.util.List;
/**
* 幼儿园一日流程评估对象 by_dayflowassessment
*
@ -25,6 +27,8 @@ public class ByDayflowassessment extends BaseEntity {
@Excel(name = "所属计划")
private Long planid;
private String items;
/**
* 学校编号
*/
@ -85,6 +89,12 @@ public class ByDayflowassessment extends BaseEntity {
@Excel(name = "评估标准编号")
private Long bzid;
/**
* 评估标准满分
*/
@Excel(name = "评估标准满分")
private Double bzmf;
/**
* 扣分值
*/
@ -97,6 +107,12 @@ public class ByDayflowassessment extends BaseEntity {
@Excel(name = "扣分次数")
private Long kfcs;
/**
* 最终得分
*/
@Excel(name = "评估标准满分")
private Double zzdf;
/**
* 评估对象
*/
@ -254,9 +270,37 @@ public class ByDayflowassessment extends BaseEntity {
.append("bzid", getBzid())
.append("kfz", getKfz())
.append("kfcs", getKfcs())
.append("bzmf", getBzmf())
.append("zzdf", getZzdf())
.append("pgdx", getPgdx())
.append("items", getItems())
.append("createUserid", getCreateUserid())
.append("createTime", getCreateTime())
.toString();
}
public Double getBzmf() {
return bzmf;
}
public void setBzmf(Double bzmf) {
this.bzmf = bzmf;
}
public Double getZzdf() {
return zzdf;
}
public void setZzdf(Double zzdf) {
this.zzdf = zzdf;
}
public String getItems() {
return items;
}
public void setItems(String items) {
this.items = items;
}
}

View File

@ -62,7 +62,7 @@ public class ByDayflowassessmentplan extends BaseEntity {
* 内容分数
*/
@Excel(name = "内容分数")
private float score;
private Double score;
/**
* 评估时间
@ -166,11 +166,11 @@ public class ByDayflowassessmentplan extends BaseEntity {
this.name = name;
}
public float getScore() {
public Double getScore() {
return score;
}
public void setScore(float score) {
public void setScore(double score) {
this.score = score;
}
}

View File

@ -11,13 +11,14 @@
<result property="standardSort" column="standard_sort"/>
<result property="unscrambleCount" column="unscramble_count"/>
<result property="createuser" column="createuser"/>
<result property="score" column="score"/>
<result property="createtime" column="createtime"/>
<result property="updateuser" column="updateuser"/>
<result property="updatetime" column="updatetime"/>
</resultMap>
<sql id="selectByDayFlowStandardVo">
select id, task_code, standard_title, standard_sort,(select count(*) from by_day_flow_unscramble where standard_id=by_day_flow_standard.id) unscramble_count, createuser, createtime, updateuser, updatetime from by_day_flow_standard
select id, task_code, standard_title, score, standard_sort,(select count(*) from by_day_flow_unscramble where standard_id=by_day_flow_standard.id) unscramble_count, createuser, createtime, updateuser, updatetime from by_day_flow_standard
</sql>
<select id="selectByDayFlowStandardList" parameterType="ByDayFlowStandard" resultMap="ByDayFlowStandardResult">
@ -29,6 +30,7 @@
</if>
<if test="standardSort != null ">and standard_sort = #{standardSort}</if>
<if test="createuser != null ">and createuser = #{createuser}</if>
<if test="score != null ">and score = #{score}</if>
<if test="createtime != null ">and createtime = #{createtime}</if>
<if test="updateuser != null ">and updateuser = #{updateuser}</if>
<if test="updatetime != null ">and updatetime = #{updatetime}</if>
@ -47,6 +49,7 @@
<if test="standardTitle != null and standardTitle != ''">standard_title,</if>
<if test="standardSort != null ">standard_sort,</if>
<if test="createuser != null ">createuser,</if>
<if test="score != null ">score,</if>
<if test="createtime != null ">createtime,</if>
<if test="updateuser != null ">updateuser,</if>
<if test="updatetime != null ">updatetime,</if>
@ -56,6 +59,7 @@
<if test="standardTitle != null and standardTitle != ''">#{standardTitle},</if>
<if test="standardSort != null ">#{standardSort},</if>
<if test="createuser != null ">#{createuser},</if>
<if test="score != null ">#{score},</if>
<if test="createtime != null ">#{createtime},</if>
<if test="updateuser != null ">#{updateuser},</if>
<if test="updatetime != null ">#{updatetime},</if>
@ -69,6 +73,7 @@
<if test="standardTitle != null and standardTitle != ''">standard_title = #{standardTitle},</if>
<if test="standardSort != null ">standard_sort = #{standardSort},</if>
<if test="createuser != null ">createuser = #{createuser},</if>
<if test="score != null ">score = #{score},</if>
<if test="createtime != null ">createtime = #{createtime},</if>
<if test="updateuser != null ">updateuser = #{updateuser},</if>
<if test="updatetime != null ">updatetime = #{updatetime},</if>

View File

@ -17,6 +17,8 @@
<result property="zlxm" column="zlxm"/>
<result property="xnxq" column="xnxq"/>
<result property="bzid" column="bzid"/>
<result property="bzmf" column="bzmf"/>
<result property="zzdf" column="zzdf"/>
<result property="kfz" column="kfz"/>
<result property="kfcs" column="kfcs"/>
<result property="pgdx" column="pgdx"/>
@ -25,7 +27,7 @@
</resultMap>
<sql id="selectByDayflowassessmentVo">
select id, planid, dept_id, classid, bzbh, bzxm, pbbh, pbxm, zlbh, zlxm, xnxq, bzid, kfz, kfcs, pgdx, create_userid, create_time from by_dayflowassessment
select id, planid, dept_id, classid, bzbh, bzxm, pbbh, pbxm, zlbh, zlxm, bzmf, zzdf, xnxq, bzid, kfz, kfcs, pgdx, create_userid, create_time from by_dayflowassessment
</sql>
<select id="selectByDayflowassessmentList" parameterType="ByDayflowassessment"
@ -44,6 +46,8 @@
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
<if test="bzid != null ">and bzid = #{bzid}</if>
<if test="kfz != null ">and kfz = #{kfz}</if>
<if test="bzmf != null ">and bzmf = #{bzmf}</if>
<if test="zzdf != null ">and zzdf = #{zzdf}</if>
<if test="kfcs != null ">and kfcs = #{kfcs}</if>
<if test="pgdx != null ">and pgdx = #{pgdx}</if>
<if test="createUserid != null ">and create_userid = #{createUserid}</if>
@ -70,6 +74,8 @@
<if test="xnxq != null and xnxq != ''">xnxq,</if>
<if test="bzid != null ">bzid,</if>
<if test="kfz != null ">kfz,</if>
<if test="bzmf != null ">bzmf,</if>
<if test="zzdf != null ">zzdf,</if>
<if test="kfcs != null ">kfcs,</if>
<if test="pgdx != null ">pgdx,</if>
<if test="createUserid != null ">create_userid,</if>
@ -88,6 +94,8 @@
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
<if test="bzid != null ">#{bzid},</if>
<if test="kfz != null ">#{kfz},</if>
<if test="bzmf != null ">#{bzmf},</if>
<if test="zzdf != null ">#{zzdf},</if>
<if test="kfcs != null ">#{kfcs},</if>
<if test="pgdx != null ">#{pgdx},</if>
<if test="createUserid != null ">#{createUserid},</if>
@ -110,6 +118,8 @@
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
<if test="bzid != null ">bzid = #{bzid},</if>
<if test="kfz != null ">kfz = #{kfz},</if>
<if test="bzmf != null ">bzmf = #{bzmf},</if>
<if test="zzdf != null ">zzdf = #{zzdf},</if>
<if test="kfcs != null ">kfcs = #{kfcs},</if>
<if test="pgdx != null ">pgdx = #{pgdx},</if>
<if test="createUserid != null ">create_userid = #{createUserid},</if>