|
@@ -8,13 +8,18 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
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.base.service.IBaseGradeService;
|
|
|
+import com.xjrsoft.module.base.service.IBaseSemesterService;
|
|
|
import com.xjrsoft.module.material.entity.MaterialTaskAssign;
|
|
|
import com.xjrsoft.module.student.dto.PbVXsxxsfytbPageDto;
|
|
|
import com.xjrsoft.module.student.dto.PersonalPortraitFeeInformationDto;
|
|
|
import com.xjrsoft.module.student.entity.*;
|
|
|
import com.xjrsoft.module.student.mapper.PbVXsxxsfytbMapper;
|
|
|
+import com.xjrsoft.module.student.service.IPbSemesterConfigService;
|
|
|
import com.xjrsoft.module.student.service.IPbVXsxxsfytbService;
|
|
|
import com.xjrsoft.module.student.vo.BaseClassMajorSetPageVo;
|
|
|
+import com.xjrsoft.module.student.vo.PbSemesterConfigVo;
|
|
|
import com.xjrsoft.module.student.vo.PbVXsxxsfytbPageVo;
|
|
|
import com.xjrsoft.module.student.vo.PersonalPortraitFeeInformationVo;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
@@ -22,7 +27,10 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @title:
|
|
@@ -33,10 +41,43 @@ import java.util.List;
|
|
|
@Service
|
|
|
@AllArgsConstructor
|
|
|
public class PbVXsxxsfytbServiceImpl extends MPJBaseServiceImpl<PbVXsxxsfytbMapper, PbVXsxxsfytb> implements IPbVXsxxsfytbService {
|
|
|
+
|
|
|
+ private final IPbSemesterConfigService pbSemesterConfigService;
|
|
|
@Override
|
|
|
- public List<PersonalPortraitFeeInformationVo>
|
|
|
- listCostInformation(PersonalPortraitFeeInformationDto dto) {
|
|
|
- return null;
|
|
|
+ public List<PersonalPortraitFeeInformationVo> listCostInformation(PersonalPortraitFeeInformationDto dto) {
|
|
|
+ //查出所有的消费记录
|
|
|
+ MPJLambdaWrapper<PbVXsxxsfytb> pbVXsxxsfytbMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
+ pbVXsxxsfytbMPJLambdaWrapper
|
|
|
+ .select(PbVXsxxsfytb.class, x -> VoToColumnUtil.fieldsToColumns(PersonalPortraitFeeInformationVo.class).contains(x.getProperty()))
|
|
|
+ .leftJoin(XjrUser.class, XjrUser::getCredentialNumber, PbVXsxxsfytb::getPersonalid)
|
|
|
+ .eq(dto.getUserId() != null && dto.getUserId() > 0, XjrUser::getId, dto.getUserId())
|
|
|
+ .like(dto.getYear() != null && !dto.getYear().equals(""),PbVXsxxsfytb::getBeltcode, dto.getYear())
|
|
|
+ ;
|
|
|
+ List<PersonalPortraitFeeInformationVo> personalPortraitFeeInformationVoList = this.selectJoinList(PersonalPortraitFeeInformationVo.class, pbVXsxxsfytbMPJLambdaWrapper);
|
|
|
+
|
|
|
+ //查出学期集合
|
|
|
+ MPJLambdaWrapper<PbSemesterConfig> pbSemesterConfigMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
+ pbSemesterConfigMPJLambdaWrapper
|
|
|
+ .selectAs(BaseSemester::getName, PbSemesterConfigVo::getBaseSemesterIdCn)
|
|
|
+ .select(PbSemesterConfig.class, x -> VoToColumnUtil.fieldsToColumns(PbSemesterConfigVo.class).contains(x.getProperty()))
|
|
|
+ .leftJoin(BaseSemester.class, BaseSemester::getId, PbSemesterConfig::getBaseSemesterId)
|
|
|
+ ;
|
|
|
+ List<PbSemesterConfigVo> pbSemesterConfigVoList = pbSemesterConfigService.selectJoinList(PbSemesterConfigVo.class, pbSemesterConfigMPJLambdaWrapper);
|
|
|
+
|
|
|
+ Map<String, PbSemesterConfigVo> pbSemesterConfigMap = new HashMap<>();
|
|
|
+ for (PbSemesterConfigVo pbSemesterConfigVo : pbSemesterConfigVoList){
|
|
|
+ pbSemesterConfigMap.put(pbSemesterConfigVo.getBeltcode(), pbSemesterConfigVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (PersonalPortraitFeeInformationVo personalPortraitFeeInformationVo : personalPortraitFeeInformationVoList){
|
|
|
+ String beltcode = personalPortraitFeeInformationVo.getBeltcode();
|
|
|
+ if(beltcode != null){
|
|
|
+ personalPortraitFeeInformationVo.setBaseSemester(String.valueOf(pbSemesterConfigMap.get(beltcode).getBaseSemesterId()));
|
|
|
+ personalPortraitFeeInformationVo.setBaseSemesterCn(pbSemesterConfigMap.get(beltcode).getBaseSemesterIdCn());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return personalPortraitFeeInformationVoList;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -51,15 +92,15 @@ public class PbVXsxxsfytbServiceImpl extends MPJBaseServiceImpl<PbVXsxxsfytbMapp
|
|
|
if (dto.getSemesterId() != null && dto.getSemesterId() > 0) {
|
|
|
pbVXsxxsfytbMPJLambdaWrapper.exists("select 1 from `pb_semester_config` where base_semester_id = " + dto.getSemesterId() + " and beltcode = pb_v_xsxxsfytb.beltcode");
|
|
|
}
|
|
|
+
|
|
|
pbVXsxxsfytbMPJLambdaWrapper
|
|
|
.disableSubLogicDel()
|
|
|
.like(dto.getFeeitemname() != null && !dto.getFeeitemname().equals(""), PbVXsxxsfytb::getFeeitemname, dto.getFeeitemname())
|
|
|
.like(dto.getName() != null && !dto.getName().equals(""), PbVXsxxsfytb::getFeeobjname, dto.getName())
|
|
|
.eq(dto.getStudentId() != null && !dto.getStudentId().equals(""), PbVXsxxsfytb::getStudentcode, dto.getStudentId())
|
|
|
- .in(dto.getClassIdList() != null && !dto.getClassIdList().isEmpty(), PbVXsxxsfytb::getStudentcode, dto.getStudentId())
|
|
|
+ .in(dto.getClassIdList() != null && !dto.getClassIdList().isEmpty(), BaseStudentSchoolRoll::getClassId, dto.getClassIdList())
|
|
|
.leftJoin(XjrUser.class, XjrUser::getCredentialNumber, PbVXsxxsfytb::getPersonalid)
|
|
|
.leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, XjrUser::getId)
|
|
|
- .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId)
|
|
|
.select(PbVXsxxsfytb.class, x -> VoToColumnUtil.fieldsToColumns(PbVXsxxsfytbPageVo.class).contains(x.getProperty()))
|
|
|
;
|
|
|
|