ソースを参照

奖助学金模块调整

dzx 1 年間 前
コミット
43cd8d014b

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

@@ -19,7 +19,6 @@ import com.xjrsoft.module.student.dto.UpdateBaseStudentScholarshipApplicantDto;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipApplicant;
 import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
 import com.xjrsoft.module.student.service.IBaseStudentScholarshipApplicantService;
-import com.xjrsoft.module.student.service.IBaseStudentScholarshipCategoryService;
 import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantCategoryPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantVo;
@@ -52,14 +51,13 @@ import java.util.List;
 public class BaseStudentScholarshipApplicantController {
 
 
-    private final IBaseStudentScholarshipApplicantService baseStudentScholarshipApplicantService;
-    private final IBaseStudentScholarshipCategoryService baseStudentScholarshipCategoryService;
+    private final IBaseStudentScholarshipApplicantService applicantService;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="奖学金申请列表(分页)")
     @SaCheckPermission("basestudentscholarshipapplicant:detail")
     public RT<PageOutput<BaseStudentScholarshipApplicantPageVo>> page(@Valid BaseStudentScholarshipApplicantPageDto dto){
-        IPage<BaseStudentScholarshipApplicantPageVo> page = baseStudentScholarshipApplicantService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipApplicantPageVo.class,
+        IPage<BaseStudentScholarshipApplicantPageVo> page = applicantService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipApplicantPageVo.class,
         MPJWrappers.<BaseStudentScholarshipApplicant>lambdaJoin()
                 .like(StrUtil.isNotEmpty(dto.getName()), BaseStudentScholarshipApplicant::getName, dto.getName())
                 .eq(ObjectUtil.isNotNull(dto.getSemesterId()), BaseStudentScholarshipCategory::getBaseSemesterId, dto.getSemesterId())
@@ -69,12 +67,14 @@ public class BaseStudentScholarshipApplicantController {
                 .eq(BaseStudentScholarshipApplicant::getBaseStudentScholarshipCategoryId,dto.getBaseStudentScholarshipCategoryId())
                 .orderByAsc(BaseStudentScholarshipApplicant::getSortCode)
                 .selectAs(BaseStudentScholarshipApplicant::getId, BaseStudentScholarshipApplicantPageVo::getId)
-                .selectAs(DictionaryDetail::getName, BaseStudentScholarshipApplicantPageVo::getBankTypeCn)
+                .select(" t4.name as bank_type_cn")
                 .selectAs(BaseSemester::getName, BaseStudentScholarshipApplicantPageVo::getSemesterName)
+                .select(" t5.name as category_cn")
                 .select(BaseStudentScholarshipApplicant.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentScholarshipApplicantPageVo.class).contains(x.getProperty()))
                 .innerJoin(BaseStudentScholarshipCategory.class, BaseStudentScholarshipCategory::getId, BaseStudentScholarshipApplicant::getBaseStudentScholarshipCategoryId)
                 .leftJoin(BaseSemester.class, BaseSemester::getId, BaseStudentScholarshipApplicant::getBaseSemesterId)
                 .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipApplicant::getBankType)
+                .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipCategory::getCategory)
         );
         PageOutput<BaseStudentScholarshipApplicantPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipApplicantPageVo.class);
         return RT.ok(pageOutput);
@@ -84,7 +84,7 @@ public class BaseStudentScholarshipApplicantController {
     @ApiOperation(value="奖学金名称表(分页)")
     @SaCheckPermission("basestudentscholarshipapplicant:detail")
     public RT<PageOutput<BaseStudentScholarshipApplicantCategoryPageVo>> scholarshiPage(@Valid BaseStudentScholarshipApplicantCategoryPageDto dto){
-        IPage<BaseStudentScholarshipApplicantCategoryPageVo> page = baseStudentScholarshipApplicantService.getScholarshiPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        IPage<BaseStudentScholarshipApplicantCategoryPageVo> page = applicantService.getScholarshiPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
         PageOutput<BaseStudentScholarshipApplicantCategoryPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipApplicantCategoryPageVo.class);
         return RT.ok(pageOutput);
     }
