Przeglądaj źródła

学生提交申请信息V9.0

平常心 5 miesięcy temu
rodzic
commit
d0eb9c5a54
14 zmienionych plików z 190 dodań i 66 usunięć
  1. 4 11
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/AidingStudentsPersonManageController.java
  2. 3 3
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageInfoPageReqVO.java
  3. 4 4
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageInfoRespVO.java
  4. 1 1
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSortReqVO.java
  5. 14 2
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/FinancialAidStudentManageController.java
  6. 35 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/vo/FinancialAidStudentManagePageReqVO.java
  7. 16 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/vo/FinancialAidStudentManageRespVO.java
  8. 3 3
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/aidingstudentspersonmanage/AidingStudentPersonManageEvaluationResultDO.java
  9. 1 1
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/aidingstudentspersonmanage/AidingStudentsPersonManageDO.java
  10. 18 4
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/financialaidstudentmange/FinancialAidStudentManageDO.java
  11. 5 12
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageService.java
  12. 9 19
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java
  13. 9 1
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/financialaidstudentmange/FinancialAidStudentManageService.java
  14. 68 5
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/financialaidstudentmange/FinancialAidStudentManageServiceImpl.java

+ 4 - 11
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/AidingStudentsPersonManageController.java

@@ -66,13 +66,6 @@ public class AidingStudentsPersonManageController {
         return success(aidingStudentsPersonManageService.getAidingStudentsPersonManageCollegeData(pageReqVO));
     }
 
-    /*@GetMapping("/class-get-page")
-    @Operation(summary = "班级模糊查询获取学生申请名单分页")
-    @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:class-get-page')")
-    public CommonResult<PageResult<AidingStudentPersonManageInfoRespVO>> getAidingStudentsPersonManagePage(@Valid @RequestBody AidingStudentPersonManageInfoPageReqVO pageReqVO) {
-        PageResult<AidingStudentsPersonManageDO> pageResult = aidingStudentsPersonManageService.getAidingStudentsPersonManageClassPage(pageReqVO);
-        return success(BeanUtils.toBean(pageResult, AidingStudentPersonManageInfoRespVO.class));
-    }*/
 
     @PutMapping("/sort")
     @Operation(summary = "定序")
