Commit 9bc0a6df authored by sunyuhua's avatar sunyuhua

缺少里程提交成绩报错

parent 0309a7cb
......@@ -25,7 +25,7 @@ public class CmptScoreRuleScoreInfo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private String subsectionTime;
private Integer subsectionscore;
private Integer subsectionMileage;
private int subsectionMileage;
//成绩审核的状态,0为未审核,1为审核通过,2为审核未通过
private Integer checkStatus;
private float cmptPace;
......
......@@ -25,7 +25,7 @@ public class FuncSetting {
@ApiModelProperty(value = "轮播开关")
private Integer banner;
@ApiModelProperty(value = "里程开关,小程序成绩提交页面")
private Integer mileage;
private int mileage;
@ApiModelProperty(value = "成绩自动审核开关,后台成绩审核页面")
private Integer switchScoreReview;
@JsonIgnore
......
......@@ -2,10 +2,12 @@ package com.dlbridge.jadp.plugins.cmpt.bean;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Data
@ToString
public class UserScore {
private String markNo;
......@@ -18,4 +20,6 @@ public class UserScore {
Score score;
}
......@@ -63,7 +63,7 @@ public interface CmptScoreRuleScoreInfoMapper {
* @param noPassedIds
* @return
*/
int uploadCmptScoreRuleScoreInfoByNoPassedIds(int cmptId, int roadId, int ruleId,int[] noPassedIds);
int uploadCmptScoreRuleScoreInfoByNoPassedIds(@Param("cmptId") int cmptId, @Param("roadId") int roadId, @Param("ruleId") int ruleId, @Param("noPassedIds") int[] noPassedIds);
/**
* 批量审核,审核成绩结果为通过
......@@ -73,7 +73,7 @@ public interface CmptScoreRuleScoreInfoMapper {
* @param passedIds
* @return
*/
int uploadCmptScoreRuleScoreInfoByPassedIds(int cmptId, int roadId, int ruleId,int[] passedIds);
int uploadCmptScoreRuleScoreInfoByPassedIds(@Param("cmptId") int cmptId, @Param("roadId") int roadId,@Param("ruleId") int ruleId,@Param("passedIds") int[] passedIds);
/**
* 根据提交成绩Id,获取这个人号码牌
......
......@@ -934,6 +934,7 @@ public class MicroApiController {
@ApiResponse(code = 200, message = "成功", response = Result.class)})
@ApiOperation(value = "上传成绩", notes = "上传成绩", response = Result.class, tags = "上传成绩")
public Result getScore(UserScore score) {
log.info("用户提交的成绩信息:"+score.toString());
CmptScoreRule rule = cmptScoreRuleService.getCmptScoreRulesByCmptIdAndIndex(score.getCmptId(),score.getIndexId());
if(rule == null) return Result.fail().setContent("未找到匹配的规则");
EnrollInfo userInfo = remoteService.getUserInfoByMarkNo(score.getMarkNo(), score.getCmptId());
......@@ -943,19 +944,19 @@ public class MicroApiController {
log.info("用户信息:"+userInfo);
Map<String,Object> result = new HashMap<>();
result.put("user",userInfo);
//EnrollInfo(id=0, enrollId=10629228, userName=孙玉华, markNo=S100002, roadName=3公里, phone=18121278668, roadId=21296, remark=null, gender=男)
Integer scoreItemId = cmptScoreRuleService.getCmptScoreRulesMapByMarkNoAndRuleId(userInfo.getMarkNo(),rule.getId());
//小程序添加里程的是否需要用户填写
FuncSetting funcSetting =funcSettingService.getSettingByCmptId(score.getCmptId());
Integer switchMileage=funcSetting.getMileage();
Integer subsectionMileage=0;
int switchMileage=funcSetting.getMileage();
int subsectionMileage=0;
if(scoreItemId != null){
CmptScoreRuleScoreInfo cmptScoreRuleScoreInfo=cmptScoreRuleScoreInfoService.getCmptScoreRuleScoreInfoByruleIdAndMarkNo(score.getCmptId(),score.getMarkNo(),rule.getId());
//Result<ScoreItem> scoreItem = scoreService1.getScoreItem(scoreItemId);
//ScoreItem content = scoreItem.getContent();
if(cmptScoreRuleScoreInfo.getSubsectionMileage()==null){
if(cmptScoreRuleScoreInfo.getSubsectionMileage()==0){
subsectionMileage=0;
}else{
subsectionMileage=cmptScoreRuleScoreInfo.getSubsectionMileage();
......
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