Selaa lähdekoodia

奖助学金调整

dzx 1 vuosi sitten
vanhempi
commit
4e470642f4

+ 97 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipReleaseController.java

@@ -0,0 +1,97 @@
+package com.xjrsoft.module.student.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.student.dto.AddBaseStudentScholarshipReleaseDto;
+import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
+import com.xjrsoft.module.student.dto.UpdateBaseStudentScholarshipReleaseDto;
+import com.xjrsoft.module.student.entity.BaseStudentScholarshipRelease;
+import com.xjrsoft.module.student.service.IBaseStudentScholarshipReleaseService;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleaseVo;
+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.util.List;
+
+/**
+* @title: 奖学金发放记录表
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/student" + "/baseStudentScholarshipRelease")
+@Api(value = "/student"  + "/baseStudentScholarshipRelease",tags = "奖学金发放记录表代码")
+@AllArgsConstructor
+public class BaseStudentScholarshipReleaseController {
+
+
+    private final IBaseStudentScholarshipReleaseService releaseService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="奖学金发放记录表列表(分页)")
+    @SaCheckPermission("basestudentscholarshiprelease:detail")
+    public RT<PageOutput<BaseStudentScholarshipReleasePageVo>> page(@Valid BaseStudentScholarshipReleasePageDto dto){
+
+        Page<BaseStudentScholarshipReleasePageVo> page = releaseService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<BaseStudentScholarshipReleasePageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipReleasePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询奖学金发放记录表信息")
+    @SaCheckPermission("basestudentscholarshiprelease:detail")
+    public RT<BaseStudentScholarshipReleaseVo> info(@RequestParam Long id){
+        BaseStudentScholarshipRelease baseStudentScholarshipRelease = releaseService.getById(id);
+        if (baseStudentScholarshipRelease == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(baseStudentScholarshipRelease, BaseStudentScholarshipReleaseVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增奖学金发放记录表")
+    @SaCheckPermission("basestudentscholarshiprelease:add")
+    public RT<Boolean> add(@Valid @RequestBody AddBaseStudentScholarshipReleaseDto dto){
+        BaseStudentScholarshipRelease baseStudentScholarshipRelease = BeanUtil.toBean(dto, BaseStudentScholarshipRelease.class);
+        boolean isSuccess = releaseService.save(baseStudentScholarshipRelease);
+    return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改奖学金发放记录表")
+    @SaCheckPermission("basestudentscholarshiprelease:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentScholarshipReleaseDto dto){
+
+        BaseStudentScholarshipRelease baseStudentScholarshipRelease = BeanUtil.toBean(dto, BaseStudentScholarshipRelease.class);
+        return RT.ok(releaseService.updateById(baseStudentScholarshipRelease));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除奖学金发放记录表")
+    @SaCheckPermission("basestudentscholarshiprelease:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(releaseService.removeBatchByIds(ids));
+
+    }
+
+}

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

@@ -0,0 +1,38 @@
+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-07-25
+* @Version 1.0
+*/
+@Data
+public class AddBaseStudentScholarshipReleaseDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 奖学金申请id
+    */
+    @ApiModelProperty("奖学金申请id")
+    private Long baseStudentScholarshipApplicantId;
+    /**
+    * 发放金额
+    */
+    @ApiModelProperty("发放金额")
+    private Double amount;
+    /**
+    * 发放日期
+    */
+    @ApiModelProperty("发放日期")
+    private Date releaseDate;
+
+}

+ 37 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentScholarshipReleasePageDto.java

@@ -0,0 +1,37 @@
+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-07-25
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BaseStudentScholarshipReleasePageDto extends PageInput {
+
+    @ApiModelProperty("申请奖助学金名称")
+    private String scholarshipCategory;
+
+    @ApiModelProperty("学期id")
+    private Long semesterId;
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("发放状态")
+    private Integer releaseStatus;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
+
+    @ApiModelProperty("申请奖助学金id")
+    private Long scholarshipCategoryId;
+
+}

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

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 奖学金发放记录表
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+@Data
+public class UpdateBaseStudentScholarshipReleaseDto extends AddBaseStudentScholarshipReleaseDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 89 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentScholarshipRelease.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-07-25
+* @Version 1.0
+*/
+@Data
+@TableName("base_student_scholarship_release")
+@ApiModel(value = "base_student_scholarship_release", description = "奖学金发放记录表")
+public class BaseStudentScholarshipRelease 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 baseStudentScholarshipApplicantId;
+    /**
+    * 发放金额
+    */
+    @ApiModelProperty("发放金额")
+    private Double amount;
+    /**
+    * 发放日期
+    */
+    @ApiModelProperty("发放日期")
+    private Date releaseDate;
+
+
+}

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

