소스 검색

学生档案新增信息

LIVE_YE 1 년 전
부모
커밋
ca9ff51633

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -70,7 +70,7 @@ xss:
   # 过滤开关
   enabled: true
   # 排除链接(多个用逗号分隔)
-  excludes: /system/notice,/system/app/new
+  excludes: /system/notice,/system/app/new,/system/xiaoYuanInfo
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*
 

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfo.java

@@ -111,9 +111,30 @@ public class StudentInfo extends BaseEntity
     private String psychologicalDescription;
 
 
+    /** 留守儿童(1:是,2:否) */
+    private String isLset;
+    /** 是否贫困(1:是,2:否) */
+    private String isPoverty;
+
 
     private String classId;
 
+    public void setIsLset(String isLset) {
+        this.isLset = isLset;
+    }
+
+    public void setIsPoverty(String isPoverty) {
+        this.isPoverty = isPoverty;
+    }
+
+    public String getIsLset() {
+        return isLset;
+    }
+
+    public String getIsPoverty() {
+        return isPoverty;
+    }
+
     public void setIsMedicalHistory(String isMedicalHistory) {
         this.isMedicalHistory = isMedicalHistory;
     }

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfoOld.java

@@ -121,6 +121,27 @@ public class StudentInfoOld extends BaseEntity
     /** 心理健康描述 */
     private String psychologicalDescription;
 
+    /** 留守儿童(1:是,2:否) */
+    private String isLset;
+    /** 是否贫困(1:是,2:否) */
+    private String isPoverty;
+
+    public String getIsLset() {
+        return isLset;
+    }
+
+    public String getIsPoverty() {
+        return isPoverty;
+    }
+
+    public void setIsLset(String isLset) {
+        this.isLset = isLset;
+    }
+
+    public void setIsPoverty(String isPoverty) {
+        this.isPoverty = isPoverty;
+    }
+
     public String getIsMedicalHistory() {
         return isMedicalHistory;
     }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoServiceImpl.java

@@ -91,7 +91,7 @@ public class StudentInfoServiceImpl implements IStudentInfoService
         studentInfoOld.setCreateTime(DateUtils.getNowDate());
         studentInfoOld.setUpdateTime(studentInfo.getCreateTime());
         studentInfoOldMapper.insertStudentInfoOld(studentInfoOld);
-
+        studentInfo.setId(student.getId());
         studentInfo.setUpdateTime(DateUtils.getNowDate());
         return studentInfoMapper.updateStudentInfo(studentInfo);
     }

+ 20 - 3
ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml

@@ -42,6 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="psychologicalDescription"    column="psychological_description"    />
 
 
+        <result property="isLset"    column="is_lset"    />
+        <result property="isPoverty"    column="is_poverty"    />
+
+
         <result property="classId"    column="classId"    />
 
     </resultMap>
@@ -49,13 +53,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectStudentInfoVo">
         select id, student_id, name, sex, age, school, student_number, id_card, height, weight, blood_type, political_status, identification_photo,
                entrance_permit, father_name, father_telephone, mother_name, mother_telephone, address, create_by, create_time, update_by, update_time,
-               remark,is_nearsightedness,degree_myopia,health,mind,longitude,latitude,is_medical_history,medical_description,psychological_description from student_info
+               remark,is_nearsightedness,degree_myopia,health,mind,longitude,latitude,is_medical_history,medical_description,psychological_description,
+               is_lset,is_poverty from student_info
     </sql>
 
     <select id="selectStudentInfoList" parameterType="StudentInfo" resultMap="StudentInfoResult">
         select s.id, s.student_id, s.name, s.sex, s.age, s.school, s.student_number, s.id_card, s.height, s.weight, s.blood_type, s.political_status, s.identification_photo,
         s.entrance_permit, s.father_name, s.father_telephone, s.mother_name, s.mother_telephone, s.address, s.create_by, s.create_time, s.update_by, s.update_time, s.remark,
-        s.is_nearsightedness,s.degree_myopia,s.health,mind,s.longitude,s.latitude,s.is_medical_history,s.medical_description,s.psychological_description
+        s.is_nearsightedness,s.degree_myopia,s.health,mind,s.longitude,s.latitude,s.is_medical_history,s.medical_description,s.psychological_description, s.is_lset,s.is_poverty
         from student_info s
         left join formal_parents_student f on s.student_id = f.id
         <where>  
