|
@@ -7,8 +7,6 @@ import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
import com.miaxis.common.utils.SecurityUtils;
|
|
|
-import com.miaxis.common.utils.poi.ExcelUtil;
|
|
|
-import com.miaxis.question.domain.QuestionCollection;
|
|
|
import com.miaxis.score.domain.ScoreInfo;
|
|
|
import com.miaxis.score.dto.ScoreInfoAllDTO;
|
|
|
import com.miaxis.score.dto.ScoreInfoDTO;
|
|
@@ -16,13 +14,10 @@ import com.miaxis.score.service.IScoreInfoService;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
-import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 【模拟考成绩】Controller
|
|
@@ -75,6 +70,33 @@ public class ScoreInfoController extends BaseController{
|
|
|
@PostMapping
|
|
|
@ApiOperation("新增模拟考成绩")
|
|
|
public Response<Integer> add(@RequestBody ScoreInfoDTO scoreInfoDTO){
|
|
|
+
|
|
|
+
|
|
|
+ //线上数据出错的转换
|
|
|
+ if("1".equals(scoreInfoDTO.getType())){
|
|
|
+ scoreInfoDTO.setType("小车");
|
|
|
+ } else if ("2".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setType("客车");
|
|
|
+ } else if ("3".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setType("货车");
|
|
|
+ } else if ("4".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setType("摩托车");
|
|
|
+ } else {
|
|
|
+ scoreInfoDTO.setType("三力测试");
|
|
|
+ }
|
|
|
+ //线上数据出错的转换
|
|
|
+ if("科目一".equals(scoreInfoDTO.getKskm())){
|
|
|
+ scoreInfoDTO.setKskm("1");
|
|
|
+ } else if ("2".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setKskm("2");
|
|
|
+ } else if ("3".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setKskm("3");
|
|
|
+ } else if ("4".equals(scoreInfoDTO.getType())) {
|
|
|
+ scoreInfoDTO.setKskm("4");
|
|
|
+ } else {
|
|
|
+ scoreInfoDTO.setKskm("1");
|
|
|
+ }
|
|
|
+
|
|
|
ScoreInfo scoreInfo = new ScoreInfo();
|
|
|
BeanUtils.copyProperties(scoreInfoDTO,scoreInfo);
|
|
|
scoreInfo.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
|