@@ -94,21 +87,21 @@ public class AidingStudentsPersonManageController {
     @GetMapping("/page")
     @Operation(summary = "学生信息分页")
     @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:page')")
-    public CommonResult<PageResult<AidingStudentPersonManageInfoRespVO>> schoolgetAidingStudentsPersonManagePage(@Valid @RequestBody AidingStudentPersonManageInfoPageReqVO pageReqVO) {
-        return success(aidingStudentsPersonManageService.schoolgetAidingStudentsPersonManagePage(pageReqVO));
+    public CommonResult<PageResult<AidingStudentPersonManageInfoRespVO>> AidingStudentsPersonManagePage(@Valid @RequestBody AidingStudentPersonManageInfoPageReqVO pageReqVO) {
+        return success(aidingStudentsPersonManageService.AidingStudentsPersonManagePage(pageReqVO));
     }
 
     @GetMapping("/school-get-student-data")
     @Operation(summary = "学校获取统计数据(部分)")
     @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:school-get-student-data')")
-    public CommonResult<AidingStudentPersonManageInfoRespVO> schoolgetAidingStudentsPersonManageData(@Valid @RequestParam("manageId")Integer manageId) {
+    public CommonResult<AidingStudentPersonManageInfoRespVO> schoolgetAidingStudentsPersonManageData(@Valid @RequestParam("manageId")Long manageId) {
         return success(aidingStudentsPersonManageService.schoolgetAidingStudentsPersonManageData(manageId));
     }
 
     @GetMapping("/school-audit-student-info")
     @Operation(summary = "学校审核学生信息")
     @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:school-audit-student-info')")
-    public CommonResult<AidingStudentPersonManageInfoRespVO> schoolauditAidingStudentsPersonManageData(@Valid @RequestParam("id")Integer id) {
+    public CommonResult<AidingStudentPersonManageInfoRespVO> schoolauditAidingStudentsPersonManageData(@Valid @RequestParam("id")Long id) {
         return success(aidingStudentsPersonManageService.schoolauditAidingStudentsPersonManageData(id));
     }
 

+ 3 - 3
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageInfoPageReqVO.java

@@ -30,9 +30,9 @@ public class AidingStudentPersonManageInfoPageReqVO extends PageParam {
     // 照片
     private String image;
     // 学院id
-    private Integer collegeManageId;
+    private Long collegeManageId;
     // 项目ID
-    private Integer manageId;
+    private Long manageId;
     /**
      * 班级分页请求
      */
@@ -41,7 +41,7 @@ public class AidingStudentPersonManageInfoPageReqVO extends PageParam {
     // 困难类型
     private Integer difficultType;
     // 学号
-    private String studentSno;
+    private String studentId;
     // 状态
     private Integer status;
     /**

+ 4 - 4
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageInfoRespVO.java

@@ -23,7 +23,7 @@ public class AidingStudentPersonManageInfoRespVO {
      * 公共字段
      */
     // 序号(主键)
-    private Integer id;
+    private Long id;
     // 专业
     private String major;
     // 年级
@@ -39,15 +39,15 @@ public class AidingStudentPersonManageInfoRespVO {
     // 排序
     private Integer sort;
     // 学院项目id
-    private Integer collegeManageId;
+    private Long collegeManageId;
     // 项目ID
-    private Integer manageId;
+    private Long manageId;
     // 班级
     private String className;
     // 备注
     private String notes;
     // 学号
-    private String studentSno;
+    private String studentId;
     // 入学年份
     private String enrollmentYear;
     //身份证号

+ 1 - 1
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSortReqVO.java

@@ -15,7 +15,7 @@ import lombok.ToString;
 @ToString(callSuper = true)
 public class AidingStudentPersonManageSortReqVO {
     // 学生ID(主键)
-    private Integer id;
+    private Long id;
     // 排序
     private Integer sort;
     // 班级建议困难类型

+ 14 - 2
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/FinancialAidStudentManageController.java

@@ -1,7 +1,10 @@
 package cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange;
 
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoPageReqVO;
 import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoRespVO;
+import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManagePageReqVO;
 import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManageRespVO;
 import cn.iocoder.yudao.module.as.service.financialaidstudentmange.FinancialAidStudentManageService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -32,8 +35,10 @@ public class FinancialAidStudentManageController {
     @GetMapping("/before-upload")
     @Operation(summary = "回显学生上传材料")
     @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:before-upload')")
-    public CommonResult<FinancialAidStudentManageRespVO> beforeuploadAidingStudentsPersonManage() {
-        return success(financialAidStudentManageService.beforeuploadAidingStudentsManage());
+    public CommonResult<FinancialAidStudentManageRespVO> beforeuploadAidingStudentsPersonManage(
+            @Valid @RequestParam("manageId")Integer manageId,
+            @Valid @RequestParam("collegeManageId")Integer collegeManageId) {
+        return success(financialAidStudentManageService.beforeuploadAidingStudentsManage(manageId, collegeManageId));
     }
 
     @PostMapping("/upload")
@@ -44,4 +49,11 @@ public class FinancialAidStudentManageController {
         return success(true);
     }
 
+    @GetMapping("/page")
+    @Operation(summary = "学生信息分页")
+    @PreAuthorize("@ss.hasPermission('as:aiding-students-person-manage:page')")
+    public CommonResult<PageResult<FinancialAidStudentManageRespVO>> schoolgetAidingStudentsPersonManagePage(@Valid @RequestBody FinancialAidStudentManagePageReqVO pageReqVO) {
+        return success(financialAidStudentManageService.getAidingStudentsPersonManagePage(pageReqVO));
+    }
+
 }

+ 35 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/vo/FinancialAidStudentManagePageReqVO.java

@@ -0,0 +1,35 @@
+package cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * @autor WoVoM
+ * @data 2024/7/16 19:46
+ * @@version 1.0
+ */
+@Schema(description = "管理后台 - 助学金评定项目学生管理 Requst VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class FinancialAidStudentManagePageReqVO extends PageParam {
+    // 学校项目ID
+    private Long manageId;
+    // 学校项目ID
+    private Long collegeManageId;
+    // 学院名称
+    private String collegeName;
+    // 班级名称
+    private String className;
+    // 学生名称
+    private String nickname;
+    // 专业
+    private String major;
+    // 年级
+    private String grade;
+    // 学号
+    private String studentId;
+}

+ 16 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/financialaidstudentmange/vo/FinancialAidStudentManageRespVO.java

@@ -13,4 +13,20 @@ import lombok.Data;
 @Data
 @ExcelIgnoreUnannotated
 public class FinancialAidStudentManageRespVO {
+    // 学校项目ID
+    private Long manageId;
+    // 学院项目ID
+    private Long collegeManageId;
+    // 学号
+    private String studentId;
+    // 学院名称
+    private String collegeName;
+    // 班级名称
+    private String className;
+    // 学生名称
+    private String nickname;
+    // 专业
+    private String major;
+    // 年级
+    private String grade;
 }

+ 3 - 3
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/aidingstudentspersonmanage/AidingStudentPersonManageEvaluationResultDO.java

@@ -24,7 +24,7 @@ import lombok.*;
 public class AidingStudentPersonManageEvaluationResultDO extends BaseDO {
     // 序号
     @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
+    private Long id;
     // 班级
     private String className;
     // 班主任名字
@@ -34,7 +34,7 @@ public class AidingStudentPersonManageEvaluationResultDO extends BaseDO {
     // 状态(1已经评价,0未评价)
     private Integer status;
     // 学院项目管理id
-    private Integer collegeManageId;
+    private Long collegeManageId;
     // 项目ID
-    private Integer manageId;
+    private Long manageId;
 }

+ 1 - 1
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/aidingstudentspersonmanage/AidingStudentsPersonManageDO.java

@@ -46,7 +46,7 @@ public class AidingStudentsPersonManageDO extends BaseDO {
     // 备注
     private String notes;
     // 学号
-    private String studentSno;
+    private String studentId;
     // 入学年份
     private String enrollmentYear;
     //身份证号

+ 18 - 4
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/dataobject/financialaidstudentmange/FinancialAidStudentManageDO.java

@@ -24,15 +24,29 @@ import lombok.*;
 public class FinancialAidStudentManageDO extends BaseDO {
     // 序号
     @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
+    private Long id;
     // 学校项目ID
-    private Integer manageId;
+    private Long manageId;
     // 学院项目ID
-    private Integer collegeMangeId;
+    private Long collegeMangeId;
     // 学院ID
-    private Integer collegeId;
+    private Long collegeId;
     // 姓名
     private String name;
+    // 学号
+    private String studentId;
     // 流程
     private String processInstanceId;
+    // 学院名称
+    private String collegeName;
+    // 专业
+    private String major;
+    // 年级
+    private String grade;
+    // 班级名称
+    private String className;
+    // 姓名
+    private String nickname;
+    // 排序
+    private Integer sort;
 }

+ 5 - 12
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageService.java

@@ -18,6 +18,7 @@ public interface AidingStudentsPersonManageService  {
      * @return
      */
     AidingStudentPersonManageInfoRespVO beforeuploadAidingStudentsManage();
+
     /**
      * 学生上传材料
      * @param uploadVO
@@ -25,14 +26,6 @@ public interface AidingStudentsPersonManageService  {
      */
     void uploadAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO);
 
-//    /**
-//     * 获取学生申请信息分页
-//     * @param pageReqVO
-//     * @return
-//     */
-    /*
-    PageResult<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(AidingStudentPersonManageInfoPageReqVO pageReqVO);*/
-
 
     List<AidingStudentsPersonManageDO>  getAidingStudentsPersonManageClassPage(
             List<String> ids,BpmTaskPageReqVO pageVO
@@ -63,7 +56,7 @@ public interface AidingStudentsPersonManageService  {
     PageResult<AidingStudentPersonManageInfoRespVO> getAidingStudentsPersonManageCollegeData(AidingStudentPersonManageInfoPageReqVO pageReqVO);
 
     /**
-     * 班级定序,集体
+     * 定序
      * @param ids
      */
     void allsortAidingStudentsManage(List<AidingStudentPersonManageSortReqVO> ids);
@@ -74,21 +67,21 @@ public interface AidingStudentsPersonManageService  {
      * @param pageReqVO
      * @return
      */
-    PageResult<AidingStudentPersonManageInfoRespVO> schoolgetAidingStudentsPersonManagePage(AidingStudentPersonManageInfoPageReqVO pageReqVO);
+    PageResult<AidingStudentPersonManageInfoRespVO> AidingStudentsPersonManagePage(AidingStudentPersonManageInfoPageReqVO pageReqVO);
 
     /**
      * 获取各个学院的部分信息
      * @param manageId
      * @return
      */
-    AidingStudentPersonManageInfoRespVO schoolgetAidingStudentsPersonManageData(Integer manageId);
+    AidingStudentPersonManageInfoRespVO schoolgetAidingStudentsPersonManageData(Long manageId);
 
     /**
      * 学校审核学生信息
      * @param id
      * @return
      */
-    AidingStudentPersonManageInfoRespVO schoolauditAidingStudentsPersonManageData(Integer id);
+    AidingStudentPersonManageInfoRespVO schoolauditAidingStudentsPersonManageData(Long id);
 
     /**
      * 更新申请的状态

+ 9 - 19
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java

@@ -70,7 +70,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
             AidingStudentPersonManageInfoRespVO result = new AidingStudentPersonManageInfoRespVO();
             Map map = aidingStudentsPersonManageMapper.getByStudentId(user.getStudentId());
             result.setClassName((String) map.get("SZBJMC"));
-            result.setStudentSno(user.getStudentId());
+            result.setStudentId(user.getStudentId());
             result.setEnrollmentYear((String) map.get("RXNY"));
             result.setIdCard((String) map.get("SFZJH"));
             result.setRegisteredResidence((String) map.get("JG"));
@@ -94,7 +94,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
                 .selectOne(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
                         .eq(AidingStudentsPersonManageDO::getManageId, uploadVO.getManageId())
                         .eq(AidingStudentsPersonManageDO::getCollegeManageId, uploadVO.getCollegeManageId())
-                        .eq(AidingStudentsPersonManageDO::getStudentSno, uploadVO.getStudentSno()));
+                        .eq(AidingStudentsPersonManageDO::getStudentId, uploadVO.getStudentId()));
         if(user1 != null){
             throw exception(STUDENT_INFO_EXISTS);
         }
@@ -131,7 +131,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
     public AidingStudentPersonManageInfoRespVO checkAidingStudentsManage() {
         return BeanUtils
                 .toBean(aidingStudentsPersonManageMapper
-                .selectOne(AidingStudentsPersonManageDO::getStudentSno, adminUserApi.getUser(getLoginUser().getId()).getStudentId())
+                .selectOne(AidingStudentsPersonManageDO::getStudentId, adminUserApi.getUser(getLoginUser().getId()).getStudentId())
                         , AidingStudentPersonManageInfoRespVO.class);
     }
 
@@ -229,19 +229,9 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
         return result;
     }
 
-//    /**
-//     * 班级获取学生申请信息分页
-//     * @param pageReqVO
-//     * @return
-//     */
-    /*@Override
-    public PageResult<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(
-            AidingStudentPersonManageInfoPageReqVO pageReqVO) {
-        return aidingStudentsPersonManageMapper.selectPage(pageReqVO);
-    }*/
 
     @Override
-    public List<AidingStudentsPersonManageDO>  getAidingStudentsPersonManageClassPage(List<String> ids,
+    public List<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(List<String> ids,
                                                                                BpmTaskPageReqVO pageVO){
         return aidingStudentsPersonManageMapper.selectListByProcessInstanceId(ids,pageVO);
     };
@@ -293,7 +283,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
      * @return
      */
     @Override
-    public PageResult<AidingStudentPersonManageInfoRespVO> schoolgetAidingStudentsPersonManagePage(AidingStudentPersonManageInfoPageReqVO pageReqVO) {
+    public PageResult<AidingStudentPersonManageInfoRespVO> AidingStudentsPersonManagePage(AidingStudentPersonManageInfoPageReqVO pageReqVO) {
         /**
          * 表格信息
          */
@@ -307,8 +297,8 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
                         .like(StringUtils.isNotBlank(pageReqVO.getGrade()), AidingStudentsPersonManageDO::getGrade, pageReqVO.getGrade())
                         .like(StringUtils.isNotBlank(pageReqVO.getClassName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClassName())
                         .like(StringUtils.isNotBlank(pageReqVO.getNickname()), AidingStudentsPersonManageDO::getNickname, pageReqVO.getNickname())
-                        .like(StringUtils.isNotBlank(pageReqVO.getStudentSno()), AidingStudentsPersonManageDO::getStudentSno, pageReqVO.getStudentSno())
-                        .orderByDesc(AidingStudentsPersonManageDO::getSort)
+                        .like(StringUtils.isNotBlank(pageReqVO.getStudentId()), AidingStudentsPersonManageDO::getStudentId, pageReqVO.getStudentId())
+                        .orderByAsc(AidingStudentsPersonManageDO::getSort)
                 );
         return new PageResult<>(BeanUtils.toBean(allList, AidingStudentPersonManageInfoRespVO.class), (long) allList.size());
     }
@@ -319,7 +309,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
      * @return
      */
     @Override
-    public AidingStudentPersonManageInfoRespVO schoolgetAidingStudentsPersonManageData(Integer manageId) {
+    public AidingStudentPersonManageInfoRespVO schoolgetAidingStudentsPersonManageData(Long manageId) {
         AidingStudentPersonManageInfoRespVO resultvo = new AidingStudentPersonManageInfoRespVO();
         // 1.获得这个项目的所有信息(不分学院)
         List<AidingStudentsPersonManageDO> manageList = aidingStudentsPersonManageMapper
@@ -361,7 +351,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
      * @return
      */
     @Override
-    public AidingStudentPersonManageInfoRespVO schoolauditAidingStudentsPersonManageData(Integer id) {
+    public AidingStudentPersonManageInfoRespVO schoolauditAidingStudentsPersonManageData(Long id) {
         AidingStudentsPersonManageDO aDo = aidingStudentsPersonManageMapper.selectById(id);
         AidingStudentPersonManageEvaluationResultDO aidingStudentPersonManageEvaluationResultDO = aidingStudentPersonManageEvaluationResultMapper
                 .selectOne(null,new LambdaQueryWrapper<AidingStudentsPersonManageDO>()

+ 9 - 1
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/financialaidstudentmange/FinancialAidStudentManageService.java

@@ -1,5 +1,7 @@
 package cn.iocoder.yudao.module.as.service.financialaidstudentmange;
 
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManagePageReqVO;
 import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManageRespVO;
 
 /**
@@ -13,7 +15,7 @@ public interface FinancialAidStudentManageService {
      * 先将家庭困难信息认定结果返回
      * @return
      */
-    FinancialAidStudentManageRespVO beforeuploadAidingStudentsManage();
+    FinancialAidStudentManageRespVO beforeuploadAidingStudentsManage(Integer manageId, Integer collegeManageId);
 
     /**
      * 学生上传材料
@@ -22,4 +24,10 @@ public interface FinancialAidStudentManageService {
     void uploadAidingStudentsManage(FinancialAidStudentManageRespVO uploadVO);
 
 
+    /**
+     * 信息分页
+     * @param pageReqVO
+     * @return
+     */
+    PageResult<FinancialAidStudentManageRespVO> getAidingStudentsPersonManagePage(FinancialAidStudentManagePageReqVO pageReqVO);
 }

+ 68 - 5
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/financialaidstudentmange/FinancialAidStudentManageServiceImpl.java

@@ -1,14 +1,31 @@
 package cn.iocoder.yudao.module.as.service.financialaidstudentmange;
 
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoRespVO;
+import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManagePageReqVO;
 import cn.iocoder.yudao.module.as.controller.admin.financialaidstudentmange.vo.FinancialAidStudentManageRespVO;
+import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentsmanage.AidingStudentsManageDO;
+import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.AidingStudentsPersonManageDO;
 import cn.iocoder.yudao.module.as.dal.dataobject.financialaidstudentmange.FinancialAidStudentManageDO;
 import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentsmanage.AidingStudentsManageMapper;
+import cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage.AidingStudentsPersonManageMapper;
 import cn.iocoder.yudao.module.as.dal.mysql.financialaidstudentmange.FinancialAidStudentManageMapper;
+import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
+import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
+import static cn.iocoder.yudao.module.as.enums.ErrorCodeConstants.STUDENT_INFO_EXISTS;
+
 /**
  * @autor WoVoM
  * @data 2024/7/16 14:56
@@ -17,19 +34,32 @@ import org.springframework.stereotype.Service;
 @Service
 @Slf4j
 public class FinancialAidStudentManageServiceImpl extends ServiceImpl<FinancialAidStudentManageMapper, FinancialAidStudentManageDO> implements FinancialAidStudentManageService {
+
+    @Autowired
+    private AdminUserApi adminUserApi;
+
     @Autowired
-    private AidingStudentsManageMapper aidingStudentsManageMapper;
+    private AidingStudentsPersonManageMapper aidingStudentsPersonManageMapper;
+
+    @Autowired
+    private FinancialAidStudentManageMapper financialAidStudentManageMapper;
 
     /**
      * 先将家庭困难信息认定结果返回
-     *
      * @return
      */
     @Override
-    public FinancialAidStudentManageRespVO beforeuploadAidingStudentsManage() {
-        return null;
+    public FinancialAidStudentManageRespVO beforeuploadAidingStudentsManage(Integer manageId, Integer collegeManagerId) {
+        AdminUserRespDTO user = adminUserApi.getUser(getLoginUser().getId());
+        AidingStudentsPersonManageDO aDo = aidingStudentsPersonManageMapper
+                .selectOne(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
+                        .eq(AidingStudentsPersonManageDO::getStudentId, user.getStudentId())
+                        .eq(AidingStudentsPersonManageDO::getManageId, manageId)
+                        .eq(AidingStudentsPersonManageDO::getCollegeManageId, collegeManagerId));
+        return BeanUtils.toBean(aDo, FinancialAidStudentManageRespVO.class);
     }
 
+
     /**
      * 学生上传材料
      * @param uploadVO
@@ -37,8 +67,41 @@ public class FinancialAidStudentManageServiceImpl extends ServiceImpl<FinancialA
     @Override
     public void uploadAidingStudentsManage(FinancialAidStudentManageRespVO uploadVO) {
         // 0.验证
-
+        FinancialAidStudentManageDO aDo = financialAidStudentManageMapper
+                .selectOne(new LambdaQueryWrapper<FinancialAidStudentManageDO>()
+                        .eq(FinancialAidStudentManageDO::getStudentId, uploadVO.getStudentId())
+                        .eq(FinancialAidStudentManageDO::getManageId, uploadVO.getManageId())
+                        .eq(FinancialAidStudentManageDO::getCollegeMangeId,uploadVO.getCollegeManageId()));
+        if(aDo != null){
+            throw exception(STUDENT_INFO_EXISTS);
+        }
         // 1.上传
+        financialAidStudentManageMapper.insert(BeanUtils.toBean(uploadVO,FinancialAidStudentManageDO.class));
+    }
 
+    /**
+     * 分页
+     * @param pageReqVO
+     * @return
+     */
+    @Override
+    public PageResult<FinancialAidStudentManageRespVO> getAidingStudentsPersonManagePage(FinancialAidStudentManagePageReqVO pageReqVO) {
+        List<FinancialAidStudentManageDO> allList = financialAidStudentManageMapper
+                .selectList(new LambdaQueryWrapper<FinancialAidStudentManageDO>()
+                        .like(StringUtils.isNotBlank(pageReqVO.getCollegeName()), FinancialAidStudentManageDO::getCollegeName, pageReqVO.getCollegeName())
+                        .eq(pageReqVO.getManageId() != null ,FinancialAidStudentManageDO::getManageId, pageReqVO.getManageId())
+                        .eq(pageReqVO.getCollegeManageId() != null,FinancialAidStudentManageDO::getCollegeMangeId, pageReqVO.getCollegeManageId())
+                        .like(StringUtils.isNotBlank(pageReqVO.getMajor()), FinancialAidStudentManageDO::getMajor, pageReqVO.getMajor())
+                        .like(StringUtils.isNotBlank(pageReqVO.getGrade()), FinancialAidStudentManageDO::getGrade, pageReqVO.getGrade())
+                        .like(StringUtils.isNotBlank(pageReqVO.getClassName()), FinancialAidStudentManageDO::getClassName, pageReqVO.getClassName())
+                        .like(StringUtils.isNotBlank(pageReqVO.getNickname()), FinancialAidStudentManageDO::getNickname, pageReqVO.getNickname())
+                        .like(StringUtils.isNotBlank(pageReqVO.getStudentId()), FinancialAidStudentManageDO::getStudentId, pageReqVO.getStudentId())
+                        .orderByAsc(FinancialAidStudentManageDO::getSort)
+                );
+        return new PageResult<>(BeanUtils.toBean(allList, FinancialAidStudentManageRespVO.class), (long) allList.size());
     }
+
+
+
+
 }