dzx 1 год назад
Родитель
Сommit
210ca4541b
35 измененных файлов с 1051 добавлено и 75 удалено
  1. 44 14
      src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java
  2. 0 1
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentDevelopmentController.java
  3. 0 1
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipApplicantController.java
  4. 11 13
      src/main/java/com/xjrsoft/module/student/controller/StudentConsumeDateController.java
  5. 204 0
      src/main/java/com/xjrsoft/module/student/controller/StudentReportRecordController.java
  6. 0 1
      src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentDevelopmentDto.java
  7. 0 1
      src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentScholarshipReleaseDto.java
  8. 1 5
      src/main/java/com/xjrsoft/module/student/dto/AddStudentConsumeDateDto.java
  9. 28 0
      src/main/java/com/xjrsoft/module/student/dto/AddStudentReportRecordDto.java
  10. 0 4
      src/main/java/com/xjrsoft/module/student/dto/StudentConsumeDatePageDto.java
  11. 19 0
      src/main/java/com/xjrsoft/module/student/dto/StudentReportRecordPageDto.java
  12. 23 0
      src/main/java/com/xjrsoft/module/student/dto/StudentReportRecordStatisticsDto.java
  13. 0 8
      src/main/java/com/xjrsoft/module/student/dto/UpdateStudentConsumeDateDto.java
  14. 24 0
      src/main/java/com/xjrsoft/module/student/dto/UpdateStudentReportRecordDto.java
  15. 2 5
      src/main/java/com/xjrsoft/module/student/entity/StudentConsumeDate.java
  16. 89 0
      src/main/java/com/xjrsoft/module/student/entity/StudentReportRecord.java
  17. 0 1
      src/main/java/com/xjrsoft/module/student/mapper/StudentConsumeDateMapper.java
  18. 21 0
      src/main/java/com/xjrsoft/module/student/mapper/StudentReportRecordMapper.java
  19. 0 1
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentDevelopmentService.java
  20. 0 1
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java
  21. 0 3
      src/main/java/com/xjrsoft/module/student/service/IStudentConsumeDateService.java
  22. 18 0
      src/main/java/com/xjrsoft/module/student/service/IStudentReportRecordService.java
  23. 0 1
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentScholarshipReleaseServiceImpl.java
  24. 0 6
      src/main/java/com/xjrsoft/module/student/service/impl/StudentConsumeDateServiceImpl.java
  25. 25 0
      src/main/java/com/xjrsoft/module/student/service/impl/StudentReportRecordServiceImpl.java
  26. 0 5
      src/main/java/com/xjrsoft/module/student/vo/StudentConsumeDatePageVo.java
  27. 0 3
      src/main/java/com/xjrsoft/module/student/vo/StudentConsumeDateVo.java
  28. 43 0
      src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordPageVo.java
  29. 55 0
      src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordStatisticsVo.java
  30. 40 0
      src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordVo.java
  31. 0 1
      src/main/java/com/xjrsoft/module/student/vo/WhitelistInfoVo.java
  32. 52 0
      src/main/resources/mapper/student/StudentReportRecordMapper.xml
  33. 200 0
      src/main/resources/sqlScript/20240724_sql.sql
  34. 127 0
      src/main/resources/sqlScript/20240805_sql.sql
  35. 25 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 44 - 14
src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java