@@ -79,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="address != null  and address != ''"> and s.address = #{address}</if>
             <if test="classId != null "> and f.class_id = #{classId}</if>
         </where>
-        order by create_time desc;
+        order by create_time desc
     </select>
     
     <select id="selectStudentInfoById" parameterType="Long" resultMap="StudentInfoResult">
@@ -129,6 +134,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isMedicalHistory != null">is_medical_history,</if>
             <if test="medicalDescription != null">medical_description,</if>
             <if test="psychologicalDescription != null">psychological_description,</if>
+
+            <if test="isLset != null">is_lset,</if>
+            <if test="isPoverty != null">is_poverty,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="studentId != null">#{studentId},</if>
@@ -166,6 +174,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="medicalDescription != null">#{medicalDescription},</if>
             <if test="psychologicalDescription != null">#{psychologicalDescription},</if>
 
+
+            <if test="isLset != null">#{isLset},</if>
+            <if test="isPoverty != null">#{isPoverty},</if>
+
+
          </trim>
     </insert>
 
@@ -206,6 +219,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isMedicalHistory != null">is_medical_history = #{isMedicalHistory},</if>
             <if test="medicalDescription != null">medical_description = #{medicalDescription},</if>
             <if test="psychologicalDescription != null">psychological_description = #{psychologicalDescription},</if>
+
+
+            <if test="isLset != null">is_lset= #{isLset},</if>
+            <if test="isPoverty != null">is_poverty= #{isPoverty},</if>
         </trim>
         where id = #{id}
     </update>

+ 13 - 1
ruoyi-system/src/main/resources/mapper/system/StudentInfoOldMapper.xml

@@ -39,10 +39,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isMedicalHistory"    column="is_medical_history"    />
         <result property="medicalDescription"    column="medical_description"    />
         <result property="psychologicalDescription"    column="psychological_description"    />
+
+        <result property="isLset"    column="is_lset"    />
+        <result property="isPoverty"    column="is_poverty"    />
     </resultMap>
 
     <sql id="selectStudentInfoOldVo">
-        select old_id, student_id, name, sex, age, school, student_number, id_card, is_nearsightedness, degree_myopia, height, weight, blood_type, political_status, health, identification_photo, mind, entrance_permit, father_name, father_telephone, mother_name, mother_telephone, address, longitude, latitude, create_by, create_time, update_by, update_time, remark,is_medical_history,medical_description,psychological_description from student_info_old
+        select old_id, student_id, name, sex, age, school, student_number, id_card, is_nearsightedness, degree_myopia, height, weight, blood_type, political_status, health, identification_photo, mind, entrance_permit, father_name, father_telephone, mother_name, mother_telephone, address, longitude, latitude, create_by, create_time, update_by, update_time, remark,is_medical_history,medical_description,psychological_description,is_lset,is_poverty from student_info_old
     </sql>
 
     <select id="selectStudentInfoOldList" parameterType="StudentInfoOld" resultMap="StudentInfoOldResult">
@@ -147,6 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isMedicalHistory != null">is_medical_history,</if>
             <if test="medicalDescription != null">medical_description,</if>
             <if test="psychologicalDescription != null">psychological_description,</if>
+
+            <if test="isLset != null">is_lset,</if>
+            <if test="isPoverty != null">is_poverty,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="studentId != null">#{studentId},</if>
@@ -182,6 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isMedicalHistory != null">#{isMedicalHistory},</if>
             <if test="medicalDescription != null">#{medicalDescription},</if>
             <if test="psychologicalDescription != null">#{psychologicalDescription},</if>
+
+            <if test="isLset != null">#{isLset},</if>
+            <if test="isPoverty != null">#{isPoverty},</if>
          </trim>
     </insert>
 
@@ -221,6 +230,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isMedicalHistory != null">is_medical_history = #{isMedicalHistory},</if>
             <if test="medicalDescription != null">medical_description = #{medicalDescription},</if>
             <if test="psychologicalDescription != null">psychological_description = #{psychologicalDescription},</if>
+
+            <if test="isLset != null">is_lset= #{isLset},</if>
+            <if test="isPoverty != null">is_poverty= #{isPoverty},</if>
         </trim>
         where old_id = #{oldId}
     </update>