xiangpei
2024-07-09 53dea0ef5fc8b035397b73b10f7a819ebf381b1c
src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java
@@ -11,18 +11,15 @@
import com.mindskip.xzs.service.ExamTemplatesUserCountService;
import com.mindskip.xzs.utility.convert.ExamTemplatesClassConvert;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperTitleItemVM;
import com.mindskip.xzs.viewmodel.admin.exam.QuestionTypeVM;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
@@ -76,6 +73,7 @@
        examTemplates.setTitleName(model.getTitleItems().get(0).getName());
        examTemplates.setStatus(model.getStatus());
        examTemplates.setMenuIds(model.getMenuIds());
        examTemplates.setCreateUser(model.getCreateUser());
        examTemplatesMapper.add(examTemplates);
        List<ExamTemplatesQuestion> examTemplatesQuestions = ExamTemplatesClassConvert.INSTANCE.QuestionTypeVMListToExamTemplatesQuestionList(model.getQuestionTypeVMS())
@@ -147,7 +145,7 @@
        vm.setType("1");
        vm.setId(null);
        ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user);
        ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId());
        ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId());
        count.setExamPaperId(examPaper.getId());
        count.setUserId(user.getId());
        examTemplatesUserCountService.add(count);
@@ -166,7 +164,7 @@
        vm.setType("1");
        vm.setId(null);
        ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user);
        ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId());
        ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId());
//        count.setExamPaperId(examPaper.getId());
//        count.setUserId(user.getId());
//        examTemplatesUserCountService.add(count);