Browse Source

奖助学金调整

dzx 7 months ago
parent
commit
8494aa8459
19 changed files with 217 additions and 44 deletions
  1. 2 4
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentInfoController.java
  2. 1 2
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipApplicantController.java
  3. 19 6
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipCategoryController.java
  4. 0 7
      src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java
  5. 0 1
      src/main/java/com/xjrsoft/module/student/dto/ActiveAccountDto.java
  6. 5 1
      src/main/java/com/xjrsoft/module/student/entity/BaseMajor.java
  7. 3 0
      src/main/java/com/xjrsoft/module/student/entity/BaseStudentScholarshipApplicant.java
  8. 6 0
      src/main/java/com/xjrsoft/module/student/mapper/BaseStudentScholarshipCategoryMapper.java
  9. 7 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentScholarshipCategoryService.java
  10. 1 1
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java
  11. 20 11
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentScholarshipCategoryServiceImpl.java
  12. 1 1
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java
  13. 22 3
      src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java
  14. 46 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentScholarshipCategoryStatisticPageVo.java
  15. 0 2
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentSompleInfoVo.java
  16. 0 5
      src/main/java/com/xjrsoft/module/student/vo/EnrollmentPlanTreeVo.java
  17. 19 0
      src/main/resources/mapper/student/BaseStudentScholarshipCategoryMapper.xml
  18. 39 0
      src/main/resources/mapper/student/BaseStudentScholarshipReleaseMapper.xml
  19. 26 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 2 - 4
src/main/java/com/xjrsoft/module/student/controller/BaseStudentInfoController.java

@@ -6,10 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
-import com.xjrsoft.module.banding.dto.ChangeClassDto;
-import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
+import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
@@ -23,7 +22,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 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;
@@ -43,7 +41,7 @@ import java.util.List;
 @RequestMapping("/student" + "/basestudentinfo")
 @Api(value = "/student"  + "/basestudentinfo",tags = "学生信息修改管理")
 @AllArgsConstructor
