|
|
|
@ -3,37 +3,33 @@ package com.sztzjy.marketing.service.impl;/**
|
|
|
|
|
* @date 2024-08-05 10:41
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.sztzjy.marketing.config.ThreadPoolConfig;
|
|
|
|
|
import com.sztzjy.marketing.entity.*;
|
|
|
|
|
import com.sztzjy.marketing.entity.dto.StuUserDto;
|
|
|
|
|
import com.sztzjy.marketing.entity.dto.TchrePortPresentationDTO;
|
|
|
|
|
import com.sztzjy.marketing.entity.tchdto.TchGeneralViewInfoDTO;
|
|
|
|
|
import com.sztzjy.marketing.entity.tchdto.TchGeneralViewWeightDTO;
|
|
|
|
|
import com.sztzjy.marketing.entity.tchdto.tchScoreViewShowDTO;
|
|
|
|
|
import com.sztzjy.marketing.mapper.StuPracticalTrainingReportMapper;
|
|
|
|
|
import com.sztzjy.marketing.mapper.StuUploadImgAiMapper;
|
|
|
|
|
import com.sztzjy.marketing.mapper.StuUserMapper;
|
|
|
|
|
import com.sztzjy.marketing.mapper.TchModuleWeithMapper;
|
|
|
|
|
import com.sztzjy.marketing.service.TchUserService;
|
|
|
|
|
import com.sztzjy.marketing.util.PageUtil;
|
|
|
|
|
import com.sztzjy.marketing.util.ResultEntity;
|
|
|
|
|
import com.sztzjy.marketing.util.file.IFileUtil;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class TchUserServiceImpl implements TchUserService {
|
|
|
|
@ -44,12 +40,15 @@ public class TchUserServiceImpl implements TchUserService {
|
|
|
|
|
private StuUserMapper stuUserMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
ThreadPoolConfig threadPoolConfig;
|
|
|
|
|
private IFileUtil fileUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuUploadImgAiMapper stuUploadImgAiMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private StuPracticalTrainingReportMapper stuPracticalTrainingReportMapper;
|
|
|
|
|
|
|
|
|
|
// 成绩总览展示 (条件查询)
|
|
|
|
|
@Override
|
|
|
|
|
public PageInfo<TchGeneralViewInfoDTO> selectGeneralViewList(tchScoreViewShowDTO viewShowDTO) {
|
|
|
|
@ -135,13 +134,12 @@ public class TchUserServiceImpl implements TchUserService {
|
|
|
|
|
|
|
|
|
|
// // 更新totalRank值
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
|
|
|
|
|
list.get(i).setTotalRank(i + 1);
|
|
|
|
|
|
|
|
|
|
stuUserMapper.updateByPrimaryKeySelective(list.get(i));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -155,8 +153,10 @@ public class TchUserServiceImpl implements TchUserService {
|
|
|
|
|
|
|
|
|
|
PageHelper.startPage(page,size);
|
|
|
|
|
|
|
|
|
|
List<TchrePortPresentationDTO> tchrePortPresentationDTOList
|
|
|
|
|
= stuUploadImgAiMapper.selectInfoBySchoolId(schoolId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<TchrePortPresentationDTO> tchrePortPresentationDTOList = stuPracticalTrainingReportMapper.selectInfoBySchoolId(schoolId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageInfo<TchrePortPresentationDTO> tchrePortPresentationDTOPageInfo = new PageInfo<>(tchrePortPresentationDTOList);
|
|
|
|
|
|
|
|
|
@ -193,4 +193,18 @@ public class TchUserServiceImpl implements TchUserService {
|
|
|
|
|
public List<String> getClassNameBySchoolId(String schoolId) {
|
|
|
|
|
return stuUserMapper.getClassNameBySchoolId(schoolId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* @author xcj
|
|
|
|
|
* @Date 2023/10/11
|
|
|
|
|
*
|
|
|
|
|
*教师端评阅,下载报告
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void download(Integer id, HttpServletResponse response) {
|
|
|
|
|
StuPracticalTrainingReport stuPracticalTrainingReport = stuPracticalTrainingReportMapper.selectByPrimaryKey(id);
|
|
|
|
|
Assert.isTrue(stuPracticalTrainingReport != null && stuPracticalTrainingReport.getUrl() != null, "报告不存在");
|
|
|
|
|
fileUtil.download(response, stuPracticalTrainingReport.getReportName(), stuPracticalTrainingReport.getUrl());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|