@@ -618,9 +618,17 @@ public class DataUtil {
 
     public void insertCourseTableEntiy(JsonArray data, Map<String, String> classroomMap, Map<String, String> coureseMap,
                                   Map<String, String> semesterMap, Map<String, String> teacherMap, Map<String, String> classMap) {
+
+        String sql = "SELECT CONCAT(schedule_date,class_id,time_number) AS only_key,id FROM course_table";
+        List<Map<String, Object>> oldDataList = SqlRunnerAdapter.db().selectList(sql);
+        Map<String, String> oldDataMap = new HashMap<>();
+        for (Map<String, Object> objectMap : oldDataList) {
+            oldDataMap.put(objectMap.get("only_key").toString(), objectMap.get("id").toString());
+        }
         Map<Integer, Integer> tmePeriod = ScheduleUtil.getTmePeriod();
         String tableName = "course_table";
         List<Entity> entityList = new ArrayList();
+        List<String> updateSqlList = new ArrayList();
         SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
         List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList("select * from course_table");
         Set<String> serialNos = new HashSet<>();
@@ -640,24 +648,41 @@ public class DataUtil {
                 continue;
             }
             int timeNumber = asJsonObject.get("numberOfDay").getAsInt();//节次
+            String classId = classMap.get(asJsonObject.get("classSerialNo").getAsString());
+            String scheduleDate = asJsonObject.get("scheduleDate").getAsString();
+            String courseClassId = coureseMap.get(asJsonObject.get("courseClassId").getAsString());
+            String courseClassName = asJsonObject.get("courseClassName").getAsString();
+            String teacherId = "0";
+            String teacherName = "";
+            String teacher_serial_no = "";
+            if(teachers.size() > 0){
+                JsonObject teacherJson = teachers.get(0).getAsJsonObject();
+                teacherId = (teacherMap.get(teacherJson.get("teacherSerialNo").getAsString())==null?"0":teacherMap.get(teacherJson.get("teacherSerialNo").getAsString()));
+                teacherName = teacherJson.get("name").getAsString();
+                teacher_serial_no = teacherJson.get("teacherSerialNo").getAsString();
+            }
+
+            String onlyKey = scheduleDate + classId + timeNumber;
+            if(oldDataMap.get(onlyKey) != null){
+                String updSql = "update course_table set teacher_serial_no = '" + teacher_serial_no + "'" +
+                        ", teacher_id = " + teacherId
+                        + ", teacher_name = '" + teacherName + "'" +
+                        " where course_id = " + courseClassId +
+                        " and class_id = " + classId + " and time_number = " + timeNumber + ";";
+                updateSqlList.add(updSql);
+                continue;
+            }
 
             Entity entity = Entity.create(tableName);
             entity.set("id", IdUtil.getSnowflakeNextId());
             entity.set("base_semester_id", semesterMap.get(asJsonObject.get("semesterSerialNo").getAsString()));
 
-            if(teachers.size() > 0){
-                JsonObject teacherJson = teachers.get(0).getAsJsonObject();
-                entity.set("teacher_id", (teacherMap.get(teacherJson.get("teacherSerialNo").getAsString())==null?0:teacherMap.get(teacherJson.get("teacherSerialNo").getAsString())));
-                entity.set("teacher_name", teacherJson.get("name").getAsString());
-                entity.set("teacher_serial_no", teacherJson.get("teacherSerialNo").getAsString());
-            }else{
-                entity.set("teacher_id", 0);
-//                entity.set("teacher_name", "");
-//                entity.set("teacher_serial_no", "");
-            }
-            entity.set("course_id", coureseMap.get(asJsonObject.get("courseClassId").getAsString()));
-            entity.set("course_name", asJsonObject.get("courseClassName").getAsString());
-            entity.set("class_id", classMap.get(asJsonObject.get("classSerialNo").getAsString()));
+            entity.set("teacher_name", teacherName);
+            entity.set("teacher_serial_no", teacher_serial_no);
+            entity.set("teacher_id", teacherId);
+            entity.set("course_id", courseClassId);
+            entity.set("course_name", courseClassName);
+            entity.set("class_id", classId);
             entity.set("class_name", asJsonObject.get("className").getAsString());
             entity.set("weeks", asJsonObject.get("dayOfWeek").getAsInt());
             entity.set("weeks_cn", asJsonObject.get("dayOfWeekName").getAsString());
@@ -667,13 +692,18 @@ public class DataUtil {
             entity.set("site_name", asJsonObject.get("classRoomName").getAsString());
             entity.set("status", 1);
             entity.set("create_date", sdf.format(new Date()));
-            entity.set("schedule_date", asJsonObject.get("scheduleDate").getAsString());
+            entity.set("schedule_date", scheduleDate);
             entity.set("jianyue_id", asJsonObject.get("id").getAsString());
             entityList.add(entity);
         }
         if(!entityList.isEmpty()){
             SqlRunnerAdapter.db().dynamicInsertBatch(tableName, entityList);
         }
+        if(!updateSqlList.isEmpty()){
+            for (String updateSql : updateSqlList) {
+                SqlRunnerAdapter.db().update(updateSql);
+            }
+        }
     }
 
     /**

+ 0 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentDevelopmentController.java

@@ -3,7 +3,6 @@ package com.xjrsoft.module.student.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.db.Entity;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.model.result.RT;

+ 0 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipApplicantController.java

@@ -4,7 +4,6 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.toolkit.MPJWrappers;

+ 11 - 13
src/main/java/com/xjrsoft/module/student/controller/StudentConsumeDateController.java

@@ -1,38 +1,36 @@
 package com.xjrsoft.module.student.controller;
 
+import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.toolkit.MPJWrappers;
-import com.xjrsoft.common.constant.GlobalConstant;
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.utils.VoToColumnUtil;
-import com.xjrsoft.module.asset.entity.WfAssetManage;
 import com.xjrsoft.module.student.dto.AddStudentConsumeDateDto;
-import com.xjrsoft.module.student.dto.UpdateStudentConsumeDateDto;
-import cn.dev33.satoken.annotation.SaCheckPermission;
-
 import com.xjrsoft.module.student.dto.StudentConsumeDatePageDto;
-import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
+import com.xjrsoft.module.student.dto.UpdateStudentConsumeDateDto;
 import com.xjrsoft.module.student.entity.StudentConsumeDate;
 import com.xjrsoft.module.student.service.IStudentConsumeDateService;
 import com.xjrsoft.module.student.vo.StudentConsumeDatePageVo;
-
 import com.xjrsoft.module.student.vo.StudentConsumeDateVo;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
 import java.util.List;
 
 /**

+ 204 - 0
src/main/java/com/xjrsoft/module/student/controller/StudentReportRecordController.java

@@ -0,0 +1,204 @@
+package com.xjrsoft.module.student.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.BaseSemester;
+import com.xjrsoft.module.base.service.IBaseSemesterService;
+import com.xjrsoft.module.student.dto.AddStudentReportRecordDto;
+import com.xjrsoft.module.student.dto.StudentReportRecordPageDto;
+import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.dto.UpdateStudentReportRecordDto;
+import com.xjrsoft.module.student.entity.StudentReportRecord;
+import com.xjrsoft.module.student.service.IStudentReportRecordService;
+import com.xjrsoft.module.student.vo.StudentReportRecordPageVo;
+import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo;
+import com.xjrsoft.module.student.vo.StudentReportRecordVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/student" + "/studentReportRecord")
+@Api(value = "/student"  + "/studentReportRecord",tags = "学生报到记录表代码")
+@AllArgsConstructor
+public class StudentReportRecordController {
+
+
+    private final IStudentReportRecordService studentReportRecordService;
+    private final IBaseSemesterService semesterService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="学生报到记录表列表(分页)")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<PageOutput<StudentReportRecordPageVo>> page(@Valid StudentReportRecordPageDto dto){
+
+        LambdaQueryWrapper<StudentReportRecord> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                    .orderByDesc(StudentReportRecord::getId)
+                .select(StudentReportRecord.class,x -> VoToColumnUtil.fieldsToColumns(StudentReportRecordPageVo.class).contains(x.getProperty()));
+        IPage<StudentReportRecord> page = studentReportRecordService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<StudentReportRecordPageVo> pageOutput = ConventPage.getPageOutput(page, StudentReportRecordPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询学生报到记录表信息")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<StudentReportRecordVo> info(@RequestParam Long id){
+        StudentReportRecord studentReportRecord = studentReportRecordService.getById(id);
+        if (studentReportRecord == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(studentReportRecord, StudentReportRecordVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增学生报到记录表")
+    @SaCheckPermission("studentreportrecord:add")
+    public RT<Boolean> add(@Valid @RequestBody AddStudentReportRecordDto dto){
+        LambdaQueryWrapper<BaseSemester> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .orderByDesc(BaseSemester::getStartDate)
+                .select(BaseSemester.class,x -> VoToColumnUtil.fieldsToColumns(BaseSemester.class).contains(x.getProperty()));
+        List<BaseSemester> semesterList = semesterService.list(queryWrapper);
+        Long semesterId = null;
+        if(!semesterList.isEmpty()){
+            semesterId = semesterList.get(0).getId();
+        }
+        StudentReportRecord one = studentReportRecordService.getOne(
+                new QueryWrapper<StudentReportRecord>().lambda()
+                        .eq(StudentReportRecord::getUserId, dto.getUserId())
+                        .eq(StudentReportRecord::getBaseSemesterId, semesterId)
+        );
+        boolean isSuccess = true;
+        if(one != null){
+            one.setReportTime(new Date());
+            isSuccess = studentReportRecordService.updateById(one);
+        }else{
+            StudentReportRecord studentReportRecord = BeanUtil.toBean(dto, StudentReportRecord.class);
+            studentReportRecord.setBaseSemesterId(semesterId);
+            studentReportRecord.setReportTime(new Date());
+            isSuccess = studentReportRecordService.save(studentReportRecord);
+        }
+
+        return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改学生报到记录表")
+    @SaCheckPermission("studentreportrecord:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateStudentReportRecordDto dto){
+
+        StudentReportRecord studentReportRecord = BeanUtil.toBean(dto, StudentReportRecord.class);
+        return RT.ok(studentReportRecordService.updateById(studentReportRecord));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除学生报到记录表")
+    @SaCheckPermission("studentreportrecord:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(studentReportRecordService.removeBatchByIds(ids));
+
+    }
+
+    @GetMapping(value = "/mobile-page")
+    @ApiOperation(value="班主任查询(分页)")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<PageOutput<StudentReportRecordPageVo>> mobilePage(@Valid StudentReportRecordPageDto dto){
+
+        LambdaQueryWrapper<StudentReportRecord> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .orderByDesc(StudentReportRecord::getId)
+                .select(StudentReportRecord.class,x -> VoToColumnUtil.fieldsToColumns(StudentReportRecordPageVo.class).contains(x.getProperty()));
+        IPage<StudentReportRecord> page = studentReportRecordService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<StudentReportRecordPageVo> pageOutput = ConventPage.getPageOutput(page, StudentReportRecordPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/class-statistics")
+    @ApiOperation(value="班级统计")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<StudentReportRecordStatisticsVo> classStatistics(@Valid StudentReportRecordStatisticsDto dto){
+        if(dto.getTeacherId() == null){
+            dto.setTeacherId(StpUtil.getLoginIdAsLong());
+        }
+        if(dto.getBaseSemesterId() == null){
+            LambdaQueryWrapper<BaseSemester> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper
+                    .orderByDesc(BaseSemester::getStartDate)
+                    .select(BaseSemester.class,x -> VoToColumnUtil.fieldsToColumns(BaseSemester.class).contains(x.getProperty()));
+            List<BaseSemester> semesterList = semesterService.list(queryWrapper);
+            if(!semesterList.isEmpty()){
+                dto.setBaseSemesterId(semesterList.get(0).getId());
+            }
+        }
+        StudentReportRecordStatisticsVo statisticsVo = studentReportRecordService.getClassStatistics(dto);
+        long notArrivedCount = statisticsVo.getAllCount() - statisticsVo.getArrivedCount();
+        statisticsVo.setNotArrivedCount(notArrivedCount);
+        BigDecimal divide = BigDecimal.ZERO;
+        if( statisticsVo.getAllCount() != 0){
+            divide = BigDecimal.valueOf(statisticsVo.getArrivedCount()).divide(BigDecimal.valueOf(statisticsVo.getAllCount()), 4, RoundingMode.HALF_UP);
+        }
+        statisticsVo.setReportRate(divide.doubleValue());
+        return RT.ok(statisticsVo);
+    }
+
+    @GetMapping(value = "/statistics")
+    @ApiOperation(value="领导统计")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<StudentReportRecordStatisticsVo> statistics(@Valid StudentReportRecordStatisticsDto dto){
+        if(dto.getTeacherId() == null){
+            dto.setTeacherId(StpUtil.getLoginIdAsLong());
+        }
+        if(dto.getBaseSemesterId() == null){
+            LambdaQueryWrapper<BaseSemester> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper
+                    .orderByDesc(BaseSemester::getStartDate)
+                    .select(BaseSemester.class,x -> VoToColumnUtil.fieldsToColumns(BaseSemester.class).contains(x.getProperty()));
+            List<BaseSemester> semesterList = semesterService.list(queryWrapper);
+            if(!semesterList.isEmpty()){
+                dto.setBaseSemesterId(semesterList.get(0).getId());
+            }
+        }
+        StudentReportRecordStatisticsVo statisticsVo = studentReportRecordService.getClassStatistics(dto);
+        long notArrivedCount = statisticsVo.getAllCount() - statisticsVo.getArrivedCount();
+        statisticsVo.setNotArrivedCount(notArrivedCount);
+        BigDecimal divide = BigDecimal.ZERO;
+        if( statisticsVo.getAllCount() != 0){
+            divide = BigDecimal.valueOf(statisticsVo.getArrivedCount()).divide(BigDecimal.valueOf(statisticsVo.getAllCount()), 4, RoundingMode.HALF_UP);
+        }
+        statisticsVo.setReportRate(divide.doubleValue());
+        return RT.ok(statisticsVo);
+    }
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentDevelopmentDto.java

@@ -5,7 +5,6 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDate;
-import java.util.Date;
 
 
 

+ 0 - 1
src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentScholarshipReleaseDto.java

@@ -5,7 +5,6 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDate;
-import java.util.Date;
 
 
 

+ 1 - 5
src/main/java/com/xjrsoft/module/student/dto/AddStudentConsumeDateDto.java

@@ -2,13 +2,9 @@ package com.xjrsoft.module.student.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
-import java.time.LocalTime;
-import java.time.LocalDateTime;
+import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.List;
 import java.util.Date;
 
 

+ 28 - 0
src/main/java/com/xjrsoft/module/student/dto/AddStudentReportRecordDto.java

@@ -0,0 +1,28 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+public class AddStudentReportRecordDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 学生id
+    */
+    @ApiModelProperty("学生id")
+    private Long userId;
+
+}