-public class BaseStudentInfoController {
+public class  BaseStudentInfoController {
 
     private final IStudentManagerService studentManagerService;
     private final IBaseStudentSchoolRollService baseStudentSchoolRollService;

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

@@ -107,7 +107,7 @@ public class BaseStudentScholarshipApplicantController {
     public RT<Boolean> add(@Valid @RequestBody AddBaseStudentScholarshipApplicantDto dto){
         BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
         boolean isSuccess = applicantService.save(baseStudentScholarshipApplicant);
-    return RT.ok(isSuccess);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping
@@ -117,7 +117,6 @@ public class BaseStudentScholarshipApplicantController {
 
         BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
         return RT.ok(applicantService.updateById(baseStudentScholarshipApplicant));
-
     }
 
     @DeleteMapping

+ 19 - 6
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipCategoryController.java

@@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
@@ -12,10 +13,12 @@ import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.student.dto.AddBaseStudentScholarshipCategoryDto;
 import com.xjrsoft.module.student.dto.BaseStudentScholarshipCategoryPageDto;
+import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentScholarshipCategoryDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
 import com.xjrsoft.module.student.service.IBaseStudentScholarshipCategoryService;
 import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryStatisticPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryVo;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import io.swagger.annotations.Api;
@@ -46,13 +49,13 @@ import java.util.List;
 public class BaseStudentScholarshipCategoryController {
 
 
-    private final IBaseStudentScholarshipCategoryService baseStudentScholarshipCategoryService;
+    private final IBaseStudentScholarshipCategoryService categoryService;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="奖学金类别列表(分页)")
     @SaCheckPermission("basestudentscholarshipcategory:detail")
     public RT<PageOutput<BaseStudentScholarshipCategoryPageVo>> page(@Valid BaseStudentScholarshipCategoryPageDto dto){
-        IPage<BaseStudentScholarshipCategoryPageVo> page = baseStudentScholarshipCategoryService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipCategoryPageVo.class,
+        IPage<BaseStudentScholarshipCategoryPageVo> page = categoryService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipCategoryPageVo.class,
             MPJWrappers.<BaseStudentScholarshipCategory>lambdaJoin().disableSubLogicDel()
             .like(StrUtil.isNotEmpty(dto.getScholarshipName()), BaseStudentScholarshipCategory::getName, dto.getScholarshipName())
             .like(StrUtil.isNotEmpty(dto.getScholarshipSource()), DictionaryDetail::getName, dto.getScholarshipSource())
@@ -73,7 +76,7 @@ public class BaseStudentScholarshipCategoryController {
     @ApiOperation(value="根据id查询奖学金类别信息")
     @SaCheckPermission("basestudentscholarshipcategory:detail")
     public RT<BaseStudentScholarshipCategoryVo> info(@RequestParam Long id){
-        BaseStudentScholarshipCategory baseStudentScholarshipCategory = baseStudentScholarshipCategoryService.getByIdDeep(id);
+        BaseStudentScholarshipCategory baseStudentScholarshipCategory = categoryService.getByIdDeep(id);
         if (baseStudentScholarshipCategory == null) {
            return RT.error("找不到此数据!");
         }
@@ -86,7 +89,7 @@ public class BaseStudentScholarshipCategoryController {
     @SaCheckPermission("basestudentscholarshipcategory:add")
     public RT<Boolean> add(@Valid @RequestBody AddBaseStudentScholarshipCategoryDto dto){
         BaseStudentScholarshipCategory baseStudentScholarshipCategory = BeanUtil.toBean(dto, BaseStudentScholarshipCategory.class);
-        boolean isSuccess = baseStudentScholarshipCategoryService.add(baseStudentScholarshipCategory);
+        boolean isSuccess = categoryService.add(baseStudentScholarshipCategory);
         return RT.ok(isSuccess);
     }
 
@@ -96,7 +99,7 @@ public class BaseStudentScholarshipCategoryController {
     public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentScholarshipCategoryDto dto){
 
         BaseStudentScholarshipCategory baseStudentScholarshipCategory = BeanUtil.toBean(dto, BaseStudentScholarshipCategory.class);
-        return RT.ok(baseStudentScholarshipCategoryService.update(baseStudentScholarshipCategory));
+        return RT.ok(categoryService.update(baseStudentScholarshipCategory));
 
     }
 
@@ -104,8 +107,18 @@ public class BaseStudentScholarshipCategoryController {
     @ApiOperation(value = "删除奖学金类别")
     @SaCheckPermission("basestudentscholarshipcategory:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
-        return RT.ok(baseStudentScholarshipCategoryService.delete(ids));
+        return RT.ok(categoryService.delete(ids));
 
     }
 
+    @GetMapping(value = "/statistics-page")
+    @ApiOperation(value="奖学金统计(分页)")
+    @SaCheckPermission("basestudentscholarshipcategory:detail")
+    public RT<PageOutput<BaseStudentScholarshipCategoryStatisticPageVo>> statisticsPage(@Valid BaseStudentScholarshipReleasePageDto dto){
+        Page<BaseStudentScholarshipCategoryStatisticPageVo> page = categoryService.getStatisticsPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+
+        PageOutput<BaseStudentScholarshipCategoryStatisticPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipCategoryStatisticPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
 }

+ 0 - 7
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -23,26 +23,19 @@ import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseGrade;
-import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.concat.service.IXjrUserService;
 import com.xjrsoft.module.hikvision.util.DataUtil;
-import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
-import com.xjrsoft.module.organization.service.IDepartmentService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.room.service.IRoomBedService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
-import com.xjrsoft.module.student.entity.BaseClassMajorSet;
-import com.xjrsoft.module.student.entity.BaseMajor;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
-import com.xjrsoft.module.student.service.IBaseMajorService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
-import com.xjrsoft.module.student.vo.BaseClassMajorSetVo;
 import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentSchoolRollVo;
 import com.xjrsoft.module.student.vo.BaseStudentTreeVo;

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

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 
 /**

+ 5 - 1
src/main/java/com/xjrsoft/module/student/entity/BaseMajor.java

@@ -1,6 +1,10 @@
 package com.xjrsoft.module.student.entity;
 
-import com.baomidou.mybatisplus.annotation.*;
+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;

+ 3 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentScholarshipApplicant.java

@@ -155,5 +155,8 @@ public class BaseStudentScholarshipApplicant implements Serializable {
     @ApiModelProperty("发放状态(1:已发放 0:未发放)")
     private Integer releaseStatus;
 
+    @ApiModelProperty("银行账户名称")
+    private String bankUserName;
+
 
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentScholarshipCategoryMapper.java

@@ -1,8 +1,13 @@
 package com.xjrsoft.module.student.mapper;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryStatisticPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
 * @title: 奖学金类别
@@ -13,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface BaseStudentScholarshipCategoryMapper extends MPJBaseMapper<BaseStudentScholarshipCategory> {
 
+    Page<BaseStudentScholarshipCategoryStatisticPageVo> getStatisticsPage(Page<BaseStudentScholarshipReleasePageVo> page, @Param("dto") BaseStudentScholarshipReleasePageDto dto);
 }

+ 7 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentScholarshipCategoryService.java

@@ -1,7 +1,12 @@
 package com.xjrsoft.module.student.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryStatisticPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -36,4 +41,6 @@ public interface IBaseStudentScholarshipCategoryService extends MPJBaseService<B
     * @return
     */
     Boolean delete(List<Long> ids);
+
+    Page<BaseStudentScholarshipCategoryStatisticPageVo> getStatisticsPage(Page<BaseStudentScholarshipReleasePageVo> page, BaseStudentScholarshipReleasePageDto dto);
 }

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

@@ -2,9 +2,9 @@ package com.xjrsoft.module.student.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
-import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
+import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo;

+ 20 - 11
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentScholarshipCategoryServiceImpl.java

@@ -1,12 +1,16 @@
 package com.xjrsoft.module.student.service.impl;
 
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipLevel;
 import com.xjrsoft.module.student.mapper.BaseStudentScholarshipCategoryMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentScholarshipLevelMapper;
 import com.xjrsoft.module.student.service.IBaseStudentScholarshipCategoryService;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryStatisticPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -24,18 +28,18 @@ import java.util.stream.Collectors;
 @Service
 @AllArgsConstructor
 public class BaseStudentScholarshipCategoryServiceImpl extends MPJBaseServiceImpl<BaseStudentScholarshipCategoryMapper, BaseStudentScholarshipCategory> implements IBaseStudentScholarshipCategoryService {
-    private final BaseStudentScholarshipCategoryMapper baseStudentScholarshipCategoryBaseStudentScholarshipCategoryMapper;
+    private final BaseStudentScholarshipCategoryMapper categoryMapper;
 
-    private final BaseStudentScholarshipLevelMapper baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper;
+    private final BaseStudentScholarshipLevelMapper levelMapper;
 
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean add(BaseStudentScholarshipCategory baseStudentScholarshipCategory) {
-        baseStudentScholarshipCategoryBaseStudentScholarshipCategoryMapper.insert(baseStudentScholarshipCategory);
+        categoryMapper.insert(baseStudentScholarshipCategory);
         for (BaseStudentScholarshipLevel baseStudentScholarshipLevel : baseStudentScholarshipCategory.getBaseStudentScholarshipLevelList()) {
             baseStudentScholarshipLevel.setBaseStudentScholarshipCategoryId(baseStudentScholarshipCategory.getId());
-            baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.insert(baseStudentScholarshipLevel);
+            levelMapper.insert(baseStudentScholarshipLevel);
         }
 
         return true;
@@ -44,11 +48,11 @@ public class BaseStudentScholarshipCategoryServiceImpl extends MPJBaseServiceImp
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean update(BaseStudentScholarshipCategory baseStudentScholarshipCategory) {
-        baseStudentScholarshipCategoryBaseStudentScholarshipCategoryMapper.updateById(baseStudentScholarshipCategory);
+        categoryMapper.updateById(baseStudentScholarshipCategory);
         //********************************* BaseStudentScholarshipLevel  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BaseStudentScholarshipLevel> baseStudentScholarshipLevelList = baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.selectList(Wrappers.lambdaQuery(BaseStudentScholarshipLevel.class).eq(BaseStudentScholarshipLevel::getBaseStudentScholarshipCategoryId, baseStudentScholarshipCategory.getId()).select(BaseStudentScholarshipLevel::getId));
+            List<BaseStudentScholarshipLevel> baseStudentScholarshipLevelList = levelMapper.selectList(Wrappers.lambdaQuery(BaseStudentScholarshipLevel.class).eq(BaseStudentScholarshipLevel::getBaseStudentScholarshipCategoryId, baseStudentScholarshipCategory.getId()).select(BaseStudentScholarshipLevel::getId));
             List<Long> baseStudentScholarshipLevelIds = baseStudentScholarshipLevelList.stream().map(BaseStudentScholarshipLevel::getId).collect(Collectors.toList());
             //原有子表单 没有被删除的主键
             List<Long> baseStudentScholarshipLevelOldIds = baseStudentScholarshipCategory.getBaseStudentScholarshipLevelList().stream().map(BaseStudentScholarshipLevel::getId).filter(Objects::nonNull).collect(Collectors.toList());
@@ -58,18 +62,18 @@ public class BaseStudentScholarshipCategoryServiceImpl extends MPJBaseServiceImp
             for (BaseStudentScholarshipLevel baseStudentScholarshipLevel : baseStudentScholarshipCategory.getBaseStudentScholarshipLevelList()) {
                 //如果不等于空则修改
                 if (baseStudentScholarshipLevel.getId() != null) {
-                    baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.updateById(baseStudentScholarshipLevel);
+                    levelMapper.updateById(baseStudentScholarshipLevel);
                 }
                 //如果等于空 则新增
                 else {
                     //已经不存在的id 删除
                     baseStudentScholarshipLevel.setBaseStudentScholarshipCategoryId(baseStudentScholarshipCategory.getId());
-                    baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.insert(baseStudentScholarshipLevel);
+                    levelMapper.insert(baseStudentScholarshipLevel);
                 }
             }
             //已经不存在的id 删除
             if(baseStudentScholarshipLevelRemoveIds.size() > 0){
-                baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.deleteBatchIds(baseStudentScholarshipLevelRemoveIds);
+                levelMapper.deleteBatchIds(baseStudentScholarshipLevelRemoveIds);
             }
         }
         //********************************* BaseStudentScholarshipLevel  增删改  结束 *******************************************/
@@ -80,9 +84,14 @@ public class BaseStudentScholarshipCategoryServiceImpl extends MPJBaseServiceImp
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
-        baseStudentScholarshipCategoryBaseStudentScholarshipCategoryMapper.deleteBatchIds(ids);
-        baseStudentScholarshipCategoryBaseStudentScholarshipLevelMapper.delete(Wrappers.lambdaQuery(BaseStudentScholarshipLevel.class).in(BaseStudentScholarshipLevel::getBaseStudentScholarshipCategoryId, ids));
+        categoryMapper.deleteBatchIds(ids);
+        levelMapper.delete(Wrappers.lambdaQuery(BaseStudentScholarshipLevel.class).in(BaseStudentScholarshipLevel::getBaseStudentScholarshipCategoryId, ids));
 
         return true;
     }
+
+    @Override
+    public Page<BaseStudentScholarshipCategoryStatisticPageVo> getStatisticsPage(Page<BaseStudentScholarshipReleasePageVo> page, BaseStudentScholarshipReleasePageDto dto) {
+        return this.baseMapper.getStatisticsPage(page, dto);
+    }
 }

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

@@ -13,9 +13,9 @@ import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.organization.mapper.UserMapper;
 import com.xjrsoft.module.room.mapper.RoomBedMapper;
 import com.xjrsoft.module.room.vo.RoomBedInfoVo;
-import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
+import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;

+ 22 - 3
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -42,13 +42,32 @@ import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
-import com.xjrsoft.module.student.entity.*;
+import com.xjrsoft.module.student.entity.BaseClassMajorSet;
+import com.xjrsoft.module.student.entity.BaseMajor;
+import com.xjrsoft.module.student.entity.BaseStudent;
+import com.xjrsoft.module.student.entity.BaseStudentContact;
+import com.xjrsoft.module.student.entity.BaseStudentFamily;
+import com.xjrsoft.module.student.entity.BaseStudentFamilyMember;
+import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
+import com.xjrsoft.module.student.entity.BaseStudentSubsidize;
+import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
-import com.xjrsoft.module.student.service.*;
-import com.xjrsoft.module.student.vo.*;
+import com.xjrsoft.module.student.service.IBaseMajorService;
+import com.xjrsoft.module.student.service.IBaseStudentContactService;
+import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+import com.xjrsoft.module.student.service.IBaseStudentService;
+import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
+import com.xjrsoft.module.student.service.IStudentManagerService;
+import com.xjrsoft.module.student.vo.BaseClassMajorSetVo;
+import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
+import com.xjrsoft.module.student.vo.BaseStudentClassVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
+import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
+import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
 import com.xjrsoft.module.system.entity.Area;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import com.xjrsoft.module.system.entity.DictionaryItem;

+ 46 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentScholarshipCategoryStatisticPageVo.java

@@ -0,0 +1,46 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 奖学金类别分页列表出参
+* @Author dzx
+* @Date: 2023-11-23
+* @Version 1.0
+*/
+@Data
+public class BaseStudentScholarshipCategoryStatisticPageVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 名称
+    */
+    @ApiModelProperty("奖助学金名称")
+    private String name;
+    /**
+    * 奖学金来源(xjr_dictionary_item[scholarship_source])
+    */
+    @ApiModelProperty("奖助学金类型")
+    private String categoryCn;
+    /**
+     * 奖学金来源-中文
+     */
+    @ApiModelProperty("奖学金总金额")
+    private Double totalAmount;
+    /**
+    * 总金额
+    */
+    @ApiModelProperty("上报金额")
+    private Double applicantAmonut;
+    /**
+    * 奖学金等级 0=无等级
+    */
+    @ApiModelProperty("发放金额")
+    private Double releaseAmount;
+
+}

+ 0 - 2
src/main/java/com/xjrsoft/module/student/vo/BaseStudentSompleInfoVo.java

@@ -4,8 +4,6 @@ import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
 * @title: 移动端学生修改信息列表
 * @Author dzx

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

@@ -1,12 +1,7 @@
 package com.xjrsoft.module.student.vo;
 
-import com.xjrsoft.common.model.tree.ITreeNode;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.io.Serializable;
-import java.util.List;
-
 /**
  * @author dzx
  * @date 2024年6月27日

+ 19 - 0
src/main/resources/mapper/student/BaseStudentScholarshipCategoryMapper.xml

@@ -0,0 +1,19 @@
+<?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.BaseStudentScholarshipCategoryMapper">
+    <select id="getStatisticsPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentScholarshipCategoryStatisticPageVo">
+        SELECT t1.id, t1.name,t2.name AS category_cn,t1.total_amount,(
+        SELECT SUM(amount) FROM base_student_scholarship_applicant WHERE base_student_scholarship_category_id = t1.id
+        AND STATUS = 1) AS applicant_amonut,(
+        SELECT SUM(a1.amount) FROM base_student_scholarship_release a1
+        LEFT JOIN base_student_scholarship_applicant a2 ON a1.base_student_scholarship_applicant_id = a2.id
+        WHERE a2.base_student_scholarship_category_id = t1.id AND a1.delete_mark = 0 AND a2.delete_mark = 0
+        ) AS release_amount FROM base_student_scholarship_category t1
+        LEFT JOIN xjr_dictionary_detail t2 ON t1.category = t2.code
+        WHERE t1.delete_mark = 0;
+    </select>
+
+
+</mapper>

+ 39 - 0
src/main/resources/mapper/student/BaseStudentScholarshipReleaseMapper.xml

@@ -0,0 +1,39 @@
+<?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.BaseStudentScholarshipReleaseMapper">
+    <select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo">
+        SELECT t1.id,t2.name AS semester_name,t1.release_status,t1.name,t4.name AS gender_cn,t3.credential_number,t6.name AS class_name,
+        t7.name AS scholarship_category,t8.name AS category_cn,t7.scholarship_level,t1.amount,t1.bank_no,t1.bank_type,t1.bank_user_name,
+        (SELECT SUM(amount) FROM base_student_scholarship_release WHERE base_student_scholarship_applicant_id = t1.id AND delete_mark = 0) AS release_amount,
+        (SELECT release_date FROM base_student_scholarship_release WHERE base_student_scholarship_applicant_id = t1.id
+        AND delete_mark = 0 ORDER BY release_date DESC LIMIT 0, 1) AS release_date FROM base_student_scholarship_applicant t1
+        LEFT JOIN base_semester t2 ON t1.base_semester_id = t2.id
+        LEFT JOIN xjr_user t3 ON t1.applicant_user_id = t2.id
+        LEFT JOIN xjr_dictionary_detail t4 ON t3.gender = t4.code AND t4.item_id = 2023000000000000004
+        LEFT JOIN base_student_school_roll t5 ON t3.id = t5.user_id
+        LEFT JOIN base_class t6 ON t5.class_id = t6.id
+        LEFT JOIN base_student_scholarship_category t7 ON t1.base_student_scholarship_category_id = t7.id
+        LEFT JOIN xjr_dictionary_detail t8 ON t7.category = t8.code
+        WHERE t1.status = 1 AND t1.delete_mark = 0
+        <if test="dto.name != null and dto.name != ''">
+            and t3.name like concat('%', #{dto.name}, '%')
+        </if>
+        <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
+            and t3.credential_number like concat('%', #{dto.credentialNumber}, '%')
+        </if>
+        <if test="dto.scholarshipCategory != null and dto.scholarshipCategory != ''">
+            and t7.name like concat('%', #{dto.scholarshipCategory}, '%')
+        </if>
+        <if test="dto.semesterId != null">
+            and t1.base_semester_id = #{dto.semesterId}
+        </if>
+        <if test="dto.releaseStatus != null">
+            and t1.release_status = #{dto.releaseStatus}
+        </if>
+        <if test="dto.scholarshipCategoryId != null">
+            and t7.id = #{dto.scholarshipCategoryId}
+        </if>
+    </select>
+</mapper>

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

@@ -3525,4 +3525,30 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcScholarshipRelease() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("base_student_scholarship_release");//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);
+    }
 }