修复排序 评分分数计算有误的问题

master
yz 4 months ago
parent ffb481cf78
commit 839babf29c

@ -323,9 +323,13 @@ public class CaseController {
@PostMapping("countLearnTime") @PostMapping("countLearnTime")
@ApiOperation("统计实训学习时长") @ApiOperation("统计实训学习时长")
@AnonymousAccess @AnonymousAccess
public void countLearnTime(@RequestParam String trainingId, public void countLearnTime(@RequestParam(required = false) String trainingId,
@ApiParam("时间,单位分钟") BigDecimal minuter) { @ApiParam("时间,单位分钟") BigDecimal minuter) {
if(trainingId==null){
return;
}
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(trainingId); StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(trainingId);
if(stuTrainingWithBLOBs!=null){
if (stuTrainingWithBLOBs.getTrainingTime()==null){ if (stuTrainingWithBLOBs.getTrainingTime()==null){
stuTrainingWithBLOBs.setTrainingTime(minuter); stuTrainingWithBLOBs.setTrainingTime(minuter);
}else { }else {
@ -333,13 +337,20 @@ public class CaseController {
} }
stuTrainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs); stuTrainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs);
} }
}
@PostMapping("countCaseTime") @PostMapping("countCaseTime")
@ApiOperation("统计综合规划编辑建议书时间") @ApiOperation("统计综合规划编辑建议书时间")
@AnonymousAccess @AnonymousAccess
public void countCaseTime(@RequestParam String stuClientId, public void countCaseTime(@RequestParam(required = false) String stuClientId,
@ApiParam("时间,单位分钟") BigDecimal minuter) { @ApiParam("时间,单位分钟") BigDecimal minuter) {
if(stuClientId==null){
return;
}
SynthesisPlanClient synthesisPlanClient = synthesisPlanClientMapper.selectByPrimaryKey(stuClientId); SynthesisPlanClient synthesisPlanClient = synthesisPlanClientMapper.selectByPrimaryKey(stuClientId);
if(synthesisPlanClient==null){
return;
}
if (synthesisPlanClient.getSubmitStatus().equals("已审核")||synthesisPlanClient.getSubmitStatus().equals("未审核")){ if (synthesisPlanClient.getSubmitStatus().equals("已审核")||synthesisPlanClient.getSubmitStatus().equals("未审核")){
return; return;
} else { } else {

@ -718,6 +718,9 @@ public class GradeController {
Map<String, ObjCaseScoreVo> map = new HashMap<>(); Map<String, ObjCaseScoreVo> map = new HashMap<>();
for (int i = 0; i < synthesisPlanScores.size(); i++) { for (int i = 0; i < synthesisPlanScores.size(); i++) {
SynthesisPlanScore synthesisPlanScore = synthesisPlanScores.get(i); SynthesisPlanScore synthesisPlanScore = synthesisPlanScores.get(i);
if(synthesisPlanScore.getTestCenter().contains("分析") || synthesisPlanScore.getTestCenter().contains("理财方案")){
continue;
}
if (map.containsKey(synthesisPlanScore.getManageMoneyMattersType())) { if (map.containsKey(synthesisPlanScore.getManageMoneyMattersType())) {
ObjCaseScoreVo objCaseScoreVo = map.get(synthesisPlanScore.getManageMoneyMattersType()); ObjCaseScoreVo objCaseScoreVo = map.get(synthesisPlanScore.getManageMoneyMattersType());
objCaseScoreVo.setStandardScore(objCaseScoreVo.getStandardScore().add(BigDecimal.valueOf(2))); objCaseScoreVo.setStandardScore(objCaseScoreVo.getStandardScore().add(BigDecimal.valueOf(2)));

@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@RestController @RestController
@ -107,6 +108,10 @@ public class ProductCenter {
} }
example.setOrderByClause("code_id asc"); example.setOrderByClause("code_id asc");
List<p2pData> p2pData = p2pDataMapper.selectByExample(example); List<p2pData> p2pData = p2pDataMapper.selectByExample(example);
for (int i = 0; i < p2pData.size(); i++) {
p2pData.get(i).setAnnualReturn(String.valueOf(BigDecimal.valueOf(Double.parseDouble(p2pData.get(i).getAnnualReturn())).setScale(2,BigDecimal.ROUND_HALF_UP)));
p2pData.get(i).setPeratio(String.valueOf(BigDecimal.valueOf(Double.parseDouble(p2pData.get(i).getPeratio())).setScale(2,BigDecimal.ROUND_HALF_UP)));
}
PageInfo<p2pData> pageInfo = new PageInfo<>(p2pData); PageInfo<p2pData> pageInfo = new PageInfo<>(p2pData);
return new ResultEntity<>(HttpStatus.OK, "P2P产品查询成功", pageInfo); return new ResultEntity<>(HttpStatus.OK, "P2P产品查询成功", pageInfo);
} }

@ -170,7 +170,7 @@ public class StatisticsController {
@AnonymousAccess @AnonymousAccess
@GetMapping("/getTeaTrainingScoreAnalysis") @GetMapping("/getTeaTrainingScoreAnalysis")
@ApiOperation("老师端 -班级成绩统计分析") @ApiOperation("老师端 -班级成绩统计分析")
public TeaClassScoreDto getTeaTrainingScoreAnalysis(String schoolId, String classId, Date time) { public TeaClassScoreDto getTeaTrainingScoreAnalysis(@RequestParam String schoolId,@RequestParam(required = false) String classId,@RequestParam Date time) {
ScoreRankExample scoreExample = new ScoreRankExample(); ScoreRankExample scoreExample = new ScoreRankExample();
ScoreRankExample.Criteria criteria = scoreExample.createCriteria(); ScoreRankExample.Criteria criteria = scoreExample.createCriteria();
// 将Date对象转换为指定格式的字符串 // 将Date对象转换为指定格式的字符串

@ -9,7 +9,6 @@ import java.math.BigDecimal;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
public class StuSynthesisPlanScoreDto { public class StuSynthesisPlanScoreDto {
@ApiModelProperty("学习项目") @ApiModelProperty("学习项目")
private String name; private String name;

@ -7,7 +7,7 @@ import java.math.BigDecimal;
@Data @Data
public class ObjCaseScoreVo { public class ObjCaseScoreVo {
@ApiModelProperty("标准分") @ApiModelProperty("客观题标准分")
private BigDecimal StandardScore; private BigDecimal StandardScore;
@ApiModelProperty("学生得分") @ApiModelProperty("学生得分")

@ -606,6 +606,7 @@
from score_rank s from score_rank s
where school_id = #{schoolId,jdbcType=VARCHAR} and class_name=#{className,jdbcType=VARCHAR} where school_id = #{schoolId,jdbcType=VARCHAR} and class_name=#{className,jdbcType=VARCHAR}
group BY update_date group BY update_date
order by update_date asc
LIMIT 5 LIMIT 5
</select> </select>

Loading…
Cancel
Save