+ 0 - 4
src/main/java/com/xjrsoft/module/student/dto/StudentConsumeDatePageDto.java

@@ -5,12 +5,8 @@ import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
 
-import java.time.LocalTime;
 import java.time.LocalDateTime;
-import java.math.BigDecimal;
-import java.util.Date;
 
 
 /**

+ 19 - 0
src/main/java/com/xjrsoft/module/student/dto/StudentReportRecordPageDto.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 学生报到记录表分页查询入参
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class StudentReportRecordPageDto extends PageInput {
+
+
+}

+ 23 - 0
src/main/java/com/xjrsoft/module/student/dto/StudentReportRecordStatisticsDto.java

@@ -0,0 +1,23 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 学生报到记录表分页查询入参
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class StudentReportRecordStatisticsDto extends PageInput {
+    @ApiModelProperty("班主人id(不传则查询当前登录者的)")
+    private Long teacherId;
+
+    @ApiModelProperty("学期id(不传查询最新一学期的)")
+    private Long baseSemesterId;
+}

+ 0 - 8
src/main/java/com/xjrsoft/module/student/dto/UpdateStudentConsumeDateDto.java

@@ -2,14 +2,6 @@ package com.xjrsoft.module.student.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import java.io.Serializable;
-
-import java.time.LocalTime;
-import java.time.LocalDateTime;
-import java.math.BigDecimal;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import java.util.List;
-import java.util.Date;
 
 
 

+ 24 - 0
src/main/java/com/xjrsoft/module/student/dto/UpdateStudentReportRecordDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+public class UpdateStudentReportRecordDto extends AddStudentReportRecordDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 2 - 5
src/main/java/com/xjrsoft/module/student/entity/StudentConsumeDate.java

@@ -2,18 +2,15 @@ package com.xjrsoft.module.student.entity;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.github.yulichang.annotation.EntityMapping;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+
 import java.io.Serializable;
-import java.time.LocalTime;
-import java.time.LocalDateTime;
 import java.math.BigDecimal;
-import java.util.List;
 import java.util.Date;
 
 

+ 89 - 0
src/main/java/com/xjrsoft/module/student/entity/StudentReportRecord.java

@@ -0,0 +1,89 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+@TableName("student_report_record")
+@ApiModel(value = "student_report_record", description = "学生报到记录表")
+public class StudentReportRecord implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 学生id
+    */
+    @ApiModelProperty("学生id")
+    private Long userId;
+    /**
+    * 报到时间
+    */
+    @ApiModelProperty("报到时间")
+    private Date reportTime;
+    /**
+    * 所属学期
+    */
+    @ApiModelProperty("所属学期")
+    private Long baseSemesterId;
+
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/mapper/StudentConsumeDateMapper.java

