|
|
|
@ -2,10 +2,13 @@ package com.sztzjy.fund_investment.service.serviceImpl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import com.sztzjy.fund_investment.config.Constant;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.PerformanceScore;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.TrainingReport;
|
|
|
|
|
import com.sztzjy.fund_investment.entity.TrainingReportExample;
|
|
|
|
|
import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper;
|
|
|
|
|
import com.sztzjy.fund_investment.mapper.TrainingReportMapper;
|
|
|
|
|
import com.sztzjy.fund_investment.service.InvestmentReportService;
|
|
|
|
|
import com.sztzjy.fund_investment.service.PerformanceScoreService;
|
|
|
|
|
import com.sztzjy.fund_investment.util.ResultEntity;
|
|
|
|
|
import com.sztzjy.fund_investment.util.file.IFileUtil;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -27,8 +30,11 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IFileUtil fileUtil;
|
|
|
|
|
@Autowired
|
|
|
|
|
TrainingReportMapper trainingReportMapper;
|
|
|
|
|
|
|
|
|
|
private TrainingReportMapper trainingReportMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PerformanceScoreService performanceScoreService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private PerformanceScoreMapper performanceScoreMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 报告提交
|
|
|
|
@ -58,6 +64,10 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
|
|
|
|
|
trainingReport.setUploadtime(new Date());
|
|
|
|
|
trainingReport.setStep(Constant.TZBG);
|
|
|
|
|
trainingReportMapper.updateByPrimaryKeySelective(trainingReport);
|
|
|
|
|
//记录时间
|
|
|
|
|
PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
performanceScore.setInvestmentReportTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(performanceScore);
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "报告上传成功!");
|
|
|
|
|
}
|
|
|
|
|
} else { //没上传报告没提交心得的情况
|
|
|
|
@ -70,6 +80,10 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
|
|
|
|
|
trainingReport.setUploadtime(new Date());
|
|
|
|
|
trainingReport.setStep(Constant.TZBG);
|
|
|
|
|
trainingReportMapper.insert(trainingReport);
|
|
|
|
|
//记录时间
|
|
|
|
|
PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
performanceScore.setInvestmentReportTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(performanceScore);
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "报告上传成功!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|