Search in sources :

Example 1 with PreparationInfo

use of com.cas.sim.tis.vo.PreparationInfo in project TeachingInSimulation by ScOrPiOzzy.

the class PreparationDetail method loadResources.

private void loadResources() {
    if (preparation == null) {
        return;
    }
    List<PreparationInfo> resources = SpringUtil.getBean(PreparationResourceAction.class).findResourcesByPreparationId(preparation.getId());
    JSONArray array = new JSONArray();
    array.addAll(resources);
    this.resces.setItems(array);
    this.resces.build();
}
Also used : PreparationResourceAction(com.cas.sim.tis.action.PreparationResourceAction) JSONArray(com.alibaba.fastjson.JSONArray) PreparationInfo(com.cas.sim.tis.vo.PreparationInfo)

Example 2 with PreparationInfo

use of com.cas.sim.tis.vo.PreparationInfo in project TeachingInSimulation by ScOrPiOzzy.

the class PreparationDetail method loadQuizs.

private void loadQuizs() {
    if (preparation == null) {
        return;
    }
    List<PreparationInfo> quizs = SpringUtil.getBean(PreparationQuizAction.class).findQuizsByPreparationId(preparation.getId());
    JSONArray array = new JSONArray();
    array.addAll(quizs);
    this.quizs.setItems(array);
    this.quizs.build();
}
Also used : PreparationQuizAction(com.cas.sim.tis.action.PreparationQuizAction) JSONArray(com.alibaba.fastjson.JSONArray) PreparationInfo(com.cas.sim.tis.vo.PreparationInfo)

Example 3 with PreparationInfo

use of com.cas.sim.tis.vo.PreparationInfo in project TeachingInSimulation by ScOrPiOzzy.

the class PreparationQuizServiceImpl method findQuizsByPreparationId.

@Override
public List<PreparationInfo> findQuizsByPreparationId(Integer pid) {
    PreparationQuizMapper mapper = (PreparationQuizMapper) this.mapper;
    List<PreparationInfo> tests = mapper.findQuizsByPreparationId(pid);
    if (tests == null) {
        return new ArrayList<>();
    } else {
        return tests;
    }
}
Also used : PreparationQuizMapper(com.cas.sim.tis.mapper.PreparationQuizMapper) ArrayList(java.util.ArrayList) PreparationInfo(com.cas.sim.tis.vo.PreparationInfo)

Aggregations

PreparationInfo (com.cas.sim.tis.vo.PreparationInfo)3 JSONArray (com.alibaba.fastjson.JSONArray)2 PreparationQuizAction (com.cas.sim.tis.action.PreparationQuizAction)1 PreparationResourceAction (com.cas.sim.tis.action.PreparationResourceAction)1 PreparationQuizMapper (com.cas.sim.tis.mapper.PreparationQuizMapper)1 ArrayList (java.util.ArrayList)1