|
|
|
@ -154,8 +154,6 @@ public class TopicServiceImpl implements TopicService {
|
|
|
|
|
return new ResultEntity<List<String>>(HttpStatus.BAD_REQUEST, "请勿重复提交!");
|
|
|
|
|
}
|
|
|
|
|
int score = 0;
|
|
|
|
|
int ipoListedSectorScore = 0; //上市版块得分
|
|
|
|
|
int ipoListedConditionScore = 0; // 上市条件得分
|
|
|
|
|
String module = "";
|
|
|
|
|
for (TopicsWithBLOBs topic : topics) {
|
|
|
|
|
String userAnswer = topic.getUserAnswer();
|
|
|
|
@ -190,20 +188,32 @@ public class TopicServiceImpl implements TopicService {
|
|
|
|
|
// 答案正确
|
|
|
|
|
score = score + 1; // 设置得分为1或其他适当的值
|
|
|
|
|
if (module.equals(Constant.IPOTJ)) {
|
|
|
|
|
ipoListedConditionScore = ipoListedConditionScore + 1;
|
|
|
|
|
performanceScoreService.ipoUpdateScore("ipoListedConditionScore", 1, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
if (module.equals(Constant.IPOBK)) {
|
|
|
|
|
ipoListedSectorScore = ipoListedConditionScore + 1;
|
|
|
|
|
performanceScoreService.ipoUpdateScore("ipoListedSectorScore", 1, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (userAnswer.equals(rightAnswer)) {
|
|
|
|
|
score = score + 1;
|
|
|
|
|
if (module.equals(Constant.IPOTJ)) {
|
|
|
|
|
ipoListedConditionScore = ipoListedConditionScore + 1;
|
|
|
|
|
performanceScoreService.ipoUpdateScore("ipoListedConditionScore", 1, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
if (module.equals(Constant.IPOBK)) {
|
|
|
|
|
ipoListedSectorScore = ipoListedSectorScore + 1;
|
|
|
|
|
performanceScoreService.ipoUpdateScore("ipoListedSectorScore", 1, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -225,6 +235,7 @@ public class TopicServiceImpl implements TopicService {
|
|
|
|
|
topicRecord.setModule(module);
|
|
|
|
|
topicRecord.setTopicType(topicType);
|
|
|
|
|
topicRecordMapper.insert(topicRecord);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (score >= 5) {
|
|
|
|
@ -244,18 +255,7 @@ public class TopicServiceImpl implements TopicService {
|
|
|
|
|
if (module.equals(Constant.XMGZTK)) {
|
|
|
|
|
performanceScoreService.calculateScoreByModule("projectValuationScore", score, flowId);
|
|
|
|
|
}
|
|
|
|
|
if (module.equals(Constant.IPOBK)) {
|
|
|
|
|
performanceScoreService.calculateScoreByModule("ipoListedSectorScore", ipoListedSectorScore, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
if (module.equals(Constant.IPOTJ)) {
|
|
|
|
|
performanceScoreService.calculateScoreByModule("ipoListedConditionScore", ipoListedConditionScore, flowId);
|
|
|
|
|
PerformanceScore byFlowId = performanceScoreService.getByFlowId(flowId);
|
|
|
|
|
byFlowId.setIpoTime(new Date());
|
|
|
|
|
performanceScoreMapper.updateByPrimaryKey(byFlowId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "提交成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|