@@ -1,6 +1,5 @@
 package com.xjrsoft.module.student.mapper;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.student.entity.StudentConsumeDate;
 import org.apache.ibatis.annotations.Mapper;

+ 21 - 0
src/main/java/com/xjrsoft/module/student/mapper/StudentReportRecordMapper.java

@@ -0,0 +1,21 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.entity.StudentReportRecord;
+import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Mapper
+public interface StudentReportRecordMapper extends MPJBaseMapper<StudentReportRecord> {
+
+    StudentReportRecordStatisticsVo getClassStatistics(@Param("dto") StudentReportRecordStatisticsDto dto);
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/service/IBaseStudentDevelopmentService.java

@@ -3,7 +3,6 @@ package com.xjrsoft.module.student.service;
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.student.entity.BaseStudentDevelopment;
 import com.xjrsoft.module.student.vo.BaseStudentDevelopmentVo;
-import org.apache.ibatis.annotations.Param;
 
 /**
 * @title: 学生去向登记

+ 0 - 1
src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java

@@ -12,7 +12,6 @@ import com.xjrsoft.module.student.vo.BaseStudentInfoPageDataVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentSompleInfoVo;
 import com.xjrsoft.module.student.vo.MobileClassStatisticsVo;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 

+ 0 - 3
src/main/java/com/xjrsoft/module/student/service/IStudentConsumeDateService.java

@@ -1,10 +1,7 @@
 package com.xjrsoft.module.student.service;
 
-import com.baomidou.mybatisplus.extension.service.IService;
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.student.entity.StudentConsumeDate;
-import lombok.Data;
-import java.util.List;
 
 /**
 * @title: 学生消费数据

+ 18 - 0
src/main/java/com/xjrsoft/module/student/service/IStudentReportRecordService.java

@@ -0,0 +1,18 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.entity.StudentReportRecord;
+import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo;
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+
+public interface IStudentReportRecordService extends MPJBaseService<StudentReportRecord> {
+
+    StudentReportRecordStatisticsVo getClassStatistics(StudentReportRecordStatisticsDto dto);
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentScholarshipReleaseServiceImpl.java

@@ -3,7 +3,6 @@ package com.xjrsoft.module.student.service.impl;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.xjrsoft.module.room.entity.RoomBed;
 import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipApplicant;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipRelease;

+ 0 - 6
src/main/java/com/xjrsoft/module/student/service/impl/StudentConsumeDateServiceImpl.java

@@ -1,17 +1,11 @@
 package com.xjrsoft.module.student.service.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.module.student.entity.StudentConsumeDate;
 import com.xjrsoft.module.student.mapper.StudentConsumeDateMapper;
 import com.xjrsoft.module.student.service.IStudentConsumeDateService;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 
 /**
 * @title: 学生消费数据

+ 25 - 0
src/main/java/com/xjrsoft/module/student/service/impl/StudentReportRecordServiceImpl.java

@@ -0,0 +1,25 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.entity.StudentReportRecord;
+import com.xjrsoft.module.student.mapper.StudentReportRecordMapper;
+import com.xjrsoft.module.student.service.IStudentReportRecordService;
+import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 学生报到记录表
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class StudentReportRecordServiceImpl extends MPJBaseServiceImpl<StudentReportRecordMapper, StudentReportRecord> implements IStudentReportRecordService {
+    @Override
+    public StudentReportRecordStatisticsVo getClassStatistics(StudentReportRecordStatisticsDto dto) {
+        return this.baseMapper.getClassStatistics(dto);
+    }
+}

+ 0 - 5
src/main/java/com/xjrsoft/module/student/vo/StudentConsumeDatePageVo.java

@@ -1,13 +1,8 @@
 package com.xjrsoft.module.student.vo;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import com.xjrsoft.common.annotation.Trans;
-import com.xjrsoft.common.enums.TransType;
-import java.time.LocalTime;
-import java.time.LocalDateTime;
 import java.math.BigDecimal;
 import java.util.Date;
 

+ 0 - 3
src/main/java/com/xjrsoft/module/student/vo/StudentConsumeDateVo.java

@@ -3,10 +3,7 @@ package com.xjrsoft.module.student.vo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.time.LocalTime;
-import java.time.LocalDateTime;
 import java.math.BigDecimal;
-import java.util.List;
 import java.util.Date;
 
 /**

+ 43 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordPageVo.java

@@ -0,0 +1,43 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 学生报到记录表分页列表出参
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+public class StudentReportRecordPageVo {
+
+
+    /**
+    * 学生id
+    */
+    @ApiModelProperty("学生id")
+    private Long userId;
+    /**
+    * 报到时间
+    */
+    @ApiModelProperty("学生姓名")
+    private String name;
+    /**
+    * 所属学期
+    */
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
+
+    @ApiModelProperty("身份证号")
+    private String mobile;
+
+    @ApiModelProperty("就读方式")
+    private String stduyStatusCn;
+
+    @ApiModelProperty("家长电话")
+    private String parentMobile;
+
+}

