幼儿档案
This commit is contained in:
@ -3,6 +3,8 @@ package com.ruoyi.project.benyi.controller;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -35,6 +37,8 @@ public class ByChildLearndevelopmentFamilyController extends BaseController {
|
||||
@Autowired
|
||||
private IByChildLearndevelopmentFamilyService byChildLearndevelopmentFamilyService;
|
||||
@Autowired
|
||||
private IByChildService byChildService;
|
||||
@Autowired
|
||||
private SchoolCommon schoolCommon;
|
||||
|
||||
/**
|
||||
@ -87,12 +91,20 @@ public class ByChildLearndevelopmentFamilyController extends BaseController {
|
||||
ByChildLearndevelopmentFamily byChildLearndevelopmentFamilyNew = new ByChildLearndevelopmentFamily();
|
||||
byChildLearndevelopmentFamilyNew.setXnxq(byChildLearndevelopmentFamily.getXnxq());
|
||||
byChildLearndevelopmentFamilyNew.setChildid(byChildLearndevelopmentFamily.getChildid());
|
||||
List<ByChildLearndevelopmentFamily> list = byChildLearndevelopmentFamilyService.selectByChildLearndevelopmentFamilyList(byChildLearndevelopmentFamilyNew);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("当前学期的幼儿档案已创建,无法重复创建");
|
||||
//幼儿信息 需要班级id
|
||||
ByChild byChild = byChildService.selectByChildById(byChildLearndevelopmentFamily.getChildid());
|
||||
String strClassId = byChild.getClassid();
|
||||
if (byChild != null && !schoolCommon.isStringEmpty(strClassId)) {
|
||||
List<ByChildLearndevelopmentFamily> list = byChildLearndevelopmentFamilyService.selectByChildLearndevelopmentFamilyList(byChildLearndevelopmentFamilyNew);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("当前学期的幼儿档案已创建,无法重复创建");
|
||||
}
|
||||
byChildLearndevelopmentFamily.setClassid(strClassId);
|
||||
byChildLearndevelopmentFamily.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byChildLearndevelopmentFamilyService.insertByChildLearndevelopmentFamily(byChildLearndevelopmentFamily));
|
||||
} else {
|
||||
return AjaxResult.error("当前幼儿没有班级信息");
|
||||
}
|
||||
byChildLearndevelopmentFamily.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byChildLearndevelopmentFamilyService.insertByChildLearndevelopmentFamily(byChildLearndevelopmentFamily));
|
||||
} else {
|
||||
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿档案");
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.ruoyi.project.benyi.controller;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -35,6 +37,8 @@ public class ByChildLearndevelopmentTeacherController extends BaseController {
|
||||
@Autowired
|
||||
private IByChildLearndevelopmentTeacherService byChildLearndevelopmentTeacherService;
|
||||
@Autowired
|
||||
private IByChildService byChildService;
|
||||
@Autowired
|
||||
private SchoolCommon schoolCommon;
|
||||
|
||||
/**
|
||||
@ -87,12 +91,21 @@ public class ByChildLearndevelopmentTeacherController extends BaseController {
|
||||
ByChildLearndevelopmentTeacher byChildLearndevelopmentTeacherNew = new ByChildLearndevelopmentTeacher();
|
||||
byChildLearndevelopmentTeacherNew.setXnxq(byChildLearndevelopmentTeacher.getXnxq());
|
||||
byChildLearndevelopmentTeacherNew.setChildid(byChildLearndevelopmentTeacher.getChildid());
|
||||
List<ByChildLearndevelopmentTeacher> list = byChildLearndevelopmentTeacherService.selectByChildLearndevelopmentTeacherList(byChildLearndevelopmentTeacherNew);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("当前学期的幼儿档案已创建,无法重复创建");
|
||||
|
||||
//幼儿信息 需要班级id
|
||||
ByChild byChild = byChildService.selectByChildById(byChildLearndevelopmentTeacher.getChildid());
|
||||
String strClassId = byChild.getClassid();
|
||||
if (byChild != null && !schoolCommon.isStringEmpty(strClassId)) {
|
||||
List<ByChildLearndevelopmentTeacher> list = byChildLearndevelopmentTeacherService.selectByChildLearndevelopmentTeacherList(byChildLearndevelopmentTeacherNew);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("当前学期的幼儿档案已创建,无法重复创建");
|
||||
}
|
||||
byChildLearndevelopmentTeacher.setClassid(strClassId);
|
||||
byChildLearndevelopmentTeacher.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byChildLearndevelopmentTeacherService.insertByChildLearndevelopmentTeacher(byChildLearndevelopmentTeacher));
|
||||
} else {
|
||||
return AjaxResult.error("当前幼儿没有班级信息");
|
||||
}
|
||||
byChildLearndevelopmentTeacher.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byChildLearndevelopmentTeacherService.insertByChildLearndevelopmentTeacher(byChildLearndevelopmentTeacher));
|
||||
} else {
|
||||
return AjaxResult.error("当前用户非幼儿园,无法添加幼儿档案");
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.ruoyi.project.system.domain.ByClass;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
@ -97,6 +98,26 @@ public class ByChildLearndevelopmentFamily extends BaseEntity {
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public ByClass getByClass() {
|
||||
return byClass;
|
||||
}
|
||||
|
||||
public void setByClass(ByClass byClass) {
|
||||
this.byClass = byClass;
|
||||
}
|
||||
|
||||
private ByClass byClass;
|
||||
|
||||
public ByChild getByChild() {
|
||||
return byChild;
|
||||
}
|
||||
|
||||
public void setByChild(ByChild byChild) {
|
||||
this.byChild = byChild;
|
||||
}
|
||||
|
||||
private ByChild byChild;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -227,6 +248,8 @@ public class ByChildLearndevelopmentFamily extends BaseEntity {
|
||||
.append("jspyremarks", getJspyremarks())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("byClass", getByClass())
|
||||
.append("byChild", getByChild())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.ruoyi.project.system.domain.ByClass;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
@ -97,6 +98,26 @@ public class ByChildLearndevelopmentTeacher extends BaseEntity {
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public ByClass getByClass() {
|
||||
return byClass;
|
||||
}
|
||||
|
||||
public void setByClass(ByClass byClass) {
|
||||
this.byClass = byClass;
|
||||
}
|
||||
|
||||
private ByClass byClass;
|
||||
|
||||
public ByChild getByChild() {
|
||||
return byChild;
|
||||
}
|
||||
|
||||
public void setByChild(ByChild byChild) {
|
||||
this.byChild = byChild;
|
||||
}
|
||||
|
||||
private ByChild byChild;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
@ -227,6 +248,8 @@ public class ByChildLearndevelopmentTeacher extends BaseEntity {
|
||||
.append("jyjhremarks", getJyjhremarks())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("byClass", getByClass())
|
||||
.append("byChild", getByChild())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,38 @@
|
||||
<result property="jspyremarks" column="jspyremarks"/>
|
||||
<result property="createuserid" column="createuserid"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<association property="byClass" column="classid" javaType="ByClass" resultMap="ByClassResult"/>
|
||||
<association property="byChild" column="childid" javaType="ByChild" resultMap="ByChildResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByClass" id="ByClassResult">
|
||||
<result property="bjbh" column="bjbh"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="bjtype" column="bjtype"/>
|
||||
<result property="bhxh" column="bhxh"/>
|
||||
<result property="xn" column="xn"/>
|
||||
<result property="bjmc" column="bjmc"/>
|
||||
<result property="bjrych" column="bjrych"/>
|
||||
<result property="jbny" column="jbny"/>
|
||||
<result property="zbjs" column="zbjs"/>
|
||||
<result property="pbjs" column="pbjs"/>
|
||||
<result property="zljs" column="zljs"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByChild" id="ByChildResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="schoolid" column="schoolid"/>
|
||||
<result property="classid" column="classid"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="enName" column="en_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByChildLearndevelopmentFamilyVo">
|
||||
select a.id, a.childid, a.xnxq, a.zpimgs, a.zpimgremarks, a.shimgs, a.shimgsremarks, a.yqsj, a.yqsjremarks, a.jspy, a.jspyremarks, a.createuserid, a.create_time,b.schoolid, b.classid from by_child_learndevelopment_family a left join by_child b on a.childid=b.id
|
||||
select a.id, a.childid, b.name, a.xnxq, a.zpimgs, a.zpimgremarks, a.shimgs, a.shimgsremarks, a.yqsj, a.yqsjremarks, a.jspy, a.jspyremarks, a.createuserid, a.create_time,b.schoolid, a.classid,c.bjmc from by_child_learndevelopment_family a
|
||||
left join by_child b on a.childid=b.id
|
||||
left join by_class c on a.classid=c.bjbh
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildLearndevelopmentFamilyList" parameterType="ByChildLearndevelopmentFamily"
|
||||
@ -60,6 +88,7 @@
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="childid != null ">childid,</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="zpimgs != null and zpimgs != ''">zpimgs,</if>
|
||||
<if test="zpimgremarks != null and zpimgremarks != ''">zpimgremarks,</if>
|
||||
<if test="shimgs != null and shimgs != ''">shimgs,</if>
|
||||
@ -75,6 +104,7 @@
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="childid != null ">#{childid},</if>
|
||||
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="zpimgs != null and zpimgs != ''">#{zpimgs},</if>
|
||||
<if test="zpimgremarks != null and zpimgremarks != ''">#{zpimgremarks},</if>
|
||||
<if test="shimgs != null and shimgs != ''">#{shimgs},</if>
|
||||
|
@ -20,10 +20,38 @@
|
||||
<result property="jyjhremarks" column="jyjhremarks"/>
|
||||
<result property="createuserid" column="createuserid"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<association property="byClass" column="classid" javaType="ByClass" resultMap="ByClassResult"/>
|
||||
<association property="byChild" column="childid" javaType="ByChild" resultMap="ByChildResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByClass" id="ByClassResult">
|
||||
<result property="bjbh" column="bjbh"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="bjtype" column="bjtype"/>
|
||||
<result property="bhxh" column="bhxh"/>
|
||||
<result property="xn" column="xn"/>
|
||||
<result property="bjmc" column="bjmc"/>
|
||||
<result property="bjrych" column="bjrych"/>
|
||||
<result property="jbny" column="jbny"/>
|
||||
<result property="zbjs" column="zbjs"/>
|
||||
<result property="pbjs" column="pbjs"/>
|
||||
<result property="zljs" column="zljs"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByChild" id="ByChildResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="schoolid" column="schoolid"/>
|
||||
<result property="classid" column="classid"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="enName" column="en_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByChildLearndevelopmentTeacherVo">
|
||||
select a.id, a.childid, a.xnxq, a.gcjl, a.gcjlremarks, a.wtyfa, a.wtyfaremarks, a.pgjg, a.pgjgremarks, a.jyjh, a.jyjhremarks, a.createuserid, a.create_time,b.schoolid, b.classid from by_child_learndevelopment_teacher a left join by_child b on a.childid=b.id
|
||||
select a.id, a.childid, b.name, a.xnxq, a.gcjl, a.gcjlremarks, a.wtyfa, a.wtyfaremarks, a.pgjg, a.pgjgremarks, a.jyjh, a.jyjhremarks, a.createuserid, a.create_time,b.schoolid, a.classid,c.bjmc from by_child_learndevelopment_teacher a
|
||||
left join by_child b on a.childid=b.id
|
||||
left join by_class c on a.classid=c.bjbh
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildLearndevelopmentTeacherList" parameterType="ByChildLearndevelopmentTeacher"
|
||||
@ -60,6 +88,7 @@
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="childid != null ">childid,</if>
|
||||
<if test="xnxq != null and xnxq != ''">xnxq,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="gcjl != null and gcjl != ''">gcjl,</if>
|
||||
<if test="gcjlremarks != null and gcjlremarks != ''">gcjlremarks,</if>
|
||||
<if test="wtyfa != null and wtyfa != ''">wtyfa,</if>
|
||||
@ -75,6 +104,7 @@
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="childid != null ">#{childid},</if>
|
||||
<if test="xnxq != null and xnxq != ''">#{xnxq},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="gcjl != null and gcjl != ''">#{gcjl},</if>
|
||||
<if test="gcjlremarks != null and gcjlremarks != ''">#{gcjlremarks},</if>
|
||||
<if test="wtyfa != null and wtyfa != ''">#{wtyfa},</if>
|
||||
|
Reference in New Issue
Block a user