@@ -0,0 +1,21 @@
+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.BaseStudentScholarshipRelease;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @title: 奖学金发放记录表
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+@Mapper
+public interface BaseStudentScholarshipReleaseMapper extends MPJBaseMapper<BaseStudentScholarshipRelease> {
+
+    Page<BaseStudentScholarshipReleasePageVo> getPage(Page<BaseStudentScholarshipReleasePageVo> page, @Param("dto") BaseStudentScholarshipReleasePageDto dto);
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentScholarshipReleaseService.java

@@ -0,0 +1,19 @@
+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.BaseStudentScholarshipRelease;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
+
+/**
+* @title: 奖学金发放记录表
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+
+public interface IBaseStudentScholarshipReleaseService extends MPJBaseService<BaseStudentScholarshipRelease> {
+
+    Page<BaseStudentScholarshipReleasePageVo> getPage(Page<BaseStudentScholarshipReleasePageVo> page, BaseStudentScholarshipReleasePageDto dto);
+}

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

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.student.service.impl;
+
+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.BaseStudentScholarshipRelease;
+import com.xjrsoft.module.student.mapper.BaseStudentScholarshipReleaseMapper;
+import com.xjrsoft.module.student.service.IBaseStudentScholarshipReleaseService;
+import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 奖学金发放记录表
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentScholarshipReleaseServiceImpl extends MPJBaseServiceImpl<BaseStudentScholarshipReleaseMapper, BaseStudentScholarshipRelease> implements IBaseStudentScholarshipReleaseService {
+    @Override
+    public Page<BaseStudentScholarshipReleasePageVo> getPage(Page<BaseStudentScholarshipReleasePageVo> page, BaseStudentScholarshipReleasePageDto dto) {
+        return this.baseMapper.getPage(page, dto);
+    }
+}

+ 75 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentScholarshipReleasePageVo.java

@@ -0,0 +1,75 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 奖学金发放记录表分页列表出参
+* @Author dzx
+* @Date: 2024-07-25
+* @Version 1.0
+*/
+@Data
+public class BaseStudentScholarshipReleasePageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 奖学金申请id
+    */
+    @ApiModelProperty("学期名称")
+    private String semesterName;
+    /**
+    * 发放金额
+    */
+    @ApiModelProperty("发放状态(2:全部发放 1:部分发放 0:未发放)")
+    private Integer releaseStatus;
+    /**
+    * 发放日期
+    */
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("性别")
+    private String genderCn;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("申请奖助学金名称")
+    private String scholarshipCategory;
+
+    @ApiModelProperty("奖助学金类型")
+    private String categoryCn;
+
+
+    @ApiModelProperty("等级")
+    private Integer scholarshipLevel;
+
+    @ApiModelProperty("金额")
+    private Double amount;
+
+    @ApiModelProperty("银行卡号")
+    private String bankNo;
+
+    @ApiModelProperty("收款银行名称")
+    private String bankType;
+
+    @ApiModelProperty("银行账户名称")
+    private String bankUserName;
+
+    @ApiModelProperty("发放金额")
+    private Double releaseAmount;
+
+    @ApiModelProperty("发放日期")
+    private Date releaseDate;
+
+}

+ 40 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentScholarshipReleaseVo.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-07-25
+* @Version 1.0
+*/
+@Data
+public class BaseStudentScholarshipReleaseVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 奖学金申请id
+    */
+    @ApiModelProperty("奖学金申请id")
+    private Long baseStudentScholarshipApplicantId;
+    /**
+    * 发放金额
+    */
+    @ApiModelProperty("发放金额")
+    private Double amount;
+    /**
+    * 发放日期
+    */
+    @ApiModelProperty("发放日期")
+    private Date releaseDate;
+
+
+
+}

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

@@ -55,4 +55,12 @@ public class BaseStudentSompleInfoVo {
 
     @ApiModelProperty("班主任id")
     private Long teahcerId;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任电话")
+    private String teacherMobile;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任工号")
+    private String teacherUserName;
 }

+ 1 - 0
src/main/resources/application-dev.yml

@@ -116,6 +116,7 @@ xjrsoft:
       - /event/visit
       - /system/findUserByCode
       - /system/imgcaptcha-answer
+      - /student/basestudentinfo/studentinfoByKeyWord
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 1 - 0
src/main/resources/application-pre.yml

@@ -99,6 +99,7 @@ xjrsoft:
       - /event/receiveCar
       - /event/visit
       - /system/findUserByCode
+      - /student/basestudentinfo/studentinfoByKeyWord
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 1 - 0
src/main/resources/application-prod.yml

@@ -95,6 +95,7 @@ xjrsoft:
       - /event/receiveCar
       - /event/visit
       - /system/findUserByCode
+      - /student/basestudentinfo/studentinfoByKeyWord
     approval-time: 300 # 审核超时时间 目前设为5分钟
   email:
     host:  #邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>

+ 2 - 1
src/main/resources/mapper/organization/UserMapper.xml

@@ -19,11 +19,12 @@
         SELECT t1.id, t1.name as student_name, t1.enabled_mark, t1.credential_number, t4.name AS class_name,t1.mobile,
         (SELECT name FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_name,
         (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_mobile,
-        t1.gender,t4.id as class_id, t4.teacher_id
+        t1.gender,t4.id as class_id, t4.teacher_id,t5.name as teacher_name,t5.user_name as teacher_user_name,t5.mobile as teacher_mobile
         FROM xjr_user t1
         INNER JOIN base_student t2 ON t1.id = t2.user_id
         INNER JOIN base_student_school_roll t3 ON t1.id = t3.user_id
         INNER JOIN base_class t4 ON t4.id = t3.class_id
+        left join xjr_user t5 on t4.teacher_id = t5.id
         WHERE t1.delete_mark = 0
         <if test="dto.keyword != null and dto.keyword != ''">
             AND (t1.name = #{dto.keyword} OR t1.credential_number = #{dto.keyword})