浏览代码

根据学生身份证号,查询最新一起的费用情况

dzx 1 年之前
父节点
当前提交
b82e7b92a2

+ 1 - 0
src/main/java/com/xjrsoft/module/student/controller/PbCseFeeobjupdateController.java

@@ -137,4 +137,5 @@ public class PbCseFeeobjupdateController {
 
         return RT.fileStream(bot.toByteArray(), "PbCseFeeobjupdate" + ExcelTypeEnum.XLSX.getValue());
     }
+
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/student/mapper/PbVXsxxsfytbMapper.java

@@ -1,10 +1,12 @@
 package com.xjrsoft.module.student.mapper;
 
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsInfoDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbDto;
 import com.xjrsoft.module.student.entity.PbVXsxxsfytb;
 import com.xjrsoft.module.student.vo.BaseClassQfCountVo;
+import com.xjrsoft.module.student.vo.PbVXsxxsfytbFeeitemVo;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbSpecnameCountVo;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbVo;
 import org.apache.ibatis.annotations.Mapper;
@@ -25,4 +27,6 @@ public interface PbVXsxxsfytbMapper extends MPJBaseMapper<PbVXsxxsfytb> {
     List<PbVXsxxsfytbVo> getList(@Param("dto") PbVXsxxsfytbDto dto);
 
     List<PbVXsxxsfytbSpecnameCountVo> getSpecnameCount(@Param("dto") EnrollmentStatisticsInfoDto dto);
+
+    PbVXsxxsfytbFeeitemVo getStudentFeeInfo(@Param("dto") BaseStudentInfoDetailDto dto);
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/service/IPbVXsxxsfytbService.java

@@ -24,4 +24,7 @@ public interface IPbVXsxxsfytbService extends MPJBaseService<PbVXsxxsfytb> {
     List<PbVXsxxsfytbExcelVo> getList(PbVXsxxsfytbExcelDto dto);
 
     List<BaseClassQfCountVo> getClassQfCount();
+
+
+    PbVXsxxsfytbFeeitemVo getStudentFeeInfo(String credentialNumber);
 }

+ 18 - 0
src/main/java/com/xjrsoft/module/student/service/impl/PbVXsxxsfytbServiceImpl.java

@@ -8,6 +8,7 @@ import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseSemester;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbExcelDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbPageDto;
 import com.xjrsoft.module.student.dto.PersonalPortraitFeeInformationDto;
@@ -15,10 +16,12 @@ import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.entity.PbSemesterConfig;
 import com.xjrsoft.module.student.entity.PbVXsxxsfytb;
+import com.xjrsoft.module.student.mapper.PbSemesterConfigMapper;
 import com.xjrsoft.module.student.mapper.PbVXsxxsfytbMapper;
 import com.xjrsoft.module.student.service.IPbVXsxxsfytbService;
 import com.xjrsoft.module.student.vo.BaseClassQfCountVo;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbExcelVo;
+import com.xjrsoft.module.student.vo.PbVXsxxsfytbFeeitemVo;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbPageVo;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbPersonal;
 import com.xjrsoft.module.student.vo.PbVXsxxsfytbPersonalMap;
@@ -45,6 +48,7 @@ import java.util.stream.Collectors;
 public class PbVXsxxsfytbServiceImpl extends MPJBaseServiceImpl<PbVXsxxsfytbMapper, PbVXsxxsfytb> implements IPbVXsxxsfytbService {
 
     private final PbVXsxxsfytbMapper pbVXsxxsfytbMapper;
+    private final PbSemesterConfigMapper pbSemesterConfigMapper;
 
     @Override
     public PersonalPortraitFeeInformationVo listCostInformation(PersonalPortraitFeeInformationDto dto) {
@@ -220,4 +224,18 @@ public class PbVXsxxsfytbServiceImpl extends MPJBaseServiceImpl<PbVXsxxsfytbMapp
     public List<BaseClassQfCountVo> getClassQfCount() {
         return pbVXsxxsfytbMapper.getClassQfCount();
     }
+
+    /**
+     * 查询学生最新一学期的费用情况
+     * @param credentialNumber
+     * @return
+     */
+    @Override
+    public PbVXsxxsfytbFeeitemVo getStudentFeeInfo(String credentialNumber) {
+        BaseStudentInfoDetailDto dto = new BaseStudentInfoDetailDto();
+        dto.setCredentialNumber(credentialNumber);
+        String lastBeltcode = pbSemesterConfigMapper.getLastBeltcode();
+        dto.setCredentialNumber(lastBeltcode);
+        return pbVXsxxsfytbMapper.getStudentFeeInfo(dto);
+    }
 }

+ 26 - 0
src/main/java/com/xjrsoft/module/student/vo/PbVXsxxsfytbFeeitemVo.java

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 表单出参
+* @Author dzx
+* @Date: 2024-03-13
+* @Version 1.0
+*/
+@Data
+public class PbVXsxxsfytbFeeitemVo {
+
+    @ApiModelProperty("宿舍费")
+    private String ssf;
+
+    @ApiModelProperty("教材费")
+    private String jcf;
+
+    @ApiModelProperty("军训费")
+    private String jxf;
+
+
+
+}

+ 5 - 0
src/main/resources/mapper/student/PbVXsxxsfytbMapper.xml

@@ -26,4 +26,9 @@
     <select id="getSpecnameCount" parameterType="com.xjrsoft.module.student.dto.EnrollmentStatisticsInfoDto" resultType="com.xjrsoft.module.student.vo.PbVXsxxsfytbSpecnameCountVo">
         SELECT specname,COUNT(DISTINCT(Studentcode)) as student_count FROM pb_v_xsxxsfytb WHERE jfzt = '已缴费' AND enteryear = #{dto.year} GROUP BY specname
     </select>
+    <select id="getStudentFeeInfo" parameterType="com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto" resultType="com.xjrsoft.module.student.vo.PbVXsxxsfytbFeeitemVo">
+        SELECT replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = #{dto.credentialNumber} AND feeitemcode LIKE '999010604%' AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS jxf,
+               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = #{dto.credentialNumber} AND feeitemcode LIKE '999010603%' AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS jcf,
+               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = #{dto.credentialNumber} AND feeitemcode = 103042766003001 AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS ssf
+    </select>
 </mapper>