Commit 9bc0a6df authored by sunyuhua's avatar sunyuhua

缺少里程提交成绩报错

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