一日流程评估计划名称自动获取&一日流程评估班级教师获取
This commit is contained in:
@ -2,6 +2,7 @@ package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -72,6 +73,7 @@ public class ByDayflowassessmentController extends BaseController {
|
||||
@Log(title = "幼儿园一日流程评估", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByDayflowassessment byDayflowassessment) {
|
||||
byDayflowassessment.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
|
||||
return toAjax(byDayflowassessmentService.insertByDayflowassessment(byDayflowassessment));
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,10 @@ package com.ruoyi.project.benyi.controller;
|
||||
import java.util.List;
|
||||
|
||||
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.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -33,6 +37,14 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
public class ByDayflowassessmentplanController extends BaseController {
|
||||
@Autowired
|
||||
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)
|
||||
@PostMapping
|
||||
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.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));
|
||||
}
|
||||
|
||||
@ -85,6 +105,16 @@ public class ByDayflowassessmentplanController extends BaseController {
|
||||
@Log(title = "幼儿园一日流程评估计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,11 @@ public class ByDayflowassessmentplan extends BaseEntity {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 评估学校
|
||||
*/
|
||||
@ -134,6 +139,7 @@ public class ByDayflowassessmentplan extends BaseEntity {
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("deptId", getDeptId())
|
||||
.append("month", getMonth())
|
||||
.append("xnxq", getXnxq())
|
||||
@ -144,4 +150,12 @@ public class ByDayflowassessmentplan extends BaseEntity {
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<resultMap type="ByDayflowassessmentplan" id="ByDayflowassessmentplanResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="month" column="month"/>
|
||||
<result property="xnxq" column="xnxq"/>
|
||||
@ -17,13 +18,14 @@
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectByDayflowassessmentplanList" parameterType="ByDayflowassessmentplan"
|
||||
resultMap="ByDayflowassessmentplanResult">
|
||||
<include refid="selectByDayflowassessmentplanVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name = #{name}</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="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
|
||||
@ -43,6 +45,7 @@
|
||||
keyProperty="id">
|
||||
insert into by_dayflowassessmentplan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="deptId != null ">dept_id,</if>
|
||||
<if test="month != null ">month,</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq,</if>
|
||||
@ -53,6 +56,7 @@
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="deptId != null ">#{deptId},</if>
|
||||
<if test="month != null ">#{month},</if>
|
||||
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
|
||||
@ -67,6 +71,7 @@
|
||||
<update id="updateByDayflowassessmentplan" parameterType="ByDayflowassessmentplan">
|
||||
update by_dayflowassessmentplan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="deptId != null ">dept_id = #{deptId},</if>
|
||||
<if test="month != null ">month = #{month},</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq = #{xnxq},</if>
|
||||
|
Reference in New Issue
Block a user