Browse Source

去排序jar包

chengyao 3 years ago
parent
commit
e7526613f5

+ 0 - 18
pom.xml

@@ -217,21 +217,6 @@
             <artifactId>ojdbc6</artifactId>
             <version>11.2.0.3</version>
         </dependency>
-        <dependency>
-            <groupId>org.JoSQL</groupId>
-            <artifactId>JoSQL</artifactId>
-            <version>2.2</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/src/main/resources/lib/josql-2.2.jar</systemPath>
-        </dependency>
-
-        <dependency>
-            <groupId>net.sf.josql</groupId>
-            <artifactId>gentlyweb-utils</artifactId>
-            <version>1.5</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/src/main/resources/lib/gentlyweb-utils-1.5.jar</systemPath>
-        </dependency>
 
         <dependency>
             <groupId>com.microsoft.sqlserver</groupId>
@@ -293,9 +278,6 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <includeSystemScope>true</includeSystemScope>
-                </configuration>
             </plugin>
             <!-- 添加docker-maven插件 -->
             <plugin>

+ 1 - 1
src/main/java/com/diagbot/facade/DataAnalysisDeptFacade.java

@@ -97,7 +97,7 @@ public class DataAnalysisDeptFacade {
         List<GetEntryDefectImproveDeptDTO> getEntryDefectImproveDeptDTOS = DataAnalysisFacade.page(getEntryDefectImproveDeptDTOList, size, current);
         if (ListUtil.isNotEmpty(getEntryDefectImproveDeptDTOS)) {
             //排序操作
-            getEntryDefectImproveDeptDTOS = DataAnalysisFacade.sortList(getEntryDefectImproveDeptDTOS, getEntryDefectImproveDeptVO.getAsc() != null ? getEntryDefectImproveDeptVO.getAsc() : getEntryDefectImproveDeptVO.getDesc() + " desc");
+        //    getEntryDefectImproveDeptDTOS = DataAnalysisFacade.sortList(getEntryDefectImproveDeptDTOS, getEntryDefectImproveDeptVO.getAsc() != null ? getEntryDefectImproveDeptVO.getAsc() : getEntryDefectImproveDeptVO.getDesc() + " desc");
         }
         ;
         page.setRecords(getEntryDefectImproveDeptDTOS);

+ 2 - 29
src/main/java/com/diagbot/facade/DataAnalysisFacade.java

@@ -36,10 +36,6 @@ import com.diagbot.vo.GetQcClickInnerPageVO;
 import com.diagbot.vo.GetQcClickVO;
 import com.diagbot.vo.MedClickInfoVO;
 import org.apache.commons.lang3.StringUtils;
-import org.josql.Query;
-import org.josql.QueryExecutionException;
-import org.josql.QueryParseException;
-import org.josql.QueryResults;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
@@ -254,7 +250,7 @@ public class DataAnalysisFacade {
         List<GetEntryDefectImproveDTO> getEntryDefectImproveDTOS = page(getEntryDefectImproveDTO, size, current);
         if (ListUtil.isNotEmpty(getEntryDefectImproveDTOS)) {
             //排序操作
-            getEntryDefectImproveDTOS = sortList(getEntryDefectImproveDTOS, getEntryDefectImproveVO.getAsc() != null ? getEntryDefectImproveVO.getAsc() : getEntryDefectImproveVO.getDesc() + " desc");
+         //   getEntryDefectImproveDTOS = sortList(getEntryDefectImproveDTOS, getEntryDefectImproveVO.getAsc() != null ? getEntryDefectImproveVO.getAsc() : getEntryDefectImproveVO.getDesc() + " desc");
         };
         page.setRecords(getEntryDefectImproveDTOS);
         return page;
@@ -336,29 +332,6 @@ public class DataAnalysisFacade {
         return currentPageList;
     }
 
-    /**
-     * 内存数据排序 使用JoSQL
-     *
-     * @param list
-     * @param orderByString a asc,b desc
-     * @return
-     */
-
-    public static <T> List<T> sortList(List<T> list, String orderByString) {
-        String josql = " select * from " + list.get(0).getClass().getName() + " order by " + orderByString;
-        Query query = new Query();
-        try {
-            query.parse(josql);
-            QueryResults results = query.execute(list);
-            list = results.getResults();
-        } catch (QueryParseException e) {
-            e.printStackTrace();
-        } catch (QueryExecutionException e) {
-            e.printStackTrace();
-        }
-        return list;
-    }
-
     public static Map getEntryTotalMap(List<QcResultDetailInfo> qcResultDetailInfos, Map<String, Long> totalMap) {
         Set<String> totalSet = new HashSet<String>();
         for (QcResultDetailInfo qcResultDetailInfo : qcResultDetailInfos) {
@@ -464,7 +437,7 @@ public class DataAnalysisFacade {
         List<BehospitalInfoDTO> behospitalInfoDTOList = page(behospitalInfoDTOS, size, current);
         if (ListUtil.isNotEmpty(behospitalInfoDTOList)) {
             //排序操作
-            behospitalInfoDTOList = sortList(behospitalInfoDTOList, getEntryDefectImproveInnerVO.getAsc() != null ? getEntryDefectImproveInnerVO.getAsc() : getEntryDefectImproveInnerVO.getDesc() + " desc");
+        //    behospitalInfoDTOList = sortList(behospitalInfoDTOList, getEntryDefectImproveInnerVO.getAsc() != null ? getEntryDefectImproveInnerVO.getAsc() : getEntryDefectImproveInnerVO.getDesc() + " desc");
         }
         page.setRecords(behospitalInfoDTOList);
         return page;

BIN
src/main/resources/lib/JoSQL-2.2.jar


BIN
src/main/resources/lib/gentlyweb-utils-1.5.jar