소스 검색

档案信息

LIVE_YE 1 년 전
부모
커밋
d51b767727

+ 112 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/info/StudentInfoOldController.java

@@ -0,0 +1,112 @@
+package com.ruoyi.web.controller.info;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.StudentInfoOld;
+import com.ruoyi.system.service.IStudentInfoOldService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 学生档案历史信息Controller
+ * 
+ * @author ruoyi
+ * @date 2023-07-28
+ */
+@RestController
+@RequestMapping("/student/old")
+public class StudentInfoOldController extends BaseController
+{
+    @Autowired
+    private IStudentInfoOldService studentInfoOldService;
+
+    /**
+     * 查询学生档案历史信息列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(StudentInfoOld studentInfoOld)
+    {
+        List<StudentInfoOld> list = studentInfoOldService.selectStudentInfoOldList(studentInfoOld);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 查询学生档案历史信息列表
+     */
+    @GetMapping("/echarts")
+    public AjaxResult echarts(StudentInfoOld studentInfoOld)
+    {
+        return studentInfoOldService.selectStudentInfoOldListEcharts(studentInfoOld);
+    }
+
+    /**
+     * 导出学生档案历史信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('student:old:export')")
+    @Log(title = "学生档案历史信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, StudentInfoOld studentInfoOld)
+    {
+        List<StudentInfoOld> list = studentInfoOldService.selectStudentInfoOldList(studentInfoOld);
+        ExcelUtil<StudentInfoOld> util = new ExcelUtil<StudentInfoOld>(StudentInfoOld.class);
+        util.exportExcel(response, list, "学生档案历史信息数据");
+    }
+
+    /**
+     * 获取学生档案历史信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('student:old:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(studentInfoOldService.selectStudentInfoOldById(id));
+    }
+
+    /**
+     * 新增学生档案历史信息
+     */
+    @PreAuthorize("@ss.hasPermi('student:old:add')")
+    @Log(title = "学生档案历史信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StudentInfoOld studentInfoOld)
+    {
+        return toAjax(studentInfoOldService.insertStudentInfoOld(studentInfoOld));
+    }
+
+    /**
+     * 修改学生档案历史信息
+     */
+    @PreAuthorize("@ss.hasPermi('student:old:edit')")
+    @Log(title = "学生档案历史信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody StudentInfoOld studentInfoOld)
+    {
+        return toAjax(studentInfoOldService.updateStudentInfoOld(studentInfoOld));
+    }
+
+    /**
+     * 删除学生档案历史信息
+     */
+    @PreAuthorize("@ss.hasPermi('student:old:remove')")
+    @Log(title = "学生档案历史信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(studentInfoOldService.deleteStudentInfoOldByIds(ids));
+    }
+}

+ 6 - 0
ruoyi-common/pom.xml

@@ -131,6 +131,12 @@
             <artifactId>httpclient</artifactId>
             <version>4.5.2</version>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.2.16</version>
+            <scope>compile</scope>
+        </dependency>
 
 
     </dependencies>

+ 36 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/ClassUtils.java

@@ -0,0 +1,36 @@
+package com.ruoyi.common.utils;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+public class ClassUtils {
+
+    public static <T, S> T copyProperties(S source, T target) throws Exception {
+        Class<?> sourceClass = source.getClass();
+        Class<?> targetClass = target.getClass();
+
+        Field[] sourceFields = sourceClass.getDeclaredFields();
+        for (Field sourceField : sourceFields) {
+            if (Modifier.isFinal(sourceField.getModifiers())){
+                continue;
+            }
+            String fieldName = sourceField.getName();
+            Field targetField = null;
+            try {
+                targetField = targetClass.getDeclaredField(fieldName);
+            } catch (NoSuchFieldException e) {
+                // 目标对象不存在该属性,忽略
+                continue;
+            }
+
+            sourceField.setAccessible(true);
+            targetField.setAccessible(true);
+
+            Object value = sourceField.get(source);
+            targetField.set(target, value);
+        }
+
+        return target;
+    }
+
+}

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

@@ -90,8 +90,73 @@ public class StudentInfo extends BaseEntity
     @Excel(name = "s")
     private String address;
 
+    /** 是否近视(1:是,2:否) */
+    private String isNearsightedness;
+    /** 近视度数 */
+    private String degreeMyopia;
+    /** 健康状况 */
+    private String health;
+    /** 心理状况 */
+    private String mind;
+    /** 经度 */
+    private String longitude;
+    /** 纬度 */
+    private String latitude;
+
+
+
+
+
     private String classId;
 
+    public String getIsNearsightedness() {
+        return isNearsightedness;
+    }
+
+    public String getDegreeMyopia() {
+        return degreeMyopia;
+    }
+
+    public String getHealth() {
+        return health;
+    }
+
+    public String getMind() {
+        return mind;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setIsNearsightedness(String isNearsightedness) {
+        this.isNearsightedness = isNearsightedness;
+    }
+
+    public void setDegreeMyopia(String degreeMyopia) {
+        this.degreeMyopia = degreeMyopia;
+    }
+
+    public void setHealth(String health) {
+        this.health = health;
+    }
+
+    public void setMind(String mind) {
+        this.mind = mind;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
     public String getClassId() {
         return classId;
     }

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

@@ -0,0 +1,377 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 学生档案历史信息对象 student_info_old
+ * 
+ * @author ruoyi
+ * @date 2023-07-28
+ */
+public class StudentInfoOld extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    private Long oldId;
+
+    /** 学生id(家长-学生(审核通过之后数据)表id) */
+    @Excel(name = "学生id", readConverterExp = "家=长-学生(审核通过之后数据)表id")
+    private Long studentId;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    private String name;
+
+    /** 性别(1:男,2:女) */
+    @Excel(name = "性别(1:男,2:女)")
+    private String sex;
+
+    /** 年龄 */
+    @Excel(name = "年龄")
+    private String age;
+
+    /** 学校 */
+    @Excel(name = "学校")
+    private String school;
+
+    /** 学号 */
+    @Excel(name = "学号")
+    private String studentNumber;
+
+    /** 身份证号 */
+    @Excel(name = "身份证号")
+    private String idCard;
+
+    /** 是否近视(1:是,2:否) */
+    @Excel(name = "是否近视", readConverterExp = "1=:是,2:否")
+    private String isNearsightedness;
+
+    /** 近视度数 */
+    @Excel(name = "近视度数")
+    private String degreeMyopia;
+
+    /** 身高 */
+    @Excel(name = "身高")
+    private String height;
+
+    /** 体重 */
+    @Excel(name = "体重")
+    private String weight;
+
+    /** 血型 */
+    @Excel(name = "血型")
+    private String bloodType;
+
+    /** 政治面貌 */
+    @Excel(name = "政治面貌")
+    private String politicalStatus;
+
+    /** 健康状况 */
+    @Excel(name = "健康状况")
+    private String health;
+
+    /** 证件照(地址) */
+    @Excel(name = "证件照(地址)")
+    private String identificationPhoto;
+
+    /** 心理状况 */
+    @Excel(name = "心理状况")
+    private String mind;
+
+    /** 门禁照(地址) */
+    @Excel(name = "门禁照(地址)")
+    private String entrancePermit;
+
+    /** 父亲 */
+    @Excel(name = "父亲")
+    private String fatherName;
+
+    /** 父亲联系方式 */
+    @Excel(name = "父亲联系方式")
+    private String fatherTelephone;
+
+    /** 母亲 */
+    @Excel(name = "母亲")
+    private String motherName;
+
+    /** 母亲联系方式 */
+    @Excel(name = "母亲联系方式")
+    private String motherTelephone;
+
+    /** 居住地址 */
+    @Excel(name = "居住地址")
+    private String address;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private String longitude;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private String latitude;
+
+    public Long getOldId() {
+        return oldId;
+    }
+
+    public void setOldId(Long oldId) {
+        this.oldId = oldId;
+    }
+
+    public void setStudentId(Long studentId)
+    {
+        this.studentId = studentId;
+    }
+
+    public Long getStudentId() 
+    {
+        return studentId;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setSex(String sex) 
+    {
+        this.sex = sex;
+    }
+
+    public String getSex() 
+    {
+        return sex;
+    }
+    public void setAge(String age) 
+    {
+        this.age = age;
+    }
+
+    public String getAge() 
+    {
+        return age;
+    }
+    public void setSchool(String school) 
+    {
+        this.school = school;
+    }
+
+    public String getSchool() 
+    {
+        return school;
+    }
+    public void setStudentNumber(String studentNumber) 
+    {
+        this.studentNumber = studentNumber;
+    }
+
+    public String getStudentNumber() 
+    {
+        return studentNumber;
+    }
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+    public void setIsNearsightedness(String isNearsightedness) 
+    {
+        this.isNearsightedness = isNearsightedness;
+    }
+
+    public String getIsNearsightedness() 
+    {
+        return isNearsightedness;
+    }
+    public void setDegreeMyopia(String degreeMyopia) 
+    {
+        this.degreeMyopia = degreeMyopia;
+    }
+
+    public String getDegreeMyopia() 
+    {
+        return degreeMyopia;
+    }
+    public void setHeight(String height) 
+    {
+        this.height = height;
+    }
+
+    public String getHeight() 
+    {
+        return height;
+    }
+    public void setWeight(String weight) 
+    {
+        this.weight = weight;
+    }
+
+    public String getWeight() 
+    {
+        return weight;
+    }
+    public void setBloodType(String bloodType) 
+    {
+        this.bloodType = bloodType;
+    }
+
+    public String getBloodType() 
+    {
+        return bloodType;
+    }
+    public void setPoliticalStatus(String politicalStatus) 
+    {
+        this.politicalStatus = politicalStatus;
+    }
+
+    public String getPoliticalStatus() 
+    {
+        return politicalStatus;
+    }
+    public void setHealth(String health) 
+    {
+        this.health = health;
+    }
+
+    public String getHealth() 
+    {
+        return health;
+    }
+    public void setIdentificationPhoto(String identificationPhoto) 
+    {
+        this.identificationPhoto = identificationPhoto;
+    }
+
+    public String getIdentificationPhoto() 
+    {
+        return identificationPhoto;
+    }
+    public void setMind(String mind) 
+    {
+        this.mind = mind;
+    }
+
+    public String getMind() 
+    {
+        return mind;
+    }
+    public void setEntrancePermit(String entrancePermit) 
+    {
+        this.entrancePermit = entrancePermit;
+    }
+
+    public String getEntrancePermit() 
+    {
+        return entrancePermit;
+    }
+    public void setFatherName(String fatherName) 
+    {
+        this.fatherName = fatherName;
+    }
+
+    public String getFatherName() 
+    {
+        return fatherName;
+    }
+    public void setFatherTelephone(String fatherTelephone) 
+    {
+        this.fatherTelephone = fatherTelephone;
+    }
+
+    public String getFatherTelephone() 
+    {
+        return fatherTelephone;
+    }
+    public void setMotherName(String motherName) 
+    {
+        this.motherName = motherName;
+    }
+
+    public String getMotherName() 
+    {
+        return motherName;
+    }
+    public void setMotherTelephone(String motherTelephone) 
+    {
+        this.motherTelephone = motherTelephone;
+    }
+
+    public String getMotherTelephone() 
+    {
+        return motherTelephone;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setLongitude(String longitude) 
+    {
+        this.longitude = longitude;
+    }
+
+    public String getLongitude() 
+    {
+        return longitude;
+    }
+    public void setLatitude(String latitude) 
+    {
+        this.latitude = latitude;
+    }
+
+    public String getLatitude() 
+    {
+        return latitude;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("oldId", getOldId())
+            .append("studentId", getStudentId())
+            .append("name", getName())
+            .append("sex", getSex())
+            .append("age", getAge())
+            .append("school", getSchool())
+            .append("studentNumber", getStudentNumber())
+            .append("idCard", getIdCard())
+            .append("isNearsightedness", getIsNearsightedness())
+            .append("degreeMyopia", getDegreeMyopia())
+            .append("height", getHeight())
+            .append("weight", getWeight())
+            .append("bloodType", getBloodType())
+            .append("politicalStatus", getPoliticalStatus())
+            .append("health", getHealth())
+            .append("identificationPhoto", getIdentificationPhoto())
+            .append("mind", getMind())
+            .append("entrancePermit", getEntrancePermit())
+            .append("fatherName", getFatherName())
+            .append("fatherTelephone", getFatherTelephone())
+            .append("motherName", getMotherName())
+            .append("motherTelephone", getMotherTelephone())
+            .append("address", getAddress())
+            .append("longitude", getLongitude())
+            .append("latitude", getLatitude())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StudentInfoOldMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.StudentInfoOld;
+
+/**
+ * 学生档案历史信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-28
+ */
+public interface StudentInfoOldMapper 
+{
+    /**
+     * 查询学生档案历史信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 学生档案历史信息
+     */
+    public StudentInfoOld selectStudentInfoOldById(Long id);
+
+    /**
+     * 查询学生档案历史信息列表
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 学生档案历史信息集合
+     */
+    public List<StudentInfoOld> selectStudentInfoOldList(StudentInfoOld studentInfoOld);
+
+    /**
+     * 新增学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    public int insertStudentInfoOld(StudentInfoOld studentInfoOld);
+
+    /**
+     * 修改学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    public int updateStudentInfoOld(StudentInfoOld studentInfoOld);
+
+    /**
+     * 删除学生档案历史信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 结果
+     */
+    public int deleteStudentInfoOldById(Long id);
+
+    /**
+     * 批量删除学生档案历史信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteStudentInfoOldByIds(Long[] ids);
+
+    List<StudentInfoOld> selectStudentInfoOldListEcharts(StudentInfoOld studentInfoOld);
+}

+ 65 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStudentInfoOldService.java

@@ -0,0 +1,65 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.StudentInfoOld;
+
+/**
+ * 学生档案历史信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-07-28
+ */
+public interface IStudentInfoOldService 
+{
+    /**
+     * 查询学生档案历史信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 学生档案历史信息
+     */
+    public StudentInfoOld selectStudentInfoOldById(Long id);
+
+    /**
+     * 查询学生档案历史信息列表
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 学生档案历史信息集合
+     */
+    public List<StudentInfoOld> selectStudentInfoOldList(StudentInfoOld studentInfoOld);
+
+    /**
+     * 新增学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    public int insertStudentInfoOld(StudentInfoOld studentInfoOld);
+
+    /**
+     * 修改学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    public int updateStudentInfoOld(StudentInfoOld studentInfoOld);
+
+    /**
+     * 批量删除学生档案历史信息
+     * 
+     * @param ids 需要删除的学生档案历史信息主键集合
+     * @return 结果
+     */
+    public int deleteStudentInfoOldByIds(Long[] ids);
+
+    /**
+     * 删除学生档案历史信息信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 结果
+     */
+    public int deleteStudentInfoOldById(Long id);
+
+    AjaxResult selectStudentInfoOldListEcharts(StudentInfoOld studentInfoOld);
+}

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/Task.java

@@ -64,4 +64,14 @@ public class Task {
         }
     }
 
+    /***
+     * 生成班级下课初始信息
+     * */
+    /*@Async
+    //@Scheduled(cron = "0 0/2 * * * ? ")
+    @Scheduled(cron = "0 1 0 * * ? ")
+    public void afterClass() throws Exception {
+
+    }*/
+
 }

+ 4 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FormalParentsStudentServiceImpl.java

@@ -4,7 +4,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.ruoyi.common.core.domain.entity.FormalParentsStudent;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -99,9 +101,8 @@ public class FormalParentsStudentServiceImpl implements IFormalParentsStudentSer
 
     @Override
     public List<FormalParentsStudent> selectFormalParentsStudentListNoPage(FormalParentsStudent formalParentsStudent) {
-        if(formalParentsStudent.getClassId()==null || formalParentsStudent.getClassId()==0L ){
-            return new ArrayList<>();
-        }
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        formalParentsStudent.setParentsId(user.getUserId());
         return formalParentsStudentMapper.selectFormalParentsStudentList(formalParentsStudent);
     }
 }

+ 127 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoOldServiceImpl.java

@@ -0,0 +1,127 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.StudentInfoOldMapper;
+import com.ruoyi.system.domain.StudentInfoOld;
+import com.ruoyi.system.service.IStudentInfoOldService;
+
+/**
+ * 学生档案历史信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-07-28
+ */
+@Service
+public class StudentInfoOldServiceImpl implements IStudentInfoOldService 
+{
+    @Autowired
+    private StudentInfoOldMapper studentInfoOldMapper;
+
+    /**
+     * 查询学生档案历史信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 学生档案历史信息
+     */
+    @Override
+    public StudentInfoOld selectStudentInfoOldById(Long id)
+    {
+        return studentInfoOldMapper.selectStudentInfoOldById(id);
+    }
+
+    /**
+     * 查询学生档案历史信息列表
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 学生档案历史信息
+     */
+    @Override
+    public List<StudentInfoOld> selectStudentInfoOldList(StudentInfoOld studentInfoOld)
+    {
+        if(studentInfoOld.getStudentId()==null || studentInfoOld.getStudentId()==0L){
+            throw new ServiceException("参数错误");
+        }
+        return studentInfoOldMapper.selectStudentInfoOldList(studentInfoOld);
+    }
+
+    /**
+     * 新增学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    @Override
+    public int insertStudentInfoOld(StudentInfoOld studentInfoOld)
+    {
+        studentInfoOld.setCreateTime(DateUtils.getNowDate());
+        return studentInfoOldMapper.insertStudentInfoOld(studentInfoOld);
+    }
+
+    /**
+     * 修改学生档案历史信息
+     * 
+     * @param studentInfoOld 学生档案历史信息
+     * @return 结果
+     */
+    @Override
+    public int updateStudentInfoOld(StudentInfoOld studentInfoOld)
+    {
+        studentInfoOld.setUpdateTime(DateUtils.getNowDate());
+        return studentInfoOldMapper.updateStudentInfoOld(studentInfoOld);
+    }
+
+    /**
+     * 批量删除学生档案历史信息
+     * 
+     * @param ids 需要删除的学生档案历史信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteStudentInfoOldByIds(Long[] ids)
+    {
+        return studentInfoOldMapper.deleteStudentInfoOldByIds(ids);
+    }
+
+    /**
+     * 删除学生档案历史信息信息
+     * 
+     * @param id 学生档案历史信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteStudentInfoOldById(Long id)
+    {
+        return studentInfoOldMapper.deleteStudentInfoOldById(id);
+    }
+
+    @Override
+    public AjaxResult selectStudentInfoOldListEcharts(StudentInfoOld studentInfoOld) {
+        if(studentInfoOld.getStudentId()==null || studentInfoOld.getStudentId()==0L){
+            throw new ServiceException("参数错误");
+        }
+        List<StudentInfoOld> StudentInfoOldList = studentInfoOldMapper.selectStudentInfoOldListEcharts(studentInfoOld);
+
+        Map<String,Object> map = new HashMap<>();
+        List<Object> x = new ArrayList<>();
+        List<Object> y1 = new ArrayList<>();
+        List<Object> y2 = new ArrayList<>();
+        for (StudentInfoOld infoOld : StudentInfoOldList) {
+            x.add(infoOld.getUpdateTime());
+            y1.add(infoOld.getHeight());
+            y2.add(infoOld.getWeight());
+        }
+        map.put("X",x);
+        map.put("Y1",y1);
+        map.put("Y2",y2);
+        return AjaxResult.success("成功",map);
+    }
+}

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

@@ -3,7 +3,11 @@ package com.ruoyi.system.service.impl;
 import java.util.List;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.ClassUtils;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.StudentInfoOld;
+import com.ruoyi.system.mapper.StudentInfoOldMapper;
+import lombok.SneakyThrows;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.StudentInfoMapper;
@@ -21,6 +25,8 @@ public class StudentInfoServiceImpl implements IStudentInfoService
 {
     @Autowired
     private StudentInfoMapper studentInfoMapper;
+    @Autowired
+    private StudentInfoOldMapper studentInfoOldMapper;
 
     /**
      * 查询学生档案信息
@@ -74,9 +80,18 @@ public class StudentInfoServiceImpl implements IStudentInfoService
      * @param studentInfo 学生档案信息
      * @return 结果
      */
+    @SneakyThrows
     @Override
     public int updateStudentInfo(StudentInfo studentInfo)
     {
+        //查询修改前数据
+        StudentInfo student = studentInfoMapper.selectStudentInfoById(studentInfo.getId());
+        StudentInfoOld studentInfoOld = new StudentInfoOld();
+        ClassUtils.copyProperties(student, studentInfoOld);
+        studentInfoOld.setCreateTime(DateUtils.getNowDate());
+        studentInfoOld.setUpdateTime(studentInfo.getCreateTime());
+        studentInfoOldMapper.insertStudentInfoOld(studentInfoOld);
+
         studentInfo.setUpdateTime(DateUtils.getNowDate());
         return studentInfoMapper.updateStudentInfo(studentInfo);
     }

+ 34 - 2
ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml

@@ -30,17 +30,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
 
+        <result property="isNearsightedness"    column="is_nearsightedness"    />
+        <result property="degreeMyopia"    column="degree_myopia"    />
+        <result property="health"    column="health"    />
+        <result property="mind"    column="mind"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+
         <result property="classId"    column="classId"    />
 
     </resultMap>
 
     <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 from student_info
+        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 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.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
         from student_info s
         left join formal_parents_student f on s.student_id = f.id
         <where>  
@@ -98,6 +108,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+
+            <if test="isNearsightedness != null">is_nearsightedness,</if>
+            <if test="degreeMyopia != null">degree_myopia,</if>
+            <if test="health != null">health,</if>
+            <if test="mind != null">mind,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="studentId != null">#{studentId},</if>
@@ -123,6 +140,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+
+            <if test="isNearsightedness != null">#{isNearsightedness},</if>
+            <if test="degreeMyopia != null">#{degreeMyopia},</if>
+            <if test="health != null">#{health},</if>
+            <if test="mind != null">#{mind},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+
          </trim>
     </insert>
 
@@ -152,6 +177,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+
+            <if test="isNearsightedness != null">is_nearsightedness= #{isNearsightedness},</if>
+            <if test="degreeMyopia != null">degree_myopia= #{degreeMyopia},</if>
+            <if test="health != null">health= #{health},</if>
+            <if test="mind != null">mind= #{mind},</if>
+            <if test="longitude != null">longitude= #{longitude},</if>
+            <if test="latitude != null">latitude= #{latitude},</if>
         </trim>
         where id = #{id}
     </update>

+ 222 - 0
ruoyi-system/src/main/resources/mapper/system/StudentInfoOldMapper.xml

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.StudentInfoOldMapper">
+    
+    <resultMap type="StudentInfoOld" id="StudentInfoOldResult">
+        <result property="oldId"    column="old_id"    />
+        <result property="studentId"    column="student_id"    />
+        <result property="name"    column="name"    />
+        <result property="sex"    column="sex"    />
+        <result property="age"    column="age"    />
+        <result property="school"    column="school"    />
+        <result property="studentNumber"    column="student_number"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="isNearsightedness"    column="is_nearsightedness"    />
+        <result property="degreeMyopia"    column="degree_myopia"    />
+        <result property="height"    column="height"    />
+        <result property="weight"    column="weight"    />
+        <result property="bloodType"    column="blood_type"    />
+        <result property="politicalStatus"    column="political_status"    />
+        <result property="health"    column="health"    />
+        <result property="identificationPhoto"    column="identification_photo"    />
+        <result property="mind"    column="mind"    />
+        <result property="entrancePermit"    column="entrance_permit"    />
+        <result property="fatherName"    column="father_name"    />
+        <result property="fatherTelephone"    column="father_telephone"    />
+        <result property="motherName"    column="mother_name"    />
+        <result property="motherTelephone"    column="mother_telephone"    />
+        <result property="address"    column="address"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </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 from student_info_old
+    </sql>
+
+    <select id="selectStudentInfoOldList" parameterType="StudentInfoOld" resultMap="StudentInfoOldResult">
+        <include refid="selectStudentInfoOldVo"/>
+        <where>  
+            <if test="studentId != null "> and student_id = #{studentId}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="age != null  and age != ''"> and age = #{age}</if>
+            <if test="school != null  and school != ''"> and school = #{school}</if>
+            <if test="studentNumber != null  and studentNumber != ''"> and student_number = #{studentNumber}</if>
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="isNearsightedness != null  and isNearsightedness != ''"> and is_nearsightedness = #{isNearsightedness}</if>
+            <if test="degreeMyopia != null  and degreeMyopia != ''"> and degree_myopia = #{degreeMyopia}</if>
+            <if test="height != null  and height != ''"> and height = #{height}</if>
+            <if test="weight != null  and weight != ''"> and weight = #{weight}</if>
+            <if test="bloodType != null  and bloodType != ''"> and blood_type = #{bloodType}</if>
+            <if test="politicalStatus != null  and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
+            <if test="health != null  and health != ''"> and health = #{health}</if>
+            <if test="identificationPhoto != null  and identificationPhoto != ''"> and identification_photo = #{identificationPhoto}</if>
+            <if test="mind != null  and mind != ''"> and mind = #{mind}</if>
+            <if test="entrancePermit != null  and entrancePermit != ''"> and entrance_permit = #{entrancePermit}</if>
+            <if test="fatherName != null  and fatherName != ''"> and father_name like concat('%', #{fatherName}, '%')</if>
+            <if test="fatherTelephone != null  and fatherTelephone != ''"> and father_telephone = #{fatherTelephone}</if>
+            <if test="motherName != null  and motherName != ''"> and mother_name like concat('%', #{motherName}, '%')</if>
+            <if test="motherTelephone != null  and motherTelephone != ''"> and mother_telephone = #{motherTelephone}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+        </where>
+        order by create_time desc
+    </select>
+    
+    <select id="selectStudentInfoOldById" parameterType="Long" resultMap="StudentInfoOldResult">
+        <include refid="selectStudentInfoOldVo"/>
+        where old_id = #{id}
+    </select>
+    <select id="selectStudentInfoOldListEcharts" resultMap="StudentInfoOldResult">
+        <include refid="selectStudentInfoOldVo"/>
+        <where>
+            <if test="studentId != null "> and student_id = #{studentId}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="sex != null  and sex != ''"> and sex = #{sex}</if>
+            <if test="age != null  and age != ''"> and age = #{age}</if>
+            <if test="school != null  and school != ''"> and school = #{school}</if>
+            <if test="studentNumber != null  and studentNumber != ''"> and student_number = #{studentNumber}</if>
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="isNearsightedness != null  and isNearsightedness != ''"> and is_nearsightedness = #{isNearsightedness}</if>
+            <if test="degreeMyopia != null  and degreeMyopia != ''"> and degree_myopia = #{degreeMyopia}</if>
+            <if test="height != null  and height != ''"> and height = #{height}</if>
+            <if test="weight != null  and weight != ''"> and weight = #{weight}</if>
+            <if test="bloodType != null  and bloodType != ''"> and blood_type = #{bloodType}</if>
+            <if test="politicalStatus != null  and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
+            <if test="health != null  and health != ''"> and health = #{health}</if>
+            <if test="identificationPhoto != null  and identificationPhoto != ''"> and identification_photo = #{identificationPhoto}</if>
+            <if test="mind != null  and mind != ''"> and mind = #{mind}</if>
+            <if test="entrancePermit != null  and entrancePermit != ''"> and entrance_permit = #{entrancePermit}</if>
+            <if test="fatherName != null  and fatherName != ''"> and father_name like concat('%', #{fatherName}, '%')</if>
+            <if test="fatherTelephone != null  and fatherTelephone != ''"> and father_telephone = #{fatherTelephone}</if>
+            <if test="motherName != null  and motherName != ''"> and mother_name like concat('%', #{motherName}, '%')</if>
+            <if test="motherTelephone != null  and motherTelephone != ''"> and mother_telephone = #{motherTelephone}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+        </where>
+        order by create_time asc
+    </select>
+
+    <insert id="insertStudentInfoOld" parameterType="StudentInfoOld" useGeneratedKeys="true" keyProperty="oldId">
+        insert into student_info_old
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="studentId != null">student_id,</if>
+            <if test="name != null">name,</if>
+            <if test="sex != null">sex,</if>
+            <if test="age != null">age,</if>
+            <if test="school != null">school,</if>
+            <if test="studentNumber != null">student_number,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="isNearsightedness != null">is_nearsightedness,</if>
+            <if test="degreeMyopia != null">degree_myopia,</if>
+            <if test="height != null">height,</if>
+            <if test="weight != null">weight,</if>
+            <if test="bloodType != null">blood_type,</if>
+            <if test="politicalStatus != null">political_status,</if>
+            <if test="health != null">health,</if>
+            <if test="identificationPhoto != null">identification_photo,</if>
+            <if test="mind != null">mind,</if>
+            <if test="entrancePermit != null">entrance_permit,</if>
+            <if test="fatherName != null">father_name,</if>
+            <if test="fatherTelephone != null">father_telephone,</if>
+            <if test="motherName != null">mother_name,</if>
+            <if test="motherTelephone != null">mother_telephone,</if>
+            <if test="address != null">address,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="studentId != null">#{studentId},</if>
+            <if test="name != null">#{name},</if>
+            <if test="sex != null">#{sex},</if>
+            <if test="age != null">#{age},</if>
+            <if test="school != null">#{school},</if>
+            <if test="studentNumber != null">#{studentNumber},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="isNearsightedness != null">#{isNearsightedness},</if>
+            <if test="degreeMyopia != null">#{degreeMyopia},</if>
+            <if test="height != null">#{height},</if>
+            <if test="weight != null">#{weight},</if>
+            <if test="bloodType != null">#{bloodType},</if>
+            <if test="politicalStatus != null">#{politicalStatus},</if>
+            <if test="health != null">#{health},</if>
+            <if test="identificationPhoto != null">#{identificationPhoto},</if>
+            <if test="mind != null">#{mind},</if>
+            <if test="entrancePermit != null">#{entrancePermit},</if>
+            <if test="fatherName != null">#{fatherName},</if>
+            <if test="fatherTelephone != null">#{fatherTelephone},</if>
+            <if test="motherName != null">#{motherName},</if>
+            <if test="motherTelephone != null">#{motherTelephone},</if>
+            <if test="address != null">#{address},</if>
+            <if test="longitude != null">#{longitude},</if>
+            <if test="latitude != null">#{latitude},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateStudentInfoOld" parameterType="StudentInfoOld">
+        update student_info_old
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="studentId != null">student_id = #{studentId},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="sex != null">sex = #{sex},</if>
+            <if test="age != null">age = #{age},</if>
+            <if test="school != null">school = #{school},</if>
+            <if test="studentNumber != null">student_number = #{studentNumber},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="isNearsightedness != null">is_nearsightedness = #{isNearsightedness},</if>
+            <if test="degreeMyopia != null">degree_myopia = #{degreeMyopia},</if>
+            <if test="height != null">height = #{height},</if>
+            <if test="weight != null">weight = #{weight},</if>
+            <if test="bloodType != null">blood_type = #{bloodType},</if>
+            <if test="politicalStatus != null">political_status = #{politicalStatus},</if>
+            <if test="health != null">health = #{health},</if>
+            <if test="identificationPhoto != null">identification_photo = #{identificationPhoto},</if>
+            <if test="mind != null">mind = #{mind},</if>
+            <if test="entrancePermit != null">entrance_permit = #{entrancePermit},</if>
+            <if test="fatherName != null">father_name = #{fatherName},</if>
+            <if test="fatherTelephone != null">father_telephone = #{fatherTelephone},</if>
+            <if test="motherName != null">mother_name = #{motherName},</if>
+            <if test="motherTelephone != null">mother_telephone = #{motherTelephone},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="longitude != null">longitude = #{longitude},</if>
+            <if test="latitude != null">latitude = #{latitude},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where old_id = #{oldId}
+    </update>
+
+    <delete id="deleteStudentInfoOldById" parameterType="Long">
+        delete from student_info_old where old_id = #{id}
+    </delete>
+
+    <delete id="deleteStudentInfoOldByIds" parameterType="String">
+        delete from student_info_old where old_id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>