소스 검색

Merge branch 'dev-v5.2' into dev

he2802 3 년 전
부모
커밋
e65305b17f

+ 9 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/order/OrderController.java

@@ -157,4 +157,13 @@ public class OrderController extends BaseController {
         return AjaxResult.success(iOrderGoodsService.selectDetail(bo));
     }
 
+    /**
+     * 获取订单详细信息
+     */
+    @ApiOperation("获取订单详细信息")
+    @PreAuthorize("@ss.hasPermi('system:order:query')")
+    @GetMapping("/{orderId}")
+    public AjaxResult<OrderVo> getInfo(@PathVariable("orderId" ) Long orderId) {
+        return AjaxResult.success(iOrderService.queryById(orderId));
+    }
 }

+ 29 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -926,8 +926,14 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                 Integer nowPart = -1;//0正文 1选项A 2选项B 3选项C 4选项D 5选项E 6选项F
                 String strContent = "";
                 String imgUrl  = null;
+                boolean hasQuestion = false;
                 for (XWPFParagraph paragraph : paragraphList) {
                     content = paragraph.getText();
+                    System.out.println(content);
+                    System.out.println("EEE");
+                    if(content.startsWith("2")){
+                        System.out.println("EEE");
+                    }
                     content = dealTxt(content);
                     List<XWPFRun> runs = paragraph.getRuns();
                     imgUrl = null;
@@ -980,7 +986,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                         }
                     }
                     if (content.startsWith("#")||isQuestionStart(content)) {
-                        if(nowPart>0){
+                        if(hasQuestion){
+                            hasQuestion = false;
                             //插入上一条
                             QuestionAddBo addBo = new QuestionAddBo();
                             qContent = removeNo(qContent);
@@ -1037,8 +1044,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     if(Validator.isEmpty(content)||content.equals("")){
                         continue;
                     }
-
                     if (isQuestionStart(content)||(nowPart==0&&!isLineStart(content))) {
+                        hasQuestion = true;
                         if(nowPart!=0){
                             qContent = "";
                         }
@@ -1048,6 +1055,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
                     //第一个选项
                     if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
+                        if (Validator.isEmpty(qContent)) {
+                            errorLog += "第" + index + "条题目内容空白\n";
+                            continue;
+                        }
                         if(nowPart!=1){
                             strContent = "";
                         }
@@ -1169,6 +1180,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
                     //答案和题型
                     if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
+                        if (Validator.isEmpty(qContent)) {
+                            errorLog += "第" + index + "条题目内容空白\n";
+                            continue;
+                        }
                         if(nowPart!=7){
                             strContent = "";
                         }
@@ -1292,6 +1307,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                 Integer nowPart = -1;//0正文 1选项A 2选项B 3选项C 4选项D 5选项E 6选项F
                 String strContent = "";
                 String imgUrl = "";
+                boolean hasQuestion = false;
                 for (XWPFParagraph paragraph : paragraphList) {
                     content = paragraph.getText();
                     List<XWPFRun> runs = paragraph.getRuns();
@@ -1341,7 +1357,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
                     content = dealTxt(content);
                     if (content.startsWith("#")||isQuestionStart(content)) {
-                        if(nowPart>0){
+                        if(hasQuestion){
+                            hasQuestion = false;
                             //插入上一条
                             QuestionAddBo addBo = new QuestionAddBo();
                             qContent = removeNo(qContent);
@@ -1400,6 +1417,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
 
                     if (isQuestionStart(content)||(nowPart==0&&!isLineStart(content))) {
+                        hasQuestion = true;
                         if(nowPart!=0){
                             qContent = "";
                         }
@@ -1409,6 +1427,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
                     //第一个选项
                     if(content.startsWith("A.")||(nowPart==1&&!isLineStart(content))) {
+                        if (Validator.isEmpty(qContent)) {
+                            errorLog += "第" + index + "条题目内容空白\n";
+                            continue;
+                        }
                         if(nowPart!=1){
                             strContent = "";
                         }
@@ -1530,6 +1552,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                     }
                     //答案和题型
                     if (content.startsWith("正确答案:")||(nowPart==7&&!isLineStart(content))) {
+                        if (Validator.isEmpty(qContent)) {
+                            errorLog += "第" + index + "条题目内容空白\n";
+                            continue;
+                        }
                         if(nowPart!=7){
                             strContent = "";
                         }

+ 8 - 8
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -173,10 +173,10 @@
         LEFT JOIN (SELECT
         major_id,
         type,
-        any_value ( education_type_id ),
-        any_value ( business_id ),
-        any_value ( project_id ),
-        any_value ( major_id )
+        any_value ( education_type_id ) as  education_type_id,
+        any_value ( business_id ) as  business_id,
+        any_value ( project_id )as  project_id,
+        any_value ( subject_id ) as subject_id
         FROM
         question_business
         where type = 1
@@ -227,10 +227,10 @@
         LEFT JOIN (SELECT
         major_id,
         type,
-        any_value ( education_type_id ),
-        any_value ( business_id ),
-        any_value ( project_id ),
-        any_value ( major_id )
+        any_value ( education_type_id ) as  education_type_id,
+        any_value ( business_id ) as  business_id,
+        any_value ( project_id )as  project_id,
+        any_value ( subject_id ) as subject_id
         FROM
         question_business
         where type = 1