新增退出时机表,完成投资报告页面接口

master
xiaoCJ 1 year ago
parent 22ed44b0a1
commit 48b2309ee8

@ -50,7 +50,7 @@ public class InvestmentReportController {
// 基金收益/投资金额=投资收益率
BigDecimal bigDecimal = fundEarnings.divide(investmentAmount,6,RoundingMode.HALF_UP);
map.put(profitManagement.getMarketTime(), bigDecimal);
map.put(profitManagement.getMarketTime(), bigDecimal);// todo 时间格式是年月日
}
}
return new ResultEntity<Map<Integer, BigDecimal>>(map);
@ -68,14 +68,14 @@ public class InvestmentReportController {
@AnonymousAccess
@PostMapping("commitExperience")
@ApiOperation("提交心得")
public ResultEntity<String> commitExperience(@ApiParam("传三个ID、experience、uploadTime") @RequestBody TrainingReport trainingReport) {
public ResultEntity<String> commitExperience(@ApiParam("传三个ID、experience") @RequestBody TrainingReport trainingReport) {
return investmentReportService.commitExperience(trainingReport);
}
@AnonymousAccess
@PostMapping("getExperience")
@GetMapping("getExperience")
@ApiOperation("心得回显")
public ResultEntity<String> getExperience(@RequestBody String flowId) {
public ResultEntity<String> getExperience(@RequestParam String flowId) {
List<TrainingReport> trainingReports = investmentReportService.getTrainingReports(flowId);
if (trainingReports.isEmpty()) {
return null;

@ -100,8 +100,8 @@ public class ClassScoreController {
@AnonymousAccess
@GetMapping("/getStuTrainingScore")
@ApiOperation("成绩详情&投资报告/实训成绩展示")
public ResultEntity<PerformanceTrainingScoreDto> getStuTrainingScore(@ApiParam("页面返回的得分ID") @RequestParam String performanceScoreId) {
return new ResultEntity<>(classScoreService.getStuTrainingScore(performanceScoreId));
public ResultEntity<PerformanceTrainingScoreDto> getStuTrainingScore(@RequestParam String flowId) {
return new ResultEntity<>(classScoreService.getStuTrainingScore(flowId));
}
@AnonymousAccess

@ -1,5 +1,6 @@
package com.sztzjy.fund_investment.service.serviceImpl;
import com.sztzjy.fund_investment.config.Constant;
import com.sztzjy.fund_investment.entity.TrainingReport;
import com.sztzjy.fund_investment.entity.TrainingReportExample;
import com.sztzjy.fund_investment.mapper.TrainingReportMapper;
@ -7,7 +8,6 @@ import com.sztzjy.fund_investment.service.InvestmentReportService;
import com.sztzjy.fund_investment.util.ResultEntity;
import com.sztzjy.fund_investment.util.file.IFileUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
@ -52,7 +52,7 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
trainingReport.setUrl(filePath);
trainingReport.setReportName(fileName);
trainingReport.setUploadtime(new Date());
trainingReport.setStep("投资报告");
trainingReport.setStep(Constant.TZBG);
trainingReportMapper.updateByPrimaryKey(trainingReport);
return new ResultEntity<>(HttpStatus.OK, "报告上传成功!");
}
@ -64,7 +64,7 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
trainingReport.setUrl(filePath);
trainingReport.setReportName(fileName);
trainingReport.setUploadtime(new Date());
trainingReport.setStep("投资报告");
trainingReport.setStep(Constant.TZBG);
trainingReportMapper.insert(trainingReport);
return new ResultEntity<>(HttpStatus.OK, "报告上传成功!");
}
@ -75,7 +75,7 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
public List<TrainingReport> getTrainingReports(String flowId) {
TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId);
return trainingReportMapper.selectByExample(trainingReportExample);
return trainingReportMapper.selectByExampleWithBLOBs(trainingReportExample);
}

@ -144,7 +144,7 @@ public class ClassScoreServiceImpl implements ClassScoreService {
Flow flow = flowMapper.selectByPrimaryKey(userTable.getUserid());
String flowId = flow.getFlowId();
TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId); //todo 查询时看需不需要加上模块
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(Constant.TZBG);
List<TrainingReport> trainingReports = reportMapper.selectByExample(trainingReportExample);
PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample();
performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId);
@ -423,8 +423,14 @@ public class ClassScoreServiceImpl implements ClassScoreService {
* @Date 2023/11/29
*/
@Override
public PerformanceTrainingScoreDto getStuTrainingScore(String performanceScoreId) {
PerformanceScore performanceScore = performanceScoreMapper.selectByPrimaryKey(performanceScoreId);
public PerformanceTrainingScoreDto getStuTrainingScore(String flowId) {
PerformanceScoreExample example =new PerformanceScoreExample();
example.createCriteria().andFlowIdEqualTo(flowId);
List<PerformanceScore> performanceScores = performanceScoreMapper.selectByExample(example);
if (performanceScores.isEmpty()){
return null;
}
PerformanceScore performanceScore = performanceScores.get(0);
PerformanceTrainingScoreDto performanceTrainingScoreDto = new PerformanceTrainingScoreDto();
performanceTrainingScoreDto.setFlowId(performanceScore.getFlowId());
performanceTrainingScoreDto.setPracticalCognitionScore(performanceScore.getPracticalCognitionScore());

@ -29,7 +29,7 @@ public interface ClassScoreService {
PerformanceScoreDto getPerformanceScoreDto(String flowId);
PerformanceTrainingScoreDto getStuTrainingScore(String performanceScoreId);
PerformanceTrainingScoreDto getStuTrainingScore(String flowId);
FoundProjectDto getReportStringByFlowId(String flowId);

@ -11,7 +11,7 @@ spring:
# 文件存储
file:
type: local
path: C:/Users/86132/Desktop/fsdownload
path: D:/home
timer:
enable: false
Loading…
Cancel
Save