|
@@ -18,6 +18,7 @@ import cn.com.qmth.examcloud.core.print.service.PrintingProjectStatisticService;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.printingproject.PrintingProjectLessInfo;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.printingprojectstatistic.PrintingProjectStatisticConvert;
|
|
|
import cn.com.qmth.examcloud.core.print.service.bean.printingprojectstatistic.PrintingProjectStatisticInfo;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -65,12 +66,7 @@ public class PrintingProjectStatisticServiceImpl implements PrintingProjectStati
|
|
|
throw new StatusException(PRT_CODE_500, "当前项目不存在!");
|
|
|
}
|
|
|
|
|
|
- ProjectStatistic statistic = projectStatisticRepository.getProjectStatisticByProjectId(project.getId());
|
|
|
- if (statistic == null) {
|
|
|
- throw new StatusException(PRT_CODE_500, "当前项目统计不存在!");
|
|
|
- }
|
|
|
-
|
|
|
- //todo
|
|
|
+ this.doStatistic(Lists.newArrayList(new PrintingProjectLessInfo(orgId, examId, project.getId())));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -79,12 +75,39 @@ public class PrintingProjectStatisticServiceImpl implements PrintingProjectStati
|
|
|
|
|
|
//只处理已有的印刷项目
|
|
|
List<PrintingProjectLessInfo> projects = printingProjectService.getPrintingProjectLessInfoList();
|
|
|
+
|
|
|
+ this.doStatistic(projects);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void doStatistic(List<PrintingProjectLessInfo> projects) {
|
|
|
if (projects == null || projects.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
for (PrintingProjectLessInfo project : projects) {
|
|
|
+ ProjectStatistic statistic = projectStatisticRepository.getProjectStatisticByProjectId(project.getProjectId());
|
|
|
+ if (statistic == null) {
|
|
|
+ statistic = new ProjectStatistic();
|
|
|
+ statistic.setProjectId(project.getProjectId());
|
|
|
+ }
|
|
|
//todo
|
|
|
+
|
|
|
+ //人科次
|
|
|
+ //课程数量
|
|
|
+ //试卷数量
|
|
|
+ //试卷袋数量
|
|
|
+
|
|
|
+ //常规-A3数量
|
|
|
+ //备份-A3数量
|
|
|
+ //合计-A3数量
|
|
|
+
|
|
|
+ //常规-A4数量
|
|
|
+ //备份-A4数量
|
|
|
+ //合计-A4数量
|
|
|
+
|
|
|
+ //常规-总数(A3)
|
|
|
+ //备份-总数(A3
|
|
|
+ //合计-总数(A3
|
|
|
}
|
|
|
}
|
|
|
|