+ 55 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordStatisticsVo.java

@@ -0,0 +1,55 @@
+package com.xjrsoft.module.student.vo;
+
+import com.xjrsoft.module.databoard.vo.ItemCountVo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+
+/**
+* @title: 学生报到记录表表单出参
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+public class StudentReportRecordStatisticsVo {
+
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("班主任")
+    private String teacherName;
+
+    @ApiModelProperty("报到率")
+    private Double reportRate;
+
+    @ApiModelProperty("总人数")
+    private Long allCount;
+
+    @ApiModelProperty("男生人数")
+    private Long maleCount;
+
+    @ApiModelProperty("女生人数")
+    private Long femaleCount;
+
+    @ApiModelProperty("已到人数")
+    private Long arrivedCount;
+
+    @ApiModelProperty("未到人数")
+    private Long notArrivedCount;
+
+
+    @ApiModelProperty("已到男生人数")
+    private Long arrivedMaleCount;
+
+
+    @ApiModelProperty("已到女生人数")
+    private Long arrivedFemaleCount;
+
+    @ApiModelProperty("")
+    private List<ItemCountVo> graduatedUniversityList;
+
+}

+ 40 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordVo.java

@@ -0,0 +1,40 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 学生报到记录表表单出参
+* @Author dzx
+* @Date: 2024-08-28
+* @Version 1.0
+*/
+@Data
+public class StudentReportRecordVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 学生id
+    */
+    @ApiModelProperty("学生id")
+    private Long userId;
+    /**
+    * 报到时间
+    */
+    @ApiModelProperty("报到时间")
+    private Date reportTime;
+    /**
+    * 所属学期
+    */
+    @ApiModelProperty("所属学期")
+    private Long baseSemesterId;
+
+
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/vo/WhitelistInfoVo.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 
 /**
 * @title: 专业分类表表单出参

+ 52 - 0
src/main/resources/mapper/student/StudentReportRecordMapper.xml

@@ -0,0 +1,52 @@
+<?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.xjrsoft.module.student.mapper.StudentReportRecordMapper">
+    <select id="getClassStatistics" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto"
+            resultType="com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo">
+        SELECT t1.name AS class_name,t2.name AS teacher_name,
+        (
+        SELECT COUNT(*) FROM xjr_user a1
+        INNER JOIN base_student_school_roll a2 ON a1.id = a2.user_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
+        AND a2.class_id = t1.id
+        ) AS all_count,
+        (
+        SELECT COUNT(*) FROM xjr_user a1
+        INNER JOIN base_student_school_roll a2 ON a1.id = a2.user_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
+        AND a1.gender = 'SB10001' AND a2.class_id = t1.id
+        ) AS male_count,
+        (
+        SELECT COUNT(*) FROM xjr_user a1
+        INNER JOIN base_student_school_roll a2 ON a1.id = a2.user_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
+        AND a1.gender = 'SB10002' AND a2.class_id = t1.id
+        ) AS female_count,
+        (
+        SELECT COUNT(*) FROM xjr_user a1
+        INNER JOIN base_student_school_roll a2 ON a1.id = a2.user_id
+        INNER JOIN student_report_record a3 ON a1.id = a3.user_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
+        AND a2.class_id = t1.id AND a3.base_semester_id = #{dto.baseSemesterId} AND a3.report_time IS NOT NULL
+        ) AS arrived_count
+        FROM base_class t1
+        INNER JOIN xjr_user t2 ON t1.teacher_id = t2.id
+        WHERE t1.delete_mark = 0
+        AND t1.teacher_id = #{dto.teacherId}
+    </select>
+    <select id="getClassStatistics" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto"
+            resultType="com.xjrsoft.module.student.vo.StudentReportRecordPageVo">
+        SELECT t1.id as user_id,t1.name,t1.credential_number,t1.mobile,t4.name AS stduy_status_cn,t5.telephone AS parent_mobile FROM xjr_user t1
+        INNER JOIN base_student_school_roll t2 ON t1.id = t2.user_id
+        INNER JOIN base_class t3 ON t2.class_id = t3.id
+        LEFT JOIN xjr_dictionary_detail t4 ON t2.stduy_status = t4.code
+        LEFT JOIN base_student_family t5 ON t5.user_id = t1.id
+        LEFT JOIN student_report_record t6 ON t1.id = t6.user_id
+        AND t6.base_semester_id = #{dto.baseSemesterId}
+        WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
+        AND t2.class_id = #{dto.teacherId}
+        ORDER BY t1.create_date DESC, t2.create_date DESC,t3.create_date DESC
+    </select>
+</mapper>

+ 200 - 0
src/main/resources/sqlScript/20240724_sql.sql

@@ -0,0 +1,200 @@
+-- --------------------------------------------------------------------------------------------
+-- 微信消息模板
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS wechat_message_template;   
+CREATE TABLE `wechat_message_template` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `name` BIGINT DEFAULT NULL COMMENT '活动(activity_info)',
+  user_id DATETIME DEFAULT NULL COMMENT '参与人(xjr_user)',
+  STATUS INT DEFAULT 0 COMMENT '状态(0:待确认 1:未参与 2:已参与)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='活动登记表';
+
+
+ALTER TABLE  `textbook`   
+  CHANGE `textbook_type` `textbook_type` VARCHAR(20) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '教材分类(xjr_dictionary_item[textbook_type])',
+  ADD COLUMN `textbook_category` VARCHAR(30) NULL   COMMENT '教材类型' AFTER `work_total_count`;
+
+-- --------------------------------------------------------------------------------------------
+-- 奖学金发放记录表
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS base_student_scholarship_release;   
+CREATE TABLE `base_student_scholarship_release` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `base_student_scholarship_applicant_id` BIGINT DEFAULT NULL COMMENT '奖学金申请id',
+  `amount` DOUBLE DEFAULT NULL COMMENT '发放金额',
+  `release_date` DATETIME DEFAULT NULL COMMENT '发放日期',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='奖学金发放记录表';
+
+
+ALTER TABLE `base_student_scholarship_applicant`   
+  ADD COLUMN `bank_user_name` VARCHAR(50) NULL   COMMENT '银行账户名称' AFTER `release_status`;
+
+ALTER TABLE `base_student_scholarship_applicant`   
+  CHANGE `release_status` `release_status` INT DEFAULT 0  NOT NULL   COMMENT '发放状态(2:全部发放 1:部分发放 0:未发放)';
+
+DROP TABLE IF EXISTS base_employment_information;
+CREATE TABLE `base_employment_information` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATE DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `job_name` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '就业岗位名称',
+  `salary` VARCHAR(100) DEFAULT NULL COMMENT '薪资待遇',
+  `industry_information` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '行业信息',
+  `develop_prospect` VARCHAR(500) DEFAULT NULL COMMENT '发展前景',
+  `employ_advice` VARCHAR(500) DEFAULT NULL COMMENT '就业建议',
+  `major_set` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '关联专业方向',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='就业信息维护';
+
+ALTER TABLE `base_student_scholarship_applicant`   
+  ADD COLUMN `review_status` INT DEFAULT 0  NULL   COMMENT '评审状态' AFTER `bank_user_name`;
+
+
+-- --------------------------------------------------------------------------------------------
+-- 第二课堂
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS second_course;   
+CREATE TABLE `second_course` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `base_semester_id` BIGINT DEFAULT NULL COMMENT '学期id',
+  `name` VARCHAR(100) DEFAULT NULL COMMENT '课程名称',
+  `content` VARCHAR(1000) DEFAULT NULL COMMENT '课程主要内容',
+  `place` VARCHAR(100) DEFAULT NULL COMMENT '开课地点',
+  `teacher_name` VARCHAR(40) DEFAULT NULL COMMENT '讲课老师',
+  `cover_id` BIGINT DEFAULT NULL COMMENT '封面图片',
+  `enroll_range` TEXT DEFAULT NULL COMMENT '参与范围',
+  `status` INT DEFAULT 0 COMMENT '状态(0:未发布 1:进行中 2:已结束)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='第二课堂';
+
+-- --------------------------------------------------------------------------------------------
+-- 第二课堂开课时间
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS second_course_time;   
+CREATE TABLE `second_course_time` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `second_course_id` BIGINT DEFAULT NULL COMMENT '第二课堂id',
+  `class_time` VARCHAR(50) DEFAULT NULL COMMENT '上课日期',
+  `time_period` INT DEFAULT NULL COMMENT '时段(1=上午 2=下午 3=晚上)',
+  `start_time` TIME DEFAULT NULL COMMENT '开始时间',
+  `end_time` TIME DEFAULT NULL COMMENT '结束时间',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='第二课堂开课时间';
+
+-- --------------------------------------------------------------------------------------------
+-- 第二课堂参与范围
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS second_course_enroll_range;   
+CREATE TABLE `second_course_enroll_range` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `second_course_id` BIGINT DEFAULT NULL COMMENT '第二课堂id',
+  `class_id` BIGINT DEFAULT NULL COMMENT '班级id',
+  `dept_id` BIGINT DEFAULT NULL COMMENT '部门id',
+  `user_id` BIGINT DEFAULT NULL COMMENT '用户id',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='第二课堂参与范围';
+
+
+-- --------------------------------------------------------------------------------------------
+-- 第二课堂报名表
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS second_course_enroll;   
+CREATE TABLE `second_course_enroll` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `second_course_id` BIGINT DEFAULT NULL COMMENT '第二课堂id',
+  `user_id` BIGINT DEFAULT NULL COMMENT '用户id',
+  `status` BIGINT DEFAULT NULL COMMENT '状态',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='第二课堂报名表';
+
+ALTER TABLE `activity_enroll`   
+  ADD INDEX (`user_id`);
+ALTER TABLE `activity_enroll`   
+  ADD INDEX (`activity_info_id`);
+  
+ALTER TABLE `second_course_enroll`   
+  ADD INDEX (`user_id`);
+ALTER TABLE `second_course_enroll`   
+  ADD INDEX (`second_course_id`);
+  
+ALTER TABLE `base_teacher`   
+  ADD INDEX (`user_id`);
+ALTER TABLE `base_student`   
+  ADD INDEX (`user_id`);
+
+DROP TABLE IF EXISTS wf_repair_declaration;   
+CREATE TABLE `wf_repair_declaration` (
+  `id` BIGINT NOT NULL,
+  `user_id` BIGINT DEFAULT NULL COMMENT '申请人',
+  `application_time` DATETIME DEFAULT NULL COMMENT '申请时间',
+  `department` BIGINT DEFAULT NULL COMMENT '所在部门',
+  `department_leader` BIGINT DEFAULT NULL COMMENT '部门领导',
+  `telephone` VARCHAR(500) DEFAULT NULL COMMENT '联系电话',
+  `repair_location` VARCHAR(500) DEFAULT NULL COMMENT '维修地点',
+  `maintenance_description` VARCHAR(700) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修情况说明',
+  `upkeep_classify` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修分类',
+  `is_artificial` VARCHAR(50) DEFAULT NULL COMMENT '是否人为损坏',
+  `is_cash` VARCHAR(50) DEFAULT NULL COMMENT '是否现金赔偿',
+  `indemnity` VARCHAR(50) DEFAULT NULL COMMENT '赔偿金额',
+  `maintenance_feedback` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修反馈',
+  `annex` BIGINT DEFAULT NULL COMMENT '附件',
+  `qr_code` BIGINT DEFAULT NULL COMMENT '二维码',
+  `status` INT DEFAULT NULL COMMENT '流程状态',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='维修申报流程';
+
+-- --------------------------------------------------------------------------------------------
+-- 流程提醒记录表
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS xjr_workflow_alert_record;   
+CREATE TABLE `xjr_workflow_alert_record` (
+  `id` BIGINT NOT NULL,
+  `send_time` DATETIME DEFAULT NULL COMMENT '提醒时间',
+  `user_id` BIGINT DEFAULT NULL COMMENT '被提醒人id',
+  `process_name` VARCHAR(200) DEFAULT NULL COMMENT '流程名称',
+  `process_id` BIGINT DEFAULT NULL COMMENT '进程id',
+  `type` INT DEFAULT NULL COMMENT '提醒类别(1:超时提醒...)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='流程提醒记录表';

+ 127 - 0
src/main/resources/sqlScript/20240805_sql.sql

@@ -0,0 +1,127 @@
+-- --------------------------------------------------------------------------------------------
+-- 学生去向登记
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS base_student_development;   
+CREATE TABLE `base_student_development` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `user_id` BIGINT DEFAULT NULL COMMENT '学生id(xjr_user)',
+  `enroll_type` INT DEFAULT NULL COMMENT '登记类型(1:升学 2:就业 3:未就业)',
+  `base_student_graduate_id` BIGINT DEFAULT NULL COMMENT '毕业id(base_student_graduate)',
+  `is_entrepreneurship` INT DEFAULT NULL COMMENT '是否自己创业(1:是 0:否)',
+  `entrepreneurial_project` VARCHAR(100) DEFAULT NULL COMMENT '创业项目名称',
+  `is_flexible_work` INT DEFAULT NULL COMMENT '是否灵活就业(1:是 0:否)',
+  `work_content` VARCHAR(1000) DEFAULT NULL COMMENT '工作内容',
+  `is_company_coop` INT DEFAULT NULL COMMENT '是否校企合作单位(1:是 0:否)',
+  `company_coop_id` BIGINT DEFAULT NULL COMMENT '企合作单位(company_coop),是校企合作单位',
+  `work_company` VARCHAR(100) DEFAULT NULL COMMENT '就业单位名称(非校企合作单位)',
+  `company_industry` VARCHAR(100) DEFAULT NULL COMMENT '就业单位行业',
+  `company_nature` VARCHAR(100) DEFAULT NULL COMMENT '就业单位性质',
+  `company_scale` VARCHAR(50) DEFAULT NULL COMMENT '就业单位规模(xjr_dictionary_item[company_scale])',
+  `is_matching` INT DEFAULT NULL COMMENT '是否对口(1:是 0:否)',
+  `money` DOUBLE DEFAULT NULL COMMENT '最低薪资',
+  `work_date` DATE DEFAULT NULL COMMENT '就业日期',
+  `work_city` VARCHAR(50) DEFAULT NULL COMMENT '就业所在地区',
+  `culture_type` VARCHAR(50) DEFAULT NULL COMMENT '学生类型(xjr_dictionary_item[culture_type])',
+  `ascending_channels` VARCHAR(50) DEFAULT NULL COMMENT '升学渠道(xjr_dictionary_item[ascending_channels])',
+  `school` VARCHAR(50) DEFAULT NULL COMMENT '学校名称',
+  `admission_major` VARCHAR(50) DEFAULT NULL COMMENT '录取专业',
+  `score`INT DEFAULT NULL COMMENT '分数',
+  `ascending_arrangement` VARCHAR(50) DEFAULT NULL COMMENT '升学层次(xjr_dictionary_item[education_type])',
+  `unemployed_type` VARCHAR(50) DEFAULT NULL COMMENT '未就业类型(xjr_dictionary_item[unemployed_type])',
+  `remark` VARCHAR(500) DEFAULT NULL COMMENT '备注信息',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生去向登记';
+
+
+ALTER TABLE `room_bed_check_record`   
+  CHANGE `condition` `record` VARCHAR(1000) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL   COMMENT '情况';
+
+ALTER TABLE `xjr_department`   
+  ADD COLUMN `is_major` INT NULL   COMMENT '是否专业部(1:是 0:否)' AFTER `department_type`;
+  
+-- --------------------------------------------------------------------------------------------
+-- 功能分类设置
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS xjr_menu_group_set;   
+CREATE TABLE `xjr_menu_group_set` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `name` VARCHAR(100) DEFAULT NULL COMMENT '功能分类名称',
+  `code` VARCHAR(50) DEFAULT NULL COMMENT '分组代码(xjr_dictionary_item[xjr_menu_group])',
+  `use_range` INT DEFAULT NULL COMMENT '使用范围(1:全部学生 2:白名单学生)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='功能分类设置';
+INSERT INTO xjr_menu_group_set(id, create_user_id,create_date, NAME, CODE, use_range,delete_mark,enabled_mark) 
+VALUES(1821825335458217984,1000000000000000000,NOW(),'基础功能','XMGS_001',1,0,1),
+(1821825335458217985,1000000000000000000,NOW(),'增值功能','XMGS_002',2,0,1);
+
+
+DROP TABLE IF EXISTS xjr_menu_group;   
+CREATE TABLE `xjr_menu_group` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `xjr_menu_id` BIGINT DEFAULT NULL COMMENT '菜单id(xjr_menu)',
+  `xjr_menu_group_set_id` BIGINT DEFAULT NULL COMMENT '功能分类设置(xjr_menu_group_set)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='功能分类设置菜单关联表';
+
+-- --------------------------------------------------------------------------------------------
+-- 系统提示信息设置
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS xjr_tips_message;   
+CREATE TABLE `xjr_tips_message` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `group_name` VARCHAR(100) DEFAULT NULL COMMENT '消息分组',
+  `name` VARCHAR(100) DEFAULT NULL COMMENT '提示名称',
+  `code` VARCHAR(50) DEFAULT NULL COMMENT '唯一code',
+  `content` VARCHAR(500) DEFAULT NULL COMMENT '消息内容',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统提示信息设置';
+INSERT INTO xjr_tips_message(id, create_user_id,create_date, group_name,`name`, `code`,delete_mark,enabled_mark) 
+VALUES(1821825335458217986,1000000000000000000,NOW(),'teleservice','无权限提示语','XTM_001',0,1),
+(1821825335458217987,1000000000000000000,NOW(),'teleservice','家长绑定非校园卡学生提示语','XTM_002',0,1);
+
+INSERT INTO xjr_tips_message(id, create_user_id,create_date, group_name,`name`, `code`,delete_mark,enabled_mark) 
+VALUES(1821825335458217988,1000000000000000000,NOW(),'teleservice','报名流程','XTM_008',0,1);
+
+
+
+DROP PROCEDURE IF EXISTS createCom;
+DELIMITER $$
+CREATE
+    PROCEDURE createCom()
+BEGIN
+    IF NOT EXISTS(SELECT 1 FROM information_schema.columns  WHERE table_name='base_class' AND COLUMN_NAME = 'major_set_id') THEN
+ALTER TABLE `base_class`   
+  ADD COLUMN `major_set_id` BIGINT NULL   COMMENT '专业方向id(base_major_set)' AFTER `class_type`;
+    END IF;
+END$$
+DELIMITER ;
+CALL createCom;
+DROP PROCEDURE createCom;
+
+UPDATE base_class t1
+INNER JOIN base_class_major_set t2 ON t1.id = t2.class_id
+SET t1.major_set_id = t2.major_set_id;

+ 25 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -3717,4 +3717,29 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcStudentReportRecord() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("student_report_record");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("student");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }