Forráskód Böngészése

Merge branch 'dev_v3.0.1' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.0.1

xiaof 3 éve
szülő
commit
495a51cdb5

+ 3 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java

@@ -352,7 +352,9 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         examPaperStructure.setPaperInfoJson(paperInfoJson);
         examPaperStructure.setPropositionTeacherId(propositionTeacherId);
         examPaperStructure.setEnable(true);
-        examPaperStructure.setId(examPaperStructureId);
+        if (SystemConstant.longNotNull(examPaperStructureId)){
+            examPaperStructure.setId(examPaperStructureId);
+        }
         this.saveOrUpdate(examPaperStructure);
         return examPaperStructure;
     }

+ 2 - 2
distributed-print/src/test/java/com/qmth/distributed/print/ConvertUtilTest.java

@@ -17,8 +17,8 @@ public class ConvertUtilTest {
 
     @Test
     public void pdfToJpg() throws Exception {
-        String sourcePath = "E:\\pdf\\嵌入式实验.pdf";
-        String targetPath = "E:\\pdf\\嵌入式实验";
+        String sourcePath = "E:\\pdf\\题卡-Qtz题卡.pdf";
+        String targetPath = "E:\\pdf\\题卡-Qtz题卡";
         ConvertUtil.pdfToImageFile(sourcePath,targetPath);
     }
 }

+ 27 - 0
distributed-print/src/test/java/com/qmth/distributed/print/ExamPaperStructureServiceTest.java

@@ -26,6 +26,7 @@ public class ExamPaperStructureServiceTest {
     public void submit(){
         String e = "{\n" +
                 "\t\"basicPaperInfo\": {\n" +
+                "\t\t\"examPaperStructureId\": null,\n" +
                 "\t\t\"examId\": 237292182900310016,\n" +
                 "\t\t\"thirdRelateId\": 1,\n" +
                 "\t\t\"thirdRelateName\": \"考试1\",\n" +
@@ -37,6 +38,7 @@ public class ExamPaperStructureServiceTest {
                 "\t\t\t\"A\",\n" +
                 "\t\t\t\"B\"\n" +
                 "\t\t],\n" +
+                "\t\t\"sequence\": 1,\n" +
                 "\t\t\"status\": \"FINISH\"\n" +
                 "\t},\n" +
                 "\t\"paperStructureInfo\": {\n" +
@@ -173,6 +175,22 @@ public class ExamPaperStructureServiceTest {
                 "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
                 "\t\t\t\t\t\"expandSub\": true\n" +
                 "\t\t\t\t}\n" +
+                "\t\t\t],\n" +
+                "\t\t\t\"pictureConfigList\": [\n" +
+                "\t\t\t\t{\n" +
+                "\t\t\t\t\t\"i\": 1,\n" +
+                "\t\t\t\t\t\"x\": 0,\n" +
+                "\t\t\t\t\t\"y\": 0,\n" +
+                "\t\t\t\t\t\"w\": 1191,\n" +
+                "\t\t\t\t\t\"h\": 842\n" +
+                "\t\t\t\t},\n" +
+                "\t\t\t\t{\n" +
+                "\t\t\t\t\t\"i\": 2,\n" +
+                "\t\t\t\t\t\"x\": 0,\n" +
+                "\t\t\t\t\t\"y\": 0,\n" +
+                "\t\t\t\t\t\"w\": 1191,\n" +
+                "\t\t\t\t\t\"h\": 842\n" +
+                "\t\t\t\t}\n" +
                 "\t\t\t]\n" +
                 "\t\t},\n" +
                 "\t\t{\n" +
@@ -242,6 +260,15 @@ public class ExamPaperStructureServiceTest {
                 "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
                 "\t\t\t\t\t\"expandSub\": true\n" +
                 "\t\t\t\t}\n" +
+                "\t\t\t],\n" +
+                "\t\t\t\"pictureConfigList\": [\n" +
+                "\t\t\t\t{\n" +
+                "\t\t\t\t\t\"i\": 3,\n" +
+                "\t\t\t\t\t\"x\": 0,\n" +
+                "\t\t\t\t\t\"y\": 0,\n" +
+                "\t\t\t\t\t\"w\": 1191,\n" +
+                "\t\t\t\t\t\"h\": 842\n" +
+                "\t\t\t\t}\n" +
                 "\t\t\t]\n" +
                 "\t\t}\n" +
                 "\t]\n" +