Browse Source

节点控制

zhuhaiwen 3 years ago
parent
commit
1dff4478a5

+ 12 - 0
oa-app/src/main/java/com/css/oa/exam/assign/service/AdmService.java

9
import com.css.oa.exam.constants.BoolState;
9
import com.css.oa.exam.constants.BoolState;
10
import com.css.oa.exam.exam.repository.Exam;
10
import com.css.oa.exam.exam.repository.Exam;
11
import com.css.oa.exam.exam.repository.IExamRepository;
11
import com.css.oa.exam.exam.repository.IExamRepository;
12
import com.css.oa.exam.node.repository.INodeRepository;
13
import com.css.oa.exam.node.service.NodeQueryService;
12
import com.css.oa.exam.room.repository.IRoomRepository;
14
import com.css.oa.exam.room.repository.IRoomRepository;
13
import com.css.oa.exam.room.repository.Room;
15
import com.css.oa.exam.room.repository.Room;
14
import com.css.oa.exam.student.repository.Student;
16
import com.css.oa.exam.student.repository.Student;
308
    @Autowired
310
    @Autowired
309
    IExamRepository examRepository;
311
    IExamRepository examRepository;
310
312
313
    @Autowired
314
    NodeQueryService nodeQueryService;
315
311
    public Map myAdm(String student_id) {
316
    public Map myAdm(String student_id) {
317
        if(nodeQueryService.printAdmissionIsClose()){
318
            List<MyAdmWrap> wraps = new ArrayList<>();
319
            Map map = new LinkedHashMap();
320
            map.put("total", 0);
321
            map.put("list", wraps);
322
            return map;
323
        }
312
        List<Assign> assigns = repository.myAdm(student_id);
324
        List<Assign> assigns = repository.myAdm(student_id);
313
        setProperties(assigns);
325
        setProperties(assigns);
314
326

+ 12 - 0
oa-app/src/main/java/com/css/oa/exam/score/service/ScoreService.java

6
import cn.afterturn.easypoi.excel.entity.ImportParams;
6
import cn.afterturn.easypoi.excel.entity.ImportParams;
7
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
7
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
8
import com.css.oa.exam.admin.bean.Admin;
8
import com.css.oa.exam.admin.bean.Admin;
9
import com.css.oa.exam.assign.bean.MyAdmWrap;
9
import com.css.oa.exam.assign.repository.Assign;
10
import com.css.oa.exam.assign.repository.Assign;
10
import com.css.oa.exam.assign.repository.IAssignRepository;
11
import com.css.oa.exam.assign.repository.IAssignRepository;
11
import com.css.oa.exam.base.BaseVerifyService;
12
import com.css.oa.exam.base.BaseVerifyService;
20
import com.css.oa.exam.constants.ExportDTO;
21
import com.css.oa.exam.constants.ExportDTO;
21
import com.css.oa.exam.exam.repository.Exam;
22
import com.css.oa.exam.exam.repository.Exam;
22
import com.css.oa.exam.exam.repository.IExamRepository;
23
import com.css.oa.exam.exam.repository.IExamRepository;
24
import com.css.oa.exam.node.service.NodeQueryService;
23
import com.css.oa.exam.score.bean.*;
25
import com.css.oa.exam.score.bean.*;
24
import com.css.oa.exam.score.repository.IScoreRepository;
26
import com.css.oa.exam.score.repository.IScoreRepository;
25
import com.css.oa.exam.score.repository.Score;
27
import com.css.oa.exam.score.repository.Score;
375
        certificateRepository.saveAll(certifiList);
377
        certificateRepository.saveAll(certifiList);
376
    }
378
    }
377
379
380
    @Autowired
381
    NodeQueryService nodeQueryService;
382
378
    public Map myScore(String student_id) {
383
    public Map myScore(String student_id) {
384
        if(nodeQueryService.queryScoreIsClose()){
385
            List<MyAdmWrap> wraps = new ArrayList<>();
386
            Map map = new LinkedHashMap();
387
            map.put("total", 0);
388
            map.put("list", wraps);
389
            return map;
390
        }
379
        Student student = studentRepository.findById(student_id).get();
391
        Student student = studentRepository.findById(student_id).get();
380
        List<Score> scores = repository.myScore(student_id);
392
        List<Score> scores = repository.myScore(student_id);
381
        setProperties(scores);
393
        setProperties(scores);