Browse Source

Merge remote-tracking branch 'origin/master' into ywx

tags/正式版本
雍文秀 2 years ago
parent
commit
cd8edf16de

+ 23
- 1
sexam/src/main/java/com/xhkjedu/sexam/controller/paper/EPaperFjtypeController.java View File

10
 import org.springframework.web.bind.annotation.RestController;
10
 import org.springframework.web.bind.annotation.RestController;
11
 
11
 
12
 import javax.annotation.Resource;
12
 import javax.annotation.Resource;
13
+import java.util.Map;
14
+
13
 /**
15
 /**
14
  * @Description 附件试卷
16
  * @Description 附件试卷
15
  * @Author WN
17
  * @Author WN
22
     @Resource
24
     @Resource
23
     private EPaperFjtypeService ePaperFjtypeService;
25
     private EPaperFjtypeService ePaperFjtypeService;
24
 
26
 
25
-    //保存试卷信息
27
+    /**
28
+     * @Description 保存试卷信息
29
+     * @Param [paper]
30
+     * @Return com.xhkjedu.vo.ResultVo
31
+     * @Author wn
32
+     * @Date 2022/7/19 8:36
33
+     **/
26
     @PostMapping("/save")
34
     @PostMapping("/save")
27
     public ResultVo savePaperFj(@RequestBody EPaper paper){
35
     public ResultVo savePaperFj(@RequestBody EPaper paper){
28
         N_Utils.validation(new Object[]{paper.getExamid(),"考试id",1});
36
         N_Utils.validation(new Object[]{paper.getExamid(),"考试id",1});
30
         return new ResultVo(0,"成功保存试卷信息",null);
38
         return new ResultVo(0,"成功保存试卷信息",null);
31
     }
39
     }
32
 
40
 
41
+    /**
42
+     * @Description 附件试卷详情
43
+     * @Param [paper]
44
+     * @Return com.xhkjedu.vo.ResultVo
45
+     * @Author wn
46
+     * @Date 2022/7/19 8:36
47
+     **/
48
+    @PostMapping("/detail")
49
+    public ResultVo getPaperFjDetail(@RequestBody EPaper paper){
50
+        N_Utils.validation(new Object[]{paper.getEpid(),"试卷id",1});
51
+        Map map = ePaperFjtypeService.getPaperFjDetail(paper.getEpid());
52
+        return new ResultVo(0,"成功保存试卷信息",null);
53
+    }
54
+
33
 }
55
 }

+ 6
- 1
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperFjtypeMapper.java View File

2
 
2
 
3
 import com.xhkjedu.sexam.base.TkMapper;
3
 import com.xhkjedu.sexam.base.TkMapper;
4
 import com.xhkjedu.sexam.model.paper.EPaperFjtype;
4
 import com.xhkjedu.sexam.model.paper.EPaperFjtype;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+import java.util.Map;
5
 
9
 
6
 /**
10
 /**
7
  * @Description 附件试卷题型信息
11
  * @Description 附件试卷题型信息
9
  * Date 2022/7/18 13:59
13
  * Date 2022/7/18 13:59
10
  **/
14
  **/
11
 public interface EPaperFjtypeMapper extends TkMapper<EPaperFjtype> {
15
 public interface EPaperFjtypeMapper extends TkMapper<EPaperFjtype> {
12
-
16
+    //试卷题型试题信息
17
+    List<Map> listPaperFjtypeQuestions(@Param("epid")Integer epid);
13
 }
18
 }

+ 12
- 3
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperFjtypeService.java View File

179
         ePaperAnalyzeMapper.insertUseGeneratedKeys(epa);
179
         ePaperAnalyzeMapper.insertUseGeneratedKeys(epa);
180
     }
180
     }
181
 
181
 
182
-    //试卷详情
183
-    public void getPaperDetail(Integer epid){
184
-
182
+    /**
183
+     * @Description 试卷详情
184
+     * @Param [epid]
185
+     * @Return java.util.Map
186
+     * @Author wn
187
+     * @Date 2022/7/19 8:35
188
+     **/
189
+    public Map getPaperFjDetail(Integer epid){
190
+        Map map = ePaperMapper.getExamPaperDetailByEpid(epid);//试卷信息
191
+        List<Map> fjtypelist = ePaperFjtypeMapper.listPaperFjtypeQuestions(epid);//试卷题型试题信息
192
+        map.put("qtypes",fjtypelist);
193
+        return map;
185
     }
194
     }
186
 }
195
 }

+ 14
- 17
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperService.java View File

38
         return ePaperMapper.listExamPapers(examid);
38
         return ePaperMapper.listExamPapers(examid);
39
     }
39
     }
40
 
40
 
41
-    //试卷退回
41
+    /**
42
+     * @Description 试卷退回
43
+     * @Param [ePaperBack]
44
+     * @Return void
45
+     * @Author wn
46
+     * @Date 2022/7/19 8:34
47
+     **/
42
     @Transactional(rollbackFor = Exception.class)
48
     @Transactional(rollbackFor = Exception.class)
43
     public void savePaperBack(EPaperBack ePaperBack){
49
     public void savePaperBack(EPaperBack ePaperBack){
44
         int timestamp = N_Utils.getSecondTimestamp();
50
         int timestamp = N_Utils.getSecondTimestamp();
49
         //试卷回退需要发送通知和短息,后续添加
55
         //试卷回退需要发送通知和短息,后续添加
50
     }
56
     }
51
 
57
 
52
-    //试卷退回原因
58
+    /**
59
+     * @Description 试卷退回原因
60
+     * @Param [epid]
61
+     * @Return java.util.List<java.util.Map>
62
+     * @Author wn
63
+     * @Date 2022/7/19 8:34
64
+     **/
53
     public List<Map> listPaperBacksByEpid(Integer epid){
65
     public List<Map> listPaperBacksByEpid(Integer epid){
54
         return ePaperBackMapper.listPaperBacksByEpid(epid);
66
         return ePaperBackMapper.listPaperBacksByEpid(epid);
55
     }
67
     }
59
         return ePaperMapper.listExamPapersByTeacherid(teacherid);
71
         return ePaperMapper.listExamPapersByTeacherid(teacherid);
60
     }
72
     }
61
 
73
 
62
-    //试卷详情
63
-    public Map getExamPaperDetailByEpid(Integer epid){
64
-        Map map = ePaperMapper.getExamPaperDetailByEpid(epid);
65
-        //试卷类型1题库2答题卡3仅答题卡
66
-        int ptype = Integer.parseInt(map.get("ptype").toString());
67
-        if(ptype == 1){
68
-
69
-        }else if(ptype == 2){
70
-
71
-        }else{
72
-
73
-        }
74
-
75
-        return null;
76
-    }
77
 
74
 
78
 }
75
 }

+ 1
- 0
sexam/src/main/resources/mapper/paper/EPaperFjtypeMapper.xml View File

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.xhkjedu.sexam.mapper.paper.EPaperFjtypeMapper">
3
 <mapper namespace="com.xhkjedu.sexam.mapper.paper.EPaperFjtypeMapper">
4
 
4
 
5
+    <!--试卷题型试题信息-->
5
     <resultMap id="fjtypeQuestions" type="java.util.Map">
6
     <resultMap id="fjtypeQuestions" type="java.util.Map">
6
         <result column="epfjid" property="epfjid"></result>
7
         <result column="epfjid" property="epfjid"></result>
7
         <result column="epid" property="epid"></result>
8
         <result column="epid" property="epid"></result>

Loading…
Cancel
Save