@t2652009480 9 months ago
commit 135848e921

@ -107,9 +107,9 @@ public class ContractInvestmentController {
public ResultEntity<Double> totalInvestAmount(@ApiParam("流程ID") @RequestParam String flowId, public ResultEntity<Double> totalInvestAmount(@ApiParam("流程ID") @RequestParam String flowId,
@ApiParam("总投资额度") @RequestParam Double totalInvest) { @ApiParam("总投资额度") @RequestParam Double totalInvest) {
//金额不低于100万 //金额不低于100万
if (1000000 > totalInvest) { // if (1000000 > totalInvest) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "金额不能低于100万"); // return new ResultEntity(HttpStatus.BAD_REQUEST, "金额不能低于100万");
} // }
//查询估值 //查询估值
FoundProjectExample foundProjectExample = new FoundProjectExample(); FoundProjectExample foundProjectExample = new FoundProjectExample();
@ -136,9 +136,9 @@ public class ContractInvestmentController {
// 金额不低于100万持股比例自动显示为总投资额/估值持股比例不低于5% // 金额不低于100万持股比例自动显示为总投资额/估值持股比例不低于5%
double proportion = (totalInvest / v)*100; double proportion = (totalInvest / v)*100;
if (0.05 > proportion) { // if (0.05 > proportion) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "持股比例不低于5%"); // return new ResultEntity(HttpStatus.BAD_REQUEST, "持股比例不低于5%");
} // }
ProfitManagementExample profitManagementExample = new ProfitManagementExample(); ProfitManagementExample profitManagementExample = new ProfitManagementExample();
profitManagementExample.createCriteria().andFlowIdEqualTo(flowId); profitManagementExample.createCriteria().andFlowIdEqualTo(flowId);

@ -2,11 +2,9 @@ package com.sztzjy.fund_investment.controller;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.sztzjy.fund_investment.annotation.AnonymousAccess; import com.sztzjy.fund_investment.annotation.AnonymousAccess;
import com.sztzjy.fund_investment.config.Constant;
import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.*;
import com.sztzjy.fund_investment.mapper.FlowMapper; import com.sztzjy.fund_investment.mapper.FlowMapper;
import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper;
import com.sztzjy.fund_investment.mapper.TopicsMapper;
import com.sztzjy.fund_investment.mapper.UserMapper; import com.sztzjy.fund_investment.mapper.UserMapper;
import com.sztzjy.fund_investment.service.PerformanceScoreService; import com.sztzjy.fund_investment.service.PerformanceScoreService;
import com.sztzjy.fund_investment.service.TopicService; import com.sztzjy.fund_investment.service.TopicService;
@ -132,8 +130,12 @@ public class TopicController {
PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample();
performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId); performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId);
List<PerformanceScore> performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); List<PerformanceScore> performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample);
if (performanceScores.isEmpty()) {
return null;
} else {
return new ResultEntity<>(performanceScores.get(0)); return new ResultEntity<>(performanceScores.get(0));
} }
}
@AnonymousAccess @AnonymousAccess

@ -329,7 +329,16 @@ public class TopicServiceImpl implements TopicService {
@Override @Override
public List<TopicRecord> getTopicRecord(String flowId, String module) { public List<TopicRecord> getTopicRecord(String flowId, String module) {
TopicRecordExample example = new TopicRecordExample(); TopicRecordExample example = new TopicRecordExample();
example.createCriteria().andModuleEqualTo(module).andFlowIdEqualTo(flowId); TopicRecordExample.Criteria criteria = example.createCriteria();
criteria.andFlowIdEqualTo(flowId);
if (module.equals("IPO")){
List<String>list =new ArrayList<>();
list.add(Constant.IPOBK);
list.add(Constant.IPOTJ);
criteria.andModuleIn(list);
}else {
criteria.andModuleEqualTo(module);
}
example.setOrderByClause("id"); example.setOrderByClause("id");
List<TopicRecord> list = topicRecordMapper.selectByExample(example); List<TopicRecord> list = topicRecordMapper.selectByExample(example);
return list; return list;

Loading…
Cancel
Save