deason 6 tahun lalu
induk
melakukan
e90e0c3eb7

+ 1 - 1
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/PrintingProjectService.java

@@ -89,6 +89,6 @@ public interface PrintingProjectService {
     /**
      * 获取印刷项目的简要信息列表
      */
-    List<PrintingProjectLessInfo> getAllPrintingProjectLessInfo();
+    List<PrintingProjectLessInfo> getPrintingProjectLessInfoList();
 
 }

+ 6 - 7
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/impl/PrintingProjectServiceImpl.java

@@ -24,7 +24,6 @@ import cn.com.qmth.examcloud.core.print.service.bean.printingproject.PrintingPro
 import cn.com.qmth.examcloud.core.print.service.bean.printingproject.PrintingProjectInfo;
 import cn.com.qmth.examcloud.core.print.service.bean.printingproject.PrintingProjectLessInfo;
 import cn.com.qmth.examcloud.core.print.service.bean.printingproject.PrintingProjectQuery;
-import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -207,6 +206,12 @@ public class PrintingProjectServiceImpl implements PrintingProjectService {
         printingProjectRepository.updateSupplierNameBySupplierId(supplierId, supplierName);
     }
 
+    @Override
+    public List<PrintingProjectLessInfo> getPrintingProjectLessInfoList() {
+        SqlWrapper sql = new SqlWrapper().select("id as projectId,org_id,exam_id").from("ec_prt_project");
+        return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(PrintingProjectLessInfo.class));
+    }
+
     @Override
     public List<OrgInfo> getOrgList(Long pmId, Long supplierId) {
         SqlWrapper sql = new SqlWrapper().select("org_id,org_name").from("ec_prt_project").where().append("1=1");
@@ -230,10 +235,4 @@ public class PrintingProjectServiceImpl implements PrintingProjectService {
         return jdbcTemplate.query(sql.build(), new BeanPropertyRowMapper(ExamInfo.class));
     }
 
-    @Override
-    public List<PrintingProjectLessInfo> getAllPrintingProjectLessInfo() {
-        //todo
-        return Lists.newArrayList();
-    }
-
 }

+ 2 - 2
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/impl/PrintingProjectStatisticServiceImpl.java

@@ -77,8 +77,8 @@ public class PrintingProjectStatisticServiceImpl implements PrintingProjectStati
     public void initAllPrintingProjectStatistic() {
         log.debug("initAllPrintingProjectStatistic...");
 
-        //只处理印刷项目中已有的考试
-        List<PrintingProjectLessInfo> projects = printingProjectService.getAllPrintingProjectLessInfo();
+        //只处理已有的印刷项目
+        List<PrintingProjectLessInfo> projects = printingProjectService.getPrintingProjectLessInfoList();
         if (projects == null || projects.isEmpty()) {
             return;
         }

+ 2 - 2
examcloud-core-print-starter/src/test/java/cn/com/qmth/examcloud/core/print/test/ProjectStatisticServiceTest.java

@@ -30,8 +30,8 @@ public class ProjectStatisticServiceTest extends BaseTest {
     public void initPrintingProjectStatisticTest() throws Exception {
         Long orgId = 1L;
         Long examId = 1L;
-        printingProjectStatisticService.refreshPrintingProjectStatistic(orgId, examId);
-        //printingProjectStatisticService.initAllPrintingProjectStatistic();
+        //printingProjectStatisticService.refreshPrintingProjectStatistic(orgId, examId);
+        printingProjectStatisticService.initAllPrintingProjectStatistic();
     }
 
 }