Browse Source

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 1 month ago
parent
commit
d233b6c1f0

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

@@ -22,6 +22,7 @@ import com.xjrsoft.module.databoard.vo.ItemCountVo;
 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.StudentReportSignDto;
 import com.xjrsoft.module.student.dto.UpdateStudentReportRecordDto;
 import com.xjrsoft.module.student.entity.StudentReportRecord;
 import com.xjrsoft.module.student.service.IStudentReportRecordService;
@@ -320,5 +321,61 @@ public class StudentReportRecordController {
     }
 
 
+    @GetMapping(value = "/plan-page")
+    @ApiOperation(value="学生报到记录表列表(分页)")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<PageOutput<StudentReportRecordPageVo>> planPage(@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);
+    }
+
+    @PostMapping(value = "/sign")
+    @ApiOperation(value="学生报到")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<Boolean> sign(@Valid StudentReportSignDto dto){
+
+        StudentReportRecord record = studentReportRecordService.getById(dto.getId());
+
+        return RT.ok(true);
+    }
+
+    @PostMapping(value = "/all-sign")
+    @ApiOperation(value="变更已报到")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<Boolean> allSign(@Valid StudentReportSignDto dto){
+
+        StudentReportRecord record = studentReportRecordService.getById(dto.getId());
+
+        return RT.ok(true);
+    }
+
+
+    @PostMapping(value = "/update-stduyStatus")
+    @ApiOperation(value="切换就读方式")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<Boolean> updateStduyStatus(@Valid StudentReportSignDto dto){
+
+        StudentReportRecord record = studentReportRecordService.getById(dto.getId());
+
+        return RT.ok(true);
+    }
+
+    @PostMapping(value = "/export-querty")
+    @ApiOperation(value="导出")
+    @SaCheckPermission("studentreportrecord:detail")
+    public RT<Boolean> exportQuerty(@Valid StudentReportSignDto dto){
+
+        StudentReportRecord record = studentReportRecordService.getById(dto.getId());
+
+        return RT.ok(true);
+    }
+
+
 
 }

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

@@ -27,4 +27,7 @@ public class StudentReportRecordPageDto extends PageInput {
 
     @ApiModelProperty("班级id")
     private Long classId;
+
+    @ApiModelProperty("计划id")
+    private Long studentReportPlanId;
 }

+ 18 - 0
src/main/java/com/xjrsoft/module/student/dto/StudentReportSignDto.java

@@ -0,0 +1,18 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+* @title: 学生报到计划分页查询入参
+* @Author dzx
+* @Date: 2025-01-21
+* @Version 1.0
+*/
+@Data
+public class StudentReportSignDto {
+
+    @ApiModelProperty("主键id")
+    private Long id;
+}

+ 2 - 1
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentMapper.java

@@ -9,6 +9,7 @@ import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.StudentInfoVo;
 import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -35,5 +36,5 @@ public interface BaseStudentMapper extends MPJBaseMapper<BaseStudent> {
 
     Page<BaseStudentUserPageVo> getStudentPage(Page<BaseStudentUserPageVo> page, BaseStudentUserPageDto dto);
 
-    List<BaseStudentUserPageVo> getStudentList(BaseStudentUserPageDto dto);
+    List<BaseStudentUserPageVo> getStudentList(@Param("dto") BaseStudentUserPageDto dto);
 }

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

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.student.dto.StudentReportRecordPageDto;
 import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.dto.StudentReportSignDto;
 import com.xjrsoft.module.student.entity.StudentReportRecord;
 import com.xjrsoft.module.student.vo.StudentReportRecordPageVo;
 import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsListVo;
@@ -29,4 +30,7 @@ public interface IStudentReportRecordService extends MPJBaseService<StudentRepor
     Boolean removeByUserId(List<Long> ids);
 
     Page<StudentReportRecordPageVo> getMobilePage(Page<StudentReportRecordPageVo> page, StudentReportRecordPageDto dto);
+
+
+    Boolean sgin(StudentReportSignDto dto);
 }

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

@@ -180,7 +180,7 @@ public class StudentReportPlanServiceImpl extends MPJBaseServiceImpl<StudentRepo
                 user.setEnabledMark(EnabledMark.DISABLED.getCode());
             }
 
-            userService.saveBatch(userList);
+            userService.updateBatchById(userList);
         }
         return true;
     }

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

@@ -1,10 +1,12 @@
 package com.xjrsoft.module.student.service.impl;
 
+import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.module.student.dto.StudentReportRecordPageDto;
 import com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto;
+import com.xjrsoft.module.student.dto.StudentReportSignDto;
 import com.xjrsoft.module.student.entity.StudentReportRecord;
 import com.xjrsoft.module.student.mapper.StudentReportRecordMapper;
 import com.xjrsoft.module.student.service.IStudentReportRecordService;
@@ -13,7 +15,9 @@ import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsListVo;
 import com.xjrsoft.module.student.vo.StudentReportRecordStatisticsVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -47,4 +51,21 @@ public class StudentReportRecordServiceImpl extends MPJBaseServiceImpl<StudentRe
     public Page<StudentReportRecordPageVo> getMobilePage(Page<StudentReportRecordPageVo> page, StudentReportRecordPageDto dto) {
         return this.baseMapper.getMobilePage(page, dto);
     }
+
+    /**
+     * 签到,签到后,修改学生的状态信息
+     * @param dto
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean sgin(StudentReportSignDto dto) {
+        StudentReportRecord record = this.getById(dto.getId());
+        record.setModifyDate(new Date());
+        record.setUserId(StpUtil.getLoginIdAsLong());
+        record.setReportTime(new Date());
+        this.updateById(record);
+
+        return null;
+    }
 }