@@ -93,7 +93,7 @@ public class BaseStudentScholarshipApplicantController {
     @ApiOperation(value="根据id查询奖学金申请信息")
     @SaCheckPermission("basestudentscholarshipapplicant:detail")
     public RT<BaseStudentScholarshipApplicantVo> info(@RequestParam Long id){
-        BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = baseStudentScholarshipApplicantService.getById(id);
+        BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = applicantService.getById(id);
         if (baseStudentScholarshipApplicant == null) {
            return RT.error("找不到此数据!");
         }
@@ -106,7 +106,7 @@ public class BaseStudentScholarshipApplicantController {
     @SaCheckPermission("basestudentscholarshipapplicant:add")
     public RT<Boolean> add(@Valid @RequestBody AddBaseStudentScholarshipApplicantDto dto){
         BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
-        boolean isSuccess = baseStudentScholarshipApplicantService.save(baseStudentScholarshipApplicant);
+        boolean isSuccess = applicantService.save(baseStudentScholarshipApplicant);
     return RT.ok(isSuccess);
     }
 
@@ -116,7 +116,7 @@ public class BaseStudentScholarshipApplicantController {
     public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentScholarshipApplicantDto dto){
 
         BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
-        return RT.ok(baseStudentScholarshipApplicantService.updateById(baseStudentScholarshipApplicant));
+        return RT.ok(applicantService.updateById(baseStudentScholarshipApplicant));
 
     }
 
@@ -124,7 +124,7 @@ public class BaseStudentScholarshipApplicantController {
     @ApiOperation(value = "删除奖学金申请")
     @SaCheckPermission("basestudentscholarshipapplicant:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
-        return RT.ok(baseStudentScholarshipApplicantService.removeBatchByIds(ids));
+        return RT.ok(applicantService.removeBatchByIds(ids));
 
     }
 

+ 6 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentScholarshipCategory.java

@@ -115,4 +115,10 @@ public class BaseStudentScholarshipCategory implements Serializable {
     @EntityMapping(thisField = "id", joinField = "baseStudentScholarshipCategoryId")
     private List<BaseStudentScholarshipLevel> baseStudentScholarshipLevelList;
 
+    @ApiModelProperty("奖助学金类型(xjr_dictionary_item[scholarship_category])")
+    private String category;
+
+    @ApiModelProperty("资助单位/个人")
+    private String supportSource;
+
 }

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

@@ -139,4 +139,7 @@ public class BaseStudentScholarshipApplicantPageVo {
     @ApiModelProperty("发放状态(1:已发放 0:未发放)")
     private Integer releaseStatus;
 
+    @ApiModelProperty("奖助学金类型-中文")
+    private String categoryCn;
+
 }

+ 10 - 1
src/main/resources/sqlScript/20240718_sql.sql

@@ -274,7 +274,7 @@ CREATE TABLE `activity_info` (
   `duty_person_mobile` VARCHAR(50) DEFAULT NULL COMMENT '活动负责人电话',
   `cover_file_id` VARCHAR(50) DEFAULT NULL COMMENT '封面图片',
   `enroll_range` LONGTEXT DEFAULT NULL COMMENT '报名范围',
-  STATUS INT DEFAULT 0 COMMENT '状态(0:未发布 1:报名中 2:报名结束 3:活动结束)',
+  `status` INT DEFAULT 0 COMMENT '状态(0:未发布 1:报名中 2:报名结束 3:活动结束)',
   `content` LONGTEXT DEFAULT NULL COMMENT '活动内容',
   enterprise_id BIGINT DEFAULT NULL COMMENT '合作企业(company_coop)',
   category INT DEFAULT NULL COMMENT '活动类别(1:校企合作活动 2:赛事活动)',
@@ -339,3 +339,12 @@ CREATE TABLE `wechat_message_template` (
   STATUS INT DEFAULT 0 COMMENT '状态(0:待确认 1:未参与 2:已参与)',
   PRIMARY KEY (`id`)
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='活动登记表';
+
+
+-- ---------------------------------------------------------------------------------------------
+-- 奖助学金类别表增加字段
+-- ---------------------------------------------------------------------------------------------
+ALTER TABLE `base_student_scholarship_category`   
+  ADD COLUMN `category` VARCHAR(30) NULL   COMMENT '奖助学金类型(xjr_dictionary_item[s_b_categories])' AFTER `remark`,
+  ADD COLUMN `support_source` VARCHAR(200) NULL   COMMENT '资助单位/个人' AFTER `category`;
+