| | |
| | | @TableField("student_id") |
| | | private String studentId; |
| | | |
| | | @NotBlank(message = "计划名称不能为空") |
| | | @TableField("plan_id") |
| | | private Integer planId; |
| | | |
| | | // @NotBlank(message = "计划名称不能为空") |
| | | @ApiModelProperty(value = "计划名称",required = true) |
| | | @TableField("plan_name") |
| | | private String planName; |
| | |
| | | throw new ApiException("试卷名称已存在"); |
| | | } |
| | | //校验考卷下是否有学员 |
| | | if(checkPaperHasStudent(examPaper.getId())){ |
| | | throw new ApiException("该试卷下已分配学员,不能编辑"); |
| | | } |
| | | // if(checkPaperHasStudent(examPaper.getId())){ |
| | | // throw new ApiException("该试卷下已分配学员,不能编辑"); |
| | | // } |
| | | examPaper.setCode(null);//编号不能修改 |
| | | if(examPaper.getLimitTime()>0){ |
| | | examPaper.setLimited(1); |
| | |
| | | import org.ehcache.core.util.CollectionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | examRecord.setCreateBy(SecurityUtils.getUsername()); |
| | | int row=baseMapper.insert(examRecord); |
| | | List<RecordFile> files = examRecord.getFiles(); |
| | | if (!files.isEmpty()){ |
| | | if (!CollectionUtils.isEmpty(files)){ |
| | | baseMapper.insertFile(files,examRecord.getId()); |
| | | } |
| | | if(row<1){ |
| | |
| | | select a.*,b.name as paper_name,c.id as company_id,c.name as company_name from ex_paper_student a |
| | | left join ex_exam_paper b on b.id=a.paper_id |
| | | left join sys_company c on c.id=b.company_id |
| | | WHERE a.student_id = #{studentId} |
| | | WHERE b.del_flag = 0 and a.student_id = #{studentId} |
| | | </select> |
| | | |
| | | <select id="selectNoCompleteStudent" resultMap="SimplePaperStudentResult"> |
| | |
| | | select a.*,b.name as phase_name,c.id as company_id,c.name as company_name from ex_phase_student a |
| | | left join ex_course_phase b on b.id=a.phase_id |
| | | left join sys_company c on c.id=b.company_id |
| | | where a.student_id=#{studentId} |
| | | where b.del_flag = 0 and a.student_id=#{studentId} |
| | | </select> |
| | | |
| | | |