查询添加大模块

master
whb 9 months ago
parent 42976b3a3e
commit 249704aa71

@ -114,9 +114,9 @@ public class StuConceptBlockController {
@GetMapping("/getReport")
@ApiOperation("获取实训报告详情")
@AnonymousAccess
public ResultDataEntity<StuPracticalTrainingReport> getReport(String userId, String module) {
public ResultDataEntity<StuPracticalTrainingReport> getReport(String userId, String module,String ascription) {
StuPracticalTrainingReport report = stuConceptBlockService.getReport(userId, module);
StuPracticalTrainingReport report = stuConceptBlockService.getReport(userId, module,ascription);
return new ResultDataEntity<>(HttpStatus.OK, report);
}
@ -145,9 +145,9 @@ public class StuConceptBlockController {
@GetMapping("/download")
@ApiOperation("下载实训报告")
@AnonymousAccess
public void download(@RequestParam String userId, String TOKEN, HttpServletResponse response, String module) {
public void download(@RequestParam String userId, String TOKEN, HttpServletResponse response, String module,String ascription) {
TokenProvider.getJWTUser(TOKEN);
stuConceptBlockService.download(userId, response, module);
stuConceptBlockService.download(userId, response, module,ascription);
}
@GetMapping("/getResourceUrl")

@ -65,14 +65,14 @@ public class StuExperimentTrainByCreditController {
@GetMapping("/preAllView")
@AnonymousAccess
public ResponseEntity<byte[]> preViewByContract(
@RequestParam(required = true,name = "name")@NotBlank @ApiParam("文件类型名如:负债信息概要/参保信息样板") String name) throws IOException {
@RequestParam(required = true,name = "name")@NotBlank @ApiParam("文件类型名如:负债信息概要/参保信息样板/担保协议书") String name) throws IOException {
HashMap<String, String> map = new HashMap<>();
map.put("负债信息概要","/credit/**");
map.put("参保信息样板","/credit/**");
map.put("个人信用信息查询及报送授权书","/credit/个人信用信息查询及报送授权书.pdf");
map.put("担保协议书","/credit/担保协议书.pdf");
map.put("个人信用信息查询及报送授权书","/个人信用信息查询及报送授权书.pdf");
map.put("担保协议书","/担保协议书.pdf");
String fileUrl = map.get(name);
@ -83,7 +83,7 @@ public class StuExperimentTrainByCreditController {
byte[] sealBytes = Files.readAllBytes(Paths.get(imagePath));
// 构建HTTP响应设置Content-Type为image/png
return ResponseEntity.ok().contentType(MediaType.IMAGE_PNG).body(sealBytes);
return ResponseEntity.ok().contentType(MediaType.APPLICATION_PDF).body(sealBytes);
}
@ -94,7 +94,7 @@ public class StuExperimentTrainByCreditController {
@GetMapping("/downloadDoc")
@AnonymousAccess
@ApiOperation("文件下载")
public void download(HttpServletResponse response,@ApiParam("个人信用信息查询/数据说明表") String docName){
public void download(HttpServletResponse response,@ApiParam("个人信用信息查询/数据说明表/担保协议书") String docName){
String url = null;
if ("个人信用信息查询".equals(docName))
@ -106,7 +106,10 @@ public class StuExperimentTrainByCreditController {
url= "数据说明表.xls";
}
if ("担保协议书".equals(docName))
{
url= "担保协议书.pdf";
}
iFileUtil.download(response,url);

@ -148,6 +148,9 @@ public class StuTaskController {
@Scheduled(fixedDelay = 3600000)
public void updateUserRank(){
log.info("定时任务:==================根据学校更新排名======================");
//先查询所有学校id
List<String> schoolIds=userMapper.selectSchool();
for (int i = 0; i < schoolIds.size(); i++) {
@ -168,6 +171,8 @@ public class StuTaskController {
userService.comprehensiveCaseRank(schoolId);
}
log.info("定时任务:==================执行结束======================");
}

@ -2,7 +2,10 @@ package com.sztzjy.digital_credit.entity;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
*
* @author whb
@ -15,6 +18,8 @@ public class StuPracticalTrainingReport {
@ApiModelProperty("报告名称")
private String reportName;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@ApiModelProperty("上传时间")
private Date uploadTime;

@ -31,9 +31,9 @@ public interface StuConceptBlockService {
StuPracticalTrainingReport upload(MultipartFile file, StuBlockProductWithDTO stuBlockProductWithBLOBs);
void download(String id, HttpServletResponse response,String module);
void download(String id, HttpServletResponse response,String module,String ascription);
StuPracticalTrainingReport getReport(String userId, String module);
StuPracticalTrainingReport getReport(String userId, String module,String ascription);
/**
* pdf

@ -352,9 +352,9 @@ public class StuConceptBlockServiceImpl implements StuConceptBlockService {
*
*/
@Override
public void download(String id, HttpServletResponse response, String module) {
public void download(String id, HttpServletResponse response, String module,String ascription) {
StuPracticalTrainingReportExample reportExample = new StuPracticalTrainingReportExample();
reportExample.createCriteria().andModuleEqualTo(module).andUseridEqualTo(id);
reportExample.createCriteria().andModuleEqualTo(module).andUseridEqualTo(id).andAscriptionEqualTo(ascription);
@ -381,7 +381,7 @@ public class StuConceptBlockServiceImpl implements StuConceptBlockService {
* @return
*/
@Override
public StuPracticalTrainingReport getReport(String userId, String module) {
public StuPracticalTrainingReport getReport(String userId, String module,String ascription) {
//获取实验报告
StuPracticalTrainingReportExample export = new StuPracticalTrainingReportExample();

@ -444,7 +444,7 @@ public class StuPersonalCreditServiceImpl implements StuPersonalCreditService {
public void scoreEntry(String userId, String module, BigDecimal score) {
// TODO: 2024/4/24 判断用户第几次实训 重新实训次数0第一次 1第二次 2第三次
StuScoreCenterExample scoreCenterExample = new StuScoreCenterExample();
scoreCenterExample.createCriteria().andUserIdEqualTo(userId);
scoreCenterExample.createCriteria().andUserIdEqualTo(userId).andModuleEqualTo(module);
List<StuScoreCenter> stuScoreCenters = stuScoreCenterMapper.selectByExample(scoreCenterExample);

Loading…
Cancel
Save