Commit 21a557b1 authored by sunyuhua's avatar sunyuhua

删除scoreservice使用的地方代码

parent d3497935
...@@ -26,6 +26,7 @@ public class CmptScoreRuleScoreInfo { ...@@ -26,6 +26,7 @@ public class CmptScoreRuleScoreInfo {
private String subsectionTime; private String subsectionTime;
private Integer subsectionscore; private Integer subsectionscore;
private Integer subsectionMileage; private Integer subsectionMileage;
//成绩审核的状态,0为未审核,1为审核通过,2为审核未通过
private Integer checkStatus; private Integer checkStatus;
private Integer cmptPace; private Integer cmptPace;
//用户提交的成绩依据材料路径 //用户提交的成绩依据材料路径
......
...@@ -83,7 +83,7 @@ public class CmptScoreRuleScoreInfoService { ...@@ -83,7 +83,7 @@ public class CmptScoreRuleScoreInfoService {
* @param cmptId * @param cmptId
* @param markNo * @param markNo
*/ */
public boolean scoreReviewByMarkNo(int cmptId, String markNo, int SwitchScoreReview){ public boolean scoreReviewByMarkNo(int cmptId, String markNo,int SwitchScoreReview){
//成绩自动审核开启SwitchScoreReview==1 //成绩自动审核开启SwitchScoreReview==1
boolean enrollFlag=false; boolean enrollFlag=false;
if(SwitchScoreReview==1){ if(SwitchScoreReview==1){
...@@ -145,7 +145,7 @@ public class CmptScoreRuleScoreInfoService { ...@@ -145,7 +145,7 @@ public class CmptScoreRuleScoreInfoService {
List<CmptScoreRuleScoreInfo> cmptScoreRuleScoreInfoList=cmptScoreRuleScoreInfoMapper.getScoreRuleScoreInfoByIds(cmptId,passedIds); List<CmptScoreRuleScoreInfo> cmptScoreRuleScoreInfoList=cmptScoreRuleScoreInfoMapper.getScoreRuleScoreInfoByIds(cmptId,passedIds);
for (CmptScoreRuleScoreInfo cmptScoreRuleScoreInfo:cmptScoreRuleScoreInfoList) { for (CmptScoreRuleScoreInfo cmptScoreRuleScoreInfo:cmptScoreRuleScoreInfoList) {
String markNo=cmptScoreRuleScoreInfo.getMarkNo(); String markNo=cmptScoreRuleScoreInfo.getMarkNo();
//成绩通过将成绩发送到计时系统 //成绩通过将成绩发送到计时系统,手动批量审核权限最高
scoreReviewByMarkNo(cmptId,markNo,1); scoreReviewByMarkNo(cmptId,markNo,1);
} }
} }
......
...@@ -846,38 +846,6 @@ public class MicroApiController { ...@@ -846,38 +846,6 @@ public class MicroApiController {
if(scoreId != null){ if(scoreId != null){
return Result.fail().setMsg("已经上传过成绩!"); return Result.fail().setMsg("已经上传过成绩!");
} }
/**
* 2020-05-14废弃了通过其他微服务存储成绩的方法
*
*
int mileage=score.getScore().getMileage();
ScoreItem scoreItem = new ScoreItem()
.setSubsectionscore(score.getScore().getDuration()).setSubsectionMileage(mileage)
.setSubsectionTime(score.getScore().getDate())
.setCmptId(score.getCmptId()).setRuleId(rule.getId()).setMarkNo(score.getMarkNo());
//前端小程序只提交日期
String date = score.getScore().getDate()+" 12:00:00";
Date date1 = DateUtils.parseDate(date);
Date endTime = rule.getEndTime();
Date startTime = rule.getStartTime();
//规则的校验
if(date1.before(startTime) || date1.after(endTime)){
return Result.fail().setMsg("上传的时间不符合设定的时间范围,需上传时间范围:"+format.format(startTime)+"~"+format.format(endTime));
}
Result<ScoreItem> scoreItemResult = scoreService.saveItem(scoreItem);
log.info(scoreItemResult);
if(!scoreItemResult.isStatus()){
log.info("调用失败");
return Result.fail().setMsg("feign fail");
}
// 保存成绩和用户关系
cmptScoreRuleService.saveScoreRuleMap(new ScoreRuleMap()
.setMarkNo(score.getMarkNo())
.setRuleId(rule.getId())
.setScoreItemId(scoreItemResult.getContent().getId()));
*/
//根据里程计算配速,里程来自用户自己填写的里程或者来自项目的里程 //根据里程计算配速,里程来自用户自己填写的里程或者来自项目的里程
int duration=score.getScore().getDuration(); int duration=score.getScore().getDuration();
int cmptPace=0; int cmptPace=0;
...@@ -903,6 +871,15 @@ public class MicroApiController { ...@@ -903,6 +871,15 @@ public class MicroApiController {
.setSubsectionscore(score.getScore().getDuration()).setSubsectionMileage(mileage).setCmptPace(cmptPace) .setSubsectionscore(score.getScore().getDuration()).setSubsectionMileage(mileage).setCmptPace(cmptPace)
.setSubsectionTime(score.getScore().getDate()) .setSubsectionTime(score.getScore().getDate())
.setCmptId(score.getCmptId()).setRuleId(rule.getId()).setMarkNo(score.getMarkNo()); .setCmptId(score.getCmptId()).setRuleId(rule.getId()).setMarkNo(score.getMarkNo());
//如果自动审核开启的话,进行单条成绩的审核处理
if(settingByCmptId.getSwitchScoreReview()==1){
//配速小于2"27不能通过审核
if(cmptPace<=147){
cmptScoreRuleScoreInfo.setCheckStatus(2);
}else{
cmptScoreRuleScoreInfo.setCheckStatus(1);
}
}
// 保存校验通过的成绩 // 保存校验通过的成绩
cmptScoreRuleScoreInfoService.saveScoreRuleScoreInfo(cmptScoreRuleScoreInfo); cmptScoreRuleScoreInfoService.saveScoreRuleScoreInfo(cmptScoreRuleScoreInfo);
//设置附加项的参数,并保存附加项 //设置附加项的参数,并保存附加项
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment