deason 6 năm trước cách đây
mục cha
commit
c48e4a57e7

+ 51 - 0
examcloud-core-print-common/src/main/java/cn/com/qmth/examcloud/core/print/common/utils/Pair.java

@@ -0,0 +1,51 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-12-05 16:06:17.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.common.utils;
+
+import java.io.Serializable;
+
+public class Pair<K, V> implements Serializable {
+    private K key;
+    private V value;
+
+    public Pair(K key, V value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    public K getKey() {
+        return key;
+    }
+
+    public V getValue() {
+        return value;
+    }
+
+    @Override
+    public String toString() {
+        return key + "=" + value;
+    }
+
+    @Override
+    public int hashCode() {
+        return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o instanceof Pair) {
+            Pair pair = (Pair) o;
+            if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
+            if (value != null ? !value.equals(pair.value) : pair.value != null) return false;
+            return true;
+        }
+        return false;
+    }
+
+}

+ 1 - 1
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/bean/coursepaper/ExportFileInfo.java

@@ -8,7 +8,7 @@
 package cn.com.qmth.examcloud.core.print.service.bean.coursepaper;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
-import javafx.util.Pair;
+import cn.com.qmth.examcloud.core.print.common.utils.Pair;
 
 /**
  * @author: fengdesheng

+ 1 - 5
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/impl/CoursePaperServiceImpl.java

@@ -12,10 +12,7 @@ import cn.com.qmth.examcloud.core.print.common.jpa.SearchBuilder;
 import cn.com.qmth.examcloud.core.print.common.jpa.SpecUtils;
 import cn.com.qmth.examcloud.core.print.common.upyun.SystemProperty;
 import cn.com.qmth.examcloud.core.print.common.upyun.UpYunClient;
-import cn.com.qmth.examcloud.core.print.common.utils.Check;
-import cn.com.qmth.examcloud.core.print.common.utils.ElectronUtils;
-import cn.com.qmth.examcloud.core.print.common.utils.ExcelUtils;
-import cn.com.qmth.examcloud.core.print.common.utils.FileUtils;
+import cn.com.qmth.examcloud.core.print.common.utils.*;
 import cn.com.qmth.examcloud.core.print.entity.CoursePaper;
 import cn.com.qmth.examcloud.core.print.entity.CourseStatistic;
 import cn.com.qmth.examcloud.core.print.entity.ObjectiveQuestionStructure;
@@ -27,7 +24,6 @@ import cn.com.qmth.examcloud.core.print.service.CoursePaperService;
 import cn.com.qmth.examcloud.core.print.service.ExamQuestionStructureService;
 import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.*;
 import com.itextpdf.text.pdf.PdfReader;
-import javafx.util.Pair;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;